@axa-fr/canopee-react 1.5.1-alpha.23 → 1.5.1-alpha.25

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.
@@ -6,10 +6,11 @@ export type HeadingCommonProps = PropsWithChildren<{
6
6
  level?: HeadingLevel;
7
7
  icon?: string;
8
8
  iconProps?: Omit<IconProps, "src">;
9
+ iconPosition?: "start" | "top";
9
10
  tag?: ReactNode;
10
11
  firstSubtitle?: ReactNode;
11
12
  secondSubtitle?: ReactNode;
12
13
  className?: string;
13
14
  }> & JSX.IntrinsicElements["div"];
14
15
  export declare const DEFAULT_TAG_PROPS: TagProps;
15
- export declare const HeadingCommon: ({ children: title, className, firstSubtitle, secondSubtitle, level, icon, iconProps, tag, ...props }: HeadingCommonProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const HeadingCommon: ({ children: title, className, firstSubtitle, secondSubtitle, level, icon, iconProps, iconPosition, tag, ...props }: HeadingCommonProps) => import("react/jsx-runtime").JSX.Element;
@@ -9,10 +9,11 @@ import { getClassName } from "../utilities/getClassName";
9
9
  export const DEFAULT_TAG_PROPS = {
10
10
  variant: "neutral",
11
11
  };
12
- export const HeadingCommon = ({ children: title, className, firstSubtitle, secondSubtitle, level = 1, icon, iconProps = {}, tag, ...props }) => {
12
+ export const HeadingCommon = ({ children: title, className, firstSubtitle, secondSubtitle, level = 1, icon, iconProps = {}, iconPosition = "start", tag, ...props }) => {
13
13
  const isMobile = useIsSmallScreen(BREAKPOINT.SM);
14
14
  return (_jsxs("div", { className: getClassName({
15
15
  baseClassName: "af-heading",
16
+ modifiers: [iconPosition === "top" && "icon-top"],
16
17
  className,
17
18
  }), ...props, children: [tag && level < 3 ? _jsx("div", { className: "af-heading__label", children: tag }) : null, icon ? (_jsx(Icon, { src: icon, size: isMobile
18
19
  ? headingLevelToIconSizeMobile[level]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/canopee-react",
3
- "version": "1.5.1-alpha.23",
3
+ "version": "1.5.1-alpha.25",
4
4
  "description": "Package React - Design System Canopée",
5
5
  "exports": {
6
6
  "./distributeur": {
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "homepage": "https://github.com/AxaFrance/design-system#readme",
51
51
  "peerDependencies": {
52
- "@axa-fr/canopee-css": "1.5.1-alpha.23",
52
+ "@axa-fr/canopee-css": "1.5.1-alpha.25",
53
53
  "@material-symbols/svg-400": ">= 0.19.0",
54
54
  "@material-symbols/svg-700": ">= 0.19.0",
55
55
  "react": ">= 18"