allaw-ui 1.0.108 → 1.0.112

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.
Files changed (28) hide show
  1. package/dist/components/atoms/progressBars/ProgressBar.d.ts +0 -1
  2. package/dist/components/atoms/progressBars/ProgressBar.js +7 -7
  3. package/dist/components/atoms/progressBars/{ProgressBar.css → ProgressBar.module.css} +17 -18
  4. package/dist/components/molecules/BlogTextBlock/BlogTextBlock.css +43 -0
  5. package/dist/components/molecules/BlogTextBlock/BlogTextBlock.d.ts +12 -0
  6. package/dist/components/molecules/BlogTextBlock/BlogTextBlock.js +26 -0
  7. package/dist/components/molecules/BlogTextBlock/BlogTextBlock.stories.d.ts +48 -0
  8. package/dist/components/molecules/BlogTextBlock/BlogTextBlock.stories.js +57 -0
  9. package/dist/components/molecules/blogArticle/BlogArticle.css +105 -0
  10. package/dist/components/molecules/blogArticle/BlogArticle.d.ts +12 -0
  11. package/dist/components/molecules/blogArticle/BlogArticle.js +30 -0
  12. package/dist/components/molecules/blogArticle/BlogArticle.stories.d.ts +10 -0
  13. package/dist/components/molecules/blogArticle/BlogArticle.stories.js +33 -0
  14. package/dist/components/molecules/blogArticle/index.d.ts +2 -0
  15. package/dist/components/molecules/blogArticle/index.js +1 -0
  16. package/dist/index.d.ts +2 -0
  17. package/dist/index.js +1 -0
  18. package/dist/stories/Header.d.ts +13 -0
  19. package/dist/stories/Header.js +20 -0
  20. package/dist/stories/Header.stories.d.ts +18 -0
  21. package/dist/stories/Header.stories.js +26 -0
  22. package/dist/stories/Page.d.ts +3 -0
  23. package/dist/stories/Page.js +37 -0
  24. package/dist/stories/Page.stories.d.ts +12 -0
  25. package/dist/stories/Page.stories.js +76 -0
  26. package/dist/stories/header.css +32 -0
  27. package/dist/stories/page.css +69 -0
  28. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import "./ProgressBar.css";
3
2
  import "../../../styles/global.css";
4
3
  import "../../../styles/icons.css";
5
4
  export type BarColor = "blue" | "red" | "green" | "grey";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import "./ProgressBar.css";
2
+ import styles from "./ProgressBar.module.css";
3
3
  import "../../../styles/global.css";
4
4
  import "../../../styles/icons.css";
5
5
  var ProgressBar = function (_a) {
@@ -7,20 +7,20 @@ var ProgressBar = function (_a) {
7
7
  var constrainedCurrentStep = Math.max(0, Math.min(currentStep, steps));
8
8
  var progressWidth = constrainedCurrentStep === 0 ? 0 : (constrainedCurrentStep / steps) * 100;
9
9
  var noIconsMargin = !startIcon && !endIcon ? "0px" : "0 10px";
10
- return (React.createElement("div", { className: "progress-bar-container" },
11
- startIcon && (React.createElement("div", { className: "progress-bar-icon-container" },
12
- React.createElement("button", { className: "progress-bar-chevron", onClick: onStartIconClick },
10
+ return (React.createElement("div", { className: styles.progressBarContainer },
11
+ startIcon && (React.createElement("div", { className: styles.progressBarIconContainer },
12
+ React.createElement("button", { className: styles.progressBarChevron, onClick: onStartIconClick },
13
13
  React.createElement("i", { className: "allaw-icon-chevron-left" })))),
14
- React.createElement("div", { className: "progress-bar-background ".concat(showProgressBar ? "" : "hidden-content"), style: {
14
+ React.createElement("div", { className: "".concat(styles.progressBarBackground, " ").concat(showProgressBar ? "" : styles.hiddenContent), style: {
15
15
  height: isWrapperProgressBar ? "6px" : "8px",
16
16
  width: startIcon ? "calc(100% - 32px)" : "100%",
17
17
  margin: noIconsMargin,
18
18
  } },
19
- React.createElement("div", { className: "progress-bar-fill progress-bar-fill-".concat(barColor), style: {
19
+ React.createElement("div", { className: "".concat(styles.progressBarFill, " ").concat(styles["progressBarFill".concat(barColor.charAt(0).toUpperCase() + barColor.slice(1))]), style: {
20
20
  width: "".concat(progressWidth, "%"),
21
21
  height: isWrapperProgressBar ? "6px" : "8px",
22
22
  } })),
23
- endIcon && (React.createElement("button", { className: "progress-bar-close", onClick: onEndIconClick },
23
+ endIcon && (React.createElement("button", { className: styles.progressBarClose, onClick: onEndIconClick },
24
24
  React.createElement("i", { className: "allaw-icon-close" })))));
25
25
  };
26
26
  export default ProgressBar;
@@ -1,21 +1,20 @@
1
1
  @import "../../../styles/colors.css";
2
2
 
3
- .progress-bar-container {
3
+ .progressBarContainer {
4
4
  display: flex;
5
5
  width: 100%;
6
6
  justify-content: space-between;
7
7
  align-items: center;
8
8
  height: 1.5rem;
9
9
  gap: 4rem;
10
+ padding-left: 0.7rem;
10
11
  }
11
12
 
12
-
13
-
14
- .progress-bar-background.hidden-content {
13
+ .hiddenContent {
15
14
  visibility: hidden;
16
15
  }
17
16
 
18
- .progress-bar-icon-container {
17
+ .progressBarIconContainer {
19
18
  width: 32px;
20
19
  height: 32px;
21
20
  flex-shrink: 0;
@@ -24,7 +23,7 @@
24
23
  align-items: center;
25
24
  }
26
25
 
27
- .progress-bar-chevron {
26
+ .progressBarChevron {
28
27
  width: 32px;
29
28
  height: 32px;
30
29
  cursor: pointer;
@@ -40,14 +39,14 @@
40
39
  transition: background-color 0.2s ease;
41
40
  }
42
41
 
43
- .progress-bar-chevron:hover {
42
+ .progressBarChevron:hover {
44
43
  background-color: var(--venom-grey, #e6edf5);
45
44
  }
46
- .progress-bar-chevron:active {
45
+ .progressBarChevron:active {
47
46
  background-color: var(--venom-grey-dark, #d1dce8);
48
47
  }
49
48
 
50
- .progress-bar-background {
49
+ .progressBarBackground {
51
50
  display: flex;
52
51
  width: 100%;
53
52
  height: 6px;
@@ -57,29 +56,29 @@
57
56
  margin: 0 10px;
58
57
  }
59
58
 
60
- .progress-bar-fill {
59
+ .progressBarFill {
61
60
  height: 6px;
62
61
  border-radius: 8px;
63
62
  transition: width 0.35s ease;
64
63
  }
65
64
 
66
- .progress-bar-fill-blue {
65
+ .progressBarFillBlue {
67
66
  background: var(--primary-blue, #25beeb);
68
67
  }
69
68
 
70
- .progress-bar-fill-red {
69
+ .progressBarFillRed {
71
70
  background: var(--actions-error, #e15151);
72
71
  }
73
72
 
74
- .progress-bar-fill-green {
73
+ .progressBarFillGreen {
75
74
  background: var(--actions-valid, #29a36a);
76
75
  }
77
76
 
78
- .progress-bar-fill-grey {
77
+ .progressBarFillGrey {
79
78
  background: var(--mid-grey, #728ea7);
80
79
  }
81
80
 
82
- .progress-bar-close {
81
+ .progressBarClose {
83
82
  display: flex;
84
83
  flex-direction: row;
85
84
  justify-content: center;
@@ -96,14 +95,14 @@
96
95
  transition: background-color 0.2s ease;
97
96
  }
98
97
 
99
- .progress-bar-close:hover {
98
+ .progressBarClose:hover {
100
99
  background-color: var(--venom-grey, #e6edf5);
101
100
  }
102
- .progress-bar-close:active {
101
+ .progressBarClose:active {
103
102
  background-color: var(--venom-grey-dark, #d1dce8);
104
103
  }
105
104
 
106
- .progress-bar-close i {
105
+ .progressBarClose i {
107
106
  width: 14px;
108
107
  height: 14px;
109
108
  flex-shrink: 0;
@@ -0,0 +1,43 @@
1
+ .blogContainerTop {
2
+ display: flex;
3
+ width: 1000px;
4
+ max-width: 1000px;
5
+ flex-direction: column;
6
+ align-items: flex-start;
7
+ gap: 23px;
8
+ }
9
+
10
+ .blogInfoContainer {
11
+ display: flex;
12
+ flex-direction: row;
13
+ align-items: center;
14
+ justify-content: flex-start;
15
+ gap: 23px;
16
+ width: auto;
17
+ height: auto;
18
+ flex-wrap: nowrap;
19
+ }
20
+
21
+ .blogContainerBottom {
22
+ display: flex;
23
+ max-width: 1000px;
24
+ flex-direction: column;
25
+ align-items: flex-start;
26
+ gap: 20px;
27
+ }
28
+
29
+ .blogImageContainer {
30
+ align-self: stretch;
31
+ background: #D9D9D9;
32
+ object-fit: cover;
33
+ }
34
+
35
+ .timeToReadContainer {
36
+ display: flex;
37
+ align-items: center;
38
+ gap: 8px;
39
+ }
40
+
41
+ .timeToReadContainer svg {
42
+ flex-shrink: 0;
43
+ }
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import "./BlogTextBlock.css";
3
+ export type BlogTextBlockProps = {
4
+ Title: string;
5
+ Author: string;
6
+ Date: Date;
7
+ TimeToRead: string;
8
+ Profession: "Avocat" | "Notaire" | "Commissaire de justice";
9
+ ImageBlog: string;
10
+ };
11
+ declare function BlogTextBlock({ Title, Date, TimeToRead, Profession, ImageBlog, }: BlogTextBlockProps): React.JSX.Element;
12
+ export default BlogTextBlock;
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import { Heading, TinyInfo } from "../../atoms/typography";
3
+ import Image from "next/image";
4
+ import "./BlogTextBlock.css";
5
+ function BlogTextBlock(_a) {
6
+ var Title = _a.Title, Date = _a.Date, TimeToRead = _a.TimeToRead, Profession = _a.Profession, ImageBlog = _a.ImageBlog;
7
+ return (React.createElement("div", { className: "blogContainer" },
8
+ React.createElement("div", { className: "blogContainerTop" },
9
+ React.createElement(Heading, { text: Title, variant: "h2", color: "noir", align: "left" }),
10
+ React.createElement("div", { className: "blogInfoContainer" },
11
+ React.createElement(TinyInfo, { variant: "medium12", text: Date.toLocaleDateString(), color: "dark-grey" }),
12
+ React.createElement("div", { className: "timeToReadContainer" },
13
+ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" },
14
+ React.createElement("g", { clipPath: "url(#clip0_9957_3676)" },
15
+ React.createElement("path", { d: "M7.00033 12.8332C10.222 12.8332 12.8337 10.2215 12.8337 6.99984C12.8337 3.77818 10.222 1.1665 7.00033 1.1665C3.77866 1.1665 1.16699 3.77818 1.16699 6.99984C1.16699 10.2215 3.77866 12.8332 7.00033 12.8332Z", stroke: "#25BEEB", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
16
+ React.createElement("path", { d: "M7 3.5V7L9.33333 8.16667", stroke: "#25BEEB", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })),
17
+ React.createElement("defs", null,
18
+ React.createElement("clipPath", { id: "clip0_9957_3676" },
19
+ React.createElement("rect", { width: "14", height: "14", fill: "white" })))),
20
+ React.createElement(TinyInfo, { variant: "medium12", text: TimeToRead, color: "dark-grey" })),
21
+ React.createElement(TinyInfo, { variant: "medium12", text: Profession, color: "dark-grey" })),
22
+ React.createElement("div", { className: "blogImageContainer" },
23
+ React.createElement(Image, { src: ImageBlog, alt: "Image de fond d'un article de blog", width: 1000, height: 449 }))),
24
+ React.createElement("div", { className: "blogContainerBottom" })));
25
+ }
26
+ export default BlogTextBlock;
@@ -0,0 +1,48 @@
1
+ declare namespace _default {
2
+ export let title: string;
3
+ export { BlogTextBlock as component };
4
+ export namespace argTypes {
5
+ namespace Title {
6
+ let control: string;
7
+ let description: string;
8
+ }
9
+ namespace Author {
10
+ let control_1: string;
11
+ export { control_1 as control };
12
+ let description_1: string;
13
+ export { description_1 as description };
14
+ }
15
+ namespace Date {
16
+ let control_2: string;
17
+ export { control_2 as control };
18
+ let description_2: string;
19
+ export { description_2 as description };
20
+ }
21
+ namespace TimeToRead {
22
+ let control_3: string;
23
+ export { control_3 as control };
24
+ let description_3: string;
25
+ export { description_3 as description };
26
+ }
27
+ namespace Profession {
28
+ export namespace control_4 {
29
+ let type: string;
30
+ }
31
+ export { control_4 as control };
32
+ export let options: string[];
33
+ let description_4: string;
34
+ export { description_4 as description };
35
+ }
36
+ namespace ImageBlog {
37
+ let control_5: string;
38
+ export { control_5 as control };
39
+ let description_5: string;
40
+ export { description_5 as description };
41
+ }
42
+ }
43
+ }
44
+ export default _default;
45
+ export const Default: any;
46
+ export const NotaryExample: any;
47
+ export const JudicialOfficerExample: any;
48
+ import BlogTextBlock from "./BlogTextBlock";
@@ -0,0 +1,57 @@
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 BlogTextBlock, { BlogTextBlockProps } from "./BlogTextBlock";
14
+ export default {
15
+ title: "Components/molecules/BlogTextBlock",
16
+ component: BlogTextBlock,
17
+ argTypes: {
18
+ Title: { control: "text", description: "The title of the blog post" },
19
+ Author: { control: "text", description: "The author of the blog post" },
20
+ Date: { control: "date", description: "The publication date of the blog post" },
21
+ TimeToRead: { control: "text", description: "The estimated time to read the blog post" },
22
+ Profession: {
23
+ control: { type: "select" },
24
+ options: ["avocat", "notaire", "commissaire de justice"],
25
+ description: "The profession associated with the author",
26
+ },
27
+ ImageBlog: { control: "text", description: "The image for the blog post" },
28
+ },
29
+ };
30
+ var Template = function (args) { return React.createElement(BlogTextBlock, __assign({}, args)); };
31
+ export var Default = Template.bind({});
32
+ Default.args = {
33
+ Title: "Understanding Legal Procedures",
34
+ Author: "John Doe",
35
+ Date: new Date("2023-10-21"),
36
+ TimeToRead: "5 min",
37
+ Profession: "avocat",
38
+ 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
+ };
40
+ export var NotaryExample = Template.bind({});
41
+ NotaryExample.args = {
42
+ Title: "The Role of a Notary in Legal Contracts",
43
+ Author: "Jane Smith",
44
+ Date: new Date("2023-08-15"),
45
+ TimeToRead: "7 min",
46
+ Profession: "notaire",
47
+ ImageBlog: "https://via.placeholder.com/1000x449",
48
+ };
49
+ export var JudicialOfficerExample = Template.bind({});
50
+ JudicialOfficerExample.args = {
51
+ Title: "How Judicial Officers Ensure Justice",
52
+ Author: "Alice Cooper",
53
+ Date: new Date("2023-09-10"),
54
+ TimeToRead: "6 min",
55
+ Profession: "commissaire de justice",
56
+ ImageBlog: "https://via.placeholder.com/1000x449",
57
+ };
@@ -0,0 +1,105 @@
1
+ .blog-container {
2
+ text-decoration: none;
3
+ display: flex;
4
+ flex-direction: column;
5
+ align-items: flex-start;
6
+ width: 361px;
7
+ box-shadow: 0px 1px 20px 0px rgba(213, 233, 246, 0.80);
8
+ border-radius: 16px;
9
+ overflow: hidden;
10
+ transition: transform 0.2s ease;
11
+ cursor: pointer;
12
+ }
13
+
14
+ .blog-container:hover {
15
+ transform: scale(1.015);
16
+ }
17
+
18
+ .blog-top-section {
19
+ height: 230px;
20
+ align-self: stretch;
21
+ }
22
+
23
+ .blog-split-section {
24
+ width: 329px;
25
+ height: 1px;
26
+ background: #F1F4F8;
27
+ }
28
+
29
+ .blog-bottom-section {
30
+ display: flex;
31
+ padding: 23px 16px 24px 16px;
32
+ flex-direction: column;
33
+ align-items: flex-start;
34
+ gap: 12px;
35
+ background: #FFF;
36
+ }
37
+
38
+ .blog-image {
39
+ background: var(--Primary-Light-grey, #F4F7FB);
40
+ width: 100%;
41
+ height: 100%;
42
+ object-fit: cover;
43
+ }
44
+
45
+ .blog-title {
46
+ display: -webkit-box;
47
+ line-clamp: 1;
48
+ -webkit-line-clamp: 1;
49
+ -webkit-box-orient: vertical;
50
+ overflow: hidden;
51
+ }
52
+
53
+ .blog-description {
54
+ display: -webkit-box;
55
+ line-clamp: 3;
56
+ -webkit-line-clamp: 3;
57
+ -webkit-box-orient: vertical;
58
+ overflow: hidden;
59
+ }
60
+
61
+ .blog-top-section.placeholder {
62
+ background: var(--Primary-Light-grey, #F4F7FB);
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ color: #ccc;
67
+ font-family: Arial, sans-serif;
68
+ font-size: 14px;
69
+ }
70
+
71
+ .tags-container {
72
+ display: flex;
73
+ flex-direction: row;
74
+ flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
75
+ gap: 8px;
76
+ max-width: 100%;
77
+ overflow-x: auto; /* Garde la possibilité de scroller horizontalement si la largeur dépasse */
78
+ scroll-behavior: smooth;
79
+ }
80
+
81
+ .blog-bottom-section-up {
82
+ display: flex;
83
+ justify-content: space-between;
84
+ align-items: center;
85
+ align-self: stretch;
86
+ width: 100%;
87
+ overflow: hidden;
88
+ }
89
+
90
+ .blog-bottom-section-down {
91
+ display: flex;
92
+ flex-direction: column;
93
+ align-items: flex-start;
94
+ gap: 16px;
95
+ align-self: stretch;
96
+ }
97
+
98
+ .blog-date {
99
+ color:#728EA7;
100
+ font-family: Inter;
101
+ font-size: 14px;
102
+ font-style: normal;
103
+ font-weight: 600;
104
+ line-height: normal;
105
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import './BlogArticle.css';
3
+ export type BlogArticleProps = {
4
+ Article_URL: string;
5
+ Image_URL: string;
6
+ Tags: string[];
7
+ Date: Date;
8
+ Title: string;
9
+ Description: string;
10
+ };
11
+ declare const BlogArticle: React.FC<BlogArticleProps>;
12
+ export default BlogArticle;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import './BlogArticle.css';
3
+ import Link from 'next/link';
4
+ import { OtherStatusTag } from '../../atoms/tags';
5
+ import { Heading, TinyInfo } from '../../atoms/typography';
6
+ import Image from 'next/image';
7
+ var BlogTopSection = function (_a) {
8
+ var Image_URL = _a.Image_URL, Title = _a.Title;
9
+ return (React.createElement("div", { className: "blog-top-section ".concat(!Image_URL ? 'placeholder' : '') }, Image_URL ? (React.createElement(Image, { className: "blog-image", src: Image_URL, alt: Title || 'Image de l’article de blog', width: 361, height: 230, objectFit: "cover" })) : (React.createElement("span", { className: "placeholder-text" }))));
10
+ };
11
+ var BlogBottomSection = function (_a) {
12
+ var Tags = _a.Tags, Date = _a.Date, Title = _a.Title, Description = _a.Description;
13
+ return (React.createElement("div", { className: "blog-bottom-section" },
14
+ React.createElement("div", { className: "blog-bottom-section-up" },
15
+ React.createElement("div", { className: "tags-container" }, Tags.map(function (tag, index) { return (React.createElement(OtherStatusTag, { key: index, label: tag })); })),
16
+ React.createElement(TinyInfo, { text: Date.toLocaleDateString(), variant: 'medium14', color: 'mid-grey' })),
17
+ React.createElement("div", { className: "blog-split-section" }),
18
+ React.createElement("div", { className: "blog-bottom-section-down" },
19
+ React.createElement("div", { className: "blog-title" },
20
+ React.createElement(Heading, { variant: "h6", text: Title, color: "noir", align: "center" })),
21
+ React.createElement("div", { className: 'blog-description' },
22
+ React.createElement(TinyInfo, { variant: "medium14", text: Description, color: "noir" })))));
23
+ };
24
+ var BlogArticle = function (_a) {
25
+ var Article_URL = _a.Article_URL, Image_URL = _a.Image_URL, Tags = _a.Tags, Date = _a.Date, Title = _a.Title, Description = _a.Description;
26
+ return (React.createElement(Link, { href: Article_URL, className: 'blog-container' },
27
+ React.createElement(BlogTopSection, { Image_URL: Image_URL, Title: Title }),
28
+ React.createElement(BlogBottomSection, { Tags: Tags, Date: Date, Title: Title, Description: Description })));
29
+ };
30
+ export default BlogArticle;
@@ -0,0 +1,10 @@
1
+ declare namespace _default {
2
+ export let title: string;
3
+ export { BlogArticle as component };
4
+ }
5
+ export default _default;
6
+ export const Default: any;
7
+ export const NoImage: any;
8
+ export const LongDescriptionTitle: any;
9
+ export const MultipleTags: any;
10
+ import BlogArticle from './BlogArticle';
@@ -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 BlogArticle from './BlogArticle';
14
+ export default {
15
+ title: 'Components/Molecules/BlogArticle',
16
+ component: BlogArticle,
17
+ };
18
+ var Template = function (args) { return React.createElement(BlogArticle, __assign({}, args)); };
19
+ export var Default = Template.bind({});
20
+ Default.args = {
21
+ Article_URL: 'https://example.com/article',
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'],
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.', 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'] });
@@ -0,0 +1,2 @@
1
+ export { default as BlogArticle } from "./BlogArticle";
2
+ export type { BlogArticleProps } from "./BlogArticle";
@@ -0,0 +1 @@
1
+ export { default as BlogArticle } from "./BlogArticle";
package/dist/index.d.ts CHANGED
@@ -61,3 +61,5 @@ export { default as Breadcrumb } from "./components/molecules/breadcrumb/Breadcr
61
61
  export { default as ProCard } from "./components/molecules/proCard/ProCard";
62
62
  export { default as Pagination } from "./components/molecules/pagination/Pagination";
63
63
  export type { PaginationProps } from "./components/molecules/pagination/Pagination";
64
+ export { default as BlogTextBlock } from './components/molecules/BlogTextBlock/BlogTextBlock';
65
+ export type { BlogTextBlockProps } from './components/molecules/BlogTextBlock/BlogTextBlock';
package/dist/index.js CHANGED
@@ -79,3 +79,4 @@ export { default as Breadcrumb } from "./components/molecules/breadcrumb/Breadcr
79
79
  export { default as ProCard } from "./components/molecules/proCard/ProCard";
80
80
  // Pagination
81
81
  export { default as Pagination } from "./components/molecules/pagination/Pagination";
82
+ export { default as BlogTextBlock } from './components/molecules/BlogTextBlock/BlogTextBlock';
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import "./header.css";
3
+ type User = {
4
+ name: string;
5
+ };
6
+ export interface HeaderProps {
7
+ user?: User;
8
+ onLogin?: () => void;
9
+ onLogout?: () => void;
10
+ onCreateAccount?: () => void;
11
+ }
12
+ export declare const Header: ({ user }: HeaderProps) => React.JSX.Element;
13
+ export {};
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ // import { Button } from './Button';
3
+ import "./header.css";
4
+ export var Header = function (_a) {
5
+ var user = _a.user;
6
+ return (React.createElement("header", null,
7
+ React.createElement("div", { className: "storybook-header" },
8
+ React.createElement("div", null,
9
+ React.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg" },
10
+ React.createElement("g", { fill: "none", fillRule: "evenodd" },
11
+ React.createElement("path", { d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z", fill: "#FFF" }),
12
+ React.createElement("path", { d: "M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z", fill: "#555AB9" }),
13
+ React.createElement("path", { d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z", fill: "#91BAF8" }))),
14
+ React.createElement("h1", null, "Acme")),
15
+ React.createElement("div", null, user ? (React.createElement(React.Fragment, null,
16
+ React.createElement("span", { className: "welcome" },
17
+ "Welcome, ",
18
+ React.createElement("b", null, user.name),
19
+ "!"))) : (React.createElement(React.Fragment, null))))));
20
+ };
@@ -0,0 +1,18 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ user }: import("./Header").HeaderProps) => import("react").JSX.Element;
5
+ tags: string[];
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ args: {
10
+ onLogin: import("@vitest/spy").Mock<(...args: any[]) => any>;
11
+ onLogout: import("@vitest/spy").Mock<(...args: any[]) => any>;
12
+ onCreateAccount: import("@vitest/spy").Mock<(...args: any[]) => any>;
13
+ };
14
+ };
15
+ export default meta;
16
+ type Story = StoryObj<typeof meta>;
17
+ export declare const LoggedIn: Story;
18
+ export declare const LoggedOut: Story;
@@ -0,0 +1,26 @@
1
+ import { fn } from '@storybook/test';
2
+ import { Header } from './Header';
3
+ var meta = {
4
+ title: 'Example/Header',
5
+ component: Header,
6
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
7
+ tags: ['autodocs'],
8
+ parameters: {
9
+ // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
10
+ layout: 'fullscreen',
11
+ },
12
+ args: {
13
+ onLogin: fn(),
14
+ onLogout: fn(),
15
+ onCreateAccount: fn(),
16
+ },
17
+ };
18
+ export default meta;
19
+ export var LoggedIn = {
20
+ args: {
21
+ user: {
22
+ name: 'Jane Doe',
23
+ },
24
+ },
25
+ };
26
+ export var LoggedOut = {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './page.css';
3
+ export declare const Page: React.FC;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { Header } from './Header';
3
+ import './page.css';
4
+ export var Page = function () {
5
+ var _a = React.useState(), user = _a[0], setUser = _a[1];
6
+ return (React.createElement("article", null,
7
+ React.createElement(Header, { user: user, onLogin: function () { return setUser({ name: 'Jane Doe' }); }, onLogout: function () { return setUser(undefined); }, onCreateAccount: function () { return setUser({ name: 'Jane Doe' }); } }),
8
+ React.createElement("section", { className: "storybook-page" },
9
+ React.createElement("h2", null, "Pages in Storybook"),
10
+ React.createElement("p", null,
11
+ "We recommend building UIs with a",
12
+ ' ',
13
+ React.createElement("a", { href: "https://componentdriven.org", target: "_blank", rel: "noopener noreferrer" },
14
+ React.createElement("strong", null, "component-driven")),
15
+ ' ',
16
+ "process starting with atomic components and ending with pages."),
17
+ React.createElement("p", null, "Render pages with mock data. This makes it easy to build and review page states without needing to navigate to them in your app. Here are some handy patterns for managing page data in Storybook:"),
18
+ React.createElement("ul", null,
19
+ React.createElement("li", null, "Use a higher-level connected component. Storybook helps you compose such data from the \"args\" of child component stories"),
20
+ React.createElement("li", null, "Assemble data in the page component from your services. You can mock these services out using Storybook.")),
21
+ React.createElement("p", null,
22
+ "Get a guided tutorial on component-driven development at",
23
+ ' ',
24
+ React.createElement("a", { href: "https://storybook.js.org/tutorials/", target: "_blank", rel: "noopener noreferrer" }, "Storybook tutorials"),
25
+ ". Read more in the",
26
+ ' ',
27
+ React.createElement("a", { href: "https://storybook.js.org/docs", target: "_blank", rel: "noopener noreferrer" }, "docs"),
28
+ "."),
29
+ React.createElement("div", { className: "tip-wrapper" },
30
+ React.createElement("span", { className: "tip" }, "Tip"),
31
+ " Adjust the width of the canvas with the",
32
+ ' ',
33
+ React.createElement("svg", { width: "10", height: "10", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" },
34
+ React.createElement("g", { fill: "none", fillRule: "evenodd" },
35
+ React.createElement("path", { d: "M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z", id: "a", fill: "#999" }))),
36
+ "Viewports addon in the toolbar"))));
37
+ };
@@ -0,0 +1,12 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import("react").FC<{}>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ };
9
+ export default meta;
10
+ type Story = StoryObj<typeof meta>;
11
+ export declare const LoggedOut: Story;
12
+ export declare const LoggedIn: Story;
@@ -0,0 +1,76 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import { within, userEvent, expect } from '@storybook/test';
38
+ import { Page } from './Page';
39
+ var meta = {
40
+ title: 'Example/Page',
41
+ component: Page,
42
+ parameters: {
43
+ // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
44
+ layout: 'fullscreen',
45
+ },
46
+ };
47
+ export default meta;
48
+ export var LoggedOut = {};
49
+ // More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing
50
+ export var LoggedIn = {
51
+ play: function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
52
+ var canvas, loginButton, logoutButton;
53
+ var canvasElement = _b.canvasElement;
54
+ return __generator(this, function (_c) {
55
+ switch (_c.label) {
56
+ case 0:
57
+ canvas = within(canvasElement);
58
+ loginButton = canvas.getByRole('button', { name: /Log in/i });
59
+ return [4 /*yield*/, expect(loginButton).toBeInTheDocument()];
60
+ case 1:
61
+ _c.sent();
62
+ return [4 /*yield*/, userEvent.click(loginButton)];
63
+ case 2:
64
+ _c.sent();
65
+ return [4 /*yield*/, expect(loginButton).not.toBeInTheDocument()];
66
+ case 3:
67
+ _c.sent();
68
+ logoutButton = canvas.getByRole('button', { name: /Log out/i });
69
+ return [4 /*yield*/, expect(logoutButton).toBeInTheDocument()];
70
+ case 4:
71
+ _c.sent();
72
+ return [2 /*return*/];
73
+ }
74
+ });
75
+ }); },
76
+ };
@@ -0,0 +1,32 @@
1
+ .storybook-header {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ align-items: center;
5
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
6
+ padding: 15px 20px;
7
+ font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
8
+ }
9
+
10
+ .storybook-header svg {
11
+ display: inline-block;
12
+ vertical-align: top;
13
+ }
14
+
15
+ .storybook-header h1 {
16
+ display: inline-block;
17
+ vertical-align: top;
18
+ margin: 6px 0 6px 10px;
19
+ font-weight: 700;
20
+ font-size: 20px;
21
+ line-height: 1;
22
+ }
23
+
24
+ .storybook-header button + button {
25
+ margin-left: 10px;
26
+ }
27
+
28
+ .storybook-header .welcome {
29
+ margin-right: 10px;
30
+ color: #333;
31
+ font-size: 14px;
32
+ }
@@ -0,0 +1,69 @@
1
+ .storybook-page {
2
+ margin: 0 auto;
3
+ padding: 48px 20px;
4
+ max-width: 600px;
5
+ color: #333;
6
+ font-size: 14px;
7
+ line-height: 24px;
8
+ font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
9
+ }
10
+
11
+ .storybook-page h2 {
12
+ display: inline-block;
13
+ vertical-align: top;
14
+ margin: 0 0 4px;
15
+ font-weight: 700;
16
+ font-size: 32px;
17
+ line-height: 1;
18
+ }
19
+
20
+ .storybook-page p {
21
+ margin: 1em 0;
22
+ }
23
+
24
+ .storybook-page a {
25
+ color: #1ea7fd;
26
+ text-decoration: none;
27
+ }
28
+
29
+ .storybook-page ul {
30
+ margin: 1em 0;
31
+ padding-left: 30px;
32
+ }
33
+
34
+ .storybook-page li {
35
+ margin-bottom: 8px;
36
+ }
37
+
38
+ .storybook-page .tip {
39
+ display: inline-block;
40
+ vertical-align: top;
41
+ margin-right: 10px;
42
+ border-radius: 1em;
43
+ background: #e7fdd8;
44
+ padding: 4px 12px;
45
+ color: #66bf3c;
46
+ font-weight: 700;
47
+ font-size: 11px;
48
+ line-height: 12px;
49
+ }
50
+
51
+ .storybook-page .tip-wrapper {
52
+ margin-top: 40px;
53
+ margin-bottom: 40px;
54
+ font-size: 13px;
55
+ line-height: 20px;
56
+ }
57
+
58
+ .storybook-page .tip-wrapper svg {
59
+ display: inline-block;
60
+ vertical-align: top;
61
+ margin-top: 3px;
62
+ margin-right: 4px;
63
+ width: 12px;
64
+ height: 12px;
65
+ }
66
+
67
+ .storybook-page .tip-wrapper svg path {
68
+ fill: #1ea7fd;
69
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "1.0.108",
3
+ "version": "1.0.112",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",