@m4l/components 9.3.17 → 9.3.18

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.
@@ -57,13 +57,20 @@ function Stepper(props) {
57
57
  if (!hasPresentFlags) {
58
58
  return null;
59
59
  }
60
- return /* @__PURE__ */ jsx(StepperProvider, { ...props, children: /* @__PURE__ */ jsxs(StepperRootStyled, { className: clsx(classRoot, className), children: [
61
- /* @__PURE__ */ jsxs(ContentSectionStyled, { ownerState, children: [
62
- /* @__PURE__ */ jsx(StepArea, {}),
63
- /* @__PURE__ */ jsx(ContentArea, { children: stepperContent })
64
- ] }),
65
- stepperFooter
66
- ] }) });
60
+ return /* @__PURE__ */ jsx(StepperProvider, { ...props, children: /* @__PURE__ */ jsxs(
61
+ StepperRootStyled,
62
+ {
63
+ className: clsx(classRoot, className),
64
+ "data-testid": "stepper-root",
65
+ children: [
66
+ /* @__PURE__ */ jsxs(ContentSectionStyled, { ownerState, children: [
67
+ /* @__PURE__ */ jsx(StepArea, {}),
68
+ /* @__PURE__ */ jsx(ContentArea, { children: stepperContent })
69
+ ] }),
70
+ stepperFooter
71
+ ]
72
+ }
73
+ ) });
67
74
  }
68
75
  export {
69
76
  Stepper as S
@@ -11,13 +11,20 @@ function ContentArea(props) {
11
11
  const ownerState = {
12
12
  orientation
13
13
  };
14
- return /* @__PURE__ */ jsxs(ContentAreaStyled, { ownerState, children: [
15
- /* @__PURE__ */ jsxs(ContentAreaHeaderStyled, { children: [
16
- /* @__PURE__ */ jsx(WrapperIcon, {}),
17
- /* @__PURE__ */ jsx(WrapperTitle, {})
18
- ] }),
19
- /* @__PURE__ */ jsx(ContentAreaBodyStyled, { children })
20
- ] });
14
+ return /* @__PURE__ */ jsxs(
15
+ ContentAreaStyled,
16
+ {
17
+ ownerState,
18
+ "data-testid": "stepper-content-area",
19
+ children: [
20
+ /* @__PURE__ */ jsxs(ContentAreaHeaderStyled, { "data-testid": "stepper-content-area-header", children: [
21
+ /* @__PURE__ */ jsx(WrapperIcon, {}),
22
+ /* @__PURE__ */ jsx(WrapperTitle, {})
23
+ ] }),
24
+ /* @__PURE__ */ jsx(ContentAreaBodyStyled, { "data-testid": "stepper-content-area-body", children })
25
+ ]
26
+ }
27
+ );
21
28
  }
22
29
  export {
23
30
  ContentArea as C
@@ -17,7 +17,7 @@ function WrapperIcon() {
17
17
  IconStyled,
18
18
  {
19
19
  color: "primary.enabled",
20
- src: currentStepConfig.icon ? currentStepConfig.icon : `${host_static_assets}/${environment_assets}/${pathIcons.patronum}`
20
+ src: currentStepConfig?.icon ? currentStepConfig.icon : `${host_static_assets}/${environment_assets}/${pathIcons.patronum}`
21
21
  }
22
22
  ) });
23
23
  }
@@ -100,7 +100,7 @@ function StepArea() {
100
100
  }
101
101
  }
102
102
  };
103
- return /* @__PURE__ */ jsx(StepAreaStyled, { ownerState, children: validSteps.map((step, validIndex) => {
103
+ return /* @__PURE__ */ jsx(StepAreaStyled, { ownerState, "data-testid": "stepper-step-area", children: validSteps.map((step, validIndex) => {
104
104
  const originalIndex = steps.findIndex((s) => s.key === step.key);
105
105
  const totalVisibleSteps = validSteps.filter(
106
106
  (s) => evaluateVisibilityStepCondition(s, formValues || {}, visibilityData)
@@ -120,6 +120,7 @@ function StepArea() {
120
120
  visibilityData
121
121
  )
122
122
  },
123
+ "data-testid": `stepper-step-${step.key}`,
123
124
  children: [
124
125
  visibleTitle && /* @__PURE__ */ jsx(
125
126
  StepNameStyled,
@@ -16,7 +16,8 @@ function StepperCancelButton() {
16
16
  label: getLabel(DICTIONARY.LABEL_CANCEL_BUTTON),
17
17
  variant: "outlined",
18
18
  color: "default",
19
- onClick: handleCancel
19
+ onClick: handleCancel,
20
+ "data-testid": "stepper-cancel-button"
20
21
  }
21
22
  );
22
23
  }
@@ -38,7 +38,7 @@ function StepperFooter(props) {
38
38
  stepperFooterRightActions: parsedRightActions
39
39
  };
40
40
  }, [children]);
41
- return /* @__PURE__ */ jsxs(StepperFooterSectionStyled, { children: [
41
+ return /* @__PURE__ */ jsxs(StepperFooterSectionStyled, { "data-testid": "stepper-footer", children: [
42
42
  stepperFooterLeftActions,
43
43
  stepperFooterRightActions
44
44
  ] });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { StepperProps } from '../types';
2
+ export declare const mockSteps: StepperProps['steps'];
3
+ export declare const defaultProps: StepperProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.3.17",
3
+ "version": "9.3.18",
4
4
  "license": "UNLICENSED",
5
5
  "description": "M4L Components",
6
6
  "lint-staged": {