@axa-fr/design-system-apollo-react 1.0.5-alpha.290 → 1.0.5-alpha.293
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.
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IconProps } from "../Icon/IconCommon";
|
|
3
|
-
import { TagProps } from "../Tag/TagCommon";
|
|
4
|
-
import { HeadingLevel } from "./types";
|
|
5
|
-
export type HeadingCommonProps =
|
|
1
|
+
import type { JSX, PropsWithChildren, ReactNode } from "react";
|
|
2
|
+
import { type IconProps } from "../Icon/IconCommon";
|
|
3
|
+
import { type TagProps } from "../Tag/TagCommon";
|
|
4
|
+
import { type HeadingLevel } from "./types";
|
|
5
|
+
export type HeadingCommonProps = PropsWithChildren<{
|
|
6
6
|
level?: HeadingLevel;
|
|
7
7
|
icon?: string;
|
|
8
8
|
iconProps?: Omit<IconProps, "src">;
|
|
9
|
-
tag?:
|
|
9
|
+
tag?: ReactNode;
|
|
10
10
|
firstSubtitle?: ReactNode;
|
|
11
11
|
secondSubtitle?: ReactNode;
|
|
12
12
|
className?: string;
|
|
13
|
-
}
|
|
13
|
+
}> & JSX.IntrinsicElements["div"];
|
|
14
14
|
export declare const DEFAULT_TAG_PROPS: TagProps;
|
|
15
|
-
export declare const HeadingCommon: ({ children: title, className, firstSubtitle, secondSubtitle, level, icon, iconProps, tag, }: HeadingCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const HeadingCommon: ({ children: title, className, firstSubtitle, secondSubtitle, level, icon, iconProps, tag, ...props }: HeadingCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { HeadingWithSubheadings } from "./HeadingWithSubheadings";
|
|
4
3
|
import { Icon } from "../Icon/IconCommon";
|
|
4
|
+
import { HeadingWithSubheadings } from "./HeadingWithSubheadings";
|
|
5
5
|
export const DEFAULT_TAG_PROPS = {
|
|
6
6
|
variant: "neutral",
|
|
7
7
|
};
|
|
8
|
-
export const HeadingCommon = ({ children: title, className, firstSubtitle, secondSubtitle, level = 1, icon, iconProps = {}, tag, }) => (_jsxs("
|
|
8
|
+
export const HeadingCommon = ({ children: title, className, firstSubtitle, secondSubtitle, level = 1, icon, iconProps = {}, tag, ...props }) => (_jsxs("div", { className: classNames("af-heading", className), ...props, children: [tag && level < 3 && _jsx("div", { className: "af-heading__label", children: tag }), icon && level === 1 && (_jsx(Icon, { src: icon, size: "L", hasBackground: true, variant: "secondary", ...iconProps, className: classNames("af-heading__icon", iconProps.className) })), _jsx(HeadingWithSubheadings, { title: title, firstSubtitle: firstSubtitle, titleComponent: `h${level}`, secondSubtitle: secondSubtitle })] }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export const HeadingWithSubheadings = ({ title, firstSubtitle, secondSubtitle, titleComponent: TitleComponent = "h1", }) => (_jsxs("
|
|
2
|
+
export const HeadingWithSubheadings = ({ title, firstSubtitle, secondSubtitle, titleComponent: TitleComponent = "h1", }) => (_jsxs("hgroup", { className: "af-heading__title-container", children: [_jsx(TitleComponent, { className: "af-heading__title", children: title }), firstSubtitle && _jsx("p", { className: "af-heading__subtitle", children: firstSubtitle }), TitleComponent === "h1" && secondSubtitle && (_jsx("p", { className: "af-heading__subtitle", children: secondSubtitle }))] }));
|
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.293",
|
|
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.293",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.293",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|