@manohub/ui 0.6.0

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 (169) hide show
  1. package/README.md +141 -0
  2. package/dist/components/avatar/index.d.ts +283 -0
  3. package/dist/components/avatar/index.js +167 -0
  4. package/dist/components/badge/index.d.ts +132 -0
  5. package/dist/components/badge/index.js +99 -0
  6. package/dist/components/button/index.d.ts +578 -0
  7. package/dist/components/button/index.js +191 -0
  8. package/dist/components/capsule/index.d.ts +161 -0
  9. package/dist/components/capsule/index.js +101 -0
  10. package/dist/components/card/index.d.ts +456 -0
  11. package/dist/components/card/index.js +231 -0
  12. package/dist/components/checkbox/index.d.ts +331 -0
  13. package/dist/components/checkbox/index.js +165 -0
  14. package/dist/components/code/index.d.ts +134 -0
  15. package/dist/components/code/index.js +117 -0
  16. package/dist/components/code-editor/index.d.ts +163 -0
  17. package/dist/components/code-editor/index.js +98 -0
  18. package/dist/components/collapse/index.d.ts +125 -0
  19. package/dist/components/collapse/index.js +95 -0
  20. package/dist/components/control-size.d.ts +8 -0
  21. package/dist/components/dialog/index.d.ts +224 -0
  22. package/dist/components/dialog/index.js +194 -0
  23. package/dist/components/divider/index.d.ts +64 -0
  24. package/dist/components/divider/index.js +62 -0
  25. package/dist/components/drawer/index.d.ts +226 -0
  26. package/dist/components/drawer/index.js +190 -0
  27. package/dist/components/filter/index.d.ts +391 -0
  28. package/dist/components/filter/index.js +203 -0
  29. package/dist/components/form/index.d.ts +704 -0
  30. package/dist/components/form/index.js +329 -0
  31. package/dist/components/input/index.d.ts +980 -0
  32. package/dist/components/input/index.js +334 -0
  33. package/dist/components/layout/index.d.ts +162 -0
  34. package/dist/components/layout/index.js +100 -0
  35. package/dist/components/list-view/index.d.ts +563 -0
  36. package/dist/components/list-view/index.js +221 -0
  37. package/dist/components/loading/index.d.ts +77 -0
  38. package/dist/components/loading/index.js +40 -0
  39. package/dist/components/nav/index.d.ts +293 -0
  40. package/dist/components/nav/index.js +164 -0
  41. package/dist/components/notice/index.d.ts +137 -0
  42. package/dist/components/notice/index.js +101 -0
  43. package/dist/components/notification/index.d.ts +118 -0
  44. package/dist/components/notification/index.js +99 -0
  45. package/dist/components/page/index.d.ts +276 -0
  46. package/dist/components/page/index.js +351 -0
  47. package/dist/components/page/split-resize.d.ts +42 -0
  48. package/dist/components/page/split-resize.js +36 -0
  49. package/dist/components/pagination/index.d.ts +171 -0
  50. package/dist/components/pagination/index.js +226 -0
  51. package/dist/components/panel/index.d.ts +401 -0
  52. package/dist/components/panel/index.js +193 -0
  53. package/dist/components/part-padding.d.ts +27 -0
  54. package/dist/components/part-padding.js +23 -0
  55. package/dist/components/query-state/index.d.ts +207 -0
  56. package/dist/components/query-state/index.js +181 -0
  57. package/dist/components/radio/index.d.ts +473 -0
  58. package/dist/components/radio/index.js +250 -0
  59. package/dist/components/search/index.d.ts +167 -0
  60. package/dist/components/search/index.js +105 -0
  61. package/dist/components/select/index.d.ts +252 -0
  62. package/dist/components/select/index.js +281 -0
  63. package/dist/components/skeleton/index.d.ts +88 -0
  64. package/dist/components/skeleton/index.js +56 -0
  65. package/dist/components/steps/index.d.ts +199 -0
  66. package/dist/components/steps/index.js +117 -0
  67. package/dist/components/switch/index.d.ts +150 -0
  68. package/dist/components/switch/index.js +103 -0
  69. package/dist/components/table/index.d.ts +351 -0
  70. package/dist/components/table/index.js +286 -0
  71. package/dist/components/tabs/index.d.ts +179 -0
  72. package/dist/components/tabs/index.js +153 -0
  73. package/dist/components/tabset/index.d.ts +105 -0
  74. package/dist/components/tabset/index.js +68 -0
  75. package/dist/components/tag/index.d.ts +203 -0
  76. package/dist/components/tag/index.js +144 -0
  77. package/dist/components/toast/index.d.ts +271 -0
  78. package/dist/components/toast/index.js +116 -0
  79. package/dist/components/tooltip/index.d.ts +126 -0
  80. package/dist/components/tooltip/index.js +97 -0
  81. package/dist/components/tree/index.d.ts +317 -0
  82. package/dist/components/tree/index.js +251 -0
  83. package/dist/components/upload/index.d.ts +384 -0
  84. package/dist/components/upload/index.js +172 -0
  85. package/dist/index.d.ts +63 -0
  86. package/dist/index.js +102 -0
  87. package/dist/services/base.d.ts +21 -0
  88. package/dist/services/base.js +42 -0
  89. package/dist/services/dialog.d.ts +41 -0
  90. package/dist/services/dialog.js +83 -0
  91. package/dist/services/index.d.ts +12 -0
  92. package/dist/services/loading.d.ts +21 -0
  93. package/dist/services/loading.js +41 -0
  94. package/dist/services/toast.d.ts +40 -0
  95. package/dist/services/toast.js +74 -0
  96. package/dist/styles/components/avatar.css +128 -0
  97. package/dist/styles/components/avatar.tokens.css +24 -0
  98. package/dist/styles/components/badge.css +237 -0
  99. package/dist/styles/components/button.css +454 -0
  100. package/dist/styles/components/button.tokens.css +56 -0
  101. package/dist/styles/components/capsule.css +120 -0
  102. package/dist/styles/components/capsule.tokens.css +27 -0
  103. package/dist/styles/components/card.css +192 -0
  104. package/dist/styles/components/checkbox.css +145 -0
  105. package/dist/styles/components/checkbox.tokens.css +26 -0
  106. package/dist/styles/components/code-editor.css +91 -0
  107. package/dist/styles/components/code-editor.tokens.css +24 -0
  108. package/dist/styles/components/code.css +153 -0
  109. package/dist/styles/components/code.tokens.css +29 -0
  110. package/dist/styles/components/collapse.css +62 -0
  111. package/dist/styles/components/collapse.tokens.css +20 -0
  112. package/dist/styles/components/dialog.css +106 -0
  113. package/dist/styles/components/dialog.tokens.css +24 -0
  114. package/dist/styles/components/divider.css +71 -0
  115. package/dist/styles/components/divider.tokens.css +21 -0
  116. package/dist/styles/components/drawer.css +143 -0
  117. package/dist/styles/components/drawer.tokens.css +22 -0
  118. package/dist/styles/components/filter.css +41 -0
  119. package/dist/styles/components/filter.tokens.css +14 -0
  120. package/dist/styles/components/form.css +220 -0
  121. package/dist/styles/components/form.tokens.css +15 -0
  122. package/dist/styles/components/input.css +445 -0
  123. package/dist/styles/components/input.tokens.css +41 -0
  124. package/dist/styles/components/layout.css +198 -0
  125. package/dist/styles/components/list-view.css +244 -0
  126. package/dist/styles/components/loading.css +76 -0
  127. package/dist/styles/components/loading.tokens.css +23 -0
  128. package/dist/styles/components/nav.css +48 -0
  129. package/dist/styles/components/notice.css +153 -0
  130. package/dist/styles/components/notice.tokens.css +17 -0
  131. package/dist/styles/components/notification.css +159 -0
  132. package/dist/styles/components/notification.tokens.css +37 -0
  133. package/dist/styles/components/page.css +473 -0
  134. package/dist/styles/components/pagination.css +297 -0
  135. package/dist/styles/components/pagination.tokens.css +32 -0
  136. package/dist/styles/components/panel.css +77 -0
  137. package/dist/styles/components/query-state.css +88 -0
  138. package/dist/styles/components/radio.css +271 -0
  139. package/dist/styles/components/radio.tokens.css +26 -0
  140. package/dist/styles/components/search.css +30 -0
  141. package/dist/styles/components/select.css +242 -0
  142. package/dist/styles/components/select.tokens.css +33 -0
  143. package/dist/styles/components/skeleton.css +60 -0
  144. package/dist/styles/components/skeleton.tokens.css +27 -0
  145. package/dist/styles/components/steps.css +157 -0
  146. package/dist/styles/components/steps.tokens.css +42 -0
  147. package/dist/styles/components/switch.css +165 -0
  148. package/dist/styles/components/switch.tokens.css +26 -0
  149. package/dist/styles/components/table.css +439 -0
  150. package/dist/styles/components/table.tokens.css +41 -0
  151. package/dist/styles/components/tabs.css +234 -0
  152. package/dist/styles/components/tabs.tokens.css +30 -0
  153. package/dist/styles/components/tag.css +200 -0
  154. package/dist/styles/components/tag.tokens.css +30 -0
  155. package/dist/styles/components/toast.css +150 -0
  156. package/dist/styles/components/toast.tokens.css +26 -0
  157. package/dist/styles/components/tooltip.css +89 -0
  158. package/dist/styles/components/tooltip.tokens.css +25 -0
  159. package/dist/styles/components/tree.css +139 -0
  160. package/dist/styles/components/tree.tokens.css +20 -0
  161. package/dist/styles/components/upload.css +150 -0
  162. package/dist/styles/components/upload.tokens.css +27 -0
  163. package/dist/styles/index.css +149 -0
  164. package/dist/styles/operations/collapse.css +84 -0
  165. package/dist/styles/operations/popup.css +189 -0
  166. package/dist/styles/operations/tabset.css +57 -0
  167. package/dist/utils/state-illustration.d.ts +31 -0
  168. package/dist/utils/state-illustration.js +156 -0
  169. package/package.json +62 -0
@@ -0,0 +1,980 @@
1
+ import { type PropType, type SlotsType, type VNodeChild } from 'vue';
2
+ import type { ControlSize } from '../control-size';
3
+ /** 校验状态(`error` 红、`warning` 黄;缺省无校验态) */
4
+ export type InputStatus = 'error' | 'warning';
5
+ /** 自适应高度的行数区间(`true` 等价于 `{ minRows: 2, maxRows: 6 }`) */
6
+ export interface TextareaAutoSize {
7
+ minRows?: number;
8
+ maxRows?: number;
9
+ }
10
+ /**
11
+ * 输入框(**自绘**,不封装 farris)。
12
+ *
13
+ * `Input` / `Textarea` 共用同一份面 `styles/components/input.css`(规范也把二者放在同一个
14
+ * `input.css` 里),本文件因此同时导出两个件:单行与多行结构不同(多行没有清除/眼睛,单行没有计数),
15
+ * 硬合成一个件会让 props 互相污染。
16
+ *
17
+ * 统一词表(与 `Checkbox` / `Switch` 同款):`modelValue` / `onChange` / `disabled` / `size`。
18
+ *
19
+ * 三源等价:原生 `:hover` / `:focus` / `:disabled` / `aria-invalid` 承载态,组件只补**结构**与
20
+ * 原生做不到的行为(清除按钮的显隐与回写、密码可见切换、字数实时统计、自适应行数)。
21
+ *
22
+ * 附加位:`prefix` / `suffix` **插槽**里放什么由你决定(图标 / 单位 / 域名 / 你自己的可点元素),
23
+ * 本件不内置标签件 —— 纯装饰形态无底色、不参与 Tab 序列,可点形态的热区与底色归消费方。
24
+ *
25
+ * @example 受控 + 可清除
26
+ * <Input modelValue={kw} placeholder="搜索" clearable prefix={<Icon name="search" />} onChange={setKw} />
27
+ *
28
+ * @example 密码(右端图标切换明/密文)
29
+ * <Input type="password" modelValue={pwd} onChange={setPwd} />
30
+ *
31
+ * @example 校验态与尺寸
32
+ * <Input status="error" size="lg" placeholder="请输入任务名" />
33
+ *
34
+ * @example 多行 + 字数 + 自适应高度
35
+ * <Textarea modelValue={note} autoSize={{ minRows: 2, maxRows: 6 }} maxlength={500} showCount onChange={setNote} />
36
+ *
37
+ * @example 触发器形态(复合件用:控件换成 `<button>`,表壳 / 清除位 / 右侧图标位全部复用)
38
+ * <Input as="button" clearable hasValue={!!value} controlClass="my-picker" controlAttrs={{ popovertarget: id }}>
39
+ * {{ default: () => value ?? '请选择', suffix: () => <Icon name="chevron-down" /> }}
40
+ * </Input>
41
+ */
42
+ export declare const Input: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
43
+ /** 受控值 */
44
+ modelValue: {
45
+ type: StringConstructor;
46
+ default: undefined;
47
+ };
48
+ /** 非受控初始值 */
49
+ defaultValue: {
50
+ type: StringConstructor;
51
+ default: string;
52
+ };
53
+ placeholder: {
54
+ type: StringConstructor;
55
+ default: undefined;
56
+ };
57
+ /** 原生 input 类型(`password` 时自动出现可见性切换) */
58
+ type: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ /** 尺寸档(与全库 `ControlSize` 同表:24 / 28 / 32) */
63
+ size: {
64
+ type: PropType<ControlSize>;
65
+ default: string;
66
+ };
67
+ disabled: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ readonly: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
75
+ /** 校验态(下发 `aria-invalid`,样式走协议不看 data-*);等价于 `status="error"` */
76
+ invalid: {
77
+ type: BooleanConstructor;
78
+ default: boolean;
79
+ };
80
+ /** 校验状态(`invalid` 的显式写法;两者同时给以 `status` 为准) */
81
+ status: {
82
+ type: PropType<InputStatus>;
83
+ default: undefined;
84
+ };
85
+ /** 有内容时显示清除按钮 */
86
+ clearable: {
87
+ type: BooleanConstructor;
88
+ default: boolean;
89
+ };
90
+ /** 是否带边框;`false` 用于表格内编辑 / 行内编辑(无框、无底) */
91
+ bordered: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ maxlength: {
96
+ type: NumberConstructor;
97
+ default: undefined;
98
+ };
99
+ /** 右侧字数统计(单行须给 `maxlength` 才有意义) */
100
+ showCount: {
101
+ type: BooleanConstructor;
102
+ default: boolean;
103
+ };
104
+ /** 自动聚焦(进页面即可输入,如搜索框) */
105
+ autofocus: {
106
+ type: BooleanConstructor;
107
+ default: boolean;
108
+ };
109
+ /** 值变更回调(每次输入都调) */
110
+ onChange: {
111
+ type: PropType<(v: string) => void>;
112
+ default: undefined;
113
+ };
114
+ /** 回车回调 */
115
+ onEnter: {
116
+ type: PropType<(v: string) => void>;
117
+ default: undefined;
118
+ };
119
+ /** 控件元素形态:`input` 文本输入(缺省)/ `button` 触发器 */
120
+ as: {
121
+ type: PropType<"input" | "button">;
122
+ default: string;
123
+ };
124
+ /** 追加到**控件元素**上的类(复合件挂自己的排版类用;本件的 `class` 仍落表壳) */
125
+ controlClass: {
126
+ type: StringConstructor;
127
+ default: undefined;
128
+ };
129
+ /** 展开到**控件元素**上的属性(触发器形态要 `popovertarget` / `aria-*` / `onKeydown` 落到控件上) */
130
+ controlAttrs: {
131
+ type: PropType<Record<string, unknown>>;
132
+ default: undefined;
133
+ };
134
+ /** 显式覆盖清除位显隐;不给时仍按「有内容」判定(多选类复合件没有单值可判) */
135
+ hasValue: {
136
+ type: BooleanConstructor;
137
+ default: undefined;
138
+ };
139
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
140
+ 'update:modelValue': (v: string) => true;
141
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
142
+ /** 受控值 */
143
+ modelValue: {
144
+ type: StringConstructor;
145
+ default: undefined;
146
+ };
147
+ /** 非受控初始值 */
148
+ defaultValue: {
149
+ type: StringConstructor;
150
+ default: string;
151
+ };
152
+ placeholder: {
153
+ type: StringConstructor;
154
+ default: undefined;
155
+ };
156
+ /** 原生 input 类型(`password` 时自动出现可见性切换) */
157
+ type: {
158
+ type: StringConstructor;
159
+ default: string;
160
+ };
161
+ /** 尺寸档(与全库 `ControlSize` 同表:24 / 28 / 32) */
162
+ size: {
163
+ type: PropType<ControlSize>;
164
+ default: string;
165
+ };
166
+ disabled: {
167
+ type: BooleanConstructor;
168
+ default: boolean;
169
+ };
170
+ readonly: {
171
+ type: BooleanConstructor;
172
+ default: boolean;
173
+ };
174
+ /** 校验态(下发 `aria-invalid`,样式走协议不看 data-*);等价于 `status="error"` */
175
+ invalid: {
176
+ type: BooleanConstructor;
177
+ default: boolean;
178
+ };
179
+ /** 校验状态(`invalid` 的显式写法;两者同时给以 `status` 为准) */
180
+ status: {
181
+ type: PropType<InputStatus>;
182
+ default: undefined;
183
+ };
184
+ /** 有内容时显示清除按钮 */
185
+ clearable: {
186
+ type: BooleanConstructor;
187
+ default: boolean;
188
+ };
189
+ /** 是否带边框;`false` 用于表格内编辑 / 行内编辑(无框、无底) */
190
+ bordered: {
191
+ type: BooleanConstructor;
192
+ default: boolean;
193
+ };
194
+ maxlength: {
195
+ type: NumberConstructor;
196
+ default: undefined;
197
+ };
198
+ /** 右侧字数统计(单行须给 `maxlength` 才有意义) */
199
+ showCount: {
200
+ type: BooleanConstructor;
201
+ default: boolean;
202
+ };
203
+ /** 自动聚焦(进页面即可输入,如搜索框) */
204
+ autofocus: {
205
+ type: BooleanConstructor;
206
+ default: boolean;
207
+ };
208
+ /** 值变更回调(每次输入都调) */
209
+ onChange: {
210
+ type: PropType<(v: string) => void>;
211
+ default: undefined;
212
+ };
213
+ /** 回车回调 */
214
+ onEnter: {
215
+ type: PropType<(v: string) => void>;
216
+ default: undefined;
217
+ };
218
+ /** 控件元素形态:`input` 文本输入(缺省)/ `button` 触发器 */
219
+ as: {
220
+ type: PropType<"input" | "button">;
221
+ default: string;
222
+ };
223
+ /** 追加到**控件元素**上的类(复合件挂自己的排版类用;本件的 `class` 仍落表壳) */
224
+ controlClass: {
225
+ type: StringConstructor;
226
+ default: undefined;
227
+ };
228
+ /** 展开到**控件元素**上的属性(触发器形态要 `popovertarget` / `aria-*` / `onKeydown` 落到控件上) */
229
+ controlAttrs: {
230
+ type: PropType<Record<string, unknown>>;
231
+ default: undefined;
232
+ };
233
+ /** 显式覆盖清除位显隐;不给时仍按「有内容」判定(多选类复合件没有单值可判) */
234
+ hasValue: {
235
+ type: BooleanConstructor;
236
+ default: undefined;
237
+ };
238
+ }>> & Readonly<{
239
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
240
+ }>, {
241
+ size: ControlSize;
242
+ disabled: boolean;
243
+ type: string;
244
+ onChange: (v: string) => void;
245
+ invalid: boolean;
246
+ bordered: boolean;
247
+ defaultValue: string;
248
+ placeholder: string;
249
+ autofocus: boolean;
250
+ modelValue: string;
251
+ status: InputStatus;
252
+ readonly: boolean;
253
+ clearable: boolean;
254
+ maxlength: number;
255
+ showCount: boolean;
256
+ onEnter: (v: string) => void;
257
+ as: "button" | "input";
258
+ controlClass: string;
259
+ controlAttrs: Record<string, unknown>;
260
+ hasValue: boolean;
261
+ }, SlotsType<{
262
+ default?: () => VNodeChild;
263
+ prefix?: () => VNodeChild;
264
+ suffix?: () => VNodeChild;
265
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
266
+ export interface TextareaProps {
267
+ /** 受控值 */
268
+ modelValue?: string;
269
+ /** 非受控初始值 */
270
+ defaultValue?: string;
271
+ placeholder?: string;
272
+ /** 可见行数(与 `autoSize` 互斥,给了 `autoSize` 以它为准) */
273
+ rows?: number;
274
+ /** 自适应高度:按内容行数在 `minRows` / `maxRows` 之间伸缩 */
275
+ autoSize?: boolean | TextareaAutoSize;
276
+ /** 尺寸档 */
277
+ size?: ControlSize;
278
+ disabled?: boolean;
279
+ readonly?: boolean;
280
+ /** 校验态(下发 `aria-invalid`) */
281
+ invalid?: boolean;
282
+ /** 校验状态(`invalid` 的显式写法) */
283
+ status?: InputStatus;
284
+ /** 是否带边框 */
285
+ bordered?: boolean;
286
+ maxlength?: number;
287
+ /** 右下角字数统计(须给 `maxlength` 才有意义) */
288
+ showCount?: boolean;
289
+ autofocus?: boolean;
290
+ onChange?: (v: string) => void;
291
+ }
292
+ /** 多行输入(同一份面;结构与单行不同,故单列一个件) */
293
+ export declare const Textarea: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
294
+ modelValue: {
295
+ type: StringConstructor;
296
+ default: undefined;
297
+ };
298
+ defaultValue: {
299
+ type: StringConstructor;
300
+ default: string;
301
+ };
302
+ placeholder: {
303
+ type: StringConstructor;
304
+ default: undefined;
305
+ };
306
+ rows: {
307
+ type: NumberConstructor;
308
+ default: undefined;
309
+ };
310
+ autoSize: {
311
+ type: PropType<boolean | TextareaAutoSize>;
312
+ default: boolean;
313
+ };
314
+ size: {
315
+ type: PropType<ControlSize>;
316
+ default: string;
317
+ };
318
+ disabled: {
319
+ type: BooleanConstructor;
320
+ default: boolean;
321
+ };
322
+ readonly: {
323
+ type: BooleanConstructor;
324
+ default: boolean;
325
+ };
326
+ invalid: {
327
+ type: BooleanConstructor;
328
+ default: boolean;
329
+ };
330
+ status: {
331
+ type: PropType<InputStatus>;
332
+ default: undefined;
333
+ };
334
+ bordered: {
335
+ type: BooleanConstructor;
336
+ default: boolean;
337
+ };
338
+ maxlength: {
339
+ type: NumberConstructor;
340
+ default: undefined;
341
+ };
342
+ showCount: {
343
+ type: BooleanConstructor;
344
+ default: boolean;
345
+ };
346
+ autofocus: {
347
+ type: BooleanConstructor;
348
+ default: boolean;
349
+ };
350
+ onChange: {
351
+ type: PropType<(v: string) => void>;
352
+ default: undefined;
353
+ };
354
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
355
+ 'update:modelValue': (v: string) => true;
356
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
357
+ modelValue: {
358
+ type: StringConstructor;
359
+ default: undefined;
360
+ };
361
+ defaultValue: {
362
+ type: StringConstructor;
363
+ default: string;
364
+ };
365
+ placeholder: {
366
+ type: StringConstructor;
367
+ default: undefined;
368
+ };
369
+ rows: {
370
+ type: NumberConstructor;
371
+ default: undefined;
372
+ };
373
+ autoSize: {
374
+ type: PropType<boolean | TextareaAutoSize>;
375
+ default: boolean;
376
+ };
377
+ size: {
378
+ type: PropType<ControlSize>;
379
+ default: string;
380
+ };
381
+ disabled: {
382
+ type: BooleanConstructor;
383
+ default: boolean;
384
+ };
385
+ readonly: {
386
+ type: BooleanConstructor;
387
+ default: boolean;
388
+ };
389
+ invalid: {
390
+ type: BooleanConstructor;
391
+ default: boolean;
392
+ };
393
+ status: {
394
+ type: PropType<InputStatus>;
395
+ default: undefined;
396
+ };
397
+ bordered: {
398
+ type: BooleanConstructor;
399
+ default: boolean;
400
+ };
401
+ maxlength: {
402
+ type: NumberConstructor;
403
+ default: undefined;
404
+ };
405
+ showCount: {
406
+ type: BooleanConstructor;
407
+ default: boolean;
408
+ };
409
+ autofocus: {
410
+ type: BooleanConstructor;
411
+ default: boolean;
412
+ };
413
+ onChange: {
414
+ type: PropType<(v: string) => void>;
415
+ default: undefined;
416
+ };
417
+ }>> & Readonly<{
418
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
419
+ }>, {
420
+ size: ControlSize;
421
+ disabled: boolean;
422
+ onChange: (v: string) => void;
423
+ invalid: boolean;
424
+ bordered: boolean;
425
+ defaultValue: string;
426
+ placeholder: string;
427
+ rows: number;
428
+ autofocus: boolean;
429
+ modelValue: string;
430
+ status: InputStatus;
431
+ readonly: boolean;
432
+ maxlength: number;
433
+ showCount: boolean;
434
+ autoSize: boolean | TextareaAutoSize;
435
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
436
+ export declare const InputCompound: {
437
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
438
+ /** 受控值 */
439
+ modelValue: {
440
+ type: StringConstructor;
441
+ default: undefined;
442
+ };
443
+ /** 非受控初始值 */
444
+ defaultValue: {
445
+ type: StringConstructor;
446
+ default: string;
447
+ };
448
+ placeholder: {
449
+ type: StringConstructor;
450
+ default: undefined;
451
+ };
452
+ /** 原生 input 类型(`password` 时自动出现可见性切换) */
453
+ type: {
454
+ type: StringConstructor;
455
+ default: string;
456
+ };
457
+ /** 尺寸档(与全库 `ControlSize` 同表:24 / 28 / 32) */
458
+ size: {
459
+ type: PropType<ControlSize>;
460
+ default: string;
461
+ };
462
+ disabled: {
463
+ type: BooleanConstructor;
464
+ default: boolean;
465
+ };
466
+ readonly: {
467
+ type: BooleanConstructor;
468
+ default: boolean;
469
+ };
470
+ /** 校验态(下发 `aria-invalid`,样式走协议不看 data-*);等价于 `status="error"` */
471
+ invalid: {
472
+ type: BooleanConstructor;
473
+ default: boolean;
474
+ };
475
+ /** 校验状态(`invalid` 的显式写法;两者同时给以 `status` 为准) */
476
+ status: {
477
+ type: PropType<InputStatus>;
478
+ default: undefined;
479
+ };
480
+ /** 有内容时显示清除按钮 */
481
+ clearable: {
482
+ type: BooleanConstructor;
483
+ default: boolean;
484
+ };
485
+ /** 是否带边框;`false` 用于表格内编辑 / 行内编辑(无框、无底) */
486
+ bordered: {
487
+ type: BooleanConstructor;
488
+ default: boolean;
489
+ };
490
+ maxlength: {
491
+ type: NumberConstructor;
492
+ default: undefined;
493
+ };
494
+ /** 右侧字数统计(单行须给 `maxlength` 才有意义) */
495
+ showCount: {
496
+ type: BooleanConstructor;
497
+ default: boolean;
498
+ };
499
+ /** 自动聚焦(进页面即可输入,如搜索框) */
500
+ autofocus: {
501
+ type: BooleanConstructor;
502
+ default: boolean;
503
+ };
504
+ /** 值变更回调(每次输入都调) */
505
+ onChange: {
506
+ type: PropType<(v: string) => void>;
507
+ default: undefined;
508
+ };
509
+ /** 回车回调 */
510
+ onEnter: {
511
+ type: PropType<(v: string) => void>;
512
+ default: undefined;
513
+ };
514
+ /** 控件元素形态:`input` 文本输入(缺省)/ `button` 触发器 */
515
+ as: {
516
+ type: PropType<"input" | "button">;
517
+ default: string;
518
+ };
519
+ /** 追加到**控件元素**上的类(复合件挂自己的排版类用;本件的 `class` 仍落表壳) */
520
+ controlClass: {
521
+ type: StringConstructor;
522
+ default: undefined;
523
+ };
524
+ /** 展开到**控件元素**上的属性(触发器形态要 `popovertarget` / `aria-*` / `onKeydown` 落到控件上) */
525
+ controlAttrs: {
526
+ type: PropType<Record<string, unknown>>;
527
+ default: undefined;
528
+ };
529
+ /** 显式覆盖清除位显隐;不给时仍按「有内容」判定(多选类复合件没有单值可判) */
530
+ hasValue: {
531
+ type: BooleanConstructor;
532
+ default: undefined;
533
+ };
534
+ }>> & Readonly<{
535
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
536
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
537
+ 'update:modelValue': (v: string) => true;
538
+ }, import("vue").PublicProps, {
539
+ size: ControlSize;
540
+ disabled: boolean;
541
+ type: string;
542
+ onChange: (v: string) => void;
543
+ invalid: boolean;
544
+ bordered: boolean;
545
+ defaultValue: string;
546
+ placeholder: string;
547
+ autofocus: boolean;
548
+ modelValue: string;
549
+ status: InputStatus;
550
+ readonly: boolean;
551
+ clearable: boolean;
552
+ maxlength: number;
553
+ showCount: boolean;
554
+ onEnter: (v: string) => void;
555
+ as: "button" | "input";
556
+ controlClass: string;
557
+ controlAttrs: Record<string, unknown>;
558
+ hasValue: boolean;
559
+ }, true, {}, SlotsType<{
560
+ default?: () => VNodeChild;
561
+ prefix?: () => VNodeChild;
562
+ suffix?: () => VNodeChild;
563
+ }>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
564
+ P: {};
565
+ B: {};
566
+ D: {};
567
+ C: {};
568
+ M: {};
569
+ Defaults: {};
570
+ }, Readonly<import("vue").ExtractPropTypes<{
571
+ /** 受控值 */
572
+ modelValue: {
573
+ type: StringConstructor;
574
+ default: undefined;
575
+ };
576
+ /** 非受控初始值 */
577
+ defaultValue: {
578
+ type: StringConstructor;
579
+ default: string;
580
+ };
581
+ placeholder: {
582
+ type: StringConstructor;
583
+ default: undefined;
584
+ };
585
+ /** 原生 input 类型(`password` 时自动出现可见性切换) */
586
+ type: {
587
+ type: StringConstructor;
588
+ default: string;
589
+ };
590
+ /** 尺寸档(与全库 `ControlSize` 同表:24 / 28 / 32) */
591
+ size: {
592
+ type: PropType<ControlSize>;
593
+ default: string;
594
+ };
595
+ disabled: {
596
+ type: BooleanConstructor;
597
+ default: boolean;
598
+ };
599
+ readonly: {
600
+ type: BooleanConstructor;
601
+ default: boolean;
602
+ };
603
+ /** 校验态(下发 `aria-invalid`,样式走协议不看 data-*);等价于 `status="error"` */
604
+ invalid: {
605
+ type: BooleanConstructor;
606
+ default: boolean;
607
+ };
608
+ /** 校验状态(`invalid` 的显式写法;两者同时给以 `status` 为准) */
609
+ status: {
610
+ type: PropType<InputStatus>;
611
+ default: undefined;
612
+ };
613
+ /** 有内容时显示清除按钮 */
614
+ clearable: {
615
+ type: BooleanConstructor;
616
+ default: boolean;
617
+ };
618
+ /** 是否带边框;`false` 用于表格内编辑 / 行内编辑(无框、无底) */
619
+ bordered: {
620
+ type: BooleanConstructor;
621
+ default: boolean;
622
+ };
623
+ maxlength: {
624
+ type: NumberConstructor;
625
+ default: undefined;
626
+ };
627
+ /** 右侧字数统计(单行须给 `maxlength` 才有意义) */
628
+ showCount: {
629
+ type: BooleanConstructor;
630
+ default: boolean;
631
+ };
632
+ /** 自动聚焦(进页面即可输入,如搜索框) */
633
+ autofocus: {
634
+ type: BooleanConstructor;
635
+ default: boolean;
636
+ };
637
+ /** 值变更回调(每次输入都调) */
638
+ onChange: {
639
+ type: PropType<(v: string) => void>;
640
+ default: undefined;
641
+ };
642
+ /** 回车回调 */
643
+ onEnter: {
644
+ type: PropType<(v: string) => void>;
645
+ default: undefined;
646
+ };
647
+ /** 控件元素形态:`input` 文本输入(缺省)/ `button` 触发器 */
648
+ as: {
649
+ type: PropType<"input" | "button">;
650
+ default: string;
651
+ };
652
+ /** 追加到**控件元素**上的类(复合件挂自己的排版类用;本件的 `class` 仍落表壳) */
653
+ controlClass: {
654
+ type: StringConstructor;
655
+ default: undefined;
656
+ };
657
+ /** 展开到**控件元素**上的属性(触发器形态要 `popovertarget` / `aria-*` / `onKeydown` 落到控件上) */
658
+ controlAttrs: {
659
+ type: PropType<Record<string, unknown>>;
660
+ default: undefined;
661
+ };
662
+ /** 显式覆盖清除位显隐;不给时仍按「有内容」判定(多选类复合件没有单值可判) */
663
+ hasValue: {
664
+ type: BooleanConstructor;
665
+ default: undefined;
666
+ };
667
+ }>> & Readonly<{
668
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
669
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
670
+ size: ControlSize;
671
+ disabled: boolean;
672
+ type: string;
673
+ onChange: (v: string) => void;
674
+ invalid: boolean;
675
+ bordered: boolean;
676
+ defaultValue: string;
677
+ placeholder: string;
678
+ autofocus: boolean;
679
+ modelValue: string;
680
+ status: InputStatus;
681
+ readonly: boolean;
682
+ clearable: boolean;
683
+ maxlength: number;
684
+ showCount: boolean;
685
+ onEnter: (v: string) => void;
686
+ as: "button" | "input";
687
+ controlClass: string;
688
+ controlAttrs: Record<string, unknown>;
689
+ hasValue: boolean;
690
+ }>;
691
+ __isFragment?: never;
692
+ __isTeleport?: never;
693
+ __isSuspense?: never;
694
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
695
+ /** 受控值 */
696
+ modelValue: {
697
+ type: StringConstructor;
698
+ default: undefined;
699
+ };
700
+ /** 非受控初始值 */
701
+ defaultValue: {
702
+ type: StringConstructor;
703
+ default: string;
704
+ };
705
+ placeholder: {
706
+ type: StringConstructor;
707
+ default: undefined;
708
+ };
709
+ /** 原生 input 类型(`password` 时自动出现可见性切换) */
710
+ type: {
711
+ type: StringConstructor;
712
+ default: string;
713
+ };
714
+ /** 尺寸档(与全库 `ControlSize` 同表:24 / 28 / 32) */
715
+ size: {
716
+ type: PropType<ControlSize>;
717
+ default: string;
718
+ };
719
+ disabled: {
720
+ type: BooleanConstructor;
721
+ default: boolean;
722
+ };
723
+ readonly: {
724
+ type: BooleanConstructor;
725
+ default: boolean;
726
+ };
727
+ /** 校验态(下发 `aria-invalid`,样式走协议不看 data-*);等价于 `status="error"` */
728
+ invalid: {
729
+ type: BooleanConstructor;
730
+ default: boolean;
731
+ };
732
+ /** 校验状态(`invalid` 的显式写法;两者同时给以 `status` 为准) */
733
+ status: {
734
+ type: PropType<InputStatus>;
735
+ default: undefined;
736
+ };
737
+ /** 有内容时显示清除按钮 */
738
+ clearable: {
739
+ type: BooleanConstructor;
740
+ default: boolean;
741
+ };
742
+ /** 是否带边框;`false` 用于表格内编辑 / 行内编辑(无框、无底) */
743
+ bordered: {
744
+ type: BooleanConstructor;
745
+ default: boolean;
746
+ };
747
+ maxlength: {
748
+ type: NumberConstructor;
749
+ default: undefined;
750
+ };
751
+ /** 右侧字数统计(单行须给 `maxlength` 才有意义) */
752
+ showCount: {
753
+ type: BooleanConstructor;
754
+ default: boolean;
755
+ };
756
+ /** 自动聚焦(进页面即可输入,如搜索框) */
757
+ autofocus: {
758
+ type: BooleanConstructor;
759
+ default: boolean;
760
+ };
761
+ /** 值变更回调(每次输入都调) */
762
+ onChange: {
763
+ type: PropType<(v: string) => void>;
764
+ default: undefined;
765
+ };
766
+ /** 回车回调 */
767
+ onEnter: {
768
+ type: PropType<(v: string) => void>;
769
+ default: undefined;
770
+ };
771
+ /** 控件元素形态:`input` 文本输入(缺省)/ `button` 触发器 */
772
+ as: {
773
+ type: PropType<"input" | "button">;
774
+ default: string;
775
+ };
776
+ /** 追加到**控件元素**上的类(复合件挂自己的排版类用;本件的 `class` 仍落表壳) */
777
+ controlClass: {
778
+ type: StringConstructor;
779
+ default: undefined;
780
+ };
781
+ /** 展开到**控件元素**上的属性(触发器形态要 `popovertarget` / `aria-*` / `onKeydown` 落到控件上) */
782
+ controlAttrs: {
783
+ type: PropType<Record<string, unknown>>;
784
+ default: undefined;
785
+ };
786
+ /** 显式覆盖清除位显隐;不给时仍按「有内容」判定(多选类复合件没有单值可判) */
787
+ hasValue: {
788
+ type: BooleanConstructor;
789
+ default: undefined;
790
+ };
791
+ }>> & Readonly<{
792
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
793
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
794
+ 'update:modelValue': (v: string) => true;
795
+ }, string, {
796
+ size: ControlSize;
797
+ disabled: boolean;
798
+ type: string;
799
+ onChange: (v: string) => void;
800
+ invalid: boolean;
801
+ bordered: boolean;
802
+ defaultValue: string;
803
+ placeholder: string;
804
+ autofocus: boolean;
805
+ modelValue: string;
806
+ status: InputStatus;
807
+ readonly: boolean;
808
+ clearable: boolean;
809
+ maxlength: number;
810
+ showCount: boolean;
811
+ onEnter: (v: string) => void;
812
+ as: "button" | "input";
813
+ controlClass: string;
814
+ controlAttrs: Record<string, unknown>;
815
+ hasValue: boolean;
816
+ }, {}, string, SlotsType<{
817
+ default?: () => VNodeChild;
818
+ prefix?: () => VNodeChild;
819
+ suffix?: () => VNodeChild;
820
+ }>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
821
+ Textarea: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
822
+ modelValue: {
823
+ type: StringConstructor;
824
+ default: undefined;
825
+ };
826
+ defaultValue: {
827
+ type: StringConstructor;
828
+ default: string;
829
+ };
830
+ placeholder: {
831
+ type: StringConstructor;
832
+ default: undefined;
833
+ };
834
+ rows: {
835
+ type: NumberConstructor;
836
+ default: undefined;
837
+ };
838
+ autoSize: {
839
+ type: PropType<boolean | TextareaAutoSize>;
840
+ default: boolean;
841
+ };
842
+ size: {
843
+ type: PropType<ControlSize>;
844
+ default: string;
845
+ };
846
+ disabled: {
847
+ type: BooleanConstructor;
848
+ default: boolean;
849
+ };
850
+ readonly: {
851
+ type: BooleanConstructor;
852
+ default: boolean;
853
+ };
854
+ invalid: {
855
+ type: BooleanConstructor;
856
+ default: boolean;
857
+ };
858
+ status: {
859
+ type: PropType<InputStatus>;
860
+ default: undefined;
861
+ };
862
+ bordered: {
863
+ type: BooleanConstructor;
864
+ default: boolean;
865
+ };
866
+ maxlength: {
867
+ type: NumberConstructor;
868
+ default: undefined;
869
+ };
870
+ showCount: {
871
+ type: BooleanConstructor;
872
+ default: boolean;
873
+ };
874
+ autofocus: {
875
+ type: BooleanConstructor;
876
+ default: boolean;
877
+ };
878
+ onChange: {
879
+ type: PropType<(v: string) => void>;
880
+ default: undefined;
881
+ };
882
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
883
+ 'update:modelValue': (v: string) => true;
884
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
885
+ modelValue: {
886
+ type: StringConstructor;
887
+ default: undefined;
888
+ };
889
+ defaultValue: {
890
+ type: StringConstructor;
891
+ default: string;
892
+ };
893
+ placeholder: {
894
+ type: StringConstructor;
895
+ default: undefined;
896
+ };
897
+ rows: {
898
+ type: NumberConstructor;
899
+ default: undefined;
900
+ };
901
+ autoSize: {
902
+ type: PropType<boolean | TextareaAutoSize>;
903
+ default: boolean;
904
+ };
905
+ size: {
906
+ type: PropType<ControlSize>;
907
+ default: string;
908
+ };
909
+ disabled: {
910
+ type: BooleanConstructor;
911
+ default: boolean;
912
+ };
913
+ readonly: {
914
+ type: BooleanConstructor;
915
+ default: boolean;
916
+ };
917
+ invalid: {
918
+ type: BooleanConstructor;
919
+ default: boolean;
920
+ };
921
+ status: {
922
+ type: PropType<InputStatus>;
923
+ default: undefined;
924
+ };
925
+ bordered: {
926
+ type: BooleanConstructor;
927
+ default: boolean;
928
+ };
929
+ maxlength: {
930
+ type: NumberConstructor;
931
+ default: undefined;
932
+ };
933
+ showCount: {
934
+ type: BooleanConstructor;
935
+ default: boolean;
936
+ };
937
+ autofocus: {
938
+ type: BooleanConstructor;
939
+ default: boolean;
940
+ };
941
+ onChange: {
942
+ type: PropType<(v: string) => void>;
943
+ default: undefined;
944
+ };
945
+ }>> & Readonly<{
946
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
947
+ }>, {
948
+ size: ControlSize;
949
+ disabled: boolean;
950
+ onChange: (v: string) => void;
951
+ invalid: boolean;
952
+ bordered: boolean;
953
+ defaultValue: string;
954
+ placeholder: string;
955
+ rows: number;
956
+ autofocus: boolean;
957
+ modelValue: string;
958
+ status: InputStatus;
959
+ readonly: boolean;
960
+ maxlength: number;
961
+ showCount: boolean;
962
+ autoSize: boolean | TextareaAutoSize;
963
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
964
+ Display: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
965
+ value: {
966
+ type: StringConstructor;
967
+ default: string;
968
+ };
969
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
970
+ value: {
971
+ type: StringConstructor;
972
+ default: string;
973
+ };
974
+ }>> & Readonly<{}>, {
975
+ value: string;
976
+ }, SlotsType<{
977
+ default?: () => VNodeChild;
978
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
979
+ };
980
+ export type InputCompoundType = typeof InputCompound;