@js-smart/react-kit 1.2.0 → 4.1.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.
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * Reusable custom Next.js 13 Link component.
5
+ *
6
+ * @param props Properties of the React Node
7
+ *
8
+ * @author Pavan Kumar Jadda
9
+ * @since 0.3.2
10
+ */
11
+ export declare function NextLink(props: {
12
+ href: string;
13
+ linkText?: string;
14
+ target?: string;
15
+ children?: React.ReactNode;
16
+ }): React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface TablePaginationActionsProps {
4
+ count: number;
5
+ page: number;
6
+ rowsPerPage: number;
7
+ onPageChange: (event: React.MouseEvent<HTMLButtonElement>, newPage: number) => void;
8
+ }
9
+ export declare function TablePaginationActions(props: TablePaginationActionsProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare function TabPanel(props: TabPanelProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function a11yProps(index: number): {
5
+ id: string;
6
+ 'aria-controls': string;
7
+ };
8
+ interface TabPanelProps {
9
+ children?: React.ReactNode;
10
+ index: number;
11
+ value: string;
12
+ }
13
+ export {};
@@ -1,7 +1,7 @@
1
1
  export interface ProgressState {
2
- loading: boolean;
3
- success: boolean;
4
- error: boolean;
5
- complete: boolean;
2
+ isLoading: boolean;
3
+ isSuccess: boolean;
4
+ isError: boolean;
5
+ isComplete: boolean;
6
6
  message: string;
7
7
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Get the value of a CSS variable
3
+ *
4
+ * @param variable The name of the CSS variable
5
+ *
6
+ * @returns The value of the CSS variable
7
+ *
8
+ * @author Pavan Kumar Jadda
9
+ * @since 1.6.0
10
+ */
11
+ export declare function getCssVariable(variable: string): string;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Sets Cookie expiration to 24 hours. By default, server sets 60 minutes expiration but after each API request it extends to another 60 minutes. In client side set 24 hours as expiration date,
3
- * if the user hasn't refreshed web page in 60 minutes, they would get HTTP 401 error and redirected to login page. And redirect URL will be stored in cookie
3
+ * if the user hasn't refreshed web page in 60 minutes, they would get HTTP 401 isError and redirected to login page. And redirect URL will be stored in cookie
4
4
  *
5
5
  * @author Pavan Kumar Jadda
6
6
  * @since 0.2.30
@@ -20,7 +20,7 @@ export declare const initializeState: () => ProgressState;
20
20
  */
21
21
  export declare const markLoading: (progressState: ProgressState) => ProgressState;
22
22
  /**
23
- * Update state as success
23
+ * Update state as isSuccess
24
24
  *
25
25
  * @return ProgressState Updated State Object
26
26
  *
@@ -29,7 +29,7 @@ export declare const markLoading: (progressState: ProgressState) => ProgressStat
29
29
  */
30
30
  export declare const markSuccess: (progressState: ProgressState, message?: string) => ProgressState;
31
31
  /**
32
- * Update state as failure or error
32
+ * Update state as failure or isError
33
33
  *
34
34
  * @return ProgressState Updated State Object
35
35
  *
@@ -4,7 +4,7 @@
4
4
  * @param {string} url - The URL to request.
5
5
  * @param {RequestInit} [options] - Options for the fetch request.
6
6
  * @returns {Promise<T>} - A promise that resolves to the JSON response of type T.
7
- * @throws {Error} - Throws an error if the response is not OK.
7
+ * @throws {Error} - Throws an isError if the response is not OK.
8
8
  *
9
9
  * @author Pavan Kumar Jadda
10
10
  * @since 1.0.3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@js-smart/react-kit",
3
3
  "private": false,
4
- "version": "1.2.0",
4
+ "version": "4.1.0",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
7
7
  "publishConfig": {
package/style.css CHANGED
@@ -0,0 +1 @@
1
+ :root{--primary-color: #153d77;--secondary-color: #607d8b;--success-color: #198754;--error-color: #ff1744;--white-color: #fff;--background-color: #dedede;--pdf-color: #f40f02;--word-document-color: #2b579a}