@axa-fr/canopee-react 2.0.0-alpha.4 → 2.0.0-alpha.43
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/client.d.ts +17 -16
- package/dist/client.js +17 -16
- package/dist/prospect-client/AccordionCore/AccordionCoreCommon.d.ts +1 -5
- package/dist/prospect-client/AccordionCore/AccordionCoreCommon.js +3 -3
- package/dist/prospect-client/AppName/AppName.d.ts +44 -0
- package/dist/prospect-client/AppName/AppName.js +23 -0
- package/dist/prospect-client/Card/CardApollo.d.ts +1 -1
- package/dist/prospect-client/Card/CardApollo.js +1 -1
- package/dist/prospect-client/Card/CardCommon.d.ts +30 -2
- package/dist/prospect-client/Card/CardCommon.js +18 -1
- package/dist/prospect-client/Card/CardLF.d.ts +1 -1
- package/dist/prospect-client/Card/CardLF.js +1 -1
- package/dist/prospect-client/CardMessage/CardMessageCommon.js +6 -4
- package/dist/prospect-client/ContentItemDuoAction/ContentItemDuoActionCommon.d.ts +2 -2
- package/dist/prospect-client/ContentItemDuoAction/ContentItemDuoActionCommon.js +5 -2
- package/dist/prospect-client/ContentItemMono/ContentItemMonoCommon.d.ts +0 -4
- package/dist/prospect-client/ContentItemMono/ContentItemMonoCommon.js +2 -3
- package/dist/prospect-client/DataAgent/DataAgentCommon.js +2 -2
- package/dist/prospect-client/Divider/DividerCommon.js +6 -2
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxCommon.d.ts +1 -17
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxCommon.js +4 -4
- package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.d.ts +2 -7
- package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.js +1 -1
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +1 -5
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.js +3 -3
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.d.ts +2 -10
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.js +3 -3
- package/dist/prospect-client/Form/InputDate/InputDateCommon.d.ts +2 -10
- package/dist/prospect-client/Form/InputDate/InputDateCommon.js +4 -5
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.d.ts +2 -10
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.js +8 -5
- package/dist/prospect-client/Form/InputText/InputTextCommon.d.ts +3 -11
- package/dist/prospect-client/Form/InputText/InputTextCommon.js +6 -5
- package/dist/prospect-client/Form/ItemLabel/ItemLabelCommon.d.ts +2 -22
- package/dist/prospect-client/Form/ItemLabel/ItemLabelCommon.js +4 -5
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo.d.ts +7 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo.js +6 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectCommon.d.ts +8 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectCommon.js +9 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF.d.ts +7 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF.js +6 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListApollo.d.ts +4 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListApollo.js +5 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListCommon.d.ts +11 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListCommon.js +2 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListLF.d.ts +4 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListLF.js +5 -0
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.d.ts +1 -5
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.js +4 -4
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.d.ts +3 -27
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.js +4 -6
- package/dist/prospect-client/Form/Radio/Radio/RadioCommon.d.ts +2 -5
- package/dist/prospect-client/Form/Radio/Radio/RadioCommon.js +6 -4
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.d.ts +2 -6
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.js +3 -3
- package/dist/prospect-client/Header/HeaderApollo.d.ts +4 -0
- package/dist/prospect-client/Header/HeaderApollo.js +8 -0
- package/dist/prospect-client/Header/HeaderCommon.d.ts +22 -0
- package/dist/prospect-client/Header/HeaderCommon.js +37 -0
- package/dist/prospect-client/Header/HeaderLF.d.ts +4 -0
- package/dist/prospect-client/Header/HeaderLF.js +8 -0
- package/dist/prospect-client/Icon/IconCommon.d.ts +1 -1
- package/dist/prospect-client/Icon/IconCommon.js +8 -9
- package/dist/prospect-client/ItemTabBar/ItemTabBarCommon.js +5 -2
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutApollo.d.ts +12 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutApollo.js +12 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutLF.d.ts +12 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutLF.js +12 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutSkeleton.d.ts +23 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutSkeleton.js +17 -0
- package/dist/prospect-client/Link/LinkCommon.d.ts +1 -5
- package/dist/prospect-client/Link/LinkCommon.js +2 -2
- package/dist/prospect-client/List/ClickItem/ClickItemCommon.d.ts +1 -0
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoCommon.d.ts +1 -5
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoCommon.js +3 -7
- package/dist/prospect-client/List/List/ListCommon.d.ts +27 -2
- package/dist/prospect-client/List/List/ListCommon.js +12 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerApollo.d.ts +4 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerApollo.js +8 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerCommon.d.ts +60 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerCommon.js +34 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerLF.d.ts +4 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerLF.js +8 -0
- package/dist/prospect-client/Modal/ModalApollo.d.ts +1 -1
- package/dist/prospect-client/Modal/ModalApollo.js +1 -3
- package/dist/prospect-client/Modal/ModalCommon.d.ts +1 -1
- package/dist/prospect-client/Modal/ModalCommon.js +1 -1
- package/dist/prospect-client/Modal/ModalLF.d.ts +1 -1
- package/dist/prospect-client/Modal/ModalLF.js +1 -3
- package/dist/prospect-client/Modal/components/ModalCoreHeaderCommon.d.ts +0 -7
- package/dist/prospect-client/Modal/components/ModalCoreHeaderCommon.js +2 -12
- package/dist/prospect-client/Modal/types.d.ts +0 -15
- package/dist/prospect-client/ProgressBarGroup/ProgressBarGroupCommon.d.ts +1 -5
- package/dist/prospect-client/ProgressBarGroup/ProgressBarGroupCommon.js +1 -1
- package/dist/prospect-client/Skeleton/Skeleton.d.ts +61 -0
- package/dist/prospect-client/Skeleton/Skeleton.js +41 -0
- package/dist/prospect-client/SkeletonGrid/SkeletonGrid.d.ts +51 -0
- package/dist/prospect-client/SkeletonGrid/SkeletonGrid.js +37 -0
- package/dist/prospect-client/SkeletonList/SkeletonListApollo.d.ts +7 -0
- package/dist/prospect-client/SkeletonList/SkeletonListApollo.js +8 -2
- package/dist/prospect-client/SkeletonList/SkeletonListCommon.d.ts +21 -4
- package/dist/prospect-client/SkeletonList/SkeletonListCommon.js +18 -2
- package/dist/prospect-client/SkeletonList/SkeletonListLF.d.ts +7 -0
- package/dist/prospect-client/SkeletonList/SkeletonListLF.js +8 -2
- package/dist/prospect-client/TabMenu/TabMenu.js +1 -1
- package/dist/prospect-client/Tag/TagCommon.js +6 -2
- package/dist/prospect-client/TagList/TagListApollo.d.ts +4 -0
- package/dist/prospect-client/TagList/TagListApollo.js +5 -0
- package/dist/prospect-client/TagList/TagListCommon.d.ts +10 -0
- package/dist/prospect-client/TagList/TagListCommon.js +16 -0
- package/dist/prospect-client/TagList/TagListLF.d.ts +4 -0
- package/dist/prospect-client/TagList/TagListLF.js +5 -0
- package/dist/prospect-client/Toggle/ToggleCommon.js +2 -2
- package/dist/prospect.d.ts +11 -6
- package/dist/prospect.js +11 -6
- package/package.json +2 -2
- package/dist/prospect-client/Skeleton/SkeletonApollo.d.ts +0 -2
- package/dist/prospect-client/Skeleton/SkeletonApollo.js +0 -2
- package/dist/prospect-client/Skeleton/SkeletonCommon.d.ts +0 -19
- package/dist/prospect-client/Skeleton/SkeletonCommon.js +0 -11
- package/dist/prospect-client/Skeleton/SkeletonLF.d.ts +0 -2
- package/dist/prospect-client/Skeleton/SkeletonLF.js +0 -2
- package/dist/prospect-client/utilities/getComponentClassName.d.ts +0 -4
- package/dist/prospect-client/utilities/getComponentClassName.js +0 -30
|
@@ -3,5 +3,5 @@ import { ModalCore } from "./components/ModalCore";
|
|
|
3
3
|
import { ModalCoreBody, } from "./components/ModalCoreBody";
|
|
4
4
|
import { ModalCoreFooterCommon, } from "./components/ModalCoreFooterCommon";
|
|
5
5
|
import { ModalCoreHeaderCommon } from "./components/ModalCoreHeaderCommon";
|
|
6
|
-
export const ModalCommon = ({ children, headingComponent, headingProps, closeButtonAriaLabel, onClose,
|
|
6
|
+
export const ModalCommon = ({ children, headingComponent, headingProps, closeButtonAriaLabel, onClose, primaryButtonProps, secondaryButtonProps, tertiaryButtonProps, buttonComponent, modalCoreBodyProps, modalCoreFooterProps, modalCoreHeaderProps, ...props }) => (_jsxs(ModalCore, { onClose: onClose, ...props, children: [_jsx(ModalCoreHeaderCommon, { headingComponent: headingComponent, headingProps: headingProps, onClose: onClose, closeButtonAriaLabel: closeButtonAriaLabel, ...modalCoreHeaderProps }), _jsx(ModalCoreBody, { ...modalCoreBodyProps, children: children }), _jsx(ModalCoreFooterCommon, { buttonComponent: buttonComponent, primaryButtonProps: primaryButtonProps, secondaryButtonProps: secondaryButtonProps, tertiaryButtonProps: tertiaryButtonProps, ...modalCoreFooterProps })] }));
|
|
7
7
|
ModalCommon.displayName = "ModalCommon";
|
|
@@ -6,6 +6,6 @@ export { ModalCoreFooter } from "./components/ModalCoreFooterLF";
|
|
|
6
6
|
export { ModalCoreHeader } from "./components/ModalCoreHeaderLF";
|
|
7
7
|
export type { ModalCoreFooterProps, ModalCoreHeaderProps, ModalProps, } from "./types";
|
|
8
8
|
export declare const Modal: {
|
|
9
|
-
({ headingProps,
|
|
9
|
+
({ headingProps, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
@@ -7,10 +7,8 @@ export { ModalCore } from "./components/ModalCore";
|
|
|
7
7
|
export { ModalCoreBody, } from "./components/ModalCoreBody";
|
|
8
8
|
export { ModalCoreFooter } from "./components/ModalCoreFooterLF";
|
|
9
9
|
export { ModalCoreHeader } from "./components/ModalCoreHeaderLF";
|
|
10
|
-
export const Modal = ({ headingProps = {},
|
|
10
|
+
export const Modal = ({ headingProps = {}, ...props }) => (_jsx(ModalCommon, { ...props, headingComponent: Heading, headingProps: {
|
|
11
11
|
...headingProps,
|
|
12
12
|
children: props.title,
|
|
13
|
-
icon: headingProps.icon ?? icon,
|
|
14
|
-
iconProps: headingProps.iconProps ?? iconProps,
|
|
15
13
|
}, buttonComponent: Button }));
|
|
16
14
|
Modal.displayName = "Modal";
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef, ComponentType } from "react";
|
|
2
2
|
import type { HeadingProps } from "../../Heading/types";
|
|
3
|
-
import type { IconProps } from "../../Icon/IconCommon";
|
|
4
3
|
export type ModalCoreHeaderContainerProps = ComponentPropsWithoutRef<"header">;
|
|
5
4
|
export type ModalCoreHeaderCommonProps = ModalCoreHeaderContainerProps & {
|
|
6
5
|
headingComponent: ComponentType<HeadingProps>;
|
|
7
6
|
headingProps: HeadingProps;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Pass `icon` and `iconProps` (without `src`) inside
|
|
10
|
-
* `headingProps` instead. The legacy `iconProps` is forwarded to the
|
|
11
|
-
* Heading molecule for backward compatibility and will be removed in 2.0.0.
|
|
12
|
-
*/
|
|
13
|
-
iconProps?: IconProps;
|
|
14
7
|
onClose?: VoidFunction;
|
|
15
8
|
closeButtonAriaLabel?: string;
|
|
16
9
|
};
|
|
@@ -2,16 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import close from "@material-symbols/svg-400/rounded/close.svg";
|
|
3
3
|
import { ClickIcon } from "../../ClickIcon/ClickIconCommon";
|
|
4
4
|
export const ModalCoreHeaderCommon = (props) => {
|
|
5
|
-
const { className, headingComponent: HeadingComponent, headingProps,
|
|
6
|
-
|
|
7
|
-
// Heading molecule, which already renders the icon and title together.
|
|
8
|
-
const { src: legacyIconSrc, ...legacyIconRest } = iconProps ?? {};
|
|
9
|
-
const mergedHeadingProps = legacyIconSrc
|
|
10
|
-
? {
|
|
11
|
-
...headingProps,
|
|
12
|
-
icon: headingProps.icon ?? legacyIconSrc,
|
|
13
|
-
iconProps: { ...legacyIconRest, ...(headingProps.iconProps ?? {}) },
|
|
14
|
-
}
|
|
15
|
-
: headingProps;
|
|
16
|
-
return (_jsxs("header", { className: ["af-modal__header", className].filter(Boolean).join(" "), ...rest, children: [_jsx(ClickIcon, { className: "af-modal__header-close-btn", src: close, onClick: onClose, "aria-label": closeButtonAriaLabel }), _jsx("div", { className: "af-modal__header-title", children: _jsx(HeadingComponent, { level: 2, ...mergedHeadingProps }) })] }));
|
|
5
|
+
const { className, headingComponent: HeadingComponent, headingProps, onClose, closeButtonAriaLabel = "Fermer la boite de dialogue", ...rest } = props;
|
|
6
|
+
return (_jsxs("header", { className: ["af-modal__header", className].filter(Boolean).join(" "), ...rest, children: [_jsx(ClickIcon, { className: "af-modal__header-close-btn", src: close, onClick: onClose, "aria-label": closeButtonAriaLabel }), _jsx("div", { className: "af-modal__header-title", children: _jsx(HeadingComponent, { level: 2, ...headingProps }) })] }));
|
|
17
7
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { HeadingProps } from "../Heading/types";
|
|
2
|
-
import type { IconProps } from "../Icon/IconCommon";
|
|
3
2
|
import type { ModalCoreFooterCommonProps } from "./components/ModalCoreFooterCommon";
|
|
4
3
|
import type { ModalCoreHeaderCommonProps } from "./components/ModalCoreHeaderCommon";
|
|
5
4
|
import type { ModalCommonProps } from "./ModalCommon";
|
|
@@ -7,18 +6,4 @@ export type ModalCoreHeaderProps = Omit<ModalCoreHeaderCommonProps, "headingComp
|
|
|
7
6
|
export type ModalCoreFooterProps = Omit<ModalCoreFooterCommonProps, "buttonComponent">;
|
|
8
7
|
export type ModalProps = Omit<ModalCommonProps, "headingComponent" | "headingProps" | "iconProps" | "buttonComponent"> & {
|
|
9
8
|
headingProps?: Omit<HeadingProps, "children">;
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Pass `icon` inside `headingProps` instead
|
|
12
|
-
* (e.g. `headingProps={{ icon }}`). The top-level `icon` prop is
|
|
13
|
-
* forwarded to the Heading molecule for backward compatibility and will
|
|
14
|
-
* be removed in 2.0.0.
|
|
15
|
-
*/
|
|
16
|
-
icon?: string;
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated Pass `iconProps` inside `headingProps` instead
|
|
19
|
-
* (e.g. `headingProps={{ iconProps }}`). The top-level `iconProps`
|
|
20
|
-
* is forwarded to the Heading molecule for backward compatibility and
|
|
21
|
-
* will be removed in 2.0.0.
|
|
22
|
-
*/
|
|
23
|
-
iconProps?: Omit<IconProps, "src">;
|
|
24
9
|
};
|
|
@@ -3,10 +3,6 @@ import { ProgressBar } from "../ProgressBar/ProgressBarCommon";
|
|
|
3
3
|
export type ProgressBarGroupProps = {
|
|
4
4
|
currentStepProgress?: number;
|
|
5
5
|
currentStep: number;
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Use `stepsCount` instead.
|
|
8
|
-
*/
|
|
9
|
-
nbSteps?: 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
10
6
|
stepsCount?: 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
11
7
|
max?: number;
|
|
12
8
|
className?: string;
|
|
@@ -14,5 +10,5 @@ export type ProgressBarGroupProps = {
|
|
|
14
10
|
type ProgressBarGroupCommonProps = ProgressBarGroupProps & {
|
|
15
11
|
ProgressBarComponent: ComponentType<ComponentProps<typeof ProgressBar>>;
|
|
16
12
|
};
|
|
17
|
-
export declare const ProgressBarGroupCommon: ({ currentStepProgress, max,
|
|
13
|
+
export declare const ProgressBarGroupCommon: ({ currentStepProgress, max, stepsCount, currentStep, className, ProgressBarComponent, ...props }: ProgressBarGroupCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
14
|
export {};
|
|
@@ -3,7 +3,7 @@ import classNames from "classnames";
|
|
|
3
3
|
import { useId } from "react";
|
|
4
4
|
import { ProgressBar } from "../ProgressBar/ProgressBarCommon";
|
|
5
5
|
import { useSequentialProgress } from "./useSequentialProgress";
|
|
6
|
-
export const ProgressBarGroupCommon = ({ currentStepProgress = 0, max = 100,
|
|
6
|
+
export const ProgressBarGroupCommon = ({ currentStepProgress = 0, max = 100, stepsCount = 4, currentStep, className, ProgressBarComponent, ...props }) => {
|
|
7
7
|
const stepperId = useId();
|
|
8
8
|
const progressValues = useSequentialProgress(currentStepProgress / max, currentStep, stepsCount);
|
|
9
9
|
return (_jsx("ol", { className: classNames("af-progress-bar-group", className), ...props, children: progressValues.map((value, index) => (_jsx("li", { className: "af-progress-bar-group__item", children: _jsx(ProgressBarComponent, { value: value, "aria-hidden": true }) }, `af-progress-bar-group__item--${stepperId}-${index}`))) }));
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import "@axa-fr/canopee-css/client/Skeleton/SkeletonAll.css";
|
|
3
|
+
export declare const skeletonVariants: {
|
|
4
|
+
readonly action: "action";
|
|
5
|
+
readonly circle: "circle";
|
|
6
|
+
readonly rectangle: "rectangle";
|
|
7
|
+
};
|
|
8
|
+
export type SkeletonVariant = keyof typeof skeletonVariants;
|
|
9
|
+
export declare const skeletonSizeVariants: {
|
|
10
|
+
readonly XS: "extra-small";
|
|
11
|
+
readonly S: "small";
|
|
12
|
+
readonly M: "medium";
|
|
13
|
+
readonly L: "large";
|
|
14
|
+
readonly XL: "extra-large";
|
|
15
|
+
readonly XXL: "extra-extra-large";
|
|
16
|
+
};
|
|
17
|
+
export type SkeletonSizeVariant = keyof typeof skeletonSizeVariants;
|
|
18
|
+
export type SkeletonCircleSizeVariant = keyof Pick<typeof skeletonSizeVariants, "S" | "M" | "L">;
|
|
19
|
+
export type SkeletonActionSizeVariant = keyof Pick<typeof skeletonSizeVariants, "M">;
|
|
20
|
+
type SkeletonSharedProps = {
|
|
21
|
+
colSize?: number;
|
|
22
|
+
rowSize?: number;
|
|
23
|
+
} & ComponentPropsWithoutRef<"div">;
|
|
24
|
+
type SkeletonCircleProps = {
|
|
25
|
+
size?: SkeletonCircleSizeVariant;
|
|
26
|
+
variant: "circle";
|
|
27
|
+
};
|
|
28
|
+
type SkeletonActionProps = {
|
|
29
|
+
size?: SkeletonActionSizeVariant;
|
|
30
|
+
variant: "action";
|
|
31
|
+
};
|
|
32
|
+
type SkeletonRectangleProps = {
|
|
33
|
+
size?: SkeletonSizeVariant;
|
|
34
|
+
variant?: "rectangle";
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Props for the `Skeleton` component.
|
|
38
|
+
*
|
|
39
|
+
* The allowed `size` values depend on the selected `variant`:
|
|
40
|
+
* - `circle`: `S | M | L`
|
|
41
|
+
* - `action`: `M`
|
|
42
|
+
* - `rectangle`: `XS | S | M | L | XL | XXL`
|
|
43
|
+
*/
|
|
44
|
+
export type SkeletonProps = SkeletonSharedProps & (SkeletonCircleProps | SkeletonActionProps | SkeletonRectangleProps);
|
|
45
|
+
/**
|
|
46
|
+
* Renders one skeleton placeholder block.
|
|
47
|
+
*
|
|
48
|
+
* This is the base building block used by `SkeletonGrid`, `SkeletonList`,
|
|
49
|
+
* and `ExitLayoutSkeleton`.
|
|
50
|
+
*
|
|
51
|
+
* @component
|
|
52
|
+
* @param {SkeletonProps} props - Skeleton props.
|
|
53
|
+
* @param {number} [props.colSize=1] - Number of grid columns occupied by the skeleton.
|
|
54
|
+
* @param {number} [props.rowSize=1] - Number of grid rows occupied by the skeleton.
|
|
55
|
+
* @param {SkeletonVariant} [props.variant="rectangle"] - Visual variant of the placeholder.
|
|
56
|
+
* @param {SkeletonSizeVariant | SkeletonCircleSizeVariant | SkeletonActionSizeVariant} [props.size="M"] - Size applied to the skeleton. The accepted values depend on `variant`.
|
|
57
|
+
* @param {string} [props.className] - Additional CSS class applied to the skeleton.
|
|
58
|
+
* @returns {JSX.Element} The rendered Skeleton component.
|
|
59
|
+
*/
|
|
60
|
+
export declare const Skeleton: ({ className, colSize, rowSize, size, variant, style, ...props }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/canopee-css/client/Skeleton/SkeletonAll.css";
|
|
3
|
+
import { getClassName } from "../utilities/getClassName";
|
|
4
|
+
const CLASS_NAME = "af-skeleton";
|
|
5
|
+
export const skeletonVariants = {
|
|
6
|
+
action: "action",
|
|
7
|
+
circle: "circle",
|
|
8
|
+
rectangle: "rectangle",
|
|
9
|
+
};
|
|
10
|
+
export const skeletonSizeVariants = {
|
|
11
|
+
XS: "extra-small",
|
|
12
|
+
S: "small",
|
|
13
|
+
M: "medium",
|
|
14
|
+
L: "large",
|
|
15
|
+
XL: "extra-large",
|
|
16
|
+
XXL: "extra-extra-large",
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Renders one skeleton placeholder block.
|
|
20
|
+
*
|
|
21
|
+
* This is the base building block used by `SkeletonGrid`, `SkeletonList`,
|
|
22
|
+
* and `ExitLayoutSkeleton`.
|
|
23
|
+
*
|
|
24
|
+
* @component
|
|
25
|
+
* @param {SkeletonProps} props - Skeleton props.
|
|
26
|
+
* @param {number} [props.colSize=1] - Number of grid columns occupied by the skeleton.
|
|
27
|
+
* @param {number} [props.rowSize=1] - Number of grid rows occupied by the skeleton.
|
|
28
|
+
* @param {SkeletonVariant} [props.variant="rectangle"] - Visual variant of the placeholder.
|
|
29
|
+
* @param {SkeletonSizeVariant | SkeletonCircleSizeVariant | SkeletonActionSizeVariant} [props.size="M"] - Size applied to the skeleton. The accepted values depend on `variant`.
|
|
30
|
+
* @param {string} [props.className] - Additional CSS class applied to the skeleton.
|
|
31
|
+
* @returns {JSX.Element} The rendered Skeleton component.
|
|
32
|
+
*/
|
|
33
|
+
export const Skeleton = ({ className, colSize = 1, rowSize = 1, size = "M", variant = "rectangle", style, ...props }) => (_jsx("div", { ...props, className: getClassName({
|
|
34
|
+
baseClassName: CLASS_NAME,
|
|
35
|
+
modifiers: [variant, skeletonSizeVariants[size]],
|
|
36
|
+
className,
|
|
37
|
+
}), style: {
|
|
38
|
+
"--col-size": colSize,
|
|
39
|
+
"--row-size": rowSize,
|
|
40
|
+
...style,
|
|
41
|
+
} }));
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type SkeletonProps } from "../Skeleton/Skeleton";
|
|
3
|
+
import "@axa-fr/canopee-css/prospect/SkeletonGrid/SkeletonGridAll.css";
|
|
4
|
+
/**
|
|
5
|
+
* One skeleton cell rendered inside a `SkeletonGrid` row.
|
|
6
|
+
*/
|
|
7
|
+
export type SkeletonGridItem = SkeletonProps;
|
|
8
|
+
type isLoadingAndChildrenProps = {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
} | {
|
|
12
|
+
children?: undefined;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Props for the `SkeletonGrid` component.
|
|
17
|
+
*
|
|
18
|
+
* `grid` is a two-level array where:
|
|
19
|
+
* - first level represents rows
|
|
20
|
+
* - second level represents skeleton cells rendered in each row
|
|
21
|
+
*/
|
|
22
|
+
export type SkeletonGridProps = {
|
|
23
|
+
className?: string;
|
|
24
|
+
grid: SkeletonGridItem[][];
|
|
25
|
+
"aria-busy"?: boolean;
|
|
26
|
+
"aria-label"?: string;
|
|
27
|
+
maxCols?: number;
|
|
28
|
+
colGap?: number;
|
|
29
|
+
rowGap?: number;
|
|
30
|
+
} & isLoadingAndChildrenProps;
|
|
31
|
+
/**
|
|
32
|
+
* Renders a responsive grid of skeleton placeholders.
|
|
33
|
+
*
|
|
34
|
+
* When `isLoading` is `false`, the component returns its `children` instead of
|
|
35
|
+
* the skeleton grid.
|
|
36
|
+
*
|
|
37
|
+
* @component
|
|
38
|
+
* @param {SkeletonGridProps} props - SkeletonGrid props.
|
|
39
|
+
* @param {SkeletonGridItem[][]} props.grid - Grid definition where each row contains one or more skeleton cells.
|
|
40
|
+
* @param {number} [props.maxCols=12] - Number of columns used to build the grid template.
|
|
41
|
+
* @param {number} [props.colGap=16] - Horizontal gap between grid columns, in pixels.
|
|
42
|
+
* @param {number} [props.rowGap=8] - Vertical gap between grid rows, in pixels.
|
|
43
|
+
* @param {boolean} [props.isLoading=true] - When `true`, displays the skeleton placeholders.
|
|
44
|
+
* @param {ReactNode} [props.children] - Content rendered when `isLoading` is `false`.
|
|
45
|
+
* @param {string} [props.className] - Additional CSS class applied to the root element.
|
|
46
|
+
* @param {string} [props.aria-label="Chargement"] - Accessible label for the loading region.
|
|
47
|
+
* @param {boolean} [props.aria-busy=true] - Announces the loading region as busy to assistive technologies.
|
|
48
|
+
* @returns {JSX.Element | ReactNode} The rendered skeleton grid or the fallback children.
|
|
49
|
+
*/
|
|
50
|
+
export declare const SkeletonGrid: ({ className, grid, "aria-busy": ariaBusy, "aria-label": ariaLabel, maxCols, colGap, rowGap, isLoading, children, }: SkeletonGridProps) => string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton } from "../Skeleton/Skeleton";
|
|
3
|
+
import "@axa-fr/canopee-css/prospect/SkeletonGrid/SkeletonGridAll.css";
|
|
4
|
+
import { getClassName } from "../utilities/getClassName";
|
|
5
|
+
const CLASS_NAME = "af-skeleton-grid";
|
|
6
|
+
/**
|
|
7
|
+
* Renders a responsive grid of skeleton placeholders.
|
|
8
|
+
*
|
|
9
|
+
* When `isLoading` is `false`, the component returns its `children` instead of
|
|
10
|
+
* the skeleton grid.
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
* @param {SkeletonGridProps} props - SkeletonGrid props.
|
|
14
|
+
* @param {SkeletonGridItem[][]} props.grid - Grid definition where each row contains one or more skeleton cells.
|
|
15
|
+
* @param {number} [props.maxCols=12] - Number of columns used to build the grid template.
|
|
16
|
+
* @param {number} [props.colGap=16] - Horizontal gap between grid columns, in pixels.
|
|
17
|
+
* @param {number} [props.rowGap=8] - Vertical gap between grid rows, in pixels.
|
|
18
|
+
* @param {boolean} [props.isLoading=true] - When `true`, displays the skeleton placeholders.
|
|
19
|
+
* @param {ReactNode} [props.children] - Content rendered when `isLoading` is `false`.
|
|
20
|
+
* @param {string} [props.className] - Additional CSS class applied to the root element.
|
|
21
|
+
* @param {string} [props.aria-label="Chargement"] - Accessible label for the loading region.
|
|
22
|
+
* @param {boolean} [props.aria-busy=true] - Announces the loading region as busy to assistive technologies.
|
|
23
|
+
* @returns {JSX.Element | ReactNode} The rendered skeleton grid or the fallback children.
|
|
24
|
+
*/
|
|
25
|
+
export const SkeletonGrid = ({ className, grid = [], "aria-busy": ariaBusy = true, "aria-label": ariaLabel = "Chargement", maxCols = 12, colGap = 16, rowGap = 8, isLoading = true, children, }) => {
|
|
26
|
+
if (isLoading) {
|
|
27
|
+
return (_jsx("div", { className: getClassName({
|
|
28
|
+
baseClassName: CLASS_NAME,
|
|
29
|
+
className,
|
|
30
|
+
}), "aria-label": ariaLabel, role: "status", "aria-busy": ariaBusy, style: {
|
|
31
|
+
"--max-cols": maxCols,
|
|
32
|
+
"--col-gap": `calc(${colGap} / var(--font-size-base) * 1rem)`,
|
|
33
|
+
"--row-gap": `calc(${rowGap} / var(--font-size-base) * 1rem)`,
|
|
34
|
+
}, children: grid.map((cols, indexRow) => cols.map((skeletonProps, indexCol) => (_jsx(Skeleton, { ...skeletonProps }, `${indexRow}-${indexCol}`)))) }));
|
|
35
|
+
}
|
|
36
|
+
return children;
|
|
37
|
+
};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { type SkeletonListProps } from "./SkeletonListCommon";
|
|
2
2
|
export { type SkeletonListProps } from "./SkeletonListCommon";
|
|
3
|
+
/**
|
|
4
|
+
* Apollo-themed `SkeletonList` component.
|
|
5
|
+
*
|
|
6
|
+
* @component
|
|
7
|
+
* @param {SkeletonListProps} props - SkeletonList props.
|
|
8
|
+
* @returns {JSX.Element | ReactNode[]} The rendered Apollo-themed SkeletonList.
|
|
9
|
+
*/
|
|
3
10
|
export declare const SkeletonList: (props: SkeletonListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Skeleton } from "../Skeleton/SkeletonApollo";
|
|
3
2
|
import { List } from "../List/List/ListApollo";
|
|
4
3
|
import { SkeletonListCommon, } from "./SkeletonListCommon";
|
|
5
4
|
export {} from "./SkeletonListCommon";
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Apollo-themed `SkeletonList` component.
|
|
7
|
+
*
|
|
8
|
+
* @component
|
|
9
|
+
* @param {SkeletonListProps} props - SkeletonList props.
|
|
10
|
+
* @returns {JSX.Element | ReactNode[]} The rendered Apollo-themed SkeletonList.
|
|
11
|
+
*/
|
|
12
|
+
export const SkeletonList = (props) => (_jsx(SkeletonListCommon, { ...props, ListComponent: List }));
|
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
import type { ComponentType, PropsWithChildren } from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { SkeletonGridProps } from "../SkeletonGrid/SkeletonGrid";
|
|
3
3
|
import type { ListProps } from "../List/List/ListCommon";
|
|
4
|
+
/**
|
|
5
|
+
* Props for the themed `SkeletonList` components.
|
|
6
|
+
*/
|
|
4
7
|
export type SkeletonListProps = {
|
|
5
8
|
lists: {
|
|
6
9
|
lines?: number;
|
|
7
|
-
grid:
|
|
10
|
+
grid: SkeletonGridProps["grid"];
|
|
8
11
|
}[];
|
|
9
12
|
isLoading?: boolean;
|
|
10
13
|
className?: string;
|
|
11
14
|
} & PropsWithChildren;
|
|
12
15
|
type SkeletonListPropsCommon = SkeletonListProps & {
|
|
13
16
|
ListComponent: ComponentType<ListProps>;
|
|
14
|
-
SkeletonComponent: ComponentType<SkeletonProps>;
|
|
15
17
|
};
|
|
16
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Shared implementation rendering repeated `SkeletonGrid` rows inside a `List`.
|
|
20
|
+
*
|
|
21
|
+
* The visual list container is injected through `ListComponent` to allow
|
|
22
|
+
* Apollo and Look and Feel theming.
|
|
23
|
+
*
|
|
24
|
+
* @component
|
|
25
|
+
* @param {SkeletonListPropsCommon} props - SkeletonList props.
|
|
26
|
+
* @param {{ lines?: number; grid: SkeletonGridProps["grid"] }[]} props.lists - Groups of skeleton rows to render while loading.
|
|
27
|
+
* @param {boolean} [props.isLoading=true] - When `true`, renders the list of skeleton placeholders.
|
|
28
|
+
* @param {string} [props.className] - Additional CSS class applied to each injected list container.
|
|
29
|
+
* @param {ReactNode} [props.children] - Content rendered when `isLoading` is `false`.
|
|
30
|
+
* @param {ComponentType<ListProps>} props.ListComponent - Theme-specific list component used to wrap each skeleton block.
|
|
31
|
+
* @returns {JSX.Element | ReactNode[]} The rendered skeleton list or the fallback children.
|
|
32
|
+
*/
|
|
33
|
+
export declare const SkeletonListCommon: ({ children, isLoading, lists, className, ListComponent, }: SkeletonListPropsCommon) => string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element[] | null | undefined;
|
|
17
34
|
export {};
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { SkeletonGrid } from "../SkeletonGrid/SkeletonGrid";
|
|
3
|
+
/**
|
|
4
|
+
* Shared implementation rendering repeated `SkeletonGrid` rows inside a `List`.
|
|
5
|
+
*
|
|
6
|
+
* The visual list container is injected through `ListComponent` to allow
|
|
7
|
+
* Apollo and Look and Feel theming.
|
|
8
|
+
*
|
|
9
|
+
* @component
|
|
10
|
+
* @param {SkeletonListPropsCommon} props - SkeletonList props.
|
|
11
|
+
* @param {{ lines?: number; grid: SkeletonGridProps["grid"] }[]} props.lists - Groups of skeleton rows to render while loading.
|
|
12
|
+
* @param {boolean} [props.isLoading=true] - When `true`, renders the list of skeleton placeholders.
|
|
13
|
+
* @param {string} [props.className] - Additional CSS class applied to each injected list container.
|
|
14
|
+
* @param {ReactNode} [props.children] - Content rendered when `isLoading` is `false`.
|
|
15
|
+
* @param {ComponentType<ListProps>} props.ListComponent - Theme-specific list component used to wrap each skeleton block.
|
|
16
|
+
* @returns {JSX.Element | ReactNode[]} The rendered skeleton list or the fallback children.
|
|
17
|
+
*/
|
|
18
|
+
export const SkeletonListCommon = ({ children, isLoading, lists = [], className, ListComponent, }) => isLoading
|
|
19
|
+
? lists.map(({ lines = 1, grid }, linesIndex) => (_jsx(ListComponent, { className: className, children: [...Array(lines).keys()].map((_, lineIndex) => (_jsx(SkeletonGrid, { grid: grid }, lineIndex))) }, linesIndex)))
|
|
4
20
|
: children;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { type SkeletonListProps } from "./SkeletonListCommon";
|
|
2
2
|
export { type SkeletonListProps } from "./SkeletonListCommon";
|
|
3
|
+
/**
|
|
4
|
+
* Look and Feel-themed `SkeletonList` component.
|
|
5
|
+
*
|
|
6
|
+
* @component
|
|
7
|
+
* @param {SkeletonListProps} props - SkeletonList props.
|
|
8
|
+
* @returns {JSX.Element | ReactNode[]} The rendered Look and Feel SkeletonList.
|
|
9
|
+
*/
|
|
3
10
|
export declare const SkeletonList: (props: SkeletonListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Skeleton } from "../Skeleton/SkeletonLF";
|
|
3
2
|
import { List } from "../List/List/ListLF";
|
|
4
3
|
import { SkeletonListCommon, } from "./SkeletonListCommon";
|
|
5
4
|
export {} from "./SkeletonListCommon";
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Look and Feel-themed `SkeletonList` component.
|
|
7
|
+
*
|
|
8
|
+
* @component
|
|
9
|
+
* @param {SkeletonListProps} props - SkeletonList props.
|
|
10
|
+
* @returns {JSX.Element | ReactNode[]} The rendered Look and Feel SkeletonList.
|
|
11
|
+
*/
|
|
12
|
+
export const SkeletonList = (props) => (_jsx(SkeletonListCommon, { ...props, ListComponent: List }));
|
|
@@ -33,7 +33,7 @@ export const TabMenu = ({ items, className, initialPosition = 0, ...props }) =>
|
|
|
33
33
|
className,
|
|
34
34
|
}), ...props,
|
|
35
35
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
36
|
-
tabIndex: 0, onKeyDown: (e) => handleKeys(e.key), children: _jsx("ul", { className: "af-tab-menu__list", children: items.map((item, index) => (_jsx("li", {
|
|
36
|
+
tabIndex: 0, onKeyDown: (e) => handleKeys(e.key), children: _jsx("ul", { className: "af-tab-menu__list", children: items.map((item, index) => (_jsx("li", { children: _jsx(ItemMenu, { ref: (el) => {
|
|
37
37
|
itemRefs.current[index] = el;
|
|
38
38
|
}, ...item, isActive: index === position ? true : item.isActive, tabIndex: index === position ? 0 : -1, children: item.label }) }, item.href))) }) }));
|
|
39
39
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { getClassName } from "../utilities/getClassName";
|
|
4
4
|
export const tagVariants = {
|
|
5
5
|
info: "info",
|
|
6
6
|
success: "success",
|
|
@@ -9,6 +9,10 @@ export const tagVariants = {
|
|
|
9
9
|
neutral: "neutral",
|
|
10
10
|
};
|
|
11
11
|
export const Tag = ({ children, className, variant = "info", ...divProps }) => {
|
|
12
|
-
const componentClassName = useMemo(() =>
|
|
12
|
+
const componentClassName = useMemo(() => getClassName({
|
|
13
|
+
baseClassName: "af-tag",
|
|
14
|
+
className,
|
|
15
|
+
modifiers: [variant],
|
|
16
|
+
}), [className, variant]);
|
|
13
17
|
return (_jsx("div", { className: componentClassName, ...divProps, children: _jsx("span", { className: "af-tag__label", children: children }) }));
|
|
14
18
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type TagListProps as TagListCommonProps } from "./TagListCommon";
|
|
2
|
+
import "@axa-fr/canopee-css/prospect/TagList/TagListAll.css";
|
|
3
|
+
export type TagListProps = Omit<TagListCommonProps, "OverflowTag">;
|
|
4
|
+
export declare const TagList: (props: TagListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tag } from "../Tag/TagCommon";
|
|
3
|
+
import { TagListCommon, } from "./TagListCommon";
|
|
4
|
+
import "@axa-fr/canopee-css/prospect/TagList/TagListAll.css";
|
|
5
|
+
export const TagList = (props) => (_jsx(TagListCommon, { ...props, OverflowTag: Tag }));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
+
export type TagListProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
hideThreshold?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
OverflowTag: ComponentType<{
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
export declare const TagListCommon: ({ children, hideThreshold, className, OverflowTag, }: TagListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Children, isValidElement, } from "react";
|
|
3
|
+
import { getClassName } from "../utilities/getClassName";
|
|
4
|
+
export const TagListCommon = ({ children, hideThreshold = 2, className = "", OverflowTag, }) => {
|
|
5
|
+
const childArray = Children.toArray(children).filter(isValidElement);
|
|
6
|
+
const total = childArray.length;
|
|
7
|
+
const isOverflowing = total > hideThreshold;
|
|
8
|
+
const visibleChildren = isOverflowing
|
|
9
|
+
? childArray.slice(0, hideThreshold)
|
|
10
|
+
: childArray;
|
|
11
|
+
const hiddenCount = total - hideThreshold;
|
|
12
|
+
return (_jsxs("div", { className: getClassName({
|
|
13
|
+
baseClassName: "af-tag-list",
|
|
14
|
+
className,
|
|
15
|
+
}), children: [visibleChildren, isOverflowing ? _jsxs(OverflowTag, { children: ["+", hiddenCount] }) : null] }));
|
|
16
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type TagListProps as TagListCommonProps } from "./TagListCommon";
|
|
2
|
+
import "@axa-fr/canopee-css/client/TagList/TagListAll.css";
|
|
3
|
+
export type TagListProps = Omit<TagListCommonProps, "OverflowTag">;
|
|
4
|
+
export declare const TagList: (props: TagListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tag } from "../Tag/TagCommon";
|
|
3
|
+
import { TagListCommon, } from "./TagListCommon";
|
|
4
|
+
import "@axa-fr/canopee-css/client/TagList/TagListAll.css";
|
|
5
|
+
export const TagList = (props) => (_jsx(TagListCommon, { ...props, OverflowTag: Tag }));
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import check from "@material-symbols/svg-400/rounded/check.svg";
|
|
3
3
|
import close from "@material-symbols/svg-400/rounded/close.svg";
|
|
4
4
|
import { useId } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { getClassName } from "../utilities/getClassName";
|
|
6
6
|
export const ToggleCommon = ({ className, IconComponent, ...inputProps }) => {
|
|
7
7
|
let inputId = useId();
|
|
8
8
|
inputId = inputProps.id ?? inputId;
|
|
9
|
-
return (_jsxs("label", { className:
|
|
9
|
+
return (_jsxs("label", { className: getClassName({ baseClassName: "af-toggle", className }), htmlFor: inputId, children: [_jsx("div", { className: "af-toggle__root", children: _jsxs("span", { className: "af-toggle__handle", children: [_jsx(IconComponent, { src: check, "aria-hidden": "true", className: "af-toggle__icon af-toggle__icon--check", size: "XS" }), _jsx(IconComponent, { src: close, "aria-hidden": "true", className: "af-toggle__icon af-toggle__icon--close", size: "XS" })] }) }), _jsx("input", { ...inputProps, type: "checkbox", id: inputId })] }));
|
|
10
10
|
};
|
|
11
11
|
ToggleCommon.displayName = "ToggleCommon";
|
package/dist/prospect.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ import "@fontsource/source-sans-pro";
|
|
|
5
5
|
export { Accordion, accordionVariants, type AccordionVariants, } from "./prospect-client/Accordion/AccordionApollo";
|
|
6
6
|
export { AccordionContextual, accordionContextualVariants, type AccordionContextualVariants, } from "./prospect-client/AccordionContextual/AccordionContextualApollo";
|
|
7
7
|
export { AccordionCore } from "./prospect-client/AccordionCore/AccordionCoreApollo";
|
|
8
|
+
export { AppName, type AppNameProps } from "./prospect-client/AppName/AppName";
|
|
8
9
|
export { BasePicture } from "./prospect-client/BasePicture/BasePicture";
|
|
9
10
|
export { Button, buttonVariants, type ButtonVariants, } from "./prospect-client/Button/ButtonApollo";
|
|
10
|
-
export { Card, type CardProps } from "./prospect-client/Card/CardApollo";
|
|
11
|
+
export { Card, cardVariants, type CardProps, type CardVariants, } from "./prospect-client/Card/CardApollo";
|
|
11
12
|
export { CardMessage, cardMessageVariants, type CardMessageVariants, } from "./prospect-client/CardMessage/CardMessageApollo";
|
|
12
13
|
export { ClickIcon } from "./prospect-client/ClickIcon/ClickIconApollo";
|
|
13
14
|
export { ContentItemDuoAction, type ContentItemDuoActionState, } from "./prospect-client/ContentItemDuoAction/ContentItemDuoActionApollo";
|
|
@@ -15,9 +16,7 @@ export { ContentItemMono } from "./prospect-client/ContentItemMono/ContentItemMo
|
|
|
15
16
|
export { DataAgent, type DataAgentProps, } from "./prospect-client/DataAgent/DataAgentApollo";
|
|
16
17
|
export { Divider } from "./prospect-client/Divider/DividerApollo";
|
|
17
18
|
export { Fieldset, type FieldsetProps, } from "./prospect-client/Fieldset/FieldsetApollo";
|
|
18
|
-
export { CardCheckbox
|
|
19
|
-
/** @deprecated Use `CardCheckbox` instead. */
|
|
20
|
-
CardCheckbox as CheckboxCard, } from "./prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxApollo";
|
|
19
|
+
export { CardCheckbox } from "./prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxApollo";
|
|
21
20
|
export { CardCheckboxOption } from "./prospect-client/Form/Checkbox/CardCheckboxOption/CardCheckboxOptionApollo";
|
|
22
21
|
export { Checkbox } from "./prospect-client/Form/Checkbox/Checkbox/CheckboxApollo";
|
|
23
22
|
export { CheckboxText } from "./prospect-client/Form/Checkbox/CheckboxText/CheckboxTextApollo";
|
|
@@ -32,6 +31,8 @@ export { InputText } from "./prospect-client/Form/InputText/InputTextApollo";
|
|
|
32
31
|
export { InputTextAtom } from "./prospect-client/Form/InputTextAtom/InputTextAtomApollo";
|
|
33
32
|
export { ItemLabel } from "./prospect-client/Form/ItemLabel/ItemLabelApollo";
|
|
34
33
|
export { ItemMessage, itemMessageVariants, type ItemMessageVariants, } from "./prospect-client/Form/ItemMessage/ItemMessageApollo";
|
|
34
|
+
export { ItemMultiSelect, type ItemMultiSelectProps, } from "./prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo";
|
|
35
|
+
export { MultiSelectList, type MultiSelectListProps, } from "./prospect-client/Form/MultiSelectList/MultiSelectListApollo";
|
|
35
36
|
export { CardRadio } from "./prospect-client/Form/Radio/CardRadio/CardRadioApollo";
|
|
36
37
|
export { CardRadioGroup } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo";
|
|
37
38
|
export { Radio } from "./prospect-client/Form/Radio/Radio/RadioApollo";
|
|
@@ -39,11 +40,13 @@ export { RadioText, type RadioTextProps, } from "./prospect-client/Form/Radio/Ra
|
|
|
39
40
|
export { TextArea } from "./prospect-client/Form/TextArea/TextAreaApollo";
|
|
40
41
|
export { DebugGrid } from "./prospect-client/Grid/DebugGridApollo";
|
|
41
42
|
export { Heading, type HeadingLevel, type HeadingProps, } from "./prospect-client/Heading/HeadingApollo";
|
|
43
|
+
export { Header, type HeaderProps, } from "./prospect-client/Header/HeaderApollo";
|
|
42
44
|
export { Icon, iconSizeVariants, iconVariants, type IconSizeVariants, type IconVariants, } from "./prospect-client/Icon/IconApollo";
|
|
43
45
|
export { ItemTabBar, type ItemTabBarProps, } from "./prospect-client/ItemTabBar/ItemTabBarApollo";
|
|
44
46
|
export { ItemMenu, type ItemMenuProps, } from "./prospect-client/ItemMenu/ItemMenuApollo";
|
|
47
|
+
export { MenuBurger, type MenuBurgerProps, } from "./prospect-client/MenuBurger/MenuBurgerApollo";
|
|
45
48
|
export { TabMenu, type TabMenuProps } from "./prospect-client/TabMenu/TabMenu";
|
|
46
|
-
export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
|
|
49
|
+
export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, ExitLayoutSkeleton, type ExitLayoutSkeletonProps, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
|
|
47
50
|
export { Footer, type FooterProps, } from "./prospect-client/Layout/Footer/FooterApollo";
|
|
48
51
|
export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/FormLayout/FormLayout";
|
|
49
52
|
export { LevelSelector, type LevelSelectorProps, } from "./prospect-client/LevelSelector/LevelSelectorApollo";
|
|
@@ -61,7 +64,8 @@ export { ItemPagination, type ItemPaginationProps, } from "./prospect-client/Pag
|
|
|
61
64
|
export { Pagination } from "./prospect-client/Pagination/PaginationApollo";
|
|
62
65
|
export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarApollo";
|
|
63
66
|
export { ProgressBarGroup } from "./prospect-client/ProgressBarGroup/ProgressBarGroupApollo";
|
|
64
|
-
export { Skeleton, type SkeletonProps, } from "./prospect-client/Skeleton/
|
|
67
|
+
export { Skeleton, skeletonSizeVariants, skeletonVariants, type SkeletonActionSizeVariant, type SkeletonCircleSizeVariant, type SkeletonProps, type SkeletonSizeVariant, type SkeletonVariant, } from "./prospect-client/Skeleton/Skeleton";
|
|
68
|
+
export { SkeletonGrid, type SkeletonGridProps, } from "./prospect-client/SkeletonGrid/SkeletonGrid";
|
|
65
69
|
export { SkeletonList, type SkeletonListProps, } from "./prospect-client/SkeletonList/SkeletonListApollo";
|
|
66
70
|
export { Spinner, spinnerVariants, type SpinnerVariants, } from "./prospect-client/Spinner/SpinnerApollo";
|
|
67
71
|
export { Stepper } from "./prospect-client/Stepper/StepperApollo";
|
|
@@ -70,6 +74,7 @@ export { TabBar, tabBarDirection, type TabBarDirection, type TabBarProps, } from
|
|
|
70
74
|
export { Table, type BodyColorVariants, type HeadColorVariants, type RowSizeVariants, type TableProps, } from "./prospect-client/Table/TableApollo";
|
|
71
75
|
export { TableMobileCard } from "./prospect-client/TableMobileCard/TableMobileCard";
|
|
72
76
|
export { Tag, tagVariants, type TagVariants, } from "./prospect-client/Tag/TagApollo";
|
|
77
|
+
export { TagList, type TagListProps, } from "./prospect-client/TagList/TagListApollo";
|
|
73
78
|
export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalApollo";
|
|
74
79
|
export { Toggle } from "./prospect-client/Toggle/ToggleApollo";
|
|
75
80
|
export type { GridContainerProps } from "./prospect-client/utilities/types/GridContainerProps";
|