@axa-fr/design-system-slash-react 2.0.0-RC.1 → 2.0.0-RC.3
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/Checkbox/Checkbox.js +2 -2
- package/dist/Form/Checkbox/CheckboxInput.d.ts +1 -1
- package/dist/Form/Checkbox/CheckboxInput.js +4 -4
- package/dist/Form/Checkbox/CheckboxItem.js +1 -1
- package/dist/Form/Choice/ChoiceInput.d.ts +1 -1
- package/dist/Form/Choice/ChoiceInput.js +3 -3
- package/dist/Form/Date/DateInput.d.ts +2 -2
- package/dist/Form/Date/DateInput.js +2 -2
- package/dist/Form/File/FileInput.d.ts +3 -3
- package/dist/Form/File/FileInput.js +2 -2
- package/dist/Form/MultiSelect/MultiSelectInput.d.ts +1 -1
- package/dist/Form/MultiSelect/MultiSelectInput.js +3 -3
- package/dist/Form/Number/NumberInput.d.ts +2 -2
- package/dist/Form/Number/NumberInput.js +2 -2
- package/dist/Form/Pass/PassInput.d.ts +2 -2
- package/dist/Form/Pass/PassInput.js +2 -2
- package/dist/Form/Radio/Radio.js +2 -2
- package/dist/Form/Radio/RadioInput.d.ts +1 -1
- package/dist/Form/Radio/RadioInput.js +2 -2
- package/dist/Form/Select/SelectInput.d.ts +2 -2
- package/dist/Form/Select/SelectInput.js +3 -3
- package/dist/Form/Slider/SliderInput.d.ts +2 -2
- package/dist/Form/Slider/SliderInput.js +2 -2
- package/dist/Form/Text/TextInput.d.ts +1 -1
- package/dist/Form/Text/TextInput.js +2 -2
- package/dist/Form/Textarea/TextareaInput.d.ts +1 -1
- package/dist/Form/Textarea/TextareaInput.js +2 -2
- package/dist/Form/core/Field.d.ts +1 -1
- package/dist/Layout/Header/index.d.ts +1 -0
- package/dist/Layout/MainContainer/MainContainer.d.ts +0 -1
- package/dist/Layout/MainContainer/MainContainer.js +0 -1
- package/dist/Steps/VerticalStep.js +4 -4
- package/dist/Summary/index.js +1 -1
- package/dist/Tag/Tag.d.ts +15 -12
- package/dist/Tag/Tag.js +15 -10
- package/dist/index.d.ts +10 -8
- package/dist/index.js +4 -4
- package/package.json +7 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createElement as _createElement } from "react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { CheckboxItem } from "./CheckboxItem";
|
|
@@ -21,7 +21,7 @@ const CheckboxInner = forwardRef(({ id, name, options, disabled, children, value
|
|
|
21
21
|
: values.filter((v) => v !== value);
|
|
22
22
|
onChange({ values: newValues, target: { value, checked }, id, name });
|
|
23
23
|
};
|
|
24
|
-
return (_jsx(
|
|
24
|
+
return (_jsx("div", { className: "af-form__checkbox-container", children: options.map((option) => {
|
|
25
25
|
const isChecked = values ? values.indexOf(option.value) >= 0 : false;
|
|
26
26
|
return (_createElement(CheckboxItem, { ...otherProps, onChange: handleOnChange, key: option.value, className: className, isChecked: isChecked, name: name, disabled: option.disabled || disabled, ref: inputRef, ...option }, children));
|
|
27
27
|
}) }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import { type ConsumerFieldProps } from "../core";
|
|
3
3
|
import { Checkbox } from "./Checkbox";
|
|
4
|
-
type Props = Omit<ComponentProps<typeof Checkbox> & ConsumerFieldProps, "
|
|
4
|
+
type Props = Omit<ComponentProps<typeof Checkbox> & ConsumerFieldProps, "placeholder">;
|
|
5
5
|
declare const CheckboxInput: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
6
6
|
export { CheckboxInput };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Field, useOptionsWithId } from "../core";
|
|
4
4
|
import { Checkbox } from "./Checkbox";
|
|
5
5
|
import { CheckboxModes } from "./CheckboxModes";
|
|
6
|
-
const CheckboxInput = forwardRef(({ label, mode = "default", options, ...otherProps }, inputRef) => {
|
|
6
|
+
const CheckboxInput = forwardRef(({ label, mode = "default", options, children, ...otherProps }, inputRef) => {
|
|
7
7
|
const newOptions = useOptionsWithId(options);
|
|
8
|
-
return (_jsx(Field, { label: label, labelPosition: mode === CheckboxModes.classic ? "top" : "center", roleContainer: "group",
|
|
9
|
-
return (_jsx(Checkbox, { id: id, mode: mode, options: newOptions, classModifier: ariaInvalid ? `${classModifier} error` : classModifier, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...props }));
|
|
8
|
+
return (_jsx(Field, { label: label, labelPosition: mode === CheckboxModes.classic ? "top" : "center", roleContainer: "group", ...otherProps, renderInput: ({ classModifier, id, ariaInvalid, errorId, ...props }) => {
|
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsx(Checkbox, { id: id, mode: mode, options: newOptions, classModifier: ariaInvalid ? `${classModifier} error` : classModifier, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...props }), children] }));
|
|
10
10
|
} }));
|
|
11
11
|
});
|
|
12
12
|
CheckboxInput.displayName = "CheckboxInput";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import check from "@material-symbols/svg-
|
|
2
|
+
import check from "@material-symbols/svg-700/sharp/check.svg";
|
|
3
3
|
import { forwardRef, useId } from "react";
|
|
4
4
|
import { getOptionClassName } from "../core";
|
|
5
5
|
import "@axa-fr/design-system-slash-css/dist/Form/Checkbox/Checkbox.scss";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComponentProps } from "react";
|
|
2
2
|
import { type ConsumerFieldProps } from "../core";
|
|
3
3
|
import { Choice } from "./Choice";
|
|
4
|
-
type Props = ComponentProps<typeof Choice> &
|
|
4
|
+
type Props = ComponentProps<typeof Choice> & ConsumerFieldProps;
|
|
5
5
|
declare const ChoiceInput: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
6
6
|
export { ChoiceInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Field } from "../core";
|
|
4
4
|
import { Choice } from "./Choice";
|
|
@@ -6,8 +6,8 @@ const defaultOptions = [
|
|
|
6
6
|
{ label: "Oui", value: true },
|
|
7
7
|
{ label: "Non", value: false },
|
|
8
8
|
];
|
|
9
|
-
const ChoiceInput = forwardRef(({ label, options = defaultOptions, ...otherProps }, inputRef) => {
|
|
10
|
-
return (_jsx(Field, { label: label, roleContainer: "radiogroup", ...otherProps, renderInput: ({ classModifier, id, errorId, ariaInvalid, ...props }) => (_jsx(Choice, { id: id, ref: inputRef, classModifier: classModifier, "aria-describedby": errorId, "aria-invalid": ariaInvalid, options: options, ...props })) }));
|
|
9
|
+
const ChoiceInput = forwardRef(({ label, options = defaultOptions, children, ...otherProps }, inputRef) => {
|
|
10
|
+
return (_jsx(Field, { label: label, roleContainer: "radiogroup", ...otherProps, renderInput: ({ classModifier, id, errorId, ariaInvalid, ...props }) => (_jsxs(_Fragment, { children: [_jsx(Choice, { id: id, ref: inputRef, classModifier: classModifier, "aria-describedby": errorId, "aria-invalid": ariaInvalid, options: options, ...props }), children] })) }));
|
|
11
11
|
});
|
|
12
12
|
ChoiceInput.displayName = "ChoiceInput";
|
|
13
13
|
export { ChoiceInput };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import { ConsumerFieldProps } from "../core";
|
|
3
3
|
import { Date } from "./Date";
|
|
4
|
-
type Props =
|
|
4
|
+
type Props = ConsumerFieldProps & ComponentProps<typeof Date> & {
|
|
5
5
|
helpMessage?: ReactNode;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
declare const DateInput: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
8
8
|
export { DateInput };
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Field } from "../core";
|
|
4
4
|
import { Date } from "./Date";
|
|
5
|
-
const DateInput = forwardRef(({
|
|
6
|
-
return (_jsx(Field, { ...otherProps, renderInput: ({ id, classModifier, ariaInvalid, errorId }) => (_jsxs(_Fragment, { children: [_jsx(Date, { id: id, classModifier: classModifier, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...otherProps }),
|
|
5
|
+
const DateInput = forwardRef(({ children, ...otherProps }, inputRef) => {
|
|
6
|
+
return (_jsx(Field, { ...otherProps, renderInput: ({ id, classModifier, ariaInvalid, errorId }) => (_jsxs(_Fragment, { children: [_jsx(Date, { id: id, classModifier: classModifier, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...otherProps }), children] })) }));
|
|
7
7
|
});
|
|
8
8
|
DateInput.displayName = "DateInput";
|
|
9
9
|
export { DateInput };
|
|
@@ -5,9 +5,9 @@ import { File } from "./File";
|
|
|
5
5
|
import { FileTable } from "./FileTable";
|
|
6
6
|
type FileProps = ComponentPropsWithoutRef<typeof File>;
|
|
7
7
|
type FileTableProps = ComponentPropsWithoutRef<typeof FileTable>;
|
|
8
|
-
type Props =
|
|
8
|
+
type Props = ConsumerFieldProps & FileProps & Pick<FileTableProps, "values" | "errors"> & {
|
|
9
9
|
fileLabel?: string;
|
|
10
10
|
helpMessage?: ReactNode;
|
|
11
|
-
}
|
|
12
|
-
declare const FileInput: ({ values, id, name, onChange,
|
|
11
|
+
};
|
|
12
|
+
declare const FileInput: ({ values, id, name, onChange, label, errors, fileLabel, classModifier, children, ...otherFileProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export { FileInput };
|
|
@@ -4,7 +4,7 @@ import { useId } from "react";
|
|
|
4
4
|
import { Field } from "../core";
|
|
5
5
|
import { File } from "./File";
|
|
6
6
|
import { FileTable } from "./FileTable";
|
|
7
|
-
const FileInput = ({ values = [], id, name = "", onChange,
|
|
7
|
+
const FileInput = ({ values = [], id, name = "", onChange, label, errors, fileLabel, classModifier, children, ...otherFileProps }) => {
|
|
8
8
|
const onDeleteClick = (selectedId, selectInputId) => {
|
|
9
9
|
const newValues = values.filter((element) => element.id !== selectedId);
|
|
10
10
|
onChange({
|
|
@@ -16,6 +16,6 @@ const FileInput = ({ values = [], id, name = "", onChange, rightElement, label,
|
|
|
16
16
|
};
|
|
17
17
|
const generatedId = useId();
|
|
18
18
|
const actualId = id ?? generatedId;
|
|
19
|
-
return (_jsx(Field, { label: label, labelPosition: "top", id: actualId, classNameSuffix: "file", ...otherFileProps, renderInput: ({ classModifier: inputClassModifiers, id: inputId, ariaInvalid, errorId, ...inputProps }) => (_jsxs(_Fragment, { children: [_jsx(File, { id: inputId, name: name, onChange: onChange, classModifier: inputClassModifiers, label: fileLabel, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...inputProps }),
|
|
19
|
+
return (_jsx(Field, { label: label, labelPosition: "top", id: actualId, classNameSuffix: "file", ...otherFileProps, renderInput: ({ classModifier: inputClassModifiers, id: inputId, ariaInvalid, errorId, ...inputProps }) => (_jsxs(_Fragment, { children: [_jsx(File, { id: inputId, name: name, onChange: onChange, classModifier: inputClassModifiers, label: fileLabel, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...inputProps }), children] })), appendChildren: _jsx(FileTable, { errors: errors, values: values, onClick: (selectedId) => onDeleteClick(selectedId, actualId), classModifier: classModifier }) }));
|
|
20
20
|
};
|
|
21
21
|
export { FileInput };
|
|
@@ -3,5 +3,5 @@ import { type ComponentProps } from "react";
|
|
|
3
3
|
import { ConsumerFieldProps } from "../core";
|
|
4
4
|
import { MultiSelect } from "./MultiSelect";
|
|
5
5
|
type Props = ConsumerFieldProps & ComponentProps<typeof MultiSelect>;
|
|
6
|
-
declare const MultiSelectInput: ({ label, ...multiSelectProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const MultiSelectInput: ({ label, children, ...multiSelectProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export { MultiSelectInput };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/design-system-slash-css/dist/Form/MultiSelect/MultiSelect.scss";
|
|
3
3
|
import { Field } from "../core";
|
|
4
4
|
import { MultiSelect } from "./MultiSelect";
|
|
5
|
-
const MultiSelectInput = ({ label, ...multiSelectProps }) => {
|
|
5
|
+
const MultiSelectInput = ({ label, children, ...multiSelectProps }) => {
|
|
6
6
|
return (_jsx(Field, { label: label, ...multiSelectProps, classNameSuffix: "select", renderInput: ({ id, ariaInvalid, errorId, ...props }) => {
|
|
7
|
-
return (_jsx(MultiSelect, { id: id, "aria-invalid": ariaInvalid, "aria-describedby": errorId, ...props }));
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx(MultiSelect, { id: id, "aria-invalid": ariaInvalid, "aria-describedby": errorId, ...props }), children] }));
|
|
8
8
|
} }));
|
|
9
9
|
};
|
|
10
10
|
export { MultiSelectInput };
|
|
@@ -4,6 +4,6 @@ import "@axa-fr/design-system-slash-css/dist/Form/core/FormCore.scss";
|
|
|
4
4
|
import { ComponentPropsWithRef } from "react";
|
|
5
5
|
import { type ConsumerFieldProps } from "../core";
|
|
6
6
|
import { Number } from "./Number";
|
|
7
|
-
type Props =
|
|
8
|
-
export declare const NumberInput: ({
|
|
7
|
+
type Props = ConsumerFieldProps & ComponentPropsWithRef<typeof Number>;
|
|
8
|
+
export declare const NumberInput: ({ children, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -4,6 +4,6 @@ import "@axa-fr/design-system-slash-css/dist/common/reboot.scss";
|
|
|
4
4
|
import "@axa-fr/design-system-slash-css/dist/Form/core/FormCore.scss";
|
|
5
5
|
import { Field } from "../core";
|
|
6
6
|
import { Number } from "./Number";
|
|
7
|
-
export const NumberInput = ({
|
|
8
|
-
return (_jsx(Field, { ...props, renderInput: ({ id, classModifier, ariaInvalid, errorId, ...inputProps }) => (_jsxs(_Fragment, { children: [_jsx(Number, { id: id, classModifier: classModifier, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...inputProps }),
|
|
7
|
+
export const NumberInput = ({ children, ...props }) => {
|
|
8
|
+
return (_jsx(Field, { ...props, renderInput: ({ id, classModifier, ariaInvalid, errorId, ...inputProps }) => (_jsxs(_Fragment, { children: [_jsx(Number, { id: id, classModifier: classModifier, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...inputProps }), children] })) }));
|
|
9
9
|
};
|
|
@@ -5,6 +5,6 @@ type PassProps = ComponentProps<typeof Pass>;
|
|
|
5
5
|
type Props = Omit<ConsumerFieldProps & PassProps & {
|
|
6
6
|
helpMessage?: ReactNode;
|
|
7
7
|
score?: string;
|
|
8
|
-
}, "onToggleType" | "type"
|
|
9
|
-
declare const PassInput: ({
|
|
8
|
+
}, "onToggleType" | "type">;
|
|
9
|
+
declare const PassInput: ({ children, score, classModifier, disabled, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export { PassInput };
|
|
@@ -23,9 +23,9 @@ const calculateStrength = (score) => {
|
|
|
23
23
|
}
|
|
24
24
|
return strengthList[strength];
|
|
25
25
|
};
|
|
26
|
-
const PassInput = ({
|
|
26
|
+
const PassInput = ({ children, score, classModifier, disabled, ...props }) => {
|
|
27
27
|
const strength = calculateStrength(score);
|
|
28
28
|
const [type, setType] = useState("password");
|
|
29
|
-
return (_jsx(Field, { ...props, classModifier: classModifier, renderInput: ({ id, classModifier: modifier, ariaInvalid, errorId }) => (_jsxs(_Fragment, { children: [_jsx(Pass, { ...props, type: type, id: id, disabled: disabled, classModifier: `${modifier} ${strength}`, "aria-describedby": errorId, "aria-invalid": ariaInvalid, onToggleType: () => setType(type === "password" ? "text" : "password") }),
|
|
29
|
+
return (_jsx(Field, { ...props, classModifier: classModifier, renderInput: ({ id, classModifier: modifier, ariaInvalid, errorId }) => (_jsxs(_Fragment, { children: [_jsx(Pass, { ...props, type: type, id: id, disabled: disabled, classModifier: `${modifier} ${strength}`, "aria-describedby": errorId, "aria-invalid": ariaInvalid, onToggleType: () => setType(type === "password" ? "text" : "password") }), children] })) }));
|
|
30
30
|
};
|
|
31
31
|
export { PassInput };
|
package/dist/Form/Radio/Radio.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createElement as _createElement } from "react";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef, } from "react";
|
|
4
|
-
import { RadioItem } from "./RadioItem";
|
|
5
4
|
import { RadioCardGroup } from "./RadioCardGroup";
|
|
5
|
+
import { RadioItem } from "./RadioItem";
|
|
6
6
|
export var RadioModes;
|
|
7
7
|
(function (RadioModes) {
|
|
8
8
|
RadioModes["classic"] = "classic";
|
|
@@ -28,7 +28,7 @@ const Radio = forwardRef(({ options, value = "", children, disabled, ...otherPro
|
|
|
28
28
|
if (mode === "card") {
|
|
29
29
|
return (_jsx(RadioCardGroup, { ...onlyNecessaryProps, options: options, disabled: disabled, value: value, children: children }));
|
|
30
30
|
}
|
|
31
|
-
return options.map((option) => (_createElement(RadioItem, { ...onlyNecessaryProps, key: option.value, isChecked: option.value === value, disabled: option.disabled || disabled, className: classNameMode, ref: inputRef, ...option }, children)));
|
|
31
|
+
return (_jsx("div", { className: "af-form__radio-group", children: options.map((option) => (_createElement(RadioItem, { ...onlyNecessaryProps, key: option.value, isChecked: option.value === value, disabled: option.disabled || disabled, className: classNameMode, ref: inputRef, ...option }, children))) }));
|
|
32
32
|
});
|
|
33
33
|
Radio.displayName = "EnhancedInputRadio";
|
|
34
34
|
export { Radio };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { type ConsumerFieldProps } from "../core";
|
|
3
3
|
import { Radio } from "./Radio";
|
|
4
|
-
type RadioInputProps =
|
|
4
|
+
type RadioInputProps = ConsumerFieldProps & ComponentPropsWithoutRef<typeof Radio>;
|
|
5
5
|
declare const RadioInput: import("react").ForwardRefExoticComponent<RadioInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
6
6
|
export { RadioInput };
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Field, useOptionsWithId } from "../core";
|
|
4
4
|
import { Radio, RadioModes } from "./Radio";
|
|
5
|
-
const RadioInput = forwardRef(({ label, mode = "default", options,
|
|
5
|
+
const RadioInput = forwardRef(({ label, mode = "default", options, children, ...props }, inputRef) => {
|
|
6
6
|
const labelPosition = mode === RadioModes.classic ? "top" : "center";
|
|
7
7
|
const newOptions = useOptionsWithId(options);
|
|
8
|
-
return (_jsx(Field, { label: label, labelPosition: labelPosition, roleContainer: mode !== "card" ? "radiogroup" : undefined, ...props, renderInput: ({ classModifier, ariaInvalid, errorId, ...radioProps }) => (_jsxs(_Fragment, { children: [_jsx(Radio, { options: newOptions, mode: mode, classModifier: classModifier, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...radioProps }),
|
|
8
|
+
return (_jsx(Field, { label: label, labelPosition: labelPosition, roleContainer: mode !== "card" ? "radiogroup" : undefined, ...props, renderInput: ({ classModifier, ariaInvalid, errorId, ...radioProps }) => (_jsxs(_Fragment, { children: [_jsx(Radio, { options: newOptions, mode: mode, classModifier: classModifier, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...radioProps }), children] })) }));
|
|
9
9
|
});
|
|
10
10
|
RadioInput.displayName = "EnhancedInputRadio";
|
|
11
11
|
export { RadioInput };
|
|
@@ -26,7 +26,7 @@ declare const SelectInput: import("react").ForwardRefExoticComponent<(Omit<Omit<
|
|
|
26
26
|
} & Record<string, unknown>) => import("react").ReactNode;
|
|
27
27
|
appendChildren?: import("react").ReactNode;
|
|
28
28
|
}, "children" | "renderInput" | "classNameSuffix"> & {
|
|
29
|
-
|
|
29
|
+
children?: import("react").ReactNode;
|
|
30
30
|
} & Omit<Omit<{
|
|
31
31
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
32
32
|
className?: string | undefined | undefined;
|
|
@@ -355,7 +355,7 @@ declare const SelectInput: import("react").ForwardRefExoticComponent<(Omit<Omit<
|
|
|
355
355
|
} & Record<string, unknown>) => import("react").ReactNode;
|
|
356
356
|
appendChildren?: import("react").ReactNode;
|
|
357
357
|
}, "children" | "renderInput" | "classNameSuffix"> & {
|
|
358
|
-
|
|
358
|
+
children?: import("react").ReactNode;
|
|
359
359
|
} & Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref"> & {
|
|
360
360
|
options?: OptionHTMLAttributes<HTMLOptionElement>[];
|
|
361
361
|
classModifier?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, } from "react";
|
|
3
3
|
import { Field } from "../core";
|
|
4
4
|
import { Select } from "./Select";
|
|
5
|
-
const SelectInput = forwardRef(({ label, options, ...props }, inputRef) => {
|
|
6
|
-
return (_jsx(Field, { label: label, classNameSuffix: "select", ...props, renderInput: ({ classModifier, id, ariaInvalid, errorId, ...otherSelectProps }) => (_jsx(Select, { id: id, ref: inputRef, classModifier: classModifier, "aria-describedby": errorId, "aria-invalid": ariaInvalid, options: options, ...otherSelectProps })) }));
|
|
5
|
+
const SelectInput = forwardRef(({ label, options, children, ...props }, inputRef) => {
|
|
6
|
+
return (_jsx(Field, { label: label, classNameSuffix: "select", ...props, renderInput: ({ classModifier, id, ariaInvalid, errorId, ...otherSelectProps }) => (_jsxs(_Fragment, { children: [_jsx(Select, { id: id, ref: inputRef, classModifier: classModifier, "aria-describedby": errorId, "aria-invalid": ariaInvalid, options: options, ...otherSelectProps }), children] })) }));
|
|
7
7
|
});
|
|
8
8
|
SelectInput.displayName = "SelectInput";
|
|
9
9
|
export { SelectInput };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ComponentProps } from "react";
|
|
2
2
|
import { ConsumerFieldProps } from "../core";
|
|
3
3
|
import { Slider } from "./Slider";
|
|
4
|
-
type Props =
|
|
4
|
+
type Props = ConsumerFieldProps & ComponentProps<typeof Slider>;
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated This component is deprecated and will be removed in a future major release.
|
|
7
7
|
*/
|
|
8
|
-
declare const SliderInput: ({
|
|
8
|
+
declare const SliderInput: ({ children, name, options, label, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export { SliderInput };
|
|
@@ -4,7 +4,7 @@ import { Slider } from "./Slider";
|
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated This component is deprecated and will be removed in a future major release.
|
|
6
6
|
*/
|
|
7
|
-
const SliderInput = ({
|
|
8
|
-
return (_jsx(Field, { label: label, ...props, renderInput: ({ id, classModifier, ...sliderProps }) => (_jsxs(_Fragment, { children: [_jsx(Slider, { id: id, classModifier: classModifier, name: name, options: options, ...sliderProps }),
|
|
7
|
+
const SliderInput = ({ children, name, options, label, ...props }) => {
|
|
8
|
+
return (_jsx(Field, { label: label, ...props, renderInput: ({ id, classModifier, ...sliderProps }) => (_jsxs(_Fragment, { children: [_jsx(Slider, { id: id, classModifier: classModifier, name: name, options: options, ...sliderProps }), children] })) }));
|
|
9
9
|
};
|
|
10
10
|
export { SliderInput };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import { ConsumerFieldProps } from "../core";
|
|
3
3
|
import { Text } from "./Text";
|
|
4
|
-
export type TextInputProps =
|
|
4
|
+
export type TextInputProps = ConsumerFieldProps & ComponentProps<typeof Text>;
|
|
5
5
|
declare const TextInput: import("react").ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
6
6
|
export { TextInput };
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Field } from "../core";
|
|
4
4
|
import { Text } from "./Text";
|
|
5
|
-
const TextInput = forwardRef(({
|
|
6
|
-
return (_jsx(Field, { ...props, renderInput: ({ id, classModifier, ariaInvalid, errorId }) => (_jsxs(_Fragment, { children: [_jsx(Text, { id: id, classModifier: classModifier, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...props }),
|
|
5
|
+
const TextInput = forwardRef(({ children, ...props }, inputRef) => {
|
|
6
|
+
return (_jsx(Field, { ...props, renderInput: ({ id, classModifier, ariaInvalid, errorId }) => (_jsxs(_Fragment, { children: [_jsx(Text, { id: id, classModifier: classModifier, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...props }), children] })) }));
|
|
7
7
|
});
|
|
8
8
|
TextInput.displayName = "TextInput";
|
|
9
9
|
export { TextInput };
|
|
@@ -4,6 +4,6 @@ import "@axa-fr/design-system-slash-css/dist/Form/core/FormCore.scss";
|
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
5
|
import { type ConsumerFieldProps } from "../core";
|
|
6
6
|
import { Textarea } from "./Textarea";
|
|
7
|
-
type Props =
|
|
7
|
+
type Props = ConsumerFieldProps & ComponentProps<typeof Textarea>;
|
|
8
8
|
declare const TextareaInput: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
9
9
|
export { TextareaInput };
|
|
@@ -5,8 +5,8 @@ import "@axa-fr/design-system-slash-css/dist/Form/core/FormCore.scss";
|
|
|
5
5
|
import { forwardRef } from "react";
|
|
6
6
|
import { Field } from "../core";
|
|
7
7
|
import { Textarea } from "./Textarea";
|
|
8
|
-
const TextareaInput = forwardRef(({ label,
|
|
9
|
-
return (_jsx(Field, { label: label, labelPosition: "top", classNameSuffix: "textarea", ...props, renderInput: ({ id, ariaInvalid, errorId, ...inputProps }) => (_jsxs(_Fragment, { children: [_jsx(Textarea, { id: id, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...inputProps }),
|
|
8
|
+
const TextareaInput = forwardRef(({ label, children, ...props }, inputRef) => {
|
|
9
|
+
return (_jsx(Field, { label: label, labelPosition: "top", classNameSuffix: "textarea", ...props, renderInput: ({ id, ariaInvalid, errorId, ...inputProps }) => (_jsxs(_Fragment, { children: [_jsx(Textarea, { id: id, ref: inputRef, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...inputProps }), children] })) }));
|
|
10
10
|
});
|
|
11
11
|
TextareaInput.displayName = "TextareaInput";
|
|
12
12
|
export { TextareaInput };
|
|
@@ -74,7 +74,7 @@ export type ConsumerFieldProps = Omit<InputProps, "renderInput" | "classNameSuff
|
|
|
74
74
|
/**
|
|
75
75
|
* Element appended right to the input
|
|
76
76
|
*/
|
|
77
|
-
|
|
77
|
+
children?: ReactNode;
|
|
78
78
|
};
|
|
79
79
|
export declare const Field: ({ classNameContainerInput, classNameContainerLabel, className, label, forceDisplayMessage, message, messageType, required, classModifier, disabled, helpMessage, id, isVisible, roleContainer, ariaLabelContainer, isLabelContainerLinkedToInput, labelPosition, classNameSuffix, renderInput, appendChildren, ...otherProps }: InputProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
80
80
|
export {};
|
|
@@ -6,3 +6,4 @@ export { Name } from "./Name/Name";
|
|
|
6
6
|
export { NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, } from "./NavBar";
|
|
7
7
|
export { ToggleButton } from "./ToggleButton/ToggleButton";
|
|
8
8
|
export { User } from "./User/User";
|
|
9
|
+
export type { AnchorNavBarItem } from "./AnchorNavBar/AnchorNavBar";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, PropsWithChildren } from "react";
|
|
2
|
-
import "@axa-fr/design-system-slash-css/dist/Layout/MainContainer/MainContainer.css";
|
|
3
2
|
import "@axa-fr/design-system-slash-css/dist/common/breakpoints.css";
|
|
4
3
|
type MainContainerProps = ComponentPropsWithoutRef<"main"> & PropsWithChildren;
|
|
5
4
|
export declare const MainContainer: ({ children, ...othersProps }: MainContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import "@axa-fr/design-system-slash-css/dist/Layout/MainContainer/MainContainer.css";
|
|
3
2
|
import "@axa-fr/design-system-slash-css/dist/common/breakpoints.css";
|
|
4
3
|
export const MainContainer = ({ children, ...othersProps }) => (_jsx("main", { className: "af-container", ...othersProps, children: children }));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import edit from "@material-symbols/svg-400/sharp/edit-fill.svg";
|
|
4
2
|
import check from "@material-symbols/svg-400/sharp/check.svg";
|
|
3
|
+
import edit from "@material-symbols/svg-400/sharp/edit-fill.svg";
|
|
5
4
|
import lock from "@material-symbols/svg-400/sharp/lock-fill.svg";
|
|
6
|
-
import
|
|
5
|
+
import classNames from "classnames";
|
|
7
6
|
import { Svg } from "../Svg";
|
|
7
|
+
import { Title } from "../Title/Title";
|
|
8
8
|
import "@axa-fr/design-system-slash-css/dist/Steps/VerticalStep.css";
|
|
9
9
|
import { Button } from "../Button/Button";
|
|
10
10
|
const defaultClassName = "af-vertical-step";
|
|
@@ -18,5 +18,5 @@ export const VerticalStep = ({ title, id, stepMode, editButtonLabel = "Modifier"
|
|
|
18
18
|
[`${defaultClassName}-icon--validated`]: isStepValidated,
|
|
19
19
|
[`${defaultClassName}-icon--locked`]: isStepLocked,
|
|
20
20
|
[`${defaultClassName}-icon--edited`]: isStepInEdition,
|
|
21
|
-
}), children: [isStepValidated ? _jsx(Svg, { role: "presentation", src: check }) : null, isStepLocked ? _jsx(Svg, { role: "presentation", src: lock }) : null, isStepInEdition ? _jsx(Svg, { role: "presentation", src: edit }) : null] }), _jsx(Title, { id: id, contentLeft: isStepValidated ? (
|
|
21
|
+
}), children: [isStepValidated ? _jsx(Svg, { role: "presentation", src: check }) : null, isStepLocked ? _jsx(Svg, { role: "presentation", src: lock }) : null, isStepInEdition ? _jsx(Svg, { role: "presentation", src: edit }) : null] }), _jsx(Title, { id: id, contentLeft: isStepValidated ? (_jsx(Button, { "aria-label": editButtonAriaLabel, onClick: onEdit, variant: "ghost", leftIcon: _jsx(Svg, { role: "presentation", src: edit }), children: editButtonLabel })) : undefined, contentRight: contentRight, children: title }), isStepInEdition ? _jsx("section", { children: form }) : null, isStepValidated && showRestitution ? (_jsx("section", { children: restitution })) : null, isStepInEdition ? (_jsx("div", { className: classNames(`${defaultClassName}-icon ${defaultClassName}-icon--lastIcon`), children: _jsx(Svg, { role: "presentation", src: check }) })) : null] }));
|
|
22
22
|
};
|
package/dist/Summary/index.js
CHANGED
|
@@ -7,5 +7,5 @@ export const Summary = ({ messages = [], isVisible = true, title = "Invalid form
|
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
9
|
const variant = classModifier === "danger" ? "warning" : classModifier;
|
|
10
|
-
return (_jsx(Message, {
|
|
10
|
+
return (_jsx(Message, { title: title, variant: variant, ...args, children: _jsx("ul", { className: "af-summary__message-list", children: messages.map((message) => (_jsx("li", { className: "af-summary__message-item", children: message }, `message_${generateId({ message })}`))) }) }));
|
|
11
11
|
};
|
package/dist/Tag/Tag.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import { ComponentPropsWithRef, PropsWithChildren } from "react";
|
|
2
1
|
import "@axa-fr/design-system-slash-css/dist/Tag/Tag.scss";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* @deprecated instead use warning
|
|
6
|
-
*/
|
|
7
|
-
type TagModifierDecrepated = "danger" | "info";
|
|
2
|
+
import { ComponentPropsWithRef, PropsWithChildren } from "react";
|
|
3
|
+
export type TagVariants = "success" | "information" | "warning" | "error" | "default" | "dark" | "purple" | "gray" | "white";
|
|
8
4
|
type TagProps = ComponentPropsWithRef<"span"> & {
|
|
9
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Modifier class to apply specific styles. Note: "danger" is deprecated, use "warning" instead. "info" is deprecated, use "information" instead
|
|
7
|
+
* @deprecated Use `variant` instead
|
|
8
|
+
*/
|
|
9
|
+
classModifier?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Variant of the tag to apply specific styles.
|
|
12
|
+
* "warning" replaces the deprecated "danger
|
|
13
|
+
* "information" replaces the deprecated "info"
|
|
14
|
+
* @default "default"
|
|
15
|
+
*/
|
|
16
|
+
variant?: TagVariants;
|
|
10
17
|
disabled?: boolean;
|
|
11
18
|
};
|
|
12
19
|
/**
|
|
@@ -15,13 +22,9 @@ type TagProps = ComponentPropsWithRef<"span"> & {
|
|
|
15
22
|
* @component
|
|
16
23
|
* @example
|
|
17
24
|
* // Basic usage
|
|
18
|
-
* <Tag
|
|
25
|
+
* <Tag variant="success">Success Tag</Tag>
|
|
19
26
|
*
|
|
20
|
-
* @param {object} props - The properties object.
|
|
21
27
|
* @param {React.ReactNode} props.children - The content to be displayed inside the tag.
|
|
22
|
-
* @param {string} [props.className] - Additional class names to apply to the tag.
|
|
23
|
-
* @param {string} [props.classModifier] - Modifier class to apply specific styles. Note: "danger" is deprecated, use "warning" instead. "info" is deprecated, use "information" instead
|
|
24
|
-
* @param {boolean} [props.disabled] - If true, the tag will be disabled.
|
|
25
28
|
* @param {React.Ref<HTMLSpanElement>} ref - The ref to the span element.
|
|
26
29
|
* @returns {JSX.Element} The rendered Tag component.
|
|
27
30
|
*/
|
package/dist/Tag/Tag.js
CHANGED
|
@@ -1,27 +1,32 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { getComponentClassName } from "../utilities";
|
|
4
2
|
import "@axa-fr/design-system-slash-css/dist/Tag/Tag.scss";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { getComponentClassNameWithUserClassname } from "../utilities/helpers/getComponentClassName";
|
|
5
5
|
/**
|
|
6
6
|
* Tag component to display a label with various styles.
|
|
7
7
|
*
|
|
8
8
|
* @component
|
|
9
9
|
* @example
|
|
10
10
|
* // Basic usage
|
|
11
|
-
* <Tag
|
|
11
|
+
* <Tag variant="success">Success Tag</Tag>
|
|
12
12
|
*
|
|
13
|
-
* @param {object} props - The properties object.
|
|
14
13
|
* @param {React.ReactNode} props.children - The content to be displayed inside the tag.
|
|
15
|
-
* @param {string} [props.className] - Additional class names to apply to the tag.
|
|
16
|
-
* @param {string} [props.classModifier] - Modifier class to apply specific styles. Note: "danger" is deprecated, use "warning" instead. "info" is deprecated, use "information" instead
|
|
17
|
-
* @param {boolean} [props.disabled] - If true, the tag will be disabled.
|
|
18
14
|
* @param {React.Ref<HTMLSpanElement>} ref - The ref to the span element.
|
|
19
15
|
* @returns {JSX.Element} The rendered Tag component.
|
|
20
16
|
*/
|
|
21
|
-
export const Tag = forwardRef(({ children, className, classModifier
|
|
22
|
-
const
|
|
17
|
+
export const Tag = forwardRef(({ children, className, classModifier, variant, ...otherProps }, ref) => {
|
|
18
|
+
const actualModifier = variant || classModifier || "default";
|
|
19
|
+
const componentClassName = getComponentClassNameWithUserClassname({
|
|
20
|
+
userClassName: className,
|
|
21
|
+
classModifier: actualModifier,
|
|
22
|
+
componentClassName: "af-tag",
|
|
23
|
+
});
|
|
23
24
|
// Kept for backward compatibility. May be removed in a future version
|
|
24
|
-
const badgeClassName =
|
|
25
|
+
const badgeClassName = getComponentClassNameWithUserClassname({
|
|
26
|
+
userClassName: className,
|
|
27
|
+
classModifier: actualModifier,
|
|
28
|
+
componentClassName: "af-badge",
|
|
29
|
+
});
|
|
25
30
|
return (_jsx("span", { ref: ref, className: `${componentClassName} ${badgeClassName}`, ...otherProps, children: children }));
|
|
26
31
|
});
|
|
27
32
|
Tag.displayName = "Tag";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import "@axa-fr/design-system-slash-css/dist/common/icons.scss";
|
|
2
2
|
import "@axa-fr/design-system-slash-css/dist/common/reboot.scss";
|
|
3
3
|
import "@axa-fr/design-system-slash-css/dist/common/tokens.css";
|
|
4
|
-
import "@fontsource/source-sans-pro";
|
|
4
|
+
import "@fontsource/source-sans-pro/400.css";
|
|
5
5
|
import "@fontsource/source-sans-pro/700.css";
|
|
6
6
|
import { Message } from "./Messages/Message";
|
|
7
7
|
import { Tag } from "./Tag/Tag";
|
|
8
8
|
export { Action } from "./Action/Action";
|
|
9
|
-
/** @deprecated Use `Tag` instead. */
|
|
10
|
-
declare const Badge: import("react").ForwardRefExoticComponent<Omit<import("react").PropsWithChildren<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
11
|
-
classModifier?: `${("error" | "warning" | "success" | "information" | "default" | "dark" | "purple" | "gray") | ("info" | "danger")}` | string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
}>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
14
|
-
export { Badge, Tag };
|
|
15
9
|
export { Button } from "./Button/Button";
|
|
16
10
|
export type { ButtonVariant } from "./Button/Button";
|
|
17
11
|
export { Card } from "./Card/Card";
|
|
@@ -31,7 +25,7 @@ export { Slider, SliderInput } from "./Form/Slider";
|
|
|
31
25
|
export { Text, TextInput } from "./Form/Text";
|
|
32
26
|
export { Textarea, TextareaInput } from "./Form/Textarea";
|
|
33
27
|
export { Footer } from "./Layout/Footer";
|
|
34
|
-
export { Header, HeaderTitle, Infos, MenuTitleWrapper, Name, NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, ToggleButton, User, } from "./Layout/Header";
|
|
28
|
+
export { Header, HeaderTitle, Infos, MenuTitleWrapper, Name, NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, ToggleButton, User, type AnchorNavBarItem, } from "./Layout/Header";
|
|
35
29
|
export { MainContainer } from "./Layout/MainContainer/MainContainer";
|
|
36
30
|
export { Link, type LinkProps } from "./Link/Link";
|
|
37
31
|
export { BooleanModal, Modal, ModalBody, ModalFooter, ModalHeader, ModalHeaderBase, } from "./ModalAgent";
|
|
@@ -42,6 +36,14 @@ export { Svg } from "./Svg";
|
|
|
42
36
|
export { Tabs } from "./Tabs/Tabs";
|
|
43
37
|
export { Title } from "./Title/Title";
|
|
44
38
|
export { getComponentClassName } from "./utilities";
|
|
39
|
+
/** @deprecated Use `Tag` instead. */
|
|
40
|
+
declare const Badge: import("react").ForwardRefExoticComponent<Omit<import("react").PropsWithChildren<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
41
|
+
classModifier?: string;
|
|
42
|
+
variant?: import("./Tag/Tag").TagVariants;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
}>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
45
|
+
export type { TagVariants } from "./Tag/Tag";
|
|
46
|
+
export { Badge, Tag };
|
|
45
47
|
/**
|
|
46
48
|
* @deprecated `Alert` has been renamed `Message` in order to comply with UX naming of components. Use `Message` instead.
|
|
47
49
|
* @see {@link Message}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import "@axa-fr/design-system-slash-css/dist/common/icons.scss";
|
|
2
2
|
import "@axa-fr/design-system-slash-css/dist/common/reboot.scss";
|
|
3
3
|
import "@axa-fr/design-system-slash-css/dist/common/tokens.css";
|
|
4
|
-
import "@fontsource/source-sans-pro";
|
|
4
|
+
import "@fontsource/source-sans-pro/400.css";
|
|
5
5
|
import "@fontsource/source-sans-pro/700.css";
|
|
6
6
|
import { Message } from "./Messages/Message";
|
|
7
7
|
import { Tag } from "./Tag/Tag";
|
|
8
8
|
export { Action } from "./Action/Action";
|
|
9
|
-
/** @deprecated Use `Tag` instead. */
|
|
10
|
-
const Badge = Tag;
|
|
11
|
-
export { Badge, Tag };
|
|
12
9
|
export { Button } from "./Button/Button";
|
|
13
10
|
export { Card } from "./Card/Card";
|
|
14
11
|
export { Divider } from "./Divider/Divider";
|
|
@@ -38,6 +35,9 @@ export { Svg } from "./Svg";
|
|
|
38
35
|
export { Tabs } from "./Tabs/Tabs";
|
|
39
36
|
export { Title } from "./Title/Title";
|
|
40
37
|
export { getComponentClassName } from "./utilities";
|
|
38
|
+
/** @deprecated Use `Tag` instead. */
|
|
39
|
+
const Badge = Tag;
|
|
40
|
+
export { Badge, Tag };
|
|
41
41
|
/**
|
|
42
42
|
* @deprecated `Alert` has been renamed `Message` in order to comply with UX naming of components. Use `Message` instead.
|
|
43
43
|
* @see {@link Message}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-slash-react",
|
|
3
|
-
"version": "2.0.0-RC.
|
|
3
|
+
"version": "2.0.0-RC.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -47,19 +47,22 @@
|
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@axa-fr/design-system-slash-css": "2.0.0-RC.
|
|
50
|
+
"@axa-fr/design-system-slash-css": "2.0.0-RC.3",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
|
+
"@material-symbols/svg-700": ">= 0.19.0",
|
|
52
53
|
"react": ">= 18"
|
|
53
54
|
},
|
|
54
55
|
"peerDependenciesMeta": {
|
|
55
56
|
"@material-symbols/svg-400": {
|
|
56
|
-
"optional":
|
|
57
|
+
"optional": false
|
|
58
|
+
},
|
|
59
|
+
"@material-symbols/svg-700": {
|
|
60
|
+
"optional": false
|
|
57
61
|
}
|
|
58
62
|
},
|
|
59
63
|
"dependencies": {
|
|
60
64
|
"@floating-ui/react": "^0.27.8",
|
|
61
65
|
"@fontsource/source-sans-pro": "^5.2.5",
|
|
62
|
-
"@material-symbols/svg-700": ">= 0.19.0",
|
|
63
66
|
"@tanem/svg-injector": "^10.1.68",
|
|
64
67
|
"classnames": "^2.5.1",
|
|
65
68
|
"dompurify": "^3.1.5",
|