@axa-fr/canopee-react 1.3.1-alpha.16 → 1.3.1-alpha.18
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 +2 -0
- package/dist/client.js +2 -0
- package/dist/distributeur/Form/Select/Select.d.ts +14 -14
- package/dist/distributeur/Form/Select/SelectInput.d.ts +14 -14
- package/dist/prospect-client/Link/LinkCommon.d.ts +3 -2
- package/dist/prospect-client/Link/LinkCommon.js +7 -7
- package/dist/prospect-client/Table/TBody.d.ts +6 -0
- package/dist/prospect-client/Table/TBody.js +10 -0
- package/dist/prospect-client/Table/THead.d.ts +6 -0
- package/dist/prospect-client/Table/THead.js +10 -0
- package/dist/prospect-client/Table/TableApollo.d.ts +2 -0
- package/dist/prospect-client/Table/TableApollo.js +2 -0
- package/dist/prospect-client/Table/TableCommon.d.ts +14 -0
- package/dist/prospect-client/Table/TableCommon.js +19 -0
- package/dist/prospect-client/Table/TableLF.d.ts +2 -0
- package/dist/prospect-client/Table/TableLF.js +2 -0
- package/dist/prospect-client/Table/Td.d.ts +17 -0
- package/dist/prospect-client/Table/Td.js +15 -0
- package/dist/prospect-client/Table/Th.d.ts +9 -0
- package/dist/prospect-client/Table/Th.js +13 -0
- package/dist/prospect-client/Table/Tr.d.ts +11 -0
- package/dist/prospect-client/Table/Tr.js +15 -0
- package/dist/prospect-client/TableMobileCard/DRow.d.ts +6 -0
- package/dist/prospect-client/TableMobileCard/DRow.js +10 -0
- package/dist/prospect-client/TableMobileCard/Dd.d.ts +3 -0
- package/dist/prospect-client/TableMobileCard/Dd.js +9 -0
- package/dist/prospect-client/TableMobileCard/Dt.d.ts +3 -0
- package/dist/prospect-client/TableMobileCard/Dt.js +9 -0
- package/dist/prospect-client/TableMobileCard/TableMobileCard.d.ts +12 -0
- package/dist/prospect-client/TableMobileCard/TableMobileCard.js +17 -0
- package/dist/prospect.d.ts +2 -0
- package/dist/prospect.js +2 -0
- package/package.json +2 -2
package/dist/client.d.ts
CHANGED
|
@@ -67,3 +67,5 @@ export { TabBar, tabBarDirection, type TabBarDirection, type TabBarProps, } from
|
|
|
67
67
|
export { Tag, tagVariants, type TagVariants, } from "./prospect-client/Tag/TagLF";
|
|
68
68
|
export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalLF";
|
|
69
69
|
export { Toggle } from "./prospect-client/Toggle/ToggleLF";
|
|
70
|
+
export { Table, type TableProps, type HeadColorVariants, type BodyColorVariants, type RowSizeVariants, } from "./prospect-client/Table/TableLF";
|
|
71
|
+
export { TableMobileCard, type TableMobileCardProps, } from "./prospect-client/TableMobileCard/TableMobileCard";
|
package/dist/client.js
CHANGED
|
@@ -66,3 +66,5 @@ export { TabBar, tabBarDirection, } from "./prospect-client/TabBar/TabBarLF";
|
|
|
66
66
|
export { Tag, tagVariants, } from "./prospect-client/Tag/TagLF";
|
|
67
67
|
export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalLF";
|
|
68
68
|
export { Toggle } from "./prospect-client/Toggle/ToggleLF";
|
|
69
|
+
export { Table, } from "./prospect-client/Table/TableLF";
|
|
70
|
+
export { TableMobileCard, } from "./prospect-client/TableMobileCard/TableMobileCard";
|
|
@@ -6,6 +6,9 @@ declare const Select: import("react").ForwardRefExoticComponent<(Omit<Omit<{
|
|
|
6
6
|
id?: string | undefined | undefined;
|
|
7
7
|
lang?: string | undefined | undefined;
|
|
8
8
|
name?: string | undefined | undefined;
|
|
9
|
+
nonce?: string | undefined | undefined;
|
|
10
|
+
part?: string | undefined | undefined;
|
|
11
|
+
slot?: string | undefined | undefined;
|
|
9
12
|
style?: import("react").CSSProperties | undefined;
|
|
10
13
|
role?: import("react").AriaRole | undefined;
|
|
11
14
|
tabIndex?: number | undefined | undefined;
|
|
@@ -82,18 +85,18 @@ declare const Select: import("react").ForwardRefExoticComponent<(Omit<Omit<{
|
|
|
82
85
|
onFocusCapture?: import("react").FocusEventHandler<HTMLSelectElement> | undefined;
|
|
83
86
|
onBlur?: import("react").FocusEventHandler<HTMLSelectElement> | undefined;
|
|
84
87
|
onBlurCapture?: import("react").FocusEventHandler<HTMLSelectElement> | undefined;
|
|
85
|
-
onChange?: import("react").ChangeEventHandler<HTMLSelectElement> | undefined;
|
|
86
|
-
onChangeCapture?: import("react").
|
|
88
|
+
onChange?: import("react").ChangeEventHandler<HTMLSelectElement, HTMLSelectElement> | undefined;
|
|
89
|
+
onChangeCapture?: import("react").ChangeEventHandler<HTMLSelectElement, Element> | undefined;
|
|
87
90
|
onBeforeInput?: import("react").InputEventHandler<HTMLSelectElement> | undefined;
|
|
88
|
-
onBeforeInputCapture?: import("react").
|
|
89
|
-
onInput?: import("react").
|
|
90
|
-
onInputCapture?: import("react").
|
|
91
|
-
onReset?: import("react").
|
|
92
|
-
onResetCapture?: import("react").
|
|
93
|
-
onSubmit?: import("react").
|
|
94
|
-
onSubmitCapture?: import("react").
|
|
95
|
-
onInvalid?: import("react").
|
|
96
|
-
onInvalidCapture?: import("react").
|
|
91
|
+
onBeforeInputCapture?: import("react").InputEventHandler<HTMLSelectElement> | undefined;
|
|
92
|
+
onInput?: import("react").InputEventHandler<HTMLSelectElement> | undefined;
|
|
93
|
+
onInputCapture?: import("react").InputEventHandler<HTMLSelectElement> | undefined;
|
|
94
|
+
onReset?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
95
|
+
onResetCapture?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
96
|
+
onSubmit?: import("react").SubmitEventHandler<HTMLSelectElement> | undefined;
|
|
97
|
+
onSubmitCapture?: import("react").SubmitEventHandler<HTMLSelectElement> | undefined;
|
|
98
|
+
onInvalid?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
99
|
+
onInvalidCapture?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
97
100
|
onLoad?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
98
101
|
onLoadCapture?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
99
102
|
onError?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
@@ -236,7 +239,6 @@ declare const Select: import("react").ForwardRefExoticComponent<(Omit<Omit<{
|
|
|
236
239
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLSelectElement> | undefined;
|
|
237
240
|
ref?: import("react").Ref<HTMLSelectElement> | undefined;
|
|
238
241
|
form?: string | undefined | undefined;
|
|
239
|
-
slot?: string | undefined | undefined;
|
|
240
242
|
title?: string | undefined | undefined;
|
|
241
243
|
dir?: string | undefined | undefined;
|
|
242
244
|
disabled?: boolean | undefined | undefined;
|
|
@@ -253,7 +255,6 @@ declare const Select: import("react").ForwardRefExoticComponent<(Omit<Omit<{
|
|
|
253
255
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
254
256
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
255
257
|
hidden?: boolean | undefined | undefined;
|
|
256
|
-
nonce?: string | undefined | undefined;
|
|
257
258
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
258
259
|
translate?: "yes" | "no" | undefined | undefined;
|
|
259
260
|
radioGroup?: string | undefined | undefined;
|
|
@@ -285,7 +286,6 @@ declare const Select: import("react").ForwardRefExoticComponent<(Omit<Omit<{
|
|
|
285
286
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
286
287
|
is?: string | undefined | undefined;
|
|
287
288
|
exportparts?: string | undefined | undefined;
|
|
288
|
-
part?: string | undefined | undefined;
|
|
289
289
|
value?: string | number | readonly string[] | undefined;
|
|
290
290
|
autoComplete?: string | undefined | undefined;
|
|
291
291
|
multiple?: boolean | undefined | undefined;
|
|
@@ -34,6 +34,9 @@ declare const SelectInput: import("react").ForwardRefExoticComponent<(Omit<Omit<
|
|
|
34
34
|
id?: string | undefined | undefined;
|
|
35
35
|
lang?: string | undefined | undefined;
|
|
36
36
|
name?: string | undefined | undefined;
|
|
37
|
+
nonce?: string | undefined | undefined;
|
|
38
|
+
part?: string | undefined | undefined;
|
|
39
|
+
slot?: string | undefined | undefined;
|
|
37
40
|
style?: import("react").CSSProperties | undefined;
|
|
38
41
|
role?: import("react").AriaRole | undefined;
|
|
39
42
|
tabIndex?: number | undefined | undefined;
|
|
@@ -110,18 +113,18 @@ declare const SelectInput: import("react").ForwardRefExoticComponent<(Omit<Omit<
|
|
|
110
113
|
onFocusCapture?: import("react").FocusEventHandler<HTMLSelectElement> | undefined;
|
|
111
114
|
onBlur?: import("react").FocusEventHandler<HTMLSelectElement> | undefined;
|
|
112
115
|
onBlurCapture?: import("react").FocusEventHandler<HTMLSelectElement> | undefined;
|
|
113
|
-
onChange?: import("react").ChangeEventHandler<HTMLSelectElement> | undefined;
|
|
114
|
-
onChangeCapture?: import("react").
|
|
116
|
+
onChange?: import("react").ChangeEventHandler<HTMLSelectElement, HTMLSelectElement> | undefined;
|
|
117
|
+
onChangeCapture?: import("react").ChangeEventHandler<HTMLSelectElement, Element> | undefined;
|
|
115
118
|
onBeforeInput?: import("react").InputEventHandler<HTMLSelectElement> | undefined;
|
|
116
|
-
onBeforeInputCapture?: import("react").
|
|
117
|
-
onInput?: import("react").
|
|
118
|
-
onInputCapture?: import("react").
|
|
119
|
-
onReset?: import("react").
|
|
120
|
-
onResetCapture?: import("react").
|
|
121
|
-
onSubmit?: import("react").
|
|
122
|
-
onSubmitCapture?: import("react").
|
|
123
|
-
onInvalid?: import("react").
|
|
124
|
-
onInvalidCapture?: import("react").
|
|
119
|
+
onBeforeInputCapture?: import("react").InputEventHandler<HTMLSelectElement> | undefined;
|
|
120
|
+
onInput?: import("react").InputEventHandler<HTMLSelectElement> | undefined;
|
|
121
|
+
onInputCapture?: import("react").InputEventHandler<HTMLSelectElement> | undefined;
|
|
122
|
+
onReset?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
123
|
+
onResetCapture?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
124
|
+
onSubmit?: import("react").SubmitEventHandler<HTMLSelectElement> | undefined;
|
|
125
|
+
onSubmitCapture?: import("react").SubmitEventHandler<HTMLSelectElement> | undefined;
|
|
126
|
+
onInvalid?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
127
|
+
onInvalidCapture?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
125
128
|
onLoad?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
126
129
|
onLoadCapture?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
127
130
|
onError?: import("react").ReactEventHandler<HTMLSelectElement> | undefined;
|
|
@@ -264,7 +267,6 @@ declare const SelectInput: import("react").ForwardRefExoticComponent<(Omit<Omit<
|
|
|
264
267
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLSelectElement> | undefined;
|
|
265
268
|
ref?: import("react").Ref<HTMLSelectElement> | undefined;
|
|
266
269
|
form?: string | undefined | undefined;
|
|
267
|
-
slot?: string | undefined | undefined;
|
|
268
270
|
title?: string | undefined | undefined;
|
|
269
271
|
dir?: string | undefined | undefined;
|
|
270
272
|
disabled?: boolean | undefined | undefined;
|
|
@@ -281,7 +283,6 @@ declare const SelectInput: import("react").ForwardRefExoticComponent<(Omit<Omit<
|
|
|
281
283
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
282
284
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
283
285
|
hidden?: boolean | undefined | undefined;
|
|
284
|
-
nonce?: string | undefined | undefined;
|
|
285
286
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
286
287
|
translate?: "yes" | "no" | undefined | undefined;
|
|
287
288
|
radioGroup?: string | undefined | undefined;
|
|
@@ -313,7 +314,6 @@ declare const SelectInput: import("react").ForwardRefExoticComponent<(Omit<Omit<
|
|
|
313
314
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
314
315
|
is?: string | undefined | undefined;
|
|
315
316
|
exportparts?: string | undefined | undefined;
|
|
316
|
-
part?: string | undefined | undefined;
|
|
317
317
|
value?: string | number | readonly string[] | undefined;
|
|
318
318
|
autoComplete?: string | undefined | undefined;
|
|
319
319
|
multiple?: boolean | undefined | undefined;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, PropsWithChildren, type ReactNode } from "react";
|
|
2
2
|
export declare const linkVariants: {
|
|
3
|
-
readonly default: "default";
|
|
4
|
-
readonly underline: "underline";
|
|
5
3
|
readonly inverse: "inverse";
|
|
6
4
|
};
|
|
7
5
|
export type LinkVariants = keyof typeof linkVariants;
|
|
@@ -11,6 +9,9 @@ type LinkProps = {
|
|
|
11
9
|
leftIcon?: ReactNode;
|
|
12
10
|
rightIcon?: ReactNode;
|
|
13
11
|
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use variant instead
|
|
14
|
+
*/
|
|
14
15
|
classModifier?: string;
|
|
15
16
|
} & ComponentPropsWithoutRef<"a">;
|
|
16
17
|
export declare const Link: ({ href, variant, openInNewTab, leftIcon, rightIcon, children, className, classModifier, ...props }: PropsWithChildren<LinkProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import openInNew from "@material-symbols/svg-400/outlined/open_in_new.svg";
|
|
3
|
-
import { useMemo, } from "react";
|
|
4
3
|
import { Svg } from "../Svg/Svg";
|
|
5
|
-
import {
|
|
4
|
+
import { getClassName } from "../utilities/getClassName";
|
|
6
5
|
export const linkVariants = {
|
|
7
|
-
default: "default",
|
|
8
|
-
underline: "underline",
|
|
9
6
|
inverse: "inverse",
|
|
10
7
|
};
|
|
11
|
-
export const Link = ({ href, variant
|
|
8
|
+
export const Link = ({ href, variant, openInNewTab = false, leftIcon, rightIcon, children, className, classModifier = "", ...props }) => {
|
|
12
9
|
const newTabProps = openInNewTab && {
|
|
13
10
|
target: "_blank",
|
|
14
11
|
rel: "noopener noreferrer",
|
|
15
12
|
};
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
return (_jsxs("a", { className: getClassName({
|
|
14
|
+
baseClassName: "af-link",
|
|
15
|
+
modifiers: [classModifier, variant, openInNewTab && "openInNewTab"],
|
|
16
|
+
className,
|
|
17
|
+
}), href: href, ...newTabProps, ...props, children: [leftIcon, children, openInNewTab || Boolean(rightIcon)
|
|
18
18
|
? (rightIcon ?? _jsx(Svg, { src: openInNew }))
|
|
19
19
|
: null] }));
|
|
20
20
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
export type BodyColorVariants = "white" | "blue" | "alternate";
|
|
3
|
+
export type TBodyProps = ComponentPropsWithRef<"tbody"> & {
|
|
4
|
+
variant?: BodyColorVariants;
|
|
5
|
+
};
|
|
6
|
+
export declare const TBody: ({ variant, className, children, ...tableBodyProps }: TBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const TBody = ({ variant = "white", className, children, ...tableBodyProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table__tbody",
|
|
6
|
+
className,
|
|
7
|
+
modifiers: [variant],
|
|
8
|
+
});
|
|
9
|
+
return (_jsx("tbody", { className: componentClassName, ...tableBodyProps, children: children }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export type HeadColorVariants = "gray" | "blue";
|
|
3
|
+
export type THeadProps = ComponentPropsWithRef<"thead"> & {
|
|
4
|
+
variant?: HeadColorVariants;
|
|
5
|
+
};
|
|
6
|
+
export declare const THead: ({ variant, className, children, ...tableHeadProps }: THeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const THead = ({ variant = "blue", className, children, ...tableHeadProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table__thead",
|
|
6
|
+
className,
|
|
7
|
+
modifiers: [variant],
|
|
8
|
+
});
|
|
9
|
+
return (_jsx("thead", { className: componentClassName, ...tableHeadProps, children: children }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import { type RowSizeVariants } from "./Tr";
|
|
3
|
+
import { type BodyColorVariants } from "./TBody";
|
|
4
|
+
import { type HeadColorVariants } from "./THead";
|
|
5
|
+
export type { HeadColorVariants, BodyColorVariants, RowSizeVariants };
|
|
6
|
+
export type TableProps = ComponentPropsWithRef<"table">;
|
|
7
|
+
export declare const Table: {
|
|
8
|
+
({ className, children, ...tableProps }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
THead: ({ variant, className, children, ...tableHeadProps }: import("./THead").THeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
TBody: ({ variant, className, children, ...tableBodyProps }: import("./TBody").TBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
Th: ({ position, onCheck, checkboxPosition, onSort, className, children, ...tableHeaderProps }: import("./Th").ThProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Tr: ({ size, className, children, ...tableRowProps }: import("./Tr").TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
Td: ({ position, verticalAlign, size, variant, className, children, ...tableCellProps }: import("./Td").TdProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
import { Td } from "./Td";
|
|
4
|
+
import { Tr } from "./Tr";
|
|
5
|
+
import { Th } from "./Th";
|
|
6
|
+
import { TBody } from "./TBody";
|
|
7
|
+
import { THead } from "./THead";
|
|
8
|
+
export const Table = ({ className, children, ...tableProps }) => {
|
|
9
|
+
const componentClassName = getClassName({
|
|
10
|
+
baseClassName: "af-table",
|
|
11
|
+
className,
|
|
12
|
+
});
|
|
13
|
+
return (_jsx("table", { className: componentClassName, ...tableProps, children: children }));
|
|
14
|
+
};
|
|
15
|
+
Table.THead = THead;
|
|
16
|
+
Table.TBody = TBody;
|
|
17
|
+
Table.Th = Th;
|
|
18
|
+
Table.Tr = Tr;
|
|
19
|
+
Table.Td = Td;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
export type CellContentPositionVariants = "left" | "center" | "right";
|
|
3
|
+
export type CellContentVerticalAlignVariants = "top" | "middle";
|
|
4
|
+
export declare const tdSizeVariants: {
|
|
5
|
+
readonly L: "large";
|
|
6
|
+
readonly M: "medium";
|
|
7
|
+
readonly S: "small";
|
|
8
|
+
};
|
|
9
|
+
export type TdSizeVariants = keyof typeof tdSizeVariants;
|
|
10
|
+
export type CellColorVariant = "white" | "blue";
|
|
11
|
+
export type TdProps = ComponentPropsWithRef<"td"> & {
|
|
12
|
+
position?: CellContentPositionVariants;
|
|
13
|
+
verticalAlign?: CellContentVerticalAlignVariants;
|
|
14
|
+
size?: TdSizeVariants;
|
|
15
|
+
variant?: CellColorVariant;
|
|
16
|
+
};
|
|
17
|
+
export declare const Td: ({ position, verticalAlign, size, variant, className, children, ...tableCellProps }: TdProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const tdSizeVariants = {
|
|
4
|
+
L: "large",
|
|
5
|
+
M: "medium",
|
|
6
|
+
S: "small",
|
|
7
|
+
};
|
|
8
|
+
export const Td = ({ position = "left", verticalAlign = "middle", size, variant, className, children, ...tableCellProps }) => {
|
|
9
|
+
const componentClassName = getClassName({
|
|
10
|
+
baseClassName: "af-table__td",
|
|
11
|
+
className,
|
|
12
|
+
modifiers: [position, verticalAlign, size && tdSizeVariants[size], variant],
|
|
13
|
+
});
|
|
14
|
+
return (_jsx("td", { className: componentClassName, ...tableCellProps, children: children }));
|
|
15
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export type HeaderCellPositionVariants = "left" | "center" | "right";
|
|
3
|
+
export type ThProps = ComponentPropsWithRef<"th"> & {
|
|
4
|
+
position?: HeaderCellPositionVariants;
|
|
5
|
+
checkboxPosition?: HeaderCellPositionVariants;
|
|
6
|
+
onCheck?: () => void;
|
|
7
|
+
onSort?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const Th: ({ position, onCheck, checkboxPosition, onSort, className, children, ...tableHeaderProps }: ThProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import unfoldMore from "@material-symbols/svg-400/rounded/unfold_more-fill.svg";
|
|
3
|
+
import { getClassName } from "../utilities/getClassName";
|
|
4
|
+
import { Checkbox } from "../Form/Checkbox/Checkbox/CheckboxCommon";
|
|
5
|
+
import { ClickIcon } from "../ClickIcon/ClickIconCommon";
|
|
6
|
+
export const Th = ({ position = "left", onCheck, checkboxPosition = "left", onSort, className, children, ...tableHeaderProps }) => {
|
|
7
|
+
const componentClassName = getClassName({
|
|
8
|
+
baseClassName: "af-table__th",
|
|
9
|
+
className,
|
|
10
|
+
modifiers: [position, checkboxPosition && `checkbox-${checkboxPosition}`],
|
|
11
|
+
});
|
|
12
|
+
return (_jsx("th", { className: componentClassName, ...tableHeaderProps, children: _jsxs("div", { className: "af-table__th-wrapper", children: [onCheck ? _jsx(Checkbox, { onChange: onCheck }) : null, _jsx("span", { className: "af-table__th-content", children: children }), onSort ? (_jsx(ClickIcon, { onClick: onSort, src: unfoldMore, variant: "ghost", className: "af-table__th-sort-icon" })) : null] }) }));
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export declare const rowSizeVariants: {
|
|
3
|
+
readonly L: "large";
|
|
4
|
+
readonly M: "medium";
|
|
5
|
+
readonly S: "small";
|
|
6
|
+
};
|
|
7
|
+
export type RowSizeVariants = keyof typeof rowSizeVariants;
|
|
8
|
+
export type TrProps = ComponentPropsWithRef<"tr"> & {
|
|
9
|
+
size?: RowSizeVariants;
|
|
10
|
+
};
|
|
11
|
+
export declare const Tr: ({ size, className, children, ...tableRowProps }: TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const rowSizeVariants = {
|
|
4
|
+
L: "large",
|
|
5
|
+
M: "medium",
|
|
6
|
+
S: "small",
|
|
7
|
+
};
|
|
8
|
+
export const Tr = ({ size = "S", className, children, ...tableRowProps }) => {
|
|
9
|
+
const componentClassName = getClassName({
|
|
10
|
+
baseClassName: "af-table__tr",
|
|
11
|
+
className,
|
|
12
|
+
modifiers: [rowSizeVariants[size]],
|
|
13
|
+
});
|
|
14
|
+
return (_jsx("tr", { className: componentClassName, ...tableRowProps, children: children }));
|
|
15
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export type DRowDirectionVariants = "row" | "column";
|
|
3
|
+
export type TrProps = ComponentPropsWithRef<"div"> & {
|
|
4
|
+
direction?: DRowDirectionVariants;
|
|
5
|
+
};
|
|
6
|
+
export declare const DRow: ({ className, children, direction, ...dRowProps }: TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const DRow = ({ className, children, direction = "row", ...dRowProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table-mobile-card__drow",
|
|
6
|
+
className,
|
|
7
|
+
modifiers: [direction],
|
|
8
|
+
});
|
|
9
|
+
return (_jsx("div", { className: componentClassName, ...dRowProps, children: children }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const Dd = ({ className, children, ...ddProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table-mobile-card__dd",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsx("dd", { className: componentClassName, ...ddProps, children: children }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
export const Dt = ({ className, children, ...dtProps }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-table-mobile-card__dt",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
8
|
+
return (_jsx("dt", { className: componentClassName, ...dtProps, children: children }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import "@axa-fr/canopee-css/prospect/TableMobileCard/TableMobileCardAll.css";
|
|
3
|
+
export type TableMobileCardVariants = "white" | "blue" | "alternate";
|
|
4
|
+
export type TableMobileCardProps = ComponentPropsWithRef<"dl"> & {
|
|
5
|
+
variant?: TableMobileCardVariants;
|
|
6
|
+
};
|
|
7
|
+
export declare const TableMobileCard: {
|
|
8
|
+
({ className, children, variant, ...tableCardProps }: TableMobileCardProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
DRow: ({ className, children, direction, ...dRowProps }: import("./DRow").TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Dt: ({ className, children, ...dtProps }: import("./Dt").TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
Dd: ({ className, children, ...ddProps }: import("./Dd").TrProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/getClassName";
|
|
3
|
+
import { DRow } from "./DRow";
|
|
4
|
+
import { Dt } from "./Dt";
|
|
5
|
+
import { Dd } from "./Dd";
|
|
6
|
+
import "@axa-fr/canopee-css/prospect/TableMobileCard/TableMobileCardAll.css";
|
|
7
|
+
export const TableMobileCard = ({ className, children, variant = "alternate", ...tableCardProps }) => {
|
|
8
|
+
const componentClassName = getClassName({
|
|
9
|
+
baseClassName: "af-table-mobile-card",
|
|
10
|
+
className,
|
|
11
|
+
modifiers: [variant],
|
|
12
|
+
});
|
|
13
|
+
return (_jsx("dl", { className: componentClassName, ...tableCardProps, children: children }));
|
|
14
|
+
};
|
|
15
|
+
TableMobileCard.DRow = DRow;
|
|
16
|
+
TableMobileCard.Dt = Dt;
|
|
17
|
+
TableMobileCard.Dd = Dd;
|
package/dist/prospect.d.ts
CHANGED
|
@@ -63,3 +63,5 @@ export { TabBar, tabBarDirection, type TabBarDirection, type TabBarProps, } from
|
|
|
63
63
|
export { Tag, tagVariants, type TagVariants, } from "./prospect-client/Tag/TagApollo";
|
|
64
64
|
export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalApollo";
|
|
65
65
|
export { Toggle } from "./prospect-client/Toggle/ToggleApollo";
|
|
66
|
+
export { Table, type TableProps, type HeadColorVariants, type BodyColorVariants, type RowSizeVariants, } from "./prospect-client/Table/TableApollo";
|
|
67
|
+
export { TableMobileCard } from "./prospect-client/TableMobileCard/TableMobileCard";
|
package/dist/prospect.js
CHANGED
|
@@ -62,3 +62,5 @@ export { TabBar, tabBarDirection, } from "./prospect-client/TabBar/TabBarApollo"
|
|
|
62
62
|
export { Tag, tagVariants, } from "./prospect-client/Tag/TagApollo";
|
|
63
63
|
export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalApollo";
|
|
64
64
|
export { Toggle } from "./prospect-client/Toggle/ToggleApollo";
|
|
65
|
+
export { Table, } from "./prospect-client/Table/TableApollo";
|
|
66
|
+
export { TableMobileCard } from "./prospect-client/TableMobileCard/TableMobileCard";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/canopee-react",
|
|
3
|
-
"version": "1.3.1-alpha.
|
|
3
|
+
"version": "1.3.1-alpha.18",
|
|
4
4
|
"description": "Package React - Design System Canopée",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./distributeur": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@axa-fr/canopee-css": "1.3.1-alpha.
|
|
48
|
+
"@axa-fr/canopee-css": "1.3.1-alpha.18",
|
|
49
49
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
50
50
|
"@material-symbols/svg-700": ">= 0.19.0",
|
|
51
51
|
"react": ">= 18"
|