allaw-ui 1.0.143 → 1.0.144
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/selects/SelectableListItem.d.ts +3 -7
- package/dist/components/atoms/selects/SelectableListItem.js +6 -16
- package/dist/components/atoms/selects/SelectableListItem.module.css +86 -7
- package/dist/components/atoms/selects/SelectableListItem.stories.d.ts +3 -7
- package/dist/components/atoms/selects/SelectableListItem.stories.js +4 -46
- package/dist/stories/Header.stories.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "../../../styles/global.css";
|
|
3
3
|
export interface SelectableListItemProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
align?: string;
|
|
8
|
-
fontWeight?: "normal" | "bold";
|
|
9
|
-
color?: "mid-grey" | "dark-grey" | "noir" | "venom-grey-dark" | "actions-valid" | "actions-error";
|
|
10
|
-
}[];
|
|
4
|
+
label: string;
|
|
5
|
+
column2?: string;
|
|
6
|
+
column3?: string;
|
|
11
7
|
isActive: boolean;
|
|
12
8
|
onClick: () => void;
|
|
13
9
|
}
|
|
@@ -2,22 +2,12 @@ import React from "react";
|
|
|
2
2
|
import styles from "./SelectableListItem.module.css";
|
|
3
3
|
import "../../../styles/global.css";
|
|
4
4
|
var SelectableListItem = function (_a) {
|
|
5
|
-
var
|
|
5
|
+
var label = _a.label, column2 = _a.column2, column3 = _a.column3, isActive = _a.isActive, onClick = _a.onClick;
|
|
6
6
|
return (React.createElement("button", { className: "".concat(styles.selectableListItem, " ").concat(isActive ? styles.selectableListItemActive : ""), onClick: onClick },
|
|
7
|
-
React.createElement("
|
|
8
|
-
React.createElement("
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
minWidth: ((_b = label.width) === null || _b === void 0 ? void 0 : _b.includes("px")) ? label.width : undefined,
|
|
13
|
-
justifyContent: label.align === "start"
|
|
14
|
-
? "flex-start"
|
|
15
|
-
: label.align === "end"
|
|
16
|
-
? "flex-end"
|
|
17
|
-
: "center",
|
|
18
|
-
fontWeight: label.fontWeight === "bold" ? "bold" : "normal",
|
|
19
|
-
color: "var(--".concat(label.color, ", inherit)"),
|
|
20
|
-
} }, label.label));
|
|
21
|
-
}))));
|
|
7
|
+
React.createElement("div", { className: styles.selectableListItemIcon }, isActive && React.createElement("span", { className: styles.selectableListItemIconInner })),
|
|
8
|
+
React.createElement("span", { className: styles.selectableListItemLabel }, label),
|
|
9
|
+
React.createElement("div", { className: styles.selectableListItemColumnsWrapper },
|
|
10
|
+
column2 && (React.createElement("span", { className: styles.selectableListItemColumn2 }, column2)),
|
|
11
|
+
column3 && (React.createElement("span", { className: styles.selectableListItemColumn3 }, column3)))));
|
|
22
12
|
};
|
|
23
13
|
export default SelectableListItem;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
.selectableListItem {
|
|
2
2
|
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
3
4
|
align-items: center;
|
|
4
|
-
gap:
|
|
5
|
+
gap: 12px;
|
|
5
6
|
border: none;
|
|
6
7
|
background: none;
|
|
7
8
|
cursor: pointer;
|
|
@@ -12,6 +13,40 @@
|
|
|
12
13
|
width: 100%;
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
@media (max-width: 767px) {
|
|
17
|
+
.selectableListItem {
|
|
18
|
+
padding: 12px 16px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.selectableListItemIcon {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (max-width: 575px) {
|
|
27
|
+
.selectableListItem {
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
align-items: flex-start;
|
|
30
|
+
padding: 12px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.selectableListItemLabel {
|
|
34
|
+
margin-bottom: 8px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.selectableListItemColumnsWrapper {
|
|
38
|
+
flex-direction: row;
|
|
39
|
+
align-items: center;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (max-width: 413px) {
|
|
44
|
+
.selectableListItemColumnsWrapper {
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: flex-start;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
15
50
|
.selectableListItem:hover {
|
|
16
51
|
background-color: #e6edf5;
|
|
17
52
|
}
|
|
@@ -33,6 +68,12 @@
|
|
|
33
68
|
border: 1px solid #d1dce7;
|
|
34
69
|
}
|
|
35
70
|
|
|
71
|
+
@media (max-width: 767px) {
|
|
72
|
+
.selectableListItemIcon {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
36
77
|
.selectableListItemActive .selectableListItemIcon {
|
|
37
78
|
padding: 3px;
|
|
38
79
|
border: 1px solid #d1dce7;
|
|
@@ -45,13 +86,30 @@
|
|
|
45
86
|
background: #25beeb;
|
|
46
87
|
}
|
|
47
88
|
|
|
48
|
-
.
|
|
89
|
+
.selectableListItemLabel {
|
|
90
|
+
flex-grow: 1;
|
|
91
|
+
font-family: "Open Sans", sans-serif;
|
|
92
|
+
font-size: 16px;
|
|
93
|
+
font-style: normal;
|
|
94
|
+
line-height: 1.2;
|
|
95
|
+
display: -webkit-box;
|
|
96
|
+
-webkit-box-orient: vertical;
|
|
97
|
+
-webkit-line-clamp: 3;
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
text-overflow: ellipsis;
|
|
100
|
+
max-height: calc(16px * 1.2 * 3);
|
|
101
|
+
text-align: left;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.selectableListItemColumnsWrapper {
|
|
49
105
|
display: flex;
|
|
50
|
-
|
|
51
|
-
width: 100%;
|
|
106
|
+
gap: 12px;
|
|
52
107
|
}
|
|
53
108
|
|
|
54
|
-
.
|
|
109
|
+
.selectableListItemColumn2,
|
|
110
|
+
.selectableListItemColumn3 {
|
|
111
|
+
flex-shrink: 0;
|
|
112
|
+
text-align: right;
|
|
55
113
|
font-family: "Open Sans", sans-serif;
|
|
56
114
|
font-size: 16px;
|
|
57
115
|
font-style: normal;
|
|
@@ -59,6 +117,27 @@
|
|
|
59
117
|
white-space: nowrap;
|
|
60
118
|
overflow: hidden;
|
|
61
119
|
text-overflow: ellipsis;
|
|
62
|
-
|
|
63
|
-
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.selectableListItemColumn2 {
|
|
123
|
+
color: var(--mid-grey, #728ea7);
|
|
124
|
+
width: 80px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media (max-width: 575px) {
|
|
128
|
+
.selectableListItemColumn2 {
|
|
129
|
+
text-align: left;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.selectableListItemColumn3 {
|
|
134
|
+
color: var(--noir, #171e25);
|
|
135
|
+
font-weight: 700;
|
|
136
|
+
width: 80px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@media (max-width: 413px) {
|
|
140
|
+
.selectableListItemColumn3 {
|
|
141
|
+
text-align: left;
|
|
142
|
+
}
|
|
64
143
|
}
|
|
@@ -9,13 +9,9 @@ declare namespace _default {
|
|
|
9
9
|
export let tags: string[];
|
|
10
10
|
export let excludeStories: RegExp;
|
|
11
11
|
export namespace args {
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
align: string;
|
|
16
|
-
fontWeight: string;
|
|
17
|
-
color: string;
|
|
18
|
-
}[];
|
|
12
|
+
let label: string;
|
|
13
|
+
let column2: string;
|
|
14
|
+
let column3: string;
|
|
19
15
|
let isActive: boolean;
|
|
20
16
|
}
|
|
21
17
|
export namespace parameters {
|
|
@@ -20,29 +20,7 @@ export default {
|
|
|
20
20
|
component: SelectableListItem,
|
|
21
21
|
tags: ["autodocs"],
|
|
22
22
|
excludeStories: /.*Data$/,
|
|
23
|
-
args: __assign(__assign({}, ActionsData), {
|
|
24
|
-
{
|
|
25
|
-
label: "Adoption",
|
|
26
|
-
width: "100%",
|
|
27
|
-
align: "start",
|
|
28
|
-
fontWeight: "normal",
|
|
29
|
-
color: "noir",
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: "(35 min)",
|
|
33
|
-
width: "100px",
|
|
34
|
-
align: "end",
|
|
35
|
-
fontWeight: "normal",
|
|
36
|
-
color: "mid-grey",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
label: "100 €",
|
|
40
|
-
width: "80px",
|
|
41
|
-
align: "end",
|
|
42
|
-
fontWeight: "bold",
|
|
43
|
-
color: "noir",
|
|
44
|
-
},
|
|
45
|
-
], isActive: false }),
|
|
23
|
+
args: __assign(__assign({}, ActionsData), { label: "Consultation juridique personnalisée visant à analyser votre situation et à vous fournir des conseils adaptés à vos besoins. Cette prestation inclut l'étude des documents pertinents, une évaluation des solutions juridiques envisageables, et des recommandations pour défendre efficacement vos intérêts.", column2: "(35 min)", column3: "100 €", isActive: false }),
|
|
46
24
|
parameters: {
|
|
47
25
|
backgrounds: {
|
|
48
26
|
default: "light",
|
|
@@ -67,28 +45,8 @@ var Template = function (args) {
|
|
|
67
45
|
export var Default = Template.bind({});
|
|
68
46
|
export var Active = Template.bind({});
|
|
69
47
|
Active.args = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
width: "100%",
|
|
74
|
-
align: "start",
|
|
75
|
-
fontWeight: "normal",
|
|
76
|
-
color: "noir",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
label: "(35 min)",
|
|
80
|
-
width: "100px",
|
|
81
|
-
align: "end",
|
|
82
|
-
fontWeight: "normal",
|
|
83
|
-
color: "mid-grey",
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
label: "100 €",
|
|
87
|
-
width: "80px",
|
|
88
|
-
align: "end",
|
|
89
|
-
fontWeight: "bold",
|
|
90
|
-
color: "noir",
|
|
91
|
-
},
|
|
92
|
-
],
|
|
48
|
+
label: "Adoption",
|
|
49
|
+
column2: "(35 min)",
|
|
50
|
+
column3: "100 €",
|
|
93
51
|
isActive: true,
|
|
94
52
|
};
|
|
@@ -7,9 +7,9 @@ declare const meta: {
|
|
|
7
7
|
layout: string;
|
|
8
8
|
};
|
|
9
9
|
args: {
|
|
10
|
-
onLogin: import("@vitest/spy").Mock<[]
|
|
11
|
-
onLogout: import("@vitest/spy").Mock<[]
|
|
12
|
-
onCreateAccount: import("@vitest/spy").Mock<[]
|
|
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
13
|
};
|
|
14
14
|
};
|
|
15
15
|
export default meta;
|