dhre-component-lib 0.3.2 → 0.3.3

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.
@@ -9,6 +9,7 @@ type AccordionProps = {
9
9
  upArrowIcon: React.ReactNode;
10
10
  downArrowIcon: React.ReactNode;
11
11
  openByDefault?: boolean;
12
+ borderBottom?: boolean;
12
13
  };
13
14
  declare const Accordion: React.FC<AccordionProps>;
14
15
  export default Accordion;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import "./Button.module.scss";
3
3
  import { ButtonCategory, CircularProgressColor } from "../Enum";
4
4
  type ButtonProps = {
5
- label: string;
5
+ label: React.ReactNode;
6
6
  onClick?: () => void;
7
7
  category?: ButtonCategory;
8
8
  loading?: boolean;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import "./Carousel.module.scss";
3
+ import { MediaType } from "../Enum";
4
+ export interface CarouselProps {
5
+ items: CarouselItems[];
6
+ }
7
+ export interface CarouselItems {
8
+ src: string;
9
+ type: MediaType;
10
+ alt: string;
11
+ extension: string;
12
+ }
13
+ declare const Carousel: React.FC<CarouselProps>;
14
+ export default Carousel;
@@ -0,0 +1 @@
1
+ export { default } from "./Carousel";
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  interface CustomCheckboxProps {
3
- label?: string;
3
+ label?: React.ReactNode;
4
4
  checked?: boolean;
5
5
  onChange?: React.ChangeEventHandler<HTMLInputElement>;
6
6
  className?: string;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import "./Drawer.module.scss";
3
+ interface DrawerProps {
4
+ openSideDrawer: boolean;
5
+ closeSideDrawer: () => void;
6
+ width: string;
7
+ component: React.ReactNode;
8
+ anchor?: "left" | "right" | "top" | "bottom";
9
+ variant?: "temporary" | "persistent" | "permanent";
10
+ }
11
+ declare const Drawer: React.FC<DrawerProps>;
12
+ export default Drawer;
@@ -0,0 +1 @@
1
+ export { default } from "./Drawer";
@@ -10,6 +10,6 @@ declare function Dropdown(props: {
10
10
  dropdownList: value[];
11
11
  arrowUp: React.ReactNode;
12
12
  arrowDown: React.ReactNode;
13
- value: value;
13
+ value?: value;
14
14
  }): React.JSX.Element;
15
15
  export default Dropdown;
@@ -37,3 +37,12 @@ export declare enum ButtonCategory {
37
37
  export declare enum ToastTimer {
38
38
  INTERVAL = 100
39
39
  }
40
+ export declare enum MediaType {
41
+ Image = "image",
42
+ Video = "video"
43
+ }
44
+ export declare enum ToastStatus {
45
+ ERROR = "error",
46
+ SUCCESS = "success",
47
+ WARNING = "warning"
48
+ }
@@ -11,6 +11,9 @@ export interface CustomInputFieldProps {
11
11
  error?: string;
12
12
  errorClassName?: string;
13
13
  id?: string;
14
+ maxLength?: number;
15
+ minLength?: number;
16
+ checkValidation?: () => void;
14
17
  }
15
18
  declare const CustomInputField: React.FC<CustomInputFieldProps>;
16
19
  export default CustomInputField;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import './Menu.module.scss';
3
+ interface MenuInterface {
4
+ openMenu: boolean;
5
+ closeMenu: () => void;
6
+ component: React.ReactNode;
7
+ menuStyles: string;
8
+ }
9
+ declare const Menu: (props: MenuInterface) => React.JSX.Element;
10
+ export default Menu;
@@ -6,6 +6,7 @@ interface ModalProps {
6
6
  title?: React.ReactNode;
7
7
  children: React.ReactNode;
8
8
  crossIcon: React.ReactNode;
9
+ className?: string;
9
10
  }
10
11
  declare const Modal: React.FC<ModalProps>;
11
12
  export default Modal;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import './RangeSlider.module.scss';
3
+ interface rangeSlider {
4
+ sliderLimit: number;
5
+ minRange: number;
6
+ maxRange: number;
7
+ text1: string;
8
+ text2: string;
9
+ }
10
+ declare const RangeSlider: (props: rangeSlider) => React.JSX.Element;
11
+ export default RangeSlider;
@@ -0,0 +1 @@
1
+ export { default } from "./RangeSlider";
@@ -21,6 +21,7 @@ interface CustomSearchFieldProps {
21
21
  className?: string;
22
22
  onSearchIconClick?: () => void;
23
23
  onHandleClear?: () => void;
24
+ isWhiteBackgound?: boolean;
24
25
  }
25
26
  declare const Search: React.FC<CustomSearchFieldProps>;
26
27
  export default Search;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import "./TextArea.module.scss";
3
3
  declare function TextArea(props: {
4
- value: string;
4
+ value?: string;
5
5
  onChange: (event: {
6
6
  target: {
7
7
  value: string;
@@ -1,14 +1,17 @@
1
1
  import React from "react";
2
2
  import "./Toast.scss";
3
+ import { ToastStatus } from "../Enum";
3
4
  interface ToastProps {
4
- icon: React.ReactNode;
5
+ icon?: React.ReactNode;
5
6
  text: string;
6
- onUndo?: () => void;
7
- onUndoText?: string;
8
- onHide: () => void;
9
- type: string;
7
+ onAction?: () => void;
8
+ onActionText?: string;
9
+ onHide?: () => void;
10
+ type: ToastStatus;
10
11
  className?: string;
11
12
  duration: number;
13
+ showCrossIcon?: boolean;
14
+ crossIcon?: React.ReactNode;
12
15
  }
13
16
  declare const Toast: React.FC<ToastProps>;
14
17
  export default Toast;
package/dist/index.d.ts CHANGED
@@ -19,9 +19,18 @@ declare enum ButtonCategory {
19
19
  OUTLINED = "outlined",
20
20
  TEXT = "text"
21
21
  }
22
+ declare enum MediaType {
23
+ Image = "image",
24
+ Video = "video"
25
+ }
26
+ declare enum ToastStatus {
27
+ ERROR = "error",
28
+ SUCCESS = "success",
29
+ WARNING = "warning"
30
+ }
22
31
 
23
32
  type ButtonProps = {
24
- label: string;
33
+ label: React.ReactNode;
25
34
  onClick?: () => void;
26
35
  category?: ButtonCategory;
27
36
  loading?: boolean;
@@ -65,7 +74,7 @@ interface BreadcrumbProps {
65
74
  declare const Breadcrumb: React.FC<BreadcrumbProps>;
66
75
 
67
76
  interface CustomCheckboxProps {
68
- label?: string;
77
+ label?: React.ReactNode;
69
78
  checked?: boolean;
70
79
  onChange?: React.ChangeEventHandler<HTMLInputElement>;
71
80
  className?: string;
@@ -135,6 +144,9 @@ interface CustomInputFieldProps {
135
144
  error?: string;
136
145
  errorClassName?: string;
137
146
  id?: string;
147
+ maxLength?: number;
148
+ minLength?: number;
149
+ checkValidation?: () => void;
138
150
  }
139
151
  declare const CustomInputField: React.FC<CustomInputFieldProps>;
140
152
 
@@ -219,6 +231,7 @@ interface CustomSearchFieldProps {
219
231
  className?: string;
220
232
  onSearchIconClick?: () => void;
221
233
  onHandleClear?: () => void;
234
+ isWhiteBackgound?: boolean;
222
235
  }
223
236
  declare const Search: React.FC<CustomSearchFieldProps>;
224
237
 
@@ -228,6 +241,7 @@ interface ModalProps {
228
241
  title?: React.ReactNode;
229
242
  children: React.ReactNode;
230
243
  crossIcon: React.ReactNode;
244
+ className?: string;
231
245
  }
232
246
  declare const Modal: React.FC<ModalProps>;
233
247
 
@@ -240,6 +254,7 @@ type AccordionProps = {
240
254
  upArrowIcon: React.ReactNode;
241
255
  downArrowIcon: React.ReactNode;
242
256
  openByDefault?: boolean;
257
+ borderBottom?: boolean;
243
258
  };
244
259
  declare const Accordion: React.FC<AccordionProps>;
245
260
 
@@ -264,11 +279,11 @@ declare function Dropdown(props: {
264
279
  dropdownList: value[];
265
280
  arrowUp: React.ReactNode;
266
281
  arrowDown: React.ReactNode;
267
- value: value;
282
+ value?: value;
268
283
  }): React.JSX.Element;
269
284
 
270
285
  declare function TextArea(props: {
271
- value: string;
286
+ value?: string;
272
287
  onChange: (event: {
273
288
  target: {
274
289
  value: string;
@@ -279,12 +294,15 @@ declare function TextArea(props: {
279
294
  charText: string;
280
295
  }): React.JSX.Element;
281
296
 
282
- declare const RightDrawer: (props: {
297
+ interface DrawerProps {
283
298
  openSideDrawer: boolean;
284
299
  closeSideDrawer: () => void;
285
300
  width: string;
286
301
  component: React.ReactNode;
287
- }) => React.JSX.Element;
302
+ anchor?: "left" | "right" | "top" | "bottom";
303
+ variant?: "temporary" | "persistent" | "permanent";
304
+ }
305
+ declare const Drawer: React.FC<DrawerProps>;
288
306
 
289
307
  type ToggleSwitchProps = {
290
308
  initialState?: boolean;
@@ -304,16 +322,46 @@ interface SwipeActionWrapperProps {
304
322
  }
305
323
  declare const HoverOptionsWrapper: React.FC<SwipeActionWrapperProps>;
306
324
 
325
+ interface MenuInterface {
326
+ openMenu: boolean;
327
+ closeMenu: () => void;
328
+ component: React.ReactNode;
329
+ menuStyles: string;
330
+ }
331
+ declare const Menu: (props: MenuInterface) => React.JSX.Element;
332
+
307
333
  interface ToastProps {
308
- icon: React.ReactNode;
334
+ icon?: React.ReactNode;
309
335
  text: string;
310
- onUndo?: () => void;
311
- onUndoText?: string;
312
- onHide: () => void;
313
- type: string;
336
+ onAction?: () => void;
337
+ onActionText?: string;
338
+ onHide?: () => void;
339
+ type: ToastStatus;
314
340
  className?: string;
315
341
  duration: number;
342
+ showCrossIcon?: boolean;
343
+ crossIcon?: React.ReactNode;
316
344
  }
317
345
  declare const Toast: React.FC<ToastProps>;
318
346
 
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 };
347
+ interface rangeSlider {
348
+ sliderLimit: number;
349
+ minRange: number;
350
+ maxRange: number;
351
+ text1: string;
352
+ text2: string;
353
+ }
354
+ declare const RangeSlider: (props: rangeSlider) => React.JSX.Element;
355
+
356
+ interface CarouselProps {
357
+ items: CarouselItems[];
358
+ }
359
+ interface CarouselItems {
360
+ src: string;
361
+ type: MediaType;
362
+ alt: string;
363
+ extension: string;
364
+ }
365
+ declare const Carousel: React.FC<CarouselProps>;
366
+
367
+ export { Accordion as Accordian, Avatar, Badge, Breadcrumb as BreadCrumb, Button, Carousel, CustomCheckbox as Checkbox, CircularProgress, GetDirectionAction as Directions, CustomDivider as Divider, Drawer, Dropdown, MapComponent as GoogleMap, HoverOptionsWrapper, CustomInputField as InputTextField, Link, MediaType, Menu, Modal, OTPInput as OtpInput, Progress, CustomRadioButton as RadioButton, RangeSlider, Search, Tabs, TextArea, Toast, ToastStatus, ToggleSwitch, Typography, PdfView as default };