@axa-fr/design-system-look-and-feel-react 1.0.5-ci.57 → 1.0.5-ci.58
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/Stepper/Stepper.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { useCallback, useId } from "react";
|
3
|
-
import classNames from "classnames";
|
4
2
|
import "@axa-fr/design-system-look-and-feel-css/dist/Stepper/Stepper.scss";
|
3
|
+
import classNames from "classnames";
|
4
|
+
import { useCallback, useId } from "react";
|
5
5
|
const INITIAL_STEPPER_PROGRESS = 10;
|
6
6
|
const MAX_STEPPER_PROGRESS = 100;
|
7
7
|
export const Stepper = ({ currentStepProgress = INITIAL_STEPPER_PROGRESS, currentTitle, nbSteps, currentStep, currentSubtitle, isTitleVisible = true, isSubtitleVisible = true, className, ...props }) => {
|
@@ -18,5 +18,5 @@ export const Stepper = ({ currentStepProgress = INITIAL_STEPPER_PROGRESS, curren
|
|
18
18
|
}
|
19
19
|
return 0;
|
20
20
|
}, [currentStep, currentStepProgress]);
|
21
|
-
return (_jsxs("div", { className: "af-stepper-client", ...props, children: [isTitleVisible && currentTitle && (_jsx("h2", { className: "af-stepper-client__title", "aria-describedby": stepperId, children: currentTitle })), isSubtitleVisible && currentSubtitle && (_jsx("p", { className: "af-stepper-client__subtitle", children: currentSubtitle })), _jsx("div", { id: stepperId, role: "group", "aria-label": currentTitle, className: classNames("af-stepper-client__content", className), children: [...Array(nbSteps).keys()].map((index) => (_jsx("div", { className: "af-stepper-client__progressbar", "aria-current": index === currentStep, "aria-hidden": index !== currentStep, "aria-label": `${getCurrentProgress(index)}%`, children: _jsx("div", { className: "af-stepper-client__progress", style: { width: `${getCurrentProgress(index)}%` } }) }, `${stepperId}-${index}`))) })] }));
|
21
|
+
return (_jsxs("div", { className: "af-stepper-client", ...props, children: [_jsxs("div", { children: [isTitleVisible && currentTitle && (_jsx("h2", { className: "af-stepper-client__title", "aria-describedby": stepperId, children: currentTitle })), isSubtitleVisible && currentSubtitle && (_jsx("p", { className: "af-stepper-client__subtitle", children: currentSubtitle }))] }), _jsx("div", { id: stepperId, role: "group", "aria-label": currentTitle, className: classNames("af-stepper-client__content", className), children: [...Array(nbSteps).keys()].map((index) => (_jsx("div", { className: "af-stepper-client__progressbar", "aria-current": index === currentStep, "aria-hidden": index !== currentStep, "aria-label": `${getCurrentProgress(index)}%`, children: _jsx("div", { className: "af-stepper-client__progress", style: { width: `${getCurrentProgress(index)}%` } }) }, `${stepperId}-${index}`))) })] }));
|
22
22
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@axa-fr/design-system-look-and-feel-react",
|
3
|
-
"version": "1.0.5-ci.
|
3
|
+
"version": "1.0.5-ci.58",
|
4
4
|
"description": "",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"types": "./dist/index.d.ts",
|
@@ -47,7 +47,7 @@
|
|
47
47
|
},
|
48
48
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
49
49
|
"peerDependencies": {
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.58",
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
52
52
|
"react": ">= 18"
|
53
53
|
},
|