@axa-fr/design-system-look-and-feel-react 1.0.5-ci.22 → 1.0.5-ci.23
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.
@@ -1,4 +1,4 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import "@axa-fr/design-system-look-and-feel-css/dist/Form/Checkbox/Checkbox.scss";
|
3
3
|
import checkBoxIcon from "@material-symbols/svg-400/outlined/check_box-fill.svg";
|
4
4
|
import checkBoxOutlineBlankIcon from "@material-symbols/svg-400/outlined/check_box_outline_blank.svg";
|
@@ -10,7 +10,7 @@ const Checkbox = forwardRef(({ label, errorMessage, className, ...inputProps },
|
|
10
10
|
const idError = useId();
|
11
11
|
let inputId = useId();
|
12
12
|
inputId = inputProps.id || inputId;
|
13
|
-
return (_jsxs(
|
13
|
+
return (_jsxs("div", { children: [_jsx("div", { className: classNames("af-checkbox", className), children: _jsxs("label", { htmlFor: inputId, children: [_jsx("input", { ref: ref, ...inputProps, type: "checkbox", id: inputId, "aria-errormessage": idError, "aria-invalid": !!errorMessage }), _jsxs("div", { className: "af-checkbox__icons", children: [_jsx(Svg, { src: checkBoxOutlineBlankIcon, className: "af-checkbox__unchecked" }), _jsx(Svg, { src: checkBoxIcon, className: "af-checkbox__checked" })] }), label] }, inputProps.name) }), errorMessage && (_jsxs("div", { className: "af-checkbox__error", "aria-live": "assertive", id: idError, children: [_jsx(Svg, { src: errorOutline }), errorMessage] }))] }));
|
14
14
|
});
|
15
15
|
Checkbox.displayName = "Checkbox";
|
16
16
|
export { Checkbox };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { useId } from "react";
|
3
3
|
import "@axa-fr/design-system-look-and-feel-css/dist/Form/FileUpload/FileUpload.scss";
|
4
4
|
import visibility from "@material-symbols/svg-400/outlined/visibility-fill.svg";
|
@@ -34,7 +34,7 @@ const FileUpload = ({ id, label, buttonLabel, instructions, dropzoneDescription,
|
|
34
34
|
}
|
35
35
|
return (_jsx(Svg, { src: check, className: "af-form__file-title-container-icon-success" }));
|
36
36
|
};
|
37
|
-
return (_jsxs(
|
37
|
+
return (_jsxs("div", { children: [_jsxs("label", { className: "af-form__group--label", htmlFor: id, children: [label, " ", required ? "*" : ""] }), _jsxs("div", { className: classNames("af-form__file-input", globalError && "af-form__file-input--error", (isMobile || !dropzoneDescription) && "is-mobile"), children: [_jsx("input", { type: "file", name: "file-input", id: id, "aria-errormessage": idError, "aria-invalid": Boolean(globalError), ...otherProps }), dropzoneDescription && (_jsxs("div", { className: "af-form__file-input-dropdown-text", children: [_jsx("p", { children: dropzoneDescription }), _jsx("p", { children: "ou" })] })), _jsx(Button, { variant: Variants.tertiary, onClick: () => document.getElementById(id)?.click(), iconLeft: _jsx(Svg, { src: plus, className: "af-form__file-input-icon" }), children: buttonLabel })] }), globalError && _jsx(InputError, { id: idError, message: globalError }), _jsx("small", { className: "af-form__file-input-help", children: instructions }), _jsx("div", { className: "custom-table-file af-file-table", children: _jsx("ul", { className: "af-form__file-list", children: files.map(({ id: fileId, name, size, isLoading }) => {
|
38
38
|
const effectiveSize = getReadableFileSizeString(size);
|
39
39
|
const isInError = errors.some((fileError) => fileError.id === fileId);
|
40
40
|
const errorMessage = errors.find((fileError) => fileError.id === fileId)?.message;
|
package/dist/Form/Radio/Radio.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import "@axa-fr/design-system-look-and-feel-css/dist/Form/Radio/Radio.scss";
|
3
3
|
import radioIcon from "@material-symbols/svg-400/outlined/radio_button_checked.svg";
|
4
4
|
import radioOutlineBlankIcon from "@material-symbols/svg-400/outlined/radio_button_unchecked.svg";
|
@@ -9,7 +9,7 @@ const Radio = forwardRef(({ label, errorMessage, ...inputProps }, ref) => {
|
|
9
9
|
let inputId = useId();
|
10
10
|
inputId = inputProps.id || inputId;
|
11
11
|
const idError = useId();
|
12
|
-
return (_jsxs(
|
12
|
+
return (_jsxs("div", { children: [_jsx("div", { className: "af-radio", role: "radiogroup", "aria-invalid": Boolean(errorMessage), "aria-errormessage": idError, children: _jsxs("label", { htmlFor: inputId, children: [_jsx("input", { ref: ref, ...inputProps, type: "radio", id: inputId }), _jsxs("div", { className: "af-radio__icons", children: [_jsx(Svg, { src: radioOutlineBlankIcon, className: "af-radio__unchecked" }), _jsx(Svg, { src: radioIcon, className: "af-radio__checked" })] }), label] }, inputProps.name) }), errorMessage && _jsx(InputError, { id: idError, message: errorMessage })] }));
|
13
13
|
});
|
14
14
|
Radio.displayName = "Radio";
|
15
15
|
export { Radio };
|
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.23",
|
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-look-and-feel-css": "1.0.5-ci.
|
48
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.23",
|
49
49
|
"@material-symbols/svg-400": ">= 0.19.0",
|
50
50
|
"react": ">= 18"
|
51
51
|
},
|