allaw-ui 2.9.3 → 2.9.5
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/typography/Heading.js +1 -1
- package/dist/components/atoms/typography/Heading.stories.d.ts +1 -0
- package/dist/components/atoms/typography/Heading.stories.js +9 -1
- package/dist/components/molecules/questionAnswer/QuestionAnswer.d.ts +1 -0
- package/dist/components/molecules/questionAnswer/QuestionAnswer.js +3 -8
- package/dist/components/molecules/questionAnswer/questionAnswer.module.css +15 -40
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React, { useEffect, useState } from "react";
|
|
3
3
|
import "./Heading.css";
|
|
4
4
|
var Heading = function (_a) {
|
|
5
|
-
var variant = _a.variant, _b = _a.color, color = _b === void 0 ? "pure-white" : _b, text = _a.text, _c = _a.align, align = _c === void 0 ? "
|
|
5
|
+
var variant = _a.variant, _b = _a.color, color = _b === void 0 ? "pure-white" : _b, text = _a.text, _c = _a.align, align = _c === void 0 ? "left" : _c, responsiveSize = _a.responsiveSize, _d = _a.as, Component = _d === void 0 ? "span" : _d;
|
|
6
6
|
var _e = useState(variant), currentVariant = _e[0], setCurrentVariant = _e[1];
|
|
7
7
|
useEffect(function () {
|
|
8
8
|
if (!responsiveSize)
|
|
@@ -61,8 +61,8 @@ export default {
|
|
|
61
61
|
backgrounds: {
|
|
62
62
|
default: "light",
|
|
63
63
|
values: [
|
|
64
|
-
{ name: "light", value: "#ffffff" },
|
|
65
64
|
{ name: "grey", value: "#728ea7" },
|
|
65
|
+
{ name: "light", value: "#ffffff" },
|
|
66
66
|
{ name: "figma", value: "#404040" },
|
|
67
67
|
{ name: "dark", value: "#171e25" },
|
|
68
68
|
],
|
|
@@ -140,3 +140,11 @@ CustomElement.args = {
|
|
|
140
140
|
text: "This heading uses a paragraph tag",
|
|
141
141
|
as: "p",
|
|
142
142
|
};
|
|
143
|
+
export var CenteredHeading = Template.bind({});
|
|
144
|
+
CenteredHeading.args = {
|
|
145
|
+
variant: "h3",
|
|
146
|
+
color: "bleu-allaw",
|
|
147
|
+
text: "This heading is centered",
|
|
148
|
+
align: "center",
|
|
149
|
+
as: "h3",
|
|
150
|
+
};
|
|
@@ -9,9 +9,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
9
9
|
};
|
|
10
10
|
import React, { useState } from "react";
|
|
11
11
|
import styles from "./questionAnswer.module.css";
|
|
12
|
-
import IconButton from "../../atoms/buttons/IconButton";
|
|
13
12
|
var QuestionAnswer = function (_a) {
|
|
14
|
-
var questions = _a.questions;
|
|
13
|
+
var questions = _a.questions, title = _a.title;
|
|
15
14
|
var _b = useState([]), openIndices = _b[0], setOpenIndices = _b[1];
|
|
16
15
|
var toggleAnswer = function (index) {
|
|
17
16
|
if (openIndices.includes(index)) {
|
|
@@ -23,15 +22,11 @@ var QuestionAnswer = function (_a) {
|
|
|
23
22
|
};
|
|
24
23
|
return (React.createElement("section", { className: styles.questionAnswerContainer, "aria-labelledby": "faq-title" },
|
|
25
24
|
React.createElement("div", { className: styles.questionAnswerContent },
|
|
26
|
-
React.createElement("h2", { className: styles.questionAnswerTitle }, "Questions
|
|
25
|
+
React.createElement("h2", { className: styles.questionAnswerTitle }, title ? title : "Questions Fréquemment Posées"),
|
|
27
26
|
React.createElement("ul", { className: styles.questionAnswerListContent }, questions.map(function (item, index) { return (React.createElement("li", { key: index, className: styles.questionAnswerItem, onClick: function () { return toggleAnswer(index); } },
|
|
28
27
|
React.createElement("div", { className: styles.questionContainer },
|
|
29
28
|
React.createElement("h3", { className: styles.questionTitle }, item.question),
|
|
30
|
-
React.createElement(
|
|
31
|
-
? "allaw-icon-chevron-up"
|
|
32
|
-
: "allaw-icon-chevron-down", "aria-label": openIndices.includes(index)
|
|
33
|
-
? "Fermer la r\u00E9ponse \u00E0 : ".concat(item.question)
|
|
34
|
-
: "Ouvrir la r\u00E9ponse \u00E0 : ".concat(item.question) })),
|
|
29
|
+
React.createElement("i", { className: !openIndices.includes(index) ? "allaw-icon-chevron-down" : "allaw-icon-chevron-up", style: { color: "#171E25" } })),
|
|
35
30
|
React.createElement("div", { id: "answer-".concat(index), className: "".concat(styles.answerContainer, " ").concat(openIndices.includes(index) ? styles.open : "") },
|
|
36
31
|
React.createElement("p", { className: styles.answer }, item.answer)))); })))));
|
|
37
32
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: auto;
|
|
4
4
|
display: flex;
|
|
5
|
-
padding: 64px 0;
|
|
6
5
|
flex-direction: column;
|
|
7
6
|
justify-content: center;
|
|
8
7
|
align-items: center;
|
|
@@ -16,14 +15,14 @@
|
|
|
16
15
|
height: auto;
|
|
17
16
|
flex-direction: column;
|
|
18
17
|
align-items: center;
|
|
19
|
-
gap:
|
|
18
|
+
gap: 56px;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
.questionAnswerTitle {
|
|
23
22
|
color: var(--Primary-Mid-black, #171e25);
|
|
24
|
-
text-align:
|
|
23
|
+
text-align: left;
|
|
25
24
|
font-family: Poppins;
|
|
26
|
-
font-size:
|
|
25
|
+
font-size: 26px;
|
|
27
26
|
font-style: normal;
|
|
28
27
|
font-weight: 600;
|
|
29
28
|
line-height: normal;
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
|
|
52
51
|
.questionContainer {
|
|
53
52
|
display: flex;
|
|
54
|
-
align-items:
|
|
53
|
+
align-items: center;
|
|
55
54
|
gap: 32px;
|
|
56
55
|
align-self: stretch;
|
|
57
56
|
justify-content: space-between;
|
|
@@ -59,9 +58,9 @@
|
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
.questionTitle {
|
|
62
|
-
color:
|
|
63
|
-
font-family:
|
|
64
|
-
font-size:
|
|
61
|
+
color: #171E25;
|
|
62
|
+
font-family: "Open Sans";
|
|
63
|
+
font-size: 18px;
|
|
65
64
|
font-style: normal;
|
|
66
65
|
font-weight: 600;
|
|
67
66
|
line-height: normal;
|
|
@@ -81,46 +80,22 @@
|
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
.answer {
|
|
84
|
-
color:
|
|
83
|
+
color: #456073;
|
|
85
84
|
font-family: "Open Sans";
|
|
86
|
-
font-size:
|
|
85
|
+
font-size: 16px;
|
|
87
86
|
font-weight: 400;
|
|
88
87
|
line-height: normal;
|
|
88
|
+
text-align: justify;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
@media (max-width:
|
|
92
|
-
.questionAnswerContainer {
|
|
93
|
-
padding: 26px 80px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.questionAnswerContent {
|
|
97
|
-
gap: 70px;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.questionAnswerTitle {
|
|
101
|
-
font-size: 26px;
|
|
102
|
-
}
|
|
103
|
-
|
|
91
|
+
@media (max-width: 800px) {
|
|
104
92
|
.answer {
|
|
105
|
-
|
|
93
|
+
text-align: justify;
|
|
106
94
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
@media (max-width: 450px) {
|
|
110
|
-
.questionAnswerContainer {
|
|
111
|
-
padding: 12px 40px;
|
|
112
|
-
gap: 20px;
|
|
95
|
+
.questionAnswerTitle {
|
|
96
|
+
font-size: 20px;
|
|
113
97
|
}
|
|
114
|
-
|
|
115
98
|
.questionAnswerContent {
|
|
116
|
-
gap:
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.questionTitle {
|
|
120
|
-
font-size: 18px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.answer {
|
|
124
|
-
font-size: 16px;
|
|
99
|
+
gap: 42px;
|
|
125
100
|
}
|
|
126
101
|
}
|