@1money/component-ui 0.0.94-alpha.0 → 0.0.94-alpha.1
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.
- package/es/business/Dialog/FormDialog/FormDialog.js +2 -2
- package/es/business/Dialog/FormDialog/interface.d.ts +8 -1
- package/es/business/Select/Currency/CurrencySelect.js +2 -2
- package/es/business/Select/Currency/style/CurrencySelect.css +2 -2
- package/es/components/Input/interface.d.ts +6 -0
- package/es/components/ProForm/ProFormItem.js +14 -4
- package/es/components/ProForm/core/constants.d.ts +7 -0
- package/es/components/ProForm/core/constants.js +8 -1
- package/es/components/ProForm/fields/createProFormField.js +4 -2
- package/es/components/ProForm/interface.d.ts +20 -0
- package/es/components/ProForm/style/ProForm.css +4 -0
- package/es/index.css +1 -1
- package/lib/business/Dialog/FormDialog/FormDialog.js +2 -2
- package/lib/business/Dialog/FormDialog/interface.d.ts +8 -1
- package/lib/business/Select/Currency/CurrencySelect.js +2 -2
- package/lib/business/Select/Currency/style/CurrencySelect.css +2 -2
- package/lib/components/Input/interface.d.ts +6 -0
- package/lib/components/ProForm/ProFormItem.js +13 -3
- package/lib/components/ProForm/core/constants.d.ts +7 -0
- package/lib/components/ProForm/core/constants.js +9 -2
- package/lib/components/ProForm/fields/createProFormField.js +4 -2
- package/lib/components/ProForm/interface.d.ts +20 -0
- package/lib/components/ProForm/style/ProForm.css +4 -0
- package/lib/index.css +1 -1
- package/package.json +1 -1
- package/scripts/mcp-server/index.generated.json +8 -0
|
@@ -119,6 +119,20 @@ export interface ProFormContextValue<Values = Record<string, any>> extends ProFo
|
|
|
119
119
|
export interface ProFormTypedFieldProps<Values = Record<string, any>, Name extends ProFormFieldName<Values> = ProFormFieldName<Values>, FieldProps = Record<string, any>, FieldParams = Record<string, any>> {
|
|
120
120
|
name?: Name;
|
|
121
121
|
label?: ReactNode;
|
|
122
|
+
/**
|
|
123
|
+
* Defaults to `true`. No marker is drawn for a required field — instead,
|
|
124
|
+
* `required={false}` appends the italic `(Optional)` suffix to the label,
|
|
125
|
+
* matching the Input/Select/Calendar field shells.
|
|
126
|
+
*
|
|
127
|
+
* This is label copy only; it does NOT add or remove validation. Keep it in
|
|
128
|
+
* step with `rules` yourself — a field with `rules: [{ required: true }]`
|
|
129
|
+
* should not also say `(Optional)`.
|
|
130
|
+
*
|
|
131
|
+
* Note this is a field-level prop, not `fieldProps.required`: the label is
|
|
132
|
+
* rendered by `ProFormItem`, so a `required` buried in `fieldProps` reaches
|
|
133
|
+
* a control that has no label and shows nothing.
|
|
134
|
+
*/
|
|
135
|
+
required?: boolean;
|
|
122
136
|
rules?: FormRule<Values>[];
|
|
123
137
|
description?: ReactNode;
|
|
124
138
|
feedback?: ReactNode;
|
|
@@ -168,6 +182,12 @@ export interface ProFormItemProps<Values = Record<string, any>, Name extends Pro
|
|
|
168
182
|
prefixCls?: string;
|
|
169
183
|
label?: ReactNode;
|
|
170
184
|
name?: Name;
|
|
185
|
+
/**
|
|
186
|
+
* Defaults to `true`. `required={false}` appends the italic `(Optional)`
|
|
187
|
+
* suffix to the label — there is no required marker. Label copy only; it
|
|
188
|
+
* does not affect validation.
|
|
189
|
+
*/
|
|
190
|
+
required?: boolean;
|
|
171
191
|
rules?: FormRule<Values>[];
|
|
172
192
|
description?: ReactNode;
|
|
173
193
|
feedback?: ReactNode;
|