allaw-ui 3.8.7 → 3.8.8

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.
@@ -46,6 +46,7 @@ export interface StepperProps {
46
46
  top?: number;
47
47
  bottom?: number;
48
48
  };
49
+ maxWidth?: number;
49
50
  }
50
51
  declare const Stepper: React.FC<StepperProps>;
51
52
  export default Stepper;
@@ -46,8 +46,8 @@ import SecondaryButton from "../../atoms/buttons/SecondaryButton";
46
46
  import ConfirmationModal from "./ConfirmationModal";
47
47
  var Stepper = function (_a) {
48
48
  var _b, _c, _d, _e, _f;
49
- var steps = _a.steps, currentStep = _a.currentStep, _g = _a.startIcon, startIcon = _g === void 0 ? [] : _g, _h = _a.endIcon, endIcon = _h === void 0 ? true : _h, children = _a.children, _j = _a.secondaryButton, secondaryButton = _j === void 0 ? [] : _j, _k = _a.primaryButton, primaryButton = _k === void 0 ? [] : _k, _l = _a.showProgressBar, showProgressBar = _l === void 0 ? [] : _l, onClose = _a.onClose, validateStep = _a.validateStep, confirmationModal = _a.confirmationModal, onModalCancel = _a.onModalCancel, onModalConfirm = _a.onModalConfirm, verticalOffset = _a.verticalOffset;
50
- var _m = useState(false), isVisible = _m[0], setIsVisible = _m[1];
49
+ var steps = _a.steps, currentStep = _a.currentStep, _g = _a.startIcon, startIcon = _g === void 0 ? [] : _g, _h = _a.endIcon, endIcon = _h === void 0 ? true : _h, children = _a.children, _j = _a.secondaryButton, secondaryButton = _j === void 0 ? [] : _j, _k = _a.primaryButton, primaryButton = _k === void 0 ? [] : _k, _l = _a.showProgressBar, showProgressBar = _l === void 0 ? [] : _l, onClose = _a.onClose, validateStep = _a.validateStep, confirmationModal = _a.confirmationModal, onModalCancel = _a.onModalCancel, onModalConfirm = _a.onModalConfirm, verticalOffset = _a.verticalOffset, _m = _a.maxWidth, maxWidth = _m === void 0 ? 768 : _m;
50
+ var _o = useState(false), isVisible = _o[0], setIsVisible = _o[1];
51
51
  var portalContainerRef = useRef(null);
52
52
  var stepperContainerRef = useRef(null);
53
53
  // Effet pour bloquer le scroll du body quand le stepper est visible
@@ -138,7 +138,7 @@ var Stepper = function (_a) {
138
138
  ? "".concat(verticalOffset.bottom, "px")
139
139
  : undefined,
140
140
  } },
141
- React.createElement("div", { className: "stepper-container ".concat((confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.show) ? "modal-active" : ""), onClick: function (e) { return e.stopPropagation(); }, ref: stepperContainerRef },
141
+ React.createElement("div", { className: "stepper-container ".concat((confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.show) ? "modal-active" : ""), onClick: function (e) { return e.stopPropagation(); }, ref: stepperContainerRef, style: { maxWidth: "".concat(maxWidth, "px") } },
142
142
  React.createElement(ProgressBar, { steps: steps, currentStep: currentStep, startIcon: currentShowStartIcon, endIcon: endIcon, onStartIconClick: handlePrevious, onEndIconClick: handleClose, showProgressBar: currentShowProgressBar }),
143
143
  React.createElement("div", { className: "stepper-content" }, children[currentStep - 1]),
144
144
  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)
@@ -34,6 +34,15 @@ declare namespace _default {
34
34
  let description_2: string;
35
35
  export { description_2 as description };
36
36
  }
37
+ namespace maxWidth {
38
+ export namespace control_4 {
39
+ let type_4: string;
40
+ export { type_4 as type };
41
+ }
42
+ export { control_4 as control };
43
+ let description_3: string;
44
+ export { description_3 as description };
45
+ }
37
46
  }
38
47
  export namespace parameters {
39
48
  namespace backgrounds {
@@ -49,4 +58,5 @@ declare namespace _default {
49
58
  export default _default;
50
59
  export const Default: any;
51
60
  export const WithLargeOffset: any;
61
+ export const WithCustomWidth: any;
52
62
  import Stepper from "./Stepper";
@@ -77,6 +77,12 @@ export default {
77
77
  },
78
78
  description: "Décalage vertical du stepper (en px) pour éviter les barres de navigation",
79
79
  },
80
+ maxWidth: {
81
+ control: {
82
+ type: "number",
83
+ },
84
+ description: "Largeur maximale du stepper en pixels (défaut: 768px)",
85
+ },
80
86
  },
81
87
  parameters: {
82
88
  backgrounds: {
@@ -204,3 +210,6 @@ WithLargeOffset.args = __assign(__assign({}, Default.args), { verticalOffset: {
204
210
  top: 120,
205
211
  bottom: 80,
206
212
  } });
213
+ // Ajouter une story avec une largeur personnalisée
214
+ export var WithCustomWidth = Template.bind({});
215
+ WithCustomWidth.args = __assign(__assign({}, Default.args), { maxWidth: 580 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "3.8.7",
3
+ "version": "3.8.8",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",