ui-czn 1.0.53 → 1.0.54
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/README.md +54 -54
- package/dist/assets/check.svg +9 -9
- package/dist/assets/checkbox-checked.svg +10 -10
- package/dist/assets/plus.svg +3 -3
- package/dist/assets/star.svg +9 -9
- package/dist/index.d.ts +22 -2
- package/dist/ui-czn.es.js +2098 -2074
- package/dist/ui-czn.umd.js +37 -37
- package/package.json +86 -86
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
|
8
8
|
import * as React_2 from 'react';
|
|
9
9
|
import { ReactNode } from 'react';
|
|
10
10
|
import { VariantProps } from 'class-variance-authority';
|
|
11
|
-
import * as z from 'zod';
|
|
12
11
|
|
|
13
12
|
export declare function Badge({ className, variant, ...props }: BadgeProps): JSX.Element;
|
|
14
13
|
|
|
@@ -33,7 +32,7 @@ export declare interface BaseFormProps {
|
|
|
33
32
|
watch: any;
|
|
34
33
|
setValue: any;
|
|
35
34
|
}) => React_2.ReactNode;
|
|
36
|
-
extraSchema?:
|
|
35
|
+
extraSchema?: ExtraSchema;
|
|
37
36
|
onSubmit?: (data: any) => void;
|
|
38
37
|
}
|
|
39
38
|
|
|
@@ -182,6 +181,27 @@ declare interface DefaultInputProps extends React_2.ComponentProps<"input"> {
|
|
|
182
181
|
isTouched?: boolean;
|
|
183
182
|
}
|
|
184
183
|
|
|
184
|
+
declare type ExtraSchema = Record<string, ExtraSchemaField>;
|
|
185
|
+
|
|
186
|
+
declare interface ExtraSchemaField {
|
|
187
|
+
type: ExtraSchemaFieldType;
|
|
188
|
+
/** обычный required */
|
|
189
|
+
required?: boolean;
|
|
190
|
+
/** сообщение об ошибке */
|
|
191
|
+
errorMessage?: string;
|
|
192
|
+
/** для array */
|
|
193
|
+
items?: {
|
|
194
|
+
type: Exclude<ExtraSchemaFieldType, "array">;
|
|
195
|
+
};
|
|
196
|
+
/** условный required */
|
|
197
|
+
requiredIf?: {
|
|
198
|
+
field: string;
|
|
199
|
+
equals: any;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
declare type ExtraSchemaFieldType = "string" | "number" | "boolean" | "array" | "date";
|
|
204
|
+
|
|
185
205
|
export declare function Field({ className, orientation, ...props }: default_2.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): JSX.Element;
|
|
186
206
|
|
|
187
207
|
export declare function FieldContent({ className, ...props }: default_2.ComponentProps<"div">): JSX.Element;
|