@axa-fr/design-system-apollo-react 1.0.5-alpha.400 → 1.0.5-alpha.406
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.
|
@@ -9,6 +9,6 @@ export const CardRadioCommon = ({ className, labelGroup, descriptionGroup, label
|
|
|
9
9
|
`af-card-radio__options--${type}`,
|
|
10
10
|
].join(" "), children: options.map((cardRadioItemProps) => (_jsx(CardRadioOptionComponent, { id: `${cardRadioId}-${cardRadioItemProps.value}`, checked: value !== undefined
|
|
11
11
|
? value === cardRadioItemProps.value
|
|
12
|
-
: undefined, ...inputProps, ...cardRadioItemProps, type: type, isInvalid: Boolean(error), name: name }, `${name ?? cardRadioId}-${cardRadioItemProps.label}`))) }), _jsx(ItemMessageComponent, { id: errorId, message: error, messageType: "error" })] }));
|
|
12
|
+
: undefined, required: required, ...inputProps, ...cardRadioItemProps, type: type, isInvalid: Boolean(error), name: name }, `${name ?? cardRadioId}-${cardRadioItemProps.label}`))) }), _jsx(ItemMessageComponent, { id: errorId, message: error, messageType: "error" })] }));
|
|
13
13
|
};
|
|
14
14
|
CardRadioCommon.displayName = "CardRadioCommon";
|
|
@@ -2,6 +2,7 @@ import { type ComponentProps, ComponentPropsWithRef, type ComponentType, MouseEv
|
|
|
2
2
|
import { ItemLabel } from "../ItemLabel/ItemLabelCommon";
|
|
3
3
|
import { ItemMessage } from "../ItemMessage/ItemMessageCommon";
|
|
4
4
|
type Props = ComponentPropsWithRef<"textarea"> & Pick<ComponentProps<typeof ItemLabel>, "label" | "description" | "buttonLabel" | "sideButtonLabel" | "onSideButtonClick"> & {
|
|
5
|
+
/** @deprecated Use `className` instead */
|
|
5
6
|
classModifier?: string;
|
|
6
7
|
helper?: string;
|
|
7
8
|
error?: string;
|
|
@@ -9,5 +10,5 @@ type Props = ComponentPropsWithRef<"textarea"> & Pick<ComponentProps<typeof Item
|
|
|
9
10
|
ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
10
11
|
onButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
11
12
|
} & Partial<ComponentPropsWithRef<typeof ItemMessage>>;
|
|
12
|
-
declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
13
|
-
export {
|
|
13
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
14
|
+
export {};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useId, } from "react";
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
export const TextArea = forwardRef(({ id, className, classModifier = "", label, description, helper, error, buttonLabel, onButtonClick, required, sideButtonLabel, ItemLabelComponent, ItemMessageComponent, onSideButtonClick, placeholder = " ", ...inputProps }, inputRef) => {
|
|
4
|
+
const generatedId = useId();
|
|
5
|
+
const inputId = id ?? generatedId;
|
|
6
|
+
const helperId = `${inputId}-helper`;
|
|
7
|
+
const errorId = `${inputId}-error`;
|
|
8
|
+
return (_jsxs("div", { className: ["af-form__input-container", className]
|
|
9
|
+
.filter(Boolean)
|
|
10
|
+
.join(" "), children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId }), _jsx("textarea", { id: inputId, className: "af-form__input-textarea", ref: inputRef, "aria-errormessage": error ? errorId : undefined, "aria-describedby": helper ? helperId : undefined, required: required, "aria-invalid": Boolean(error) || classModifier.includes("error") ? true : undefined, placeholder: placeholder, ...inputProps }), helper ? (_jsx("span", { id: helperId, className: "af-form__input-helper", children: helper })) : null, _jsx(ItemMessageComponent, { id: errorId, message: error })] }));
|
|
11
11
|
});
|
|
12
12
|
TextArea.displayName = "TextArea";
|
|
13
|
-
export { TextArea };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "1.0.5-alpha.
|
|
3
|
+
"version": "1.0.5-alpha.406",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@axa-fr/design-system-apollo-css": "1.0.5-alpha.
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "1.0.5-alpha.406",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.406",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|