@mcistudio/unoui-vue 1.0.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 (187) hide show
  1. package/README.md +95 -0
  2. package/dist/alert/Alert.vue.d.ts +67 -0
  3. package/dist/alert/index.d.ts +40 -0
  4. package/dist/alert/index.js +2 -0
  5. package/dist/attrs.d.ts +11 -0
  6. package/dist/attrs.js +16 -0
  7. package/dist/attrs.js.map +1 -0
  8. package/dist/badge/Badge.vue.d.ts +57 -0
  9. package/dist/badge/BadgeRibbon.vue.d.ts +34 -0
  10. package/dist/badge/index.d.ts +42 -0
  11. package/dist/badge/index.js +2 -0
  12. package/dist/build.d.ts +2 -0
  13. package/dist/button/Button.vue.d.ts +46 -0
  14. package/dist/button/ButtonGroup.vue.d.ts +13 -0
  15. package/dist/button/index.d.ts +13 -0
  16. package/dist/button/index.js +2 -0
  17. package/dist/checkbox/Checkbox.vue.d.ts +47 -0
  18. package/dist/checkbox/CheckboxGroup.vue.d.ts +38 -0
  19. package/dist/checkbox/index.d.ts +30 -0
  20. package/dist/checkbox/index.js +2 -0
  21. package/dist/chunks/Progress-BL4KZ3HE.js +271 -0
  22. package/dist/chunks/Progress-BL4KZ3HE.js.map +1 -0
  23. package/dist/chunks/Skeleton-ohStUD4M.js +153 -0
  24. package/dist/chunks/Skeleton-ohStUD4M.js.map +1 -0
  25. package/dist/chunks/Table-DhXmuKQd.js +330 -0
  26. package/dist/chunks/Table-DhXmuKQd.js.map +1 -0
  27. package/dist/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
  28. package/dist/chunks/alert-CczW_DKs.js +190 -0
  29. package/dist/chunks/alert-CczW_DKs.js.map +1 -0
  30. package/dist/chunks/badge-BHOZeImh.js +287 -0
  31. package/dist/chunks/badge-BHOZeImh.js.map +1 -0
  32. package/dist/chunks/button-pDObrN_X.js +168 -0
  33. package/dist/chunks/button-pDObrN_X.js.map +1 -0
  34. package/dist/chunks/checkbox-9_0oR4kg.js +260 -0
  35. package/dist/chunks/checkbox-9_0oR4kg.js.map +1 -0
  36. package/dist/chunks/colorpicker-CcizUCQv.js +594 -0
  37. package/dist/chunks/colorpicker-CcizUCQv.js.map +1 -0
  38. package/dist/chunks/datepicker-Cy808x7X.js +1414 -0
  39. package/dist/chunks/datepicker-Cy808x7X.js.map +1 -0
  40. package/dist/chunks/drawer-C3JZ28Xo.js +193 -0
  41. package/dist/chunks/drawer-C3JZ28Xo.js.map +1 -0
  42. package/dist/chunks/dropdown-0l967g7D.js +329 -0
  43. package/dist/chunks/dropdown-0l967g7D.js.map +1 -0
  44. package/dist/chunks/form-Qeqkd-HH.js +642 -0
  45. package/dist/chunks/form-Qeqkd-HH.js.map +1 -0
  46. package/dist/chunks/input-BDOXVCrK.js +1281 -0
  47. package/dist/chunks/input-BDOXVCrK.js.map +1 -0
  48. package/dist/chunks/inputOtp-Dyxj9lNj.js +261 -0
  49. package/dist/chunks/inputOtp-Dyxj9lNj.js.map +1 -0
  50. package/dist/chunks/message-xPfuG0EX.js +107 -0
  51. package/dist/chunks/message-xPfuG0EX.js.map +1 -0
  52. package/dist/chunks/millercolumns-Dp3fBrq6.js +426 -0
  53. package/dist/chunks/millercolumns-Dp3fBrq6.js.map +1 -0
  54. package/dist/chunks/modal-D6l1iIvE.js +81 -0
  55. package/dist/chunks/modal-D6l1iIvE.js.map +1 -0
  56. package/dist/chunks/pagination-Bc583AQX.js +265 -0
  57. package/dist/chunks/pagination-Bc583AQX.js.map +1 -0
  58. package/dist/chunks/popconfirm-D6lUfSxG.js +343 -0
  59. package/dist/chunks/popconfirm-D6lUfSxG.js.map +1 -0
  60. package/dist/chunks/qrcode-B0t_pZna.js +1099 -0
  61. package/dist/chunks/qrcode-B0t_pZna.js.map +1 -0
  62. package/dist/chunks/radio-DnYm59xH.js +477 -0
  63. package/dist/chunks/radio-DnYm59xH.js.map +1 -0
  64. package/dist/chunks/rate-0sme__Kb.js +309 -0
  65. package/dist/chunks/rate-0sme__Kb.js.map +1 -0
  66. package/dist/chunks/select-ChTfQM5u.js +417 -0
  67. package/dist/chunks/select-ChTfQM5u.js.map +1 -0
  68. package/dist/chunks/slider-C-W5GzTP.js +724 -0
  69. package/dist/chunks/slider-C-W5GzTP.js.map +1 -0
  70. package/dist/chunks/splitter-CgfiXY65.js +524 -0
  71. package/dist/chunks/splitter-CgfiXY65.js.map +1 -0
  72. package/dist/chunks/switch-BULGbODP.js +327 -0
  73. package/dist/chunks/switch-BULGbODP.js.map +1 -0
  74. package/dist/chunks/tab-Dxfg1_To.js +663 -0
  75. package/dist/chunks/tab-Dxfg1_To.js.map +1 -0
  76. package/dist/chunks/tag-BYmNsrZC.js +167 -0
  77. package/dist/chunks/tag-BYmNsrZC.js.map +1 -0
  78. package/dist/chunks/timepicker-DsGIdcf8.js +1059 -0
  79. package/dist/chunks/timepicker-DsGIdcf8.js.map +1 -0
  80. package/dist/chunks/tooltip-DMhiAqto.js +242 -0
  81. package/dist/chunks/tooltip-DMhiAqto.js.map +1 -0
  82. package/dist/colorpicker/ColorPicker.vue.d.ts +30 -0
  83. package/dist/colorpicker/color.d.ts +56 -0
  84. package/dist/colorpicker/color.js +99 -0
  85. package/dist/colorpicker/color.js.map +1 -0
  86. package/dist/colorpicker/index.d.ts +12 -0
  87. package/dist/colorpicker/index.js +2 -0
  88. package/dist/config.d.ts +55 -0
  89. package/dist/config.js +260 -0
  90. package/dist/config.js.map +1 -0
  91. package/dist/datepicker/DatePicker.vue.d.ts +82 -0
  92. package/dist/datepicker/RangePicker.vue.d.ts +87 -0
  93. package/dist/datepicker/index.d.ts +59 -0
  94. package/dist/datepicker/index.js +2 -0
  95. package/dist/drawer/Drawer.vue.d.ts +86 -0
  96. package/dist/drawer/index.d.ts +23 -0
  97. package/dist/drawer/index.js +2 -0
  98. package/dist/dropdown/Dropdown.vue.d.ts +118 -0
  99. package/dist/dropdown/index.d.ts +2 -0
  100. package/dist/dropdown/index.js +2 -0
  101. package/dist/form/Form.vue.d.ts +170 -0
  102. package/dist/form/FormItem.vue.d.ts +83 -0
  103. package/dist/form/index.d.ts +176 -0
  104. package/dist/form/index.js +2 -0
  105. package/dist/index.d.ts +31 -0
  106. package/dist/index.js +32 -0
  107. package/dist/input/Autocomplete.vue.d.ts +121 -0
  108. package/dist/input/Input.vue.d.ts +142 -0
  109. package/dist/input/InputI18n.vue.d.ts +80 -0
  110. package/dist/input/InputTag.vue.d.ts +114 -0
  111. package/dist/input/index.d.ts +41 -0
  112. package/dist/input/index.js +2 -0
  113. package/dist/inputOtp/InputOtp.vue.d.ts +60 -0
  114. package/dist/inputOtp/index.d.ts +21 -0
  115. package/dist/inputOtp/index.js +2 -0
  116. package/dist/message/MessageContainer.vue.d.ts +11 -0
  117. package/dist/message/index.d.ts +20 -0
  118. package/dist/message/index.js +2 -0
  119. package/dist/message/types.d.ts +25 -0
  120. package/dist/millercolumns/MillerColumns.vue.d.ts +88 -0
  121. package/dist/millercolumns/index.d.ts +39 -0
  122. package/dist/millercolumns/index.js +2 -0
  123. package/dist/modal/Modal.vue.d.ts +54 -0
  124. package/dist/modal/index.d.ts +2 -0
  125. package/dist/modal/index.js +2 -0
  126. package/dist/pagination/Pagination.vue.d.ts +70 -0
  127. package/dist/pagination/index.d.ts +12 -0
  128. package/dist/pagination/index.js +2 -0
  129. package/dist/popconfirm/Popconfirm.vue.d.ts +104 -0
  130. package/dist/popconfirm/index.d.ts +36 -0
  131. package/dist/popconfirm/index.js +2 -0
  132. package/dist/progress/Progress.vue.d.ts +64 -0
  133. package/dist/progress/index.d.ts +26 -0
  134. package/dist/progress/index.js +2 -0
  135. package/dist/qrcode/QRCode.vue.d.ts +87 -0
  136. package/dist/qrcode/index.d.ts +43 -0
  137. package/dist/qrcode/index.js +2 -0
  138. package/dist/qrcode/qr.d.ts +51 -0
  139. package/dist/qrcode/qrcodegen.d.ts +94 -0
  140. package/dist/radio/Radio.vue.d.ts +52 -0
  141. package/dist/radio/RadioGroup.vue.d.ts +44 -0
  142. package/dist/radio/index.d.ts +55 -0
  143. package/dist/radio/index.js +2 -0
  144. package/dist/rate/Rate.vue.d.ts +100 -0
  145. package/dist/rate/index.d.ts +38 -0
  146. package/dist/rate/index.js +2 -0
  147. package/dist/select/Select.vue.d.ts +129 -0
  148. package/dist/select/index.d.ts +33 -0
  149. package/dist/select/index.js +2 -0
  150. package/dist/skeleton/Skeleton.vue.d.ts +31 -0
  151. package/dist/skeleton/index.d.ts +2 -0
  152. package/dist/skeleton/index.js +2 -0
  153. package/dist/slider/Slider.vue.d.ts +81 -0
  154. package/dist/slider/index.d.ts +61 -0
  155. package/dist/slider/index.js +2 -0
  156. package/dist/splitter/Splitter.vue.d.ts +63 -0
  157. package/dist/splitter/SplitterPanel.vue.d.ts +53 -0
  158. package/dist/splitter/index.d.ts +39 -0
  159. package/dist/splitter/index.js +2 -0
  160. package/dist/style.css +2 -0
  161. package/dist/switch/Switch.vue.d.ts +97 -0
  162. package/dist/switch/index.d.ts +31 -0
  163. package/dist/switch/index.js +2 -0
  164. package/dist/tab/TabPane.vue.d.ts +32 -0
  165. package/dist/tab/Tabs.vue.d.ts +87 -0
  166. package/dist/tab/index.d.ts +78 -0
  167. package/dist/tab/index.js +2 -0
  168. package/dist/table/Table.vue.d.ts +96 -0
  169. package/dist/table/index.d.ts +3 -0
  170. package/dist/table/index.js +2 -0
  171. package/dist/table/types.d.ts +35 -0
  172. package/dist/table/types.js +0 -0
  173. package/dist/tag/Tag.vue.d.ts +46 -0
  174. package/dist/tag/index.d.ts +11 -0
  175. package/dist/tag/index.js +2 -0
  176. package/dist/timepicker/TimePicker.vue.d.ts +92 -0
  177. package/dist/timepicker/TimeRangePicker.vue.d.ts +90 -0
  178. package/dist/timepicker/index.d.ts +39 -0
  179. package/dist/timepicker/index.js +2 -0
  180. package/dist/tooltip/Tooltip.vue.d.ts +79 -0
  181. package/dist/tooltip/index.d.ts +14 -0
  182. package/dist/tooltip/index.js +2 -0
  183. package/dist/uno.d.ts +32 -0
  184. package/dist/uno.js +83 -0
  185. package/dist/uno.js.map +1 -0
  186. package/dist/utils/DnD.d.ts +38 -0
  187. package/package.json +115 -0
@@ -0,0 +1,83 @@
1
+ import type { ValidateOption } from 'async-validator';
2
+ import { type FormItemRule, type FormLabelPosition, type FormProp, type FormSize, type FormValidateStatus, type FormValidateTrigger } from '.';
3
+ type __VLS_Props = {
4
+ /** prop 是 model 字段路径,支持 a.b 或路径数组。 */
5
+ prop?: FormProp;
6
+ /** label 是字段标签文本,可选。 */
7
+ label?: string;
8
+ /** info 是显示在 label 旁的信息提示内容。 */
9
+ info?: string;
10
+ /** rules 是字段局部规则,会与 Form.rules[prop] 合并。 */
11
+ rules?: FormItemRule;
12
+ /** required 可单独控制必填星号;未设置时从规则推导。 */
13
+ required?: boolean;
14
+ /** error 是外部传入的错误消息,会覆盖内部校验结果。 */
15
+ error?: string;
16
+ /** validateStatus 是外部传入的校验状态。 */
17
+ validateStatus?: FormValidateStatus;
18
+ /** showMessage 是否显示本字段错误消息,默认继承 Form。 */
19
+ showMessage?: boolean;
20
+ /** validateTrigger 覆盖 Form 的自动校验时机;空数组表示仅显式校验。 */
21
+ validateTrigger?: FormValidateTrigger | FormValidateTrigger[];
22
+ /** labelWidth 覆盖 Form.labelWidth。 */
23
+ labelWidth?: string | number;
24
+ /** reserveLabelSpace 控制无 label 时是否保留标签列,默认继承 Form。 */
25
+ reserveLabelSpace?: boolean;
26
+ /** labelPosition 覆盖 Form.labelPosition。 */
27
+ labelPosition?: FormLabelPosition;
28
+ /** size 覆盖 Form.size。 */
29
+ size?: FormSize;
30
+ };
31
+ declare function validate(trigger?: FormValidateTrigger, options?: ValidateOption): Promise<{
32
+ valid: true;
33
+ errors?: undefined;
34
+ } | {
35
+ valid: false;
36
+ errors: import("async-validator").ValidateError[];
37
+ } | {
38
+ valid: boolean;
39
+ }>;
40
+ declare function resetField(): void;
41
+ declare function clearValidate(): void;
42
+ declare var __VLS_1: {
43
+ label: string;
44
+ }, __VLS_10: {}, __VLS_17: {
45
+ error: string;
46
+ validateState: FormValidateStatus;
47
+ };
48
+ type __VLS_Slots = {} & {
49
+ label?: (props: typeof __VLS_1) => any;
50
+ } & {
51
+ info?: (props: typeof __VLS_10) => any;
52
+ } & {
53
+ error?: (props: typeof __VLS_17) => any;
54
+ };
55
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
56
+ validate: typeof validate;
57
+ resetField: typeof resetField;
58
+ clearValidate: typeof clearValidate;
59
+ validateState: import("vue").Ref<FormValidateStatus, FormValidateStatus>;
60
+ validateMessage: import("vue").Ref<string, string>;
61
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
62
+ info: string;
63
+ error: string;
64
+ label: string;
65
+ size: FormSize;
66
+ required: boolean;
67
+ rules: FormItemRule;
68
+ labelPosition: FormLabelPosition;
69
+ labelWidth: string | number;
70
+ reserveLabelSpace: boolean;
71
+ showMessage: boolean;
72
+ validateTrigger: FormValidateTrigger | FormValidateTrigger[];
73
+ prop: FormProp;
74
+ validateStatus: FormValidateStatus;
75
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
76
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
77
+ declare const _default: typeof __VLS_export;
78
+ export default _default;
79
+ type __VLS_WithSlots<T, S> = T & {
80
+ new (): {
81
+ $slots: S;
82
+ };
83
+ };
@@ -0,0 +1,176 @@
1
+ import type { RuleItem, ValidateError, ValidateFieldsError, ValidateMessages, ValidateOption, Values } from "async-validator";
2
+ import type { VariantProps } from "class-variance-authority";
3
+ import type { InjectionKey, Ref } from "vue";
4
+ export { default as Form } from "./Form.vue";
5
+ export { default as FormItem } from "./FormItem.vue";
6
+ export type FormLabelPosition = "left" | "right" | "top";
7
+ export type FormSize = "sm" | "md" | "lg";
8
+ export type FormValidateStatus = "" | "validating" | "success" | "error";
9
+ export type FormValidateTrigger = "blur" | "change" | (string & {});
10
+ export type FormProp = string | string[];
11
+ export type FormRulePreset = keyof typeof formValidatorPatterns;
12
+ export interface FormRule extends RuleItem {
13
+ trigger?: FormValidateTrigger | FormValidateTrigger[];
14
+ preset?: FormRulePreset;
15
+ }
16
+ export type FormItemRule = FormRule | FormRule[];
17
+ export type FormRules<T extends Values = Values> = Partial<Record<keyof T | string, FormItemRule>>;
18
+ export type FormValidateCallback = (valid: boolean, invalidFields?: ValidateFieldsError) => void | Promise<void>;
19
+ export interface FormItemValidateResult {
20
+ valid: boolean;
21
+ errors?: ValidateError[];
22
+ }
23
+ export interface FormItemContext {
24
+ prop?: FormProp;
25
+ validateState: Ref<FormValidateStatus>;
26
+ validateMessage: Ref<string>;
27
+ validate: (trigger?: FormValidateTrigger, options?: ValidateOption) => Promise<FormItemValidateResult>;
28
+ resetField: () => void;
29
+ clearValidate: () => void;
30
+ isRequired: Ref<boolean>;
31
+ }
32
+ export interface FormContext {
33
+ model?: Values;
34
+ rules?: FormRules;
35
+ size: Ref<FormSize>;
36
+ disabled: Ref<boolean>;
37
+ inline: Ref<boolean>;
38
+ labelPosition: Ref<FormLabelPosition>;
39
+ labelWidth: Ref<string | number>;
40
+ reserveLabelSpace: Ref<boolean>;
41
+ itemGap: Ref<string | number>;
42
+ showMessage: Ref<boolean>;
43
+ validateTrigger: Ref<FormValidateTrigger | FormValidateTrigger[]>;
44
+ requireAsteriskPosition: Ref<"left" | "right">;
45
+ hideRequiredAsterisk: Ref<boolean>;
46
+ validateOnRuleChange: Ref<boolean>;
47
+ registerField: (field: FormItemContext) => void;
48
+ unregisterField: (field: FormItemContext) => void;
49
+ getFieldRules: (prop?: FormProp, localRules?: FormItemRule) => FormRule[];
50
+ getFieldValue: (prop?: FormProp) => unknown;
51
+ setFieldValue: (prop: FormProp | undefined, value: unknown) => void;
52
+ validateField: (props?: FormProp | FormProp[], callback?: FormValidateCallback) => Promise<boolean>;
53
+ clearValidate: (props?: FormProp | FormProp[]) => void;
54
+ resetFields: (props?: FormProp | FormProp[]) => void;
55
+ emitValidate: (prop: FormProp | undefined, valid: boolean, message: string) => void;
56
+ }
57
+ export interface FormValidationPreset {
58
+ pattern: RegExp;
59
+ message: string;
60
+ }
61
+ export declare const formContextKey: InjectionKey<FormContext>;
62
+ /** formValidatorPatterns 提供管理端表单常用正则,业务规则可通过 preset 直接复用。 */
63
+ export declare const formValidatorPatterns: {
64
+ email: {
65
+ pattern: RegExp;
66
+ message: string;
67
+ };
68
+ phoneCN: {
69
+ pattern: RegExp;
70
+ message: string;
71
+ };
72
+ url: {
73
+ pattern: RegExp;
74
+ message: string;
75
+ };
76
+ ipv4: {
77
+ pattern: RegExp;
78
+ message: string;
79
+ };
80
+ idCardCN: {
81
+ pattern: RegExp;
82
+ message: string;
83
+ };
84
+ postalCodeCN: {
85
+ pattern: RegExp;
86
+ message: string;
87
+ };
88
+ integer: {
89
+ pattern: RegExp;
90
+ message: string;
91
+ };
92
+ positiveInteger: {
93
+ pattern: RegExp;
94
+ message: string;
95
+ };
96
+ number: {
97
+ pattern: RegExp;
98
+ message: string;
99
+ };
100
+ decimal2: {
101
+ pattern: RegExp;
102
+ message: string;
103
+ };
104
+ alpha: {
105
+ pattern: RegExp;
106
+ message: string;
107
+ };
108
+ alphaNum: {
109
+ pattern: RegExp;
110
+ message: string;
111
+ };
112
+ projectId: {
113
+ pattern: RegExp;
114
+ message: string;
115
+ };
116
+ slug: {
117
+ pattern: RegExp;
118
+ message: string;
119
+ };
120
+ hexColor: {
121
+ pattern: RegExp;
122
+ message: string;
123
+ };
124
+ chinese: {
125
+ pattern: RegExp;
126
+ message: string;
127
+ };
128
+ password: {
129
+ pattern: RegExp;
130
+ message: string;
131
+ };
132
+ };
133
+ /** createFormRule 让调用方用内置 preset 快速构造 async-validator 规则。 */
134
+ export declare function createFormRule(preset: FormRulePreset, rule?: Omit<FormRule, "preset" | "pattern">): FormRule;
135
+ export declare function normalizeFormProp(prop?: FormProp): string | undefined;
136
+ export declare function getValueByPath(source: Values | undefined, prop?: FormProp): unknown;
137
+ export declare function setValueByPath(source: Values | undefined, prop: FormProp | undefined, value: unknown): void;
138
+ export declare function normalizeRules(rules?: FormItemRule): FormRule[];
139
+ export declare function validateFormValue(prop: FormProp | undefined, value: unknown, rules: FormRule[], options?: ValidateOption): Promise<{
140
+ valid: true;
141
+ errors?: undefined;
142
+ } | {
143
+ valid: false;
144
+ errors: ValidateError[];
145
+ }>;
146
+ export declare const defaultFormValidateMessages: ValidateMessages;
147
+ /** formRoot 定义 Form 根布局,支持标准、inline 两种模式。 */
148
+ export declare const formRoot: (props?: ({
149
+ inline?: boolean | null | undefined;
150
+ size?: "sm" | "md" | "lg" | null | undefined;
151
+ disabled?: boolean | null | undefined;
152
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
153
+ /** formItem 定义 FormItem 的整体排版和字段间距,确保嵌套网格内也有稳定行距。 */
154
+ export declare const formItem: (props?: ({
155
+ inline?: boolean | null | undefined;
156
+ labelPosition?: "left" | "right" | "top" | null | undefined;
157
+ size?: "sm" | "md" | "lg" | null | undefined;
158
+ error?: boolean | null | undefined;
159
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
160
+ /** formItemLabel 定义 FormItem 标签对齐、尺寸和必填标识样式。 */
161
+ export declare const formItemLabel: (props?: ({
162
+ labelPosition?: "left" | "right" | "top" | null | undefined;
163
+ size?: "sm" | "md" | "lg" | null | undefined;
164
+ required?: boolean | null | undefined;
165
+ requiredPosition?: "left" | "right" | null | undefined;
166
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
167
+ /** formItemContent 定义控件区与错误提示布局。 */
168
+ export declare const formItemContent: (props?: ({
169
+ labelPosition?: "left" | "right" | "top" | null | undefined;
170
+ size?: "sm" | "md" | "lg" | null | undefined;
171
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
172
+ /** formItemMessage 定义 FormItem 校验提示视觉。 */
173
+ export declare const formItemMessage: (props?: ({
174
+ status?: "" | "success" | "error" | "validating" | null | undefined;
175
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
176
+ export type FormProps = VariantProps<typeof formRoot>;
@@ -0,0 +1,2 @@
1
+ import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "../chunks/form-Qeqkd-HH.js";
2
+ export { i as Form, a as FormItem, m as createFormRule, l as defaultFormValidateMessages, f as formContextKey, o as formItem, e as formItemContent, u as formItemLabel, p as formItemMessage, t as formRoot, s as formValidatorPatterns, h as getValueByPath, n as normalizeFormProp, r as normalizeRules, d as setValueByPath, c as validateFormValue };
@@ -0,0 +1,31 @@
1
+ export * from './alert';
2
+ export * from './badge';
3
+ export * from './button';
4
+ export * from './checkbox';
5
+ export * from './colorpicker';
6
+ export * from './config';
7
+ export * from './datepicker';
8
+ export * from './drawer';
9
+ export * from './dropdown';
10
+ export * from './form';
11
+ export * from './input';
12
+ export * from './inputOtp';
13
+ export * from './message';
14
+ export * from './millercolumns';
15
+ export * from './modal';
16
+ export * from './pagination';
17
+ export * from './popconfirm';
18
+ export * from './progress';
19
+ export * from './qrcode';
20
+ export * from './radio';
21
+ export * from './rate';
22
+ export * from './select';
23
+ export * from './skeleton';
24
+ export * from './slider';
25
+ export * from './splitter';
26
+ export * from './switch';
27
+ export * from './tab';
28
+ export * from './table';
29
+ export * from './tag';
30
+ export * from './timepicker';
31
+ export * from './tooltip';
package/dist/index.js ADDED
@@ -0,0 +1,32 @@
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./chunks/alert-CczW_DKs.js";
2
+ import { a as c, c as l, i as u, n as d, o as f, r as p, s as m, t as h } from "./chunks/badge-BHOZeImh.js";
3
+ import { n as g, r as _, t as v } from "./chunks/button-pDObrN_X.js";
4
+ import { a as y, i as b, n as x, r as S, t as C } from "./chunks/checkbox-9_0oR4kg.js";
5
+ import { n as w, t as T } from "./chunks/colorpicker-CcizUCQv.js";
6
+ import { DEFAULT_RTL_LANGUAGES as E, DEFAULT_UNOUI_LANGUAGES as D, DEFAULT_UNOUI_LOCALE as O, configureUnoUI as k, getUnoUILanguageOption as A, normalizeUnoUILanguages as j, normalizeUnoUILocaleKey as M, useUnoUIConfig as N } from "./config.js";
7
+ import { t as P } from "./chunks/dropdown-0l967g7D.js";
8
+ import { a as F, c as I, i as L, n as R, o as z, r as B, s as V, t as H } from "./chunks/datepicker-Cy808x7X.js";
9
+ import { n as U, r as W, t as G } from "./chunks/drawer-C3JZ28Xo.js";
10
+ import { a as K, c as q, d as J, f as Y, g as X, h as Z, i as Q, l as $, m as ee, n as te, o as ne, p as re, r as ie, s as ae, t as oe, u as se } from "./chunks/form-Qeqkd-HH.js";
11
+ import { n as ce, r as le, t as ue } from "./chunks/tooltip-DMhiAqto.js";
12
+ import { a as de, c as fe, i as pe, n as me, o as he, r as ge, s as _e, t as ve } from "./chunks/input-BDOXVCrK.js";
13
+ import { t as ye } from "./chunks/modal-D6l1iIvE.js";
14
+ import { n as be, t as xe } from "./chunks/tag-BYmNsrZC.js";
15
+ import { i as Se, n as Ce, r as we, t as Te } from "./chunks/inputOtp-Dyxj9lNj.js";
16
+ import { n as Ee, r as De, t as Oe } from "./chunks/message-xPfuG0EX.js";
17
+ import { a as ke, c as Ae, i as je, n as Me, o as Ne, r as Pe, s as Fe, t as Ie } from "./chunks/millercolumns-Dp3fBrq6.js";
18
+ import { i as Le, n as Re, r as ze, t as Be } from "./chunks/select-ChTfQM5u.js";
19
+ import { n as Ve, t as He } from "./chunks/pagination-Bc583AQX.js";
20
+ import { a as Ue, c as We, i as Ge, n as Ke, o as qe, r as Je, s as Ye, t as Xe } from "./chunks/popconfirm-D6lUfSxG.js";
21
+ import { t as Ze } from "./chunks/Progress-BL4KZ3HE.js";
22
+ import { a as Qe, i as $e, n as et, o as tt, r as nt, s as rt, t as it } from "./chunks/qrcode-B0t_pZna.js";
23
+ import { a as at, c as ot, i as st, n as ct, o as lt, r as ut, s as dt, t as ft } from "./chunks/radio-DnYm59xH.js";
24
+ import { a as pt, i as mt, n as ht, o as gt, r as _t, t as vt } from "./chunks/rate-0sme__Kb.js";
25
+ import { t as yt } from "./chunks/Skeleton-ohStUD4M.js";
26
+ import { a as bt, i as xt, n as St, o as Ct, r as wt, s as Tt, t as Et } from "./chunks/slider-C-W5GzTP.js";
27
+ import { a as Dt, i as Ot, n as kt, o as At, r as jt, s as Mt, t as Nt } from "./chunks/splitter-CgfiXY65.js";
28
+ import { a as Pt, i as Ft, n as It, o as Lt, r as Rt, t as zt } from "./chunks/switch-BULGbODP.js";
29
+ import { a as Bt, c as Vt, i as Ht, l as Ut, n as Wt, o as Gt, r as Kt, s as qt, t as Jt, u as Yt } from "./chunks/tab-Dxfg1_To.js";
30
+ import { t as Xt } from "./chunks/Table-DhXmuKQd.js";
31
+ import { a as Zt, i as Qt, n as $t, r as en, t as tn } from "./chunks/timepicker-DsGIdcf8.js";
32
+ export { t as Alert, _e as Autocomplete, l as Badge, m as BadgeRibbon, _ as Button, g as ButtonGroup, y as Checkbox, b as CheckboxGroup, w as ColorPicker, E as DEFAULT_RTL_LANGUAGES, D as DEFAULT_UNOUI_LANGUAGES, O as DEFAULT_UNOUI_LOCALE, I as DatePicker, W as Drawer, P as Dropdown, X as Form, Z as FormItem, fe as Input, he as InputI18n, Se as InputOtp, de as InputTag, Oe as Message, De as MessageContainer, Ae as MillerColumns, ye as Modal, Ve as Pagination, We as Popconfirm, Ze as Progress, rt as QRCode, ot as Radio, dt as RadioGroup, V as RangePicker, gt as Rate, Le as Select, yt as Skeleton, Tt as Slider, At as Splitter, Mt as SplitterPanel, Lt as Switch, Yt as TabPane, Xt as Table, Ut as Tabs, be as Tag, Zt as TimePicker, Qt as TimeRangePicker, le as Tooltip, s as alertActions, r as alertCloseButton, a as alertDescription, n as alertIcon, e as alertRoot, i as alertSection, o as alertTitle, h as badgeIndicator, d as badgeRibbonFold, p as badgeRibbonIndicator, u as badgeRibbonRoot, c as badgeRoot, f as badgeStatusText, v as button, C as checkbox, x as checkboxGroup, S as checkboxGroupContextKey, T as colorPickerTrigger, k as configureUnoUI, oe as createFormRule, H as datePickerCell, R as datePickerPanelCell, B as datePickerRangeCell, L as datePickerTimeOption, F as datePickerValue, z as datePickerWrapper, te as defaultFormValidateMessages, G as drawerContextKey, U as drawerPanel, ie as formContextKey, Q as formItem, K as formItemContent, ne as formItemLabel, ae as formItemMessage, q as formRoot, $ as formValidatorPatterns, A as getUnoUILanguageOption, se as getValueByPath, ve as inputAddon, me as inputControl, ge as inputGroup, Te as inputOtpCell, Ce as inputOtpGroup, we as inputOtpRoot, pe as inputWrapper, Ee as message, Ie as millerColumnsColumn, Me as millerColumnsEmpty, Pe as millerColumnsHeader, je as millerColumnsInfoPanel, ke as millerColumnsRoot, Ne as millerColumnsRow, Fe as millerColumnsRows, J as normalizeFormProp, Y as normalizeRules, j as normalizeUnoUILanguages, M as normalizeUnoUILocaleKey, He as paginationPagerButton, Xe as popconfirmActions, Ke as popconfirmArrow, Je as popconfirmContainer, Ge as popconfirmContent, Ue as popconfirmIcon, qe as popconfirmRoot, Ye as popconfirmTitle, it as qrcodeCode, et as qrcodeMask, nt as qrcodeRefreshButton, $e as qrcodeRoot, Qe as qrcodeStatus, tt as qrcodeStatusIcon, ft as radio, ct as radioButton, ut as radioDot, st as radioGroup, at as radioGroupContextKey, lt as radioLabel, vt as rateActiveLayer, ht as rateCharacter, _t as rateCharacterLayer, mt as rateItem, pt as rateRoot, Be as selectInner, Re as selectOption, ze as selectWrapper, re as setValueByPath, Et as sliderDot, St as sliderHandle, wt as sliderMarkLabel, xt as sliderRail, bt as sliderRoot, Ct as sliderTrack, Nt as splitterBar, kt as splitterDragger, jt as splitterLine, Ot as splitterPanel, Dt as splitterRoot, zt as switchAction, It as switchLabel, Rt as switchPrompt, Ft as switchTrack, Pt as switchWrapper, Jt as tabAddButton, Wt as tabPanel, Kt as tabTrigger, Ht as tabsContent, Bt as tabsContextKey, Gt as tabsHeader, qt as tabsNav, Vt as tabsRoot, xe as tag, tn as timePickerOption, $t as timePickerValue, en as timePickerWrapper, ue as tooltipArrow, ce as tooltipRoot, N as useUnoUIConfig, ee as validateFormValue };
@@ -0,0 +1,121 @@
1
+ import type { AutocompleteDataSource, AutocompleteSuggestion, InputProps } from '.';
2
+ type AutocompleteModelValue = string | number;
3
+ type __VLS_Props = {
4
+ /** modelValue 是 v-model 绑定值。 */
5
+ modelValue?: AutocompleteModelValue;
6
+ /** dataSource 是自动补全建议源,可传静态数组或远程查询函数。 */
7
+ dataSource: AutocompleteDataSource;
8
+ /** valueKey 是从建议项读取展示值的字段名。 */
9
+ valueKey?: string;
10
+ /** triggerOnFocus 表示聚焦时是否立即触发建议查询。 */
11
+ triggerOnFocus?: boolean;
12
+ /** debounce 是自动补全查询防抖时间,单位毫秒。 */
13
+ debounce?: number;
14
+ /** size 是输入框尺寸,可选,默认 md,并与 Input 对齐。 */
15
+ size?: InputProps['size'];
16
+ /** disabled 表示是否禁用输入和交互。 */
17
+ disabled?: boolean;
18
+ /** readonly 是原生 readonly,可选。 */
19
+ readonly?: boolean;
20
+ /** placeholder 是原生占位文案。 */
21
+ placeholder?: string;
22
+ /** prefixIcon 是输入区前缀图标类名。 */
23
+ prefixIcon?: string;
24
+ /** suffixIcon 是输入区后缀图标类名。 */
25
+ suffixIcon?: string;
26
+ /** prefix 是输入区前缀文字;复杂内容请使用 prefix slot。 */
27
+ prefix?: string;
28
+ /** suffix 是输入区后缀文字;复杂内容请使用 suffix slot。 */
29
+ suffix?: string;
30
+ /** clearable 表示是否显示一键清空按钮。 */
31
+ clearable?: boolean;
32
+ /** clearIcon 是清空按钮自定义图标类名。 */
33
+ clearIcon?: string;
34
+ /** name 是原生 name。 */
35
+ name?: string;
36
+ /** autocomplete 是原生 autocomplete 属性。 */
37
+ autocomplete?: string;
38
+ /** teleportedWidth 是下拉层固定宽度,默认跟随输入框宽度。 */
39
+ teleportedWidth?: string;
40
+ /** maxHeight 是自动补全下拉滚动区域最大高度。 */
41
+ maxHeight?: string;
42
+ /** hideLoading 表示远程查询中是否隐藏加载状态文案。 */
43
+ hideLoading?: boolean;
44
+ /** selectWhenUnmatched 表示回车时无匹配建议也提交当前输入值。 */
45
+ selectWhenUnmatched?: boolean;
46
+ /** noDataText 是自动补全无数据文案。 */
47
+ noDataText?: string;
48
+ /** loadingText 是自动补全加载文案。 */
49
+ loadingText?: string;
50
+ };
51
+ declare var __VLS_28: {}, __VLS_31: {}, __VLS_34: {}, __VLS_37: {}, __VLS_40: {
52
+ item: object & {
53
+ disabled?: boolean;
54
+ };
55
+ };
56
+ type __VLS_Slots = {} & {
57
+ prepend?: (props: typeof __VLS_28) => any;
58
+ } & {
59
+ append?: (props: typeof __VLS_31) => any;
60
+ } & {
61
+ prefix?: (props: typeof __VLS_34) => any;
62
+ } & {
63
+ suffix?: (props: typeof __VLS_37) => any;
64
+ } & {
65
+ suggestion?: (props: typeof __VLS_40) => any;
66
+ };
67
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
68
+ blur: () => void | undefined;
69
+ clear: () => void | undefined;
70
+ focus: () => void | undefined;
71
+ select: () => void | undefined;
72
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
73
+ input: (value: AutocompleteModelValue, event: Event) => any;
74
+ select: (item: AutocompleteSuggestion) => any;
75
+ clear: () => any;
76
+ change: (value: AutocompleteModelValue, event: Event) => any;
77
+ focus: (event: FocusEvent) => any;
78
+ blur: (event: FocusEvent) => any;
79
+ "update:modelValue": (value: AutocompleteModelValue) => any;
80
+ keydown: (event: KeyboardEvent) => any;
81
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
82
+ onInput?: ((value: AutocompleteModelValue, event: Event) => any) | undefined;
83
+ onSelect?: ((item: AutocompleteSuggestion) => any) | undefined;
84
+ onClear?: (() => any) | undefined;
85
+ onChange?: ((value: AutocompleteModelValue, event: Event) => any) | undefined;
86
+ onFocus?: ((event: FocusEvent) => any) | undefined;
87
+ onBlur?: ((event: FocusEvent) => any) | undefined;
88
+ "onUpdate:modelValue"?: ((value: AutocompleteModelValue) => any) | undefined;
89
+ onKeydown?: ((event: KeyboardEvent) => any) | undefined;
90
+ }>, {
91
+ size: "sm" | "md" | "lg" | null;
92
+ disabled: boolean;
93
+ name: string;
94
+ modelValue: AutocompleteModelValue;
95
+ maxHeight: string;
96
+ valueKey: string;
97
+ placeholder: string;
98
+ clearable: boolean;
99
+ suffixIcon: string;
100
+ clearIcon: string;
101
+ teleportedWidth: string;
102
+ prefixIcon: string;
103
+ prefix: string;
104
+ suffix: string;
105
+ autocomplete: string;
106
+ readonly: boolean;
107
+ triggerOnFocus: boolean;
108
+ debounce: number;
109
+ hideLoading: boolean;
110
+ selectWhenUnmatched: boolean;
111
+ noDataText: string;
112
+ loadingText: string;
113
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
114
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
115
+ declare const _default: typeof __VLS_export;
116
+ export default _default;
117
+ type __VLS_WithSlots<T, S> = T & {
118
+ new (): {
119
+ $slots: S;
120
+ };
121
+ };
@@ -0,0 +1,142 @@
1
+ import { type InputProps } from '.';
2
+ type InputModelValue = string | number;
3
+ type NativeInputType = 'text' | 'password' | 'search' | 'email' | 'url' | 'tel' | 'number';
4
+ type __VLS_Props = {
5
+ /** modelValue 是 v-model 绑定值,可选。 */
6
+ modelValue?: InputModelValue;
7
+ /** type 是原生 input 类型,可选,默认 text;textarea 会忽略该属性。 */
8
+ type?: NativeInputType;
9
+ /** size 是输入框尺寸,可选,默认 md,并与 Button 的 sm/md/lg 高度对齐。 */
10
+ size?: InputProps['size'];
11
+ /** disabled 表示是否禁用输入和交互,可选,默认 false。 */
12
+ disabled?: boolean;
13
+ /** placeholder 是原生占位文案,可选。 */
14
+ placeholder?: string;
15
+ /** prefixIcon 是输入区前缀图标类名,可选。 */
16
+ prefixIcon?: string;
17
+ /** suffixIcon 是输入区后缀图标类名,可选。 */
18
+ suffixIcon?: string;
19
+ /** prefix 是输入区前缀文字,可选;复杂内容请使用 prefix slot。 */
20
+ prefix?: string;
21
+ /** suffix 是输入区后缀文字,可选;复杂内容请使用 suffix slot。 */
22
+ suffix?: string;
23
+ /** password 表示是否启用密码显示/隐藏按钮,可选,默认 false。 */
24
+ password?: boolean;
25
+ /** showPassword 兼容 Element Plus 的 show-password 命名,可选,默认 false。 */
26
+ showPassword?: boolean;
27
+ /** clearable 表示是否显示一键清空按钮,可选,默认 false。 */
28
+ clearable?: boolean;
29
+ /** clearIcon 是清空按钮自定义图标类名,可选,默认 lucide:x。 */
30
+ clearIcon?: string;
31
+ /** rows 是多行输入行数,可选;存在时自动渲染 textarea。 */
32
+ rows?: number;
33
+ /** multiline 表示是否渲染 textarea,可选,默认 false。 */
34
+ multiline?: boolean;
35
+ /** maxlength 是最大输入字数,可选。 */
36
+ maxlength?: number;
37
+ /** showWordLimit 表示是否展示字数统计,可选,默认 false。 */
38
+ showWordLimit?: boolean;
39
+ /** formatter 在展示时格式化输入值,可选;提交值会通过 parser 还原。 */
40
+ formatter?: (value: string) => string;
41
+ /** parser 将格式化展示值还原为提交值,可选。 */
42
+ parser?: (value: string) => string;
43
+ /** precision 是 number 输入的小数精度,可选。 */
44
+ precision?: number;
45
+ /** step 是 number 输入和拖拽步长,可选,默认 1。 */
46
+ step?: number | string;
47
+ /** min 是 number 输入最小值,可选。 */
48
+ min?: number | string;
49
+ /** max 是 number 输入最大值,可选。 */
50
+ max?: number | string;
51
+ /** draggable 表示 number 输入是否支持左右拖拽改值,可选,默认 false。 */
52
+ draggable?: boolean;
53
+ /** dragIcon 是 number 拖拽手柄图标类名,可选。 */
54
+ dragIcon?: string;
55
+ /** dragStep 是拖拽每像素变化值,可选;默认使用 step。 */
56
+ dragStep?: number;
57
+ /** name 是原生 name,可选。 */
58
+ name?: string;
59
+ /** autocomplete 是原生 autocomplete,可选。 */
60
+ autocomplete?: string;
61
+ /** readonly 是原生 readonly,可选,默认 false。 */
62
+ readonly?: boolean;
63
+ /** modelModifiers 接收 v-model.trim / v-model.number 修饰符。 */
64
+ modelModifiers?: {
65
+ trim?: boolean;
66
+ number?: boolean;
67
+ };
68
+ };
69
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
70
+ type __VLS_Slots = {} & {
71
+ prepend?: (props: typeof __VLS_1) => any;
72
+ } & {
73
+ prefix?: (props: typeof __VLS_3) => any;
74
+ } & {
75
+ suffix?: (props: typeof __VLS_5) => any;
76
+ } & {
77
+ append?: (props: typeof __VLS_7) => any;
78
+ };
79
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
80
+ blur: () => void | undefined;
81
+ clear: () => void;
82
+ focus: () => void | undefined;
83
+ select: () => void | undefined;
84
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
85
+ input: (value: InputModelValue, event: Event) => any;
86
+ clear: () => any;
87
+ change: (value: InputModelValue, event: Event) => any;
88
+ focus: (event: FocusEvent) => any;
89
+ blur: (event: FocusEvent) => any;
90
+ "update:modelValue": (value: InputModelValue) => any;
91
+ keydown: (event: KeyboardEvent) => any;
92
+ "drag-start": (value: number, event: PointerEvent) => any;
93
+ "drag-end": (value: number, event: PointerEvent) => any;
94
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
95
+ onInput?: ((value: InputModelValue, event: Event) => any) | undefined;
96
+ onClear?: (() => any) | undefined;
97
+ onChange?: ((value: InputModelValue, event: Event) => any) | undefined;
98
+ onFocus?: ((event: FocusEvent) => any) | undefined;
99
+ onBlur?: ((event: FocusEvent) => any) | undefined;
100
+ "onUpdate:modelValue"?: ((value: InputModelValue) => any) | undefined;
101
+ onKeydown?: ((event: KeyboardEvent) => any) | undefined;
102
+ "onDrag-start"?: ((value: number, event: PointerEvent) => any) | undefined;
103
+ "onDrag-end"?: ((value: number, event: PointerEvent) => any) | undefined;
104
+ }>, {
105
+ type: NativeInputType;
106
+ size: "sm" | "md" | "lg" | null;
107
+ disabled: boolean;
108
+ name: string;
109
+ password: boolean;
110
+ modelValue: InputModelValue;
111
+ placeholder: string;
112
+ clearable: boolean;
113
+ suffixIcon: string;
114
+ clearIcon: string;
115
+ min: number | string;
116
+ max: number | string;
117
+ multiline: boolean;
118
+ prefixIcon: string;
119
+ prefix: string;
120
+ suffix: string;
121
+ showPassword: boolean;
122
+ rows: number;
123
+ maxlength: number;
124
+ showWordLimit: boolean;
125
+ formatter: (value: string) => string;
126
+ parser: (value: string) => string;
127
+ precision: number;
128
+ step: number | string;
129
+ draggable: boolean;
130
+ dragIcon: string;
131
+ dragStep: number;
132
+ autocomplete: string;
133
+ readonly: boolean;
134
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
135
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
136
+ declare const _default: typeof __VLS_export;
137
+ export default _default;
138
+ type __VLS_WithSlots<T, S> = T & {
139
+ new (): {
140
+ $slots: S;
141
+ };
142
+ };