@js-smart/react-kit 5.20.0 → 5.21.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/index.d.ts +1 -0
- package/index.js +15 -15
- package/index.mjs +4040 -3348
- package/lib/components/NextLink.d.ts +3 -3
- package/lib/components/OpenInNewIconLink.d.ts +3 -3
- package/lib/components/ReactIf.d.ts +2 -2
- package/lib/components/RouterLink.d.ts +3 -0
- package/lib/components/buttons/CancelButton.d.ts +4 -4
- package/lib/components/buttons/DeleteButton.d.ts +2 -2
- package/lib/components/buttons/ExcelButton.d.ts +5 -5
- package/lib/components/buttons/GoBackButton.d.ts +2 -3
- package/lib/components/buttons/HistoryButton.d.ts +4 -4
- package/lib/components/buttons/LoadingSuccessButton.d.ts +3 -3
- package/lib/components/buttons/ManageButton.d.ts +6 -6
- package/lib/components/buttons/SuccessButton.d.ts +7 -7
- package/lib/components/tabs/TabPanel.d.ts +3 -3
- package/lib/config/fetch/FetchInterceptor.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
interface Props {
|
|
3
3
|
href: string;
|
|
4
4
|
linkText?: string;
|
|
5
5
|
target?: string;
|
|
6
|
-
children?:
|
|
6
|
+
children?: ReactNode;
|
|
7
7
|
ariaLabel?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
@@ -14,5 +14,5 @@ interface Props {
|
|
|
14
14
|
* @author Pavan Kumar Jadda
|
|
15
15
|
* @since 0.3.2
|
|
16
16
|
*/
|
|
17
|
-
export declare function NextLink(props: Readonly<Props>):
|
|
17
|
+
export declare function NextLink(props: Readonly<Props>): ReactNode;
|
|
18
18
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
interface Props {
|
|
3
3
|
href: string;
|
|
4
4
|
linkText: string;
|
|
5
5
|
target: string;
|
|
6
|
-
children?:
|
|
6
|
+
children?: ReactNode;
|
|
7
7
|
ariaLabel?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Reusable component to open a link in new tab and show open new icon at the end
|
|
10
|
+
* Reusable component to open a link in a new tab and show open new icon at the end
|
|
11
11
|
*
|
|
12
12
|
* @param props Properties of the component
|
|
13
13
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
type ReactIfProps = {
|
|
3
3
|
/**
|
|
4
4
|
* The condition that determines whether children should be rendered
|
|
@@ -32,5 +32,5 @@ type ReactIfProps = {
|
|
|
32
32
|
* @author Pavan Kumar Jadda
|
|
33
33
|
* @since 0.1.0
|
|
34
34
|
*/
|
|
35
|
-
export declare function ReactIf(props: ReactIfProps):
|
|
35
|
+
export declare function ReactIf(props: ReactIfProps): ReactNode;
|
|
36
36
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SxProps, Theme } from '@mui/material';
|
|
2
|
-
import {
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Reusable Success Button component properties
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@ import { default as React } from 'react';
|
|
|
7
7
|
* @since 1.2.14
|
|
8
8
|
*/
|
|
9
9
|
interface CancelButtonProps {
|
|
10
|
-
children?:
|
|
10
|
+
children?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
name?: string;
|
|
13
13
|
dataCy?: string;
|
|
@@ -16,7 +16,7 @@ interface CancelButtonProps {
|
|
|
16
16
|
variant?: 'text' | 'outlined' | 'contained';
|
|
17
17
|
color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
18
18
|
onClick: () => void;
|
|
19
|
-
startIcon?:
|
|
19
|
+
startIcon?: ReactNode;
|
|
20
20
|
ariaLabel?: string;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -25,5 +25,5 @@ interface CancelButtonProps {
|
|
|
25
25
|
* @author Pavan Kumar Jadda
|
|
26
26
|
* @since 1.2.14
|
|
27
27
|
*/
|
|
28
|
-
export declare function CancelButton(props: CancelButtonProps):
|
|
28
|
+
export declare function CancelButton(props: CancelButtonProps): ReactNode;
|
|
29
29
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
interface DeleteButtonProps {
|
|
3
3
|
loading: boolean;
|
|
4
4
|
label?: string;
|
|
@@ -9,7 +9,7 @@ interface DeleteButtonProps {
|
|
|
9
9
|
color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
10
10
|
name?: string;
|
|
11
11
|
dataCy?: string;
|
|
12
|
-
startIcon?:
|
|
12
|
+
startIcon?: ReactNode;
|
|
13
13
|
onClick: () => void;
|
|
14
14
|
ariaLabel?: string;
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { SxProps, Theme } from '@mui/material';
|
|
3
3
|
/**
|
|
4
4
|
* Reusable Excel Button component properties
|
|
@@ -7,13 +7,13 @@ import { SxProps, Theme } from '@mui/material';
|
|
|
7
7
|
* @since 1.2.9
|
|
8
8
|
*/
|
|
9
9
|
interface SuccessButtonProps {
|
|
10
|
-
children?:
|
|
10
|
+
children?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
name?: string;
|
|
13
13
|
sx?: SxProps<Theme>;
|
|
14
|
-
type?:
|
|
14
|
+
type?: 'button' | 'submit' | 'reset';
|
|
15
15
|
onClick: () => void;
|
|
16
|
-
startIcon?:
|
|
16
|
+
startIcon?: ReactNode;
|
|
17
17
|
dataCy?: string;
|
|
18
18
|
ariaLabel?: string;
|
|
19
19
|
}
|
|
@@ -23,5 +23,5 @@ interface SuccessButtonProps {
|
|
|
23
23
|
* @author Pavan Kumar Jadda
|
|
24
24
|
* @since 1.2.9
|
|
25
25
|
*/
|
|
26
|
-
export declare function ExcelButton(props: SuccessButtonProps):
|
|
26
|
+
export declare function ExcelButton(props: SuccessButtonProps): ReactNode;
|
|
27
27
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { NavigateFunction } from 'react-router-dom';
|
|
3
2
|
interface GoBackButtonProps {
|
|
4
3
|
name?: string;
|
|
5
|
-
children?:
|
|
4
|
+
children?: ReactNode;
|
|
6
5
|
navigate: NavigateFunction;
|
|
7
|
-
color?:
|
|
6
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
8
7
|
ariaLabel?: string;
|
|
9
8
|
}
|
|
10
9
|
export declare function GoBackButton(props: GoBackButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SxProps, Theme } from '@mui/material';
|
|
2
|
-
import {
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Reusable History Button component properties
|
|
5
5
|
*
|
|
@@ -7,14 +7,14 @@ import { default as React } from 'react';
|
|
|
7
7
|
* @since 1.2.15
|
|
8
8
|
*/
|
|
9
9
|
interface HistoryButtonProps {
|
|
10
|
-
children?:
|
|
10
|
+
children?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
name?: string;
|
|
13
13
|
dataCy?: string;
|
|
14
14
|
sx?: SxProps<Theme>;
|
|
15
15
|
type?: 'button' | 'submit' | 'reset';
|
|
16
16
|
onClick: () => void;
|
|
17
|
-
startIcon?:
|
|
17
|
+
startIcon?: ReactNode;
|
|
18
18
|
variant?: 'text' | 'outlined' | 'contained';
|
|
19
19
|
color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
20
20
|
ariaLabel?: string;
|
|
@@ -25,5 +25,5 @@ interface HistoryButtonProps {
|
|
|
25
25
|
* @author Pavan Kumar Jadda
|
|
26
26
|
* @since 1.2.15
|
|
27
27
|
*/
|
|
28
|
-
export declare function HistoryButton(props: HistoryButtonProps):
|
|
28
|
+
export declare function HistoryButton(props: HistoryButtonProps): ReactNode;
|
|
29
29
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SxProps, Theme } from '@mui/material';
|
|
2
|
-
import {
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Reusable Success Button component properties
|
|
5
5
|
*
|
|
@@ -7,12 +7,12 @@ import { default as React } from 'react';
|
|
|
7
7
|
* @since 0.3.3
|
|
8
8
|
*/
|
|
9
9
|
interface Props {
|
|
10
|
-
children?:
|
|
10
|
+
children?: ReactNode;
|
|
11
11
|
type?: 'button' | 'submit' | 'reset';
|
|
12
12
|
name?: string;
|
|
13
13
|
loading: boolean;
|
|
14
14
|
dataCy?: string;
|
|
15
|
-
startIcon?:
|
|
15
|
+
startIcon?: ReactNode;
|
|
16
16
|
sx?: SxProps<Theme>;
|
|
17
17
|
onClick?: () => void;
|
|
18
18
|
variant?: 'text' | 'outlined' | 'contained';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
interface ManageButtonProps {
|
|
3
|
-
size?:
|
|
4
|
-
variant?:
|
|
5
|
-
color?:
|
|
3
|
+
size?: 'small' | 'medium' | 'large';
|
|
4
|
+
variant?: 'text' | 'outlined' | 'contained';
|
|
5
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
6
6
|
className?: string;
|
|
7
7
|
name?: string;
|
|
8
8
|
dataCy?: string;
|
|
9
|
-
startIcon?:
|
|
9
|
+
startIcon?: ReactNode;
|
|
10
10
|
onClick: () => void;
|
|
11
|
-
children?:
|
|
11
|
+
children?: ReactNode;
|
|
12
12
|
ariaLabel?: string;
|
|
13
13
|
}
|
|
14
14
|
export declare function ManageButton(props: ManageButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { SxProps, Theme } from '@mui/material';
|
|
3
3
|
/**
|
|
4
4
|
* Reusable Success Button component properties
|
|
@@ -7,16 +7,16 @@ import { SxProps, Theme } from '@mui/material';
|
|
|
7
7
|
* @since 0.3.3
|
|
8
8
|
*/
|
|
9
9
|
interface SuccessButtonProps {
|
|
10
|
-
children?:
|
|
10
|
+
children?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
name?: string;
|
|
13
13
|
dataCy?: string;
|
|
14
14
|
sx?: SxProps<Theme>;
|
|
15
|
-
type?:
|
|
15
|
+
type?: 'button' | 'submit' | 'reset';
|
|
16
16
|
onClick: () => void;
|
|
17
|
-
startIcon?:
|
|
18
|
-
variant?:
|
|
19
|
-
color?:
|
|
17
|
+
startIcon?: ReactNode;
|
|
18
|
+
variant?: 'text' | 'outlined' | 'contained';
|
|
19
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
20
20
|
ariaLabel?: string;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -25,5 +25,5 @@ interface SuccessButtonProps {
|
|
|
25
25
|
* @author Pavan Kumar Jadda
|
|
26
26
|
* @since 0.1.0
|
|
27
27
|
*/
|
|
28
|
-
export declare function SuccessButton(props: SuccessButtonProps):
|
|
28
|
+
export declare function SuccessButton(props: SuccessButtonProps): ReactNode;
|
|
29
29
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export declare function TabPanel(props: TabPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare function a11yProps(index: number): {
|
|
4
4
|
id: string;
|
|
5
|
-
|
|
5
|
+
'aria-controls': string;
|
|
6
6
|
};
|
|
7
7
|
interface TabPanelProps {
|
|
8
|
-
children?:
|
|
8
|
+
children?: ReactNode;
|
|
9
9
|
index: number;
|
|
10
10
|
value: string;
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { FetchError } from './FetchClientTypes';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Adds error handling interceptor
|
|
5
5
|
*
|
|
@@ -7,8 +7,8 @@ import { FetchError } from './FetchClientTypes';
|
|
|
7
7
|
* @since 1.1.1
|
|
8
8
|
*/
|
|
9
9
|
export declare const FetchInterceptor: (props: {
|
|
10
|
-
children:
|
|
11
|
-
}) =>
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}) => ReactNode;
|
|
12
12
|
/**
|
|
13
13
|
* Creates a formatted error object with additional context
|
|
14
14
|
* @param error The original error
|