@aplus-frontend/ui 0.0.1-beta.5 → 0.0.1-beta.7

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 (215) hide show
  1. package/es/index.mjs +114 -83
  2. package/es/src/ap-action/constant.d.ts +0 -0
  3. package/es/src/ap-action/group/index.vue.d.ts +38 -0
  4. package/es/src/ap-action/group/index.vue.mjs +64 -0
  5. package/es/src/ap-action/group/index.vue2.mjs +4 -0
  6. package/es/src/ap-action/index.d.ts +14 -0
  7. package/es/src/ap-action/index.mjs +17 -0
  8. package/es/src/ap-action/interface.d.ts +81 -0
  9. package/es/src/ap-action/item/index.vue.d.ts +44 -0
  10. package/es/src/ap-action/item/index.vue.mjs +49 -0
  11. package/es/src/ap-action/item/index.vue2.mjs +4 -0
  12. package/es/src/ap-action/item-dropdown/index.vue.d.ts +57 -0
  13. package/es/src/ap-action/item-dropdown/index.vue.mjs +92 -0
  14. package/es/src/ap-action/item-dropdown/index.vue2.mjs +4 -0
  15. package/es/src/ap-action/item-modal/index.vue.d.ts +41 -0
  16. package/es/src/ap-action/item-modal/index.vue.mjs +34 -0
  17. package/es/src/ap-action/item-modal/index.vue2.mjs +4 -0
  18. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +343 -0
  19. package/es/src/ap-action/item-popconfirm/index.vue.mjs +37 -0
  20. package/es/src/ap-action/item-popconfirm/index.vue2.mjs +4 -0
  21. package/es/src/ap-action/style/item-dropdown.css +11 -0
  22. package/es/src/ap-action/style/item.css +28 -0
  23. package/es/src/ap-field/checkbox/helper.mjs +5 -0
  24. package/es/src/ap-field/checkbox/index.vue.d.ts +39 -0
  25. package/es/src/ap-field/checkbox/index.vue.mjs +56 -0
  26. package/es/src/ap-field/checkbox/index.vue2.mjs +4 -0
  27. package/es/src/ap-field/date/constant.mjs +50 -0
  28. package/es/src/ap-field/date/helper.d.ts +2 -0
  29. package/es/src/ap-field/date/helper.mjs +10 -0
  30. package/es/src/ap-field/date/index.vue.d.ts +57 -0
  31. package/es/src/ap-field/date/index.vue.mjs +75 -0
  32. package/es/src/ap-field/date/index.vue2.mjs +4 -0
  33. package/es/src/ap-field/date-range/index.vue.d.ts +59 -0
  34. package/es/src/ap-field/date-range/index.vue.mjs +87 -0
  35. package/es/src/ap-field/date-range/index.vue2.mjs +4 -0
  36. package/es/src/ap-field/index.d.ts +9 -3
  37. package/es/src/ap-field/interface.d.ts +65 -5
  38. package/es/src/ap-field/number/helper.d.ts +1 -0
  39. package/es/src/ap-field/number/helper.mjs +14 -0
  40. package/es/src/ap-field/number/index.vue.d.ts +72 -0
  41. package/es/src/ap-field/number/index.vue.mjs +108 -0
  42. package/es/src/ap-field/number/index.vue2.mjs +4 -0
  43. package/es/src/ap-field/number/style.css +6 -0
  44. package/es/src/ap-field/radio/helper.d.ts +4 -0
  45. package/es/src/ap-field/radio/helper.mjs +5 -0
  46. package/es/src/ap-field/radio/index.vue.d.ts +40 -0
  47. package/es/src/ap-field/radio/index.vue.mjs +68 -0
  48. package/es/src/ap-field/radio/index.vue2.mjs +4 -0
  49. package/es/src/ap-field/select/index.vue.d.ts +235 -0
  50. package/es/src/ap-field/select/index.vue.mjs +114 -0
  51. package/es/src/ap-field/select/index.vue2.mjs +4 -0
  52. package/es/src/ap-field/switch/index.vue.d.ts +54 -0
  53. package/es/src/ap-field/switch/index.vue.mjs +122 -0
  54. package/es/src/ap-field/switch/index.vue2.mjs +4 -0
  55. package/es/src/ap-field/text/index.vue.d.ts +63 -0
  56. package/es/src/ap-field/text/index.vue.mjs +132 -0
  57. package/es/src/ap-field/text/index.vue2.mjs +4 -0
  58. package/es/src/ap-field/text-area/index.vue.d.ts +49 -0
  59. package/es/src/ap-field/text-area/index.vue.mjs +86 -0
  60. package/es/src/ap-field/text-area/index.vue2.mjs +4 -0
  61. package/es/src/ap-field/text-area/style.css +5 -0
  62. package/es/src/ap-form/index.d.ts +64 -64
  63. package/es/src/base-button/index.d.ts +28 -28
  64. package/es/src/basic/help.vue.d.ts +1 -1
  65. package/es/src/basic/index.d.ts +3 -3
  66. package/es/src/config-provider/config-provider.d.ts +2 -2
  67. package/es/src/config-provider/index.d.ts +6 -6
  68. package/es/src/count-down/index.d.ts +12 -12
  69. package/es/src/cropper/cropper-avatar.vue.d.ts +1 -1
  70. package/es/src/cropper/cropper-image.vue.d.ts +1 -1
  71. package/es/src/cropper/index.d.ts +42 -42
  72. package/es/src/description/description.vue.d.ts +1 -1
  73. package/es/src/description/index.d.ts +3 -3
  74. package/es/src/design-token/index.d.ts +4 -0
  75. package/es/src/design-token/index.mjs +59 -0
  76. package/es/src/dropdown/dropdown.vue.d.ts +1 -1
  77. package/es/src/dropdown/index.d.ts +7 -7
  78. package/es/src/icon/index.d.ts +41 -41
  79. package/es/src/icon-picker/icon-picker.vue.d.ts +3 -3
  80. package/es/src/icon-picker/index.d.ts +45 -45
  81. package/es/src/index.d.ts +3 -0
  82. package/es/src/index.mjs +121 -90
  83. package/es/src/modal/basic.vue.d.ts +3 -2
  84. package/es/src/modal/basic.vue.mjs +53 -49
  85. package/es/src/modal/components/modal-footer.vue.d.ts +1 -1
  86. package/es/src/modal/components/modal.d.ts +1 -1
  87. package/es/src/modal/index.d.ts +7 -8
  88. package/es/src/modal/index.mjs +2 -3
  89. package/es/src/modal/props.mjs +1 -1
  90. package/es/src/modal/style/index.css +29 -30
  91. package/es/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
  92. package/es/src/pro-form/components/api-select.vue.d.ts +2 -2
  93. package/es/src/pro-form/components/api-tree.vue.d.ts +1 -1
  94. package/es/src/pro-form/hooks/use-form-events.mjs +22 -22
  95. package/es/src/pro-form/hooks/use-form-values.mjs +12 -12
  96. package/es/src/pro-form/hooks/use-label-width.d.ts +5 -5
  97. package/es/src/pro-form/pro-form.vue.d.ts +1 -1
  98. package/es/src/pro-form/pro-form.vue.mjs +23 -23
  99. package/es/src/pro-table/hooks/use-columns.mjs +24 -24
  100. package/es/src/strength-meter/index.d.ts +12 -12
  101. package/es/src/theme/ap-action/item-dropdown.css +11 -0
  102. package/es/src/theme/ap-action/item.css +28 -0
  103. package/es/src/theme/ap-field/number.css +6 -0
  104. package/es/src/theme/ap-field/text-area.css +5 -0
  105. package/es/src/theme/modal/index.css +29 -30
  106. package/es/src/type.d.ts +3 -1
  107. package/es/src/utils/index.d.ts +7 -0
  108. package/lib/index.js +1 -1
  109. package/lib/src/ap-action/constant.d.ts +0 -0
  110. package/lib/src/ap-action/group/index.vue.d.ts +38 -0
  111. package/lib/src/ap-action/group/index.vue.js +1 -0
  112. package/lib/src/ap-action/group/index.vue2.js +1 -0
  113. package/lib/src/ap-action/index.d.ts +14 -0
  114. package/lib/src/ap-action/index.js +1 -0
  115. package/lib/src/ap-action/interface.d.ts +81 -0
  116. package/lib/src/ap-action/item/index.vue.d.ts +44 -0
  117. package/lib/src/ap-action/item/index.vue.js +1 -0
  118. package/lib/src/ap-action/item/index.vue2.js +1 -0
  119. package/lib/src/ap-action/item-dropdown/index.vue.d.ts +57 -0
  120. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -0
  121. package/lib/src/ap-action/item-dropdown/index.vue2.js +1 -0
  122. package/lib/src/ap-action/item-modal/index.vue.d.ts +41 -0
  123. package/lib/src/ap-action/item-modal/index.vue.js +1 -0
  124. package/lib/src/ap-action/item-modal/index.vue2.js +1 -0
  125. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +343 -0
  126. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -0
  127. package/lib/src/ap-action/item-popconfirm/index.vue2.js +1 -0
  128. package/lib/src/ap-action/style/item-dropdown.css +11 -0
  129. package/lib/src/ap-action/style/item.css +28 -0
  130. package/lib/src/ap-field/checkbox/helper.js +1 -0
  131. package/lib/src/ap-field/checkbox/index.vue.d.ts +39 -0
  132. package/lib/src/ap-field/checkbox/index.vue.js +1 -0
  133. package/lib/src/ap-field/checkbox/index.vue2.js +1 -0
  134. package/lib/src/ap-field/date/constant.js +1 -0
  135. package/lib/src/ap-field/date/helper.d.ts +2 -0
  136. package/lib/src/ap-field/date/helper.js +1 -0
  137. package/lib/src/ap-field/date/index.vue.d.ts +57 -0
  138. package/lib/src/ap-field/date/index.vue.js +1 -0
  139. package/lib/src/ap-field/date/index.vue2.js +1 -0
  140. package/lib/src/ap-field/date-range/index.vue.d.ts +59 -0
  141. package/lib/src/ap-field/date-range/index.vue.js +1 -0
  142. package/lib/src/ap-field/date-range/index.vue2.js +1 -0
  143. package/lib/src/ap-field/index.d.ts +9 -3
  144. package/lib/src/ap-field/interface.d.ts +65 -5
  145. package/lib/src/ap-field/number/helper.d.ts +1 -0
  146. package/lib/src/ap-field/number/helper.js +1 -0
  147. package/lib/src/ap-field/number/index.vue.d.ts +72 -0
  148. package/lib/src/ap-field/number/index.vue.js +1 -0
  149. package/lib/src/ap-field/number/index.vue2.js +1 -0
  150. package/lib/src/ap-field/number/style.css +6 -0
  151. package/lib/src/ap-field/radio/helper.d.ts +4 -0
  152. package/lib/src/ap-field/radio/helper.js +1 -0
  153. package/lib/src/ap-field/radio/index.vue.d.ts +40 -0
  154. package/lib/src/ap-field/radio/index.vue.js +1 -0
  155. package/lib/src/ap-field/radio/index.vue2.js +1 -0
  156. package/lib/src/ap-field/select/index.vue.d.ts +235 -0
  157. package/lib/src/ap-field/select/index.vue.js +1 -0
  158. package/lib/src/ap-field/select/index.vue2.js +1 -0
  159. package/lib/src/ap-field/switch/index.vue.d.ts +54 -0
  160. package/lib/src/ap-field/switch/index.vue.js +1 -0
  161. package/lib/src/ap-field/switch/index.vue2.js +1 -0
  162. package/lib/src/ap-field/text/index.vue.d.ts +63 -0
  163. package/lib/src/ap-field/text/index.vue.js +1 -0
  164. package/lib/src/ap-field/text/index.vue2.js +1 -0
  165. package/lib/src/ap-field/text-area/index.vue.d.ts +49 -0
  166. package/lib/src/ap-field/text-area/index.vue.js +1 -0
  167. package/lib/src/ap-field/text-area/index.vue2.js +1 -0
  168. package/lib/src/ap-field/text-area/style.css +5 -0
  169. package/lib/src/ap-form/index.d.ts +64 -64
  170. package/lib/src/base-button/index.d.ts +28 -28
  171. package/lib/src/basic/help.vue.d.ts +1 -1
  172. package/lib/src/basic/index.d.ts +3 -3
  173. package/lib/src/config-provider/config-provider.d.ts +2 -2
  174. package/lib/src/config-provider/index.d.ts +6 -6
  175. package/lib/src/count-down/index.d.ts +12 -12
  176. package/lib/src/cropper/cropper-avatar.vue.d.ts +1 -1
  177. package/lib/src/cropper/cropper-image.vue.d.ts +1 -1
  178. package/lib/src/cropper/index.d.ts +42 -42
  179. package/lib/src/description/description.vue.d.ts +1 -1
  180. package/lib/src/description/index.d.ts +3 -3
  181. package/lib/src/design-token/index.d.ts +4 -0
  182. package/lib/src/design-token/index.js +1 -0
  183. package/lib/src/dropdown/dropdown.vue.d.ts +1 -1
  184. package/lib/src/dropdown/index.d.ts +7 -7
  185. package/lib/src/icon/index.d.ts +41 -41
  186. package/lib/src/icon-picker/icon-picker.vue.d.ts +3 -3
  187. package/lib/src/icon-picker/index.d.ts +45 -45
  188. package/lib/src/index.d.ts +3 -0
  189. package/lib/src/index.js +1 -1
  190. package/lib/src/modal/basic.vue.d.ts +3 -2
  191. package/lib/src/modal/basic.vue.js +1 -1
  192. package/lib/src/modal/components/modal-footer.vue.d.ts +1 -1
  193. package/lib/src/modal/components/modal.d.ts +1 -1
  194. package/lib/src/modal/index.d.ts +7 -8
  195. package/lib/src/modal/index.js +1 -1
  196. package/lib/src/modal/props.js +1 -1
  197. package/lib/src/modal/style/index.css +29 -30
  198. package/lib/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
  199. package/lib/src/pro-form/components/api-select.vue.d.ts +2 -2
  200. package/lib/src/pro-form/components/api-tree.vue.d.ts +1 -1
  201. package/lib/src/pro-form/hooks/use-form-events.js +1 -1
  202. package/lib/src/pro-form/hooks/use-form-values.js +1 -1
  203. package/lib/src/pro-form/hooks/use-label-width.d.ts +5 -5
  204. package/lib/src/pro-form/pro-form.vue.d.ts +1 -1
  205. package/lib/src/pro-form/pro-form.vue.js +1 -1
  206. package/lib/src/pro-table/hooks/use-columns.js +1 -1
  207. package/lib/src/strength-meter/index.d.ts +12 -12
  208. package/lib/src/theme/ap-action/item-dropdown.css +11 -0
  209. package/lib/src/theme/ap-action/item.css +28 -0
  210. package/lib/src/theme/ap-field/number.css +6 -0
  211. package/lib/src/theme/ap-field/text-area.css +5 -0
  212. package/lib/src/theme/modal/index.css +29 -30
  213. package/lib/src/type.d.ts +3 -1
  214. package/lib/src/utils/index.d.ts +7 -0
  215. package/package.json +3 -3
@@ -0,0 +1,122 @@
1
+ import { defineComponent as U, useSlots as _, ref as z, computed as D, unref as o, createVNode as u, Fragment as s, openBlock as h, createBlock as k, resolveDynamicComponent as T, createElementBlock as E, mergeProps as p, createSlots as g, renderList as V, withCtx as C, renderSlot as v, normalizeProps as B, guardReactiveProps as w } from "vue";
2
+ import { Switch as A, Popconfirm as K } from "ant-design-vue";
3
+ import "../../hooks/useMessage.mjs";
4
+ import { useControllableValue as L } from "../../hooks/useControllableValue.mjs";
5
+ import { isNil as M, omit as P } from "lodash-unified";
6
+ import { isDef as f } from "@fruits-chain/utils";
7
+ const J = /* @__PURE__ */ U({
8
+ name: "ApFieldSwitch",
9
+ __name: "index",
10
+ props: {
11
+ mode: {},
12
+ id: {},
13
+ prefixCls: {},
14
+ size: {
15
+ default: "default"
16
+ },
17
+ disabled: {
18
+ type: Boolean
19
+ },
20
+ checkedChildren: {},
21
+ unCheckedChildren: {},
22
+ tabindex: {},
23
+ autofocus: {
24
+ type: Boolean
25
+ },
26
+ loading: {
27
+ type: Boolean,
28
+ default: void 0
29
+ },
30
+ checked: {},
31
+ checkedValue: {
32
+ default: !0
33
+ },
34
+ unCheckedValue: {
35
+ default: !1
36
+ },
37
+ onChange: {},
38
+ onKeydown: {},
39
+ onMouseup: {},
40
+ "onUpdate:checked": {},
41
+ onBlur: {},
42
+ onFocus: {},
43
+ emptyText: {
44
+ default: "-"
45
+ },
46
+ onAction: {},
47
+ confirm: {}
48
+ },
49
+ emits: ["update:checked"],
50
+ setup(S, {
51
+ emit: N
52
+ }) {
53
+ const t = _(), n = S, $ = N, {
54
+ value: d,
55
+ updateValue: a
56
+ } = L(n, $, {
57
+ valuePropName: "checked"
58
+ }), i = z(!1);
59
+ async function y(e, r) {
60
+ if (!f(n.confirm)) {
61
+ if (!f(n.onAction)) {
62
+ a(e);
63
+ return;
64
+ }
65
+ i.value = !0;
66
+ try {
67
+ await n.onAction(e, r) && a(e);
68
+ } finally {
69
+ i.value = !1;
70
+ }
71
+ }
72
+ }
73
+ async function b() {
74
+ const e = o(d) === n.checkedValue ? n.unCheckedValue : n.checkedValue;
75
+ if (!f(n.onAction)) {
76
+ a(e);
77
+ return;
78
+ }
79
+ await n.onAction(e) && a(e);
80
+ }
81
+ const F = D(() => {
82
+ var l, c;
83
+ const e = o(d);
84
+ return M(e) ? u(s, null, [n.emptyText]) : e === n.checkedValue ? u(s, null, [n.checkedChildren || ((l = t.checkedChildren) == null ? void 0 : l.call(t)) || n.checkedValue]) : u(s, null, [n.unCheckedChildren || ((c = t.unCheckedChildren) == null ? void 0 : c.call(t)) || n.unCheckedValue]);
85
+ });
86
+ return (e, r) => e.mode === "read" ? (h(), k(T(F.value), {
87
+ key: 0
88
+ })) : (h(), E(s, {
89
+ key: 1
90
+ }, [o(f)(e.confirm) ? (h(), k(o(K), p({
91
+ key: 1
92
+ }, e.confirm || {}, {
93
+ onConfirm: b
94
+ }), {
95
+ default: C(() => [u(o(A), p(o(P)(n, "onUpdate:checked"), {
96
+ checked: o(d),
97
+ onClick: y,
98
+ loading: e.loading ?? i.value
99
+ }), g({
100
+ _: 2
101
+ }, [V(e.$slots, (l, c) => ({
102
+ name: c,
103
+ fn: C((m) => [v(e.$slots, c, B(w(m || {})))])
104
+ }))]), 1040, ["checked", "loading"])]),
105
+ _: 3
106
+ }, 16)) : (h(), k(o(A), p({
107
+ key: 0
108
+ }, o(P)(n, "onUpdate:checked"), {
109
+ checked: o(d),
110
+ onClick: y,
111
+ loading: e.loading ?? i.value
112
+ }), g({
113
+ _: 2
114
+ }, [V(e.$slots, (l, c) => ({
115
+ name: c,
116
+ fn: C((m) => [v(e.$slots, c, B(w(m || {})))])
117
+ }))]), 1040, ["checked", "loading"]))], 64));
118
+ }
119
+ });
120
+ export {
121
+ J as default
122
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,63 @@
1
+ import { ApFieldTextProps, FieldMode } from '../interface';
2
+ import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
4
+
5
+ type ApFieldTextSlots = {
6
+ addonAfter(): any;
7
+ addonBefore(): any;
8
+ prefix(): any;
9
+ suffix(): any;
10
+ clearIcon(): any;
11
+ };
12
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldTextProps>, {
13
+ emptyText: string;
14
+ mode: string;
15
+ bordered: boolean;
16
+ type: string;
17
+ lazy: boolean;
18
+ }>, {
19
+ focus: (options?: InputFocusOptions | undefined) => void;
20
+ blur: () => void;
21
+ input: any;
22
+ setSelectionRange: (start: number, end: number, direction?: "none" | "forward" | "backward" | undefined) => void;
23
+ select: () => void;
24
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
25
+ "update:value": (...args: any[]) => void;
26
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldTextProps>, {
27
+ emptyText: string;
28
+ mode: string;
29
+ bordered: boolean;
30
+ type: string;
31
+ lazy: boolean;
32
+ }>>> & {
33
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
34
+ }, {
35
+ type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "image" | "search" | "hidden" | "tel" | "url" | "email" | "checkbox" | "radio" | "range" | "datetime-local" | "file" | "password";
36
+ mode: FieldMode;
37
+ bordered: boolean;
38
+ lazy: boolean;
39
+ emptyText: string;
40
+ }, {}>, Readonly<ApFieldTextSlots> & ApFieldTextSlots>;
41
+ export default _default;
42
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
43
+ type __VLS_TypePropsToRuntimeProps<T> = {
44
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
45
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
46
+ } : {
47
+ type: PropType<T[K]>;
48
+ required: true;
49
+ };
50
+ };
51
+ type __VLS_WithDefaults<P, D> = {
52
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
53
+ default: D[K];
54
+ }> : P[K];
55
+ };
56
+ type __VLS_Prettify<T> = {
57
+ [K in keyof T]: T[K];
58
+ } & {};
59
+ type __VLS_WithTemplateSlots<T, S> = T & {
60
+ new (): {
61
+ $slots: S;
62
+ };
63
+ };
@@ -0,0 +1,132 @@
1
+ import { defineComponent as y, ref as x, useSlots as v, computed as B, openBlock as g, createBlock as b, resolveDynamicComponent as C, createVNode as r, mergeProps as h, unref as S, Fragment as _, isVNode as R } from "vue";
2
+ import { Input as V } from "ant-design-vue";
3
+ import "../../hooks/useMessage.mjs";
4
+ import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
5
+ import { omit as F } from "lodash-unified";
6
+ function T(u) {
7
+ return typeof u == "function" || Object.prototype.toString.call(u) === "[object Object]" && !R(u);
8
+ }
9
+ const P = /* @__PURE__ */ y({
10
+ name: "ApFieldText",
11
+ __name: "index",
12
+ props: {
13
+ mode: {
14
+ default: "edit"
15
+ },
16
+ id: {},
17
+ placeholder: {},
18
+ autocomplete: {},
19
+ type: {
20
+ default: "text"
21
+ },
22
+ name: {},
23
+ size: {},
24
+ autofocus: {
25
+ type: Boolean
26
+ },
27
+ lazy: {
28
+ type: Boolean,
29
+ default: !0
30
+ },
31
+ maxlength: {},
32
+ loading: {
33
+ type: Boolean
34
+ },
35
+ bordered: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ showCount: {
40
+ type: [Boolean, Object]
41
+ },
42
+ htmlSize: {},
43
+ onPressEnter: {},
44
+ onKeydown: {},
45
+ onKeyup: {},
46
+ onFocus: {},
47
+ onBlur: {},
48
+ onChange: {},
49
+ onInput: {},
50
+ "onUpdate:value": {},
51
+ onCompositionstart: {},
52
+ onCompositionend: {},
53
+ valueModifiers: {},
54
+ hidden: {
55
+ type: Boolean
56
+ },
57
+ status: {},
58
+ value: {},
59
+ defaultValue: {},
60
+ inputElement: {},
61
+ prefixCls: {},
62
+ disabled: {
63
+ type: Boolean
64
+ },
65
+ focused: {
66
+ type: Boolean
67
+ },
68
+ triggerFocus: {},
69
+ readonly: {
70
+ type: Boolean
71
+ },
72
+ handleReset: {},
73
+ addonBefore: {},
74
+ addonAfter: {},
75
+ prefix: {},
76
+ suffix: {},
77
+ clearIcon: {},
78
+ allowClear: {
79
+ type: Boolean
80
+ },
81
+ emptyText: {
82
+ default: "-"
83
+ }
84
+ },
85
+ emits: ["update:value"],
86
+ setup(u, {
87
+ expose: p,
88
+ emit: i
89
+ }) {
90
+ const a = x(), t = v();
91
+ p({
92
+ focus: (e) => {
93
+ var o;
94
+ (o = a.value) == null || o.focus(e);
95
+ },
96
+ blur: () => {
97
+ var e;
98
+ (e = a.value) == null || e.blur();
99
+ },
100
+ setSelectionRange: (e, o, m) => {
101
+ var l;
102
+ (l = a.value) == null || l.setSelectionRange(e, o, m);
103
+ },
104
+ select: () => {
105
+ var e;
106
+ (e = a.value) == null || e.select();
107
+ },
108
+ input: B(() => {
109
+ var e;
110
+ return (e = a.value) == null ? void 0 : e.input;
111
+ })
112
+ });
113
+ const c = i, n = u, {
114
+ value: d,
115
+ updateValue: f
116
+ } = j(n, c);
117
+ function s() {
118
+ var e, o;
119
+ return n.mode === "edit" ? r(V, h(F(n, ["mode", "emptyText"]), {
120
+ value: S(d),
121
+ "onUpdate:value": f,
122
+ ref: a
123
+ }), T(t) ? t : {
124
+ default: () => [t]
125
+ }) : r(_, null, [n.prefix || ((e = t == null ? void 0 : t.prefix) == null ? void 0 : e.call(t)), n.value || n.emptyText, n.suffix || ((o = t == null ? void 0 : t.suffix) == null ? void 0 : o.call(t))]);
126
+ }
127
+ return (e, o) => (g(), b(C(s())));
128
+ }
129
+ });
130
+ export {
131
+ P as default
132
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,49 @@
1
+ import { ApFieldTextAreaProps, FieldMode } from '../interface';
2
+ import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
3
+ import { DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
4
+
5
+ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldTextAreaProps>, {
6
+ emptyText: string;
7
+ bordered: boolean;
8
+ mode: string;
9
+ type: string;
10
+ lazy: boolean;
11
+ }>, {
12
+ focus: (options?: InputFocusOptions | undefined) => void;
13
+ blur: () => void;
14
+ resizableTextArea: ComputedRef<any>;
15
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
+ "update:value": (...args: any[]) => void;
17
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldTextAreaProps>, {
18
+ emptyText: string;
19
+ bordered: boolean;
20
+ mode: string;
21
+ type: string;
22
+ lazy: boolean;
23
+ }>>> & {
24
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
25
+ }, {
26
+ type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "image" | "search" | "hidden" | "tel" | "url" | "email" | "checkbox" | "radio" | "range" | "datetime-local" | "file" | "password";
27
+ mode: FieldMode;
28
+ bordered: boolean;
29
+ lazy: boolean;
30
+ emptyText: string;
31
+ }, {}>;
32
+ export default _default;
33
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
34
+ type __VLS_TypePropsToRuntimeProps<T> = {
35
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
36
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
37
+ } : {
38
+ type: PropType<T[K]>;
39
+ required: true;
40
+ };
41
+ };
42
+ type __VLS_WithDefaults<P, D> = {
43
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
44
+ default: D[K];
45
+ }> : P[K];
46
+ };
47
+ type __VLS_Prettify<T> = {
48
+ [K in keyof T]: T[K];
49
+ } & {};
@@ -0,0 +1,86 @@
1
+ import { defineComponent as c, ref as f, computed as y, openBlock as r, createElementBlock as B, normalizeClass as x, unref as o, toDisplayString as v, createBlock as b, mergeProps as z } from "vue";
2
+ import { isNil as C } from "lodash-unified";
3
+ import "../../hooks/useMessage.mjs";
4
+ import { useControllableValue as h } from "../../hooks/useControllableValue.mjs";
5
+ import "../../config-provider/index.mjs";
6
+ import { Input as g } from "ant-design-vue";
7
+ import "./style.css";
8
+ import { useNamespace as A } from "../../config-provider/hooks/use-namespace.mjs";
9
+ const I = /* @__PURE__ */ c({
10
+ name: "ApFieldTextArea",
11
+ __name: "index",
12
+ props: {
13
+ mode: { default: "edit" },
14
+ rows: {},
15
+ autosize: { type: [Boolean, Object] },
16
+ autoSize: { type: [Boolean, Object] },
17
+ onResize: {},
18
+ onCompositionstart: {},
19
+ onCompositionend: {},
20
+ valueModifiers: {},
21
+ size: {},
22
+ value: {},
23
+ name: {},
24
+ type: { default: "text" },
25
+ onFocus: {},
26
+ onBlur: {},
27
+ onChange: {},
28
+ onInput: {},
29
+ onKeydown: {},
30
+ onKeyup: {},
31
+ focused: { type: Boolean },
32
+ hidden: { type: Boolean },
33
+ disabled: { type: Boolean },
34
+ prefixCls: {},
35
+ id: {},
36
+ autofocus: { type: Boolean },
37
+ autocomplete: {},
38
+ readonly: { type: Boolean },
39
+ status: {},
40
+ defaultValue: {},
41
+ "onUpdate:value": {},
42
+ placeholder: {},
43
+ loading: { type: Boolean },
44
+ lazy: { type: Boolean, default: !0 },
45
+ maxlength: {},
46
+ bordered: { type: Boolean, default: !0 },
47
+ showCount: { type: [Boolean, Object] },
48
+ htmlSize: {},
49
+ onPressEnter: {},
50
+ inputElement: {},
51
+ triggerFocus: {},
52
+ handleReset: {},
53
+ clearIcon: {},
54
+ allowClear: { type: Boolean },
55
+ emptyText: { default: "-" }
56
+ },
57
+ emits: ["update:value"],
58
+ setup(u, { expose: p, emit: s }) {
59
+ const t = f(), n = u, i = s, { value: a, updateValue: d } = h(n, i), { b: m } = A("field-text-area");
60
+ return p({
61
+ focus: (e) => {
62
+ var l;
63
+ (l = t.value) == null || l.focus(e);
64
+ },
65
+ blur: () => {
66
+ var e;
67
+ (e = t.value) == null || e.blur();
68
+ },
69
+ resizableTextArea: y(() => {
70
+ var e;
71
+ return (e = t.value) == null ? void 0 : e.resizableTextArea;
72
+ })
73
+ }), (e, l) => e.mode === "read" ? (r(), B("span", {
74
+ key: 0,
75
+ class: x(o(m)())
76
+ }, v(o(C)(o(a)) || o(a) === "" ? e.emptyText : o(a)), 3)) : (r(), b(o(g).TextArea, z({ key: 1 }, n, {
77
+ value: o(a),
78
+ "onUpdate:value": o(d),
79
+ ref_key: "textAreaRef",
80
+ ref: t
81
+ }), null, 16, ["value", "onUpdate:value"]));
82
+ }
83
+ });
84
+ export {
85
+ I as default
86
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,5 @@
1
+ .aplus-field-text-area {
2
+ white-space: pre-wrap;
3
+ word-wrap: break-word;
4
+ word-break: break-all;
5
+ }