@web-utils/form-ui 1.0.0-beta24 → 1.0.0-beta25

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 (95) hide show
  1. package/awesome-button/index.mjs +2 -49
  2. package/base.css +1 -1
  3. package/chunks/0nMB8MZ0.mjs +174 -0
  4. package/chunks/{DgJWblJ-.mjs → 1UkAGJ03.mjs} +2 -2
  5. package/chunks/{CwnhyemQ.mjs → 4G13cKOo.mjs} +2 -2
  6. package/chunks/{CnP5qx9A.mjs → B2PYq5pM.mjs} +2 -2
  7. package/chunks/{B7Fo7eih.mjs → B8rugxZ0.mjs} +2 -2
  8. package/chunks/{B7x-U0mD.mjs → BM8sdTDJ.mjs} +2 -2
  9. package/chunks/{3QpBKdDM.mjs → BYNkR7-j.mjs} +2 -2
  10. package/chunks/{CQwLIAVn.mjs → BdD1Rt-7.mjs} +6 -7
  11. package/chunks/{3o0tA4s6.mjs → BowPVbJ7.mjs} +2 -2
  12. package/chunks/{DJTwM7o_.mjs → CAQ6-w1f.mjs} +3 -3
  13. package/chunks/{BhmGnR4F.mjs → CjeZ3uKX.mjs} +6 -6
  14. package/chunks/{Njpw648u.mjs → Ckur6g6N.mjs} +1 -1
  15. package/chunks/CnVy7Ngb.mjs +474 -0
  16. package/chunks/{DpBkGggC.mjs → CtK74qPE.mjs} +6 -7
  17. package/chunks/DDc6e1uO.mjs +62 -0
  18. package/chunks/{Cme51jl3.mjs → DJjmr9R3.mjs} +2 -2
  19. package/chunks/{DIJ8AiAE.mjs → DdZcziWU.mjs} +3 -3
  20. package/chunks/{DL491cg2.mjs → Dl5QgkX_.mjs} +6 -7
  21. package/chunks/{mjEH6tHn.mjs → DnWeeCd1.mjs} +1 -1
  22. package/chunks/{DzMQIy5h.mjs → MVhpewST.mjs} +1 -1
  23. package/chunks/{Ce7JJ6Kh.mjs → U08ZaDiY.mjs} +198 -205
  24. package/chunks/{ADvOhGAW.mjs → Uhf6MK26.mjs} +1 -1
  25. package/chunks/{5XleJ1q7.mjs → XKBWlv3M.mjs} +2 -2
  26. package/chunks/iIcGTQmB.mjs +50 -0
  27. package/chunks/{D-ffcm89.mjs → o7O5_GIP.mjs} +2 -2
  28. package/confirm-button/index.mjs +1 -1
  29. package/confirmable/index.mjs +1 -1
  30. package/element-dialog/index.d.ts +280 -2
  31. package/element-dialog/index.mjs +1 -1
  32. package/empty-view/index.mjs +1 -1
  33. package/form-advice/index.mjs +1 -1
  34. package/form-cascader/index.d.ts +193 -2
  35. package/form-cascader/index.mjs +1 -1
  36. package/form-check-box-group/index.d.ts +190 -1
  37. package/form-check-box-group/index.mjs +1 -1
  38. package/form-checkbox/index.d.ts +199 -1
  39. package/form-checkbox/index.mjs +1 -1
  40. package/form-date-picker/index.d.ts +202 -2
  41. package/form-date-picker/index.mjs +1 -1
  42. package/form-holder/index.mjs +1 -1
  43. package/form-image/index.d.ts +203 -1
  44. package/form-image/index.mjs +1 -1
  45. package/form-input/index.d.ts +200 -2
  46. package/form-input/index.mjs +1 -1
  47. package/form-input-cron-expression/index.d.ts +203 -2
  48. package/form-input-cron-expression/index.mjs +1 -1
  49. package/form-input-email/index.d.ts +196 -0
  50. package/form-input-email/index.mjs +1 -1
  51. package/form-input-id-card/index.d.ts +196 -0
  52. package/form-input-id-card/index.mjs +1 -1
  53. package/form-input-number/index.d.ts +199 -1
  54. package/form-input-number/index.mjs +1 -1
  55. package/form-input-phone-number/index.d.ts +196 -0
  56. package/form-input-phone-number/index.mjs +1 -1
  57. package/form-item-x/index.d.ts +2 -2
  58. package/form-item-x/index.mjs +1 -1
  59. package/form-radio-group/index.d.ts +199 -1
  60. package/form-radio-group/index.mjs +1 -1
  61. package/form-rate/index.d.ts +201 -1
  62. package/form-rate/index.mjs +1 -1
  63. package/form-red-table/index.mjs +1 -1
  64. package/form-select/index.d.ts +193 -2
  65. package/form-select/index.mjs +1 -1
  66. package/form-slider/index.d.ts +201 -1
  67. package/form-slider/index.mjs +1 -1
  68. package/form-switch/index.d.ts +201 -1
  69. package/form-switch/index.mjs +1 -1
  70. package/form-text/index.d.ts +192 -1
  71. package/form-text/index.mjs +1 -1
  72. package/form-view/index.mjs +1 -1
  73. package/helper/dictionary.mjs +1 -1
  74. package/iframe-window/index.mjs +1 -1
  75. package/index.d.ts +2 -2
  76. package/index.mjs +30 -30
  77. package/month-calendar/index.d.ts +1 -1
  78. package/package.json +2 -1
  79. package/table-view/index.mjs +1 -1
  80. package/toolbar/index.mjs +1 -1
  81. package/vue-cron/index.mjs +1 -1
  82. package/web-types.json +13047 -1
  83. package/x-input-tag/index.d.ts +2 -0
  84. package/x-input-tag/index.mjs +226 -0
  85. package/x-input-tag/style.css +1 -0
  86. package/year-calendar/index.d.ts +1 -1
  87. package/year-calendar/index.mjs +2 -174
  88. package/year-calendar/style.css +1 -1
  89. package/chunks/C2hH5v6n.mjs +0 -73
  90. package/chunks/CKW6E1o4.mjs +0 -106
  91. package/chunks/gw2yFGP0.mjs +0 -53
  92. package/month-calendar/index.mjs +0 -312
  93. package/month-calendar/style.css +0 -1
  94. /package/chunks/{BVLgLg_s.mjs → BdHFJ9cK.mjs} +0 -0
  95. /package/chunks/{Bm5eiSmT.mjs → DgL5zblr.mjs} +0 -0
@@ -1,49 +1,2 @@
1
- import { isFunction as e } from "@web-utils/core";
2
- import { h as t, ref as n, resolveComponent as r } from "vue";
3
- //#region src/components/button/AwesomeButton.vue
4
- var i = {
5
- name: "AwesomeButton",
6
- inheritAttrs: !1,
7
- props: {
8
- type: {
9
- type: String,
10
- default: "primary"
11
- },
12
- size: String,
13
- icon: {
14
- type: String,
15
- default: ""
16
- },
17
- nativeType: {
18
- type: String,
19
- default: "button"
20
- },
21
- loading: Boolean,
22
- disabled: Boolean,
23
- plain: Boolean,
24
- autofocus: Boolean,
25
- round: Boolean,
26
- text: {
27
- type: String,
28
- default: ""
29
- }
30
- },
31
- setup(i, { attrs: a, slots: o }) {
32
- let s = r("ElButton"), { text: c, ...l } = i, { onClick: u, ...d } = a, f = n(!1), p = async (t) => {
33
- if (f.value = !0, e(u)) try {
34
- await u(t);
35
- } catch (e) {
36
- console.error(e);
37
- }
38
- f.value = !1;
39
- };
40
- return () => t(s, {
41
- ...d,
42
- ...l,
43
- disabled: f.value,
44
- onClick: p
45
- }, { default: o.default || (() => c) });
46
- }
47
- };
48
- //#endregion
49
- export { i as default };
1
+ import { t as e } from "../chunks/iIcGTQmB.mjs";
2
+ export { e as default };
package/base.css CHANGED
@@ -1 +1 @@
1
- :root{--el-disabled-text-color:#606266}.border-bottom{border-bottom:1px solid #d7dae0}.clear-fix:after{clear:both;visibility:hidden;content:" ";height:0;display:block}.flex-row{flex-direction:row;flex-shrink:0;display:flex}.flex-row.vertical-center{align-items:center}.flex-row.vertical-start{align-items:flex-start}.flex-row.horizon-center{justify-content:center}.text-center{text-align:center}.flex-column{flex-direction:column;display:flex}.flex-column.vertical-center{justify-content:center}.flex-column.horizon-center{align-items:center}.flex-item,.flex-item-relative{flex:auto}.flex-item-relative{position:relative}.flex-item-relative .flex-content{position:absolute;top:0;bottom:0;left:0;right:0}.flex-not-shrink{flex-shrink:0}
1
+ :root{--el-disabled-text-color:#606266;--border-color:#d7dae0}.border-bottom{border-bottom:1px solid #d7dae0}.clear-fix:after{clear:both;visibility:hidden;content:" ";height:0;display:block}.flex-row{flex-direction:row;flex-shrink:0;display:flex}.flex-row.vertical-center{align-items:center}.flex-row.vertical-start{align-items:flex-start}.flex-row.horizon-center{justify-content:center}.text-center{text-align:center}.flex-column{flex-direction:column;display:flex}.flex-column.vertical-center{justify-content:center}.flex-column.horizon-center{align-items:center}.flex-item,.flex-item-relative{flex:auto}.flex-item-relative{position:relative}.flex-item-relative .flex-content{position:absolute;top:0;bottom:0;left:0;right:0}.flex-not-shrink{flex-shrink:0}
@@ -0,0 +1,174 @@
1
+ import { i as e, n as t, t as n } from "./Uhf6MK26.mjs";
2
+ import { n as r, t as i } from "./DnWeeCd1.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 };
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./ADvOhGAW.mjs";
2
- import { n } from "./mjEH6tHn.mjs";
1
+ import { i as e, n as t } from "./Uhf6MK26.mjs";
2
+ import { n } from "./DnWeeCd1.mjs";
3
3
  import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
4
  import { ElRate as o } from "element-plus/es";
5
5
  //#region src/components/form/props/rate.ts
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./ADvOhGAW.mjs";
2
- import { n } from "./mjEH6tHn.mjs";
1
+ import { i as e, n as t } from "./Uhf6MK26.mjs";
2
+ import { n } from "./DnWeeCd1.mjs";
3
3
  import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
4
4
  import { ElRadio as s, ElRadioButton as c, ElRadioGroup as l } from "element-plus/es";
5
5
  //#region src/components/form/props/radio-group.ts
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./ADvOhGAW.mjs";
2
- import { n } from "./mjEH6tHn.mjs";
1
+ import { i as e, n as t } from "./Uhf6MK26.mjs";
2
+ import { n } from "./DnWeeCd1.mjs";
3
3
  import { computed as r, createVNode as i, mergeProps as a } from "vue";
4
4
  import { ElDatePicker as o } from "element-plus/es";
5
5
  //#region src/components/form/props/date.ts
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./ADvOhGAW.mjs";
2
- import { n } from "./mjEH6tHn.mjs";
1
+ import { i as e, n as t } from "./Uhf6MK26.mjs";
2
+ import { n } from "./DnWeeCd1.mjs";
3
3
  import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
4
  import { ElSwitch as o } from "element-plus/es";
5
5
  //#region src/components/form/props/switch.ts
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./ADvOhGAW.mjs";
2
- import { n } from "./mjEH6tHn.mjs";
1
+ import { i as e, n as t } from "./Uhf6MK26.mjs";
2
+ import { n } from "./DnWeeCd1.mjs";
3
3
  import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
4
  import { ElOption as o, ElSelect as s } from "element-plus/es";
5
5
  //#region src/components/form/props/select.ts
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./ADvOhGAW.mjs";
2
- import { n } from "./mjEH6tHn.mjs";
1
+ import { i as e, n as t } from "./Uhf6MK26.mjs";
2
+ import { n } from "./DnWeeCd1.mjs";
3
3
  import { computed as r, createVNode as i, isVNode as a, mergeProps as o } from "vue";
4
4
  import { ElCheckbox as s, ElCheckboxButton as c, ElCheckboxGroup as l } from "element-plus/es";
5
5
  //#region src/components/form/props/checkbox-group.ts
@@ -1,6 +1,5 @@
1
- import { n as e } from "./ADvOhGAW.mjs";
2
- import { t } from "./C2hH5v6n.mjs";
3
- import { t as n } from "./CKW6E1o4.mjs";
1
+ import { n as e } from "./Uhf6MK26.mjs";
2
+ import { n as t, t as n } from "./0nMB8MZ0.mjs";
4
3
  import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
5
4
  //#region src/components/form/FormInputEmail.vue?vue&type=script&lang.jsx
6
5
  function s(e) {
@@ -11,15 +10,15 @@ function s(e) {
11
10
  var c = {
12
11
  name: "FormInputEmail",
13
12
  inheritAttrs: !1,
14
- props: { ...n },
13
+ props: { ...t },
15
14
  emits: { ...e },
16
- setup(e, { slots: n, attrs: i }) {
15
+ setup(e, { slots: t, attrs: i }) {
17
16
  let c = o(e, "modelValue");
18
- return () => r(t, a(e, i, {
17
+ return () => r(n, a(e, i, {
19
18
  modelValue: c.value,
20
19
  "onUpdate:modelValue": (e) => c.value = e,
21
20
  type: "email"
22
- }), s(n) ? n : { default: () => [n] });
21
+ }), s(t) ? t : { default: () => [t] });
23
22
  }
24
23
  };
25
24
  //#endregion
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./ADvOhGAW.mjs";
2
- import { n } from "./mjEH6tHn.mjs";
1
+ import { i as e, n as t } from "./Uhf6MK26.mjs";
2
+ import { n } from "./DnWeeCd1.mjs";
3
3
  import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
4
  import { ElSlider as o } from "element-plus/es";
5
5
  //#region src/components/form/props/slide.ts
@@ -1,6 +1,6 @@
1
- import { a as e } from "./BVLgLg_s.mjs";
2
- import { o as t, r as n } from "./ADvOhGAW.mjs";
3
- import { n as r } from "./mjEH6tHn.mjs";
1
+ import { a as e } from "./BdHFJ9cK.mjs";
2
+ import { o as t, r as n } from "./Uhf6MK26.mjs";
3
+ import { n as r } from "./DnWeeCd1.mjs";
4
4
  import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
5
5
  import { ElImage as s } from "element-plus/es";
6
6
  //#region src/components/form/props/image.ts
@@ -1,4 +1,4 @@
1
- import { a as e } from "./BVLgLg_s.mjs";
1
+ import { a as e } from "./BdHFJ9cK.mjs";
2
2
  import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, getCurrentInstance as s, mergeModels as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, useTemplateRef as _, withCtx as v, withModifiers as y } from "vue";
3
3
  import { ElDialog as b } from "element-plus/es";
4
4
  //#region src/components/dialog/props.ts
@@ -150,23 +150,23 @@ var x = {
150
150
  fullscreen: h(M),
151
151
  style: { "--dialog-body-height": h(P) }
152
152
  }), o({
153
- header: v(() => [r(" @slot 对话框标题的内容;会替换标题部分,但会移除关闭按钮 "), p(e.$slots, "header", {}, () => [a("div", T, m(e.title), 1), a("div", E, [e.showFullscreen || e.showFullScreen ? (d(), i("i", {
153
+ header: v(() => [p(e.$slots, "header", {}, () => [a("div", T, m(e.title), 1), a("div", E, [e.showFullscreen || e.showFullScreen ? (d(), i("i", {
154
154
  key: 0,
155
155
  class: u(["dialog-header-button", {
156
156
  "el-icon-full-screen": !e.fullscreen,
157
157
  "el-icon-copy-document": e.fullscreen
158
158
  }]),
159
159
  onClick: y(N, ["stop"])
160
- }, null, 2)) : r("v-if", !0), e.showClose ? (d(), i("i", {
160
+ }, null, 2)) : r("", !0), e.showClose ? (d(), i("i", {
161
161
  key: 1,
162
162
  class: "dialog-header-button el-icon-close",
163
163
  onClick: y(I, ["stop"])
164
- })) : r("v-if", !0)])])]),
165
- default: v(() => [r(" @slot 对话框的默认内容 "), p(e.$slots, "default")]),
164
+ })) : r("", !0)])])]),
165
+ default: v(() => [p(e.$slots, "default")]),
166
166
  _: 2
167
167
  }, [e.$slots.footer ? {
168
168
  name: "footer",
169
- fn: v(() => [r(" @slot Dialog 按钮操作区的内容 "), p(e.$slots, "footer", { close: I })]),
169
+ fn: v(() => [p(e.$slots, "footer", { close: I })]),
170
170
  key: "0"
171
171
  } : void 0]), 1040, [
172
172
  "modelValue",
@@ -1,4 +1,4 @@
1
- import { n as e } from "./BVLgLg_s.mjs";
1
+ import { n as e } from "./BdHFJ9cK.mjs";
2
2
  import { hasAuthority as t } from "../api/index.mjs";
3
3
  import { toolbarContextKey as n } from "../constants/index.mjs";
4
4
  import { t as r } from "./DOl--Hf9.mjs";