@axa-fr/design-system-apollo-react 1.0.5-alpha.248 → 1.0.5-alpha.250
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/Heading/HeadingApollo.d.ts +4 -0
- package/dist/Heading/HeadingApollo.js +5 -0
- package/dist/Heading/HeadingCommon.d.ts +15 -0
- package/dist/Heading/HeadingCommon.js +8 -0
- package/dist/Heading/HeadingLF.d.ts +4 -0
- package/dist/Heading/HeadingLF.js +5 -0
- package/dist/Heading/HeadingWithSubheadings.d.ts +10 -0
- package/dist/Heading/HeadingWithSubheadings.js +2 -0
- package/dist/Heading/types.d.ts +6 -0
- package/dist/Heading/types.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -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/Heading/HeadingApollo.scss";
|
|
2
|
+
import { HeadingProps } from "./types";
|
|
3
|
+
export type { HeadingLevel, HeadingProps } from "./types";
|
|
4
|
+
export declare const Heading: ({ tag, tagProps, ...props }: HeadingProps) => 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/Heading/HeadingApollo.scss";
|
|
3
|
+
import { DEFAULT_TAG_PROPS, HeadingCommon } from "./HeadingCommon";
|
|
4
|
+
import { Tag } from "../Tag/TagApollo";
|
|
5
|
+
export const Heading = ({ tag, tagProps = {}, ...props }) => (_jsx(HeadingCommon, { ...props, tag: tag && (_jsx(Tag, { ...DEFAULT_TAG_PROPS, ...tagProps, children: tag })) }));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
import { IconProps } from "../Icon/IconCommon";
|
|
3
|
+
import { TagProps } from "../Tag/TagCommon";
|
|
4
|
+
import { HeadingLevel } from "./types";
|
|
5
|
+
export type HeadingCommonProps = React.PropsWithChildren<{
|
|
6
|
+
level?: HeadingLevel;
|
|
7
|
+
icon?: string;
|
|
8
|
+
iconProps?: Omit<IconProps, "src">;
|
|
9
|
+
tag?: React.ReactNode;
|
|
10
|
+
firstSubtitle?: ReactNode;
|
|
11
|
+
secondSubtitle?: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
}>;
|
|
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;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { HeadingWithSubheadings } from "./HeadingWithSubheadings";
|
|
4
|
+
import { Icon } from "../Icon/IconCommon";
|
|
5
|
+
export const DEFAULT_TAG_PROPS = {
|
|
6
|
+
variant: "neutral",
|
|
7
|
+
};
|
|
8
|
+
export const HeadingCommon = ({ children: title, className, firstSubtitle, secondSubtitle, level = 1, icon, iconProps = {}, tag, }) => (_jsxs("header", { className: classNames("af-heading", className), 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 })] }));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "@axa-fr/design-system-apollo-css/dist/Heading/HeadingLF.scss";
|
|
2
|
+
import { HeadingProps } from "./types";
|
|
3
|
+
export type { HeadingLevel, HeadingProps } from "./types";
|
|
4
|
+
export declare const Heading: ({ tag, tagProps, ...props }: HeadingProps) => 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/Heading/HeadingLF.scss";
|
|
3
|
+
import { DEFAULT_TAG_PROPS, HeadingCommon } from "./HeadingCommon";
|
|
4
|
+
import { Tag } from "../Tag/TagLF";
|
|
5
|
+
export const Heading = ({ tag, tagProps = {}, ...props }) => (_jsx(HeadingCommon, { ...props, tag: tag && (_jsx(Tag, { ...DEFAULT_TAG_PROPS, ...tagProps, children: tag })) }));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { HeadingLevel } from "./types";
|
|
3
|
+
type HeadingTextProps = {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
firstSubtitle?: ReactNode;
|
|
6
|
+
secondSubtitle?: ReactNode;
|
|
7
|
+
titleComponent?: `h${HeadingLevel}`;
|
|
8
|
+
};
|
|
9
|
+
export declare const HeadingWithSubheadings: ({ title, firstSubtitle, secondSubtitle, titleComponent: TitleComponent, }: HeadingTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const HeadingWithSubheadings = ({ title, firstSubtitle, secondSubtitle, titleComponent: TitleComponent = "h1", }) => (_jsxs("div", { className: "af-heading__title-container", children: [_jsx(TitleComponent, { className: "af-heading__title", children: title }), firstSubtitle && (_jsx("span", { className: "af-heading__subtitle", children: firstSubtitle })), TitleComponent === "h1" && secondSubtitle && (_jsx("span", { className: "af-heading__subtitle", children: secondSubtitle }))] }));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -25,3 +25,4 @@ export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupApollo";
|
|
|
25
25
|
export { Stepper } from "./Stepper/StepperApollo";
|
|
26
26
|
export { DateInput } from "./Form/DateInput/DateInputApollo";
|
|
27
27
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalApollo";
|
|
28
|
+
export { Heading, type HeadingLevel } from "./Heading/HeadingApollo";
|
package/dist/index.js
CHANGED
|
@@ -25,3 +25,4 @@ export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupApollo";
|
|
|
25
25
|
export { Stepper } from "./Stepper/StepperApollo";
|
|
26
26
|
export { DateInput } from "./Form/DateInput/DateInputApollo";
|
|
27
27
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalApollo";
|
|
28
|
+
export { Heading } from "./Heading/HeadingApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -24,3 +24,4 @@ export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupLF";
|
|
|
24
24
|
export { Stepper } from "./Stepper/StepperLF";
|
|
25
25
|
export { DateInput } from "./Form/DateInput/DateInputLF";
|
|
26
26
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalLF";
|
|
27
|
+
export { Heading, type HeadingLevel } from "./Heading/HeadingLF";
|
package/dist/indexLF.js
CHANGED
|
@@ -24,3 +24,4 @@ export { ProgressBarGroup } from "./ProgressBarGroup/ProgressBarGroupLF";
|
|
|
24
24
|
export { Stepper } from "./Stepper/StepperLF";
|
|
25
25
|
export { DateInput } from "./Form/DateInput/DateInputLF";
|
|
26
26
|
export { TimelineVertical } from "./TimelineVertical/TimelineVerticalLF";
|
|
27
|
+
export { Heading } from "./Heading/HeadingLF";
|
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.250",
|
|
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.250",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.250",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|