@mystaline/mysta-lib 1.0.0-alpha.13 → 1.0.0-alpha.15
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/components/button/Button.d.ts +2 -0
- package/components/dialogform/DialogForm.d.ts +4 -2
- package/components/form/Form.d.ts +10 -2
- package/components/icon/Icon.d.ts +13 -1
- package/mysta-lib.es.js +2400 -2343
- package/mysta-lib.system.js +18 -18
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { Ref } from 'react';
|
|
3
|
+
|
|
2
4
|
import { DialogProps } from '../dialog/Dialog.d';
|
|
3
|
-
import { FormProps } from '../form/Form.d';
|
|
5
|
+
import { FormHandle, FormProps } from '../form/Form.d';
|
|
4
6
|
|
|
5
7
|
export interface DialogFormProps<T extends Record<string, any>>
|
|
6
8
|
extends Omit<DialogProps, 'slots'>,
|
|
@@ -15,5 +17,5 @@ export interface DialogFormSlots {
|
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
export declare const DialogForm: <T extends Record<string, any> = any>(
|
|
18
|
-
props: DialogFormProps<T
|
|
20
|
+
props: DialogFormProps<T> & { ref?: Ref<FormHandle<T>> },
|
|
19
21
|
) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, Ref } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
DeepMap,
|
|
5
5
|
DeepPartial,
|
|
@@ -65,6 +65,11 @@ export interface FormProps<T extends Record<string, any>> {
|
|
|
65
65
|
*/
|
|
66
66
|
resetOnSubmit?: boolean;
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* @default 2
|
|
70
|
+
*/
|
|
71
|
+
columnPerRow?: number;
|
|
72
|
+
|
|
68
73
|
/**
|
|
69
74
|
* To gives default value to form
|
|
70
75
|
*
|
|
@@ -81,6 +86,9 @@ export interface FormProps<T extends Record<string, any>> {
|
|
|
81
86
|
* Error emit
|
|
82
87
|
*/
|
|
83
88
|
onError?: SubmitErrorHandler<T>;
|
|
89
|
+
|
|
90
|
+
fieldWrapperClassName?: string;
|
|
91
|
+
footerWrapperClassName?: string;
|
|
84
92
|
}
|
|
85
93
|
|
|
86
94
|
export interface FormSlots {
|
|
@@ -101,5 +109,5 @@ export interface FormHandle<T extends Record<string, any>> {
|
|
|
101
109
|
}
|
|
102
110
|
|
|
103
111
|
export declare const Form: <T extends Record<string, any> = any>(
|
|
104
|
-
props: FormProps<T
|
|
112
|
+
props: FormProps<T> & { ref?: Ref<FormHandle<T>> },
|
|
105
113
|
) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// types/components.d.ts (or you can name it types/icon.d.ts if it's specific)
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { FC } from 'react';
|
|
4
4
|
|
|
5
5
|
import { Severities } from 'lib/utils';
|
|
6
6
|
|
|
@@ -41,6 +41,11 @@ export interface IconProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
41
41
|
*/
|
|
42
42
|
className?: string;
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Additional Tailwind/utility classes
|
|
46
|
+
*/
|
|
47
|
+
tooltipClassName?: string;
|
|
48
|
+
|
|
44
49
|
/**
|
|
45
50
|
* Tooltip text
|
|
46
51
|
*/
|
|
@@ -53,3 +58,10 @@ export interface IconProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
53
58
|
|
|
54
59
|
severity?: Severities;
|
|
55
60
|
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Icon component for custom section.
|
|
64
|
+
*
|
|
65
|
+
* @component
|
|
66
|
+
*/
|
|
67
|
+
export const Card: FC<IconProps>;
|