@web-utils/form-ui 1.0.0-beta2 → 1.0.0-beta21

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 (128) hide show
  1. package/base.css +1 -1
  2. package/chunks/1chbbDUh.mjs +98 -0
  3. package/chunks/5HLN3g1u.mjs +51 -0
  4. package/chunks/B5B9au3z.mjs +180 -0
  5. package/chunks/BI2XOQW3.mjs +226 -0
  6. package/chunks/BLpnMrum.mjs +189 -0
  7. package/chunks/BNpqILFO.mjs +95 -0
  8. package/chunks/Bb43eI1f.mjs +93 -0
  9. package/chunks/BbrVRWUo.mjs +73 -0
  10. package/chunks/Bd1I-R29.mjs +53 -0
  11. package/chunks/Bh_CMUlo.mjs +12 -0
  12. package/chunks/Bv-Gn_Jd.mjs +42 -0
  13. package/chunks/C4MTLHn4.mjs +26 -0
  14. package/chunks/CI4RZnNc.mjs +26 -0
  15. package/chunks/CnsFNU2A.mjs +17 -0
  16. package/chunks/Cw8pz9hK.mjs +222 -0
  17. package/chunks/D4v0MyB_.mjs +106 -0
  18. package/chunks/D9GcEl6r.mjs +8 -0
  19. package/chunks/DGhMkri0.mjs +88 -0
  20. package/chunks/DOI7ju3i.mjs +108 -0
  21. package/chunks/DRDj0e_k.mjs +171 -0
  22. package/chunks/Dq3yxEPg.mjs +106 -0
  23. package/chunks/Dy5-h_Tx.mjs +108 -0
  24. package/chunks/RcygoTkQ.mjs +26 -0
  25. package/chunks/iWlTrkaC.mjs +76 -0
  26. package/chunks/lTFu0zgR.mjs +106 -0
  27. package/chunks/wfL1FAwc.mjs +1360 -0
  28. package/constants.d.ts +42 -0
  29. package/constants.mjs +3 -3
  30. package/element-dialog/index.d.ts +96 -0
  31. package/element-dialog/index.mjs +2 -92
  32. package/element-dialog/style.css +1 -1
  33. package/empty-view/index.d.ts +29 -0
  34. package/flex-scroll-area/index.d.ts +22 -0
  35. package/form-advice/index.d.ts +9 -0
  36. package/form-advice/index.mjs +13 -12
  37. package/form-cascader/index.d.ts +2 -0
  38. package/form-cascader/index.mjs +10 -0
  39. package/form-cell/index.d.ts +25 -0
  40. package/form-check-box-group/index.d.ts +293 -0
  41. package/form-check-box-group/index.mjs +1 -1
  42. package/form-checkbox/index.d.ts +271 -0
  43. package/form-checkbox/index.mjs +1 -1
  44. package/form-date-picker/index.d.ts +421 -0
  45. package/form-date-picker/index.mjs +1 -1
  46. package/form-holder/index.d.ts +166 -0
  47. package/form-holder/index.mjs +1 -1
  48. package/form-holder/style.css +1 -1
  49. package/form-image/index.d.ts +224 -0
  50. package/form-image/index.mjs +1 -1
  51. package/form-input/index.d.ts +387 -0
  52. package/form-input/index.mjs +1 -1
  53. package/form-input/style.css +1 -0
  54. package/form-input-cron-expression/index.d.ts +215 -0
  55. package/form-input-cron-expression/index.mjs +2 -0
  56. package/form-input-cron-expression/style.css +1 -0
  57. package/form-input-email/index.d.ts +363 -0
  58. package/form-input-email/index.mjs +1 -1
  59. package/form-input-id-card/index.d.ts +363 -0
  60. package/form-input-id-card/index.mjs +1 -1
  61. package/form-input-number/index.d.ts +325 -0
  62. package/form-input-number/index.mjs +1 -1
  63. package/form-input-phone-number/index.d.ts +363 -0
  64. package/form-input-phone-number/index.mjs +1 -1
  65. package/form-input-tag/index.d.ts +2 -0
  66. package/form-input-time/index.d.ts +2 -0
  67. package/form-item-config-provider/index.d.ts +22 -0
  68. package/form-item-config-provider/index.mjs +24 -0
  69. package/form-item-group/index.d.ts +92 -0
  70. package/form-item-group/index.mjs +2 -78
  71. package/form-item-group/style.css +1 -1
  72. package/form-item-x/index.d.ts +184 -0
  73. package/form-item-x/index.mjs +1 -1
  74. package/form-item-x/style.css +1 -0
  75. package/form-radio-group/index.d.ts +281 -0
  76. package/form-radio-group/index.mjs +1 -1
  77. package/form-rate/index.d.ts +319 -0
  78. package/form-rate/index.mjs +1 -1
  79. package/form-red-table/index.d.ts +21 -0
  80. package/form-red-table/index.mjs +27 -26
  81. package/form-row/index.d.ts +11 -0
  82. package/form-row/index.mjs +1 -1
  83. package/form-select/index.d.ts +540 -0
  84. package/form-select/index.mjs +1 -1
  85. package/form-slider/index.d.ts +348 -0
  86. package/form-slider/index.mjs +1 -1
  87. package/form-switch/index.d.ts +337 -0
  88. package/form-switch/index.mjs +1 -1
  89. package/form-text/index.d.ts +227 -0
  90. package/form-text/index.mjs +1 -1
  91. package/form-view/index.d.ts +2 -0
  92. package/index.d.ts +42 -0
  93. package/index.mjs +39 -34
  94. package/month-calendar/index.d.ts +80 -0
  95. package/month-calendar/index.mjs +312 -0
  96. package/month-calendar/style.css +1 -0
  97. package/package.json +10 -7
  98. package/resolver.d.ts +9 -0
  99. package/resolver.mjs +29 -0
  100. package/table-view/index.d.ts +2 -0
  101. package/toolbar/index.d.ts +2 -0
  102. package/toolbar-button/index.d.ts +2 -0
  103. package/vue-cron/index.d.ts +191 -0
  104. package/vue-cron/index.mjs +2 -0
  105. package/vue-cron/style.css +1 -0
  106. package/web-types.json +1 -1
  107. package/year-calendar/index.d.ts +99 -0
  108. package/year-calendar/index.mjs +174 -0
  109. package/year-calendar/style.css +1 -0
  110. package/chunks/B4M_TFeR.mjs +0 -152
  111. package/chunks/B5BIQCcK.mjs +0 -149
  112. package/chunks/BHNKrW1j.mjs +0 -61
  113. package/chunks/BO9jWhBl.mjs +0 -46
  114. package/chunks/BZ8aOa78.mjs +0 -35
  115. package/chunks/Bsz7y4Xp.mjs +0 -73
  116. package/chunks/Bxj372sF.mjs +0 -53
  117. package/chunks/C33EmJN8.mjs +0 -32
  118. package/chunks/C6Li3-l7.mjs +0 -28
  119. package/chunks/CBcdalMX.mjs +0 -35
  120. package/chunks/CdRsyF0n.mjs +0 -43
  121. package/chunks/ClNahmiU.mjs +0 -23
  122. package/chunks/CstztYMu.mjs +0 -28
  123. package/chunks/DC9b53M6.mjs +0 -32
  124. package/chunks/DDVAgRED.mjs +0 -36
  125. package/chunks/DpJQABVD.mjs +0 -91
  126. package/chunks/ZsLNWI9x.mjs +0 -46
  127. package/chunks/jn_iQrVZ.mjs +0 -28
  128. package/input/style.css +0 -1
@@ -0,0 +1,222 @@
1
+ import { formHolderContextKey as e, formItemConfigProviderContextKey as t, formItemGroupContextKey as n } from "../constants.mjs";
2
+ import { t as r } from "./Bh_CMUlo.mjs";
3
+ import { ElCol as i, ElFormItem as a, ElTooltip as o } from "element-plus/es";
4
+ import { computed as s, createVNode as c, h as l, inject as u, mergeProps as d, nextTick as f, unref as p, useTemplateRef as m } from "vue";
5
+ import { ElCol as h, rowContextKey as g } from "element-plus";
6
+ //#region src/components/form/props/form-item.js
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 = (e, { emit: t, events: n, predicate: i }) => s(() => r(e, i, n, t)), 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 = (e, { emit: t, events: n, predicate: i }) => s(() => r(e, i, n, t)), T = (t) => {
98
+ let n = u(e, null);
99
+ return s(() => t.required === !0 ? !0 : (n == null ? void 0 : n.requiredFieldsMap[t.prop]) === !0);
100
+ }, E = (e, { rules: t, attrs: n, messagePrefix: r, message: i } = {}) => {
101
+ let a = T(e);
102
+ return s(() => {
103
+ let o = { message: i }, s = p(t);
104
+ return Object.keys({
105
+ ..._,
106
+ ...x
107
+ }).forEach((t) => {
108
+ t === "rules" ? e[t] && s ? o[t] = [...e[t], ...s] : e[t] ? o[t] = e[t] : s && (o[t] = s) : t === "messagePrefix" ? o[t] = e.messagePrefix || r : o[t] = e[t];
109
+ }), o.required = a.value, o.class = n == null ? void 0 : n.class, o.style = n == null ? void 0 : n.style, o;
110
+ });
111
+ }, D = {
112
+ name: "FormItemX",
113
+ inheritAttrs: !1,
114
+ props: {
115
+ ..._,
116
+ ...x
117
+ },
118
+ setup(n, { attrs: r, slots: l, expose: p }) {
119
+ let h = u(g, null), _ = u(t, null), v = u(e, null), x = r.embed ? s(() => r.disabled) : k(n), S = b(n, { predicate: y }), E = w(n, { predicate: C }), D = s(() => (_ == null ? void 0 : _.reactive) === !0 && _.block === !1 && n.fixedSpan === void 0 && !n.half), O = T(n), A = m("formItem"), j = s(() => (_ == null ? void 0 : _.wrapCol) === !1 ? !1 : !!h && n.wrapCol), M = s(() => v != null && v.tableForm ? "" : _ != null && _.block ? "100%" : n.half && j.value ? `calc(50% - ${h.gutter.value / 2}px)` : ""), N = s(() => (_ == null ? void 0 : _.block) === !0 || n.block || n.half ? 24 : n.span), P = s(() => {
120
+ if (x.value) return [];
121
+ if (O.value) {
122
+ let e = {
123
+ required: !0,
124
+ message: n.message || `${n.messagePrefix || "请输入"}${n.label}`
125
+ };
126
+ return n.rules ? [...n.rules, e] : [e];
127
+ }
128
+ return n.rules;
129
+ });
130
+ return p({
131
+ clearValidate: async () => {
132
+ var e;
133
+ await f(), (e = A.value) == null || e.clearValidate();
134
+ },
135
+ validate: async () => {
136
+ var e;
137
+ await f(), (e = A.value) == null || e.validate();
138
+ }
139
+ }), () => {
140
+ var e;
141
+ let t = l.tips || n.tips, r = t ? c(o, {
142
+ effect: "light",
143
+ content: n.tips,
144
+ offset: 4
145
+ }, {
146
+ default: () => c("i", { class: "el-icon-info form-item-input-info" }, null),
147
+ content: l.tips ? l.tips : null
148
+ }) : null, s = c(a, d(S.value, {
149
+ ref: "formItem",
150
+ style: { width: M.value },
151
+ class: [
152
+ "form-item",
153
+ n.formItemClass,
154
+ {
155
+ "form-item-hide-label": n.hideLabel,
156
+ "with-tips": !n.tipsAfterLabel && t,
157
+ required: x.value === !1 && O.value
158
+ }
159
+ ],
160
+ rules: P.value
161
+ }), {
162
+ ...l,
163
+ default: () => {
164
+ var e;
165
+ return [(e = l.default) == null ? void 0 : e.call(l, {
166
+ disabled: x.value,
167
+ required: O.value
168
+ }), t && !n.tipsAfterLabel ? r : null];
169
+ },
170
+ label: () => [l.label ? l.label() : n.label, n.tipsAfterLabel ? r : null]
171
+ }), u = [s, (e = l.below) == null ? void 0 : e.call(l)];
172
+ return n.unwrap ? u : j.value ? c(i, d(E.value, D.value ? {
173
+ xs: 24,
174
+ sm: 12,
175
+ md: 12,
176
+ lg: 8,
177
+ xl: 6
178
+ } : {}, { span: N.value }), { default: () => u }) : s;
179
+ };
180
+ }
181
+ }, O = "update:modelValue", k = (t) => {
182
+ let r = u(e, null), i = u(n, null);
183
+ return s(() => {
184
+ if (t.disabled !== void 0) return t.disabled;
185
+ if (r) {
186
+ if (r.requiredFieldsMap[t.prop] === !0 || r.enabledFieldsMap[t.prop] === !0) return !1;
187
+ if (r.disabledFieldsMap[t.prop] === !0) return !0;
188
+ }
189
+ return (i == null ? void 0 : i.enabled) === !0 ? !1 : (i == null ? void 0 : i.disabled) === !0 ? !0 : (r == null ? void 0 : r.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 ? l(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 = (e, { emit: t, slots: n, attrs: i, rules: a, events: o, predicate: c, messagePrefix: u = "请输入" }) => {
202
+ let d = k(e), f = s(() => d.value ? "" : `${u}${e.label}`), p = E(e, {
203
+ rules: a,
204
+ attrs: i,
205
+ message: f.value
206
+ }), m = (e) => j(t, e), g = (t) => e.col ? l(h, { span: e.block ? 24 : e.span }, { default: () => t }) : t;
207
+ return {
208
+ emitInput: m,
209
+ render: ({ vNodes: t }) => M(e, {
210
+ vNodes: g(t),
211
+ formItemProps: p,
212
+ slots: n,
213
+ disabled: d
214
+ }),
215
+ placeholder: f,
216
+ disabled: d,
217
+ formItemProps: p,
218
+ autoBind: s(() => r(e, c, o, t))
219
+ };
220
+ }, P = (e) => e.icon ? l("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,106 @@
1
+ import { i as e, n as t } from "./Cw8pz9hK.mjs";
2
+ import { n } from "./CnsFNU2A.mjs";
3
+ import { ElSwitch as r } from "element-plus/es";
4
+ import { createVNode as i, mergeProps as a, useModel as o } from "vue";
5
+ //#region src/components/form/props/switch.js
6
+ var s = {
7
+ ...n,
8
+ modelValue: [
9
+ Boolean,
10
+ String,
11
+ Number
12
+ ],
13
+ loading: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ size: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ width: [Number, String],
22
+ inlinePrompt: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ activeIcon: [String, Object],
27
+ inactiveIcon: [String, Object],
28
+ activeActionIcon: [String, Object],
29
+ inactiveActionIcon: [String, Object],
30
+ activeText: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ inactiveText: {
35
+ type: String,
36
+ default: ""
37
+ },
38
+ activeValue: {
39
+ type: [
40
+ Boolean,
41
+ String,
42
+ Number
43
+ ],
44
+ default: !0
45
+ },
46
+ inactiveValue: {
47
+ type: [
48
+ Boolean,
49
+ String,
50
+ Number
51
+ ],
52
+ default: !1
53
+ },
54
+ name: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ validateEvent: {
59
+ type: Boolean,
60
+ default: !0
61
+ },
62
+ beforeChange: Function,
63
+ id: String,
64
+ tabindex: [String, Number],
65
+ ariaLabel: String,
66
+ activeColor: {
67
+ type: String,
68
+ default: ""
69
+ },
70
+ inactiveColor: {
71
+ type: String,
72
+ default: ""
73
+ },
74
+ borderColor: {
75
+ type: String,
76
+ default: ""
77
+ }
78
+ }, c = { modelValue: !0 }, l = ["change"], u = (e) => n[e] === void 0 && c[e] !== !0, d = {
79
+ name: "FormSwitch",
80
+ inheritAttrs: !1,
81
+ props: { ...s },
82
+ emits: {
83
+ ...t,
84
+ change: null
85
+ },
86
+ setup(t, { emit: n, slots: s, attrs: c }) {
87
+ let d = o(t, "modelValue"), { render: f, disabled: p, autoBind: m } = e(t, {
88
+ emit: n,
89
+ slots: s,
90
+ events: l,
91
+ predicate: u
92
+ });
93
+ return () => f({ vNodes: i(r, a(m.value, c, {
94
+ modelValue: d.value,
95
+ "onUpdate:modelValue": (e) => d.value = e,
96
+ disabled: p.value
97
+ }), {
98
+ "active-action": s["active-action"],
99
+ "inactive-action": s["inactive-action"],
100
+ active: s.active,
101
+ inactive: s.inactive
102
+ }) });
103
+ }
104
+ };
105
+ //#endregion
106
+ export { d as t };
@@ -0,0 +1,8 @@
1
+ //#region \0plugin-vue:export-helper
2
+ var e = (e, t) => {
3
+ let n = e.__vccOpts || e;
4
+ for (let [e, r] of t) n[e] = r;
5
+ return n;
6
+ };
7
+ //#endregion
8
+ export { e as t };
@@ -0,0 +1,88 @@
1
+ import { i as e, n as t } from "./Cw8pz9hK.mjs";
2
+ import { n } from "./CnsFNU2A.mjs";
3
+ import { ElRate as r } from "element-plus/es";
4
+ import { createVNode as i, mergeProps as a, useModel as o } from "vue";
5
+ //#region src/components/form/props/rate.js
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 = o(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: i(r, a(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,108 @@
1
+ import { i as e, n as t } from "./Cw8pz9hK.mjs";
2
+ import { n, t as r } from "./CnsFNU2A.mjs";
3
+ import { ElInputNumber as i } from "element-plus/es";
4
+ import { computed as a, createVNode as o, mergeProps as s } from "vue";
5
+ import { isString as c } from "@web-utils/core";
6
+ //#region src/components/form/props/input-number.js
7
+ var l = {
8
+ ...n,
9
+ ...r,
10
+ modelValue: [Number, null],
11
+ min: {
12
+ type: Number,
13
+ default: -(2 ** 53 - 1)
14
+ },
15
+ max: {
16
+ type: Number,
17
+ default: 2 ** 53 - 1
18
+ },
19
+ step: {
20
+ type: Number,
21
+ default: 1
22
+ },
23
+ stepStrictly: {
24
+ type: Boolean,
25
+ default: !1
26
+ },
27
+ precision: Number,
28
+ size: {
29
+ type: String,
30
+ default: "default"
31
+ },
32
+ readonly: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ controls: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ controlsPosition: String,
41
+ name: String,
42
+ ariaLabel: String,
43
+ placeholder: String,
44
+ id: String,
45
+ valueOnClear: [
46
+ Number,
47
+ null,
48
+ String
49
+ ],
50
+ validateEvent: {
51
+ type: Boolean,
52
+ default: !0
53
+ },
54
+ label: String,
55
+ inputmode: String,
56
+ align: {
57
+ type: String,
58
+ default: "left"
59
+ },
60
+ disabledScientific: {
61
+ type: Boolean,
62
+ default: !1
63
+ },
64
+ prefix: String,
65
+ suffix: String
66
+ }, u = {
67
+ readonly: !0,
68
+ placeholder: !0,
69
+ modelValue: !0,
70
+ prefix: !0,
71
+ suffix: !0
72
+ }, d = [
73
+ "change",
74
+ "blur",
75
+ "focus"
76
+ ], f = (e) => n[e] === void 0 && u[e] !== !0, p = {
77
+ name: "FormInputNumber",
78
+ inheritAttrs: !1,
79
+ props: { ...l },
80
+ emits: {
81
+ ...t,
82
+ change: null,
83
+ blur: null,
84
+ focus: null
85
+ },
86
+ setup(t, { emit: n, slots: r, attrs: l }) {
87
+ let { emitInput: u, render: p, placeholder: m, disabled: h, autoBind: g } = e(t, {
88
+ emit: n,
89
+ slots: r,
90
+ attrs: l,
91
+ events: d,
92
+ predicate: f
93
+ }), _ = a(() => c(t.modelValue) ? Number(t.modelValue) : t.modelValue);
94
+ return () => p({ vNodes: o(i, s({ style: "width: 100%" }, g.value, {
95
+ modelValue: _.value,
96
+ disabled: h.value,
97
+ "onUpdate:modelValue": u,
98
+ placeholder: m.value
99
+ }), {
100
+ prefix: r.prefix || t.prefix ? () => t.prefix : null,
101
+ suffix: r.suffix || t.suffix ? () => t.suffix : null,
102
+ "decrease-icon": r["decrease-icon"],
103
+ "increase-icon": r["increase-icon"]
104
+ }) });
105
+ }
106
+ };
107
+ //#endregion
108
+ export { p as t };
@@ -0,0 +1,171 @@
1
+ import { i as e, n as t } from "./Cw8pz9hK.mjs";
2
+ import { n } from "./CnsFNU2A.mjs";
3
+ import { ElDatePicker as r } from "element-plus/es";
4
+ import { computed as i, createVNode as a, mergeProps as o } from "vue";
5
+ //#region src/components/form/props/date.js
6
+ var s = {
7
+ ...n,
8
+ modelValue: [
9
+ Number,
10
+ String,
11
+ Date,
12
+ Array
13
+ ],
14
+ readonly: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ size: String,
19
+ editable: {
20
+ type: Boolean,
21
+ default: !0
22
+ },
23
+ clearable: {
24
+ type: Boolean,
25
+ default: !0
26
+ },
27
+ placeholder: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ startPlaceholder: String,
32
+ endPlaceholder: String,
33
+ type: {
34
+ type: String,
35
+ default: "date"
36
+ },
37
+ format: {
38
+ type: String,
39
+ default: "YYYY-MM-DD"
40
+ },
41
+ popperClass: String,
42
+ popperStyle: [String, Object],
43
+ popperOptions: {
44
+ type: Object,
45
+ default: () => ({})
46
+ },
47
+ rangeSeparator: {
48
+ type: String,
49
+ default: "-"
50
+ },
51
+ defaultValue: Object,
52
+ defaultTime: Object,
53
+ valueFormat: String,
54
+ id: [String, Array],
55
+ name: {
56
+ type: [String, Array],
57
+ default: ""
58
+ },
59
+ unlinkPanels: {
60
+ type: Boolean,
61
+ default: !1
62
+ },
63
+ prefixIcon: [String, Object],
64
+ clearIcon: [String, Object],
65
+ validateEvent: {
66
+ type: Boolean,
67
+ default: !0
68
+ },
69
+ disabledDate: Function,
70
+ shortcuts: {
71
+ type: Array,
72
+ default: () => []
73
+ },
74
+ cellClassName: Function,
75
+ teleported: {
76
+ type: Boolean,
77
+ default: !0
78
+ },
79
+ emptyValues: Array,
80
+ valueOnClear: [
81
+ String,
82
+ Number,
83
+ Boolean,
84
+ Function
85
+ ],
86
+ fallbackPlacements: {
87
+ type: Array,
88
+ default: () => [
89
+ "bottom",
90
+ "top",
91
+ "right",
92
+ "left"
93
+ ]
94
+ },
95
+ placement: {
96
+ type: String,
97
+ default: "bottom"
98
+ },
99
+ showFooter: {
100
+ type: Boolean,
101
+ default: !0
102
+ },
103
+ showConfirm: {
104
+ type: Boolean,
105
+ default: !0
106
+ },
107
+ showWeekNumber: {
108
+ type: Boolean,
109
+ default: !1
110
+ },
111
+ automaticDropdown: {
112
+ type: Boolean,
113
+ default: !0
114
+ },
115
+ split: Boolean,
116
+ startDate: String,
117
+ endDate: String
118
+ }, c = {
119
+ modelValue: !0,
120
+ name: !0,
121
+ emptyValues: !0,
122
+ valueOnClear: !0
123
+ }, l = ["change"], u = (e) => n[e] === void 0 && c[e] !== !0, d = {
124
+ name: "FormDatePicker",
125
+ inheritAttrs: !1,
126
+ props: { ...s },
127
+ emits: {
128
+ ...t,
129
+ "update:startDate": null,
130
+ "update:endDate": null
131
+ },
132
+ setup(t, { emit: n, slots: s, attrs: c }) {
133
+ let { emitInput: d, render: f, placeholder: p, disabled: m, autoBind: h } = e(t, {
134
+ emit: n,
135
+ slots: s,
136
+ attrs: c,
137
+ events: l,
138
+ predicate: u,
139
+ messagePrefix: "请选择"
140
+ }), g = i(() => {
141
+ switch (t.type) {
142
+ case "date":
143
+ case "daterange": return "YYYY-MM-DD";
144
+ case "datetime":
145
+ case "datetimerange": return "YYYY-MM-DD HH:mm:ss";
146
+ default: return "";
147
+ }
148
+ }), _ = i(() => t.split && t.type.indexOf("range") > -1), v = (e, t) => {
149
+ n("update:startDate", e), n("update:endDate", t);
150
+ }, y = (e) => {
151
+ _.value ? e ? v(e[0], e[1]) : v(null, null) : d(e);
152
+ }, b = i(() => _.value ? [t.startDate, t.endDate] : t.modelValue);
153
+ return () => f({ vNodes: a(r, o({ style: "width: 100%" }, h.value, {
154
+ modelValue: b.value,
155
+ disabled: m.value,
156
+ placeholder: p.value,
157
+ format: g.value,
158
+ "value-format": g.value,
159
+ "onUpdate:modelValue": y
160
+ }), {
161
+ default: s.default,
162
+ "range-separator": s["range-separator"],
163
+ "pre-month": s["pre-month"],
164
+ "next-month": s["next-month"],
165
+ "pre-year": s["pre-year"],
166
+ "next-year": s["next-year"]
167
+ }) });
168
+ }
169
+ };
170
+ //#endregion
171
+ export { d as t };