@axa-fr/design-system-apollo-react 1.0.5-alpha.286 → 1.0.5-alpha.292

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.
Files changed (27) hide show
  1. package/dist/Form/Checkbox/CardCheckbox/CardCheckboxApollo.d.ts +6 -0
  2. package/dist/Form/Checkbox/{CheckboxCard/CheckboxCardApollo.js → CardCheckbox/CardCheckboxApollo.js} +4 -4
  3. package/dist/Form/Checkbox/{CheckboxCard/CheckboxCardCommon.d.ts → CardCheckbox/CardCheckboxCommon.d.ts} +6 -6
  4. package/dist/Form/Checkbox/CardCheckbox/CardCheckboxCommon.js +15 -0
  5. package/dist/Form/Checkbox/{CheckboxCard/CheckboxCardItem.d.ts → CardCheckbox/CardCheckboxItem.d.ts} +4 -4
  6. package/dist/Form/Checkbox/{CheckboxCard/CheckboxCardItem.js → CardCheckbox/CardCheckboxItem.js} +2 -2
  7. package/dist/Form/Checkbox/CardCheckbox/CardCheckboxLF.d.ts +6 -0
  8. package/dist/Form/Checkbox/{CheckboxCard/CheckboxCardLF.js → CardCheckbox/CardCheckboxLF.js} +4 -4
  9. package/dist/Form/Checkbox/Checkbox/CheckboxApollo.js +1 -1
  10. package/dist/Form/Checkbox/Checkbox/CheckboxCommon.js +1 -1
  11. package/dist/Form/Checkbox/Checkbox/CheckboxLF.js +1 -1
  12. package/dist/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +1 -1
  13. package/dist/Form/Checkbox/CheckboxText/CheckboxTextCommon.js +1 -1
  14. package/dist/Grid/DebugGridApollo.js +2 -2
  15. package/dist/Grid/DebugGridLF.js +2 -2
  16. package/dist/Heading/HeadingCommon.d.ts +8 -8
  17. package/dist/Heading/HeadingCommon.js +2 -2
  18. package/dist/Heading/HeadingWithSubheadings.d.ts +1 -1
  19. package/dist/Heading/HeadingWithSubheadings.js +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/indexLF.d.ts +1 -1
  23. package/dist/indexLF.js +1 -1
  24. package/package.json +3 -3
  25. package/dist/Form/Checkbox/CheckboxCard/CheckboxCardApollo.d.ts +0 -6
  26. package/dist/Form/Checkbox/CheckboxCard/CheckboxCardCommon.js +0 -15
  27. package/dist/Form/Checkbox/CheckboxCard/CheckboxCardLF.d.ts +0 -6
@@ -0,0 +1,6 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/CardCheckbox/CardCheckboxApollo.scss";
2
+ import { type CardCheckboxProps } from "./CardCheckboxCommon";
3
+ export declare const CardCheckbox: {
4
+ (props: CardCheckboxProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/CheckboxCard/CheckboxCardApollo.scss";
2
+ import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/CardCheckbox/CardCheckboxApollo.scss";
3
3
  import { Icon } from "../../../Icon/IconApollo";
4
4
  import { ItemMessage } from "../../ItemMessage/ItemMessageApollo";
5
5
  import { Checkbox } from "../Checkbox/CheckboxApollo";
6
- import { CheckboxCardCommon } from "./CheckboxCardCommon";
7
- export const CheckboxCard = (props) => (_jsx(CheckboxCardCommon, { ...props, IconComponent: Icon, CheckboxComponent: Checkbox, ItemMessageComponent: ItemMessage }));
8
- CheckboxCard.displayName = "CheckboxCard";
6
+ import { CardCheckboxCommon, } from "./CardCheckboxCommon";
7
+ export const CardCheckbox = (props) => (_jsx(CardCheckboxCommon, { ...props, IconComponent: Icon, CheckboxComponent: Checkbox, ItemMessageComponent: ItemMessage }));
8
+ CardCheckbox.displayName = "CardCheckbox";
@@ -1,21 +1,21 @@
1
1
  import React, { ComponentPropsWithRef, type ComponentProps, type ComponentType } from "react";
2
2
  import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
3
- import { type TCheckboxCardItem } from "./CheckboxCardItem";
3
+ import { type TCardCheckboxItem } from "./CardCheckboxItem";
4
4
  import type { CheckboxComponent, IconComponent } from "./types";
5
- export type CheckboxCardProps = ComponentPropsWithRef<"input"> & {
5
+ export type CardCheckboxProps = ComponentPropsWithRef<"input"> & {
6
6
  type: "vertical" | "horizontal";
7
7
  labelGroup?: string;
8
8
  descriptionGroup?: string;
9
9
  isRequired?: boolean;
10
- options: TCheckboxCardItem[];
10
+ options: TCardCheckboxItem[];
11
11
  onChange?: React.ChangeEventHandler;
12
12
  error?: string;
13
13
  };
14
- type CheckboxCardCommonProps = CheckboxCardProps & CheckboxComponent & IconComponent & {
14
+ type CardCheckboxCommonProps = CardCheckboxProps & CheckboxComponent & IconComponent & {
15
15
  ItemMessageComponent: ComponentType<ComponentProps<typeof ItemMessage>>;
16
16
  };
17
- export declare const CheckboxCardCommon: {
18
- ({ className, labelGroup, descriptionGroup, CheckboxComponent, IconComponent, isRequired, options, onChange, type, error, ItemMessageComponent, }: CheckboxCardCommonProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare const CardCheckboxCommon: {
18
+ ({ className, labelGroup, descriptionGroup, CheckboxComponent, IconComponent, isRequired, options, onChange, type, error, ItemMessageComponent, }: CardCheckboxCommonProps): import("react/jsx-runtime").JSX.Element;
19
19
  displayName: string;
20
20
  };
21
21
  export {};
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useId, } from "react";
3
+ import { BREAKPOINT } from "../../../utilities/constants";
4
+ import { getComponentClassName } from "../../../utilities/getComponentClassName";
5
+ import { useIsSmallScreen } from "../../../utilities/hook/useIsSmallScreen";
6
+ import { CardCheckboxItem } from "./CardCheckboxItem";
7
+ export const CardCheckboxCommon = ({ className, labelGroup, descriptionGroup, CheckboxComponent, IconComponent, isRequired, options, onChange, type = "vertical", error, ItemMessageComponent, }) => {
8
+ const componentClassName = getComponentClassName("af-card-checkbox__container", className);
9
+ const checkboxGroupClassName = getComponentClassName("af-card-checkbox-group", className, type);
10
+ const errorId = useId();
11
+ const isMobile = useIsSmallScreen(BREAKPOINT.SM);
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, ...inputProps }) => (_jsx("li", { children: _jsx(CardCheckboxItem, { size: size, errorId: errorId, onChange: onChange, CheckboxComponent: CheckboxComponent, IconComponent: IconComponent, hasError: Boolean(error) || hasError, ...inputProps }) }, crypto.randomUUID()))) }), _jsx(ItemMessageComponent, { id: errorId, message: error, messageType: "error" })] })] }));
14
+ };
15
+ CardCheckboxCommon.displayName = "CardCheckboxCommon";
@@ -1,15 +1,15 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { CheckboxComponent, IconComponent } from "./types";
3
- export type TCheckboxCardItem = {
3
+ export type TCardCheckboxItem = {
4
4
  label: ReactNode;
5
5
  subtitle?: ReactNode;
6
6
  description?: ReactNode;
7
7
  hasError?: boolean;
8
8
  icon?: string;
9
9
  } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "disabled" | "size">;
10
- type CheckboxCardItemProps = {
10
+ type CardCheckboxItemProps = {
11
11
  size: "M" | "L";
12
12
  errorId: string;
13
- } & TCheckboxCardItem & CheckboxComponent & IconComponent;
14
- export declare const CheckboxCardItem: ({ CheckboxComponent, IconComponent, id, label, description, subtitle, icon, errorId, hasError, size, ...inputProps }: CheckboxCardItemProps) => import("react/jsx-runtime").JSX.Element;
13
+ } & TCardCheckboxItem & CheckboxComponent & IconComponent;
14
+ export declare const CardCheckboxItem: ({ CheckboxComponent, IconComponent, id, label, description, subtitle, icon, errorId, hasError, size, ...inputProps }: CardCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
15
15
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useId } from "react";
3
- export const CheckboxCardItem = ({ CheckboxComponent, IconComponent, id, label, description, subtitle, icon, errorId, hasError, size, ...inputProps }) => {
3
+ export const CardCheckboxItem = ({ CheckboxComponent, IconComponent, id, label, description, subtitle, icon, errorId, hasError, size, ...inputProps }) => {
4
4
  let inputId = useId();
5
5
  inputId = id ?? inputId;
6
- return (_jsxs("label", { htmlFor: inputId, className: "af-checkbox-card-label", "aria-invalid": hasError, children: [_jsx(CheckboxComponent, { id: inputId, errorId: errorId, hasError: hasError, ...inputProps }), _jsxs("div", { className: "af-checkbox-card-content", children: [icon && _jsx(IconComponent, { src: icon, size: size }), _jsxs("div", { className: "af-checkbox-card-content-description", children: [_jsx("span", { children: label }), description && _jsx("span", { children: description }), subtitle && _jsx("span", { children: subtitle })] })] })] }));
6
+ return (_jsxs("label", { htmlFor: inputId, className: "af-card-checkbox-label", "aria-invalid": hasError, children: [_jsx(CheckboxComponent, { id: inputId, errorId: errorId, hasError: hasError, ...inputProps }), _jsxs("div", { className: "af-card-checkbox-content", children: [icon && _jsx(IconComponent, { src: icon, size: size }), _jsxs("div", { className: "af-card-checkbox-content-description", children: [_jsx("span", { children: label }), description && _jsx("span", { children: description }), subtitle && _jsx("span", { children: subtitle })] })] })] }));
7
7
  };
@@ -0,0 +1,6 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/CardCheckbox/CardCheckboxLF.scss";
2
+ import { type CardCheckboxProps } from "./CardCheckboxCommon";
3
+ export declare const CardCheckbox: {
4
+ (props: CardCheckboxProps): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/CheckboxCard/CheckboxCardLF.scss";
2
+ import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/CardCheckbox/CardCheckboxLF.scss";
3
3
  import { Icon } from "../../../Icon/IconLF";
4
4
  import { ItemMessage } from "../../ItemMessage/ItemMessageLF";
5
5
  import { Checkbox } from "../Checkbox/CheckboxLF";
6
- import { CheckboxCardCommon } from "./CheckboxCardCommon";
7
- export const CheckboxCard = (props) => (_jsx(CheckboxCardCommon, { ...props, IconComponent: Icon, CheckboxComponent: Checkbox, ItemMessageComponent: ItemMessage }));
8
- CheckboxCard.displayName = "CheckboxCard";
6
+ import { CardCheckboxCommon, } from "./CardCheckboxCommon";
7
+ export const CardCheckbox = (props) => (_jsx(CardCheckboxCommon, { ...props, IconComponent: Icon, CheckboxComponent: Checkbox, ItemMessageComponent: ItemMessage }));
8
+ CardCheckbox.displayName = "CardCheckbox";
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/Checkbox/CheckboxApollo.scss";
3
- import checkBoxIcon from "@material-symbols/svg-400/outlined/check_small.svg";
3
+ import checkBoxIcon from "@material-symbols/svg-400/rounded/check_small.svg";
4
4
  import { CheckboxCommon } from "./CheckboxCommon";
5
5
  export const Checkbox = (props) => (_jsx(CheckboxCommon, { ...props, checkBoxIcon: checkBoxIcon }));
6
6
  Checkbox.displayName = "Checkbox";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Svg } from "../../../Svg/Svg";
3
- const CheckboxCommon = ({ errorId, checkBoxIcon, hasError, ...inputProps }) => (_jsxs("span", { className: "af-checkbox", children: [_jsx("input", { ...inputProps, type: "checkbox", "aria-errormessage": errorId, "aria-invalid": hasError, disabled: false }), _jsx("span", { className: "af-checkbox__icons", children: _jsx(Svg, { src: checkBoxIcon, className: "af-checkbox__checked", "aria-hidden": true }) })] }));
3
+ const CheckboxCommon = ({ errorId, checkBoxIcon, hasError, ...inputProps }) => (_jsxs("span", { className: "af-checkbox", children: [_jsx("input", { ...inputProps, type: "checkbox", "aria-errormessage": errorId, "aria-invalid": hasError, disabled: false }), _jsx(Svg, { src: checkBoxIcon, "aria-hidden": true })] }));
4
4
  CheckboxCommon.displayName = "CheckboxCommon";
5
5
  export { CheckboxCommon };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/Checkbox/CheckboxLF.scss";
3
- import checkBoxIcon from "@material-symbols/svg-400/outlined/check.svg";
3
+ import checkBoxIcon from "@material-symbols/svg-400/rounded/check.svg";
4
4
  import { CheckboxCommon } from "./CheckboxCommon";
5
5
  export const Checkbox = (props) => (_jsx(CheckboxCommon, { ...props, checkBoxIcon: checkBoxIcon }));
6
6
  Checkbox.displayName = "Checkbox";
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, type ComponentProps, type ComponentType } from "react";
1
+ import React, { type ReactNode, type ComponentProps, type ComponentType } from "react";
2
2
  import { ItemMessage } from "../../ItemMessage/ItemMessageCommon";
3
3
  import { CheckboxProps } from "../Checkbox/CheckboxCommon";
4
4
  type CheckboxComponent = {
@@ -4,7 +4,7 @@ const CheckboxTextCommon = ({ label, errorMessage, CheckboxComponent, ItemMessag
4
4
  const errorId = useId();
5
5
  let inputId = useId();
6
6
  inputId = inputProps.id || inputId;
7
- return (_jsxs("div", { className: "af-checkbox-text", children: [_jsxs("label", { htmlFor: inputId, children: [_jsx(CheckboxComponent, { id: inputId, errorId: errorId, hasError: Boolean(errorMessage), ...inputProps }), _jsx("span", { children: label })] }, inputProps.name), _jsx("div", { className: "af-checkbox-text__error", children: _jsx(ItemMessageComponent, { message: errorMessage }) })] }));
7
+ return (_jsxs("div", { className: "af-checkbox-text", children: [_jsx(CheckboxComponent, { id: inputId, errorId: errorId, hasError: Boolean(errorMessage), ...inputProps }), _jsx("label", { htmlFor: inputId, children: _jsx("span", { children: label }) }, inputProps.name), _jsx(ItemMessageComponent, { message: errorMessage })] }));
8
8
  };
9
9
  CheckboxTextCommon.displayName = "CheckboxTextCommon";
10
10
  export { CheckboxTextCommon };
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import "@axa-fr/design-system-apollo-css/dist/Grid/DebugGrid.scss";
3
3
  import { useState } from "react";
4
- import { CheckboxCard } from "../Form/Checkbox/CheckboxCard/CheckboxCardApollo";
4
+ import { CardCheckbox } from "../Form/Checkbox/CardCheckbox/CardCheckboxApollo";
5
5
  import { DebugGridCommon } from "./DebugGridCommon";
6
6
  export const DebugGrid = ({ cols = 12, isCheckedByDefault = false, }) => {
7
7
  const [checked, setChecked] = useState(isCheckedByDefault);
8
8
  const handleChecked = () => setChecked(!checked);
9
- return (_jsxs(_Fragment, { children: [_jsx(CheckboxCard, { type: "horizontal", options: [
9
+ return (_jsxs(_Fragment, { children: [_jsx(CardCheckbox, { type: "horizontal", options: [
10
10
  {
11
11
  name: "debuggrid",
12
12
  label: "Grid",
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import "@axa-fr/design-system-apollo-css/dist/Grid/DebugGrid.scss";
3
3
  import { useState } from "react";
4
- import { CheckboxCard } from "../Form/Checkbox/CheckboxCard/CheckboxCardLF";
4
+ import { CardCheckbox } from "../Form/Checkbox/CardCheckbox/CardCheckboxLF";
5
5
  import { DebugGridCommon } from "./DebugGridCommon";
6
6
  export const DebugGrid = ({ cols = 12, isCheckedByDefault = false, }) => {
7
7
  const [checked, setChecked] = useState(isCheckedByDefault);
8
8
  const handleChecked = () => setChecked(!checked);
9
- return (_jsxs(_Fragment, { children: [_jsx(CheckboxCard, { type: "horizontal", options: [
9
+ return (_jsxs(_Fragment, { children: [_jsx(CardCheckbox, { type: "horizontal", options: [
10
10
  {
11
11
  name: "debuggrid",
12
12
  label: "Grid",
@@ -1,15 +1,15 @@
1
- import React, { type ReactNode } from "react";
2
- import { IconProps } from "../Icon/IconCommon";
3
- import { TagProps } from "../Tag/TagCommon";
4
- import { HeadingLevel } from "./types";
5
- export type HeadingCommonProps = React.PropsWithChildren<{
1
+ import type { JSX, PropsWithChildren, ReactNode } from "react";
2
+ import { type IconProps } from "../Icon/IconCommon";
3
+ import { type TagProps } from "../Tag/TagCommon";
4
+ import { type HeadingLevel } from "./types";
5
+ export type HeadingCommonProps = PropsWithChildren<{
6
6
  level?: HeadingLevel;
7
7
  icon?: string;
8
8
  iconProps?: Omit<IconProps, "src">;
9
- tag?: React.ReactNode;
9
+ tag?: ReactNode;
10
10
  firstSubtitle?: ReactNode;
11
11
  secondSubtitle?: ReactNode;
12
12
  className?: string;
13
- }>;
13
+ }> & JSX.IntrinsicElements["div"];
14
14
  export declare const DEFAULT_TAG_PROPS: TagProps;
15
- export declare const HeadingCommon: ({ children: title, className, firstSubtitle, secondSubtitle, level, icon, iconProps, tag, }: HeadingCommonProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const HeadingCommon: ({ children: title, className, firstSubtitle, secondSubtitle, level, icon, iconProps, tag, ...props }: HeadingCommonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import classNames from "classnames";
3
- import { HeadingWithSubheadings } from "./HeadingWithSubheadings";
4
3
  import { Icon } from "../Icon/IconCommon";
4
+ import { HeadingWithSubheadings } from "./HeadingWithSubheadings";
5
5
  export const DEFAULT_TAG_PROPS = {
6
6
  variant: "neutral",
7
7
  };
8
- export const HeadingCommon = ({ children: title, className, firstSubtitle, secondSubtitle, level = 1, icon, iconProps = {}, tag, }) => (_jsxs("header", { className: classNames("af-heading", className), children: [tag && level < 3 && _jsx("div", { className: "af-heading__label", children: tag }), icon && level === 1 && (_jsx(Icon, { src: icon, size: "L", hasBackground: true, variant: "secondary", ...iconProps, className: classNames("af-heading__icon", iconProps.className) })), _jsx(HeadingWithSubheadings, { title: title, firstSubtitle: firstSubtitle, titleComponent: `h${level}`, secondSubtitle: secondSubtitle })] }));
8
+ export const HeadingCommon = ({ children: title, className, firstSubtitle, secondSubtitle, level = 1, icon, iconProps = {}, tag, ...props }) => (_jsxs("div", { className: classNames("af-heading", className), ...props, children: [tag && level < 3 && _jsx("div", { className: "af-heading__label", children: tag }), icon && level === 1 && (_jsx(Icon, { src: icon, size: "L", hasBackground: true, variant: "secondary", ...iconProps, className: classNames("af-heading__icon", iconProps.className) })), _jsx(HeadingWithSubheadings, { title: title, firstSubtitle: firstSubtitle, titleComponent: `h${level}`, secondSubtitle: secondSubtitle })] }));
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import { HeadingLevel } from "./types";
2
+ import type { HeadingLevel } from "./types";
3
3
  type HeadingTextProps = {
4
4
  title: ReactNode;
5
5
  firstSubtitle?: ReactNode;
@@ -1,2 +1,2 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const HeadingWithSubheadings = ({ title, firstSubtitle, secondSubtitle, titleComponent: TitleComponent = "h1", }) => (_jsxs("div", { className: "af-heading__title-container", children: [_jsx(TitleComponent, { className: "af-heading__title", children: title }), firstSubtitle && (_jsx("span", { className: "af-heading__subtitle", children: firstSubtitle })), TitleComponent === "h1" && secondSubtitle && (_jsx("span", { className: "af-heading__subtitle", children: secondSubtitle }))] }));
2
+ export const HeadingWithSubheadings = ({ title, firstSubtitle, secondSubtitle, titleComponent: TitleComponent = "h1", }) => (_jsxs("hgroup", { className: "af-heading__title-container", children: [_jsx(TitleComponent, { className: "af-heading__title", children: title }), firstSubtitle && _jsx("p", { className: "af-heading__subtitle", children: firstSubtitle }), TitleComponent === "h1" && secondSubtitle && (_jsx("p", { className: "af-heading__subtitle", children: secondSubtitle }))] }));
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export { ClickIcon } from "./ClickIcon/ClickIconApollo";
9
9
  export { ContentItemMono } from "./ContentItemMono/ContentItemMonoApollo";
10
10
  export { Divider } from "./Divider/DividerApollo";
11
11
  export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxApollo";
12
- export { CheckboxCard } from "./Form/Checkbox/CheckboxCard/CheckboxCardApollo";
12
+ export { CardCheckbox, CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxApollo";
13
13
  export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextApollo";
14
14
  export { InputDate } from "./Form/InputDate/InputDateApollo";
15
15
  export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ export { ClickIcon } from "./ClickIcon/ClickIconApollo";
9
9
  export { ContentItemMono } from "./ContentItemMono/ContentItemMonoApollo";
10
10
  export { Divider } from "./Divider/DividerApollo";
11
11
  export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxApollo";
12
- export { CheckboxCard } from "./Form/Checkbox/CheckboxCard/CheckboxCardApollo";
12
+ export { CardCheckbox, CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxApollo";
13
13
  export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextApollo";
14
14
  export { InputDate } from "./Form/InputDate/InputDateApollo";
15
15
  export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
package/dist/indexLF.d.ts CHANGED
@@ -8,7 +8,7 @@ export { ClickIcon } from "./ClickIcon/ClickIconLF";
8
8
  export { ContentItemMono } from "./ContentItemMono/ContentItemMonoLF";
9
9
  export { Divider } from "./Divider/DividerLF";
10
10
  export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxLF";
11
- export { CheckboxCard } from "./Form/Checkbox/CheckboxCard/CheckboxCardLF";
11
+ export { CardCheckbox, CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxLF";
12
12
  export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextLF";
13
13
  export { InputDate, InputDate as DateInput, } from "./Form/InputDate/InputDateLF";
14
14
  export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
package/dist/indexLF.js CHANGED
@@ -8,7 +8,7 @@ export { ClickIcon } from "./ClickIcon/ClickIconLF";
8
8
  export { ContentItemMono } from "./ContentItemMono/ContentItemMonoLF";
9
9
  export { Divider } from "./Divider/DividerLF";
10
10
  export { Checkbox } from "./Form/Checkbox/Checkbox/CheckboxLF";
11
- export { CheckboxCard } from "./Form/Checkbox/CheckboxCard/CheckboxCardLF";
11
+ export { CardCheckbox, CardCheckbox as CheckboxCard, } from "./Form/Checkbox/CardCheckbox/CardCheckboxLF";
12
12
  export { CheckboxText } from "./Form/Checkbox/CheckboxText/CheckboxTextLF";
13
13
  export { InputDate, InputDate as DateInput, } from "./Form/InputDate/InputDateLF";
14
14
  export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
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.286",
3
+ "version": "1.0.5-alpha.292",
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.286",
50
- "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.286",
49
+ "@axa-fr/design-system-apollo-css": "1.0.5-alpha.292",
50
+ "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.292",
51
51
  "@material-symbols/svg-400": ">= 0.19.0",
52
52
  "react": ">= 18"
53
53
  },
@@ -1,6 +0,0 @@
1
- import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/CheckboxCard/CheckboxCardApollo.scss";
2
- import { CheckboxCardProps } from "./CheckboxCardCommon";
3
- export declare const CheckboxCard: {
4
- (props: CheckboxCardProps): import("react/jsx-runtime").JSX.Element;
5
- displayName: string;
6
- };
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useId, } from "react";
3
- import { BREAKPOINT } from "../../../utilities/constants";
4
- import { getComponentClassName } from "../../../utilities/getComponentClassName";
5
- import { useIsSmallScreen } from "../../../utilities/hook/useIsSmallScreen";
6
- import { CheckboxCardItem } from "./CheckboxCardItem";
7
- export const CheckboxCardCommon = ({ className, labelGroup, descriptionGroup, CheckboxComponent, IconComponent, isRequired, options, onChange, type = "vertical", error, ItemMessageComponent, }) => {
8
- const componentClassName = getComponentClassName("af-checkbox-card__container", className);
9
- const checkboxGroupClassName = getComponentClassName("af-checkbox-card-group", className, type);
10
- const errorId = useId();
11
- const isMobile = useIsSmallScreen(BREAKPOINT.SM);
12
- const size = isMobile ? "M" : "L";
13
- return (_jsxs("fieldset", { className: componentClassName, children: [_jsx("div", { className: "af-checkbox-card__label-container", children: labelGroup && (_jsxs("legend", { className: "af-checkbox-card__legend", children: [labelGroup, isRequired && _jsx("span", { "aria-hidden": true, children: "\u00A0*" }), descriptionGroup && (_jsx("p", { className: "af-checkbox-card__description", children: descriptionGroup }))] })) }), _jsxs("div", { className: "af-checkbox-card__choices", children: [_jsx("ul", { className: checkboxGroupClassName, children: options.map(({ hasError, ...inputProps }) => (_jsx("li", { children: _jsx(CheckboxCardItem, { size: size, errorId: errorId, onChange: onChange, CheckboxComponent: CheckboxComponent, IconComponent: IconComponent, hasError: Boolean(error) || hasError, ...inputProps }) }, crypto.randomUUID()))) }), error && (_jsx(ItemMessageComponent, { id: errorId, message: error, messageType: "error" }))] })] }));
14
- };
15
- CheckboxCardCommon.displayName = "CheckboxCardCommon";
@@ -1,6 +0,0 @@
1
- import "@axa-fr/design-system-apollo-css/dist/Form/Checkbox/CheckboxCard/CheckboxCardLF.scss";
2
- import { CheckboxCardProps } from "./CheckboxCardCommon";
3
- export declare const CheckboxCard: {
4
- (props: CheckboxCardProps): import("react/jsx-runtime").JSX.Element;
5
- displayName: string;
6
- };