@axa-fr/design-system-apollo-react 1.0.5-alpha.258 → 1.0.5-alpha.260

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.
@@ -13,7 +13,7 @@ export declare const DateInput: import("react").ForwardRefExoticComponent<Omit<O
13
13
  ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
14
14
  ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
15
15
  } & Partial<{
16
- label: string;
16
+ label?: string;
17
17
  description?: string;
18
18
  required?: boolean;
19
19
  inputId: string;
@@ -13,7 +13,7 @@ export declare const DateInput: import("react").ForwardRefExoticComponent<Omit<O
13
13
  ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
14
14
  ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
15
15
  } & Partial<{
16
- label: string;
16
+ label?: string;
17
17
  description?: string;
18
18
  required?: boolean;
19
19
  inputId: string;
@@ -1,7 +1,7 @@
1
1
  import { type ComponentProps, type ComponentType, type MouseEventHandler } from "react";
2
2
  import { Button } from "../../Button/ButtonCommon";
3
3
  type ItemLabelProps = {
4
- label: string;
4
+ label?: string;
5
5
  description?: string;
6
6
  required?: boolean;
7
7
  inputId: string;
@@ -12,5 +12,5 @@ type ItemLabelProps = {
12
12
  onButtonClick?: MouseEventHandler<HTMLButtonElement>;
13
13
  ButtonComponent: ComponentType<ComponentProps<typeof Button>>;
14
14
  };
15
- export declare const ItemLabel: ({ label, description, required, inputId, idLabel, sideButtonLabel, onSideButtonClick, buttonLabel, onButtonClick, ButtonComponent, }: ItemLabelProps) => import("react/jsx-runtime").JSX.Element;
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 {};
@@ -4,5 +4,8 @@ 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, }) => {
6
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 }))] }));
7
+ if (!label && !description && !buttonLabel && !sideButtonLabel) {
8
+ return null;
9
+ }
10
+ return (_jsxs("div", { className: "af-item-label", children: [label && (_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
11
  };
@@ -4,8 +4,7 @@ import { ItemMessage } from "../ItemMessage/ItemMessageApollo";
4
4
  export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").ClassAttributes<HTMLSelectElement> & import("react").SelectHTMLAttributes<HTMLSelectElement> & {
5
5
  id?: string;
6
6
  classModifier?: string;
7
- label: ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>["label"];
8
- errorLabel?: string;
7
+ label?: ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>["label"];
9
8
  error?: string;
10
9
  success?: string;
11
10
  placeholder?: string;
@@ -15,7 +14,7 @@ export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit
15
14
  ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
16
15
  ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
17
16
  } & Partial<{
18
- label: string;
17
+ label?: string;
19
18
  description?: string;
20
19
  required?: boolean;
21
20
  inputId: string;
@@ -4,8 +4,7 @@ import { ItemMessage } from "../ItemMessage/ItemMessageCommon";
4
4
  type SelectProps = ComponentPropsWithRef<"select"> & {
5
5
  id?: string;
6
6
  classModifier?: string;
7
- label: ComponentProps<typeof ItemLabel>["label"];
8
- errorLabel?: string;
7
+ label?: ComponentProps<typeof ItemLabel>["label"];
9
8
  error?: string;
10
9
  success?: string;
11
10
  placeholder?: string;
@@ -4,8 +4,7 @@ import { ItemMessage } from "../ItemMessage/ItemMessageLF";
4
4
  export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").ClassAttributes<HTMLSelectElement> & import("react").SelectHTMLAttributes<HTMLSelectElement> & {
5
5
  id?: string;
6
6
  classModifier?: string;
7
- label: ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>["label"];
8
- errorLabel?: string;
7
+ label?: ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>["label"];
9
8
  error?: string;
10
9
  success?: string;
11
10
  placeholder?: string;
@@ -15,7 +14,7 @@ export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit
15
14
  ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
16
15
  ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
17
16
  } & Partial<{
18
- label: string;
17
+ label?: string;
19
18
  description?: string;
20
19
  required?: boolean;
21
20
  inputId: string;
@@ -11,7 +11,7 @@ export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<O
11
11
  ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
12
12
  ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
13
13
  } & Partial<{
14
- label: string;
14
+ label?: string;
15
15
  description?: string;
16
16
  required?: boolean;
17
17
  inputId: string;
@@ -11,7 +11,7 @@ export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<O
11
11
  ItemLabelComponent: import("react").ComponentType<Omit<ComponentProps<typeof import("../ItemLabel/ItemLabelCommon").ItemLabel>, "ButtonComponent">>;
12
12
  ItemMessageComponent: import("react").ComponentType<ComponentProps<typeof ItemMessage>>;
13
13
  } & Partial<{
14
- label: string;
14
+ label?: string;
15
15
  description?: string;
16
16
  required?: boolean;
17
17
  inputId: string;
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import "@axa-fr/design-system-apollo-css/dist/Grid/DebugGrid.scss";
3
3
  import { useState } from "react";
4
- import { CheckboxCard } from "..";
4
+ import { CheckboxCard } from "../Form/checkbox/checkboxCard/CheckboxCardApollo";
5
+ import { DebugGridCommon } from "./DebugGridCommon";
5
6
  export const DebugGrid = ({ cols = 12, isCheckedByDefault = false, }) => {
6
7
  const [checked, setChecked] = useState(isCheckedByDefault);
7
8
  const handleChecked = () => setChecked(!checked);
@@ -12,5 +13,5 @@ export const DebugGrid = ({ cols = 12, isCheckedByDefault = false, }) => {
12
13
  checked,
13
14
  onClick: handleChecked,
14
15
  },
15
- ] }), _jsx("div", { className: "debug-grid", children: _jsx("div", { className: "grid", children: [...Array(cols).keys()].map((col) => (_jsx("div", { className: "cols" }, col))) }) })] }));
16
+ ] }), _jsx(DebugGridCommon, { cols: cols })] }));
16
17
  };
@@ -0,0 +1,4 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Grid/DebugGrid.scss";
2
+ export declare const DebugGridCommon: ({ cols }: {
3
+ cols?: number;
4
+ }) => 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/Grid/DebugGrid.scss";
3
+ export const DebugGridCommon = ({ cols = 12 }) => {
4
+ return (_jsx("div", { className: "debug-grid", children: _jsx("div", { className: "grid", children: [...Array(cols).keys()].map((col) => (_jsx("div", { className: "cols" }, col))) }) }));
5
+ };
@@ -0,0 +1,5 @@
1
+ import "@axa-fr/design-system-apollo-css/dist/Grid/DebugGrid.scss";
2
+ export declare const DebugGrid: ({ cols, isCheckedByDefault, }: {
3
+ cols?: number;
4
+ isCheckedByDefault?: boolean;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import "@axa-fr/design-system-apollo-css/dist/Grid/DebugGrid.scss";
3
+ import { useState } from "react";
4
+ import { CheckboxCard } from "../Form/checkbox/checkboxCard/CheckboxCardLF";
5
+ import { DebugGridCommon } from "./DebugGridCommon";
6
+ export const DebugGrid = ({ cols = 12, isCheckedByDefault = false, }) => {
7
+ const [checked, setChecked] = useState(isCheckedByDefault);
8
+ const handleChecked = () => setChecked(!checked);
9
+ return (_jsxs(_Fragment, { children: [_jsx(CheckboxCard, { type: "vertical", options: [
10
+ {
11
+ name: "debuggrid",
12
+ label: "Grid",
13
+ checked,
14
+ onClick: handleChecked,
15
+ },
16
+ ] }), _jsx(DebugGridCommon, { cols: cols })] }));
17
+ };
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export { Link, linkVariants, type LinkVariants } from "./Link/LinkApollo";
7
7
  export { Svg } from "./Svg/Svg";
8
8
  export { Spinner, spinnerVariants, type SpinnerVariants, } from "./Spinner/SpinnerApollo";
9
9
  export { Tag, type TagVariants, tagVariants } from "./Tag/TagApollo";
10
- export { DebugGrid } from "./Grid/DebugGrid";
10
+ export { DebugGrid } from "./Grid/DebugGridApollo";
11
11
  export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
12
12
  export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
13
13
  export { TextArea } from "./Form/TextArea/TextAreaApollo";
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ export { Link, linkVariants } from "./Link/LinkApollo";
7
7
  export { Svg } from "./Svg/Svg";
8
8
  export { Spinner, spinnerVariants, } from "./Spinner/SpinnerApollo";
9
9
  export { Tag, tagVariants } from "./Tag/TagApollo";
10
- export { DebugGrid } from "./Grid/DebugGrid";
10
+ export { DebugGrid } from "./Grid/DebugGridApollo";
11
11
  export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
12
12
  export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
13
13
  export { TextArea } from "./Form/TextArea/TextAreaApollo";
package/dist/indexLF.d.ts CHANGED
@@ -6,7 +6,7 @@ export { Link, linkVariants, type LinkVariants } from "./Link/LinkLF";
6
6
  export { Svg } from "./Svg/Svg";
7
7
  export { Spinner, spinnerVariants, type SpinnerVariants, } from "./Spinner/SpinnerLF";
8
8
  export { Tag, type TagVariants, tagVariants } from "./Tag/TagLF";
9
- export { DebugGrid } from "./Grid/DebugGrid";
9
+ export { DebugGrid } from "./Grid/DebugGridLF";
10
10
  export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
11
11
  export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
12
12
  export { Select } from "./Form/Select/SelectLF";
package/dist/indexLF.js CHANGED
@@ -6,7 +6,7 @@ export { Link, linkVariants } from "./Link/LinkLF";
6
6
  export { Svg } from "./Svg/Svg";
7
7
  export { Spinner, spinnerVariants, } from "./Spinner/SpinnerLF";
8
8
  export { Tag, tagVariants } from "./Tag/TagLF";
9
- export { DebugGrid } from "./Grid/DebugGrid";
9
+ export { DebugGrid } from "./Grid/DebugGridLF";
10
10
  export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
11
11
  export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
12
12
  export { Select } from "./Form/Select/SelectLF";
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.258",
3
+ "version": "1.0.5-alpha.260",
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.258",
50
- "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.258",
49
+ "@axa-fr/design-system-apollo-css": "1.0.5-alpha.260",
50
+ "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.260",
51
51
  "@material-symbols/svg-400": ">= 0.19.0",
52
52
  "react": ">= 18"
53
53
  },