allaw-ui 2.6.2 → 2.6.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.
|
@@ -199,3 +199,19 @@
|
|
|
199
199
|
transform: scale(1);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
+
|
|
203
|
+
.stepper-button-container.auto-width {
|
|
204
|
+
width: auto;
|
|
205
|
+
margin: 0 auto;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.stepper-button-container.auto-width button {
|
|
209
|
+
width: auto;
|
|
210
|
+
min-width: 150px;
|
|
211
|
+
padding-left: 24px;
|
|
212
|
+
padding-right: 24px;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.stepper-buttons .primary-button-container.auto-width:only-child {
|
|
216
|
+
width: auto;
|
|
217
|
+
}
|
|
@@ -16,6 +16,7 @@ export interface StepperProps {
|
|
|
16
16
|
startIconName?: string;
|
|
17
17
|
endIconName?: string;
|
|
18
18
|
onSecondaryButtonClick?: (step: number) => void;
|
|
19
|
+
fullWidth?: boolean;
|
|
19
20
|
}[];
|
|
20
21
|
primaryButton?: {
|
|
21
22
|
show: boolean;
|
|
@@ -26,6 +27,7 @@ export interface StepperProps {
|
|
|
26
27
|
endIconName?: string;
|
|
27
28
|
onPrimaryButtonClick?: (step: number) => void;
|
|
28
29
|
disabled?: boolean;
|
|
30
|
+
fullWidth?: boolean;
|
|
29
31
|
}[];
|
|
30
32
|
showProgressBar?: boolean[];
|
|
31
33
|
onClose?: () => void;
|
|
@@ -131,10 +131,10 @@ var Stepper = function (_a) {
|
|
|
131
131
|
React.createElement("div", { className: "stepper-buttons ".concat(!(currentSecondaryButton === null || currentSecondaryButton === void 0 ? void 0 : currentSecondaryButton.show) && !(currentPrimaryButton === null || currentPrimaryButton === void 0 ? void 0 : currentPrimaryButton.show)
|
|
132
132
|
? "no-buttons"
|
|
133
133
|
: "") },
|
|
134
|
-
(currentSecondaryButton === null || currentSecondaryButton === void 0 ? void 0 : currentSecondaryButton.show) && (React.createElement("div", { className: "stepper-button-container secondary-button-container" },
|
|
135
|
-
React.createElement(SecondaryButton, { fullWidth:
|
|
136
|
-
(currentPrimaryButton === null || currentPrimaryButton === void 0 ? void 0 : currentPrimaryButton.show) && (React.createElement("div", { className: "stepper-button-container primary-button-container" },
|
|
137
|
-
React.createElement(PrimaryButton, { fullWidth:
|
|
134
|
+
(currentSecondaryButton === null || currentSecondaryButton === void 0 ? void 0 : currentSecondaryButton.show) && (React.createElement("div", { className: "stepper-button-container secondary-button-container ".concat(currentSecondaryButton.fullWidth === false ? "auto-width" : "") },
|
|
135
|
+
React.createElement(SecondaryButton, { fullWidth: currentSecondaryButton.fullWidth !== false, label: currentSecondaryButton.label, startIcon: currentSecondaryButton.startIconName ? true : undefined, endIcon: currentSecondaryButton.endIconName ? true : undefined, startIconName: currentSecondaryButton.startIconName, endIconName: currentSecondaryButton.endIconName, onClick: function () { var _a; return (_a = currentSecondaryButton.onSecondaryButtonClick) === null || _a === void 0 ? void 0 : _a.call(currentSecondaryButton, currentStep); } }))),
|
|
136
|
+
(currentPrimaryButton === null || currentPrimaryButton === void 0 ? void 0 : currentPrimaryButton.show) && (React.createElement("div", { className: "stepper-button-container primary-button-container ".concat(currentPrimaryButton.fullWidth === false ? "auto-width" : "") },
|
|
137
|
+
React.createElement(PrimaryButton, { fullWidth: currentPrimaryButton.fullWidth !== false, label: currentPrimaryButton.label, startIcon: currentPrimaryButton.startIconName ? true : undefined, endIcon: currentPrimaryButton.endIconName ? true : undefined, startIconName: currentPrimaryButton.startIconName, endIconName: currentPrimaryButton.endIconName, disabled: currentPrimaryButton.disabled, onClick: handleNext })))),
|
|
138
138
|
React.createElement(ConfirmationModal, { show: (_b = confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.show) !== null && _b !== void 0 ? _b : false, title: (_c = confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.title) !== null && _c !== void 0 ? _c : "Confirmation", description: (_d = confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.description) !== null && _d !== void 0 ? _d : "Voulez-vous continuer ?", confirmLabel: (_e = confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.confirmLabel) !== null && _e !== void 0 ? _e : "Confirmer", cancelLabel: (_f = confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.cancelLabel) !== null && _f !== void 0 ? _f : "Annuler", onConfirm: onModalConfirm !== null && onModalConfirm !== void 0 ? onModalConfirm : (function () { }), onCancel: onModalCancel !== null && onModalCancel !== void 0 ? onModalCancel : (function () { }), isDanger: confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.isDanger }))));
|
|
139
139
|
return portalContainerRef.current && isVisible
|
|
140
140
|
? ReactDOM.createPortal(stepperContent, portalContainerRef.current)
|