dhre-component-lib 0.3.2 → 0.3.4
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/Accordian/Accordian.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Carousel/Carousel.d.ts +14 -0
- package/dist/components/Carousel/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +4 -3
- package/dist/components/Drawer/Drawer.d.ts +12 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/components/Enum.d.ts +9 -0
- package/dist/components/InputTextField/InputTextField.d.ts +5 -0
- package/dist/components/Menu/Menu.d.ts +10 -0
- package/dist/components/Modal/Modal.d.ts +1 -0
- package/dist/components/OtpInput/OtpInput.d.ts +3 -0
- package/dist/components/RangeSlider/RangeSlider.d.ts +13 -0
- package/dist/components/RangeSlider/index.d.ts +1 -0
- package/dist/components/RightDrawer/RightDrawer.d.ts +6 -3
- package/dist/components/Search/Search.d.ts +2 -1
- package/dist/components/Search/index.d.ts +1 -0
- package/dist/components/Stepper/Stepper.d.ts +22 -0
- package/dist/components/Stepper/index.d.ts +1 -0
- package/dist/components/TextArea/TextArea.d.ts +1 -1
- package/dist/components/Toast/Toast.d.ts +8 -5
- package/dist/index.d.ts +90 -14
- package/dist/index.esm.js +255 -98
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +262 -101
- package/dist/index.js.map +1 -1
- package/dist/theme/colors/colors.scss +51 -40
- package/package.json +71 -71
|
@@ -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,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import './Checkbox.module.scss';
|
|
2
3
|
interface CustomCheckboxProps {
|
|
3
|
-
label?:
|
|
4
|
+
label?: React.ReactNode;
|
|
4
5
|
checked?: boolean;
|
|
5
6
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
6
7
|
className?: string;
|
|
7
8
|
checkboxClassName?: string;
|
|
8
9
|
labelClassName?: string;
|
|
9
10
|
}
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
11
|
+
declare const Checkbox: React.FC<CustomCheckboxProps>;
|
|
12
|
+
export default Checkbox;
|
|
@@ -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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import "./Dropdown.module.scss";
|
|
3
|
-
type value = {
|
|
3
|
+
export type value = {
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|
|
6
6
|
};
|
|
@@ -10,6 +10,6 @@ declare function Dropdown(props: {
|
|
|
10
10
|
dropdownList: value[];
|
|
11
11
|
arrowUp: React.ReactNode;
|
|
12
12
|
arrowDown: React.ReactNode;
|
|
13
|
-
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,11 @@ export interface CustomInputFieldProps {
|
|
|
11
11
|
error?: string;
|
|
12
12
|
errorClassName?: string;
|
|
13
13
|
id?: string;
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
minLength?: number;
|
|
16
|
+
checkValidation?: () => void;
|
|
17
|
+
name?: string;
|
|
18
|
+
min?: string;
|
|
14
19
|
}
|
|
15
20
|
declare const CustomInputField: React.FC<CustomInputFieldProps>;
|
|
16
21
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
getSliderValue?: React.ChangeEventHandler<HTMLInputElement>;
|
|
10
|
+
value?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const RangeSlider: (props: rangeSlider) => React.JSX.Element;
|
|
13
|
+
export default RangeSlider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./RangeSlider";
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
import "./RightDrawer.module.scss";
|
|
3
|
-
|
|
3
|
+
interface RightDrawerProps {
|
|
4
4
|
openSideDrawer: boolean;
|
|
5
5
|
closeSideDrawer: () => void;
|
|
6
6
|
width: string;
|
|
7
7
|
component: React.ReactNode;
|
|
8
|
-
|
|
8
|
+
anchor?: "left" | "right" | "top" | "bottom";
|
|
9
|
+
variant?: "temporary" | "persistent" | "permanent";
|
|
10
|
+
}
|
|
11
|
+
declare const RightDrawer: React.FC<RightDrawerProps>;
|
|
9
12
|
export default RightDrawer;
|
|
@@ -15,12 +15,13 @@ interface CustomSearchFieldProps {
|
|
|
15
15
|
crossIcon: React.ReactNode;
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
onSearch: (query: string) => void;
|
|
18
|
-
onSelectSuggestion
|
|
18
|
+
onSelectSuggestion?: (selectedSuggestion: Suggestion | null) => void;
|
|
19
19
|
suggestions: Suggestion[] | null | undefined;
|
|
20
20
|
placeholder: string;
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Search";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Stepper.module.scss';
|
|
3
|
+
interface stepperData {
|
|
4
|
+
name: string;
|
|
5
|
+
id: number;
|
|
6
|
+
component?: React.ReactNode;
|
|
7
|
+
status?: string;
|
|
8
|
+
}
|
|
9
|
+
interface stepperInterface {
|
|
10
|
+
stepperData: stepperData[];
|
|
11
|
+
type: string;
|
|
12
|
+
showLabelIndex: boolean;
|
|
13
|
+
currentStep?: number;
|
|
14
|
+
successIcon?: React.ReactNode;
|
|
15
|
+
alignment?: string;
|
|
16
|
+
status?: string;
|
|
17
|
+
statusIcon?: React.ReactNode;
|
|
18
|
+
component?: React.ReactNode;
|
|
19
|
+
submittedDate?: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare const Stepper: React.FC<stepperInterface>;
|
|
22
|
+
export default Stepper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Stepper";
|
|
@@ -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
|
|
5
|
+
icon?: React.ReactNode;
|
|
5
6
|
text: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
onHide
|
|
9
|
-
type:
|
|
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:
|
|
33
|
+
label: React.ReactNode;
|
|
25
34
|
onClick?: () => void;
|
|
26
35
|
category?: ButtonCategory;
|
|
27
36
|
loading?: boolean;
|
|
@@ -65,14 +74,14 @@ interface BreadcrumbProps {
|
|
|
65
74
|
declare const Breadcrumb: React.FC<BreadcrumbProps>;
|
|
66
75
|
|
|
67
76
|
interface CustomCheckboxProps {
|
|
68
|
-
label?:
|
|
77
|
+
label?: React.ReactNode;
|
|
69
78
|
checked?: boolean;
|
|
70
79
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
71
80
|
className?: string;
|
|
72
81
|
checkboxClassName?: string;
|
|
73
82
|
labelClassName?: string;
|
|
74
83
|
}
|
|
75
|
-
declare const
|
|
84
|
+
declare const Checkbox: React.FC<CustomCheckboxProps>;
|
|
76
85
|
|
|
77
86
|
interface CircularProgressProps {
|
|
78
87
|
value?: number;
|
|
@@ -135,6 +144,11 @@ interface CustomInputFieldProps {
|
|
|
135
144
|
error?: string;
|
|
136
145
|
errorClassName?: string;
|
|
137
146
|
id?: string;
|
|
147
|
+
maxLength?: number;
|
|
148
|
+
minLength?: number;
|
|
149
|
+
checkValidation?: () => void;
|
|
150
|
+
name?: string;
|
|
151
|
+
min?: string;
|
|
138
152
|
}
|
|
139
153
|
declare const CustomInputField: React.FC<CustomInputFieldProps>;
|
|
140
154
|
|
|
@@ -187,6 +201,9 @@ interface OTPInputProps {
|
|
|
187
201
|
error?: boolean;
|
|
188
202
|
errorText?: string;
|
|
189
203
|
resendText: string;
|
|
204
|
+
showResendButton?: boolean;
|
|
205
|
+
className?: string;
|
|
206
|
+
inputClassName?: string;
|
|
190
207
|
}
|
|
191
208
|
declare const OTPInput: React.FC<OTPInputProps>;
|
|
192
209
|
|
|
@@ -213,12 +230,13 @@ interface CustomSearchFieldProps {
|
|
|
213
230
|
crossIcon: React.ReactNode;
|
|
214
231
|
disabled?: boolean;
|
|
215
232
|
onSearch: (query: string) => void;
|
|
216
|
-
onSelectSuggestion
|
|
233
|
+
onSelectSuggestion?: (selectedSuggestion: Suggestion | null) => void;
|
|
217
234
|
suggestions: Suggestion[] | null | undefined;
|
|
218
235
|
placeholder: string;
|
|
219
236
|
className?: string;
|
|
220
237
|
onSearchIconClick?: () => void;
|
|
221
238
|
onHandleClear?: () => void;
|
|
239
|
+
isWhiteBackgound?: boolean;
|
|
222
240
|
}
|
|
223
241
|
declare const Search: React.FC<CustomSearchFieldProps>;
|
|
224
242
|
|
|
@@ -228,6 +246,7 @@ interface ModalProps {
|
|
|
228
246
|
title?: React.ReactNode;
|
|
229
247
|
children: React.ReactNode;
|
|
230
248
|
crossIcon: React.ReactNode;
|
|
249
|
+
className?: string;
|
|
231
250
|
}
|
|
232
251
|
declare const Modal: React.FC<ModalProps>;
|
|
233
252
|
|
|
@@ -240,6 +259,8 @@ type AccordionProps = {
|
|
|
240
259
|
upArrowIcon: React.ReactNode;
|
|
241
260
|
downArrowIcon: React.ReactNode;
|
|
242
261
|
openByDefault?: boolean;
|
|
262
|
+
borderBottom?: boolean;
|
|
263
|
+
className?: string;
|
|
243
264
|
};
|
|
244
265
|
declare const Accordion: React.FC<AccordionProps>;
|
|
245
266
|
|
|
@@ -264,11 +285,11 @@ declare function Dropdown(props: {
|
|
|
264
285
|
dropdownList: value[];
|
|
265
286
|
arrowUp: React.ReactNode;
|
|
266
287
|
arrowDown: React.ReactNode;
|
|
267
|
-
value
|
|
288
|
+
value?: value;
|
|
268
289
|
}): React.JSX.Element;
|
|
269
290
|
|
|
270
291
|
declare function TextArea(props: {
|
|
271
|
-
value
|
|
292
|
+
value?: string;
|
|
272
293
|
onChange: (event: {
|
|
273
294
|
target: {
|
|
274
295
|
value: string;
|
|
@@ -279,12 +300,15 @@ declare function TextArea(props: {
|
|
|
279
300
|
charText: string;
|
|
280
301
|
}): React.JSX.Element;
|
|
281
302
|
|
|
282
|
-
|
|
303
|
+
interface DrawerProps {
|
|
283
304
|
openSideDrawer: boolean;
|
|
284
305
|
closeSideDrawer: () => void;
|
|
285
306
|
width: string;
|
|
286
307
|
component: React.ReactNode;
|
|
287
|
-
|
|
308
|
+
anchor?: "left" | "right" | "top" | "bottom";
|
|
309
|
+
variant?: "temporary" | "persistent" | "permanent";
|
|
310
|
+
}
|
|
311
|
+
declare const Drawer: React.FC<DrawerProps>;
|
|
288
312
|
|
|
289
313
|
type ToggleSwitchProps = {
|
|
290
314
|
initialState?: boolean;
|
|
@@ -304,16 +328,68 @@ interface SwipeActionWrapperProps {
|
|
|
304
328
|
}
|
|
305
329
|
declare const HoverOptionsWrapper: React.FC<SwipeActionWrapperProps>;
|
|
306
330
|
|
|
331
|
+
interface MenuInterface {
|
|
332
|
+
openMenu: boolean;
|
|
333
|
+
closeMenu: () => void;
|
|
334
|
+
component: React.ReactNode;
|
|
335
|
+
menuStyles: string;
|
|
336
|
+
}
|
|
337
|
+
declare const Menu: (props: MenuInterface) => React.JSX.Element;
|
|
338
|
+
|
|
307
339
|
interface ToastProps {
|
|
308
|
-
icon
|
|
340
|
+
icon?: React.ReactNode;
|
|
309
341
|
text: string;
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
onHide
|
|
313
|
-
type:
|
|
342
|
+
onAction?: () => void;
|
|
343
|
+
onActionText?: string;
|
|
344
|
+
onHide?: () => void;
|
|
345
|
+
type: ToastStatus;
|
|
314
346
|
className?: string;
|
|
315
347
|
duration: number;
|
|
348
|
+
showCrossIcon?: boolean;
|
|
349
|
+
crossIcon?: React.ReactNode;
|
|
316
350
|
}
|
|
317
351
|
declare const Toast: React.FC<ToastProps>;
|
|
318
352
|
|
|
319
|
-
|
|
353
|
+
interface rangeSlider {
|
|
354
|
+
sliderLimit: number;
|
|
355
|
+
minRange: number;
|
|
356
|
+
maxRange: number;
|
|
357
|
+
text1: string;
|
|
358
|
+
text2: string;
|
|
359
|
+
getSliderValue?: React.ChangeEventHandler<HTMLInputElement>;
|
|
360
|
+
value?: string;
|
|
361
|
+
}
|
|
362
|
+
declare const RangeSlider: (props: rangeSlider) => React.JSX.Element;
|
|
363
|
+
|
|
364
|
+
interface CarouselProps {
|
|
365
|
+
items: CarouselItems[];
|
|
366
|
+
}
|
|
367
|
+
interface CarouselItems {
|
|
368
|
+
src: string;
|
|
369
|
+
type: MediaType;
|
|
370
|
+
alt: string;
|
|
371
|
+
extension: string;
|
|
372
|
+
}
|
|
373
|
+
declare const Carousel: React.FC<CarouselProps>;
|
|
374
|
+
|
|
375
|
+
interface stepperData {
|
|
376
|
+
name: string;
|
|
377
|
+
id: number;
|
|
378
|
+
component?: React.ReactNode;
|
|
379
|
+
status?: string;
|
|
380
|
+
}
|
|
381
|
+
interface stepperInterface {
|
|
382
|
+
stepperData: stepperData[];
|
|
383
|
+
type: string;
|
|
384
|
+
showLabelIndex: boolean;
|
|
385
|
+
currentStep?: number;
|
|
386
|
+
successIcon?: React.ReactNode;
|
|
387
|
+
alignment?: string;
|
|
388
|
+
status?: string;
|
|
389
|
+
statusIcon?: React.ReactNode;
|
|
390
|
+
component?: React.ReactNode;
|
|
391
|
+
submittedDate?: React.ReactNode;
|
|
392
|
+
}
|
|
393
|
+
declare const Stepper: React.FC<stepperInterface>;
|
|
394
|
+
|
|
395
|
+
export { Accordion as Accordian, Avatar, Badge, Breadcrumb as BreadCrumb, Button, ButtonCategory, Carousel, 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, Stepper, Tabs, TextArea, Toast, ToastStatus, ToggleSwitch, Typography, PdfView as default };
|