@axa-fr/design-system-slash-react 1.0.6-alpha.16 → 1.0.6-alpha.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.
package/dist/Form/Date/Date.js
CHANGED
|
@@ -3,9 +3,10 @@ import "@axa-fr/design-system-slash-css/dist/Form/Date/Date.scss";
|
|
|
3
3
|
import { forwardRef, useMemo } from "react";
|
|
4
4
|
import { getComponentClassName } from "../../utilities";
|
|
5
5
|
const formatDateValue = (dateValue) => {
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
6
|
+
const formattedDateValue = new globalThis.Date(dateValue);
|
|
7
|
+
const monthFormatted = `0${formattedDateValue.getMonth() + 1}`.slice(-2);
|
|
8
|
+
const dayFormatted = `0${formattedDateValue.getDate()}`.slice(-2);
|
|
9
|
+
return `${formattedDateValue.getFullYear()}-${monthFormatted}-${dayFormatted}`;
|
|
9
10
|
};
|
|
10
11
|
const Date = forwardRef(({ className, classModifier, defaultValue, value, ...otherProps }, ref) => {
|
|
11
12
|
const componentClassName = getComponentClassName(className, classModifier, "af-form__input-date");
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment } from "react";
|
|
3
|
-
import "@axa-fr/design-system-slash-css/dist/Layout/Header/Infos/Infos.scss";
|
|
4
3
|
import { getComponentClassName } from "../../../utilities";
|
|
4
|
+
import { generateId } from "../../../utilities/helpers/generateId";
|
|
5
|
+
import "@axa-fr/design-system-slash-css/dist/Layout/Header/Infos/Infos.scss";
|
|
5
6
|
const defaultClassName = "af-contrat";
|
|
6
7
|
const Infos = ({ infos, className, classModifier }) => {
|
|
7
8
|
const componentClassName = getComponentClassName(className, classModifier, defaultClassName);
|
|
8
|
-
return (_jsxs("div", { className: componentClassName, children: [_jsx("i", { className: "glyphicon glyphicon-info-sign" }), _jsx("dl", { className: `${defaultClassName}__list`, children: infos.map((info) => (_jsxs(Fragment, { children: [_jsx("dt", { className: `${defaultClassName}__word`, children: info.word }), _jsx("dd", { className: `${defaultClassName}__def`, children: info.definition })] }, `info-${info
|
|
9
|
+
return (_jsxs("div", { className: componentClassName, children: [_jsx("i", { className: "glyphicon glyphicon-info-sign" }), _jsx("dl", { className: `${defaultClassName}__list`, children: infos.map((info) => (_jsxs(Fragment, { children: [_jsx("dt", { className: `${defaultClassName}__word`, children: info.word }), _jsx("dd", { className: `${defaultClassName}__def`, children: info.definition })] }, `info-${generateId(info)}`))) })] }));
|
|
9
10
|
};
|
|
10
11
|
export { Infos };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateId: (item: object) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-slash-react",
|
|
3
|
-
"version": "1.0.6-alpha.
|
|
3
|
+
"version": "1.0.6-alpha.18",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@axa-fr/design-system-slash-css": "1.0.6-alpha.
|
|
48
|
+
"@axa-fr/design-system-slash-css": "1.0.6-alpha.18",
|
|
49
49
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
50
50
|
"react": ">= 18"
|
|
51
51
|
},
|