@axa-fr/design-system-apollo-react 1.0.5-alpha.391 → 1.0.5-alpha.396
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/ItemMessage/ItemMessageCommon.d.ts +2 -1
- package/dist/Form/Radio/CardRadio/CardRadioApollo.d.ts +1 -1
- package/dist/Form/Radio/CardRadio/CardRadioApollo.js +3 -4
- package/dist/Form/Radio/CardRadio/CardRadioCommon.d.ts +27 -12
- package/dist/Form/Radio/CardRadio/CardRadioCommon.js +10 -17
- package/dist/Form/Radio/CardRadio/CardRadioLF.d.ts +1 -1
- package/dist/Form/Radio/CardRadio/CardRadioLF.js +3 -4
- package/dist/Form/Radio/CardRadioOption/CardRadioOptionApollo.d.ts +3 -0
- package/dist/Form/Radio/CardRadioOption/CardRadioOptionApollo.js +6 -0
- package/dist/Form/Radio/CardRadioOption/CardRadioOptionCommon.d.ts +15 -0
- package/dist/Form/Radio/CardRadioOption/CardRadioOptionCommon.js +11 -0
- package/dist/Form/Radio/CardRadioOption/CardRadioOptionLF.d.ts +3 -0
- package/dist/Form/Radio/CardRadioOption/CardRadioOptionLF.js +6 -0
- package/dist/Form/TextArea/TextAreaApollo.d.ts +1 -1
- package/dist/Form/TextArea/TextAreaLF.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/indexLF.d.ts +1 -0
- package/dist/indexLF.js +1 -0
- package/package.json +3 -3
- package/dist/Form/Radio/CardRadio/CardRadioItem.d.ts +0 -13
- package/dist/Form/Radio/CardRadio/CardRadioItem.js +0 -2
- package/dist/Form/Radio/CardRadio/types.d.ts +0 -11
- package/dist/Form/Radio/CardRadio/types.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/CardRadio/CardRadioApollo.scss";
|
|
2
1
|
import { type CardRadioProps } from "./CardRadioCommon";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/CardRadio/CardRadioApollo.scss";
|
|
3
3
|
export declare const CardRadio: {
|
|
4
4
|
(props: CardRadioProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import { Icon } from "../../../Icon/IconApollo";
|
|
2
|
+
import { CardRadioOption } from "../CardRadioOption/CardRadioOptionApollo";
|
|
4
3
|
import { CardRadioCommon } from "./CardRadioCommon";
|
|
5
|
-
import { Radio } from "../Radio/RadioApollo";
|
|
6
4
|
import { ItemMessage } from "../../ItemMessage/ItemMessageApollo";
|
|
7
|
-
|
|
5
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/CardRadio/CardRadioApollo.scss";
|
|
6
|
+
export const CardRadio = (props) => (_jsx(CardRadioCommon, { ...props, CardRadioOptionComponent: CardRadioOption, ItemMessageComponent: ItemMessage }));
|
|
8
7
|
CardRadio.displayName = "CardRadio";
|
|
@@ -1,21 +1,36 @@
|
|
|
1
|
-
import { type ComponentProps, type ComponentType } from "react";
|
|
1
|
+
import { type ComponentProps, type ComponentType, type PropsWithChildren, type ReactNode } from "react";
|
|
2
2
|
import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
|
|
3
|
-
import type
|
|
4
|
-
|
|
5
|
-
export type CardRadioProps = Omit<
|
|
6
|
-
type
|
|
3
|
+
import { type CardRadioOptionProps } from "../CardRadioOption/CardRadioOptionCommon";
|
|
4
|
+
type RadioOption = Omit<CardRadioOptionProps, "name" | "type" | "isInvalid">;
|
|
5
|
+
export type CardRadioProps = Omit<CardRadioOptionProps, "value" | "label" | "type" | "isInvalid" | "icon" | "description" | "subtitle" | "children"> & {
|
|
6
|
+
type?: "vertical" | "horizontal";
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use `label` instead.
|
|
9
|
+
*/
|
|
7
10
|
labelGroup?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `description` instead.
|
|
13
|
+
*/
|
|
8
14
|
descriptionGroup?: string;
|
|
15
|
+
label: ReactNode;
|
|
16
|
+
description?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `required` instead.
|
|
19
|
+
*/
|
|
9
20
|
isRequired?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated This prop is deprecated. To check an option, use the `checked` property in each item of the `options` array.
|
|
23
|
+
*/
|
|
10
24
|
value?: number | string;
|
|
11
|
-
options:
|
|
12
|
-
error?:
|
|
13
|
-
};
|
|
14
|
-
export type CardRadioCommonProps = CardRadioProps &
|
|
25
|
+
options: RadioOption[];
|
|
26
|
+
error?: ReactNode;
|
|
27
|
+
} & PropsWithChildren;
|
|
28
|
+
export type CardRadioCommonProps = CardRadioProps & {
|
|
29
|
+
CardRadioOptionComponent: ComponentType<CardRadioOptionProps>;
|
|
15
30
|
ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
16
31
|
};
|
|
17
|
-
declare const CardRadioCommon: {
|
|
18
|
-
({ className, labelGroup, descriptionGroup,
|
|
32
|
+
export declare const CardRadioCommon: {
|
|
33
|
+
({ className, labelGroup, descriptionGroup, label, description, isRequired, required, options, type, error, name, value, id, CardRadioOptionComponent, ItemMessageComponent, ...inputProps }: CardRadioCommonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
34
|
displayName: string;
|
|
20
35
|
};
|
|
21
|
-
export {
|
|
36
|
+
export {};
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useId } from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const errorId = `${cardRadioId}:error`;
|
|
12
|
-
const isMobile = useIsSmallScreen(BREAKPOINT.SM);
|
|
13
|
-
const size = isMobile
|
|
14
|
-
? "M"
|
|
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, isInvalid: Boolean(error), checked: value !== undefined
|
|
2
|
+
import { useId, } from "react";
|
|
3
|
+
export const CardRadioCommon = ({ className, labelGroup, descriptionGroup, label, description, isRequired, required, options, type = "vertical", error, name, value, id, CardRadioOptionComponent, ItemMessageComponent, ...inputProps }) => {
|
|
4
|
+
const generatedId = useId();
|
|
5
|
+
const cardRadioId = id ?? generatedId;
|
|
6
|
+
const errorId = `${cardRadioId}-error`;
|
|
7
|
+
return (_jsxs("fieldset", { className: ["af-card-radio", className].filter(Boolean).join(" "), role: "radiogroup", "aria-required": required ? true : undefined, "aria-invalid": error ? true : undefined, "aria-errormessage": error ? errorId : undefined, id: cardRadioId, children: [_jsxs("legend", { className: "af-card-radio__legend", children: [_jsxs("p", { className: "af-card-radio__label", children: [label, labelGroup, (required || isRequired) && _jsx("span", { "aria-hidden": true, children: "*" })] }), (description || descriptionGroup) && (_jsxs("p", { className: "af-card-radio__description", children: [description, descriptionGroup] }))] }), _jsx("div", { className: [
|
|
8
|
+
"af-card-radio__options",
|
|
9
|
+
`af-card-radio__options--${type}`,
|
|
10
|
+
].join(" "), children: options.map((cardRadioItemProps) => (_jsx(CardRadioOptionComponent, { id: `${cardRadioId}-${cardRadioItemProps.value}`, checked: value !== undefined
|
|
17
11
|
? value === cardRadioItemProps.value
|
|
18
|
-
: undefined, ...inputProps, ...cardRadioItemProps }, `${name ?? cardRadioId}-${cardRadioItemProps.label}`))) }), _jsx(ItemMessageComponent, { id: errorId, message: error, messageType: "error" })] }));
|
|
12
|
+
: undefined, ...inputProps, ...cardRadioItemProps, type: type, isInvalid: Boolean(error), name: name }, `${name ?? cardRadioId}-${cardRadioItemProps.label}`))) }), _jsx(ItemMessageComponent, { id: errorId, message: error, messageType: "error" })] }));
|
|
19
13
|
};
|
|
20
14
|
CardRadioCommon.displayName = "CardRadioCommon";
|
|
21
|
-
export { CardRadioCommon };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/CardRadio/CardRadioLF.scss";
|
|
2
1
|
import { type CardRadioProps } from "./CardRadioCommon";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/CardRadio/CardRadioLF.scss";
|
|
3
3
|
export declare const CardRadio: {
|
|
4
4
|
(props: CardRadioProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import { Icon } from "../../../Icon/IconLF";
|
|
2
|
+
import { CardRadioOption } from "../CardRadioOption/CardRadioOptionLF";
|
|
4
3
|
import { CardRadioCommon } from "./CardRadioCommon";
|
|
5
|
-
import { Radio } from "../Radio/RadioLF";
|
|
6
4
|
import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
|
|
7
|
-
|
|
5
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/CardRadio/CardRadioLF.scss";
|
|
6
|
+
export const CardRadio = (props) => (_jsx(CardRadioCommon, { ...props, CardRadioOptionComponent: CardRadioOption, ItemMessageComponent: ItemMessage }));
|
|
8
7
|
CardRadio.displayName = "CardRadio";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type CardRadioOptionProps } from "./CardRadioOptionCommon";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/CardRadioOption/CardRadioOptionApollo.scss";
|
|
3
|
+
export declare const CardRadioOption: (props: CardRadioOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from "../../../Icon/IconApollo";
|
|
3
|
+
import { Radio } from "../Radio/RadioApollo";
|
|
4
|
+
import { CardRadioOptionCommon, } from "./CardRadioOptionCommon";
|
|
5
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/CardRadioOption/CardRadioOptionApollo.scss";
|
|
6
|
+
export const CardRadioOption = (props) => (_jsx(CardRadioOptionCommon, { ...props, RadioComponent: Radio, IconComponent: Icon }));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ComponentProps, type ComponentType, type ReactNode } from "react";
|
|
2
|
+
import type { Icon as IconCommon } from "../../../Icon/IconCommon";
|
|
3
|
+
import type { Radio } from "../Radio/RadioCommon";
|
|
4
|
+
export type CardRadioOptionProps = Omit<ComponentProps<typeof Radio>, "size"> & {
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
type?: "vertical" | "horizontal";
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
subtitle?: ReactNode;
|
|
9
|
+
icon?: ComponentProps<typeof IconCommon>["src"];
|
|
10
|
+
};
|
|
11
|
+
export type CardRadioOptionCommonProps = CardRadioOptionProps & {
|
|
12
|
+
RadioComponent: ComponentType<ComponentProps<typeof Radio>>;
|
|
13
|
+
IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
|
|
14
|
+
};
|
|
15
|
+
export declare const CardRadioOptionCommon: import("react").ForwardRefExoticComponent<Omit<CardRadioOptionCommonProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
export const CardRadioOptionCommon = forwardRef(({ label, type = "vertical", description, subtitle, icon, isInvalid, className, RadioComponent, IconComponent, ...inputProps }, ref) => (_jsxs("label", { className: [
|
|
4
|
+
"af-card-radio-option",
|
|
5
|
+
isInvalid && "af-card-radio-option--invalid",
|
|
6
|
+
type === "horizontal" && "af-card-radio-option--horizontal",
|
|
7
|
+
className,
|
|
8
|
+
]
|
|
9
|
+
.filter(Boolean)
|
|
10
|
+
.join(" "), children: [icon && _jsx(IconComponent, { src: icon, role: "presentation" }), _jsxs("div", { className: "af-card-radio-option__content", children: [_jsx("p", { className: "af-card-radio-option__label", children: label }), Boolean(description) && (_jsx("p", { className: "af-card-radio-option__description", children: description })), Boolean(subtitle) && (_jsx("p", { className: "af-card-radio-option__subtitle", children: subtitle }))] }), _jsx(RadioComponent, { ...inputProps, isInvalid: isInvalid, ref: ref })] })));
|
|
11
|
+
CardRadioOptionCommon.displayName = "CardRadioOptionCommon";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type CardRadioOptionProps } from "./CardRadioOptionCommon";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/CardRadioOption/CardRadioOptionLF.scss";
|
|
3
|
+
export declare const CardRadioOption: (props: CardRadioOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from "../../../Icon/IconLF";
|
|
3
|
+
import { Radio } from "../Radio/RadioLF";
|
|
4
|
+
import { CardRadioOptionCommon, } from "./CardRadioOptionCommon";
|
|
5
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/Radio/CardRadioOption/CardRadioOptionLF.scss";
|
|
6
|
+
export const CardRadioOption = (props) => (_jsx(CardRadioOptionCommon, { ...props, RadioComponent: Radio, IconComponent: Icon }));
|
|
@@ -19,7 +19,7 @@ export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Om
|
|
|
19
19
|
ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
20
20
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
21
21
|
} & Partial<{
|
|
22
|
-
message?:
|
|
22
|
+
message?: import("react").ReactNode;
|
|
23
23
|
id?: string;
|
|
24
24
|
messageType?: "error" | "success";
|
|
25
25
|
}>, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -19,7 +19,7 @@ export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Om
|
|
|
19
19
|
ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
20
20
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
21
21
|
} & Partial<{
|
|
22
|
-
message?:
|
|
22
|
+
message?: import("react").ReactNode;
|
|
23
23
|
id?: string;
|
|
24
24
|
messageType?: "error" | "success";
|
|
25
25
|
}>, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
|
23
23
|
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileApollo";
|
|
24
24
|
export { TextArea } from "./Form/TextArea/TextAreaApollo";
|
|
25
25
|
export { Radio } from "./Form/Radio/Radio/RadioApollo";
|
|
26
|
+
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionApollo";
|
|
26
27
|
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioApollo";
|
|
27
28
|
export { InputText } from "./Form/InputText/InputTextApollo";
|
|
28
29
|
export { DebugGrid } from "./Grid/DebugGridApollo";
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
|
23
23
|
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileApollo";
|
|
24
24
|
export { TextArea } from "./Form/TextArea/TextAreaApollo";
|
|
25
25
|
export { Radio } from "./Form/Radio/Radio/RadioApollo";
|
|
26
|
+
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionApollo";
|
|
26
27
|
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioApollo";
|
|
27
28
|
export { InputText } from "./Form/InputText/InputTextApollo";
|
|
28
29
|
export { DebugGrid } from "./Grid/DebugGridApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileLF";
|
|
|
26
26
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
27
27
|
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
28
28
|
export { Radio } from "./Form/Radio/Radio/RadioLF";
|
|
29
|
+
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionLF";
|
|
29
30
|
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioLF";
|
|
30
31
|
export { InputText,
|
|
31
32
|
/** @deprecated Use `InputText` instead. */
|
package/dist/indexLF.js
CHANGED
|
@@ -26,6 +26,7 @@ export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileLF";
|
|
|
26
26
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
27
27
|
export { TextArea } from "./Form/TextArea/TextAreaLF";
|
|
28
28
|
export { Radio } from "./Form/Radio/Radio/RadioLF";
|
|
29
|
+
export { CardRadioOption } from "./Form/Radio/CardRadioOption/CardRadioOptionLF";
|
|
29
30
|
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioLF";
|
|
30
31
|
export { InputText,
|
|
31
32
|
/** @deprecated Use `InputText` instead. */
|
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.396",
|
|
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.396",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.396",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps, type ComponentType } from "react";
|
|
2
|
-
import type { Icon as IconCommon } from "../../../Icon/IconCommon";
|
|
3
|
-
import type { Radio } from "../Radio/RadioCommon";
|
|
4
|
-
export type TCardRadioItemProps = Omit<ComponentProps<typeof Radio>, "size"> & {
|
|
5
|
-
label: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
subtitle?: string;
|
|
8
|
-
icon?: ComponentProps<typeof IconCommon>["src"];
|
|
9
|
-
size: ComponentProps<typeof IconCommon>["size"];
|
|
10
|
-
RadioComponent: ComponentType<ComponentProps<typeof Radio>>;
|
|
11
|
-
IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
|
|
12
|
-
};
|
|
13
|
-
export declare const CardRadioItem: ({ label, description, subtitle, icon, size, RadioComponent, IconComponent, ...inputProps }: TCardRadioItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export const CardRadioItem = ({ label, description, subtitle, icon, size, RadioComponent, IconComponent, ...inputProps }) => (_jsxs("label", { className: "af-card-radio-label", children: [_jsx(RadioComponent, { ...inputProps }), _jsxs("div", { className: "af-card-radio-content", children: [icon && _jsx(IconComponent, { src: icon, size: size, role: "presentation" }), _jsxs("div", { className: "af-card-radio-content-description", children: [_jsx("span", { children: label }), description && _jsx("span", { children: description }), subtitle && _jsx("span", { children: subtitle })] })] })] }));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, ComponentType } from "react";
|
|
2
|
-
import type { Icon } from "../../../indexLF";
|
|
3
|
-
import type { RadioProps } from "../Radio/RadioCommon";
|
|
4
|
-
import type { TCardRadioItemProps } from "./CardRadioItem";
|
|
5
|
-
export type TCardRadioItemOption = Omit<TCardRadioItemProps, "RadioComponent" | "IconComponent" | "size" | "name">;
|
|
6
|
-
export type RadioComponent = {
|
|
7
|
-
RadioComponent: ComponentType<RadioProps>;
|
|
8
|
-
};
|
|
9
|
-
export type IconComponent = {
|
|
10
|
-
IconComponent: ComponentType<ComponentProps<typeof Icon>>;
|
|
11
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|