@axa-fr/design-system-apollo-react 1.0.3-alpha.146 → 1.0.3-alpha.147
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/Form/ItemLabel/ItemLabelApollo.d.ts +4 -0
- package/dist/Form/ItemLabel/ItemLabelApollo.js +5 -0
- package/dist/Form/ItemLabel/ItemLabelCommon.d.ts +16 -0
- package/dist/Form/ItemLabel/ItemLabelCommon.js +8 -0
- package/dist/Form/ItemLabel/ItemLabelLF.d.ts +4 -0
- package/dist/Form/ItemLabel/ItemLabelLF.js +5 -0
- package/dist/Form/ItemMessage/ItemMessageCommon.d.ts +3 -3
- package/dist/Form/ItemMessage/ItemMessageCommon.js +6 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/indexLF.d.ts +1 -0
- package/dist/indexLF.js +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/ItemLabel/ItemLabelApollo.scss";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { ItemLabel as ItemLabelCommon } from "./ItemLabelCommon";
|
|
4
|
+
export declare const ItemLabel: (props: Omit<ComponentProps<typeof ItemLabelCommon>, "ButtonComponent">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/ItemLabel/ItemLabelApollo.scss";
|
|
3
|
+
import { Button } from "../../Button/ButtonApollo";
|
|
4
|
+
import { ItemLabel as ItemLabelCommon } from "./ItemLabelCommon";
|
|
5
|
+
export const ItemLabel = (props) => _jsx(ItemLabelCommon, { ...props, ButtonComponent: Button });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ComponentProps, type ComponentType, type MouseEventHandler } from "react";
|
|
2
|
+
import { Button } from "../../Button/ButtonCommon";
|
|
3
|
+
type ItemLabelProps = {
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
inputId: string;
|
|
8
|
+
idLabel: string;
|
|
9
|
+
sideButtonLabel?: string;
|
|
10
|
+
onSideButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
11
|
+
buttonLabel?: string;
|
|
12
|
+
onButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
13
|
+
ButtonComponent: ComponentType<ComponentProps<typeof Button>>;
|
|
14
|
+
};
|
|
15
|
+
export declare const ItemLabel: ({ label, description, required, inputId, idLabel, sideButtonLabel, onSideButtonClick, buttonLabel, onButtonClick, ButtonComponent, }: ItemLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, } from "react";
|
|
3
|
+
import infoIcon from "@material-symbols/svg-400/outlined/info.svg";
|
|
4
|
+
import { Svg } from "../../Svg/Svg";
|
|
5
|
+
export const ItemLabel = ({ label, description, required, inputId, idLabel, sideButtonLabel, onSideButtonClick, buttonLabel, onButtonClick, ButtonComponent, }) => {
|
|
6
|
+
const idDescription = useId();
|
|
7
|
+
return (_jsxs("div", { className: "af-item-label", children: [_jsxs("label", { htmlFor: inputId, id: idLabel, "aria-describedby": description ? idDescription : undefined, children: [label, " ", required && _jsx("span", { "aria-hidden": "true", children: " *" })] }), sideButtonLabel && (_jsx(ButtonComponent, { variant: "ghost", onClick: onSideButtonClick, className: "af-item-label__sidebutton", children: sideButtonLabel })), description && (_jsx("span", { id: idDescription, className: "af-item-label__description", children: description })), buttonLabel && (_jsx(ButtonComponent, { className: "af-item-label__more", variant: "ghost", iconLeft: _jsx(Svg, { src: infoIcon, "aria-hidden": "true" }), onClick: onButtonClick, children: buttonLabel }))] }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/ItemLabel/ItemLabelLF.scss";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { ItemLabel as ItemLabelCommon } from "./ItemLabelCommon";
|
|
4
|
+
export declare const ItemLabel: (props: Omit<ComponentProps<typeof ItemLabelCommon>, "ButtonComponent">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/Form/ItemLabel/ItemLabelLF.scss";
|
|
3
|
+
import { Button } from "../../Button/ButtonLF";
|
|
4
|
+
import { ItemLabel as ItemLabelCommon } from "./ItemLabelCommon";
|
|
5
|
+
export const ItemLabel = (props) => _jsx(ItemLabelCommon, { ...props, ButtonComponent: Button });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type ItemMessageProps = {
|
|
2
|
-
message
|
|
2
|
+
message?: string;
|
|
3
3
|
id?: string;
|
|
4
|
-
|
|
4
|
+
messageType?: "error" | "success";
|
|
5
5
|
};
|
|
6
|
-
export declare const ItemMessage: ({ message, id,
|
|
6
|
+
export declare const ItemMessage: ({ message, id, messageType, }: ItemMessageProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
export {};
|
|
@@ -2,4 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import errorIcon from "@material-symbols/svg-400/outlined/error-fill.svg";
|
|
3
3
|
import successIcon from "@material-symbols/svg-400/outlined/check_circle-fill.svg";
|
|
4
4
|
import { Svg } from "../../Svg/Svg";
|
|
5
|
-
export const ItemMessage = ({ message, id,
|
|
5
|
+
export const ItemMessage = ({ message, id, messageType = "error", }) => {
|
|
6
|
+
if (!message) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
return (_jsxs("small", { className: `af-item-message af-item-message--${messageType}`, role: messageType === "error" ? "alert" : undefined, "aria-live": "assertive", children: [_jsx(Svg, { src: messageType === "error" ? errorIcon : successIcon, className: "af-item-message__icon", "aria-hidden": "true" }), _jsx("span", { id: id, className: "af-item-message__message", children: message })] }));
|
|
10
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/common/tokens.scss";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/common/reboot.scss";
|
|
2
3
|
import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
|
|
3
4
|
import "@fontsource/source-sans-pro";
|
|
4
5
|
export { Button, buttonVariants, type ButtonVariants, } from "./Button/ButtonApollo";
|
|
@@ -6,3 +7,4 @@ export { Svg } from "./Svg/Svg";
|
|
|
6
7
|
export { Spinner, spinnerVariants, type SpinnerVariants, } from "./Spinner/SpinnerApollo";
|
|
7
8
|
export { DebugGrid } from "./Grid/DebugGrid";
|
|
8
9
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
10
|
+
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/common/tokens.scss";
|
|
2
|
+
import "@axa-fr/design-system-apollo-css/dist/common/reboot.scss";
|
|
2
3
|
import "@axa-fr/design-system-apollo-css/dist/Grid/Grid.scss";
|
|
3
4
|
import "@fontsource/source-sans-pro";
|
|
4
5
|
export { Button, buttonVariants, } from "./Button/ButtonApollo";
|
|
@@ -6,3 +7,4 @@ export { Svg } from "./Svg/Svg";
|
|
|
6
7
|
export { Spinner, spinnerVariants, } from "./Spinner/SpinnerApollo";
|
|
7
8
|
export { DebugGrid } from "./Grid/DebugGrid";
|
|
8
9
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
10
|
+
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export { Svg } from "./Svg/Svg";
|
|
|
6
6
|
export { Spinner, spinnerVariants, type SpinnerVariants, } from "./Spinner/SpinnerLF";
|
|
7
7
|
export { DebugGrid } from "./Grid/DebugGrid";
|
|
8
8
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
9
|
+
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
package/dist/indexLF.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "1.0.3-alpha.
|
|
3
|
+
"version": "1.0.3-alpha.147",
|
|
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.3-alpha.
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.3-alpha.
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "1.0.3-alpha.147",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.3-alpha.147",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|