allaw-ui 2.0.6 → 2.0.8
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/featureCard/featureCard.d.ts +15 -0
- package/dist/components/atoms/featureCard/featureCard.js +19 -0
- package/dist/components/atoms/featureCard/featureCard.module.css +72 -0
- package/dist/components/atoms/featureCard/featureCard.stories.d.ts +21 -0
- package/dist/components/atoms/featureCard/featureCard.stories.js +101 -0
- package/dist/components/molecules/banner/Banner.d.ts +20 -0
- package/dist/components/molecules/banner/Banner.js +18 -0
- package/dist/components/molecules/banner/Banner.module.css +188 -0
- package/dist/components/molecules/banner/Banner.stories.d.ts +30 -0
- package/dist/components/molecules/banner/Banner.stories.js +105 -0
- package/dist/components/molecules/billingCount/BillingCount.stories.d.ts +2 -2
- package/dist/components/molecules/billingCount/BillingCount.stories.js +6 -6
- package/dist/components/molecules/featureGrid/FeatureGrid.d.ts +8 -0
- package/dist/components/molecules/featureGrid/FeatureGrid.js +11 -0
- package/dist/components/molecules/featureGrid/FeatureGrid.stories.d.ts +7 -0
- package/dist/components/molecules/featureGrid/FeatureGrid.stories.js +97 -0
- package/dist/components/molecules/featureGrid/featureGrid.module.css +72 -0
- package/dist/components/molecules/heroSection/HeroSection.d.ts +20 -0
- package/dist/components/molecules/heroSection/HeroSection.js +19 -0
- package/dist/components/molecules/heroSection/HeroSection.stories.d.ts +46 -0
- package/dist/components/molecules/heroSection/HeroSection.stories.js +73 -0
- package/dist/components/molecules/heroSection/heroSection.module.css +135 -0
- package/dist/components/molecules/stepper/Stepper.js +13 -1
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type FeatureType = {
|
|
3
|
+
title: string;
|
|
4
|
+
image: {
|
|
5
|
+
src: string;
|
|
6
|
+
alt: string;
|
|
7
|
+
};
|
|
8
|
+
content: string;
|
|
9
|
+
action?: {
|
|
10
|
+
href: string;
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare const FeatureCard: React.FC<FeatureType>;
|
|
15
|
+
export default FeatureCard;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styles from "./featureCard.module.css";
|
|
3
|
+
import { TertiaryButton } from "../buttons";
|
|
4
|
+
import Image from "next/image";
|
|
5
|
+
import Link from "next/link";
|
|
6
|
+
var FeatureCard = function (_a) {
|
|
7
|
+
var title = _a.title, image = _a.image, content = _a.content, action = _a.action;
|
|
8
|
+
return (React.createElement("div", { className: styles.featureCardContainer },
|
|
9
|
+
React.createElement("div", { className: styles.featureCardContent },
|
|
10
|
+
React.createElement(Image, { src: image.src, alt: image.alt, className: styles.featureCardImage, width: 200, height: 200 }),
|
|
11
|
+
React.createElement("div", { className: styles.featureCardTitle },
|
|
12
|
+
React.createElement("h3", null, title)),
|
|
13
|
+
React.createElement("div", { className: styles.featureCardDescription },
|
|
14
|
+
React.createElement("p", null, content))),
|
|
15
|
+
action && (React.createElement("div", { className: styles.actionButton },
|
|
16
|
+
React.createElement(Link, { href: action.href, passHref: true },
|
|
17
|
+
React.createElement(TertiaryButton, { label: action.label }))))));
|
|
18
|
+
};
|
|
19
|
+
export default FeatureCard;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.featureCardContainer {
|
|
2
|
+
min-height: 500px;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
width: 100%;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
padding: 32px;
|
|
9
|
+
border-radius: 16px;
|
|
10
|
+
background: #fff;
|
|
11
|
+
box-shadow: 0px 4px 12px 0px rgba(24, 24, 24, 0.16);
|
|
12
|
+
text-align: left;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.featureCardContent {
|
|
16
|
+
flex-grow: 1;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.featureCardImage {
|
|
21
|
+
object-fit: cover;
|
|
22
|
+
object-position: center;
|
|
23
|
+
border-radius: 16px;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: auto;
|
|
26
|
+
margin-bottom: 32px;
|
|
27
|
+
aspect-ratio: 16/9;
|
|
28
|
+
align-self: stretch;
|
|
29
|
+
position: relative;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.featureCardTitle {
|
|
33
|
+
color: var(--Primary-Mid-black, #171e25);
|
|
34
|
+
text-align: center;
|
|
35
|
+
font-family: Poppins;
|
|
36
|
+
font-size: 18px;
|
|
37
|
+
font-style: normal;
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
line-height: normal;
|
|
40
|
+
text-align: left;
|
|
41
|
+
margin-bottom: 26px;
|
|
42
|
+
display: -webkit-box;
|
|
43
|
+
line-clamp: 2;
|
|
44
|
+
-webkit-line-clamp: 2;
|
|
45
|
+
-webkit-box-orient: vertical;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.featureCardDescription {
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
color: var(--Primary-Dark-grey, #456073);
|
|
52
|
+
text-overflow: ellipsis;
|
|
53
|
+
word-break: break-word;
|
|
54
|
+
font-family: "Open Sans";
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
font-style: normal;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
max-width: 100%;
|
|
59
|
+
line-height: 140%;
|
|
60
|
+
margin-bottom: 24px;
|
|
61
|
+
display: -webkit-box;
|
|
62
|
+
line-clamp: 4;
|
|
63
|
+
-webkit-line-clamp: 4;
|
|
64
|
+
-webkit-box-orient: vertical;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@media (max-width: 1060px) {
|
|
68
|
+
.featureCardTitle {
|
|
69
|
+
height: auto;
|
|
70
|
+
margin-bottom: 16px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export let title: string;
|
|
3
|
+
export { FeatureCard as component };
|
|
4
|
+
export namespace argTypes {
|
|
5
|
+
namespace image {
|
|
6
|
+
let control: boolean;
|
|
7
|
+
}
|
|
8
|
+
namespace action {
|
|
9
|
+
let control_1: boolean;
|
|
10
|
+
export { control_1 as control };
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export default _default;
|
|
15
|
+
export const Default: any;
|
|
16
|
+
export const WithoutAction: any;
|
|
17
|
+
export const LongContent: any;
|
|
18
|
+
export const CustomImage: any;
|
|
19
|
+
export const ShortTitle: any;
|
|
20
|
+
export const LongTitle: any;
|
|
21
|
+
import FeatureCard from "./featureCard";
|
|
@@ -0,0 +1,101 @@
|
|
|
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 { Meta, StoryFn } from "@storybook/react";
|
|
14
|
+
import FeatureCard, { FeatureType } from "./featureCard";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Molecules/FeatureCard",
|
|
17
|
+
component: FeatureCard,
|
|
18
|
+
argTypes: {
|
|
19
|
+
image: {
|
|
20
|
+
control: false,
|
|
21
|
+
},
|
|
22
|
+
action: {
|
|
23
|
+
control: false,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
var Template = function (args) { return React.createElement(FeatureCard, __assign({}, args)); };
|
|
28
|
+
export var Default = Template.bind({});
|
|
29
|
+
Default.args = {
|
|
30
|
+
title: "Explore our services",
|
|
31
|
+
image: {
|
|
32
|
+
src: "https://images.unsplash.com/photo-1737229940875-293ed0c4e8af?q=80&w=1742&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
33
|
+
alt: "Placeholder image",
|
|
34
|
+
},
|
|
35
|
+
content: "Discover our tailored services designed to meet your needs. Our platform ensures you get the best solutions effortlessly.",
|
|
36
|
+
action: {
|
|
37
|
+
href: "/learn-more",
|
|
38
|
+
label: "Learn More",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
export var WithoutAction = Template.bind({});
|
|
42
|
+
WithoutAction.args = {
|
|
43
|
+
title: "Explore our services",
|
|
44
|
+
image: {
|
|
45
|
+
src: "https://images.unsplash.com/photo-1737229940875-293ed0c4e8af?q=80&w=1742&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
46
|
+
alt: "Placeholder image",
|
|
47
|
+
},
|
|
48
|
+
content: "Discover our tailored services designed to meet your needs. Our platform ensures you get the best solutions effortlessly.",
|
|
49
|
+
};
|
|
50
|
+
export var LongContent = Template.bind({});
|
|
51
|
+
LongContent.args = {
|
|
52
|
+
title: "Comprehensive Solutions",
|
|
53
|
+
image: {
|
|
54
|
+
src: "https://images.unsplash.com/photo-1737229940875-293ed0c4e8af?q=80&w=1742&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
55
|
+
alt: "Placeholder image",
|
|
56
|
+
},
|
|
57
|
+
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet tristique augue, a venenatis lorem. Quisque nec consequat quam. Cras vel orci nec quam pellentesque ultricies. Integer facilisis risus id cursus placerat, lacus mi varius nunc, et facilis sem ligula quis arcu. Fusce pharetra libero vel dui pellentesque, vel tincidunt lectus tristique.",
|
|
58
|
+
action: {
|
|
59
|
+
href: "/details",
|
|
60
|
+
label: "View Details",
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
export var CustomImage = Template.bind({});
|
|
64
|
+
CustomImage.args = {
|
|
65
|
+
title: "Custom Feature",
|
|
66
|
+
image: {
|
|
67
|
+
src: "https://images.unsplash.com/photo-1737157998574-2a75f0c52a09?q=80&w=1924&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
68
|
+
alt: "Custom placeholder image",
|
|
69
|
+
},
|
|
70
|
+
content: "This feature showcases custom images with a unique size and layout.",
|
|
71
|
+
action: {
|
|
72
|
+
href: "/custom",
|
|
73
|
+
label: "Explore",
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
export var ShortTitle = Template.bind({});
|
|
77
|
+
ShortTitle.args = {
|
|
78
|
+
title: "Short",
|
|
79
|
+
image: {
|
|
80
|
+
src: "https://images.unsplash.com/photo-1737229940875-293ed0c4e8af?q=80&w=1742&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
81
|
+
alt: "Placeholder image",
|
|
82
|
+
},
|
|
83
|
+
content: "This is a short title example with brief content.",
|
|
84
|
+
action: {
|
|
85
|
+
href: "/short-title",
|
|
86
|
+
label: "Check Out",
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
export var LongTitle = Template.bind({});
|
|
90
|
+
LongTitle.args = {
|
|
91
|
+
title: "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
|
|
92
|
+
image: {
|
|
93
|
+
src: "https://images.unsplash.com/photo-1737229940875-293ed0c4e8af?q=80&w=1742&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
94
|
+
alt: "Placeholder image",
|
|
95
|
+
},
|
|
96
|
+
content: "This is a short title example with brief content. This is a short title example with brief content This is a short title example with brief content This is a short title example with brief content This is a short title example with brief contentThis is a short title example with brief content. This is a short title example with brief content This is a short title example with brief content This is a short title example with brief content This is a short title example with brief contentThis is a short title example with brief content. This is a short title example with brief content This is a short title example with brief content This is a short title example with brief content This is a short title example with brief contentThis is a short title example with brief content. This is a short title example with brief content This is a short title example with brief content This is a short title example with brief content This is a short title example with brief content",
|
|
97
|
+
action: {
|
|
98
|
+
href: "/short-title",
|
|
99
|
+
label: "Check Out",
|
|
100
|
+
},
|
|
101
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type BannerProps = {
|
|
3
|
+
tag?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
content: string;
|
|
6
|
+
image?: {
|
|
7
|
+
src: string;
|
|
8
|
+
alt: string;
|
|
9
|
+
horizontalSide: "left" | "right";
|
|
10
|
+
verticalSide: "top" | "bottom";
|
|
11
|
+
};
|
|
12
|
+
action?: {
|
|
13
|
+
href: string;
|
|
14
|
+
label: string;
|
|
15
|
+
};
|
|
16
|
+
highlightColor: string;
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
};
|
|
19
|
+
declare const Banner: React.FC<BannerProps>;
|
|
20
|
+
export default Banner;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Image from "next/image";
|
|
3
|
+
import styles from "./Banner.module.css";
|
|
4
|
+
var Banner = function (_a) {
|
|
5
|
+
var tag = _a.tag, title = _a.title, content = _a.content, image = _a.image, action = _a.action, highlightColor = _a.highlightColor, backgroundColor = _a.backgroundColor;
|
|
6
|
+
var isMobile = typeof window !== "undefined" && window.innerWidth <= 995;
|
|
7
|
+
return (React.createElement("div", { className: styles.bannerContainer, style: { backgroundColor: backgroundColor } },
|
|
8
|
+
image && (React.createElement("div", { className: "".concat(styles.imageContainer, " ").concat(isMobile ? styles[image.verticalSide] : styles[image.horizontalSide]) },
|
|
9
|
+
React.createElement(Image, { src: image.src, alt: image.alt, fill: true, sizes: "(max-width: 995px) 100vw, 400px", className: styles.bannerImageContent }))),
|
|
10
|
+
React.createElement("div", { className: "".concat(styles.bannerContent, " ").concat(!image ? styles.bannerContentFullWidth : "") },
|
|
11
|
+
React.createElement("div", { className: styles.bannerHeading },
|
|
12
|
+
tag && (React.createElement("span", { className: styles.bannerTag, style: { color: highlightColor } }, tag)),
|
|
13
|
+
React.createElement("h2", { className: styles.bannerTitle }, title)),
|
|
14
|
+
React.createElement("p", { className: styles.bannerDescription }, content),
|
|
15
|
+
action && (React.createElement("a", { href: action.href, className: styles.action, style: { background: highlightColor }, "aria-label": action.label },
|
|
16
|
+
React.createElement("span", { className: styles.actionLabel }, action.label))))));
|
|
17
|
+
};
|
|
18
|
+
export default Banner;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
.bannerContainer {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
align-items: center;
|
|
6
|
+
padding: 64px;
|
|
7
|
+
gap: 64px;
|
|
8
|
+
border-radius: 32px;
|
|
9
|
+
width: 1347px;
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
background: #edf3f4;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.bannerContent {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
gap: 24px;
|
|
19
|
+
width: 100%;
|
|
20
|
+
max-width: 707px;
|
|
21
|
+
height: auto;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.bannerContentFullWidth {
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.imageContainer {
|
|
29
|
+
position: relative;
|
|
30
|
+
width: 100%;
|
|
31
|
+
max-width: 400px;
|
|
32
|
+
height: 350px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.bannerImageContent {
|
|
36
|
+
object-fit: cover;
|
|
37
|
+
object-position: center;
|
|
38
|
+
border-radius: 24px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.bannerHeading {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
align-items: flex-start;
|
|
45
|
+
gap: 5px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.bannerTag {
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
color: #2d6176;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
font-family: "Open Sans";
|
|
53
|
+
font-size: 20px;
|
|
54
|
+
font-style: normal;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
line-height: normal;
|
|
57
|
+
text-transform: uppercase;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.bannerTitle {
|
|
61
|
+
display: -webkit-box;
|
|
62
|
+
-webkit-box-orient: vertical;
|
|
63
|
+
line-clamp: 2;
|
|
64
|
+
-webkit-line-clamp: 2;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
text-overflow: ellipsis;
|
|
67
|
+
white-space: normal;
|
|
68
|
+
color: var(--Primary-Mid-black, #171e25);
|
|
69
|
+
font-family: Poppins, sans-serif;
|
|
70
|
+
font-size: 36px;
|
|
71
|
+
font-weight: 600;
|
|
72
|
+
max-width: 100%;
|
|
73
|
+
line-height: 1.4;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.bannerDescription {
|
|
77
|
+
display: -webkit-box;
|
|
78
|
+
-webkit-box-orient: vertical;
|
|
79
|
+
-webkit-line-clamp: 5;
|
|
80
|
+
line-clamp: 5;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
white-space: normal;
|
|
83
|
+
text-overflow: ellipsis;
|
|
84
|
+
color: var(--Primary-Dark-grey, #456073);
|
|
85
|
+
font-family: "Open Sans";
|
|
86
|
+
font-size: 20px;
|
|
87
|
+
font-style: normal;
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
max-width: 100%;
|
|
90
|
+
line-height: normal;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.action {
|
|
94
|
+
display: flex;
|
|
95
|
+
height: 48px;
|
|
96
|
+
padding: 12px 40px;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
align-items: center;
|
|
99
|
+
border-radius: 56px;
|
|
100
|
+
background: #2d6176;
|
|
101
|
+
max-width: 300px;
|
|
102
|
+
text-decoration: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.action:hover {
|
|
106
|
+
filter: brightness(95%);
|
|
107
|
+
transform: scale(1.005);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.actionLabel {
|
|
111
|
+
color: var(--Primary-Blanc, #fff);
|
|
112
|
+
font-family: "Open Sans";
|
|
113
|
+
font-size: 16px;
|
|
114
|
+
font-style: normal;
|
|
115
|
+
font-weight: 600;
|
|
116
|
+
line-height: normal;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.imageContainer.left {
|
|
120
|
+
order: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.imageContainer.right {
|
|
124
|
+
order: 2;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media (max-width: 995px) {
|
|
128
|
+
.bannerContainer {
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
width: auto;
|
|
131
|
+
height: 750px;
|
|
132
|
+
gap: 40px;
|
|
133
|
+
padding: 40px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.bannerDescription {
|
|
137
|
+
display: -webkit-box;
|
|
138
|
+
-webkit-box-orient: vertical;
|
|
139
|
+
-webkit-line-clamp: 5;
|
|
140
|
+
line-clamp: 5;
|
|
141
|
+
font-size: 16px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.bannerContent {
|
|
145
|
+
max-width: 100%;
|
|
146
|
+
justify-content: space-around;
|
|
147
|
+
gap: 30px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.imageContainer {
|
|
151
|
+
width: 341px;
|
|
152
|
+
height: 293px;
|
|
153
|
+
max-width: 100%;
|
|
154
|
+
margin: 0 auto;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.bannerImageContent {
|
|
158
|
+
object-fit: cover;
|
|
159
|
+
object-position: center;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.bannerHeading {
|
|
163
|
+
gap: 10px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.bannerTitle {
|
|
167
|
+
font-size: 24px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.imageContainer.top {
|
|
171
|
+
order: -1;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.imageContainer.bottom {
|
|
175
|
+
order: 1;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@media (max-width: 995px) and (min-width: 500px) {
|
|
180
|
+
.bannerContainer {
|
|
181
|
+
gap: 60px;
|
|
182
|
+
padding: 60px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.imageContainer {
|
|
186
|
+
width: 400px;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export let title: string;
|
|
3
|
+
export { Banner as component };
|
|
4
|
+
export namespace argTypes {
|
|
5
|
+
namespace highlightColor {
|
|
6
|
+
let control: string;
|
|
7
|
+
}
|
|
8
|
+
namespace backgroundColor {
|
|
9
|
+
let control_1: string;
|
|
10
|
+
export { control_1 as control };
|
|
11
|
+
}
|
|
12
|
+
namespace image {
|
|
13
|
+
let control_2: boolean;
|
|
14
|
+
export { control_2 as control };
|
|
15
|
+
}
|
|
16
|
+
namespace action {
|
|
17
|
+
let control_3: boolean;
|
|
18
|
+
export { control_3 as control };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export default _default;
|
|
23
|
+
export const Default: any;
|
|
24
|
+
export const HorizontalSideLeft: any;
|
|
25
|
+
export const HorizontalSideRight: any;
|
|
26
|
+
export const CustomColors: any;
|
|
27
|
+
export const VerticalSideTop: any;
|
|
28
|
+
export const VerticalSideBottom: any;
|
|
29
|
+
export const LongTextWithLongImage: any;
|
|
30
|
+
import Banner from "./Banner";
|
|
@@ -0,0 +1,105 @@
|
|
|
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 { Meta, StoryFn } from "@storybook/react";
|
|
14
|
+
import Banner, { BannerProps } from "./Banner";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Molecules/Banner",
|
|
17
|
+
component: Banner,
|
|
18
|
+
argTypes: {
|
|
19
|
+
highlightColor: { control: "color" },
|
|
20
|
+
backgroundColor: { control: "color" },
|
|
21
|
+
image: {
|
|
22
|
+
control: false,
|
|
23
|
+
},
|
|
24
|
+
action: {
|
|
25
|
+
control: false,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
var Template = function (args) { return React.createElement(Banner, __assign({}, args)); };
|
|
30
|
+
export var Default = Template.bind({});
|
|
31
|
+
Default.args = {
|
|
32
|
+
tag: "Promotion",
|
|
33
|
+
title: "Découvrez notre offre spéciale",
|
|
34
|
+
content: "Acc\u00E9dez \u00E0 des solutions juridiques rapides et adapt\u00E9es \u00E0 vos besoins.\n\n Consultez des experts qualifi\u00E9s en toute confiance, o\u00F9 que vous soyez.\n\n Obtenez des r\u00E9ponses claires et pr\u00E9cises \u00E0 vos questions juridiques.\n\n Rejoignez notre plateforme pour une justice plus accessible \u00E0 tous.",
|
|
35
|
+
highlightColor: "#FF5733",
|
|
36
|
+
backgroundColor: "#F8F9FA",
|
|
37
|
+
action: {
|
|
38
|
+
href: "/offer",
|
|
39
|
+
label: "Bouton",
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export var HorizontalSideLeft = Template.bind({});
|
|
43
|
+
HorizontalSideLeft.args = __assign(__assign({}, Default.args), { image: {
|
|
44
|
+
src: "https://plus.unsplash.com/premium_photo-1695449439526-9cebdbfa1a2c?q=80&w=2009&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
45
|
+
alt: "Offre spéciale à gauche",
|
|
46
|
+
horizontalSide: "left",
|
|
47
|
+
verticalSide: "top",
|
|
48
|
+
} });
|
|
49
|
+
export var HorizontalSideRight = Template.bind({});
|
|
50
|
+
HorizontalSideRight.args = __assign(__assign({}, Default.args), { image: {
|
|
51
|
+
src: "https://plus.unsplash.com/premium_photo-1695449439526-9cebdbfa1a2c?q=80&w=2009&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
52
|
+
alt: "Offre spéciale à droite",
|
|
53
|
+
horizontalSide: "right",
|
|
54
|
+
verticalSide: "top",
|
|
55
|
+
} });
|
|
56
|
+
export var CustomColors = Template.bind({});
|
|
57
|
+
CustomColors.args = {
|
|
58
|
+
tag: "Exclusivité",
|
|
59
|
+
title: "Ne manquez pas notre nouvelle offre",
|
|
60
|
+
content: "B\u00E9n\u00E9ficiez d'un service juridique personnalis\u00E9 pour r\u00E9pondre \u00E0 vos besoins.\n\n Consultez nos experts en toute simplicit\u00E9 et obtenez des solutions rapides et efficaces.\n\n Rejoignez notre plateforme pour acc\u00E9der \u00E0 des offres exclusives.",
|
|
61
|
+
highlightColor: "#4CAF50",
|
|
62
|
+
backgroundColor: "#E8F5E9",
|
|
63
|
+
action: {
|
|
64
|
+
href: "/exclusive",
|
|
65
|
+
label: "Découvrir l'offre",
|
|
66
|
+
},
|
|
67
|
+
image: {
|
|
68
|
+
src: "https://images.unsplash.com/photo-1593642532973-d31b6557fa68?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=60",
|
|
69
|
+
alt: "Exclusivité sur les offres",
|
|
70
|
+
horizontalSide: "right",
|
|
71
|
+
verticalSide: "top",
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
export var VerticalSideTop = Template.bind({});
|
|
75
|
+
VerticalSideTop.args = __assign(__assign({}, HorizontalSideLeft.args), { image: {
|
|
76
|
+
src: "https://plus.unsplash.com/premium_photo-1695449439526-9cebdbfa1a2c?q=80&w=2009&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
77
|
+
alt: "Image en haut",
|
|
78
|
+
horizontalSide: "left",
|
|
79
|
+
verticalSide: "top",
|
|
80
|
+
} });
|
|
81
|
+
export var VerticalSideBottom = Template.bind({});
|
|
82
|
+
VerticalSideBottom.args = __assign(__assign({}, HorizontalSideRight.args), { image: {
|
|
83
|
+
src: "https://plus.unsplash.com/premium_photo-1695449439526-9cebdbfa1a2c?q=80&w=2009&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
84
|
+
alt: "Image en haut",
|
|
85
|
+
horizontalSide: "right",
|
|
86
|
+
verticalSide: "bottom",
|
|
87
|
+
} });
|
|
88
|
+
export var LongTextWithLongImage = Template.bind({});
|
|
89
|
+
LongTextWithLongImage.args = {
|
|
90
|
+
tag: "Annonce",
|
|
91
|
+
title: "Découvrez tous les détails",
|
|
92
|
+
content: "Nous proposons des solutions juridiques sur mesure pour r\u00E9pondre \u00E0 vos besoins sp\u00E9cifiques.\n\n Notre \u00E9quipe d'experts est disponible pour vous accompagner dans toutes vos d\u00E9marches, qu'il s'agisse de conseils juridiques, de r\u00E9daction de documents ou de repr\u00E9sentation l\u00E9gale.\n\n Profitez de notre plateforme intuitive pour acc\u00E9der \u00E0 des services rapides, fiables et enti\u00E8rement personnalis\u00E9s.\n\n Nos services incluent \u00E9galement des guides d\u00E9taill\u00E9s pour vous aider \u00E0 mieux comprendre vos droits et vos obligations.\n\n N'attendez plus pour b\u00E9n\u00E9ficier de conseils avis\u00E9s et d'un accompagnement complet.\n\n Rejoignez notre communaut\u00E9 d\u00E8s aujourd'hui et profitez de tous les avantages que nous offrons.",
|
|
93
|
+
highlightColor: "#FFC107",
|
|
94
|
+
backgroundColor: "#FFF8E1",
|
|
95
|
+
action: {
|
|
96
|
+
href: "/details",
|
|
97
|
+
label: "Lire la suite",
|
|
98
|
+
},
|
|
99
|
+
image: {
|
|
100
|
+
src: "https://plus.unsplash.com/premium_photo-1693966067170-2835a8a17a18?q=80&w=1827&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
101
|
+
alt: "Illustration pour long texte",
|
|
102
|
+
horizontalSide: "right",
|
|
103
|
+
verticalSide: "top",
|
|
104
|
+
},
|
|
105
|
+
};
|
|
@@ -9,15 +9,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import React, { useState } from
|
|
13
|
-
import BillingCount from
|
|
12
|
+
import React, { useState } from "react";
|
|
13
|
+
import BillingCount from "./BillingCount";
|
|
14
14
|
export default {
|
|
15
|
-
title:
|
|
15
|
+
title: "Components/Molecules/BillingCount",
|
|
16
16
|
component: BillingCount,
|
|
17
17
|
};
|
|
18
18
|
// Mock function to log the end time
|
|
19
19
|
var onEnd = function (time) {
|
|
20
|
-
console.log(
|
|
20
|
+
console.log("Billing ended at:", time);
|
|
21
21
|
};
|
|
22
22
|
// Template for creating stories
|
|
23
23
|
var Template = function (args) { return React.createElement(BillingCount, __assign({}, args)); };
|
|
@@ -29,7 +29,7 @@ export var WithStartedState = function (args) {
|
|
|
29
29
|
var _a = useState(true), started = _a[0], setStarted = _a[1];
|
|
30
30
|
var handleEnd = function (time) {
|
|
31
31
|
setStarted(false);
|
|
32
|
-
console.log(
|
|
32
|
+
console.log("Billing ended at:", time);
|
|
33
33
|
};
|
|
34
34
|
return React.createElement(BillingCount, { onEnd: handleEnd });
|
|
35
35
|
};
|
|
@@ -37,7 +37,7 @@ WithStartedState.story = {
|
|
|
37
37
|
parameters: {
|
|
38
38
|
docs: {
|
|
39
39
|
description: {
|
|
40
|
-
story:
|
|
40
|
+
story: "This story demonstrates the BillingCount component with an initially started timer.",
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
},
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FeatureType } from "../../atoms/featureCard/featureCard";
|
|
3
|
+
export type FeatureGridProps = {
|
|
4
|
+
title?: string;
|
|
5
|
+
features: FeatureType[];
|
|
6
|
+
};
|
|
7
|
+
declare const FeatureGrid: React.FC<FeatureGridProps>;
|
|
8
|
+
export default FeatureGrid;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styles from "./featureGrid.module.css";
|
|
3
|
+
import FeatureCard from "../../atoms/featureCard/featureCard";
|
|
4
|
+
var FeatureGrid = function (_a) {
|
|
5
|
+
var title = _a.title, features = _a.features;
|
|
6
|
+
return (React.createElement("div", { className: styles.featureGridWrapper },
|
|
7
|
+
title && React.createElement("h2", { className: styles.featureGridTitle }, title),
|
|
8
|
+
React.createElement("div", { className: styles.featureGridContainer }, features.map(function (feature, index) { return (React.createElement("div", { className: styles.featureGridItem, key: index },
|
|
9
|
+
React.createElement(FeatureCard, { key: index, title: feature.title, image: feature.image, content: feature.content, action: feature.action }))); }))));
|
|
10
|
+
};
|
|
11
|
+
export default FeatureGrid;
|
|
@@ -0,0 +1,97 @@
|
|
|
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 { Meta, StoryFn } from "@storybook/react";
|
|
14
|
+
import FeatureGrid, { FeatureGridProps } from "./FeatureGrid";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Molecules/FeatureGrid",
|
|
17
|
+
component: FeatureGrid,
|
|
18
|
+
};
|
|
19
|
+
var Template = function (args) { return React.createElement(FeatureGrid, __assign({}, args)); };
|
|
20
|
+
export var Default = Template.bind({});
|
|
21
|
+
Default.args = {
|
|
22
|
+
title: "Explore Our Features",
|
|
23
|
+
features: [
|
|
24
|
+
{
|
|
25
|
+
title: "FeatureGrid stories",
|
|
26
|
+
image: {
|
|
27
|
+
src: "https://images.unsplash.com/reserve/LJIZlzHgQ7WPSh5KVTCB_Typewriter.jpg?q=80&w=1896&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
28
|
+
alt: "Placeholder image",
|
|
29
|
+
},
|
|
30
|
+
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet tristique augue, a venenatis lorem. Quisque nec consequat quam.",
|
|
31
|
+
action: {
|
|
32
|
+
href: "/learn-more",
|
|
33
|
+
label: "En savoir plus",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: "Comprehensive Solutions",
|
|
38
|
+
image: {
|
|
39
|
+
src: "https://images.unsplash.com/photo-1491895200222-0fc4a4c35e18?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
40
|
+
alt: "Placeholder image",
|
|
41
|
+
},
|
|
42
|
+
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet tristique augue, a venenatis lorem. Quisque nec consequat quam.",
|
|
43
|
+
action: {
|
|
44
|
+
href: "/details",
|
|
45
|
+
label: "En savoir plus",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: "Custom Feature",
|
|
50
|
+
image: {
|
|
51
|
+
src: "https://images.unsplash.com/photo-1737157998574-2a75f0c52a09?q=80&w=1924&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
52
|
+
alt: "Custom placeholder image",
|
|
53
|
+
},
|
|
54
|
+
content: "This feature showcases custom images with a unique size and layout.",
|
|
55
|
+
action: {
|
|
56
|
+
href: "/custom",
|
|
57
|
+
label: "En savoir plus",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: "Explore our services",
|
|
62
|
+
image: {
|
|
63
|
+
src: "https://images.unsplash.com/photo-1737229940875-293ed0c4e8af?q=80&w=1742&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
64
|
+
alt: "Placeholder image",
|
|
65
|
+
},
|
|
66
|
+
content: "Discover our tailored services designed to meet your needs. Our platform ensures you get the best solutions effortlessly.",
|
|
67
|
+
action: {
|
|
68
|
+
href: "/learn-more",
|
|
69
|
+
label: "Learn More",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
title: "Explore our services",
|
|
74
|
+
image: {
|
|
75
|
+
src: "https://images.unsplash.com/photo-1737229940875-293ed0c4e8af?q=80&w=1742&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
76
|
+
alt: "Placeholder image",
|
|
77
|
+
},
|
|
78
|
+
content: "Discover our tailored services designed to meet your needs. Our platform ensures you get the best solutions effortlessly.",
|
|
79
|
+
action: {
|
|
80
|
+
href: "/learn-more",
|
|
81
|
+
label: "Learn More",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
title: "Explore our services",
|
|
86
|
+
image: {
|
|
87
|
+
src: "https://images.unsplash.com/photo-1737229940875-293ed0c4e8af?q=80&w=1742&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
88
|
+
alt: "Placeholder image",
|
|
89
|
+
},
|
|
90
|
+
content: "Discover our tailored services designed to meet your needs. Our platform ensures you get the best solutions effortlessly.",
|
|
91
|
+
action: {
|
|
92
|
+
href: "/learn-more",
|
|
93
|
+
label: "Learn More",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.featureGridWrapper {
|
|
2
|
+
background-color: #fff;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: center;
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: 1280px;
|
|
8
|
+
margin-left: auto;
|
|
9
|
+
margin-right: auto;
|
|
10
|
+
max-width: 100vw;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.featureGridTitle {
|
|
14
|
+
color: var(--Primary-Mid-black, #171e25);
|
|
15
|
+
text-align: center;
|
|
16
|
+
font-family: Poppins;
|
|
17
|
+
font-size: 46px;
|
|
18
|
+
font-style: normal;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
line-height: normal;
|
|
21
|
+
display: flex;
|
|
22
|
+
height: 68px;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
align-self: stretch;
|
|
26
|
+
margin-bottom: 40px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.featureGridContainer {
|
|
30
|
+
max-width: 1280px;
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: repeat(3, 1fr);
|
|
33
|
+
gap: 40px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.featureGridItem {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@media (max-width: 1440px) {
|
|
42
|
+
.featureGridWrapper {
|
|
43
|
+
margin-left: 80px;
|
|
44
|
+
margin-right: 80px;
|
|
45
|
+
width: calc(100% - 160px);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (max-width: 995px) {
|
|
50
|
+
.featureGridWrapper {
|
|
51
|
+
width: unset;
|
|
52
|
+
margin-left: 26px;
|
|
53
|
+
margin-right: 26px;
|
|
54
|
+
width: calc(100% - 52px);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.featureGridTitle {
|
|
58
|
+
margin-bottom: 24px;
|
|
59
|
+
font-size: 28px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.featureGridContainer {
|
|
63
|
+
gap: 16px;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
grid-template-columns: 1fr;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.featureGridItem {
|
|
69
|
+
flex: 0 1 100%;
|
|
70
|
+
max-width: 100%;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type HeroSectionProps = {
|
|
3
|
+
reverse?: boolean;
|
|
4
|
+
title: string;
|
|
5
|
+
content: string;
|
|
6
|
+
imageBackground: {
|
|
7
|
+
src: string;
|
|
8
|
+
alt: string;
|
|
9
|
+
};
|
|
10
|
+
imageTop: {
|
|
11
|
+
src: string;
|
|
12
|
+
alt: string;
|
|
13
|
+
};
|
|
14
|
+
action: {
|
|
15
|
+
href: string;
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
declare const HeroSection: React.FC<HeroSectionProps>;
|
|
20
|
+
export default HeroSection;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styles from "./heroSection.module.css";
|
|
3
|
+
import Image from "next/image";
|
|
4
|
+
var HeroSection = function (_a) {
|
|
5
|
+
var _b = _a.reverse, reverse = _b === void 0 ? false : _b, title = _a.title, content = _a.content, imageBackground = _a.imageBackground, imageTop = _a.imageTop, action = _a.action;
|
|
6
|
+
return (React.createElement("div", { className: "".concat(styles.heroSection, " ").concat(reverse ? styles.reverse : "") },
|
|
7
|
+
React.createElement("div", { className: styles.leftSection },
|
|
8
|
+
React.createElement("div", { className: styles.heroSectionContent },
|
|
9
|
+
React.createElement("h2", { className: styles.heroSectionTitle }, title),
|
|
10
|
+
React.createElement("p", { className: styles.heroSectionParagraph }, content),
|
|
11
|
+
React.createElement("a", { href: action.href, className: styles.action },
|
|
12
|
+
React.createElement("span", { className: styles.actionLabel }, action.label)))),
|
|
13
|
+
React.createElement("div", { className: styles.rightSection },
|
|
14
|
+
React.createElement("div", { className: styles.heroSectionBgImage },
|
|
15
|
+
React.createElement(Image, { src: imageBackground.src, alt: imageBackground.alt, className: styles.heroSectionImage, width: 1000, height: 1000 })),
|
|
16
|
+
React.createElement("div", { className: styles.heroSectionTopImage },
|
|
17
|
+
React.createElement(Image, { layout: "responsive", width: 615, height: 322, className: styles.heroSectionImage, src: imageTop.src, alt: imageTop.alt })))));
|
|
18
|
+
};
|
|
19
|
+
export default HeroSection;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export let title: string;
|
|
3
|
+
export { HeroSection as component };
|
|
4
|
+
export namespace argTypes {
|
|
5
|
+
export namespace reverse {
|
|
6
|
+
let control: string;
|
|
7
|
+
let description: string;
|
|
8
|
+
}
|
|
9
|
+
export namespace title_1 {
|
|
10
|
+
let control_1: string;
|
|
11
|
+
export { control_1 as control };
|
|
12
|
+
let description_1: string;
|
|
13
|
+
export { description_1 as description };
|
|
14
|
+
}
|
|
15
|
+
export { title_1 as title };
|
|
16
|
+
export namespace content {
|
|
17
|
+
let control_2: string;
|
|
18
|
+
export { control_2 as control };
|
|
19
|
+
let description_2: string;
|
|
20
|
+
export { description_2 as description };
|
|
21
|
+
}
|
|
22
|
+
export namespace imageBackground {
|
|
23
|
+
let control_3: string;
|
|
24
|
+
export { control_3 as control };
|
|
25
|
+
let description_3: string;
|
|
26
|
+
export { description_3 as description };
|
|
27
|
+
}
|
|
28
|
+
export namespace imageTop {
|
|
29
|
+
let control_4: string;
|
|
30
|
+
export { control_4 as control };
|
|
31
|
+
let description_4: string;
|
|
32
|
+
export { description_4 as description };
|
|
33
|
+
}
|
|
34
|
+
export namespace action {
|
|
35
|
+
let control_5: string;
|
|
36
|
+
export { control_5 as control };
|
|
37
|
+
let description_5: string;
|
|
38
|
+
export { description_5 as description };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export default _default;
|
|
43
|
+
export const Default: any;
|
|
44
|
+
export const Reversed: any;
|
|
45
|
+
export const CustomImages: any;
|
|
46
|
+
import HeroSection from "./HeroSection";
|
|
@@ -0,0 +1,73 @@
|
|
|
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 { Meta, StoryFn } from "@storybook/react";
|
|
14
|
+
import HeroSection, { HeroSectionProps } from "./HeroSection";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Molecules/HeroSection",
|
|
17
|
+
component: HeroSection,
|
|
18
|
+
argTypes: {
|
|
19
|
+
reverse: {
|
|
20
|
+
control: "boolean",
|
|
21
|
+
description: "Inverse l'ordre des sections (blanche et image)",
|
|
22
|
+
},
|
|
23
|
+
title: {
|
|
24
|
+
control: "text",
|
|
25
|
+
description: "Titre principal de la section",
|
|
26
|
+
},
|
|
27
|
+
content: {
|
|
28
|
+
control: "text",
|
|
29
|
+
description: "Contenu descriptif de la section",
|
|
30
|
+
},
|
|
31
|
+
imageBackground: {
|
|
32
|
+
control: "object",
|
|
33
|
+
description: "Image de fond pour la section droite",
|
|
34
|
+
},
|
|
35
|
+
imageTop: {
|
|
36
|
+
control: "object",
|
|
37
|
+
description: "Image affichée au-dessus du contenu",
|
|
38
|
+
},
|
|
39
|
+
action: {
|
|
40
|
+
control: "object",
|
|
41
|
+
description: "Lien d'action avec texte et URL",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
var Template = function (args) { return React.createElement(HeroSection, __assign({}, args)); };
|
|
46
|
+
export var Default = Template.bind({});
|
|
47
|
+
Default.args = {
|
|
48
|
+
reverse: false,
|
|
49
|
+
title: "Ma vie de freelance, mais en mieux",
|
|
50
|
+
content: "Recevez des offres de missions en adéquation avec vos compétences, communiquez directement avec 70 000 clients potentiels issus de tous les secteurs et réduisez vos tâches administratives à l'aide de nos outils en ligne.",
|
|
51
|
+
imageBackground: {
|
|
52
|
+
src: "https://images.unsplash.com/photo-1711873314952-7a2f19edb96a?q=80&w=1740&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
|
53
|
+
alt: "Image de fond",
|
|
54
|
+
},
|
|
55
|
+
imageTop: {
|
|
56
|
+
src: "https://images.prismic.io/malt-cms-marketing/dd99e584-03d7-4988-b503-e77341fd8bad_2022_REBRAND_WEBSITE_HOME_CONTENT-1+%281%29.png?auto=enhanced,format&w=636&h=348",
|
|
57
|
+
alt: "Image au-dessus du contenu",
|
|
58
|
+
},
|
|
59
|
+
action: {
|
|
60
|
+
href: "/learn-more",
|
|
61
|
+
label: "Créer mon profil",
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
export var Reversed = Template.bind({});
|
|
65
|
+
Reversed.args = __assign(__assign({}, Default.args), { reverse: true, title: "Ma vie de freelance, mais en mieux", content: "Recevez des offres de missions en adéquation avec vos compétences, communiquez directement avec 70 000 clients potentiels issus de tous les secteurs et réduisez vos tâches administratives à l'aide de nos outils en ligne." });
|
|
66
|
+
export var CustomImages = Template.bind({});
|
|
67
|
+
CustomImages.args = __assign(__assign({}, Default.args), { title: "Ma vie de freelance, mais en mieux", imageBackground: {
|
|
68
|
+
src: "https://via.placeholder.com/800x600",
|
|
69
|
+
alt: "Image personnalisée de fond",
|
|
70
|
+
}, imageTop: {
|
|
71
|
+
src: "https://via.placeholder.com/200x150",
|
|
72
|
+
alt: "Image personnalisée au-dessus du contenu",
|
|
73
|
+
} });
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
.heroSection {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 675px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
border: 1px solid black;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.leftSection {
|
|
11
|
+
flex: 6;
|
|
12
|
+
background: #fff;
|
|
13
|
+
height: 100%;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: flex-end;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
width: 1400px;
|
|
19
|
+
padding-right: 40px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.heroSection.reverse {
|
|
23
|
+
flex-direction: row-reverse;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.heroSection.reverse .heroSectionTopImage {
|
|
27
|
+
left: auto;
|
|
28
|
+
right: 0%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.heroSection.reverse .leftSection {
|
|
32
|
+
align-items: flex-start;
|
|
33
|
+
padding-right: 0;
|
|
34
|
+
padding-left: 40px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.rightSection {
|
|
38
|
+
flex: 4;
|
|
39
|
+
height: 100%;
|
|
40
|
+
position: relative;
|
|
41
|
+
background-size: cover;
|
|
42
|
+
background-position: center;
|
|
43
|
+
background-repeat: no-repeat;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.heroSectionBgImage {
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 0;
|
|
49
|
+
left: 0;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
z-index: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.heroSectionTopImage {
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 50%;
|
|
58
|
+
left: 0%;
|
|
59
|
+
width: 90%;
|
|
60
|
+
transform: translateY(-50%);
|
|
61
|
+
z-index: 2;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.heroSectionContent {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
align-items: flex-start;
|
|
68
|
+
gap: 24px;
|
|
69
|
+
height: 350px;
|
|
70
|
+
width: 80%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.heroSectionTitle {
|
|
74
|
+
color: var(--Primary-Mid-black, #171e25);
|
|
75
|
+
font-family: Poppins;
|
|
76
|
+
font-size: 36px;
|
|
77
|
+
font-style: normal;
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
line-height: normal;
|
|
80
|
+
display: -webkit-box;
|
|
81
|
+
-webkit-box-orient: vertical;
|
|
82
|
+
line-clamp: 2;
|
|
83
|
+
-webkit-line-clamp: 2;
|
|
84
|
+
max-width: 100%;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.heroSectionImage {
|
|
88
|
+
width: 100%;
|
|
89
|
+
height: 100%;
|
|
90
|
+
object-fit: cover;
|
|
91
|
+
object-position: center;
|
|
92
|
+
display: block;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.heroSectionParagraph {
|
|
96
|
+
color: var(--Primary-Dark-grey, #456073);
|
|
97
|
+
display: -webkit-box;
|
|
98
|
+
-webkit-box-orient: vertical;
|
|
99
|
+
-webkit-line-clamp: 4;
|
|
100
|
+
line-clamp: 4;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
white-space: normal;
|
|
103
|
+
text-overflow: ellipsis;
|
|
104
|
+
font-family: "Open Sans";
|
|
105
|
+
font-size: 20px;
|
|
106
|
+
font-style: normal;
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
line-height: normal;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.action {
|
|
112
|
+
display: flex;
|
|
113
|
+
height: 48px;
|
|
114
|
+
padding: 12px 40px;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
align-items: center;
|
|
117
|
+
border-radius: 56px;
|
|
118
|
+
background: #2d6176;
|
|
119
|
+
max-width: 300px;
|
|
120
|
+
text-decoration: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.action:hover {
|
|
124
|
+
filter: brightness(95%);
|
|
125
|
+
transform: scale(1.005);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.actionLabel {
|
|
129
|
+
color: var(--Primary-Blanc, #fff);
|
|
130
|
+
font-family: "Open Sans";
|
|
131
|
+
font-size: 16px;
|
|
132
|
+
font-style: normal;
|
|
133
|
+
font-weight: 600;
|
|
134
|
+
line-height: normal;
|
|
135
|
+
}
|
|
@@ -101,9 +101,21 @@ var Stepper = function (_a) {
|
|
|
101
101
|
}, [onClose]);
|
|
102
102
|
var handleMouseDown = useCallback(function (e) {
|
|
103
103
|
var selectList = document.querySelector('[class*="selectList"]');
|
|
104
|
+
var datepickerElements = document.querySelectorAll([
|
|
105
|
+
".datepicker-portal",
|
|
106
|
+
".react-datepicker",
|
|
107
|
+
".react-datepicker__month-container",
|
|
108
|
+
".react-datepicker__header",
|
|
109
|
+
".react-datepicker__day",
|
|
110
|
+
".react-datepicker__current-month",
|
|
111
|
+
".react-datepicker__month-dropdown",
|
|
112
|
+
".react-datepicker__year-dropdown",
|
|
113
|
+
].join(","));
|
|
114
|
+
var isClickOnDatepicker = Array.from(datepickerElements).some(function (element) { return element === null || element === void 0 ? void 0 : element.contains(e.target); });
|
|
104
115
|
if (stepperContainerRef.current &&
|
|
105
116
|
!stepperContainerRef.current.contains(e.target) &&
|
|
106
|
-
!(selectList === null || selectList === void 0 ? void 0 : selectList.contains(e.target))
|
|
117
|
+
!(selectList === null || selectList === void 0 ? void 0 : selectList.contains(e.target)) &&
|
|
118
|
+
!isClickOnDatepicker) {
|
|
107
119
|
handleClose();
|
|
108
120
|
}
|
|
109
121
|
}, [handleClose]);
|