@axa-fr/canopee-react 1.4.2-alpha.11 → 1.4.2-alpha.14

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 CHANGED
@@ -74,3 +74,4 @@ export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/Form
74
74
  export { ValidPage, type ValidPageProps, } from "./prospect-client/pages/ValidPage/ValidPageLF";
75
75
  export { ErrorPage, type ErrorPageProps, } from "./prospect-client/pages/ErrorPage/ErrorPageLF";
76
76
  export type { GridContainerProps } from "./prospect-client/utilities/types/GridContainerProps";
77
+ export { Loader, type LoaderProps } from "./prospect-client/Loader/LoaderLF";
package/dist/client.js CHANGED
@@ -73,3 +73,4 @@ export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
73
73
  export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
74
74
  export { ValidPage, } from "./prospect-client/pages/ValidPage/ValidPageLF";
75
75
  export { ErrorPage, } from "./prospect-client/pages/ErrorPage/ErrorPageLF";
76
+ export { Loader } from "./prospect-client/Loader/LoaderLF";
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/prospect/List/ContentItemDuo/ContentItemDuoApollo.css";
3
3
  import { Button } from "../../Button/ButtonApollo";
4
4
  import { ContentItemDuoCommon, } from "./ContentItemDuoCommon";
5
- import { ItemMessage } from "../../../client";
5
+ import { ItemMessage } from "../../Form/ItemMessage/ItemMessageApollo";
6
6
  export const ContentItemDuo = (props) => (_jsx(ContentItemDuoCommon, { ...props, ButtonComponent: Button, ItemMessageComponent: ItemMessage }));
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/client/List/ContentItemDuo/ContentItemDuoLF.css";
3
3
  import { Button } from "../../Button/ButtonLF";
4
4
  import { ContentItemDuoCommon, } from "./ContentItemDuoCommon";
5
- import { ItemMessage } from "../../../client";
5
+ import { ItemMessage } from "../../Form/ItemMessage/ItemMessageLF";
6
6
  export const ContentItemDuo = (props) => (_jsx(ContentItemDuoCommon, { ...props, ButtonComponent: Button, ItemMessageComponent: ItemMessage }));
@@ -0,0 +1,7 @@
1
+ import { type LoaderProps } from "./LoaderCommon";
2
+ import "@axa-fr/canopee-css/prospect/Loader/LoaderApollo.css";
3
+ export { type LoaderProps } from "./LoaderCommon";
4
+ export declare const Loader: {
5
+ (props: LoaderProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LoaderCommon } from "./LoaderCommon";
3
+ import { Spinner } from "../Spinner/SpinnerApollo";
4
+ import "@axa-fr/canopee-css/prospect/Loader/LoaderApollo.css";
5
+ export {} from "./LoaderCommon";
6
+ export const Loader = (props) => (_jsx(LoaderCommon, { ...props, SpinnerComponent: Spinner }));
7
+ Loader.displayName = "Loader";
@@ -0,0 +1,13 @@
1
+ import { type ComponentType, type ElementType } from "react";
2
+ import { type SpinnerProps } from "../Spinner/SpinnerCommon";
3
+ import type { PolymorphicComponent } from "../utilities/types/PolymorphicComponent";
4
+ export type LoaderProps = {
5
+ isDialog?: boolean;
6
+ title: string;
7
+ subtitle?: string;
8
+ spinnerProps?: SpinnerProps;
9
+ };
10
+ export type LoaderCommonProps<T extends ElementType> = PolymorphicComponent<T, LoaderProps> & {
11
+ SpinnerComponent: ComponentType<SpinnerProps>;
12
+ };
13
+ export declare const LoaderCommon: import("react").ForwardRefExoticComponent<Omit<LoaderCommonProps<ElementType>, "ref"> & import("react").RefAttributes<HTMLElement>>;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useId } from "react";
3
+ import { getClassName } from "../utilities/getClassName";
4
+ import {} from "../Spinner/SpinnerCommon";
5
+ export const LoaderCommon = forwardRef(({ title, subtitle, SpinnerComponent, spinnerProps, className, isDialog, ...rest }, ref) => {
6
+ const baseClassName = "af-loader";
7
+ const titleId = useId();
8
+ const Component = (isDialog && "dialog") || "article";
9
+ return (_jsxs(Component, { ref: ref, className: getClassName({
10
+ baseClassName,
11
+ className,
12
+ }), "aria-labelledby": titleId, ...rest, children: [_jsx(SpinnerComponent, { ...spinnerProps }), _jsxs("div", { className: `${baseClassName}__content`, children: [_jsx("span", { id: titleId, className: `${baseClassName}__title`, children: title }), subtitle ? (_jsx("span", { className: `${baseClassName}__subtitle`, children: subtitle })) : null] })] }));
13
+ });
14
+ LoaderCommon.displayName = "LoaderCommon";
@@ -0,0 +1,7 @@
1
+ import { type LoaderProps } from "./LoaderCommon";
2
+ import "@axa-fr/canopee-css/client/Loader/LoaderLF.css";
3
+ export { type LoaderProps } from "./LoaderCommon";
4
+ export declare const Loader: {
5
+ (props: LoaderProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LoaderCommon } from "./LoaderCommon";
3
+ import { Spinner } from "../Spinner/SpinnerLF";
4
+ import "@axa-fr/canopee-css/client/Loader/LoaderLF.css";
5
+ export {} from "./LoaderCommon";
6
+ export const Loader = (props) => (_jsx(LoaderCommon, { ...props, SpinnerComponent: Spinner }));
7
+ Loader.displayName = "Loader";
@@ -70,3 +70,4 @@ export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/Form
70
70
  export { ValidPage, type ValidPageProps, } from "./prospect-client/pages/ValidPage/ValidPageApollo";
71
71
  export { ErrorPage, type ErrorPageProps, } from "./prospect-client/pages/ErrorPage/ErrorPageApollo";
72
72
  export type { GridContainerProps } from "./prospect-client/utilities/types/GridContainerProps";
73
+ export { Loader, type LoaderProps, } from "./prospect-client/Loader/LoaderApollo";
package/dist/prospect.js CHANGED
@@ -69,3 +69,4 @@ export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutApoll
69
69
  export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
70
70
  export { ValidPage, } from "./prospect-client/pages/ValidPage/ValidPageApollo";
71
71
  export { ErrorPage, } from "./prospect-client/pages/ErrorPage/ErrorPageApollo";
72
+ export { Loader, } from "./prospect-client/Loader/LoaderApollo";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/canopee-react",
3
- "version": "1.4.2-alpha.11",
3
+ "version": "1.4.2-alpha.14",
4
4
  "description": "Package React - Design System Canopée",
5
5
  "exports": {
6
6
  "./distributeur": {
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "homepage": "https://github.com/AxaFrance/design-system#readme",
51
51
  "peerDependencies": {
52
- "@axa-fr/canopee-css": "1.4.2-alpha.11",
52
+ "@axa-fr/canopee-css": "1.4.2-alpha.14",
53
53
  "@material-symbols/svg-400": ">= 0.19.0",
54
54
  "@material-symbols/svg-700": ">= 0.19.0",
55
55
  "react": ">= 18"