@js-smart/react-kit 5.19.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.
@@ -1,9 +1,9 @@
1
- import { default as React } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  interface Props {
3
3
  href: string;
4
4
  linkText?: string;
5
5
  target?: string;
6
- children?: React.ReactNode;
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>): React.JSX.Element;
17
+ export declare function NextLink(props: Readonly<Props>): ReactNode;
18
18
  export {};
@@ -1,13 +1,13 @@
1
- import { default as React } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  interface Props {
3
3
  href: string;
4
4
  linkText: string;
5
5
  target: string;
6
- children?: React.ReactNode;
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 { default as React, ReactNode } from 'react';
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): React.ReactNode;
35
+ export declare function ReactIf(props: ReactIfProps): ReactNode;
36
36
  export {};
@@ -0,0 +1,3 @@
1
+ import { Link as MuiLink } from '@mui/material';
2
+ import { default as React } from 'react';
3
+ export declare const RouterLink: import('@tanstack/react-router').LinkComponent<(props: React.ComponentProps<typeof MuiLink>) => import("react/jsx-runtime").JSX.Element, string>;
@@ -1,5 +1,5 @@
1
1
  import { SxProps, Theme } from '@mui/material';
2
- import { default as React } from 'react';
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?: React.ReactNode;
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?: React.ReactNode;
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): React.JSX.Element;
28
+ export declare function CancelButton(props: CancelButtonProps): ReactNode;
29
29
  export {};
@@ -1,15 +1,15 @@
1
- import { default as React } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  interface DeleteButtonProps {
3
3
  loading: boolean;
4
4
  label?: string;
5
5
  loadingLabel?: string;
6
- loadingPosition?: "start" | "end" | "center";
7
- type?: "button" | "submit" | "reset" | undefined;
8
- variant?: "text" | "outlined" | "contained";
9
- color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
6
+ loadingPosition?: 'start' | 'end' | 'center';
7
+ type?: 'button' | 'submit' | 'reset' | undefined;
8
+ variant?: 'text' | 'outlined' | 'contained';
9
+ color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
10
10
  name?: string;
11
11
  dataCy?: string;
12
- startIcon?: React.ReactNode;
12
+ startIcon?: ReactNode;
13
13
  onClick: () => void;
14
14
  ariaLabel?: string;
15
15
  }
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
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?: React.ReactNode;
10
+ children?: ReactNode;
11
11
  className?: string;
12
12
  name?: string;
13
13
  sx?: SxProps<Theme>;
14
- type?: "button" | "submit" | "reset";
14
+ type?: 'button' | 'submit' | 'reset';
15
15
  onClick: () => void;
16
- startIcon?: React.ReactNode;
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): React.JSX.Element;
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?: React.ReactNode;
4
+ children?: ReactNode;
6
5
  navigate: NavigateFunction;
7
- color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
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 { default as React } from 'react';
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?: React.ReactNode;
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?: React.ReactNode;
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): React.JSX.Element;
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 { default as React } from 'react';
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?: React.ReactNode;
10
+ children?: ReactNode;
11
11
  type?: 'button' | 'submit' | 'reset';
12
12
  name?: string;
13
13
  loading: boolean;
14
14
  dataCy?: string;
15
- startIcon?: React.ReactNode;
15
+ startIcon?: ReactNode;
16
16
  sx?: SxProps<Theme>;
17
17
  onClick?: () => void;
18
18
  variant?: 'text' | 'outlined' | 'contained';
@@ -1,14 +1,14 @@
1
- import { default as React } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  interface ManageButtonProps {
3
- size?: "small" | "medium" | "large";
4
- variant?: "text" | "outlined" | "contained";
5
- color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
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?: React.ReactNode;
9
+ startIcon?: ReactNode;
10
10
  onClick: () => void;
11
- children?: React.ReactNode;
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 { default as React } from 'react';
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?: React.ReactNode;
10
+ children?: ReactNode;
11
11
  className?: string;
12
12
  name?: string;
13
13
  dataCy?: string;
14
14
  sx?: SxProps<Theme>;
15
- type?: "button" | "submit" | "reset";
15
+ type?: 'button' | 'submit' | 'reset';
16
16
  onClick: () => void;
17
- startIcon?: React.ReactNode;
18
- variant?: "text" | "outlined" | "contained";
19
- color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
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): React.JSX.Element;
28
+ export declare function SuccessButton(props: SuccessButtonProps): ReactNode;
29
29
  export {};
@@ -1,11 +1,11 @@
1
- import { default as React } from 'react';
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
- "aria-controls": string;
5
+ 'aria-controls': string;
6
6
  };
7
7
  interface TabPanelProps {
8
- children?: React.ReactNode;
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: React.JSX.Element;
11
- }) => React.JSX.Element;
10
+ children: ReactNode;
11
+ }) => ReactNode;
12
12
  /**
13
13
  * Creates a formatted error object with additional context
14
14
  * @param error The original error
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
1
  {
2
- "name": "@js-smart/react-kit",
3
- "private": false,
4
- "version": "5.19.0",
5
- "main": "./index.js",
6
- "types": "./index.d.ts",
7
- "publishConfig": {
8
- "access": "public"
9
- },
10
- "peerDependencies": {
11
- "@emotion/react": "^11.14.0",
12
- "@emotion/styled": "^11.14.1",
13
- "@mui/icons-material": "^7.3.1",
14
- "@mui/material": "^7.3.1",
15
- "date-fns": "^4.1.0",
16
- "react": "^18.3.1 || ^19.0.0",
17
- "react-dom": "^18.3.1 || ^19.0.0",
18
- "react-router-dom": "^7.8.0"
19
- },
20
- "exports": {
21
- ".": {
22
- "types": "./index.d.ts",
23
- "import": "./index.mjs",
24
- "require": "./index.js"
25
- }
26
- },
27
- "repository": {
28
- "type": "git",
29
- "url": "https://github.com/js-smart/react-kit"
30
- },
31
- "author": {
32
- "name": "Pavan Kumar Jadda",
33
- "email": "contact@pavankjadda.dev"
34
- },
35
- "keywords": [
36
- "react",
37
- "react-kit",
38
- "react-components",
39
- "react-utils",
40
- "typescript"
41
- ],
42
- "license": "MIT",
43
- "bugs": {
44
- "url": "https://github.com/js-smart/react-kit/issues"
45
- }
2
+ "name": "@js-smart/react-kit",
3
+ "private": false,
4
+ "version": "5.21.0",
5
+ "main": "./index.js",
6
+ "types": "./index.d.ts",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "peerDependencies": {
11
+ "@emotion/react": "^11.14.0",
12
+ "@emotion/styled": "^11.14.1",
13
+ "@mui/icons-material": "^7.3.1",
14
+ "@mui/material": "^7.3.1",
15
+ "date-fns": "^4.1.0",
16
+ "react": "^18.3.1 || ^19.0.0",
17
+ "react-dom": "^18.3.1 || ^19.0.0",
18
+ "react-router-dom": "^7.8.0"
19
+ },
20
+ "exports": {
21
+ ".": {
22
+ "types": "./index.d.ts",
23
+ "import": "./index.mjs",
24
+ "require": "./index.js"
25
+ }
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/js-smart/react-kit"
30
+ },
31
+ "author": {
32
+ "name": "Pavan Kumar Jadda",
33
+ "email": "contact@pavankjadda.dev"
34
+ },
35
+ "keywords": [
36
+ "react",
37
+ "react-kit",
38
+ "react-components",
39
+ "react-utils",
40
+ "typescript"
41
+ ],
42
+ "license": "MIT",
43
+ "bugs": {
44
+ "url": "https://github.com/js-smart/react-kit/issues"
45
+ }
46
46
  }