@axa-fr/design-system-look-and-feel-react 1.0.5-ci.22 → 1.0.5-ci.24
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/Alert/Alert.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ComponentPropsWithoutRef, PropsWithChildren, ReactElement } from "react";
|
2
1
|
import "@axa-fr/design-system-look-and-feel-css/dist/Alert/Alert.scss";
|
3
|
-
import {
|
2
|
+
import { ComponentPropsWithoutRef, PropsWithChildren, ReactElement } from "react";
|
4
3
|
import { ButtonClient } from "../Button/Button";
|
4
|
+
import { Link } from "../Link/Link";
|
5
5
|
type Headings = "h2" | "h3" | "h4" | "h5" | "h6";
|
6
6
|
export declare const alertTypes: {
|
7
7
|
readonly validation: "validation";
|
package/dist/Alert/Alert.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import infoIcon from "@material-symbols/svg-400/outlined/info.svg";
|
2
|
+
import "@axa-fr/design-system-look-and-feel-css/dist/Alert/Alert.scss";
|
3
|
+
import checkCircleOutline from "@material-symbols/svg-400/outlined/check_circle.svg";
|
5
4
|
import errorIcon from "@material-symbols/svg-400/outlined/emergency_home.svg";
|
6
5
|
import errorOutline from "@material-symbols/svg-400/outlined/error.svg";
|
7
|
-
import
|
8
|
-
import "@
|
6
|
+
import infoIcon from "@material-symbols/svg-400/outlined/info.svg";
|
7
|
+
import wbIncandescentOutlined from "@material-symbols/svg-400/outlined/wb_incandescent.svg";
|
8
|
+
import { useMemo, } from "react";
|
9
9
|
import { Svg } from "../Svg";
|
10
10
|
export const alertTypes = {
|
11
11
|
validation: "validation",
|
@@ -23,5 +23,5 @@ const getIconFromType = (type) => ({
|
|
23
23
|
})[type] || wbIncandescentOutlined;
|
24
24
|
export const Alert = ({ type = alertTypes.information, title, children, action, iconSize = 24, heading: Heading = "h4", }) => {
|
25
25
|
const icon = useMemo(() => getIconFromType(type), [type]);
|
26
|
-
return (_jsxs("div", { className: `af-alert af-alert--${type}`, role: "alert", children: [_jsx(Svg, { src: icon, width: iconSize, height: iconSize, className: "af-alert__icon", "aria-hidden": true }), _jsxs("div", { className: "af-alert-client__content", children: [title && _jsx(Heading, { className: "af-alert__title", children: title }), children, action && _jsx("
|
26
|
+
return (_jsxs("div", { className: `af-alert af-alert--${type}`, role: "alert", children: [_jsx(Svg, { src: icon, width: iconSize, height: iconSize, className: "af-alert__icon", "aria-hidden": true }), _jsxs("div", { className: "af-alert-client__content", children: [title && _jsx(Heading, { className: "af-alert__title", children: title }), children, action && _jsx("div", { className: "af-alert__action", children: action })] })] }));
|
27
27
|
};
|
@@ -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.24",
|
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.24",
|
49
49
|
"@material-symbols/svg-400": ">= 0.19.0",
|
50
50
|
"react": ">= 18"
|
51
51
|
},
|