@axa-fr/design-system-slash-react 0.2.0-beta.316 → 0.2.0-beta.317
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/Restitution/ArticleRestitution.d.ts +6 -0
- package/dist/Restitution/ArticleRestitution.js +6 -0
- package/dist/Restitution/HeaderRestitution.d.ts +9 -0
- package/dist/Restitution/HeaderRestitution.js +6 -0
- package/dist/Restitution/Restitution.d.ts +7 -0
- package/dist/Restitution/Restitution.js +7 -0
- package/dist/Restitution/Restitution.stories.d.ts +4 -0
- package/dist/Restitution/Restitution.stories.js +44 -0
- package/dist/Restitution/RestitutionList.d.ts +6 -0
- package/dist/Restitution/RestitutionList.js +4 -0
- package/dist/Restitution/SectionRestitution.d.ts +6 -0
- package/dist/Restitution/SectionRestitution.js +6 -0
- package/dist/Restitution/SectionRestitutionColumn.d.ts +7 -0
- package/dist/Restitution/SectionRestitutionColumn.js +7 -0
- package/dist/Restitution/SectionRestitutionRow.d.ts +8 -0
- package/dist/Restitution/SectionRestitutionRow.js +8 -0
- package/dist/Restitution/SectionRestitutionTitle.d.ts +6 -0
- package/dist/Restitution/SectionRestitutionTitle.js +6 -0
- package/dist/Restitution/index.d.ts +8 -0
- package/dist/Restitution/index.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, PropsWithChildren } from "react";
|
|
2
|
+
type ArticleRestitutionProps = ComponentPropsWithoutRef<"article"> & {
|
|
3
|
+
classModifier?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const ArticleRestitution: ({ children, className, classModifier, ...otherProps }: PropsWithChildren<ArticleRestitutionProps>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getComponentClassName } from "../utilities";
|
|
3
|
+
export const ArticleRestitution = ({ children, className, classModifier, ...otherProps }) => {
|
|
4
|
+
const componentClassName = getComponentClassName(className, classModifier, "af-restitution");
|
|
5
|
+
return (_jsx("article", { className: componentClassName, ...otherProps, children: children }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type HeaderRestitutionProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
subtitle?: React.ReactNode;
|
|
6
|
+
rightTitle?: React.ReactNode;
|
|
7
|
+
classModifier?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const HeaderRestitution: ({ title, subtitle, rightTitle, className, classModifier, }: HeaderRestitutionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getComponentClassName } from "../utilities";
|
|
3
|
+
export const HeaderRestitution = ({ title, subtitle, rightTitle, className, classModifier, }) => {
|
|
4
|
+
const componentClassName = getComponentClassName(className, classModifier, "af-restitution__header");
|
|
5
|
+
return (_jsxs("header", { className: componentClassName, children: [_jsx("div", { className: "af-restitution__header-left", children: _jsxs("div", { className: "af-restitution__title", children: [_jsx("span", { className: "af-restitution__title-main", children: title }), subtitle ? (_jsx("span", { className: "af-restitution__title-subtitle", children: subtitle })) : null] }) }), rightTitle ? (_jsx("div", { className: "af-restitution__header-right", children: _jsx("span", { className: "af-restitution__title", children: rightTitle }) })) : null] }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "@axa-fr/design-system-slash-css/dist/Restitution/Restitution.scss";
|
|
2
|
+
import { ComponentPropsWithoutRef, PropsWithChildren } from "react";
|
|
3
|
+
export type RestitutionProps = ComponentPropsWithoutRef<"dl"> & {
|
|
4
|
+
label: string;
|
|
5
|
+
classModifier?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const Restitution: ({ label, children, className, classModifier, }: PropsWithChildren<RestitutionProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/design-system-slash-css/dist/Restitution/Restitution.scss";
|
|
3
|
+
import { getComponentClassName } from "../utilities";
|
|
4
|
+
export const Restitution = ({ label, children = "-", className, classModifier, }) => {
|
|
5
|
+
const componentClassName = getComponentClassName(className, classModifier, "af-restitution__listdef");
|
|
6
|
+
return (_jsxs("dl", { className: componentClassName, children: [_jsx("dt", { className: "af-restitution__listdef-item", children: _jsx("span", { className: "af-restitution__text", children: label }) }), _jsx("dd", { className: "af-restitution__listdef-value", children: children })] }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ArticleRestitution } from "./ArticleRestitution";
|
|
3
|
+
import { HeaderRestitution } from "./HeaderRestitution";
|
|
4
|
+
import { Restitution } from "./Restitution";
|
|
5
|
+
import { RestitutionList } from "./RestitutionList";
|
|
6
|
+
import { SectionRestitution } from "./SectionRestitution";
|
|
7
|
+
import { SectionRestitutionColumn } from "./SectionRestitutionColumn";
|
|
8
|
+
import { SectionRestitutionRow } from "./SectionRestitutionRow";
|
|
9
|
+
const meta = {
|
|
10
|
+
title: "Components/Restitution",
|
|
11
|
+
component: Restitution,
|
|
12
|
+
args: {
|
|
13
|
+
classModifier: "",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
export const Default = {
|
|
18
|
+
name: "Restitution",
|
|
19
|
+
render: ({ ...args }) => (_jsxs(ArticleRestitution, { ...args, children: [_jsx(HeaderRestitution, { title: "Tarifs", subtitle: "Tout adh\u00E9rent, assur\u00E9, base (sans EAC ou sans PAC)", rightTitle: _jsxs("a", { className: "af-link af-link--hasIconLeft", href: "/#", children: [_jsx("i", { className: "glyphicon glyphicon-pencil" }), _jsx("span", { className: "af-link__text", children: "Modifier" })] }) }), _jsxs(SectionRestitution, { children: [_jsxs(SectionRestitutionRow, { title: "Base de calcul des prestations", children: [_jsxs(SectionRestitutionColumn, { children: [_jsx(Restitution, { label: "TA", children: "99,99 %" }), _jsx(Restitution, { label: "EURO", children: "EURO" }), _jsx(Restitution, { label: "TT" }), _jsx(Restitution, { label: "Garanties compl\u00E9mentaires", classModifier: "marge", children: _jsx(RestitutionList, { values: [
|
|
20
|
+
"Vol au domicile",
|
|
21
|
+
"Vol étendu aux appareils nomades",
|
|
22
|
+
"Bris de glace",
|
|
23
|
+
"Plomberie et électricité",
|
|
24
|
+
"Jardin",
|
|
25
|
+
] }) })] }), _jsxs(SectionRestitutionColumn, { classModifier: "test", children: [_jsx(Restitution, { label: "TA", children: "99,99 %" }), _jsx(Restitution, { label: "EURO", children: "EURO" }), _jsx(Restitution, { label: "TT" }), _jsx(Restitution, { label: "Garanties compl\u00E9mentaires", classModifier: "marge", children: _jsx(RestitutionList, { values: [
|
|
26
|
+
"Vol au domicile",
|
|
27
|
+
"Vol étendu aux appareils nomades",
|
|
28
|
+
"Bris de glace",
|
|
29
|
+
"Plomberie et électricité",
|
|
30
|
+
"Jardin",
|
|
31
|
+
] }) })] })] }), _jsxs(SectionRestitutionRow, { title: "Base de calcul des prestations", children: [_jsxs(SectionRestitutionColumn, { children: [_jsx(Restitution, { label: "TA", children: "99,99 %" }), _jsx(Restitution, { label: "EURO", children: "EURO" }), _jsx(Restitution, { label: "TT" }), _jsx(Restitution, { label: "Garanties compl\u00E9mentaires", classModifier: "marge", children: _jsx(RestitutionList, { values: [
|
|
32
|
+
"Vol au domicile",
|
|
33
|
+
"Vol étendu aux appareils nomades",
|
|
34
|
+
"Bris de glace",
|
|
35
|
+
"Plomberie et électricité",
|
|
36
|
+
"Jardin",
|
|
37
|
+
] }) })] }), _jsxs(SectionRestitutionColumn, { children: [_jsx(Restitution, { label: "TA", children: "99,99 %" }), _jsx(Restitution, { label: "EURO", children: _jsx("span", { style: { textDecoration: "underline" }, children: "EURO" }) }), _jsx(Restitution, { label: "Garanties compl\u00E9mentaires", classModifier: "marge", children: _jsx(RestitutionList, { values: [
|
|
38
|
+
"Vol au domicile",
|
|
39
|
+
"Vol étendu aux appareils nomades",
|
|
40
|
+
"Bris de glace",
|
|
41
|
+
"Plomberie et électricité",
|
|
42
|
+
"Jardin",
|
|
43
|
+
] }) })] })] }), _jsxs(SectionRestitutionRow, { children: [_jsxs(SectionRestitutionColumn, { title: "Base de calcul des prestations", children: [_jsx(Restitution, { label: "TA", children: "99,99 %" }), _jsx(Restitution, { label: "EURO", children: "EURO" })] }), _jsxs(SectionRestitutionColumn, { title: "Base de calcul des prestations", children: [_jsx(Restitution, { label: "TA", children: "99,99 %" }), _jsx(Restitution, { label: "EURO", children: _jsx("span", { style: { textDecoration: "underline" }, children: "EURO" }) })] })] })] })] })),
|
|
44
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
type RestitutionListProps = ComponentPropsWithoutRef<"ul"> & {
|
|
3
|
+
values: string[];
|
|
4
|
+
};
|
|
5
|
+
export declare const RestitutionList: ({ values, ...props }: RestitutionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const RestitutionList = ({ values, ...props }) => {
|
|
3
|
+
return (_jsx("ul", { className: "af-restitution__listul", ...props, children: values.map((value) => (_jsx("li", { className: "af-restitution__listul-item", children: value }, value))) }));
|
|
4
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
export type SectionRestitutionProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
classModifier?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const SectionRestitution: ({ children, className, classModifier, }: PropsWithChildren<SectionRestitutionProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getComponentClassName } from "../utilities";
|
|
3
|
+
export const SectionRestitution = ({ children, className, classModifier, }) => {
|
|
4
|
+
const componentClassName = getComponentClassName(className, classModifier, "af-restitution__content");
|
|
5
|
+
return _jsx("section", { className: componentClassName, children: children });
|
|
6
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
export type SectionRestitutionColumnProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
classModifier?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const SectionRestitutionColumn: ({ children, className, title, classModifier, }: PropsWithChildren<SectionRestitutionColumnProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getComponentClassName } from "../utilities";
|
|
3
|
+
import { SectionRestitutionTitle } from "./SectionRestitutionTitle";
|
|
4
|
+
export const SectionRestitutionColumn = ({ children, className, title, classModifier, }) => {
|
|
5
|
+
const componentClassName = getComponentClassName(className, classModifier, "col-sm-12 col-md-12 col-lg-6 col-xl-6");
|
|
6
|
+
return (_jsxs("div", { className: componentClassName, children: [title ? _jsx(SectionRestitutionTitle, { title: title }) : null, children] }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
export type SectionRestitutionRowProps = {
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
classNameContainer?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
classModifier?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const SectionRestitutionRow: ({ title, className, classNameContainer, children, classModifier, }: PropsWithChildren<SectionRestitutionRowProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getComponentClassName } from "../utilities";
|
|
3
|
+
import { SectionRestitutionTitle } from "./SectionRestitutionTitle";
|
|
4
|
+
const DEFAULT_CLASSNAME = "col col-sm-12 col-md-12 col-lg-12 col-xl-12";
|
|
5
|
+
export const SectionRestitutionRow = ({ title, className = DEFAULT_CLASSNAME, classNameContainer = "row af-restitution__content-left", children, classModifier, }) => {
|
|
6
|
+
const componentClassName = getComponentClassName(className, classModifier, DEFAULT_CLASSNAME);
|
|
7
|
+
return (_jsxs("div", { className: componentClassName, children: [title ? _jsx(SectionRestitutionTitle, { title: title }) : null, _jsx("div", { className: classNameContainer, children: children })] }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type SectionRestitutionTitleProps = {
|
|
2
|
+
title: React.ReactNode;
|
|
3
|
+
className?: string;
|
|
4
|
+
classModifier?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const SectionRestitutionTitle: ({ title, className, classModifier, }: SectionRestitutionTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getComponentClassName } from "../utilities";
|
|
3
|
+
export const SectionRestitutionTitle = ({ title, className, classModifier, }) => {
|
|
4
|
+
const componentClassName = getComponentClassName(className, classModifier, "af-restitution__content-title");
|
|
5
|
+
return _jsx("div", { className: componentClassName, children: title });
|
|
6
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ArticleRestitution } from "./ArticleRestitution";
|
|
2
|
+
export { HeaderRestitution } from "./HeaderRestitution";
|
|
3
|
+
export { SectionRestitution } from "./SectionRestitution";
|
|
4
|
+
export { SectionRestitutionTitle } from "./SectionRestitutionTitle";
|
|
5
|
+
export { SectionRestitutionRow } from "./SectionRestitutionRow";
|
|
6
|
+
export { SectionRestitutionColumn } from "./SectionRestitutionColumn";
|
|
7
|
+
export { Restitution } from "./Restitution";
|
|
8
|
+
export { RestitutionList } from "./RestitutionList";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ArticleRestitution } from "./ArticleRestitution";
|
|
2
|
+
export { HeaderRestitution } from "./HeaderRestitution";
|
|
3
|
+
export { SectionRestitution } from "./SectionRestitution";
|
|
4
|
+
export { SectionRestitutionTitle } from "./SectionRestitutionTitle";
|
|
5
|
+
export { SectionRestitutionRow } from "./SectionRestitutionRow";
|
|
6
|
+
export { SectionRestitutionColumn } from "./SectionRestitutionColumn";
|
|
7
|
+
export { Restitution } from "./Restitution";
|
|
8
|
+
export { RestitutionList } from "./RestitutionList";
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { Badge } from "./Badge/Badge";
|
|
|
6
6
|
export { Button } from "./Button/Button";
|
|
7
7
|
export { Checkbox, CheckboxInput, CheckboxItem, CheckboxModes, } from "./Form/Checkbox";
|
|
8
8
|
export { Choice, ChoiceInput } from "./Form/Choice";
|
|
9
|
+
export { ArticleRestitution, HeaderRestitution, Restitution, RestitutionList, SectionRestitution, SectionRestitutionColumn, SectionRestitutionRow, SectionRestitutionTitle, } from "./Restitution";
|
|
9
10
|
export { Field, FieldError, FieldForm, FieldInput, FormClassManager, HelpMessage, InputList, MessageTypes, } from "./Form/core";
|
|
10
11
|
export { Date, DateInput } from "./Form/Date";
|
|
11
12
|
export { MultiSelect, MultiSelectInput } from "./Form/MultiSelect";
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { Badge } from "./Badge/Badge";
|
|
|
6
6
|
export { Button } from "./Button/Button";
|
|
7
7
|
export { Checkbox, CheckboxInput, CheckboxItem, CheckboxModes, } from "./Form/Checkbox";
|
|
8
8
|
export { Choice, ChoiceInput } from "./Form/Choice";
|
|
9
|
+
export { ArticleRestitution, HeaderRestitution, Restitution, RestitutionList, SectionRestitution, SectionRestitutionColumn, SectionRestitutionRow, SectionRestitutionTitle, } from "./Restitution";
|
|
9
10
|
export { Field, FieldError, FieldForm, FieldInput, FormClassManager, HelpMessage, InputList, MessageTypes, } from "./Form/core";
|
|
10
11
|
export { Date, DateInput } from "./Form/Date";
|
|
11
12
|
export { MultiSelect, MultiSelectInput } from "./Form/MultiSelect";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-slash-react",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.317",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@axa-fr/design-system-slash-css": "0.2.0-beta.
|
|
44
|
+
"@axa-fr/design-system-slash-css": "0.2.0-beta.317",
|
|
45
45
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
46
46
|
"react": ">= 18"
|
|
47
47
|
},
|