dhre-component-lib 0.2.9 → 0.3.2
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/components/Button/Button.d.ts +15 -7
- package/dist/components/CircularProgress/CircularProgress.d.ts +3 -2
- package/dist/components/Dropdown/Dropdown.d.ts +15 -0
- package/dist/components/Dropdown/index.d.ts +1 -0
- package/dist/components/Enum.d.ts +22 -0
- package/dist/components/HoverOptionsWrapper/HoverOptionsWrapper.d.ts +14 -0
- package/dist/components/HoverOptionsWrapper/HoverOptionsWrapper.test.d.ts +1 -0
- package/dist/components/HoverOptionsWrapper/index.d.ts +1 -0
- package/dist/components/Modal/Modal.test.d.ts +1 -0
- package/dist/components/RightDrawer/RightDrawer.d.ts +9 -0
- package/dist/components/RightDrawer/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +1 -0
- package/dist/components/TextArea/TextArea.d.ts +14 -0
- package/dist/components/TextArea/index.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +14 -0
- package/dist/components/Toast/Toast.test.d.ts +1 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +8 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.test.d.ts +1 -0
- package/dist/components/ToggleSwitch/index.d.ts +1 -0
- package/dist/index.d.ts +100 -10
- package/dist/index.esm.js +303 -63
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +307 -61
- package/dist/index.js.map +1 -1
- package/dist/theme/colors/colors.scss +12 -1
- package/package.json +1 -1
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import "./Button.module.scss";
|
|
3
|
+
import { ButtonCategory, CircularProgressColor } from "../Enum";
|
|
4
|
+
type ButtonProps = {
|
|
4
5
|
label: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
category?: ButtonCategory;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
width?: string;
|
|
11
|
+
height?: string;
|
|
12
|
+
borderRadius?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
loaderThickness?: number;
|
|
15
|
+
loaderColor?: CircularProgressColor;
|
|
16
|
+
loaderSize?: number;
|
|
17
|
+
};
|
|
10
18
|
declare const Button: React.FC<ButtonProps>;
|
|
11
19
|
export default Button;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './CircularProgress.module.scss';
|
|
3
|
+
import { CircularProgressColor, CircularProgressVariant } from '../Enum';
|
|
3
4
|
export interface CircularProgressProps {
|
|
4
5
|
value?: number;
|
|
5
|
-
variant?:
|
|
6
|
-
color?:
|
|
6
|
+
variant?: CircularProgressVariant;
|
|
7
|
+
color?: CircularProgressColor;
|
|
7
8
|
thickness?: number;
|
|
8
9
|
size?: number | string;
|
|
9
10
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import "./Dropdown.module.scss";
|
|
3
|
+
type value = {
|
|
4
|
+
name: string;
|
|
5
|
+
value: string;
|
|
6
|
+
};
|
|
7
|
+
declare function Dropdown(props: {
|
|
8
|
+
placeholder: string;
|
|
9
|
+
getSelectedValue: (value: value) => void;
|
|
10
|
+
dropdownList: value[];
|
|
11
|
+
arrowUp: React.ReactNode;
|
|
12
|
+
arrowDown: React.ReactNode;
|
|
13
|
+
value: value;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
export default Dropdown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Dropdown";
|
|
@@ -15,3 +15,25 @@ export declare const LINK_TARGET: {
|
|
|
15
15
|
Parent: string;
|
|
16
16
|
Top: string;
|
|
17
17
|
};
|
|
18
|
+
export declare enum CircularProgressVariant {
|
|
19
|
+
Determinate = "determinate",
|
|
20
|
+
Indeterminate = "indeterminate"
|
|
21
|
+
}
|
|
22
|
+
export declare enum CircularProgressColor {
|
|
23
|
+
PRIMARY = "primary",
|
|
24
|
+
SECONDARY = "secondary",
|
|
25
|
+
ERROR = "error",
|
|
26
|
+
SUCCESS = "success",
|
|
27
|
+
INFO = "info",
|
|
28
|
+
WARNING = "warning",
|
|
29
|
+
WHITE = "white",
|
|
30
|
+
BLACK = "black"
|
|
31
|
+
}
|
|
32
|
+
export declare enum ButtonCategory {
|
|
33
|
+
FILLED = "filled",
|
|
34
|
+
OUTLINED = "outlined",
|
|
35
|
+
TEXT = "text"
|
|
36
|
+
}
|
|
37
|
+
export declare enum ToastTimer {
|
|
38
|
+
INTERVAL = 100
|
|
39
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "./HoverOptionsWrapper.module.scss";
|
|
3
|
+
interface SwipeActionWrapperProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
onPin?: () => void;
|
|
6
|
+
onRead?: () => void;
|
|
7
|
+
onDelete?: () => void;
|
|
8
|
+
pinIcon: React.ReactNode;
|
|
9
|
+
readIcon: React.ReactNode;
|
|
10
|
+
deleteIcon: React.ReactNode;
|
|
11
|
+
swipeThreshold?: number;
|
|
12
|
+
}
|
|
13
|
+
declare const HoverOptionsWrapper: React.FC<SwipeActionWrapperProps>;
|
|
14
|
+
export default HoverOptionsWrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./HoverOptionsWrapper";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import "./RightDrawer.module.scss";
|
|
3
|
+
declare const RightDrawer: (props: {
|
|
4
|
+
openSideDrawer: boolean;
|
|
5
|
+
closeSideDrawer: () => void;
|
|
6
|
+
width: string;
|
|
7
|
+
component: React.ReactNode;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export default RightDrawer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./RightDrawer";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./TextArea.module.scss";
|
|
3
|
+
declare function TextArea(props: {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (event: {
|
|
6
|
+
target: {
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
9
|
+
}) => void;
|
|
10
|
+
requiredLimit: string;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
charText: string;
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
export default TextArea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./TextArea";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Toast.scss";
|
|
3
|
+
interface ToastProps {
|
|
4
|
+
icon: React.ReactNode;
|
|
5
|
+
text: string;
|
|
6
|
+
onUndo?: () => void;
|
|
7
|
+
onUndoText?: string;
|
|
8
|
+
onHide: () => void;
|
|
9
|
+
type: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
duration: number;
|
|
12
|
+
}
|
|
13
|
+
declare const Toast: React.FC<ToastProps>;
|
|
14
|
+
export default Toast;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./ToggleSwitch";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
declare enum CircularProgressVariant {
|
|
4
|
+
Determinate = "determinate",
|
|
5
|
+
Indeterminate = "indeterminate"
|
|
6
|
+
}
|
|
7
|
+
declare enum CircularProgressColor {
|
|
8
|
+
PRIMARY = "primary",
|
|
9
|
+
SECONDARY = "secondary",
|
|
10
|
+
ERROR = "error",
|
|
11
|
+
SUCCESS = "success",
|
|
12
|
+
INFO = "info",
|
|
13
|
+
WARNING = "warning",
|
|
14
|
+
WHITE = "white",
|
|
15
|
+
BLACK = "black"
|
|
16
|
+
}
|
|
17
|
+
declare enum ButtonCategory {
|
|
18
|
+
FILLED = "filled",
|
|
19
|
+
OUTLINED = "outlined",
|
|
20
|
+
TEXT = "text"
|
|
9
21
|
}
|
|
22
|
+
|
|
23
|
+
type ButtonProps = {
|
|
24
|
+
label: string;
|
|
25
|
+
onClick?: () => void;
|
|
26
|
+
category?: ButtonCategory;
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
width?: string;
|
|
30
|
+
height?: string;
|
|
31
|
+
borderRadius?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
loaderThickness?: number;
|
|
34
|
+
loaderColor?: CircularProgressColor;
|
|
35
|
+
loaderSize?: number;
|
|
36
|
+
};
|
|
10
37
|
declare const Button: React.FC<ButtonProps>;
|
|
11
38
|
|
|
12
39
|
interface AvatarProps {
|
|
@@ -49,8 +76,8 @@ declare const CustomCheckbox: React.FC<CustomCheckboxProps>;
|
|
|
49
76
|
|
|
50
77
|
interface CircularProgressProps {
|
|
51
78
|
value?: number;
|
|
52
|
-
variant?:
|
|
53
|
-
color?:
|
|
79
|
+
variant?: CircularProgressVariant;
|
|
80
|
+
color?: CircularProgressColor;
|
|
54
81
|
thickness?: number;
|
|
55
82
|
size?: number | string;
|
|
56
83
|
}
|
|
@@ -223,7 +250,70 @@ type Tab = {
|
|
|
223
250
|
interface TabsProps {
|
|
224
251
|
tabs: Tab[];
|
|
225
252
|
onTabChange: (selectedTab: Tab) => void;
|
|
253
|
+
selectedTabValue?: string;
|
|
226
254
|
}
|
|
227
255
|
declare const Tabs: React.FC<TabsProps>;
|
|
228
256
|
|
|
229
|
-
|
|
257
|
+
type value = {
|
|
258
|
+
name: string;
|
|
259
|
+
value: string;
|
|
260
|
+
};
|
|
261
|
+
declare function Dropdown(props: {
|
|
262
|
+
placeholder: string;
|
|
263
|
+
getSelectedValue: (value: value) => void;
|
|
264
|
+
dropdownList: value[];
|
|
265
|
+
arrowUp: React.ReactNode;
|
|
266
|
+
arrowDown: React.ReactNode;
|
|
267
|
+
value: value;
|
|
268
|
+
}): React.JSX.Element;
|
|
269
|
+
|
|
270
|
+
declare function TextArea(props: {
|
|
271
|
+
value: string;
|
|
272
|
+
onChange: (event: {
|
|
273
|
+
target: {
|
|
274
|
+
value: string;
|
|
275
|
+
};
|
|
276
|
+
}) => void;
|
|
277
|
+
requiredLimit: string;
|
|
278
|
+
placeholder: string;
|
|
279
|
+
charText: string;
|
|
280
|
+
}): React.JSX.Element;
|
|
281
|
+
|
|
282
|
+
declare const RightDrawer: (props: {
|
|
283
|
+
openSideDrawer: boolean;
|
|
284
|
+
closeSideDrawer: () => void;
|
|
285
|
+
width: string;
|
|
286
|
+
component: React.ReactNode;
|
|
287
|
+
}) => React.JSX.Element;
|
|
288
|
+
|
|
289
|
+
type ToggleSwitchProps = {
|
|
290
|
+
initialState?: boolean;
|
|
291
|
+
onToggle?: (state: boolean) => void;
|
|
292
|
+
};
|
|
293
|
+
declare const ToggleSwitch: React.FC<ToggleSwitchProps>;
|
|
294
|
+
|
|
295
|
+
interface SwipeActionWrapperProps {
|
|
296
|
+
children: ReactNode;
|
|
297
|
+
onPin?: () => void;
|
|
298
|
+
onRead?: () => void;
|
|
299
|
+
onDelete?: () => void;
|
|
300
|
+
pinIcon: React.ReactNode;
|
|
301
|
+
readIcon: React.ReactNode;
|
|
302
|
+
deleteIcon: React.ReactNode;
|
|
303
|
+
swipeThreshold?: number;
|
|
304
|
+
}
|
|
305
|
+
declare const HoverOptionsWrapper: React.FC<SwipeActionWrapperProps>;
|
|
306
|
+
|
|
307
|
+
interface ToastProps {
|
|
308
|
+
icon: React.ReactNode;
|
|
309
|
+
text: string;
|
|
310
|
+
onUndo?: () => void;
|
|
311
|
+
onUndoText?: string;
|
|
312
|
+
onHide: () => void;
|
|
313
|
+
type: string;
|
|
314
|
+
className?: string;
|
|
315
|
+
duration: number;
|
|
316
|
+
}
|
|
317
|
+
declare const Toast: React.FC<ToastProps>;
|
|
318
|
+
|
|
319
|
+
export { Accordion as Accordian, Avatar, Badge, Breadcrumb as BreadCrumb, Button, CustomCheckbox as Checkbox, CircularProgress, GetDirectionAction as Directions, CustomDivider as Divider, Dropdown, MapComponent as GoogleMap, HoverOptionsWrapper, CustomInputField as InputTextField, Link, Modal, OTPInput as OtpInput, Progress, CustomRadioButton as RadioButton, RightDrawer, Search, Tabs, TextArea, Toast, ToggleSwitch, Typography, PdfView as default };
|