@axa-fr/canopee-react 2.0.0-alpha.23 → 2.0.0-alpha.26
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 +3 -2
- package/dist/client.js +3 -2
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.d.ts +1 -1
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.js +3 -3
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.d.ts +2 -2
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.js +1 -1
- 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/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/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.d.ts +3 -2
- package/dist/prospect.js +3 -2
- 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/client.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export { ItemTabBar, type ItemTabBarProps, } from "./prospect-client/ItemTabBar/
|
|
|
51
51
|
export { ItemMenu, type ItemMenuProps, } from "./prospect-client/ItemMenu/ItemMenuLF";
|
|
52
52
|
export { MenuBurger, type MenuBurgerProps, } from "./prospect-client/MenuBurger/MenuBurgerLF";
|
|
53
53
|
export { TabMenu, type TabMenuProps } from "./prospect-client/TabMenu/TabMenu";
|
|
54
|
-
export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
|
|
54
|
+
export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, ExitLayoutSkeleton, type ExitLayoutSkeletonProps, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
|
|
55
55
|
export { Footer, type FooterProps, } from "./prospect-client/Layout/Footer/FooterLF";
|
|
56
56
|
export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/FormLayout/FormLayout";
|
|
57
57
|
export { LevelSelector, type LevelSelectorProps, } from "./prospect-client/LevelSelector/LevelSelectorLF";
|
|
@@ -69,7 +69,8 @@ export { ItemPagination, type ItemPaginationProps, } from "./prospect-client/Pag
|
|
|
69
69
|
export { Pagination } from "./prospect-client/Pagination/PaginationLF";
|
|
70
70
|
export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarLF";
|
|
71
71
|
export { ProgressBarGroup } from "./prospect-client/ProgressBarGroup/ProgressBarGroupLF";
|
|
72
|
-
export { Skeleton, type SkeletonProps, } from "./prospect-client/Skeleton/
|
|
72
|
+
export { Skeleton, skeletonSizeVariants, skeletonVariants, type SkeletonActionSizeVariant, type SkeletonCircleSizeVariant, type SkeletonProps, type SkeletonSizeVariant, type SkeletonVariant, } from "./prospect-client/Skeleton/Skeleton";
|
|
73
|
+
export { SkeletonGrid, type SkeletonGridProps, } from "./prospect-client/SkeletonGrid/SkeletonGrid";
|
|
73
74
|
export { SkeletonList, type SkeletonListProps, } from "./prospect-client/SkeletonList/SkeletonListLF";
|
|
74
75
|
export { Spinner, spinnerVariants, type SpinnerVariants, } from "./prospect-client/Spinner/SpinnerLF";
|
|
75
76
|
export { Stepper } from "./prospect-client/Stepper/StepperLF";
|
package/dist/client.js
CHANGED
|
@@ -51,7 +51,7 @@ export { ItemTabBar, } from "./prospect-client/ItemTabBar/ItemTabBarLF";
|
|
|
51
51
|
export { ItemMenu, } from "./prospect-client/ItemMenu/ItemMenuLF";
|
|
52
52
|
export { MenuBurger, } from "./prospect-client/MenuBurger/MenuBurgerLF";
|
|
53
53
|
export { TabMenu } from "./prospect-client/TabMenu/TabMenu";
|
|
54
|
-
export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
|
|
54
|
+
export { ExitLayout, ExitLayoutSkeleton, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
|
|
55
55
|
export { Footer, } from "./prospect-client/Layout/Footer/FooterLF";
|
|
56
56
|
export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
|
|
57
57
|
export { LevelSelector, } from "./prospect-client/LevelSelector/LevelSelectorLF";
|
|
@@ -69,7 +69,8 @@ export { ItemPagination, } from "./prospect-client/Pagination/ItemPagination/Ite
|
|
|
69
69
|
export { Pagination } from "./prospect-client/Pagination/PaginationLF";
|
|
70
70
|
export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarLF";
|
|
71
71
|
export { ProgressBarGroup } from "./prospect-client/ProgressBarGroup/ProgressBarGroupLF";
|
|
72
|
-
export { Skeleton, } from "./prospect-client/Skeleton/
|
|
72
|
+
export { Skeleton, skeletonSizeVariants, skeletonVariants, } from "./prospect-client/Skeleton/Skeleton";
|
|
73
|
+
export { SkeletonGrid, } from "./prospect-client/SkeletonGrid/SkeletonGrid";
|
|
73
74
|
export { SkeletonList, } from "./prospect-client/SkeletonList/SkeletonListLF";
|
|
74
75
|
export { Spinner, spinnerVariants, } from "./prospect-client/Spinner/SpinnerLF";
|
|
75
76
|
export { Stepper } from "./prospect-client/Stepper/StepperLF";
|
|
@@ -22,7 +22,7 @@ export type CardRadioCommonProps = CardRadioProps & {
|
|
|
22
22
|
IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
|
|
23
23
|
};
|
|
24
24
|
export declare const CardRadioCommon: {
|
|
25
|
-
({ label, position, type, description, subtitle, icon, src, basePictureProps,
|
|
25
|
+
({ label, position, type, description, subtitle, icon, src, basePictureProps, variant, className, RadioComponent, IconComponent, ...inputProps }: CardRadioCommonProps): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
displayName: string;
|
|
27
27
|
};
|
|
28
28
|
export {};
|
|
@@ -2,15 +2,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import {} from "react";
|
|
3
3
|
import { BasePicture } from "../../../BasePicture/BasePicture";
|
|
4
4
|
import { getClassName } from "../../../utilities/getClassName";
|
|
5
|
-
export const CardRadioCommon = ({ label, position, type, description, subtitle, icon, src, basePictureProps,
|
|
5
|
+
export const CardRadioCommon = ({ label, position, type, description, subtitle, icon, src, basePictureProps, variant, className, RadioComponent, IconComponent, ...inputProps }) => {
|
|
6
6
|
const isCardRadioHorizontal = [position, type].includes("horizontal");
|
|
7
7
|
return (_jsxs("label", { className: getClassName({
|
|
8
8
|
baseClassName: "af-card-radio",
|
|
9
9
|
modifiers: [
|
|
10
|
-
|
|
10
|
+
variant === "error" && "invalid",
|
|
11
11
|
isCardRadioHorizontal && "horizontal",
|
|
12
12
|
],
|
|
13
13
|
className,
|
|
14
|
-
}), children: [icon ? _jsx(IconComponent, { src: icon, role: "presentation" }) : null, isCardRadioHorizontal && src ? (_jsx(BasePicture, { src: src, ...basePictureProps })) : null, _jsxs("div", { className: "af-card-radio__content", children: [_jsx("p", { className: "af-card-radio__label", children: label }), Boolean(description) && (_jsx("p", { className: "af-card-radio__description", children: description })), Boolean(subtitle) && (_jsx("p", { className: "af-card-radio__subtitle", children: subtitle }))] }), _jsx(RadioComponent, { ...inputProps,
|
|
14
|
+
}), children: [icon ? _jsx(IconComponent, { src: icon, role: "presentation" }) : null, isCardRadioHorizontal && src ? (_jsx(BasePicture, { src: src, ...basePictureProps })) : null, _jsxs("div", { className: "af-card-radio__content", children: [_jsx("p", { className: "af-card-radio__label", children: label }), Boolean(description) && (_jsx("p", { className: "af-card-radio__description", children: description })), Boolean(subtitle) && (_jsx("p", { className: "af-card-radio__subtitle", children: subtitle }))] }), _jsx(RadioComponent, { ...inputProps, variant: variant })] }));
|
|
15
15
|
};
|
|
16
16
|
CardRadioCommon.displayName = "CardRadioCommon";
|
|
@@ -2,8 +2,8 @@ import { type ComponentProps, type ComponentType, type PropsWithChildren, type R
|
|
|
2
2
|
import type { GridContainerProps } from "../../../utilities/types/GridContainerProps";
|
|
3
3
|
import { ItemMessage, type ItemMessageProps } from "../../ItemMessage/ItemMessageCommon";
|
|
4
4
|
import { type CardRadioProps } from "../CardRadio/CardRadioCommon";
|
|
5
|
-
type RadioOption = Omit<CardRadioProps, "name" | "type" | "
|
|
6
|
-
export type CardRadioGroupProps = Omit<CardRadioProps, "value" | "label" | "type" | "
|
|
5
|
+
type RadioOption = Omit<CardRadioProps, "name" | "type" | "variant">;
|
|
6
|
+
export type CardRadioGroupProps = Omit<CardRadioProps, "value" | "label" | "type" | "variant" | "icon" | "src" | "basePictureProps" | "description" | "subtitle" | "children" | "position"> & {
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated Use `position` and `cardStyle` instead.
|
|
9
9
|
*/
|
|
@@ -12,7 +12,7 @@ const CardRadioGroupCommon = ({ className, labelGroup, descriptionGroup, label,
|
|
|
12
12
|
`af-card-radio-group__options--${position}`,
|
|
13
13
|
].join(" "), children: options.map((cardRadioItemProps) => (_jsx(CardRadioComponent, { id: `${cardRadioGroupId}-${cardRadioItemProps.value}`, checked: value !== undefined
|
|
14
14
|
? value === cardRadioItemProps.value
|
|
15
|
-
: undefined, required: required, position: cardStyle ?? type, ...inputProps, ...cardRadioItemProps,
|
|
15
|
+
: undefined, required: required, position: cardStyle ?? type, ...inputProps, ...cardRadioItemProps, variant: hasError ? "error" : undefined, name: name }, `${name ?? cardRadioGroupId}-${cardRadioItemProps.label}`))) }), _jsx(ItemMessageComponent, { id: messageId, message: message || error, messageType: messageType })] }));
|
|
16
16
|
};
|
|
17
17
|
CardRadioGroupCommon.displayName = "CardRadioGroupCommon";
|
|
18
18
|
export { CardRadioGroupCommon };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { type ComponentProps } from "react";
|
|
2
2
|
export type RadioProps = Omit<ComponentProps<"input">, "disabled" | "type"> & {
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare const Radio: {
|
|
6
|
-
({ className, isInvalid, ...props }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
displayName: string;
|
|
3
|
+
variant?: "error" | "warning";
|
|
8
4
|
};
|
|
5
|
+
export declare const Radio: ({ variant, className, ref, ...inputProps }: RadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import {} from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { getClassName } from "../../../utilities/getClassName";
|
|
4
|
+
export const Radio = ({ variant, className, ref, ...inputProps }) => (_jsx("input", { ...inputProps, className: getClassName({
|
|
5
|
+
baseClassName: "af-radio",
|
|
6
|
+
modifiers: [variant],
|
|
7
|
+
className,
|
|
8
|
+
}), ref: ref, type: "radio" }));
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { type ExitLayoutProps } from "./ExitLayoutCommon";
|
|
2
2
|
export { type ExitLayoutWithSubComponents, type ExitLayoutProps, } from "./ExitLayoutCommon";
|
|
3
|
+
export { ExitLayoutSkeleton, type ExitLayoutSkeletonProps, } from "./ExitLayoutSkeleton";
|
|
4
|
+
/**
|
|
5
|
+
* Apollo-themed `ExitLayout` component with `Agent`, `Action`, and `Content`
|
|
6
|
+
* static slots.
|
|
7
|
+
*
|
|
8
|
+
* @component
|
|
9
|
+
* @param {ExitLayoutProps} props - ExitLayout props.
|
|
10
|
+
* @param {HeadingProps} [props.headingProps] - Props forwarded to the heading displayed in the content column.
|
|
11
|
+
* @param {Pick<IconProps, "variant" | "src" | "hasBackground">} [props.iconProps] - Props forwarded to the icon displayed in the content column.
|
|
12
|
+
* @param {React.ReactNode} [props.children] - Slots composed with `ExitLayout.Content`, `ExitLayout.Agent`, and `ExitLayout.Action`.
|
|
13
|
+
* @returns {JSX.Element} The rendered Apollo-themed ExitLayout.
|
|
14
|
+
*/
|
|
3
15
|
export declare const ExitLayout: {
|
|
4
16
|
(props: ExitLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
5
17
|
Agent: ({ children }: import("react").PropsWithChildren) => (string | number | bigint | 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> | {
|
|
@@ -3,6 +3,18 @@ import { Heading } from "../../Heading/HeadingApollo";
|
|
|
3
3
|
import { Icon } from "../../Icon/IconApollo";
|
|
4
4
|
import { Agent, Action, Content, ExitLayoutCommon, } from "./ExitLayoutCommon";
|
|
5
5
|
export {} from "./ExitLayoutCommon";
|
|
6
|
+
export { ExitLayoutSkeleton, } from "./ExitLayoutSkeleton";
|
|
7
|
+
/**
|
|
8
|
+
* Apollo-themed `ExitLayout` component with `Agent`, `Action`, and `Content`
|
|
9
|
+
* static slots.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @param {ExitLayoutProps} props - ExitLayout props.
|
|
13
|
+
* @param {HeadingProps} [props.headingProps] - Props forwarded to the heading displayed in the content column.
|
|
14
|
+
* @param {Pick<IconProps, "variant" | "src" | "hasBackground">} [props.iconProps] - Props forwarded to the icon displayed in the content column.
|
|
15
|
+
* @param {React.ReactNode} [props.children] - Slots composed with `ExitLayout.Content`, `ExitLayout.Agent`, and `ExitLayout.Action`.
|
|
16
|
+
* @returns {JSX.Element} The rendered Apollo-themed ExitLayout.
|
|
17
|
+
*/
|
|
6
18
|
export const ExitLayout = (props) => (_jsx(ExitLayoutCommon, { ...props, HeadingComponent: Heading, IconComponent: Icon }));
|
|
7
19
|
ExitLayout.Agent = Agent;
|
|
8
20
|
ExitLayout.Action = Action;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { type ExitLayoutProps } from "./ExitLayoutCommon";
|
|
2
2
|
export { type ExitLayoutWithSubComponents, type ExitLayoutProps, } from "./ExitLayoutCommon";
|
|
3
|
+
export { ExitLayoutSkeleton, type ExitLayoutSkeletonProps, } from "./ExitLayoutSkeleton";
|
|
4
|
+
/**
|
|
5
|
+
* Look and Feel-themed `ExitLayout` component with `Agent`, `Action`, and
|
|
6
|
+
* `Content` static slots.
|
|
7
|
+
*
|
|
8
|
+
* @component
|
|
9
|
+
* @param {ExitLayoutProps} props - ExitLayout props.
|
|
10
|
+
* @param {HeadingProps} [props.headingProps] - Props forwarded to the heading displayed in the content column.
|
|
11
|
+
* @param {Pick<IconProps, "variant" | "src" | "hasBackground">} [props.iconProps] - Props forwarded to the icon displayed in the content column.
|
|
12
|
+
* @param {React.ReactNode} [props.children] - Slots composed with `ExitLayout.Content`, `ExitLayout.Agent`, and `ExitLayout.Action`.
|
|
13
|
+
* @returns {JSX.Element} The rendered Look and Feel ExitLayout.
|
|
14
|
+
*/
|
|
3
15
|
export declare const ExitLayout: {
|
|
4
16
|
(props: ExitLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
5
17
|
Agent: ({ children }: import("react").PropsWithChildren) => (string | number | bigint | 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> | {
|
|
@@ -3,6 +3,18 @@ import { Heading } from "../../Heading/HeadingLF";
|
|
|
3
3
|
import { Icon } from "../../Icon/IconLF";
|
|
4
4
|
import { Agent, Action, Content, ExitLayoutCommon, } from "./ExitLayoutCommon";
|
|
5
5
|
export {} from "./ExitLayoutCommon";
|
|
6
|
+
export { ExitLayoutSkeleton, } from "./ExitLayoutSkeleton";
|
|
7
|
+
/**
|
|
8
|
+
* Look and Feel-themed `ExitLayout` component with `Agent`, `Action`, and
|
|
9
|
+
* `Content` static slots.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @param {ExitLayoutProps} props - ExitLayout props.
|
|
13
|
+
* @param {HeadingProps} [props.headingProps] - Props forwarded to the heading displayed in the content column.
|
|
14
|
+
* @param {Pick<IconProps, "variant" | "src" | "hasBackground">} [props.iconProps] - Props forwarded to the icon displayed in the content column.
|
|
15
|
+
* @param {React.ReactNode} [props.children] - Slots composed with `ExitLayout.Content`, `ExitLayout.Agent`, and `ExitLayout.Action`.
|
|
16
|
+
* @returns {JSX.Element} The rendered Look and Feel ExitLayout.
|
|
17
|
+
*/
|
|
6
18
|
export const ExitLayout = (props) => (_jsx(ExitLayoutCommon, { ...props, HeadingComponent: Heading, IconComponent: Icon }));
|
|
7
19
|
ExitLayout.Agent = Agent;
|
|
8
20
|
ExitLayout.Action = Action;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props controlling which placeholder areas are displayed in `ExitLayoutSkeleton`.
|
|
3
|
+
*/
|
|
4
|
+
export type ExitLayoutSkeletonProps = {
|
|
5
|
+
hasAgent?: boolean;
|
|
6
|
+
hasIcon?: boolean;
|
|
7
|
+
hasAction?: boolean;
|
|
8
|
+
hasContent?: boolean;
|
|
9
|
+
hasHeading?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Renders skeleton placeholders matching the visual structure of `ExitLayout`.
|
|
13
|
+
*
|
|
14
|
+
* @component
|
|
15
|
+
* @param {ExitLayoutSkeletonProps} props - ExitLayoutSkeleton props.
|
|
16
|
+
* @param {boolean} [props.hasAgent] - Displays the agent placeholder block.
|
|
17
|
+
* @param {boolean} [props.hasIcon] - Displays the icon placeholder.
|
|
18
|
+
* @param {boolean} [props.hasAction] - Displays the action area placeholder.
|
|
19
|
+
* @param {boolean} [props.hasContent] - Displays the main content placeholder.
|
|
20
|
+
* @param {boolean} [props.hasHeading] - Displays the heading placeholder.
|
|
21
|
+
* @returns {JSX.Element} The rendered ExitLayoutSkeleton component.
|
|
22
|
+
*/
|
|
23
|
+
export declare const ExitLayoutSkeleton: ({ hasAgent, hasIcon, hasAction, hasContent, hasHeading, }: ExitLayoutSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton } from "../../Skeleton/Skeleton";
|
|
3
|
+
/**
|
|
4
|
+
* Renders skeleton placeholders matching the visual structure of `ExitLayout`.
|
|
5
|
+
*
|
|
6
|
+
* @component
|
|
7
|
+
* @param {ExitLayoutSkeletonProps} props - ExitLayoutSkeleton props.
|
|
8
|
+
* @param {boolean} [props.hasAgent] - Displays the agent placeholder block.
|
|
9
|
+
* @param {boolean} [props.hasIcon] - Displays the icon placeholder.
|
|
10
|
+
* @param {boolean} [props.hasAction] - Displays the action area placeholder.
|
|
11
|
+
* @param {boolean} [props.hasContent] - Displays the main content placeholder.
|
|
12
|
+
* @param {boolean} [props.hasHeading] - Displays the heading placeholder.
|
|
13
|
+
* @returns {JSX.Element} The rendered ExitLayoutSkeleton component.
|
|
14
|
+
*/
|
|
15
|
+
export const ExitLayoutSkeleton = ({ hasAgent, hasIcon, hasAction, hasContent, hasHeading, }) => {
|
|
16
|
+
return (_jsxs("section", { className: "af-exit-page subgrid", children: [_jsxs("article", { className: "af-exit-page__content subgrid", children: [hasIcon ? _jsx(Skeleton, { variant: "circle", size: "L" }) : null, hasHeading ? _jsx(Skeleton, { colSize: 12 }) : null, hasContent ? _jsx(Skeleton, { size: "XL", colSize: 12 }) : null] }), hasAgent ? (_jsx(Skeleton, { className: "af-exit-page__agent", size: "XXL", colSize: 12 })) : null, hasAction ? (_jsx("div", { className: "af-exit-page__actions subgrid", children: _jsx(Skeleton, { variant: "action", colSize: 12 }) })) : null] }));
|
|
17
|
+
};
|
|
@@ -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 }));
|
package/dist/prospect.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export { ItemTabBar, type ItemTabBarProps, } from "./prospect-client/ItemTabBar/
|
|
|
47
47
|
export { ItemMenu, type ItemMenuProps, } from "./prospect-client/ItemMenu/ItemMenuApollo";
|
|
48
48
|
export { MenuBurger, type MenuBurgerProps, } from "./prospect-client/MenuBurger/MenuBurgerApollo";
|
|
49
49
|
export { TabMenu, type TabMenuProps } from "./prospect-client/TabMenu/TabMenu";
|
|
50
|
-
export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
|
|
50
|
+
export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, ExitLayoutSkeleton, type ExitLayoutSkeletonProps, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
|
|
51
51
|
export { Footer, type FooterProps, } from "./prospect-client/Layout/Footer/FooterApollo";
|
|
52
52
|
export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/FormLayout/FormLayout";
|
|
53
53
|
export { LevelSelector, type LevelSelectorProps, } from "./prospect-client/LevelSelector/LevelSelectorApollo";
|
|
@@ -65,7 +65,8 @@ export { ItemPagination, type ItemPaginationProps, } from "./prospect-client/Pag
|
|
|
65
65
|
export { Pagination } from "./prospect-client/Pagination/PaginationApollo";
|
|
66
66
|
export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarApollo";
|
|
67
67
|
export { ProgressBarGroup } from "./prospect-client/ProgressBarGroup/ProgressBarGroupApollo";
|
|
68
|
-
export { Skeleton, type SkeletonProps, } from "./prospect-client/Skeleton/
|
|
68
|
+
export { Skeleton, skeletonSizeVariants, skeletonVariants, type SkeletonActionSizeVariant, type SkeletonCircleSizeVariant, type SkeletonProps, type SkeletonSizeVariant, type SkeletonVariant, } from "./prospect-client/Skeleton/Skeleton";
|
|
69
|
+
export { SkeletonGrid, type SkeletonGridProps, } from "./prospect-client/SkeletonGrid/SkeletonGrid";
|
|
69
70
|
export { SkeletonList, type SkeletonListProps, } from "./prospect-client/SkeletonList/SkeletonListApollo";
|
|
70
71
|
export { Spinner, spinnerVariants, type SpinnerVariants, } from "./prospect-client/Spinner/SpinnerApollo";
|
|
71
72
|
export { Stepper } from "./prospect-client/Stepper/StepperApollo";
|
package/dist/prospect.js
CHANGED
|
@@ -47,7 +47,7 @@ export { ItemTabBar, } from "./prospect-client/ItemTabBar/ItemTabBarApollo";
|
|
|
47
47
|
export { ItemMenu, } from "./prospect-client/ItemMenu/ItemMenuApollo";
|
|
48
48
|
export { MenuBurger, } from "./prospect-client/MenuBurger/MenuBurgerApollo";
|
|
49
49
|
export { TabMenu } from "./prospect-client/TabMenu/TabMenu";
|
|
50
|
-
export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
|
|
50
|
+
export { ExitLayout, ExitLayoutSkeleton, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApollo";
|
|
51
51
|
export { Footer, } from "./prospect-client/Layout/Footer/FooterApollo";
|
|
52
52
|
export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
|
|
53
53
|
export { LevelSelector, } from "./prospect-client/LevelSelector/LevelSelectorApollo";
|
|
@@ -65,7 +65,8 @@ export { ItemPagination, } from "./prospect-client/Pagination/ItemPagination/Ite
|
|
|
65
65
|
export { Pagination } from "./prospect-client/Pagination/PaginationApollo";
|
|
66
66
|
export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarApollo";
|
|
67
67
|
export { ProgressBarGroup } from "./prospect-client/ProgressBarGroup/ProgressBarGroupApollo";
|
|
68
|
-
export { Skeleton, } from "./prospect-client/Skeleton/
|
|
68
|
+
export { Skeleton, skeletonSizeVariants, skeletonVariants, } from "./prospect-client/Skeleton/Skeleton";
|
|
69
|
+
export { SkeletonGrid, } from "./prospect-client/SkeletonGrid/SkeletonGrid";
|
|
69
70
|
export { SkeletonList, } from "./prospect-client/SkeletonList/SkeletonListApollo";
|
|
70
71
|
export { Spinner, spinnerVariants, } from "./prospect-client/Spinner/SpinnerApollo";
|
|
71
72
|
export { Stepper } from "./prospect-client/Stepper/StepperApollo";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/canopee-react",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.26",
|
|
4
4
|
"description": "Package React - Design System Canopée",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./distributeur": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@axa-fr/canopee-css": "2.0.0-alpha.
|
|
56
|
+
"@axa-fr/canopee-css": "2.0.0-alpha.26",
|
|
57
57
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
58
58
|
"@material-symbols/svg-700": ">= 0.19.0",
|
|
59
59
|
"react": ">= 19"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
type isLoadingAndChildrenProps = {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
} | {
|
|
6
|
-
children?: undefined;
|
|
7
|
-
isLoading?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export type SkeletonProps = {
|
|
10
|
-
className?: string;
|
|
11
|
-
grid: number[][];
|
|
12
|
-
"aria-busy"?: boolean;
|
|
13
|
-
"aria-label"?: string;
|
|
14
|
-
maxCols?: number;
|
|
15
|
-
colGap?: number;
|
|
16
|
-
rowGap?: number;
|
|
17
|
-
} & isLoadingAndChildrenProps;
|
|
18
|
-
export declare const Skeleton: ({ className, grid, "aria-busy": ariaBusy, "aria-label": ariaLabel, maxCols, colGap, rowGap, isLoading, children, }: SkeletonProps) => 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;
|
|
19
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getClassName } from "../utilities/getClassName";
|
|
3
|
-
const CLASS_NAME = "af-skeleton";
|
|
4
|
-
export const Skeleton = ({ className, grid = [], "aria-busy": ariaBusy = true, "aria-label": ariaLabel = "Chargement", maxCols = 12, colGap = 16, rowGap = 8, isLoading = true, children, }) => isLoading ? (_jsx("div", { className: getClassName({
|
|
5
|
-
baseClassName: `${CLASS_NAME}-container`,
|
|
6
|
-
className,
|
|
7
|
-
}), "aria-label": ariaLabel, role: "status", "aria-busy": ariaBusy, style: {
|
|
8
|
-
"--max-cols": maxCols,
|
|
9
|
-
"--col-gap": `calc(${colGap} / var(--font-size-base) * 1rem)`,
|
|
10
|
-
"--row-gap": `calc(${rowGap} / var(--font-size-base) * 1rem)`,
|
|
11
|
-
}, children: grid.map((cols, indexRow) => cols.map((colSize, indexCol) => (_jsx("div", { style: { "--col-size": colSize }, className: CLASS_NAME }, `${indexRow}-${indexCol}`)))) })) : (children);
|