@dartcom/ui-kit 2.7.2 → 2.8.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.
- package/dist/cjs/components/form/form.js +20 -10
- package/dist/cjs/components/form/form.js.map +1 -1
- package/dist/cjs/components/input/input.js +23 -1
- package/dist/cjs/components/input/input.js.map +1 -1
- package/dist/cjs/node_modules/react-hook-form/dist/index.esm.js +118 -0
- package/dist/cjs/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
- package/dist/esm/components/form/form.js +1 -1
- package/dist/esm/components/form/form.js.map +1 -1
- package/dist/esm/components/input/input.js +1 -1
- package/dist/esm/components/input/input.js.map +1 -1
- package/dist/esm/node_modules/react-hook-form/dist/index.esm.js +1 -1
- package/dist/esm/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
- package/dist/esm/types/components/form/form.d.ts +14 -3
- package/dist/esm/types/components/form/form.d.ts.map +1 -1
- package/dist/esm/types/components/form/form.stories.d.ts.map +1 -1
- package/dist/esm/types/components/input/input.d.ts +2 -2
- package/dist/esm/types/components/input/input.d.ts.map +1 -1
- package/dist/esm/types/components/input/types.d.ts +1 -1
- package/dist/esm/types/components/input/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SxProps } from '@mui/material';
|
|
3
|
-
import { FieldValues,
|
|
3
|
+
import { FieldValues, FormSubmitHandler, UseFormReturn } from 'react-hook-form';
|
|
4
4
|
interface CustomFormProp<T extends FieldValues> {
|
|
5
5
|
form: UseFormReturn<T>;
|
|
6
|
-
onSubmit:
|
|
6
|
+
onSubmit: FormSubmitHandler<T>;
|
|
7
7
|
sx?: SxProps;
|
|
8
|
+
fields: {
|
|
9
|
+
content: React.ReactNode;
|
|
10
|
+
sx?: SxProps;
|
|
11
|
+
};
|
|
12
|
+
buttons?: {
|
|
13
|
+
content?: React.ReactNode;
|
|
14
|
+
sx?: SxProps;
|
|
15
|
+
};
|
|
16
|
+
observers?: {
|
|
17
|
+
content?: React.ReactNode;
|
|
18
|
+
};
|
|
8
19
|
}
|
|
9
20
|
/**
|
|
10
21
|
* Используем этот компонент как основную обертку для формы
|
|
@@ -17,6 +28,6 @@ interface CustomFormProp<T extends FieldValues> {
|
|
|
17
28
|
*
|
|
18
29
|
* @returns {JSX.Element} The rendered form component with form context.
|
|
19
30
|
*/
|
|
20
|
-
declare function CustomForm<T extends FieldValues>({
|
|
31
|
+
declare function CustomForm<T extends FieldValues>({ form, sx, fields, buttons, observers, onSubmit, }: CustomFormProp<T>): import("react/jsx-runtime").JSX.Element;
|
|
21
32
|
export default CustomForm;
|
|
22
33
|
//# sourceMappingURL=form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,WAAW,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,WAAW,EAGX,iBAAiB,EACjB,aAAa,EACd,MAAM,iBAAiB,CAAC;AAEzB,UAAU,cAAc,CAAC,CAAC,SAAS,WAAW;IAC5C,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAEvB,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAE/B,EAAE,CAAC,EAAE,OAAO,CAAC;IAEb,MAAM,EAAE;QACN,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;QACzB,EAAE,CAAC,EAAE,OAAO,CAAC;KACd,CAAC;IAEF,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,EAAE,CAAC,EAAE,OAAO,CAAC;KACd,CAAC;IAEF,SAAS,CAAC,EAAE;QACV,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KAC3B,CAAC;CACH;AAED;;;;;;;;;;GAUG;AACH,iBAAS,UAAU,CAAC,CAAC,SAAS,WAAW,EAAE,EACzC,IAAI,EACJ,EAAO,EACP,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,GACT,EAAE,cAAc,CAAC,CAAC,CAAC,2CAqDnB;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/form.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/form.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;AAEzB,KAAK,QAAQ,GAAG,OAAO,IAAI,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,QAAQ,CAGxB,CAAC;AAMF,KAAK,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAEhC,eAAO,MAAM,IAAI,EAAE,KAoClB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare function CustomInput<T>(props:
|
|
1
|
+
import { CustomInputProps } from './types';
|
|
2
|
+
declare function CustomInput<T>(props: CustomInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default CustomInput;
|
|
4
4
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/input.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,iBAAS,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAkBjD;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,cAAc,GAAG;IACjD,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;CACf,CAAC"}
|