allaw-ui 1.0.135 → 1.0.136
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/components/atoms/tags/OtherStatusTag.css +20 -1
- package/dist/components/atoms/tags/OtherStatusTag.d.ts +1 -0
- package/dist/components/atoms/tags/OtherStatusTag.js +2 -2
- package/dist/components/atoms/tags/OtherStatusTag.stories.d.ts +13 -0
- package/dist/components/atoms/tags/OtherStatusTag.stories.js +9 -0
- package/dist/components/molecules/blogCard/BlogCard.d.ts +7 -7
- package/dist/components/molecules/blogCard/BlogCard.js +12 -12
- package/dist/components/molecules/blogCard/BlogCard.module.css +6 -2
- package/dist/components/molecules/blogCard/{BlodCard.stories.d.ts → BlogCard.stories.d.ts} +1 -1
- package/dist/components/molecules/blogCard/BlogCard.stories.js +33 -0
- package/dist/components/molecules/blogHeader/BlogHeader.d.ts +7 -7
- package/dist/components/molecules/blogHeader/BlogHeader.js +8 -8
- package/dist/components/molecules/blogHeader/BlogHeader.module.css +4 -2
- package/dist/components/molecules/blogHeader/BlogHeader.stories.d.ts +7 -6
- package/dist/components/molecules/blogHeader/BlogHeader.stories.js +30 -24
- package/dist/components/molecules/blogText/BlogText.d.ts +3 -3
- package/dist/components/molecules/blogText/BlogText.js +3 -3
- package/dist/components/molecules/blogText/BlogText.module.css +6 -1
- package/dist/components/molecules/blogText/BlogText.stories.d.ts +3 -2
- package/dist/components/molecules/blogText/BlogText.stories.js +8 -8
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.d.ts +4 -4
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.js +4 -4
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.module.css +11 -6
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.stories.d.ts +4 -3
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.stories.js +12 -12
- package/dist/components/molecules/documentCard/DocumentCard.d.ts +1 -1
- package/dist/components/molecules/documentCard/DocumentCard.js +36 -3
- package/dist/components/molecules/documentCard/DocumentCard.stories.js +12 -1
- package/dist/styles/colors.css +2 -0
- package/package.json +1 -1
- package/dist/components/molecules/blogCard/BlodCard.stories.js +0 -33
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
gap: 4px;
|
|
59
59
|
flex-shrink: 0;
|
|
60
60
|
border-radius: 8px;
|
|
61
|
-
border: 1px solid var(--tag-blue, #1985e8);
|
|
62
61
|
color: var(--tag-blue, #1985e8);
|
|
63
62
|
text-align: center;
|
|
64
63
|
font-family: "Open Sans";
|
|
@@ -69,6 +68,26 @@
|
|
|
69
68
|
letter-spacing: 0.12px;
|
|
70
69
|
}
|
|
71
70
|
|
|
71
|
+
.other-status-tag.information.information-color-blue {
|
|
72
|
+
border: 1px solid var(--tag-blue, #1985e8);
|
|
73
|
+
color: var(--tag-blue, #1985e8);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.other-status-tag.information.information-color-green {
|
|
77
|
+
border: 1px solid var(--green-tag-dark, #29a36a);
|
|
78
|
+
color: var(--green-tag-dark, #29a36a);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.other-status-tag.information.information-color-red {
|
|
82
|
+
border: 1px solid var(--red-tag-dark, #e15151);
|
|
83
|
+
color: var(--red-tag-dark, #e15151);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.other-status-tag.information.information-color-orange {
|
|
87
|
+
border: 1px solid var(--orange-tag-dark, #ff9f43);
|
|
88
|
+
color: var(--orange-tag-dark, #ff9f43);
|
|
89
|
+
}
|
|
90
|
+
|
|
72
91
|
.other-status-tag.information .icon {
|
|
73
92
|
display: flex;
|
|
74
93
|
width: 16px;
|
|
@@ -7,6 +7,7 @@ export interface OtherStatusTagProps {
|
|
|
7
7
|
startIconName?: string;
|
|
8
8
|
labelLimit?: number;
|
|
9
9
|
style?: "normal" | "compact";
|
|
10
|
+
informationColor?: "blue" | "green" | "red" | "orange";
|
|
10
11
|
}
|
|
11
12
|
declare const OtherStatusTag: React.FC<OtherStatusTagProps>;
|
|
12
13
|
export default OtherStatusTag;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./OtherStatusTag.css";
|
|
3
3
|
var OtherStatusTag = function (_a) {
|
|
4
|
-
var _b = _a.label, label = _b === void 0 ? "Tags" : _b, _c = _a.type, type = _c === void 0 ? "readonly" : _c, _d = _a.startIcon, startIcon = _d === void 0 ? false : _d, _e = _a.startIconName, startIconName = _e === void 0 ? "allaw-icon-pmr" : _e, labelLimit = _a.labelLimit, _f = _a.style, style = _f === void 0 ? "normal" : _f;
|
|
4
|
+
var _b = _a.label, label = _b === void 0 ? "Tags" : _b, _c = _a.type, type = _c === void 0 ? "readonly" : _c, _d = _a.startIcon, startIcon = _d === void 0 ? false : _d, _e = _a.startIconName, startIconName = _e === void 0 ? "allaw-icon-pmr" : _e, labelLimit = _a.labelLimit, _f = _a.style, style = _f === void 0 ? "normal" : _f, _g = _a.informationColor, informationColor = _g === void 0 ? "blue" : _g;
|
|
5
5
|
var truncateText = function (text, limit) {
|
|
6
6
|
if (!limit || text.length <= limit)
|
|
7
7
|
return text;
|
|
8
8
|
return "".concat(text.slice(0, limit), "...");
|
|
9
9
|
};
|
|
10
|
-
return (React.createElement("div", { className: "other-status-tag ".concat(type, " ").concat(style) },
|
|
10
|
+
return (React.createElement("div", { className: "other-status-tag ".concat(type, " ").concat(style, " ").concat(type === "information" ? "information-color-".concat(informationColor) : "") },
|
|
11
11
|
type === "information" && startIcon && (React.createElement("span", { className: "icon ".concat(startIconName) })),
|
|
12
12
|
React.createElement("span", { className: "other-status-tag-label", title: label }, truncateText(label, labelLimit)),
|
|
13
13
|
type === "editable" && React.createElement("span", { className: "icon allaw-icon-close" })));
|
|
@@ -59,6 +59,19 @@ declare namespace _default {
|
|
|
59
59
|
export { description_5 as description };
|
|
60
60
|
export let defaultValue: string;
|
|
61
61
|
}
|
|
62
|
+
export namespace informationColor {
|
|
63
|
+
export namespace control_6 {
|
|
64
|
+
let type_7: string;
|
|
65
|
+
export { type_7 as type };
|
|
66
|
+
let options_2: string[];
|
|
67
|
+
export { options_2 as options };
|
|
68
|
+
}
|
|
69
|
+
export { control_6 as control };
|
|
70
|
+
let description_6: string;
|
|
71
|
+
export { description_6 as description };
|
|
72
|
+
let defaultValue_1: string;
|
|
73
|
+
export { defaultValue_1 as defaultValue };
|
|
74
|
+
}
|
|
62
75
|
}
|
|
63
76
|
export namespace parameters {
|
|
64
77
|
namespace backgrounds {
|
|
@@ -56,6 +56,14 @@ export default {
|
|
|
56
56
|
description: "Style du tag (normal ou compact)",
|
|
57
57
|
defaultValue: "normal",
|
|
58
58
|
},
|
|
59
|
+
informationColor: {
|
|
60
|
+
control: {
|
|
61
|
+
type: "select",
|
|
62
|
+
options: ["blue", "green", "red", "orange"],
|
|
63
|
+
},
|
|
64
|
+
description: "Couleur du tag d'information",
|
|
65
|
+
defaultValue: "blue",
|
|
66
|
+
},
|
|
59
67
|
},
|
|
60
68
|
parameters: {
|
|
61
69
|
backgrounds: {
|
|
@@ -90,6 +98,7 @@ Information.args = {
|
|
|
90
98
|
type: "information",
|
|
91
99
|
startIcon: true,
|
|
92
100
|
startIconName: "allaw-icon-pmr",
|
|
101
|
+
informationColor: "blue",
|
|
93
102
|
};
|
|
94
103
|
export var LongLabel = Template.bind({});
|
|
95
104
|
LongLabel.args = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export type BlogCardProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
articleUrl: string;
|
|
4
|
+
imageUrl: string;
|
|
5
|
+
tags: string[];
|
|
6
|
+
date: Date;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
preview?: boolean;
|
|
10
10
|
onClick?: () => void;
|
|
11
11
|
};
|
|
12
12
|
declare const BlogCard: React.FC<BlogCardProps>;
|
|
@@ -5,30 +5,30 @@ import OtherStatusTag from "../../atoms/tags/OtherStatusTag";
|
|
|
5
5
|
import TinyInfo from "../../atoms/typography/TinyInfo";
|
|
6
6
|
import Image from "next/image";
|
|
7
7
|
var BlogTopSection = function (_a) {
|
|
8
|
-
var
|
|
9
|
-
return (React.createElement("div", { className: "".concat(styles.blogTopSection, " ").concat(!
|
|
8
|
+
var imageUrl = _a.imageUrl, title = _a.title;
|
|
9
|
+
return (React.createElement("div", { className: "".concat(styles.blogTopSection, " ").concat(!imageUrl ? styles.placeholder : "") }, imageUrl ? (React.createElement(Image, { className: styles.blogImage, src: imageUrl, alt: title || "Image de l’article de blog", width: 361, height: 230, objectFit: "cover" })) : (React.createElement("span", { className: styles.placeholderText }))));
|
|
10
10
|
};
|
|
11
11
|
var BlogBottomSection = function (_a) {
|
|
12
|
-
var
|
|
12
|
+
var tags = _a.tags, date = _a.date, title = _a.title, description = _a.description;
|
|
13
13
|
return (React.createElement("div", { className: styles.blogBottomSection },
|
|
14
14
|
React.createElement("div", { className: styles.blogBottomSectionUp },
|
|
15
|
-
React.createElement("div", { className: styles.tagsContainer },
|
|
15
|
+
React.createElement("div", { className: styles.tagsContainer }, tags.slice(0, 2).map(function (tag, index) {
|
|
16
16
|
var validatedTag = tag.trim().length > 12 ? "".concat(tag.slice(0, 12), "...") : tag;
|
|
17
17
|
return React.createElement(OtherStatusTag, { key: index, label: validatedTag });
|
|
18
18
|
})),
|
|
19
|
-
React.createElement(TinyInfo, { text:
|
|
19
|
+
React.createElement(TinyInfo, { text: date.toLocaleDateString(), variant: "medium14", color: "mid-grey" })),
|
|
20
20
|
React.createElement("div", { className: styles.blogSplitSection }),
|
|
21
21
|
React.createElement("div", { className: styles.blogBottomSectionDown },
|
|
22
|
-
React.createElement("div", { className: styles.blogTitle },
|
|
22
|
+
React.createElement("div", { className: styles.blogTitle }, title),
|
|
23
23
|
React.createElement("div", { className: styles.blogDescription },
|
|
24
|
-
React.createElement(TinyInfo, { variant: "medium14", text:
|
|
24
|
+
React.createElement(TinyInfo, { variant: "medium14", text: description, color: "noir", align: "left" })))));
|
|
25
25
|
};
|
|
26
26
|
var BlogCard = function (_a) {
|
|
27
|
-
var
|
|
27
|
+
var articleUrl = _a.articleUrl, imageUrl = _a.imageUrl, tags = _a.tags, date = _a.date, title = _a.title, description = _a.description, _b = _a.preview, preview = _b === void 0 ? false : _b, onClick = _a.onClick;
|
|
28
28
|
return (React.createElement(React.Fragment, null, onClick ? (React.createElement("button", { className: styles.blogContainer, onClick: function () { return onClick && onClick(); } },
|
|
29
|
-
!
|
|
30
|
-
React.createElement(BlogBottomSection, {
|
|
31
|
-
!
|
|
32
|
-
React.createElement(BlogBottomSection, {
|
|
29
|
+
!preview && React.createElement(BlogTopSection, { imageUrl: imageUrl, title: title }),
|
|
30
|
+
React.createElement(BlogBottomSection, { tags: tags, date: date, title: title, description: description }))) : (React.createElement(Link, { href: articleUrl, className: styles.blogContainer },
|
|
31
|
+
!preview && React.createElement(BlogTopSection, { imageUrl: imageUrl, title: title }),
|
|
32
|
+
React.createElement(BlogBottomSection, { tags: tags, date: date, title: title, description: description })))));
|
|
33
33
|
};
|
|
34
34
|
export default BlogCard;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
align-items: flex-start;
|
|
6
|
-
width:
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: 361px;
|
|
7
8
|
box-shadow: 0px 1px 20px 0px rgba(213, 233, 246, 0.8);
|
|
8
9
|
border-radius: 16px;
|
|
9
10
|
overflow: hidden;
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
align-items: flex-start;
|
|
39
40
|
gap: 12px;
|
|
40
41
|
background: #fff;
|
|
42
|
+
width: 100%;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
.blogImage {
|
|
@@ -54,12 +56,14 @@
|
|
|
54
56
|
-webkit-box-orient: vertical;
|
|
55
57
|
overflow: hidden;
|
|
56
58
|
color: var(--Primary-Mid-black, #171e25);
|
|
57
|
-
text-align: center;
|
|
58
59
|
font-family: Poppins;
|
|
59
60
|
font-size: 18px;
|
|
60
61
|
font-style: normal;
|
|
61
62
|
font-weight: 600;
|
|
62
63
|
line-height: 22px;
|
|
64
|
+
max-width: 100%;
|
|
65
|
+
overflow-wrap: break-word;
|
|
66
|
+
word-break: break-word;
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
.blogDescription {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React from "react";
|
|
13
|
+
import BlogCard from "./BlogCard";
|
|
14
|
+
export default {
|
|
15
|
+
title: "Components/Molecules/Blog/BlogCard",
|
|
16
|
+
component: BlogCard,
|
|
17
|
+
};
|
|
18
|
+
var Template = function (args) { return React.createElement(BlogCard, __assign({}, args)); };
|
|
19
|
+
export var Default = Template.bind({});
|
|
20
|
+
Default.args = {
|
|
21
|
+
articleUrl: "https://example.com/card",
|
|
22
|
+
imageUrl: "https://plus.unsplash.com/premium_photo-1661329930662-19a43503782f?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8YXZvY2F0fGVufDB8fDB8fHww",
|
|
23
|
+
tags: ["Conseil", "Droit", "Donation"],
|
|
24
|
+
date: new Date("2023-04-23"),
|
|
25
|
+
title: "Le Droit en France",
|
|
26
|
+
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas aliquam...",
|
|
27
|
+
};
|
|
28
|
+
export var NoImage = Template.bind({});
|
|
29
|
+
NoImage.args = __assign(__assign({}, Default.args), { imageUrl: "" });
|
|
30
|
+
export var LongDescriptionTitle = Template.bind({});
|
|
31
|
+
LongDescriptionTitle.args = __assign(__assign({}, Default.args), { description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce interdum lacus vitae turpis malesuada, id varius magna faucibus. Nulla facilisi. Suspendisse potenti. Vivamus in purus sit amet sapien sodales convallis. Integer venenatis velit id lorem aliquam, sit amet pulvinar neque volutpat. dgfdfdfgdfgdfgdfgfdgdfgdfgfgfdgd dfgffsd", title: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce interdum lacus vitae turpis malesuada, id varius magna faucibus. Nulla facilisi. Suspendisse potenti. Vivamus in purus sit amet sapien sodales convallis. Integer venenatis velit id lorem aliquam, sit amet pulvinar neque volutpat." });
|
|
32
|
+
export var MultipleTags = Template.bind({});
|
|
33
|
+
MultipleTags.args = __assign(__assign({}, Default.args), { tags: ["Conseil", "Droit", "Avocat", "Justice", "Légal", "Justice", "Légal"] });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export type BlogHeaderProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
title: string;
|
|
4
|
+
author: string;
|
|
5
|
+
date: Date;
|
|
6
|
+
timeToRead: number;
|
|
7
|
+
profession: "Avocat" | "Notaire" | "Commissaire de justice";
|
|
8
|
+
imageBlog: string;
|
|
9
9
|
};
|
|
10
|
-
declare function BlogHeader({
|
|
10
|
+
declare function BlogHeader({ title, author, date, timeToRead, profession, imageBlog, }: BlogHeaderProps): React.JSX.Element;
|
|
11
11
|
export default BlogHeader;
|
|
@@ -3,19 +3,19 @@ import TinyInfo from "../../atoms/typography/TinyInfo";
|
|
|
3
3
|
import Image from "next/image";
|
|
4
4
|
import styles from "./BlogHeader.module.css";
|
|
5
5
|
function BlogHeader(_a) {
|
|
6
|
-
var
|
|
6
|
+
var title = _a.title, author = _a.author, date = _a.date, timeToRead = _a.timeToRead, profession = _a.profession, imageBlog = _a.imageBlog;
|
|
7
7
|
return (React.createElement("article", { className: styles.blogContainerWrapper },
|
|
8
8
|
React.createElement("div", { className: styles.blogContainer },
|
|
9
|
-
React.createElement("h1", { className: styles.title },
|
|
9
|
+
React.createElement("h1", { className: styles.title }, title),
|
|
10
10
|
React.createElement("div", { className: styles.blogInfoContainer },
|
|
11
|
-
React.createElement("time", { className: styles.blogDate, dateTime:
|
|
12
|
-
React.createElement(TinyInfo, { variant: "semiBold12", text:
|
|
11
|
+
React.createElement("time", { className: styles.blogDate, dateTime: date.toISOString(), "aria-label": "Date de publication" },
|
|
12
|
+
React.createElement(TinyInfo, { variant: "semiBold12", text: date.toLocaleDateString(), color: "dark-grey" })),
|
|
13
13
|
React.createElement("div", { className: styles.timeToReadContainer },
|
|
14
14
|
React.createElement("i", { className: "allaw-icon-clock", "aria-hidden": "true" }),
|
|
15
|
-
React.createElement(TinyInfo, { variant: "semiBold12", text: "".concat(
|
|
16
|
-
React.createElement(TinyInfo, { variant: "semiBold12", text:
|
|
17
|
-
React.createElement(TinyInfo, { variant: "semiBold12", text:
|
|
15
|
+
React.createElement(TinyInfo, { variant: "semiBold12", text: "".concat(timeToRead, " min"), color: "dark-grey" })),
|
|
16
|
+
React.createElement(TinyInfo, { variant: "semiBold12", text: profession, color: "dark-grey", "aria-label": "Profession de l'auteur" }),
|
|
17
|
+
React.createElement(TinyInfo, { variant: "semiBold12", text: author, color: "dark-grey", "aria-label": "Auteur de l'article" })),
|
|
18
18
|
React.createElement("figure", { className: styles.blogImageContainer },
|
|
19
|
-
React.createElement(Image, { src:
|
|
19
|
+
React.createElement(Image, { src: imageBlog, alt: "Illustration pour l'article intitul\u00E9 \"".concat(title, "\""), width: 1000, height: 449, className: styles.blogImage })))));
|
|
20
20
|
}
|
|
21
21
|
export default BlogHeader;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
padding: 16px;
|
|
6
6
|
gap: 20px;
|
|
7
7
|
width: 100%;
|
|
8
|
+
max-width: 1000px;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
.blogContainer {
|
|
@@ -28,9 +29,9 @@
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
.title {
|
|
32
|
+
width: 100%;
|
|
31
33
|
color: var(--Primary-Mid-black, #171e25);
|
|
32
|
-
font-family:
|
|
33
|
-
font-family: "Poppins";
|
|
34
|
+
font-family: Poppins;
|
|
34
35
|
font-size: 40px;
|
|
35
36
|
font-style: normal;
|
|
36
37
|
font-weight: 600;
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
white-space: normal;
|
|
47
48
|
word-wrap: break-word;
|
|
48
49
|
overflow-wrap: break-word;
|
|
50
|
+
word-break: break-word;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
.blogImage {
|
|
@@ -2,29 +2,30 @@ declare namespace _default {
|
|
|
2
2
|
export let title: string;
|
|
3
3
|
export { BlogHeader as component };
|
|
4
4
|
export namespace argTypes {
|
|
5
|
-
namespace
|
|
5
|
+
export namespace title_1 {
|
|
6
6
|
let control: string;
|
|
7
7
|
let description: string;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
export { title_1 as title };
|
|
10
|
+
export namespace author {
|
|
10
11
|
let control_1: string;
|
|
11
12
|
export { control_1 as control };
|
|
12
13
|
let description_1: string;
|
|
13
14
|
export { description_1 as description };
|
|
14
15
|
}
|
|
15
|
-
namespace
|
|
16
|
+
export namespace date {
|
|
16
17
|
let control_2: string;
|
|
17
18
|
export { control_2 as control };
|
|
18
19
|
let description_2: string;
|
|
19
20
|
export { description_2 as description };
|
|
20
21
|
}
|
|
21
|
-
namespace
|
|
22
|
+
export namespace timeToRead {
|
|
22
23
|
let control_3: string;
|
|
23
24
|
export { control_3 as control };
|
|
24
25
|
let description_3: string;
|
|
25
26
|
export { description_3 as description };
|
|
26
27
|
}
|
|
27
|
-
namespace
|
|
28
|
+
export namespace profession {
|
|
28
29
|
export namespace control_4 {
|
|
29
30
|
let type: string;
|
|
30
31
|
}
|
|
@@ -33,7 +34,7 @@ declare namespace _default {
|
|
|
33
34
|
let description_4: string;
|
|
34
35
|
export { description_4 as description };
|
|
35
36
|
}
|
|
36
|
-
namespace
|
|
37
|
+
export namespace imageBlog {
|
|
37
38
|
let control_5: string;
|
|
38
39
|
export { control_5 as control };
|
|
39
40
|
let description_5: string;
|
|
@@ -15,43 +15,49 @@ export default {
|
|
|
15
15
|
title: "Components/molecules/Blog/BlogHeader",
|
|
16
16
|
component: BlogHeader,
|
|
17
17
|
argTypes: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
title: { control: "text", description: "The title of the blog post" },
|
|
19
|
+
author: { control: "text", description: "The author of the blog post" },
|
|
20
|
+
date: {
|
|
21
|
+
control: "date",
|
|
22
|
+
description: "The publication date of the blog post",
|
|
23
|
+
},
|
|
24
|
+
timeToRead: {
|
|
25
|
+
control: "number",
|
|
26
|
+
description: "The estimated time to read the blog post",
|
|
27
|
+
},
|
|
28
|
+
profession: {
|
|
23
29
|
control: { type: "select" },
|
|
24
30
|
options: ["Avocat", "Notaire", "Commissaire de justice"],
|
|
25
31
|
description: "The profession associated with the author",
|
|
26
32
|
},
|
|
27
|
-
|
|
33
|
+
imageBlog: { control: "text", description: "The image for the blog post" },
|
|
28
34
|
},
|
|
29
35
|
};
|
|
30
36
|
var Template = function (args) { return React.createElement(BlogHeader, __assign({}, args)); };
|
|
31
37
|
export var Default = Template.bind({});
|
|
32
38
|
Default.args = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
title: "Understanding Legal Procedures",
|
|
40
|
+
author: "John Doe",
|
|
41
|
+
date: new Date("2023-10-21"),
|
|
42
|
+
timeToRead: 5,
|
|
43
|
+
profession: "Avocat",
|
|
44
|
+
imageBlog: "https://plus.unsplash.com/premium_photo-1661329930662-19a43503782f?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8YXZvY2F0fGVufDB8fDB8fHww",
|
|
39
45
|
};
|
|
40
46
|
export var NotaryExample = Template.bind({});
|
|
41
47
|
NotaryExample.args = {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
title: "The Role of a Notary in Legal Contracts",
|
|
49
|
+
author: "Jane Smith",
|
|
50
|
+
date: new Date("2023-08-15"),
|
|
51
|
+
timeToRead: 7,
|
|
52
|
+
profession: "Notaire",
|
|
53
|
+
imageBlog: "https://via.placeholder.com/1000x449",
|
|
48
54
|
};
|
|
49
55
|
export var JudicialOfficerExample = Template.bind({});
|
|
50
56
|
JudicialOfficerExample.args = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
title: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui quod consequuntur perferendis accusamus distinctio error rem nostrum odio dolorem laudantium libero dicta saepe magnam ipsum impedit eos, numquam ducimus? Nisi",
|
|
58
|
+
author: "Alice Cooper",
|
|
59
|
+
date: new Date("2023-09-10"),
|
|
60
|
+
timeToRead: 9,
|
|
61
|
+
profession: "Commissaire de justice",
|
|
62
|
+
imageBlog: "https://via.placeholder.com/1000x449",
|
|
57
63
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export type BlogTextProps = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
title: string;
|
|
4
|
+
article: string;
|
|
5
5
|
};
|
|
6
|
-
declare function BlogText({
|
|
6
|
+
declare function BlogText({ title, article }: BlogTextProps): React.JSX.Element;
|
|
7
7
|
export default BlogText;
|
|
@@ -2,10 +2,10 @@ import React from "react";
|
|
|
2
2
|
import Paragraph from "../../atoms/typography/Paragraph";
|
|
3
3
|
import styles from "./BlogText.module.css";
|
|
4
4
|
function BlogText(_a) {
|
|
5
|
-
var
|
|
5
|
+
var title = _a.title, article = _a.article;
|
|
6
6
|
return (React.createElement("section", { className: styles.BlogTextContainerWrapper },
|
|
7
7
|
React.createElement("div", { className: styles.BlogTextContainer },
|
|
8
|
-
React.createElement("h3", { className: styles.BlogTextTitle },
|
|
9
|
-
React.createElement(Paragraph, { variant: "semiBold", color: "dark-grey", text:
|
|
8
|
+
React.createElement("h3", { className: styles.BlogTextTitle }, title),
|
|
9
|
+
React.createElement(Paragraph, { variant: "semiBold", color: "dark-grey", text: article, className: styles.BlogTextCustomParagraph }))));
|
|
10
10
|
}
|
|
11
11
|
export default BlogText;
|
|
@@ -27,11 +27,16 @@
|
|
|
27
27
|
font-style: normal;
|
|
28
28
|
font-weight: 600;
|
|
29
29
|
line-height: normal;
|
|
30
|
+
word-break: break-word;
|
|
31
|
+
overflow-wrap: break-word;
|
|
32
|
+
hyphens: auto;
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
.BlogTextCustomParagraph {
|
|
33
36
|
white-space: pre-wrap;
|
|
34
|
-
|
|
37
|
+
word-break: break-word;
|
|
38
|
+
overflow-wrap: break-word;
|
|
39
|
+
hyphens: auto;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
@media (max-width: 825px) {
|
|
@@ -3,11 +3,12 @@ declare namespace _default {
|
|
|
3
3
|
export { BlogText as component };
|
|
4
4
|
export let tags: string[];
|
|
5
5
|
export namespace argTypes {
|
|
6
|
-
namespace
|
|
6
|
+
export namespace title_1 {
|
|
7
7
|
let control: string;
|
|
8
8
|
let description: string;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
export { title_1 as title };
|
|
11
|
+
export namespace article {
|
|
11
12
|
let control_1: string;
|
|
12
13
|
export { control_1 as control };
|
|
13
14
|
let description_1: string;
|
|
@@ -16,11 +16,11 @@ export default {
|
|
|
16
16
|
component: BlogText,
|
|
17
17
|
tags: ["autodocs"],
|
|
18
18
|
argTypes: {
|
|
19
|
-
|
|
19
|
+
title: {
|
|
20
20
|
control: "text",
|
|
21
21
|
description: "Le titre principal du bloc de texte du blog.",
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
article: {
|
|
24
24
|
control: "text",
|
|
25
25
|
description: "Le contenu textuel de l'article ou de la description du blog.",
|
|
26
26
|
},
|
|
@@ -36,16 +36,16 @@ export default {
|
|
|
36
36
|
var Template = function (args) { return React.createElement(BlogText, __assign({}, args)); };
|
|
37
37
|
export var ShortTitleAndContent = Template.bind({});
|
|
38
38
|
ShortTitleAndContent.args = {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
title: "Introduction",
|
|
40
|
+
article: "Ceci est un article court qui résume l'idée principale de la section.",
|
|
41
41
|
};
|
|
42
42
|
export var LongTitleAndContent = Template.bind({});
|
|
43
43
|
LongTitleAndContent.args = {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
title: "Pourquoi adopter une architecture modulaire dans vos projets ?",
|
|
45
|
+
article: "L'adoption d'une architecture modulaire offre plusieurs avantages clés pour les projets de développement.\n\nEn premier lieu, elle améliore la maintenabilité du code en permettant aux développeurs de travailler sur des modules indépendants.\n\nEnsuite, elle facilite le déploiement incrémental et la collaboration d'équipe, réduisant ainsi les conflits lors du développement.\n\nEnfin, elle permet une meilleure scalabilité en isolant les fonctionnalités, ce qui rend les mises à jour plus fluides et réduit les risques d'introduire des bugs dans l'ensemble de l'application.",
|
|
46
46
|
};
|
|
47
47
|
export var ArticleWithLineBreaks = Template.bind({});
|
|
48
48
|
ArticleWithLineBreaks.args = {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
title: "Article avec retours à la ligne",
|
|
50
|
+
article: "L'adoption d'une architecture modulaire offre plusieurs avantages :\n\n- Maintenabilit\u00E9 du code : possibilit\u00E9 de travailler sur des modules ind\u00E9pendants.\n- D\u00E9ploiement incr\u00E9mental : am\u00E9lioration de la collaboration.\n- Scalabilit\u00E9 : isolation des fonctionnalit\u00E9s pour r\u00E9duire les risques de bugs.\n\nCeci est un test avec des retours \u00E0 la ligne pour valider l'affichage.",
|
|
51
51
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export type BlogTextImageBlockProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
title: string;
|
|
4
|
+
article: string;
|
|
5
|
+
imageUrl: string;
|
|
6
6
|
};
|
|
7
|
-
declare function BlogTextImageBlock({
|
|
7
|
+
declare function BlogTextImageBlock({ title, article, imageUrl, }: BlogTextImageBlockProps): React.JSX.Element;
|
|
8
8
|
export default BlogTextImageBlock;
|
|
@@ -3,13 +3,13 @@ import styles from "./BlogTextImageBlock.module.css";
|
|
|
3
3
|
import Image from "next/image";
|
|
4
4
|
import Paragraph from "../../atoms/typography/Paragraph";
|
|
5
5
|
function BlogTextImageBlock(_a) {
|
|
6
|
-
var
|
|
6
|
+
var title = _a.title, article = _a.article, imageUrl = _a.imageUrl;
|
|
7
7
|
return (React.createElement("section", { className: styles.BlogTextImageBlockWrapper },
|
|
8
8
|
React.createElement("div", { className: styles.BlogTextImageBlockContainer },
|
|
9
9
|
React.createElement("div", { className: styles.BlogTextImageBlockLeft },
|
|
10
|
-
React.createElement("div", { className: styles.BlogTextImageBlockTitle },
|
|
11
|
-
React.createElement(Paragraph, { variant: "semiBold", text:
|
|
10
|
+
React.createElement("div", { className: styles.BlogTextImageBlockTitle }, title),
|
|
11
|
+
React.createElement(Paragraph, { variant: "semiBold", text: article, color: "dark-grey", className: styles.blogTextImageBlockParagraph })),
|
|
12
12
|
React.createElement("figure", { className: styles.BlogTextImageBlockRight },
|
|
13
|
-
React.createElement(Image, { width: 484, height: 322, src:
|
|
13
|
+
React.createElement(Image, { width: 484, height: 322, src: imageUrl, alt: "Image d'un article de blog", className: styles.blogTextImageBlockImage })))));
|
|
14
14
|
}
|
|
15
15
|
export default BlogTextImageBlock;
|
|
@@ -2,19 +2,18 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
background-color: white;
|
|
5
|
-
width: 100%;
|
|
6
5
|
padding: 16px;
|
|
7
|
-
|
|
6
|
+
width: 100%;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
.BlogTextImageBlockContainer {
|
|
11
10
|
display: flex;
|
|
12
|
-
width: 100%;
|
|
13
11
|
max-width: 1000px;
|
|
12
|
+
width: 100%;
|
|
14
13
|
flex-direction: row;
|
|
15
|
-
|
|
14
|
+
gap: 20px;
|
|
16
15
|
padding: 16px;
|
|
17
|
-
|
|
16
|
+
background-color: white;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
.BlogTextImageBlockLeft {
|
|
@@ -34,7 +33,7 @@
|
|
|
34
33
|
|
|
35
34
|
.BlogTextImageBlockTitle {
|
|
36
35
|
color: var(--Primary-Mid-black, #171e25);
|
|
37
|
-
font-family:
|
|
36
|
+
font-family: Poppins;
|
|
38
37
|
font-size: 18px;
|
|
39
38
|
font-weight: 600;
|
|
40
39
|
margin: 0;
|
|
@@ -55,6 +54,7 @@
|
|
|
55
54
|
word-break: break-word;
|
|
56
55
|
word-wrap: break-word;
|
|
57
56
|
overflow-wrap: break-word;
|
|
57
|
+
white-space: pre-wrap;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.blogTextImageBlockImage {
|
|
@@ -92,6 +92,11 @@
|
|
|
92
92
|
padding: 4px;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
.BlogTextImageBlockContainer {
|
|
96
|
+
gap: 10px;
|
|
97
|
+
padding: 0 8px;
|
|
98
|
+
}
|
|
99
|
+
|
|
95
100
|
.BlogTextImageBlockTitle {
|
|
96
101
|
font-size: 16px;
|
|
97
102
|
}
|
|
@@ -3,17 +3,18 @@ declare namespace _default {
|
|
|
3
3
|
export { BlogTextImageBlock as component };
|
|
4
4
|
export let tags: string[];
|
|
5
5
|
export namespace argTypes {
|
|
6
|
-
namespace
|
|
6
|
+
export namespace title_1 {
|
|
7
7
|
let control: string;
|
|
8
8
|
let description: string;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
export { title_1 as title };
|
|
11
|
+
export namespace article {
|
|
11
12
|
let control_1: string;
|
|
12
13
|
export { control_1 as control };
|
|
13
14
|
let description_1: string;
|
|
14
15
|
export { description_1 as description };
|
|
15
16
|
}
|
|
16
|
-
namespace
|
|
17
|
+
export namespace imageUrl {
|
|
17
18
|
let control_2: string;
|
|
18
19
|
export { control_2 as control };
|
|
19
20
|
let description_2: string;
|
|
@@ -16,15 +16,15 @@ export default {
|
|
|
16
16
|
component: BlogTextImageBlock,
|
|
17
17
|
tags: ["autodocs"],
|
|
18
18
|
argTypes: {
|
|
19
|
-
|
|
19
|
+
title: {
|
|
20
20
|
control: "text",
|
|
21
21
|
description: "Le titre principal de l'article du bloc.",
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
article: {
|
|
24
24
|
control: "text",
|
|
25
25
|
description: "Le contenu textuel de l'article ou de la description.",
|
|
26
26
|
},
|
|
27
|
-
|
|
27
|
+
imageUrl: {
|
|
28
28
|
control: "text",
|
|
29
29
|
description: "L'URL de l'image à afficher dans le bloc.",
|
|
30
30
|
},
|
|
@@ -40,19 +40,19 @@ export default {
|
|
|
40
40
|
var Template = function (args) { return React.createElement(BlogTextImageBlock, __assign({}, args)); };
|
|
41
41
|
export var DefaultView = Template.bind({});
|
|
42
42
|
DefaultView.args = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
title: "Titre d'exemple",
|
|
44
|
+
article: "Ceci est un exemple d'article court. Ce composant est conçu pour afficher un contenu structuré avec un titre, un paragraphe et une image.",
|
|
45
|
+
imageUrl: "https://images.unsplash.com/photo-1733324770222-a6c4a921b379?q=80&w=1740&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
46
46
|
};
|
|
47
47
|
export var LongArticleWithImage = Template.bind({});
|
|
48
48
|
LongArticleWithImage.args = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
title: "Pourquoi une architecture modulaire est essentielle",
|
|
50
|
+
article: "L'architecture modulaire est une pratique clé pour la réussite des projets modernes.\n\nElle offre une meilleure maintenabilité en permettant aux développeurs de se concentrer sur des modules indépendants. De plus, elle améliore la collaboration grâce au déploiement incrémental et à une réduction des conflits.\n\nEnfin, elle garantit une meilleure scalabilité en isolant les fonctionnalités, ce qui simplifie les mises à jour et réduit les risques d'introduire des bugs dans l'ensemble de l'application.",
|
|
51
|
+
imageUrl: "https://images.unsplash.com/photo-1731955196267-e863d6f39794?q=80&w=1693&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
52
52
|
};
|
|
53
53
|
export var ArticleWithoutImage = Template.bind({});
|
|
54
54
|
ArticleWithoutImage.args = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
title: "Titre sans image",
|
|
56
|
+
article: "Ce test illustre l'affichage d'un article sans image associée. Le composant doit s'adapter en conséquence, en affichant uniquement le titre et le contenu textuel.",
|
|
57
|
+
imageUrl: "",
|
|
58
58
|
};
|
|
@@ -4,7 +4,7 @@ export interface DocumentCardProps {
|
|
|
4
4
|
type: "document" | "note" | "invoice" | "waiting" | "payment" | undefined;
|
|
5
5
|
title: string;
|
|
6
6
|
date: Date | undefined;
|
|
7
|
-
status: "sent" | "received" | "internal";
|
|
7
|
+
status: "sent" | "received" | "internal" | "notRequired" | "waiting" | "expired" | "canceled" | "failed" | "processing" | "maxAttemptsReached";
|
|
8
8
|
documents?: {
|
|
9
9
|
[key: string]: boolean;
|
|
10
10
|
};
|
|
@@ -29,6 +29,20 @@ var DocumentCard = function (_a) {
|
|
|
29
29
|
return "REÇU";
|
|
30
30
|
case "sent":
|
|
31
31
|
return "ENVOYÉ";
|
|
32
|
+
case "notRequired":
|
|
33
|
+
return "NON REQUIS";
|
|
34
|
+
case "waiting":
|
|
35
|
+
return "EN ATTENTE";
|
|
36
|
+
case "expired":
|
|
37
|
+
return "EXPIRÉ";
|
|
38
|
+
case "canceled":
|
|
39
|
+
return "ANNULÉ";
|
|
40
|
+
case "failed":
|
|
41
|
+
return "ÉCHOUÉ";
|
|
42
|
+
case "processing":
|
|
43
|
+
return "EN COURS";
|
|
44
|
+
case "maxAttemptsReached":
|
|
45
|
+
return "ÉCHOUÉ";
|
|
32
46
|
default:
|
|
33
47
|
return "INTERNE";
|
|
34
48
|
}
|
|
@@ -55,6 +69,25 @@ var DocumentCard = function (_a) {
|
|
|
55
69
|
year: "2-digit",
|
|
56
70
|
});
|
|
57
71
|
};
|
|
72
|
+
var getInformationColor = function (status) {
|
|
73
|
+
switch (status) {
|
|
74
|
+
case "internal":
|
|
75
|
+
case "received":
|
|
76
|
+
case "sent":
|
|
77
|
+
case "notRequired":
|
|
78
|
+
case "waiting":
|
|
79
|
+
return "blue";
|
|
80
|
+
case "processing":
|
|
81
|
+
return "orange";
|
|
82
|
+
case "expired":
|
|
83
|
+
case "canceled":
|
|
84
|
+
case "failed":
|
|
85
|
+
case "maxAttemptsReached":
|
|
86
|
+
return "red";
|
|
87
|
+
default:
|
|
88
|
+
return "blue";
|
|
89
|
+
}
|
|
90
|
+
};
|
|
58
91
|
if (type === "waiting") {
|
|
59
92
|
var documentList = Object.keys(documents);
|
|
60
93
|
return (React.createElement("div", { className: "document-card waiting", style: { cursor: onCardClick ? "pointer" : "default" }, onClick: function () { return onCardClick && onCardClick(); } },
|
|
@@ -79,8 +112,8 @@ var DocumentCard = function (_a) {
|
|
|
79
112
|
React.createElement("span", { className: "document-card-date" }, formatDate(date)))),
|
|
80
113
|
React.createElement("div", { className: "document-card-right" },
|
|
81
114
|
React.createElement("div", { className: "document-card-status" },
|
|
82
|
-
React.createElement(OtherStatusTag, { type: "information", label: getStatusName() })),
|
|
83
|
-
type != "payment" && React.createElement("div", { className: "document-card-icon-eye" },
|
|
84
|
-
React.createElement("i", { className: "allaw-icon-eye" })))));
|
|
115
|
+
React.createElement(OtherStatusTag, { type: "information", label: getStatusName(), informationColor: getInformationColor(status) })),
|
|
116
|
+
type != "payment" && (React.createElement("div", { className: "document-card-icon-eye" },
|
|
117
|
+
React.createElement("i", { className: "allaw-icon-eye" }))))));
|
|
85
118
|
};
|
|
86
119
|
export default DocumentCard;
|
|
@@ -32,7 +32,18 @@ export default {
|
|
|
32
32
|
status: {
|
|
33
33
|
control: {
|
|
34
34
|
type: "select",
|
|
35
|
-
options: [
|
|
35
|
+
options: [
|
|
36
|
+
"sent",
|
|
37
|
+
"received",
|
|
38
|
+
"internal",
|
|
39
|
+
"notRequired",
|
|
40
|
+
"waiting",
|
|
41
|
+
"expired",
|
|
42
|
+
"canceled",
|
|
43
|
+
"failed",
|
|
44
|
+
"processing",
|
|
45
|
+
"maxAttemptsReached",
|
|
46
|
+
],
|
|
36
47
|
},
|
|
37
48
|
},
|
|
38
49
|
documents: {
|
package/dist/styles/colors.css
CHANGED
|
@@ -25,10 +25,12 @@
|
|
|
25
25
|
--blue-tag-dark: #1985e8;
|
|
26
26
|
--blue-tag-light: #daebfb;
|
|
27
27
|
--gris-clair: #dee8f2;
|
|
28
|
+
--orange-tag-dark: #ff9f43;
|
|
28
29
|
|
|
29
30
|
/* Actions */
|
|
30
31
|
--actions-valid: #29a36a;
|
|
31
32
|
--actions-error: #e15151;
|
|
33
|
+
--actions-warning: #ffc857;
|
|
32
34
|
|
|
33
35
|
/* Background */
|
|
34
36
|
--background-pro: #fcfdfd;
|
package/package.json
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import BlogCard from './BlogCard';
|
|
14
|
-
export default {
|
|
15
|
-
title: 'Components/Molecules/Blog/BlogCard',
|
|
16
|
-
component: BlogCard,
|
|
17
|
-
};
|
|
18
|
-
var Template = function (args) { return React.createElement(BlogCard, __assign({}, args)); };
|
|
19
|
-
export var Default = Template.bind({});
|
|
20
|
-
Default.args = {
|
|
21
|
-
Article_URL: 'https://example.com/card',
|
|
22
|
-
Image_URL: 'https://plus.unsplash.com/premium_photo-1661329930662-19a43503782f?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8YXZvY2F0fGVufDB8fDB8fHww',
|
|
23
|
-
Tags: ['Conseil', "Droit", "Donation"],
|
|
24
|
-
Date: new Date('2023-04-23'),
|
|
25
|
-
Title: 'Le Droit en France',
|
|
26
|
-
Description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas aliquam...',
|
|
27
|
-
};
|
|
28
|
-
export var NoImage = Template.bind({});
|
|
29
|
-
NoImage.args = __assign(__assign({}, Default.args), { Image_URL: '' });
|
|
30
|
-
export var LongDescriptionTitle = Template.bind({});
|
|
31
|
-
LongDescriptionTitle.args = __assign(__assign({}, Default.args), { Description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce interdum lacus vitae turpis malesuada, id varius magna faucibus. Nulla facilisi. Suspendisse potenti. Vivamus in purus sit amet sapien sodales convallis. Integer venenatis velit id lorem aliquam, sit amet pulvinar neque volutpat. dgfdfdfgdfgdfgdfgdfgfdgdfgdfgfgfdgd dfgffsd', Title: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce interdum lacus vitae turpis malesuada, id varius magna faucibus. Nulla facilisi. Suspendisse potenti. Vivamus in purus sit amet sapien sodales convallis. Integer venenatis velit id lorem aliquam, sit amet pulvinar neque volutpat.' });
|
|
32
|
-
export var MultipleTags = Template.bind({});
|
|
33
|
-
MultipleTags.args = __assign(__assign({}, Default.args), { Tags: ['Conseil', 'Droit', 'Avocat', 'Justice', 'Légal', 'Justice', 'Légal'] });
|