aefis-core-ui 2.1.12 → 2.1.13
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/index.modern.js +29 -11
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -14542,7 +14542,7 @@ const QontoStepIcon = props => {
|
|
|
14542
14542
|
} = props;
|
|
14543
14543
|
return /*#__PURE__*/jsx(QontoStepIconRoot, {
|
|
14544
14544
|
ownerstate: {
|
|
14545
|
-
active
|
|
14545
|
+
active: active
|
|
14546
14546
|
},
|
|
14547
14547
|
className: props.className,
|
|
14548
14548
|
children: props.completed ? /*#__PURE__*/jsx(CheckCircle, {
|
|
@@ -14563,18 +14563,36 @@ QontoStepIcon.propTypes = {
|
|
|
14563
14563
|
completed: PropTypes.bool
|
|
14564
14564
|
};
|
|
14565
14565
|
const Header = props => {
|
|
14566
|
-
const
|
|
14567
|
-
|
|
14568
|
-
|
|
14566
|
+
const currentActiveStep = props.allStepsCompleted ? props.data.length : props.activeStep;
|
|
14567
|
+
const a11yProps = {
|
|
14568
|
+
role: "list",
|
|
14569
|
+
"aria-label": "progress"
|
|
14570
|
+
};
|
|
14571
|
+
const stepA11lyProps = (current, activeStep) => {
|
|
14572
|
+
const a11y = {};
|
|
14573
|
+
if (current === activeStep) {
|
|
14574
|
+
a11y["aria-current"] = "step";
|
|
14575
|
+
}
|
|
14576
|
+
return a11y;
|
|
14577
|
+
};
|
|
14578
|
+
return /*#__PURE__*/jsx(Stepper, _extends({
|
|
14579
|
+
component: "ol"
|
|
14580
|
+
}, a11yProps, {
|
|
14581
|
+
activeStep: currentActiveStep,
|
|
14569
14582
|
alternativeLabel: true,
|
|
14570
14583
|
connector: /*#__PURE__*/jsx(QontoConnector, {}),
|
|
14571
|
-
|
|
14572
|
-
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
|
|
14584
|
+
sx: {
|
|
14585
|
+
listStyle: "none"
|
|
14586
|
+
},
|
|
14587
|
+
children: props.data.map((step, index) => /*#__PURE__*/createElement(Step, _extends({}, stepA11lyProps(index, currentActiveStep), {
|
|
14588
|
+
ariaCurrent: true,
|
|
14589
|
+
component: "li",
|
|
14590
|
+
key: `wizardHeaderStep-${step.id}`
|
|
14591
|
+
}), /*#__PURE__*/jsx(StepLabel, {
|
|
14592
|
+
StepIconComponent: QontoStepIcon,
|
|
14593
|
+
children: step.title
|
|
14594
|
+
})))
|
|
14595
|
+
}));
|
|
14578
14596
|
};
|
|
14579
14597
|
Header.defaultProps = {
|
|
14580
14598
|
allStepsCompleted: false
|