@axa-fr/canopee-react 1.1.1-alpha.1 → 1.1.1-alpha.10

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/client.d.ts CHANGED
@@ -58,3 +58,4 @@ export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVer
58
58
  export { Toggle } from "./prospect-client/Toggle/ToggleLF";
59
59
  export { Pagination } from "./prospect-client/Pagination/PaginationLF";
60
60
  export { ItemPagination, type ItemPaginationProps, } from "./prospect-client/Pagination/ItemPagination/ItemPaginationLF";
61
+ export { Card, type CardProps } from "./prospect-client/Card/CardLF";
package/dist/client.js CHANGED
@@ -57,3 +57,4 @@ export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVer
57
57
  export { Toggle } from "./prospect-client/Toggle/ToggleLF";
58
58
  export { Pagination } from "./prospect-client/Pagination/PaginationLF";
59
59
  export { ItemPagination, } from "./prospect-client/Pagination/ItemPagination/ItemPaginationLF";
60
+ export { Card } from "./prospect-client/Card/CardLF";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/canopee-css/prospect/Card/CardApollo.css";
2
+ export { type CardCommonProps as CardProps, CardCommon as Card, } from "./CardCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/canopee-css/prospect/Card/CardApollo.css";
2
+ export { CardCommon as Card, } from "./CardCommon";
@@ -0,0 +1,4 @@
1
+ import type { ComponentProps, ElementType } from "react";
2
+ import { type PolymorphicComponent } from "../utilities/types/PolymorphicComponent";
3
+ export type CardCommonProps<T extends ElementType> = PolymorphicComponent<T, ComponentProps<"div">>;
4
+ export declare const CardCommon: <T extends ElementType = "div">({ as, children, className, ...props }: CardCommonProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getClassName } from "../utilities/getClassName";
3
+ export const CardCommon = ({ as, children, className, ...props }) => {
4
+ const Component = as || "div";
5
+ return (_jsx(Component, { className: getClassName({
6
+ baseClassName: "af-card",
7
+ className,
8
+ }), ...props, children: children }));
9
+ };
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/canopee-css/client/Card/CardLF.css";
2
+ export { type CardCommonProps as CardProps, CardCommon as Card, } from "./CardCommon";
@@ -0,0 +1,2 @@
1
+ import "@axa-fr/canopee-css/client/Card/CardLF.css";
2
+ export { CardCommon as Card, } from "./CardCommon";
@@ -7,44 +7,15 @@ type BaseCardRadioOptionProps = Omit<ComponentProps<typeof Radio>, "size"> & {
7
7
  description?: ReactNode;
8
8
  subtitle?: ReactNode;
9
9
  };
10
- export type CardRadioOptionProps = (BaseCardRadioOptionProps & {
10
+ export type CardRadioOptionProps = BaseCardRadioOptionProps & {
11
11
  type?: "vertical" | "horizontal";
12
12
  icon?: ComponentProps<typeof IconCommon>["src"];
13
- src?: undefined;
14
- basePictureProps?: undefined;
15
- }) | (BaseCardRadioOptionProps & {
16
- type: "horizontal";
17
13
  src?: ComponentProps<typeof BasePicture>["src"];
18
14
  basePictureProps?: Omit<ComponentProps<typeof BasePicture>, "src">;
19
- icon?: undefined;
20
- });
15
+ };
21
16
  export type CardRadioOptionCommonProps = CardRadioOptionProps & {
22
17
  RadioComponent: ComponentType<ComponentProps<typeof Radio>>;
23
18
  IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
24
19
  };
25
- export declare const CardRadioOptionCommon: import("react").ForwardRefExoticComponent<(Omit<Omit<Omit<import("../Radio/RadioCommon").RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "size"> & {
26
- label: ReactNode;
27
- description?: ReactNode;
28
- subtitle?: ReactNode;
29
- } & {
30
- type?: "vertical" | "horizontal";
31
- icon?: ComponentProps<typeof IconCommon>["src"];
32
- src?: undefined;
33
- basePictureProps?: undefined;
34
- } & {
35
- RadioComponent: ComponentType<ComponentProps<typeof Radio>>;
36
- IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
37
- }, "ref"> | Omit<Omit<Omit<import("../Radio/RadioCommon").RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "size"> & {
38
- label: ReactNode;
39
- description?: ReactNode;
40
- subtitle?: ReactNode;
41
- } & {
42
- type: "horizontal";
43
- src?: ComponentProps<typeof BasePicture>["src"];
44
- basePictureProps?: Omit<ComponentProps<typeof BasePicture>, "src">;
45
- icon?: undefined;
46
- } & {
47
- RadioComponent: ComponentType<ComponentProps<typeof Radio>>;
48
- IconComponent: ComponentType<ComponentProps<typeof IconCommon>>;
49
- }, "ref">) & import("react").RefAttributes<HTMLInputElement>>;
20
+ export declare const CardRadioOptionCommon: import("react").ForwardRefExoticComponent<Omit<CardRadioOptionCommonProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
50
21
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { TagProps } from "../Tag/TagCommon";
2
2
  import type { HeadingCommonProps } from "./HeadingCommon";
3
- export type HeadingLevel = 1 | 2 | 3;
3
+ export type HeadingLevel = 1 | 2 | 3 | 4;
4
4
  export type HeadingProps = HeadingCommonProps & {
5
5
  tagProps?: Omit<TagProps, "children">;
6
6
  };
@@ -54,3 +54,4 @@ export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVer
54
54
  export { Toggle } from "./prospect-client/Toggle/ToggleApollo";
55
55
  export { Pagination } from "./prospect-client/Pagination/PaginationApollo";
56
56
  export { ItemPagination, type ItemPaginationProps, } from "./prospect-client/Pagination/ItemPagination/ItemPaginationApollo";
57
+ export { Card, type CardProps } from "./prospect-client/Card/CardApollo";
package/dist/prospect.js CHANGED
@@ -53,3 +53,4 @@ export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVer
53
53
  export { Toggle } from "./prospect-client/Toggle/ToggleApollo";
54
54
  export { Pagination } from "./prospect-client/Pagination/PaginationApollo";
55
55
  export { ItemPagination, } from "./prospect-client/Pagination/ItemPagination/ItemPaginationApollo";
56
+ export { Card } from "./prospect-client/Card/CardApollo";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/canopee-react",
3
- "version": "1.1.1-alpha.1",
3
+ "version": "1.1.1-alpha.10",
4
4
  "description": "Package React - Design System Canopée",
5
5
  "exports": {
6
6
  "./distributeur": {
@@ -21,6 +21,7 @@
21
21
  ],
22
22
  "scripts": {
23
23
  "prebuild": "rimraf dist",
24
+ "dev": "tsc -p tsconfig.build.json --watch",
24
25
  "build": "tsc -p tsconfig.build.json",
25
26
  "eslint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
26
27
  "eslint:fix": "eslint src --ext js,jsx,ts,tsx --fix",
@@ -44,7 +45,7 @@
44
45
  },
45
46
  "homepage": "https://github.com/AxaFrance/design-system#readme",
46
47
  "peerDependencies": {
47
- "@axa-fr/canopee-css": "1.1.1-alpha.1",
48
+ "@axa-fr/canopee-css": "1.1.1-alpha.10",
48
49
  "@material-symbols/svg-400": ">= 0.19.0",
49
50
  "@material-symbols/svg-700": ">= 0.19.0",
50
51
  "react": ">= 18"