@axa-fr/design-system-apollo-react 1.0.5-alpha.390 → 1.0.5-alpha.391
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/Radio/CardRadio/CardRadioCommon.d.ts +2 -2
- package/dist/Form/Radio/CardRadio/CardRadioCommon.js +1 -1
- package/dist/Form/Radio/CardRadio/CardRadioItem.d.ts +3 -3
- package/dist/Form/Radio/Radio/RadioApollo.d.ts +1 -2
- package/dist/Form/Radio/Radio/RadioApollo.js +1 -5
- package/dist/Form/Radio/Radio/RadioCommon.d.ts +5 -3
- package/dist/Form/Radio/Radio/RadioCommon.js +5 -3
- package/dist/Form/Radio/Radio/RadioLF.d.ts +1 -2
- package/dist/Form/Radio/Radio/RadioLF.js +1 -5
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ComponentProps, type ComponentType } from "react";
|
|
2
2
|
import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Radio } from "../Radio/RadioCommon";
|
|
4
4
|
import type { IconComponent, RadioComponent, TCardRadioItemOption } from "./types";
|
|
5
|
-
export type CardRadioProps = Omit<ComponentProps<typeof
|
|
5
|
+
export type CardRadioProps = Omit<ComponentProps<typeof Radio>, "size"> & {
|
|
6
6
|
type: "vertical" | "horizontal";
|
|
7
7
|
labelGroup?: string;
|
|
8
8
|
descriptionGroup?: string;
|
|
@@ -13,7 +13,7 @@ const CardRadioCommon = ({ className, labelGroup, descriptionGroup, RadioCompone
|
|
|
13
13
|
const size = isMobile
|
|
14
14
|
? "M"
|
|
15
15
|
: "L";
|
|
16
|
-
return (_jsxs("fieldset", { className: componentClassName, "aria-invalid": Boolean(error), "aria-errormessage": error ? errorId : undefined, children: [labelGroup && (_jsxs("legend", { className: "af-card-radio__legend", children: [_jsxs("p", { children: [labelGroup, isRequired && _jsx("span", { "aria-hidden": true, children: "\u00A0*" })] }), descriptionGroup && (_jsx("p", { className: "af-card-radio__description", children: descriptionGroup }))] })), _jsx("div", { className: RadioGroupClassName, children: options.map((cardRadioItemProps) => (_jsx(CardRadioItem, { name: name, onChange: onChange, size: size, RadioComponent: RadioComponent, IconComponent: IconComponent, checked: value !== undefined
|
|
16
|
+
return (_jsxs("fieldset", { className: componentClassName, "aria-invalid": Boolean(error), "aria-errormessage": error ? errorId : undefined, children: [labelGroup && (_jsxs("legend", { className: "af-card-radio__legend", children: [_jsxs("p", { children: [labelGroup, isRequired && _jsx("span", { "aria-hidden": true, children: "\u00A0*" })] }), descriptionGroup && (_jsx("p", { className: "af-card-radio__description", children: descriptionGroup }))] })), _jsx("div", { className: RadioGroupClassName, children: options.map((cardRadioItemProps) => (_jsx(CardRadioItem, { name: name, onChange: onChange, size: size, RadioComponent: RadioComponent, IconComponent: IconComponent, isInvalid: Boolean(error), checked: value !== undefined
|
|
17
17
|
? value === cardRadioItemProps.value
|
|
18
18
|
: undefined, ...inputProps, ...cardRadioItemProps }, `${name ?? cardRadioId}-${cardRadioItemProps.label}`))) }), _jsx(ItemMessageComponent, { id: errorId, message: error, messageType: "error" })] }));
|
|
19
19
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type ComponentProps, type ComponentType } from "react";
|
|
2
2
|
import type { Icon as IconCommon } from "../../../Icon/IconCommon";
|
|
3
|
-
import type {
|
|
4
|
-
export type TCardRadioItemProps = Omit<ComponentProps<typeof
|
|
3
|
+
import type { Radio } from "../Radio/RadioCommon";
|
|
4
|
+
export type TCardRadioItemProps = Omit<ComponentProps<typeof Radio>, "size"> & {
|
|
5
5
|
label: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
subtitle?: string;
|
|
8
8
|
icon?: ComponentProps<typeof IconCommon>["src"];
|
|
9
9
|
size: ComponentProps<typeof IconCommon>["size"];
|
|
10
|
-
RadioComponent: ComponentType<ComponentProps<typeof
|
|
10
|
+
RadioComponent: ComponentType<ComponentProps<typeof Radio>>;
|
|
11
11
|
IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
|
|
12
12
|
};
|
|
13
13
|
export declare const CardRadioItem: ({ label, description, subtitle, icon, size, RadioComponent, IconComponent, ...inputProps }: TCardRadioItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/Radio/RadioApollo.scss";
|
|
2
|
-
|
|
3
|
-
export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
2
|
+
export { Radio } from "./RadioCommon";
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/Radio/RadioApollo.scss";
|
|
4
|
-
|
|
5
|
-
export const Radio = forwardRef((props, ref) => (_jsx(RadioCommon, { ...props, ref: ref })));
|
|
6
|
-
Radio.displayName = "Radio";
|
|
2
|
+
export { Radio } from "./RadioCommon";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export type RadioProps = Omit<
|
|
3
|
-
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
export type RadioProps = Omit<ComponentProps<"input">, "disabled" | "type"> & {
|
|
3
|
+
isInvalid?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const Radio: import("react").ForwardRefExoticComponent<Omit<RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
export const
|
|
4
|
-
|
|
3
|
+
export const Radio = forwardRef(({ className, isInvalid, ...props }, ref) => (_jsx("input", { ...props, className: ["af-radio", isInvalid && "af-radio--invalid", className]
|
|
4
|
+
.filter(Boolean)
|
|
5
|
+
.join(" "), type: "radio", ref: ref })));
|
|
6
|
+
Radio.displayName = "Radio";
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/Radio/RadioLF.scss";
|
|
2
|
-
|
|
3
|
-
export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
2
|
+
export { Radio } from "./RadioCommon";
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/Radio/RadioLF.scss";
|
|
4
|
-
|
|
5
|
-
export const Radio = forwardRef((props, ref) => (_jsx(RadioCommon, { ...props, ref: ref })));
|
|
6
|
-
Radio.displayName = "Radio";
|
|
2
|
+
export { Radio } from "./RadioCommon";
|
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.391",
|
|
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.391",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.391",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|