dhre-component-lib 0.3.4 → 0.3.5
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/OtpInput/OtpInput.d.ts +2 -2
- package/dist/components/Stepper/Stepper.d.ts +6 -4
- package/dist/index.d.ts +8 -6
- package/dist/index.esm.js +17 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +17 -19
- package/dist/index.js.map +1 -1
- package/dist/theme/colors/colors.scss +4 -1
- package/package.json +1 -1
- package/dist/components/RightDrawer/RightDrawer.d.ts +0 -12
- package/dist/components/RightDrawer/index.d.ts +0 -1
|
@@ -7,8 +7,8 @@ interface OTPInputProps {
|
|
|
7
7
|
onResend: () => void;
|
|
8
8
|
resendDelay?: number;
|
|
9
9
|
error?: boolean;
|
|
10
|
-
errorText?:
|
|
11
|
-
resendText:
|
|
10
|
+
errorText?: React.ReactNode;
|
|
11
|
+
resendText: React.ReactNode;
|
|
12
12
|
showResendButton?: boolean;
|
|
13
13
|
className?: string;
|
|
14
14
|
inputClassName?: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './Stepper.module.scss';
|
|
3
|
-
interface
|
|
3
|
+
interface StepperData {
|
|
4
4
|
name: string;
|
|
5
5
|
id: number;
|
|
6
6
|
component?: React.ReactNode;
|
|
7
7
|
status?: string;
|
|
8
8
|
}
|
|
9
|
-
interface
|
|
10
|
-
stepperData:
|
|
9
|
+
interface StepperInterface {
|
|
10
|
+
stepperData: StepperData[];
|
|
11
11
|
type: string;
|
|
12
12
|
showLabelIndex: boolean;
|
|
13
13
|
currentStep?: number;
|
|
@@ -17,6 +17,8 @@ interface stepperInterface {
|
|
|
17
17
|
statusIcon?: React.ReactNode;
|
|
18
18
|
component?: React.ReactNode;
|
|
19
19
|
submittedDate?: React.ReactNode;
|
|
20
|
+
dividerWidth?: string;
|
|
21
|
+
variant?: any;
|
|
20
22
|
}
|
|
21
|
-
declare const Stepper: React.FC<
|
|
23
|
+
declare const Stepper: React.FC<StepperInterface>;
|
|
22
24
|
export default Stepper;
|
package/dist/index.d.ts
CHANGED
|
@@ -199,8 +199,8 @@ interface OTPInputProps {
|
|
|
199
199
|
onResend: () => void;
|
|
200
200
|
resendDelay?: number;
|
|
201
201
|
error?: boolean;
|
|
202
|
-
errorText?:
|
|
203
|
-
resendText:
|
|
202
|
+
errorText?: React.ReactNode;
|
|
203
|
+
resendText: React.ReactNode;
|
|
204
204
|
showResendButton?: boolean;
|
|
205
205
|
className?: string;
|
|
206
206
|
inputClassName?: string;
|
|
@@ -372,14 +372,14 @@ interface CarouselItems {
|
|
|
372
372
|
}
|
|
373
373
|
declare const Carousel: React.FC<CarouselProps>;
|
|
374
374
|
|
|
375
|
-
interface
|
|
375
|
+
interface StepperData {
|
|
376
376
|
name: string;
|
|
377
377
|
id: number;
|
|
378
378
|
component?: React.ReactNode;
|
|
379
379
|
status?: string;
|
|
380
380
|
}
|
|
381
|
-
interface
|
|
382
|
-
stepperData:
|
|
381
|
+
interface StepperInterface {
|
|
382
|
+
stepperData: StepperData[];
|
|
383
383
|
type: string;
|
|
384
384
|
showLabelIndex: boolean;
|
|
385
385
|
currentStep?: number;
|
|
@@ -389,7 +389,9 @@ interface stepperInterface {
|
|
|
389
389
|
statusIcon?: React.ReactNode;
|
|
390
390
|
component?: React.ReactNode;
|
|
391
391
|
submittedDate?: React.ReactNode;
|
|
392
|
+
dividerWidth?: string;
|
|
393
|
+
variant?: any;
|
|
392
394
|
}
|
|
393
|
-
declare const Stepper: React.FC<
|
|
395
|
+
declare const Stepper: React.FC<StepperInterface>;
|
|
394
396
|
|
|
395
397
|
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 };
|
package/dist/index.esm.js
CHANGED
|
@@ -9835,29 +9835,27 @@ const Carousel = ({ items }) => {
|
|
|
9835
9835
|
React.createElement("div", { className: "carousel-dots" }, items.map((_, index) => (React.createElement("span", { key: index, "data-testid": `dot-${index}`, className: `dot ${index === currentIndex ? "active" : ""}`, onClick: () => handleDotClick(index) }))))));
|
|
9836
9836
|
};
|
|
9837
9837
|
|
|
9838
|
-
var css = ".stepperCircle {\n width: 1.75rem;\n height: 1.75rem;\n border-radius: 50%;\n border: 2px solid #000000;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n\n.contentSecondary {\n color: #686868;\n}\n\n.stepperSuccessBorder {\n border: none;\n}\n\n.stepperNotReachedBorder {\n border: 2px solid #a7a7a7;\n}\n\n.stepperAlignment {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: baseline;\n justify-content: space-between;\n}\n\n.stepperItem {\n display: flex;\n flex-direction: row;\n align-items: center;\n margin-bottom: 1rem;\n}\n\n.marginRight1 {\n margin-right: 1rem;\n}\n\n.stepperVerticalItem {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n.stepperDivider {\n width: 88%;\n border: 2px dashed #898989;\n height: 0.125rem;\n margin-left: 1rem;\n margin-right: 1rem;\n}\n\n.stepperDisabledDivider {\n width: 88%;\n border: 2px dashed #898989;\n height: 0.125rem;\n margin-left: 1rem;\n margin-right: 1rem;\n}\n\n.stepperPlainDivider {\n width: 88%;\n border: 2px solid #000000;\n height: 0.125rem;\n margin-left: 1rem;\n margin-right: 1rem;\n}\n\n.stepperVerticalDivider {\n border-left: 2px solid #000000;\n min-height: 2rem;\n max-height: 100%;\n margin-left: 1rem;\n padding-left: 2rem;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n\n.stepperVerticalCircle {\n width: 2.5rem;\n height: 2.5rem;\n border-radius: 50%;\n border: 2px solid #000000;\n color: #ffffff;\n background: #000000;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n margin-right: 1rem;\n}\n\n.stepperVerticalDisabledDivider {\n width: 50%;\n border-left: 2px dashed #898989;\n min-height: 1rem;\n max-height: 100%;\n margin-left: 0.7rem;\n padding-left: 2rem;\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n\n.stepperVerticalPlainDivider {\n width: 50%;\n border-left: 2px solid #00b578;\n min-height: 1rem;\n max-height: 100%;\n margin-left: 0.7rem;\n padding-left: 2rem;\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n\n.paddingLeft2 {\n padding-left: 2.7rem;\n}\n\n.stepperVerticalAlignment {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.flex {\n display: flex;\n flex-direction: row;\n}\n\n.warning {\n color: #eb8425;\n}\n\n.error {\n color: #eb0542;\n}\n\n.stepperWarningCircle {\n border: 2px solid #eb8425;\n}\n\n.stepperErrorCircle {\n border: 2px solid #eb0542;\n}\n\n.flexCenter {\n display: flex;\n flex-direction: row;\n align-items: center;\n}";
|
|
9838
|
+
var css = ".stepperCircle {\n width: 1.75rem;\n height: 1.75rem;\n border-radius: 50%;\n border: 2px solid #000000;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n\n.contentSecondary {\n color: #686868;\n}\n\n.stepperSuccessBorder {\n border: none;\n}\n\n.stepperNotReachedBorder {\n border: 2px solid #a7a7a7;\n}\n\n.stepperAlignment {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: baseline;\n justify-content: space-between;\n}\n\n.stepperItem {\n display: flex;\n flex-direction: row;\n align-items: center;\n margin-bottom: 1rem;\n}\n\n.marginRight1 {\n margin-right: 1rem;\n}\n\n.stepperVerticalItem {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n.stepperDivider {\n width: 88%;\n border: 2px dashed #898989;\n height: 0.125rem;\n margin-left: 1rem;\n margin-right: 1rem;\n}\n\n.stepperDisabledDivider {\n width: 88%;\n border: 2px dashed #898989;\n height: 0.125rem;\n margin-left: 1rem;\n margin-right: 1rem;\n}\n\n.stepperPlainDivider {\n width: 88%;\n border: 2px solid #000000;\n height: 0.125rem;\n margin-left: 1rem;\n margin-right: 1rem;\n}\n\n.stepperVerticalDivider {\n border-left: 2px solid #000000;\n min-height: 2rem;\n max-height: 100%;\n margin-left: 1rem;\n padding-left: 2rem;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n\n.stepperVerticalCircle {\n min-width: 2.5rem;\n height: 2.5rem;\n border-radius: 50%;\n border: 2px solid #000000;\n color: #ffffff;\n background: #000000;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n margin-right: 1rem;\n}\n\n.stepperVerticalDisabledDivider {\n width: 50%;\n border-left: 2px dashed #898989;\n min-height: 1rem;\n max-height: 100%;\n margin-left: 0.7rem;\n padding-left: 2rem;\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n\n.stepperVerticalPlainDivider {\n width: 50%;\n border-left: 2px solid #00b578;\n min-height: 1rem;\n max-height: 100%;\n margin-left: 0.7rem;\n padding-left: 2rem;\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n\n.paddingLeft2 {\n padding-left: 2.7rem;\n}\n\n.stepperVerticalAlignment {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.flex {\n display: flex;\n flex-direction: row;\n}\n\n.warning {\n color: #eb8425;\n}\n\n.error {\n color: #eb0542;\n}\n\n.stepperWarningCircle {\n border: 2px solid #eb8425;\n}\n\n.stepperErrorCircle {\n border: 2px solid #eb0542;\n}\n\n.flexCenter {\n display: flex;\n flex-direction: row;\n align-items: center;\n}";
|
|
9839
9839
|
n(css,{});
|
|
9840
9840
|
|
|
9841
|
-
const Stepper = ({ submittedDate, component, status, statusIcon, successIcon, currentStep, stepperData, type, alignment, showLabelIndex }) => {
|
|
9841
|
+
const Stepper = ({ variant, dividerWidth, submittedDate, component, status, statusIcon, successIcon, currentStep, stepperData, type, alignment, showLabelIndex }) => {
|
|
9842
9842
|
return (React.createElement(React.Fragment, null,
|
|
9843
9843
|
alignment !== "vertical" && React.createElement(React.Fragment, null,
|
|
9844
9844
|
type === "static" &&
|
|
9845
|
-
React.createElement("div", { className: 'stepperAlignment' }, stepperData?.map((val) => (React.createElement(
|
|
9846
|
-
React.createElement("div", {
|
|
9847
|
-
React.createElement("div", { className: '
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
React.createElement(Typography, { variant: 'B2', weight: 'SEMI_BOLD' }, val?.name)))))),
|
|
9845
|
+
React.createElement("div", { className: 'stepperAlignment' }, stepperData?.map((val) => (React.createElement("div", { key: val.id, style: { width: val.id < stepperData.length ? 100 / (stepperData.length - 1) + '%' : '' } },
|
|
9846
|
+
React.createElement("div", { className: 'stepperItem' },
|
|
9847
|
+
React.createElement("div", { className: 'stepperCircle' }, showLabelIndex ? val.id : ''),
|
|
9848
|
+
val.id < stepperData.length && React.createElement("div", { className: 'stepperDivider' }, " ")),
|
|
9849
|
+
React.createElement(Typography, { variant: variant, weight: 'SEMI_BOLD' }, val?.name))))),
|
|
9851
9850
|
type === "dynamic" &&
|
|
9852
|
-
React.createElement("div", { className: 'stepperAlignment' }, stepperData?.map((val) => (React.createElement(
|
|
9853
|
-
React.createElement("div", {
|
|
9854
|
-
React.createElement("div", { className: '
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
React.createElement(Typography, { className: (currentStep && (currentStep < val.id)) ? 'contentSecondary' : '', variant: 'B2', weight: 'SEMI_BOLD' }, val?.name))))))),
|
|
9851
|
+
React.createElement("div", { className: 'stepperAlignment' }, stepperData?.map((val) => (React.createElement("div", { key: val.id, style: { width: val.id < stepperData.length ? 100 / (stepperData.length - 1) + '%' : '' } },
|
|
9852
|
+
React.createElement("div", { className: 'stepperItem' },
|
|
9853
|
+
(currentStep && (currentStep === val.id || currentStep < val.id)) && React.createElement("div", { className: `${'stepperCircle'} ${currentStep < val.id ? 'stepperNotReachedBorder' : ""}` }, showLabelIndex ? val.id : ''),
|
|
9854
|
+
(currentStep && currentStep > val.id) && React.createElement("div", { className: `${'stepperCircle'} ${'stepperSuccessBorder'}` }, successIcon),
|
|
9855
|
+
val.id < stepperData.length && React.createElement("div", { className: (currentStep && currentStep > val.id) ? 'stepperPlainDivider' : 'stepperDisabledDivider', style: { width: dividerWidth ?? '' } }, " ")),
|
|
9856
|
+
React.createElement(Typography, { className: (currentStep && (currentStep < val.id)) ? 'contentSecondary' : '', variant: variant, weight: 'SEMI_BOLD' }, val?.name)))))),
|
|
9859
9857
|
alignment === "vertical" && React.createElement(React.Fragment, null,
|
|
9860
|
-
type === "dynamic" &&
|
|
9858
|
+
type === "dynamic" &&
|
|
9861
9859
|
React.createElement("div", { className: 'stepperVerticalAlignment' }, stepperData?.map((val) => (React.createElement(React.Fragment, null,
|
|
9862
9860
|
React.createElement("div", { className: 'stepperVerticalItem' },
|
|
9863
9861
|
React.createElement("div", { className: 'flex' },
|
|
@@ -9873,14 +9871,14 @@ const Stepper = ({ submittedDate, component, status, statusIcon, successIcon, cu
|
|
|
9873
9871
|
((currentStep && (val.id < currentStep)) || ((currentStep === val.id) && status !== "Pending")) && React.createElement("div", null, submittedDate),
|
|
9874
9872
|
" ",
|
|
9875
9873
|
React.createElement("div", null, val.component),
|
|
9876
|
-
" "))))))
|
|
9877
|
-
type === "static" &&
|
|
9874
|
+
" ")))))),
|
|
9875
|
+
type === "static" &&
|
|
9878
9876
|
React.createElement("div", { className: 'stepperVerticalAlignment' }, stepperData?.map((val) => (React.createElement(React.Fragment, null,
|
|
9879
9877
|
React.createElement("div", { className: 'stepperVerticalItem' },
|
|
9880
9878
|
React.createElement("div", { className: 'flexCenter' },
|
|
9881
9879
|
React.createElement("div", { className: 'stepperVerticalCircle' }, showLabelIndex ? val.id : ''),
|
|
9882
9880
|
React.createElement(Typography, { variant: 'B2', weight: 'SEMI_BOLD' }, val?.name))),
|
|
9883
|
-
React.createElement("div", null, val.id < stepperData.length && React.createElement("div", { className: 'stepperVerticalDivider' }, " ")))))))))
|
|
9881
|
+
React.createElement("div", null, val.id < stepperData.length && React.createElement("div", { className: 'stepperVerticalDivider' }, " ")))))))));
|
|
9884
9882
|
};
|
|
9885
9883
|
|
|
9886
9884
|
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 };
|