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

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 (127) hide show
  1. package/base.css +1 -1
  2. package/chunks/8ORg8rrN.mjs +108 -0
  3. package/chunks/B3DY36vM.mjs +106 -0
  4. package/chunks/B5B9au3z.mjs +180 -0
  5. package/chunks/B7fKv2-x.mjs +88 -0
  6. package/chunks/B9-9iYg8.mjs +42 -0
  7. package/chunks/BAm_wcwz.mjs +226 -0
  8. package/chunks/BJObhbQz.mjs +95 -0
  9. package/chunks/BLpnMrum.mjs +189 -0
  10. package/chunks/BSriw1Qr.mjs +53 -0
  11. package/chunks/BVzpe2oN.mjs +76 -0
  12. package/chunks/Bb43eI1f.mjs +93 -0
  13. package/chunks/Be_E_4G0.mjs +106 -0
  14. package/chunks/Bh_CMUlo.mjs +12 -0
  15. package/chunks/Bk3PtIYo.mjs +171 -0
  16. package/chunks/C1DlzLpD.mjs +222 -0
  17. package/chunks/CJeq96R0.mjs +73 -0
  18. package/chunks/CPE8fqJc.mjs +26 -0
  19. package/chunks/D7hrSVVl.mjs +98 -0
  20. package/chunks/D9GcEl6r.mjs +8 -0
  21. package/chunks/DAS1h_Ei.mjs +26 -0
  22. package/chunks/D_Xobj10.mjs +26 -0
  23. package/chunks/DgCwGit4.mjs +108 -0
  24. package/chunks/DgbDpRQg.mjs +51 -0
  25. package/chunks/DynLjTwi.mjs +17 -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-radio-group/index.d.ts +281 -0
  75. package/form-radio-group/index.mjs +1 -1
  76. package/form-rate/index.d.ts +319 -0
  77. package/form-rate/index.mjs +1 -1
  78. package/form-red-table/index.d.ts +21 -0
  79. package/form-red-table/index.mjs +27 -26
  80. package/form-row/index.d.ts +11 -0
  81. package/form-row/index.mjs +1 -1
  82. package/form-select/index.d.ts +540 -0
  83. package/form-select/index.mjs +1 -1
  84. package/form-slider/index.d.ts +348 -0
  85. package/form-slider/index.mjs +1 -1
  86. package/form-switch/index.d.ts +337 -0
  87. package/form-switch/index.mjs +1 -1
  88. package/form-text/index.d.ts +227 -0
  89. package/form-text/index.mjs +1 -1
  90. package/form-view/index.d.ts +2 -0
  91. package/index.d.ts +42 -0
  92. package/index.mjs +39 -34
  93. package/input/style.css +1 -1
  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
@@ -0,0 +1,98 @@
1
+ import { i as e, n as t } from "./C1DlzLpD.mjs";
2
+ import { n } from "./DynLjTwi.mjs";
3
+ import { ElRadio as r, ElRadioButton as i, ElRadioGroup as a } from "element-plus/es";
4
+ import { createVNode as o, isVNode as s, mergeProps as c, useModel as l } from "vue";
5
+ //#region src/components/form/props/radio-group.js
6
+ var u = {
7
+ ...n,
8
+ modelValue: [
9
+ String,
10
+ Number,
11
+ Boolean
12
+ ],
13
+ size: {
14
+ type: String,
15
+ default: "default"
16
+ },
17
+ validateEvent: {
18
+ type: Boolean,
19
+ default: !0
20
+ },
21
+ textColor: {
22
+ type: String,
23
+ default: "#ffffff"
24
+ },
25
+ fill: {
26
+ type: String,
27
+ default: "#409eff"
28
+ },
29
+ ariaLabel: String,
30
+ name: String,
31
+ id: String,
32
+ label: String,
33
+ options: Array,
34
+ props: {
35
+ type: Object,
36
+ default: () => ({
37
+ value: "value",
38
+ label: "label",
39
+ disabled: "disabled"
40
+ })
41
+ },
42
+ type: {
43
+ type: String,
44
+ default: "radio"
45
+ }
46
+ }, d = {
47
+ modelValue: !0,
48
+ disabled: !0,
49
+ type: !0,
50
+ options: !0
51
+ }, f = ["change"], p = (e) => n[e] === void 0 && d[e] !== !0;
52
+ //#endregion
53
+ //#region src/components/form/FormRadioGroup.vue?vue&type=script&lang.jsx
54
+ function m(e) {
55
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !s(e);
56
+ }
57
+ //#endregion
58
+ //#region src/components/form/FormRadioGroup.vue
59
+ var h = {
60
+ name: "FormRadioGroup",
61
+ inheritAttrs: !1,
62
+ props: { ...u },
63
+ emits: {
64
+ ...t,
65
+ change: null
66
+ },
67
+ setup(t, { emit: n, slots: s, attrs: u }) {
68
+ let d = l(t, "modelValue"), { render: h, disabled: g, autoBind: _ } = e(t, {
69
+ emit: n,
70
+ slots: s,
71
+ attrs: u,
72
+ events: f,
73
+ predicate: p,
74
+ messagePrefix: "请选择"
75
+ });
76
+ return () => h({ vNodes: o(a, c(_.value, {
77
+ modelValue: d.value,
78
+ "onUpdate:modelValue": (e) => d.value = e,
79
+ disabled: g.value
80
+ }), {
81
+ ...s,
82
+ default: s.default || (() => {
83
+ var e;
84
+ return (e = t.options) == null ? void 0 : e.map(({ value: e, label: n, disabled: a }) => t.type === "button" ? o(i, {
85
+ key: e,
86
+ value: e,
87
+ disabled: a
88
+ }, m(n) ? n : { default: () => [n] }) : o(r, {
89
+ key: e,
90
+ value: e,
91
+ disabled: a
92
+ }, m(n) ? n : { default: () => [n] }));
93
+ })
94
+ }) });
95
+ }
96
+ };
97
+ //#endregion
98
+ export { h 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,26 @@
1
+ import { n as e } from "./C1DlzLpD.mjs";
2
+ import { t } from "./CJeq96R0.mjs";
3
+ import { t as n } from "./B3DY36vM.mjs";
4
+ import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
5
+ //#region src/components/form/FormInputIdCard.vue?vue&type=script&lang.jsx
6
+ function s(e) {
7
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !i(e);
8
+ }
9
+ //#endregion
10
+ //#region src/components/form/FormInputIdCard.vue
11
+ var c = {
12
+ name: "FormInputIdCard",
13
+ inheritAttrs: !1,
14
+ props: { ...n },
15
+ emits: { ...e },
16
+ setup(e, { slots: n, attrs: i }) {
17
+ let c = o(e, "modelValue");
18
+ return () => r(t, a(e, i, {
19
+ modelValue: c.value,
20
+ "onUpdate:modelValue": (e) => c.value = e,
21
+ type: "idcard"
22
+ }), s(n) ? n : { default: () => [n] });
23
+ }
24
+ };
25
+ //#endregion
26
+ export { c as t };
@@ -0,0 +1,26 @@
1
+ import { n as e } from "./C1DlzLpD.mjs";
2
+ import { t } from "./CJeq96R0.mjs";
3
+ import { t as n } from "./B3DY36vM.mjs";
4
+ import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
5
+ //#region src/components/form/FormInputEmail.vue?vue&type=script&lang.jsx
6
+ function s(e) {
7
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !i(e);
8
+ }
9
+ //#endregion
10
+ //#region src/components/form/FormInputEmail.vue
11
+ var c = {
12
+ name: "FormInputEmail",
13
+ inheritAttrs: !1,
14
+ props: { ...n },
15
+ emits: { ...e },
16
+ setup(e, { slots: n, attrs: i }) {
17
+ let c = o(e, "modelValue");
18
+ return () => r(t, a(e, i, {
19
+ modelValue: c.value,
20
+ "onUpdate:modelValue": (e) => c.value = e,
21
+ type: "email"
22
+ }), s(n) ? n : { default: () => [n] });
23
+ }
24
+ };
25
+ //#endregion
26
+ export { c as t };
@@ -0,0 +1,108 @@
1
+ import { i as e, n as t } from "./C1DlzLpD.mjs";
2
+ import { n, t as r } from "./DynLjTwi.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,51 @@
1
+ import { n as e } from "./Bh_CMUlo.mjs";
2
+ import { o as t, r as n } from "./C1DlzLpD.mjs";
3
+ import { n as r } from "./DynLjTwi.mjs";
4
+ import { ElImage as i } from "element-plus/es";
5
+ import { createVNode as a, isVNode as o, mergeProps as s } from "vue";
6
+ //#region src/components/form/props/image.js
7
+ var c = {
8
+ ...r,
9
+ src: String,
10
+ fit: String,
11
+ hideOnClickModal: Boolean
12
+ }, l = { modelValue: !0 }, u = [
13
+ "load",
14
+ "error",
15
+ "switch",
16
+ "close",
17
+ "show"
18
+ ], d = (e) => r[e] === void 0 && l[e] !== !0;
19
+ //#endregion
20
+ //#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
21
+ function f(e) {
22
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !o(e);
23
+ }
24
+ //#endregion
25
+ //#region src/components/form/FormImage.vue
26
+ var p = {
27
+ name: "FormImage",
28
+ inheritAttrs: !1,
29
+ props: { ...c },
30
+ emits: {
31
+ load: null,
32
+ error: null,
33
+ switch: null,
34
+ close: null,
35
+ show: null
36
+ },
37
+ setup(r, { slots: o, attrs: c, emit: l }) {
38
+ let p = t(r, { attrs: c }), m = e(r, {
39
+ events: u,
40
+ predicate: d,
41
+ emit: l
42
+ });
43
+ return () => n(r, {
44
+ vNodes: a(i, s(m.value, c, { "preview-src-list": [r.src] }), f(o) ? o : { default: () => [o] }),
45
+ formItemProps: p,
46
+ slots: o
47
+ });
48
+ }
49
+ };
50
+ //#endregion
51
+ export { p as t };
@@ -0,0 +1,17 @@
1
+ import { c as e, s as t } from "./C1DlzLpD.mjs";
2
+ //#region src/components/form/props/common.js
3
+ var n = {
4
+ ...e,
5
+ ...t,
6
+ wrapFormItem: {
7
+ type: Boolean,
8
+ default: !0
9
+ },
10
+ disabled: {
11
+ type: Boolean,
12
+ default: void 0
13
+ },
14
+ col: Boolean
15
+ }, r = { size: { type: String } };
16
+ //#endregion
17
+ export { n, r as t };
@@ -0,0 +1,106 @@
1
+ import { formItemGroupContextKey as e, formViewContextKey as t } from "../constants.mjs";
2
+ import n from "../empty-view/index.mjs";
3
+ import { ElRow as r } from "element-plus/es";
4
+ import { Fragment as i, computed as a, createTextVNode as o, createVNode as s, h as c, inject as l, isVNode as u, onBeforeUnmount as d, onMounted as f, provide as p, reactive as m, ref as h, toRef as g, vShow as _, watchEffect as v, withDirectives as y } from "vue";
5
+ import { ElCol as b, ElCollapseTransition as x } from "element-plus";
6
+ //#region src/components/form/FormItemGroup.vue?vue&type=script&lang.jsx
7
+ function S(e) {
8
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !u(e);
9
+ }
10
+ //#endregion
11
+ //#region src/components/form/FormItemGroup.vue
12
+ var C = {
13
+ name: "FormItemGroup",
14
+ props: {
15
+ blockTitle: String,
16
+ size: String,
17
+ tips: String,
18
+ active: Boolean,
19
+ enabled: {
20
+ type: Boolean,
21
+ default: void 0
22
+ },
23
+ disabled: {
24
+ type: Boolean,
25
+ default: void 0
26
+ },
27
+ tag: {
28
+ type: String,
29
+ default: "ElCol"
30
+ },
31
+ span: {
32
+ type: Number,
33
+ default: 24
34
+ },
35
+ block: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ wrapRow: {
40
+ type: Boolean,
41
+ default: !0
42
+ },
43
+ gutter: {
44
+ type: Number,
45
+ default: 20
46
+ },
47
+ collapse: Boolean,
48
+ showTitle: {
49
+ type: Boolean,
50
+ default: !0
51
+ },
52
+ notDispatch: Boolean
53
+ },
54
+ setup(u, { expose: C, slots: w }) {
55
+ let T = l(t, null), E = h(!0), D = g(() => u.enabled), O = g(() => u.disabled), k = a(() => u.enabled === !0 ? !1 : u.disabled === !0), A = () => E.value = !E.value, j = m({
56
+ disabled: O,
57
+ enabled: D,
58
+ isDisabled: k,
59
+ size: g(() => u.size)
60
+ });
61
+ return v(() => {
62
+ E.value = !u.collapse;
63
+ }), p(e, j), f(() => {
64
+ if (!u.notDispatch) {
65
+ var e;
66
+ T == null || (e = T.addGroup) == null || e.call(T, this);
67
+ }
68
+ }), d(() => {
69
+ if (!u.notDispatch) {
70
+ var e;
71
+ T == null || (e = T.removeGroup) == null || e.call(T, this);
72
+ }
73
+ }), C(j), () => {
74
+ let e = () => {
75
+ var e;
76
+ return s(i, null, [y(s("div", {
77
+ class: "form-item-group-title",
78
+ onClick: A
79
+ }, [s("span", {
80
+ class: "flex-item",
81
+ style: "flex: 1"
82
+ }, [
83
+ w.title ? w.title() : u.blockTitle,
84
+ w.tips || u.tips ? s("span", { style: "color: #ff0000; font-size: 14px" }, [
85
+ o("("),
86
+ w.tips ? w.tips() : u.tips,
87
+ o(")")
88
+ ]) : null,
89
+ (e = w["title-right"]) == null ? void 0 : e.call(w)
90
+ ]), s("i", { class: E.value ? "el-icon-arrow-down" : "el-icon-arrow-right" }, null)]), [[_, u.showTitle]]), s(x, null, { default: () => {
91
+ let e;
92
+ return w.default ? u.wrapRow ? y(s(r, { gutter: u.gutter }, S(e = w.default()) ? e : { default: () => [e] }), [[_, E.value]]) : y(s("div", null, [w.default()]), [[_, E.value]]) : y(s(n, {
93
+ "font-size": "14px",
94
+ "empty-tips": "暂无信息"
95
+ }, null), [[_, E.value]]);
96
+ } })]);
97
+ }, t = { class: ["form-item-group", {
98
+ "default-active": u.active,
99
+ "is-disabled": k.value
100
+ }] };
101
+ return u.tag !== "div" && (t.span = u.block ? 24 : u.span), c(u.tag === "div" ? "div" : b, t, e);
102
+ };
103
+ }
104
+ };
105
+ //#endregion
106
+ export { C as t };