@axa-fr/design-system-apollo-react 1.0.5-alpha.292 → 1.0.5-alpha.297
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/Button/ButtonApollo.d.ts +3 -1
- package/dist/Button/ButtonApollo.js +5 -1
- package/dist/Button/ButtonCommon.d.ts +7 -3
- package/dist/Button/ButtonCommon.js +2 -3
- package/dist/Button/ButtonLF.d.ts +3 -1
- package/dist/Button/ButtonLF.js +5 -1
- package/dist/Form/InputDate/InputDateApollo.d.ts +1 -1
- package/dist/Form/InputDate/InputDateLF.d.ts +1 -1
- package/dist/Form/InputText/InputTextApollo.d.ts +1 -1
- package/dist/Form/InputText/InputTextLF.d.ts +1 -1
- package/dist/Form/ItemLabel/ItemLabelCommon.d.ts +3 -3
- package/dist/Form/ItemLabel/ItemLabelCommon.js +1 -1
- package/dist/Form/Select/SelectApollo.d.ts +1 -1
- package/dist/Form/Select/SelectLF.d.ts +1 -1
- package/dist/Form/TextArea/TextAreaApollo.d.ts +1 -1
- package/dist/Form/TextArea/TextAreaLF.d.ts +1 -1
- package/dist/List/ContentItemDuo/ContentItemDuoCommon.d.ts +3 -3
- package/dist/List/ContentItemDuo/ContentItemDuoCommon.js +1 -1
- package/dist/Message/MessageCommon.d.ts +3 -3
- package/package.json +3 -3
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Button/ButtonApollo.scss";
|
|
2
|
-
|
|
2
|
+
import { type ButtonProps } from "./ButtonCommon";
|
|
3
|
+
export { buttonVariants, type ButtonVariants, type ButtonProps, } from "./ButtonCommon";
|
|
4
|
+
export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import "@axa-fr/design-system-apollo-css/dist/Button/ButtonApollo.scss";
|
|
2
|
-
|
|
3
|
+
import { Spinner } from "../Spinner/SpinnerApollo";
|
|
4
|
+
import { ButtonCommon } from "./ButtonCommon";
|
|
5
|
+
export { buttonVariants, } from "./ButtonCommon";
|
|
6
|
+
export const Button = (props) => (_jsx(ButtonCommon, { ...props, SpinnerComponent: Spinner }));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef, PropsWithChildren, ReactNode } from "react";
|
|
1
|
+
import type { ComponentProps, ComponentPropsWithoutRef, ComponentType, PropsWithChildren, ReactNode } from "react";
|
|
2
|
+
import { Spinner } from "../Spinner/SpinnerCommon";
|
|
2
3
|
export declare const buttonVariants: {
|
|
3
4
|
readonly primary: "primary";
|
|
4
5
|
readonly "primary-business": "primary-business";
|
|
@@ -9,11 +10,14 @@ export declare const buttonVariants: {
|
|
|
9
10
|
readonly ghost: "ghost";
|
|
10
11
|
};
|
|
11
12
|
export type ButtonVariants = keyof typeof buttonVariants;
|
|
12
|
-
type ButtonProps = {
|
|
13
|
+
export type ButtonProps = {
|
|
13
14
|
variant?: ButtonVariants;
|
|
14
15
|
iconLeft?: ReactNode;
|
|
15
16
|
iconRight?: ReactNode;
|
|
16
17
|
loading?: boolean;
|
|
17
18
|
} & ComponentPropsWithoutRef<"button">;
|
|
18
|
-
|
|
19
|
+
type ButtonPropsWithSpinner = ButtonProps & {
|
|
20
|
+
SpinnerComponent: ComponentType<ComponentProps<typeof Spinner>>;
|
|
21
|
+
};
|
|
22
|
+
export declare const ButtonCommon: ({ children, className, variant, iconLeft, iconRight, disabled, loading, SpinnerComponent, ...args }: PropsWithChildren<ButtonPropsWithSpinner>) => import("react/jsx-runtime").JSX.Element;
|
|
19
23
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Spinner } from "../Spinner/SpinnerCommon";
|
|
3
2
|
export const buttonVariants = {
|
|
4
3
|
primary: "primary",
|
|
5
4
|
"primary-business": "primary-business",
|
|
@@ -9,6 +8,6 @@ export const buttonVariants = {
|
|
|
9
8
|
tertiary: "tertiary",
|
|
10
9
|
ghost: "ghost",
|
|
11
10
|
};
|
|
12
|
-
export const
|
|
11
|
+
export const ButtonCommon = ({ children, className, variant = "primary", iconLeft, iconRight, disabled, loading, SpinnerComponent, ...args }) => (_jsxs("button", { className: ["af-btn-client", `af-btn-client--${variant}`, className]
|
|
13
12
|
.filter(Boolean)
|
|
14
|
-
.join(" "), disabled: disabled || loading, type: "button", ...args, children: [iconLeft, children, iconRight, loading && _jsx(
|
|
13
|
+
.join(" "), disabled: disabled || loading, type: "button", ...args, children: [iconLeft, children, iconRight, (disabled || loading) && _jsx(SpinnerComponent, { size: 24, variant: "gray" })] }));
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Button/ButtonLF.scss";
|
|
2
|
-
|
|
2
|
+
import { type ButtonProps } from "./ButtonCommon";
|
|
3
|
+
export { buttonVariants, type ButtonVariants, type ButtonProps, } from "./ButtonCommon";
|
|
4
|
+
export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/Button/ButtonLF.js
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import "@axa-fr/design-system-apollo-css/dist/Button/ButtonLF.scss";
|
|
2
|
-
|
|
3
|
+
import { Spinner } from "../Spinner/SpinnerLF";
|
|
4
|
+
import { ButtonCommon } from "./ButtonCommon";
|
|
5
|
+
export { buttonVariants, } from "./ButtonCommon";
|
|
6
|
+
export const Button = (props) => (_jsx(ButtonCommon, { ...props, SpinnerComponent: Spinner }));
|
|
@@ -21,5 +21,5 @@ export declare const InputDate: import("react").ForwardRefExoticComponent<Omit<O
|
|
|
21
21
|
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
22
22
|
buttonLabel?: string;
|
|
23
23
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
24
|
-
ButtonComponent: import("react").ComponentType<
|
|
24
|
+
ButtonComponent: import("react").ComponentType<import("../../Button/ButtonCommon").ButtonProps>;
|
|
25
25
|
}>, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -21,5 +21,5 @@ export declare const InputDate: import("react").ForwardRefExoticComponent<Omit<O
|
|
|
21
21
|
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
22
22
|
buttonLabel?: string;
|
|
23
23
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
24
|
-
ButtonComponent: import("react").ComponentType<
|
|
24
|
+
ButtonComponent: import("react").ComponentType<import("../../Button/ButtonCommon").ButtonProps>;
|
|
25
25
|
}>, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -20,5 +20,5 @@ export declare const InputText: import("react").ForwardRefExoticComponent<Omit<O
|
|
|
20
20
|
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
21
21
|
buttonLabel?: string;
|
|
22
22
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
23
|
-
ButtonComponent: import("react").ComponentType<
|
|
23
|
+
ButtonComponent: import("react").ComponentType<import("../../Button/ButtonCommon").ButtonProps>;
|
|
24
24
|
}>, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -20,5 +20,5 @@ export declare const InputText: import("react").ForwardRefExoticComponent<Omit<O
|
|
|
20
20
|
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
21
21
|
buttonLabel?: string;
|
|
22
22
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
23
|
-
ButtonComponent: import("react").ComponentType<
|
|
23
|
+
ButtonComponent: import("react").ComponentType<import("../../Button/ButtonCommon").ButtonProps>;
|
|
24
24
|
}>, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
1
|
+
import { type ComponentType, type MouseEventHandler } from "react";
|
|
2
|
+
import type { ButtonProps } from "../../Button/ButtonCommon";
|
|
3
3
|
type ItemLabelProps = {
|
|
4
4
|
label?: string;
|
|
5
5
|
description?: string;
|
|
@@ -10,7 +10,7 @@ type ItemLabelProps = {
|
|
|
10
10
|
onSideButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
11
11
|
buttonLabel?: string;
|
|
12
12
|
onButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
13
|
-
ButtonComponent: ComponentType<
|
|
13
|
+
ButtonComponent: ComponentType<ButtonProps>;
|
|
14
14
|
};
|
|
15
15
|
export declare const ItemLabel: ({ label, description, required, inputId, idLabel, sideButtonLabel, onSideButtonClick, buttonLabel, onButtonClick, ButtonComponent, }: ItemLabelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
16
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useId
|
|
2
|
+
import { useId } from "react";
|
|
3
3
|
import infoIcon from "@material-symbols/svg-400/outlined/info.svg";
|
|
4
4
|
import { Svg } from "../../Svg/Svg";
|
|
5
5
|
export const ItemLabel = ({ label, description, required, inputId, idLabel, sideButtonLabel, onSideButtonClick, buttonLabel, onButtonClick, ButtonComponent, }) => {
|
|
@@ -23,5 +23,5 @@ export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit
|
|
|
23
23
|
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
24
24
|
buttonLabel?: string;
|
|
25
25
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
26
|
-
ButtonComponent: import("react").ComponentType<
|
|
26
|
+
ButtonComponent: import("react").ComponentType<import("../../Button/ButtonCommon").ButtonProps>;
|
|
27
27
|
}>, "ref"> & import("react").RefAttributes<HTMLSelectElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
@@ -23,5 +23,5 @@ export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit
|
|
|
23
23
|
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
24
24
|
buttonLabel?: string;
|
|
25
25
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
26
|
-
ButtonComponent: import("react").ComponentType<
|
|
26
|
+
ButtonComponent: import("react").ComponentType<import("../../Button/ButtonCommon").ButtonProps>;
|
|
27
27
|
}>, "ref"> & import("react").RefAttributes<HTMLSelectElement>, "ItemMessageComponent" | "ItemLabelComponent">, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
@@ -11,7 +11,7 @@ export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Om
|
|
|
11
11
|
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
12
12
|
buttonLabel?: string;
|
|
13
13
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
14
|
-
ButtonComponent: import("react").ComponentType<
|
|
14
|
+
ButtonComponent: import("react").ComponentType<import("../../Button/ButtonCommon").ButtonProps>;
|
|
15
15
|
}, "label" | "description" | "sideButtonLabel" | "onSideButtonClick" | "buttonLabel"> & {
|
|
16
16
|
classModifier?: string;
|
|
17
17
|
helper?: string;
|
|
@@ -11,7 +11,7 @@ export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Om
|
|
|
11
11
|
onSideButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
12
12
|
buttonLabel?: string;
|
|
13
13
|
onButtonClick?: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
14
|
-
ButtonComponent: import("react").ComponentType<
|
|
14
|
+
ButtonComponent: import("react").ComponentType<import("../../Button/ButtonCommon").ButtonProps>;
|
|
15
15
|
}, "label" | "description" | "sideButtonLabel" | "onSideButtonClick" | "buttonLabel"> & {
|
|
16
16
|
classModifier?: string;
|
|
17
17
|
helper?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
1
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
+
import type { ButtonProps } from "../../Button/ButtonCommon";
|
|
3
3
|
type ContentItemDuoProps = {
|
|
4
4
|
label: string;
|
|
5
5
|
value: ReactNode;
|
|
@@ -8,7 +8,7 @@ type ContentItemDuoProps = {
|
|
|
8
8
|
classModifier?: string;
|
|
9
9
|
buttonText?: string;
|
|
10
10
|
onButtonClick?: () => void;
|
|
11
|
-
ButtonComponent: ComponentType<
|
|
11
|
+
ButtonComponent: ComponentType<ButtonProps>;
|
|
12
12
|
};
|
|
13
13
|
export declare const ContentItemDuo: ({ label, value, isVertical, className, classModifier, buttonText, onButtonClick, ButtonComponent, }: ContentItemDuoProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo
|
|
2
|
+
import { useMemo } from "react";
|
|
3
3
|
import { getComponentClassName } from "../../utilities/getComponentClassName";
|
|
4
4
|
export const ContentItemDuo = ({ label, value, isVertical = false, className, classModifier, buttonText, onButtonClick, ButtonComponent, }) => {
|
|
5
5
|
const componentClassName = useMemo(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef, type PropsWithChildren, type ReactElement } from "react";
|
|
2
|
-
import {
|
|
1
|
+
import { type ComponentPropsWithoutRef, ComponentType, type PropsWithChildren, type ReactElement } from "react";
|
|
2
|
+
import type { ButtonProps } from "../Button/ButtonCommon";
|
|
3
3
|
import { Link } from "../Link/LinkCommon";
|
|
4
4
|
type Headings = "h2" | "h3" | "h4" | "h5" | "h6";
|
|
5
5
|
export declare const messageVariants: {
|
|
@@ -13,7 +13,7 @@ export type MessageVariants = keyof typeof messageVariants;
|
|
|
13
13
|
export type MessageProps = {
|
|
14
14
|
variant: MessageVariants;
|
|
15
15
|
title?: string;
|
|
16
|
-
action?: ReactElement<typeof Link |
|
|
16
|
+
action?: ReactElement<typeof Link | ComponentType<ButtonProps>>;
|
|
17
17
|
iconSize?: number;
|
|
18
18
|
heading?: Headings;
|
|
19
19
|
} & ComponentPropsWithoutRef<"div">;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "1.0.5-alpha.
|
|
3
|
+
"version": "1.0.5-alpha.297",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@axa-fr/design-system-apollo-css": "1.0.5-alpha.
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "1.0.5-alpha.297",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.297",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|