@axa-fr/design-system-look-and-feel-react 1.0.5-ci.59 → 1.0.5-ci.66
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/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +5 -9
- package/dist/Grid/components/Card.d.ts +0 -3
- package/dist/Grid/components/Card.js +0 -2
- package/dist/Grid/components/Contacts.d.ts +0 -1
- package/dist/Grid/components/Contacts.js +0 -9
- package/dist/Grid/components/MainTitle.d.ts +0 -1
- package/dist/Grid/components/MainTitle.js +0 -4
- package/dist/Grid/components/MyFooter.d.ts +0 -1
- package/dist/Grid/components/MyFooter.js +0 -31
- package/dist/Grid/components/MyHeader.d.ts +0 -1
- package/dist/Grid/components/MyHeader.js +0 -9
- package/dist/Grid/components/MyList.d.ts +0 -1
- package/dist/Grid/components/MyList.js +0 -3
- package/dist/Grid/components/Offsets.d.ts +0 -1
- package/dist/Grid/components/Offsets.js +0 -7
- package/dist/Grid/renderExampleForm.d.ts +0 -1
- package/dist/Grid/renderExampleForm.js +0 -73
- package/dist/Grid/renderExamplePage.d.ts +0 -1
- package/dist/Grid/renderExamplePage.js +0 -9
- package/dist/Grid/renderWireframe.d.ts +0 -1
- package/dist/Grid/renderWireframe.js +0 -5
package/dist/index.d.ts
CHANGED
@@ -18,6 +18,8 @@ export { DebugGrid } from "./Grid/DebugGrid";
|
|
18
18
|
export { IconBg } from "./IconBg";
|
19
19
|
export { Footer } from "./Layout/Footer/Footer";
|
20
20
|
export { Header } from "./Layout/Header";
|
21
|
+
export { NavBar } from "./Layout/Header/NavBar/NavBar";
|
22
|
+
export { PreviousLink } from "./Layout/Header/PreviousLink";
|
21
23
|
export { Link } from "./Link";
|
22
24
|
export { List } from "./List";
|
23
25
|
export { ClickItem, ClickList, createClickItemParent } from "./List/ClickList";
|
package/dist/index.js
CHANGED
@@ -17,6 +17,8 @@ export { DebugGrid } from "./Grid/DebugGrid";
|
|
17
17
|
export { IconBg } from "./IconBg";
|
18
18
|
export { Footer } from "./Layout/Footer/Footer";
|
19
19
|
export { Header } from "./Layout/Header";
|
20
|
+
export { NavBar } from "./Layout/Header/NavBar/NavBar";
|
21
|
+
export { PreviousLink } from "./Layout/Header/PreviousLink";
|
20
22
|
export { Link } from "./Link";
|
21
23
|
export { List } from "./List";
|
22
24
|
export { ClickItem, ClickList, createClickItemParent } from "./List/ClickList";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@axa-fr/design-system-look-and-feel-react",
|
3
|
-
"version": "1.0.5-ci.
|
3
|
+
"version": "1.0.5-ci.66",
|
4
4
|
"description": "",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"types": "./dist/index.d.ts",
|
@@ -21,18 +21,15 @@
|
|
21
21
|
"prebuild": "rimraf dist",
|
22
22
|
"build": "tsc -p tsconfig.build.json",
|
23
23
|
"postbuild": "copyfiles --up 1 \"src/assets/svg/*.svg\" ./dist/",
|
24
|
-
"
|
25
|
-
"build:storybook": "storybook build",
|
26
|
-
"build-storybook": "storybook build",
|
24
|
+
"dev": "tsc -p tsconfig.build.json --watch",
|
27
25
|
"eslint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
|
28
26
|
"eslint:fix": "eslint src --ext js,jsx,ts,tsx --fix",
|
29
27
|
"prettier": "prettier \"src/**/*.!(js|jsx|ts|tsx|svg)\" --check",
|
30
28
|
"prettier:fix": "prettier \"src/**/*.!(js|jsx|ts|tsx|svg)\" --write",
|
31
|
-
"
|
29
|
+
"check-types": "tsc --noEmit",
|
32
30
|
"test": "vitest",
|
33
31
|
"test:ui": "vitest --ui",
|
34
|
-
"test:ci": "vitest run --coverage"
|
35
|
-
"chromatic": "npx chromatic"
|
32
|
+
"test:ci": "vitest run --coverage"
|
36
33
|
},
|
37
34
|
"repository": {
|
38
35
|
"type": "git",
|
@@ -47,7 +44,7 @@
|
|
47
44
|
},
|
48
45
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
49
46
|
"peerDependencies": {
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.
|
47
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.66",
|
51
48
|
"@material-symbols/svg-400": ">= 0.19.0",
|
52
49
|
"react": ">= 18"
|
53
50
|
},
|
@@ -59,7 +56,6 @@
|
|
59
56
|
"dependencies": {
|
60
57
|
"@fontsource/source-sans-pro": "^5.0.8",
|
61
58
|
"@tanem/svg-injector": "^10.1.68",
|
62
|
-
"@types/react-dom": "^18.2.24",
|
63
59
|
"classnames": "^2.5.1",
|
64
60
|
"dompurify": "^3.1.5",
|
65
61
|
"rc-slider": "^11.1.7",
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
export const Card = ({ title }) => (_jsxs("div", { className: "box-card", children: [_jsx("h3", { children: title }), _jsx("p", { children: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Sint voluptatibus dolor ratione, ab natus reprehenderit itaque corporis officia ad necessitatibus enim et voluptatem reiciendis rem optio laudantium iure esse vero." })] }));
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const Contacts: () => import("react/jsx-runtime").JSX.Element[];
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import callIcon from "@material-symbols/svg-400/outlined/call-fill.svg";
|
3
|
-
import mailIcon from "@material-symbols/svg-400/outlined/mail-fill.svg";
|
4
|
-
import { List, Svg, ContentItemMono, ClickItem, createClickItemParent, } from "../..";
|
5
|
-
export const Contacts = () => [...Array(6).keys()].map((_, index) => (_jsxs(List, { classModifier: "first-separator-full-width", children: [_jsx(ContentItemMono, { secondaryText: "agent g\u00E9n\u00E9ral", tertiaryText: "Doe", children: "John Doe" }), index % 3 === 0 && (_jsx(ClickItem, { icon: _jsx(Svg, { src: callIcon, "aria-hidden": true }), classModifier: "small", parentClickComponent: createClickItemParent("a", {
|
6
|
-
href: `tel:0601010101`,
|
7
|
-
}), children: "06 01 01 01 01" })), _jsx(ClickItem, { icon: _jsx(Svg, { src: mailIcon, "aria-hidden": true }), classModifier: "small", parentClickComponent: createClickItemParent("a", {
|
8
|
-
href: `mailto:john.doe@axa.fr`,
|
9
|
-
}), children: "john.doe@axa.fr" })] }, "John Doe-agent")));
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const MainTitle: () => import("react/jsx-runtime").JSX.Element;
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import article from "@material-symbols/svg-400/outlined/article-fill.svg";
|
3
|
-
import { Svg, Title } from "../..";
|
4
|
-
export const MainTitle = () => (_jsx(Title, { icon: _jsx(Svg, { src: article, "aria-hidden": true }), firstSubtitle: "Sous Titre 1", secondSubtitle: "Sous Titre 2", children: "Titre de la page" }));
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const MyFooter: () => import("react/jsx-runtime").JSX.Element;
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { Footer } from "../../Layout/Footer";
|
3
|
-
export const MyFooter = () => (_jsx(Footer, { links: [
|
4
|
-
{
|
5
|
-
link: "https://www.axa.fr/qui-sommes-nous.html",
|
6
|
-
text: "À propos",
|
7
|
-
},
|
8
|
-
{
|
9
|
-
link: "https://www.axa.fr/configuration-securite/mentions-legales.html",
|
10
|
-
text: "Mentions légales",
|
11
|
-
},
|
12
|
-
{
|
13
|
-
link: "https://www.axa.fr/configuration-securite/donnees-personnelles.html",
|
14
|
-
text: "Données personnelles",
|
15
|
-
},
|
16
|
-
{
|
17
|
-
link: "https://www.axa.fr/configuration-securite/politique-cookies.html",
|
18
|
-
text: "Cookies",
|
19
|
-
},
|
20
|
-
], socialMedias: [
|
21
|
-
{ icon: "facebook", link: "https://www.facebook.com/axafrance" },
|
22
|
-
{ icon: "twitter", link: "https://twitter.com/AXAFrance" },
|
23
|
-
{
|
24
|
-
icon: "youtube",
|
25
|
-
link: "https://www.youtube.com/user/AXAFranceChaine",
|
26
|
-
},
|
27
|
-
{
|
28
|
-
icon: "linkedin",
|
29
|
-
link: "https://www.linkedin.com/company/axa-france/",
|
30
|
-
},
|
31
|
-
], copyright: `@AXA ${new Date().getFullYear()} - Tous droits réservés`, expandLinkText: "Liens utiles" }));
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const MyHeader: () => import("react/jsx-runtime").JSX.Element;
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import person from "@material-symbols/svg-400/outlined/person-fill.svg";
|
3
|
-
import lock from "@material-symbols/svg-400/outlined/lock-fill.svg";
|
4
|
-
import { Header } from "../../Layout/Header";
|
5
|
-
import { Button, ButtonVariants, Svg } from "../..";
|
6
|
-
export const MyHeader = () => (_jsxs(Header, { defaultActiveLink: 0, rightItem: [
|
7
|
-
_jsx(Button, { iconLeft: _jsx(Svg, { src: lock, fill: "#00008f" }), variant: ButtonVariants.secondary, children: "Espace Banque" }, "Banking Space Button"),
|
8
|
-
_jsx(Button, { iconLeft: _jsx(Svg, { src: person, fill: "#00008f" }), variant: ButtonVariants.ghost, children: "Mon Profil" }, "Profile Button"),
|
9
|
-
], children: [_jsx("a", { className: "af-navbar-item__link", href: "/mes-contrats", children: "MES CONTRATS" }, "MES CONTRATS link"), _jsx("a", { className: "af-navbar-item__link", href: "/mes-avantages", children: "MES AVANTAGES" }, "MES AVANTAGES link"), _jsx("a", { className: "af-navbar-item__link", href: "/mes-documents", children: "MES DOCUMENTS" }, "MES DOCUMENTS link")] }));
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const MyList: () => import("react/jsx-runtime").JSX.Element;
|
@@ -1,3 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { ContentItemDuo, List } from "../..";
|
3
|
-
export const MyList = () => (_jsx(List, { classModifier: "extra-padding", children: [...Array(6).keys()].map(() => (_jsx(ContentItemDuo, { isVertical: false, isShowingDoneIcon: true, isShowingCloseIcon: false, buttonText: "En savoir plus", classModifier: "large", label: "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quas, suscipit sint! Reiciendis, eos? Eveniet, aut qui. Autem reprehenderit", value: "R\u00E9ponse" }, crypto.randomUUID()))) }));
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const Offsets: () => import("react/jsx-runtime").JSX.Element[][];
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
const MAX_OFFSET = 12;
|
3
|
-
export const Offsets = () => [...Array(MAX_OFFSET).keys()].map((start) => {
|
4
|
-
const offset = start + 1;
|
5
|
-
const maxCols = MAX_OFFSET - offset + 1;
|
6
|
-
return [...Array(maxCols).keys()].map((col) => (_jsx("div", { className: `box box-offset box-offset-${offset}-${col + 1}` }, crypto.randomUUID())));
|
7
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const render: () => import("react/jsx-runtime").JSX.Element;
|
@@ -1,73 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
-
import home from "@material-symbols/svg-400/outlined/home.svg";
|
3
|
-
import { MyFooter } from "./components/MyFooter";
|
4
|
-
import { MyHeader } from "./components/MyHeader";
|
5
|
-
import { Button, ButtonVariants, CheckboxSelect, RadioSelect, Svg, TextInput, Title, } from "..";
|
6
|
-
import { DebugGrid } from "./DebugGrid";
|
7
|
-
function capitalizeFirstLetter(val) {
|
8
|
-
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
9
|
-
}
|
10
|
-
const setAttributesFields = (value, label, type = "text") => ({
|
11
|
-
value,
|
12
|
-
type,
|
13
|
-
name: label,
|
14
|
-
id: label,
|
15
|
-
disabled: false,
|
16
|
-
required: true,
|
17
|
-
label: `${capitalizeFirstLetter(label)} de la personne`,
|
18
|
-
placeholder: `Votre ${label}`,
|
19
|
-
description: `Saisissez un ${label}`,
|
20
|
-
error: `Un ${label} est obligatoire`,
|
21
|
-
className: "subgrid",
|
22
|
-
helper: "Do you need help ?",
|
23
|
-
buttonLabel: "En savoir plus",
|
24
|
-
});
|
25
|
-
const FIELDS = [
|
26
|
-
setAttributesFields("Gomez", "nom"),
|
27
|
-
setAttributesFields("Samuel", "prénom"),
|
28
|
-
setAttributesFields("samuel.gomez@axa.fr", "email", "email"),
|
29
|
-
setAttributesFields("0601020304", "téléphone"),
|
30
|
-
];
|
31
|
-
export const render = () => (_jsxs(_Fragment, { children: [_jsx(DebugGrid, { isCheckedByDefault: true }), _jsx(MyHeader, {}), _jsx("main", { className: "grid example-form", children: _jsxs("form", { className: "form", children: [_jsxs("div", { className: "form__header subgrid", children: [_jsx(Title, { children: "Mon formulaire" }), _jsx("p", { children: "Les mentions avec * sont obligatoires" })] }), _jsxs("div", { className: "form__fields subgrid", children: [_jsx(RadioSelect, { className: "subgrid", label: "Genre", type: "horizontal", options: [
|
32
|
-
{ label: "Homme", value: "H", icon: _jsx(Svg, { src: home }) },
|
33
|
-
{ label: "Femme", value: "F", icon: _jsx(Svg, { src: home }) },
|
34
|
-
{ label: "Les deux", value: "HF", icon: _jsx(Svg, { src: home }) },
|
35
|
-
{
|
36
|
-
label: "Ne se prononce pas",
|
37
|
-
value: "N",
|
38
|
-
icon: _jsx(Svg, { src: home }),
|
39
|
-
},
|
40
|
-
], name: "radio-name" }), _jsx(CheckboxSelect, { className: "subgrid", type: "horizontal", labelGroup: "Titre", options: [
|
41
|
-
{
|
42
|
-
label: "Développeur",
|
43
|
-
value: "H",
|
44
|
-
name: "Développeur",
|
45
|
-
icon: _jsx(Svg, { src: home }),
|
46
|
-
},
|
47
|
-
{ label: "BA", value: "F", name: "BA", icon: _jsx(Svg, { src: home }) },
|
48
|
-
{
|
49
|
-
label: "EM",
|
50
|
-
value: "HF",
|
51
|
-
name: "EM",
|
52
|
-
icon: _jsx(Svg, { src: home }),
|
53
|
-
},
|
54
|
-
{ label: "PO", value: "A", name: "PO", icon: _jsx(Svg, { src: home }) },
|
55
|
-
{
|
56
|
-
label: "DBA",
|
57
|
-
value: "Au",
|
58
|
-
name: "DBA",
|
59
|
-
icon: _jsx(Svg, { src: home }),
|
60
|
-
},
|
61
|
-
{
|
62
|
-
label: "Scrum Master",
|
63
|
-
value: "P",
|
64
|
-
name: "Scrum Master",
|
65
|
-
icon: _jsx(Svg, { src: home }),
|
66
|
-
},
|
67
|
-
{
|
68
|
-
label: "Ne se prononce pas",
|
69
|
-
value: "N",
|
70
|
-
name: "Ne se prononce pas",
|
71
|
-
icon: _jsx(Svg, { src: home }),
|
72
|
-
},
|
73
|
-
] }), FIELDS.map((field) => (_jsx(TextInput, { ...field, classModifier: field.error ? "error" : "" }, field.id)))] }), _jsxs("div", { className: "form__actions subgrid", children: [_jsx(Button, { variant: ButtonVariants.secondary, children: "Pr\u00E9c\u00E9dent" }), _jsx(Button, { variant: ButtonVariants.primary, children: "Valider" })] })] }) }), _jsx(MyFooter, {})] }));
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const render: () => import("react/jsx-runtime").JSX.Element;
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
-
import { Title, TitleSize } from "../Title";
|
3
|
-
import { Contacts } from "./components/Contacts";
|
4
|
-
import { MainTitle } from "./components/MainTitle";
|
5
|
-
import { MyFooter } from "./components/MyFooter";
|
6
|
-
import { MyHeader } from "./components/MyHeader";
|
7
|
-
import { MyList } from "./components/MyList";
|
8
|
-
import { DebugGrid } from "./DebugGrid";
|
9
|
-
export const render = () => (_jsxs(_Fragment, { children: [_jsx(DebugGrid, { isCheckedByDefault: true }), _jsx(MyHeader, {}), _jsxs("main", { className: "grid example-page", children: [_jsx(MainTitle, {}), _jsxs("div", { className: "container-part", children: [_jsxs("div", { className: "subgrid af-left-part", children: [_jsx(Title, { size: TitleSize.L, children: "My list title" }), _jsxs("div", { className: "subgrid af-list-part", children: [_jsx(MyList, {}), _jsx(MyList, {})] })] }), _jsxs("div", { className: "subgrid af-right-part", children: [_jsx(Title, { size: TitleSize.L, children: "Contacts" }), _jsx("div", { className: "af-contacts-part subgrid", children: _jsx(Contacts, {}) })] })] })] }), _jsx(MyFooter, {})] }));
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const render: () => import("react/jsx-runtime").JSX.Element;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
-
import { DebugGrid } from "./DebugGrid";
|
3
|
-
import { Card } from "./components/Card";
|
4
|
-
import { Offsets } from "./components/Offsets";
|
5
|
-
export const render = () => (_jsxs(_Fragment, { children: [_jsx(DebugGrid, { isCheckedByDefault: true }), _jsxs("main", { className: "grid", children: [_jsx("h1", { className: "box", children: "Bonjour, Samuel G." }), _jsxs("div", { className: "box box-example-1 subgrid", children: [_jsx("h2", { className: "box", children: "Mes contrats" }), [...Array(6).keys()].map((_, index) => (_jsx(Card, { title: `contrat-${index + 1}` }, crypto.randomUUID())))] }), _jsxs("div", { className: "box box-example-2 subgrid", children: [_jsx("h2", { className: "box", children: "Profil" }), _jsx(Card, { title: "Mes coordonn\u00E9es" })] }), _jsxs("div", { className: "box box-example-3 subgrid", children: [_jsx("h2", { className: "box", children: "Mes Infos" }), _jsx("div", { className: "box box-half" }), _jsx("div", { className: "box box-half" }), _jsx("div", { className: "box box-half" }), _jsx("div", { className: "box box-half" })] }), _jsxs("div", { className: "box box-custom", children: [_jsx("h2", { className: "box", children: "Custom" }), _jsx("div", { className: "box box-content1", children: "Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quos, dolore. Ipsum commodi molestiae aut consectetur corrupti sed quos iste, nemo porro dicta necessitatibus aliquam! Ratione magni quae necessitatibus similique eos! Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quos, dolore. Ipsum commodi molestiae aut consectetur corrupti sed quos iste, nemo porro dicta necessitatibus aliquam! Ratione magni quae necessitatibus similique eos!" }), _jsx("div", { className: "box box-content2", children: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem nam, aliquid itaque magni sint natus earum praesentium minima. Laborum enim error animi similique delectus vel. Ipsa deleniti ut ipsam quis. Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem nam, aliquid itaque magni sint natus earum praesentium minima. Laborum enim error animi similique delectus vel. Ipsa deleniti ut ipsam quis. Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem nam, aliquid itaque magni sint natus earum praesentium minima. Laborum enim error animi similique delectus vel. Ipsa deleniti ut ipsam quis." }), _jsx("footer", { children: "@copyright" })] }), _jsx(Offsets, {})] })] }));
|