@axa-fr/design-system-apollo-react 1.0.5-alpha.389 → 1.0.5-alpha.390
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/CardCheckbox/CardCheckboxCommon.d.ts +4 -4
- package/dist/Form/Checkbox/CardCheckbox/CardCheckboxCommon.js +2 -2
- package/dist/Form/Checkbox/Checkbox/CheckboxApollo.d.ts +1 -1
- package/dist/Form/Checkbox/Checkbox/CheckboxCommon.d.ts +6 -9
- package/dist/Form/Checkbox/Checkbox/CheckboxLF.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ChangeEventHandler, type ComponentProps, type ComponentType } from "react";
|
|
2
2
|
import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
|
|
3
3
|
import { type TCardCheckboxItem } from "./CardCheckboxItem";
|
|
4
4
|
import type { CheckboxComponent, IconComponent } from "./types";
|
|
5
|
-
export type CardCheckboxProps =
|
|
5
|
+
export type CardCheckboxProps = Partial<TCardCheckboxItem> & {
|
|
6
6
|
type: "vertical" | "horizontal";
|
|
7
7
|
labelGroup?: string;
|
|
8
8
|
descriptionGroup?: string;
|
|
9
9
|
isRequired?: boolean;
|
|
10
10
|
options: TCardCheckboxItem[];
|
|
11
|
-
onChange?:
|
|
11
|
+
onChange?: ChangeEventHandler;
|
|
12
12
|
error?: string;
|
|
13
13
|
};
|
|
14
14
|
type CardCheckboxCommonProps = CardCheckboxProps & CheckboxComponent & IconComponent & {
|
|
15
15
|
ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
|
|
16
16
|
};
|
|
17
17
|
export declare const CardCheckboxCommon: {
|
|
18
|
-
({ className, labelGroup, descriptionGroup, CheckboxComponent, IconComponent, isRequired, options, onChange, type, error, ItemMessageComponent, }: CardCheckboxCommonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
({ className, labelGroup, descriptionGroup, CheckboxComponent, IconComponent, isRequired, options, onChange, type, error, ItemMessageComponent, ...inputProps }: CardCheckboxCommonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
displayName: string;
|
|
20
20
|
};
|
|
21
21
|
export {};
|
|
@@ -4,12 +4,12 @@ import { BREAKPOINT } from "../../../utilities/constants";
|
|
|
4
4
|
import { getComponentClassName } from "../../../utilities/getComponentClassName";
|
|
5
5
|
import { useIsSmallScreen } from "../../../utilities/hook/useIsSmallScreen";
|
|
6
6
|
import { CardCheckboxItem } from "./CardCheckboxItem";
|
|
7
|
-
export const CardCheckboxCommon = ({ className, labelGroup, descriptionGroup, CheckboxComponent, IconComponent, isRequired, options, onChange, type = "vertical", error, ItemMessageComponent, }) => {
|
|
7
|
+
export const CardCheckboxCommon = ({ className, labelGroup, descriptionGroup, CheckboxComponent, IconComponent, isRequired, options, onChange, type = "vertical", error, ItemMessageComponent, ...inputProps }) => {
|
|
8
8
|
const componentClassName = getComponentClassName("af-card-checkbox__container", className);
|
|
9
9
|
const checkboxGroupClassName = getComponentClassName("af-card-checkbox-group", className, type);
|
|
10
10
|
const errorId = useId();
|
|
11
11
|
const isMobile = useIsSmallScreen(BREAKPOINT.SM);
|
|
12
12
|
const size = isMobile ? "M" : "L";
|
|
13
|
-
return (_jsxs("fieldset", { className: componentClassName, children: [labelGroup && (_jsxs("legend", { className: "af-card-checkbox__legend", children: [_jsxs("p", { children: [labelGroup, isRequired && _jsx("span", { "aria-hidden": true, children: "\u00A0*" })] }), descriptionGroup && (_jsx("p", { className: "af-card-checkbox__description", children: descriptionGroup }))] })), _jsxs("div", { className: "af-card-checkbox__choices", children: [_jsx("ul", { className: checkboxGroupClassName, children: options.map(({ hasError, ...
|
|
13
|
+
return (_jsxs("fieldset", { className: componentClassName, children: [labelGroup && (_jsxs("legend", { className: "af-card-checkbox__legend", children: [_jsxs("p", { children: [labelGroup, isRequired && _jsx("span", { "aria-hidden": true, children: "\u00A0*" })] }), descriptionGroup && (_jsx("p", { className: "af-card-checkbox__description", children: descriptionGroup }))] })), _jsxs("div", { className: "af-card-checkbox__choices", children: [_jsx("ul", { className: checkboxGroupClassName, children: options.map(({ hasError, ...optionProps }) => (_jsx("li", { children: _jsx(CardCheckboxItem, { ...inputProps, size: size, errorId: errorId, onChange: onChange, CheckboxComponent: CheckboxComponent, IconComponent: IconComponent, hasError: Boolean(error) || hasError, ...optionProps }) }, crypto.randomUUID()))) }), _jsx(ItemMessageComponent, { id: errorId, message: error, messageType: "error" })] })] }));
|
|
14
14
|
};
|
|
15
15
|
CardCheckboxCommon.displayName = "CardCheckboxCommon";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/Checkbox/CheckboxApollo.scss";
|
|
2
|
-
export declare const Checkbox: import("react").ForwardRefExoticComponent<
|
|
2
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<{
|
|
3
3
|
errorId?: string;
|
|
4
4
|
hasError?: boolean;
|
|
5
5
|
className?: string;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
export type CheckboxProps =
|
|
1
|
+
import { type InputHTMLAttributes } from "react";
|
|
2
|
+
export type CheckboxProps = {
|
|
3
3
|
errorId?: string;
|
|
4
4
|
hasError?: boolean;
|
|
5
5
|
className?: string;
|
|
6
|
-
} & Omit<
|
|
7
|
-
|
|
8
|
-
checkBoxIcon: string;
|
|
9
|
-
};
|
|
10
|
-
declare const CheckboxCommon: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
6
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "disabled">;
|
|
7
|
+
declare const CheckboxCommon: import("react").ForwardRefExoticComponent<{
|
|
11
8
|
errorId?: string;
|
|
12
9
|
hasError?: boolean;
|
|
13
10
|
className?: string;
|
|
14
|
-
} & Omit<
|
|
11
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "disabled"> & {
|
|
15
12
|
checkBoxIcon: string;
|
|
16
|
-
} &
|
|
13
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
17
14
|
export { CheckboxCommon };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/Checkbox/CheckboxLF.scss";
|
|
2
|
-
export declare const Checkbox: import("react").ForwardRefExoticComponent<
|
|
2
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<{
|
|
3
3
|
errorId?: string;
|
|
4
4
|
hasError?: boolean;
|
|
5
5
|
className?: string;
|
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.390",
|
|
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.390",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.390",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|