allaw-ui 3.7.3 → 3.7.4
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/buttons/InboxButton.d.ts +7 -11
- package/dist/components/atoms/buttons/InboxButton.js +30 -42
- package/dist/components/atoms/buttons/InboxButton.module.css +73 -151
- package/dist/components/atoms/buttons/InboxButton.stories.d.ts +55 -63
- package/dist/components/atoms/buttons/InboxButton.stories.js +82 -50
- package/package.json +1 -1
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface InboxButtonProps {
|
|
3
|
-
/** Nombre d'éléments à afficher */
|
|
4
|
-
count?: number;
|
|
5
|
-
/** Callback au clic */
|
|
6
|
-
onClick?: () => void;
|
|
7
3
|
/** Textes à afficher suivant la valeur de count */
|
|
8
4
|
labels: {
|
|
9
5
|
none: string;
|
|
10
6
|
one: string;
|
|
11
7
|
multiple: string;
|
|
12
8
|
};
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* - "qualification" : vert si count>0, gris sinon
|
|
19
|
-
*/
|
|
9
|
+
/** Nombre d'éléments à afficher */
|
|
10
|
+
count?: number;
|
|
11
|
+
/** Callback au clic */
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
/** Thème visuel */
|
|
20
14
|
scheme?: "notification" | "qualification";
|
|
21
15
|
/** Classe CSS de l'icône à gauche */
|
|
22
16
|
iconClassName?: string;
|
|
23
17
|
/** aria-label de l'icône */
|
|
24
18
|
iconAriaLabel?: string;
|
|
19
|
+
/** Identifiant pour les tests Playwright */
|
|
20
|
+
dataCy?: string;
|
|
25
21
|
}
|
|
26
22
|
declare const InboxButton: React.FC<InboxButtonProps>;
|
|
27
23
|
export default InboxButton;
|
|
@@ -1,47 +1,35 @@
|
|
|
1
|
-
import clsx from "clsx";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import styles from "./InboxButton.module.css";
|
|
4
3
|
var InboxButton = function (_a) {
|
|
5
|
-
var _b = _a.count, count = _b === void 0 ? 0 : _b, onClick = _a.onClick,
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
bgKey = "light-red";
|
|
36
|
-
colorKey = "red";
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return (React.createElement("button", { className: clsx(styles.inboxBtn, isDisabled && styles.disabled, isQualificationZero && styles.qualificationZero, !isDisabled && !isQualificationZero && styles["bg-".concat(bgKey)], scheme === "qualification" &&
|
|
40
|
-
!isQualificationZero &&
|
|
41
|
-
styles.qualificationActive, scheme === "notification" && !isZero && styles.notifActive, scheme === "qualification" && !isZero && styles.shiny), disabled: isDisabled, onClick: onClick, "data-cy": dataCy },
|
|
42
|
-
iconClassName && (React.createElement("i", { className: clsx(styles.icon, iconClassName, !isDisabled && !isQualificationZero && styles["color-".concat(colorKey)], isQualificationZero && styles.colorDarkGrey, scheme === "qualification" &&
|
|
43
|
-
!isQualificationZero &&
|
|
44
|
-
styles.colorNoir), "aria-label": iconAriaLabel })),
|
|
45
|
-
React.createElement("span", { className: clsx(styles.label, isDisabled && styles.labelDisabled, !isDisabled && !isQualificationZero && styles["color-".concat(colorKey)], isQualificationZero && styles.colorDarkGrey, scheme === "qualification" && !isQualificationZero && styles.colorNoir) }, label)));
|
|
4
|
+
var labels = _a.labels, _b = _a.count, count = _b === void 0 ? 0 : _b, onClick = _a.onClick, _c = _a.scheme, scheme = _c === void 0 ? "notification" : _c, iconClassName = _a.iconClassName, iconAriaLabel = _a.iconAriaLabel, dataCy = _a.dataCy;
|
|
5
|
+
// Calcul du label
|
|
6
|
+
var getLabel = function () {
|
|
7
|
+
if (count === 0)
|
|
8
|
+
return labels.none;
|
|
9
|
+
if (count === 1)
|
|
10
|
+
return labels.one;
|
|
11
|
+
return labels.multiple.replace("{{count}}", String(count));
|
|
12
|
+
};
|
|
13
|
+
// Logique des états
|
|
14
|
+
var isNotificationZero = scheme === "notification" && count === 0;
|
|
15
|
+
var isNotificationActive = scheme === "notification" && count > 0;
|
|
16
|
+
var isQualificationZero = scheme === "qualification" && count === 0;
|
|
17
|
+
var isQualificationActive = scheme === "qualification" && count > 0;
|
|
18
|
+
// Le bouton est disabled seulement pour notification à 0
|
|
19
|
+
var isDisabled = isNotificationZero;
|
|
20
|
+
// Classes CSS
|
|
21
|
+
var buttonClasses = [
|
|
22
|
+
styles.inboxBtn,
|
|
23
|
+
isNotificationZero && styles.notificationZero,
|
|
24
|
+
isNotificationActive && styles.notificationActive,
|
|
25
|
+
isQualificationZero && styles.qualificationZero,
|
|
26
|
+
isQualificationActive && styles.qualificationActive,
|
|
27
|
+
]
|
|
28
|
+
.filter(Boolean)
|
|
29
|
+
.join(" ");
|
|
30
|
+
var iconClasses = [styles.icon, iconClassName].filter(Boolean).join(" ");
|
|
31
|
+
return (React.createElement("button", { className: buttonClasses, disabled: isDisabled, onClick: onClick, "data-cy": dataCy },
|
|
32
|
+
iconClassName && (React.createElement("i", { className: iconClasses, "aria-label": iconAriaLabel })),
|
|
33
|
+
React.createElement("span", { className: styles.label }, getLabel())));
|
|
46
34
|
};
|
|
47
35
|
export default InboxButton;
|
|
@@ -1,196 +1,118 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.shiny::before {
|
|
8
|
-
content: "";
|
|
9
|
-
position: absolute;
|
|
10
|
-
top: 0;
|
|
11
|
-
left: -100%;
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
background: linear-gradient(
|
|
15
|
-
120deg,
|
|
16
|
-
transparent,
|
|
17
|
-
rgba(225, 81, 81, 0.4),
|
|
18
|
-
transparent
|
|
19
|
-
);
|
|
20
|
-
animation: shine 5s ease-in-out infinite;
|
|
21
|
-
transition: left 0.65s ease-in-out;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@keyframes shine {
|
|
25
|
-
0% {
|
|
26
|
-
left: -100%;
|
|
27
|
-
}
|
|
28
|
-
13% {
|
|
29
|
-
left: 100%;
|
|
30
|
-
}
|
|
31
|
-
100% {
|
|
32
|
-
left: 100%;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
/* ===========================================
|
|
2
|
+
BASE STYLES
|
|
3
|
+
=========================================== */
|
|
35
4
|
|
|
36
5
|
.inboxBtn {
|
|
6
|
+
/* Layout */
|
|
37
7
|
display: flex;
|
|
38
8
|
flex-direction: row;
|
|
39
|
-
flex-wrap: nowrap;
|
|
40
9
|
justify-content: center;
|
|
41
10
|
align-items: center;
|
|
42
11
|
gap: 0.5rem;
|
|
43
|
-
|
|
12
|
+
|
|
13
|
+
/* Dimensions */
|
|
44
14
|
width: 100%;
|
|
15
|
+
padding: 0.5rem;
|
|
16
|
+
|
|
17
|
+
/* Style */
|
|
45
18
|
border: none;
|
|
46
19
|
border-radius: 0.5rem;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.notifActive {
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.notifActive:hover {
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
background-color: #fbe8e8;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.qualificationActive:hover {
|
|
59
|
-
background-color: #fbe8e8;
|
|
60
|
-
border: 0px solid #fbe8e8;
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.qualificationActive:hover .icon {
|
|
65
|
-
color: #456073;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.qualificationActive:hover .label {
|
|
69
|
-
color: #456073;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.disabled {
|
|
73
|
-
cursor: default;
|
|
74
|
-
background-color: #daebfb;
|
|
75
|
-
/* color: #1985e8; */
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.qualificationZero {
|
|
79
|
-
cursor: initial;
|
|
80
|
-
background-color: #ffffff;
|
|
81
|
-
color: #d1dce8;
|
|
82
|
-
border: 0px solid #e6edf5;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.qualificationActive {
|
|
86
|
-
background-color: #fdf2f2;
|
|
87
|
-
color: #456073;
|
|
88
|
-
position: relative;
|
|
89
|
-
border: 0px solid #fdf2f2;
|
|
90
|
-
overflow: hidden;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.colorDarkGrey {
|
|
94
|
-
color: #d1dce8;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.colorNoir {
|
|
98
|
-
color: #456073;
|
|
99
|
-
}
|
|
100
20
|
|
|
101
|
-
|
|
21
|
+
/* Typography */
|
|
102
22
|
font-family: "Open Sans", sans-serif;
|
|
103
23
|
font-size: 15px;
|
|
104
|
-
font-style: normal;
|
|
105
24
|
font-weight: 600;
|
|
106
25
|
line-height: normal;
|
|
107
26
|
}
|
|
108
27
|
|
|
109
|
-
.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
.bg-mid-grey {
|
|
114
|
-
background-color: #728ea7;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.bg-dark-grey {
|
|
118
|
-
background-color: #456073;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.bg-noir {
|
|
122
|
-
background-color: #000000;
|
|
28
|
+
.icon {
|
|
29
|
+
font-size: 20px;
|
|
30
|
+
line-height: 1;
|
|
31
|
+
padding-right: 0.15rem;
|
|
123
32
|
}
|
|
124
33
|
|
|
125
|
-
.
|
|
126
|
-
|
|
34
|
+
.label {
|
|
35
|
+
/* Hérite de la couleur du bouton parent */
|
|
127
36
|
}
|
|
128
37
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
38
|
+
/* ===========================================
|
|
39
|
+
NOTIFICATION STATES
|
|
40
|
+
=========================================== */
|
|
132
41
|
|
|
133
|
-
|
|
42
|
+
/* Notification Zero: disabled, bleu */
|
|
43
|
+
.notificationZero {
|
|
134
44
|
background-color: #daebfb;
|
|
45
|
+
color: #1985e8;
|
|
46
|
+
cursor: default;
|
|
135
47
|
}
|
|
136
48
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
background-color: #e6edf5;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.bg-grey-light {
|
|
146
|
-
background-color: #f6fcfe;
|
|
49
|
+
/* Notification Active: rouge, cliquable */
|
|
50
|
+
.notificationActive {
|
|
51
|
+
background-color: #fdf2f2;
|
|
52
|
+
color: #e15151;
|
|
53
|
+
cursor: pointer;
|
|
147
54
|
}
|
|
148
55
|
|
|
149
|
-
.
|
|
150
|
-
color: #
|
|
56
|
+
.notificationActive:hover {
|
|
57
|
+
background-color: #fbe8e8;
|
|
151
58
|
}
|
|
152
59
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
60
|
+
/* ===========================================
|
|
61
|
+
QUALIFICATION STATES
|
|
62
|
+
=========================================== */
|
|
156
63
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
color: #000000;
|
|
64
|
+
/* Qualification Zero: rouge, cliquable */
|
|
65
|
+
.qualificationZero {
|
|
66
|
+
background-color: #fdf2f2;
|
|
67
|
+
color: #e15151;
|
|
68
|
+
cursor: pointer;
|
|
163
69
|
}
|
|
164
70
|
|
|
165
|
-
.
|
|
166
|
-
color: #
|
|
71
|
+
.qualificationZero:hover {
|
|
72
|
+
background-color: #fbe8e8;
|
|
167
73
|
}
|
|
168
74
|
|
|
169
|
-
|
|
75
|
+
/* Qualification Active: rouge, cliquable + effet shiny */
|
|
76
|
+
.qualificationActive {
|
|
77
|
+
background-color: #fdf2f2;
|
|
170
78
|
color: #e15151;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
position: relative;
|
|
81
|
+
overflow: hidden;
|
|
171
82
|
}
|
|
172
83
|
|
|
173
|
-
.
|
|
174
|
-
color: #
|
|
84
|
+
.qualificationActive:hover {
|
|
85
|
+
background-color: #fbe8e8;
|
|
175
86
|
}
|
|
176
87
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
88
|
+
/* ===========================================
|
|
89
|
+
SHINY EFFECT (qualification active uniquement)
|
|
90
|
+
=========================================== */
|
|
180
91
|
|
|
181
|
-
.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
92
|
+
.qualificationActive::before {
|
|
93
|
+
content: "";
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 0;
|
|
96
|
+
left: -100%;
|
|
97
|
+
width: 100%;
|
|
98
|
+
height: 100%;
|
|
99
|
+
background: linear-gradient(
|
|
100
|
+
120deg,
|
|
101
|
+
transparent,
|
|
102
|
+
rgba(225, 81, 81, 0.4),
|
|
103
|
+
transparent
|
|
104
|
+
);
|
|
105
|
+
animation: shine 5s ease-in-out infinite;
|
|
187
106
|
}
|
|
188
107
|
|
|
189
|
-
@keyframes
|
|
190
|
-
|
|
191
|
-
|
|
108
|
+
@keyframes shine {
|
|
109
|
+
0% {
|
|
110
|
+
left: -100%;
|
|
111
|
+
}
|
|
112
|
+
13% {
|
|
113
|
+
left: 100%;
|
|
192
114
|
}
|
|
193
|
-
|
|
194
|
-
|
|
115
|
+
100% {
|
|
116
|
+
left: 100%;
|
|
195
117
|
}
|
|
196
118
|
}
|
|
@@ -2,75 +2,67 @@ declare namespace _default {
|
|
|
2
2
|
export let title: string;
|
|
3
3
|
export { InboxButton as component };
|
|
4
4
|
export let tags: string[];
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
control:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
control
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
description
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
description: string;
|
|
52
|
-
};
|
|
53
|
-
iconAriaLabel: {
|
|
54
|
-
control: {
|
|
55
|
-
type: string;
|
|
56
|
-
};
|
|
57
|
-
description: string;
|
|
58
|
-
};
|
|
59
|
-
onClick: {
|
|
60
|
-
action: string;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
5
|
+
export namespace argTypes {
|
|
6
|
+
namespace labels {
|
|
7
|
+
let control: string;
|
|
8
|
+
let description: string;
|
|
9
|
+
}
|
|
10
|
+
namespace count {
|
|
11
|
+
export namespace control_1 {
|
|
12
|
+
let type: string;
|
|
13
|
+
}
|
|
14
|
+
export { control_1 as control };
|
|
15
|
+
let description_1: string;
|
|
16
|
+
export { description_1 as description };
|
|
17
|
+
export let defaultValue: number;
|
|
18
|
+
}
|
|
19
|
+
namespace scheme {
|
|
20
|
+
export namespace control_2 {
|
|
21
|
+
let type_1: string;
|
|
22
|
+
export { type_1 as type };
|
|
23
|
+
export let options: string[];
|
|
24
|
+
}
|
|
25
|
+
export { control_2 as control };
|
|
26
|
+
let description_2: string;
|
|
27
|
+
export { description_2 as description };
|
|
28
|
+
}
|
|
29
|
+
namespace iconClassName {
|
|
30
|
+
export namespace control_3 {
|
|
31
|
+
let type_2: string;
|
|
32
|
+
export { type_2 as type };
|
|
33
|
+
}
|
|
34
|
+
export { control_3 as control };
|
|
35
|
+
let description_3: string;
|
|
36
|
+
export { description_3 as description };
|
|
37
|
+
}
|
|
38
|
+
namespace iconAriaLabel {
|
|
39
|
+
export namespace control_4 {
|
|
40
|
+
let type_3: string;
|
|
41
|
+
export { type_3 as type };
|
|
42
|
+
}
|
|
43
|
+
export { control_4 as control };
|
|
44
|
+
let description_4: string;
|
|
45
|
+
export { description_4 as description };
|
|
46
|
+
}
|
|
47
|
+
namespace onClick {
|
|
48
|
+
let action: string;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
63
51
|
export namespace parameters {
|
|
64
52
|
namespace docs {
|
|
65
|
-
namespace
|
|
53
|
+
export namespace description_5 {
|
|
66
54
|
let component: string;
|
|
67
55
|
}
|
|
56
|
+
export { description_5 as description };
|
|
68
57
|
}
|
|
69
58
|
}
|
|
70
59
|
}
|
|
71
60
|
export default _default;
|
|
72
|
-
export const
|
|
73
|
-
export const
|
|
74
|
-
export const
|
|
75
|
-
export const
|
|
61
|
+
export const NotificationZero: any;
|
|
62
|
+
export const NotificationOne: any;
|
|
63
|
+
export const NotificationMultiple: any;
|
|
64
|
+
export const QualificationZero: any;
|
|
65
|
+
export const QualificationOne: any;
|
|
66
|
+
export const QualificationMultiple: any;
|
|
67
|
+
export const SansIcone: any;
|
|
76
68
|
import InboxButton from "./InboxButton";
|
|
@@ -17,95 +17,127 @@ export default {
|
|
|
17
17
|
component: InboxButton,
|
|
18
18
|
tags: ["autodocs"],
|
|
19
19
|
argTypes: {
|
|
20
|
+
labels: {
|
|
21
|
+
control: "object",
|
|
22
|
+
description: "Textes à afficher selon le count",
|
|
23
|
+
},
|
|
20
24
|
count: {
|
|
21
25
|
control: { type: "number" },
|
|
22
|
-
description: "Nombre d
|
|
26
|
+
description: "Nombre d'éléments à traiter",
|
|
23
27
|
defaultValue: 0,
|
|
24
28
|
},
|
|
25
|
-
"labels.none": {
|
|
26
|
-
control: { type: "text" },
|
|
27
|
-
description: "Texte affiché si count === 0",
|
|
28
|
-
table: { category: "labels" },
|
|
29
|
-
},
|
|
30
|
-
"labels.one": {
|
|
31
|
-
control: { type: "text" },
|
|
32
|
-
description: "Texte affiché si count === 1",
|
|
33
|
-
table: { category: "labels" },
|
|
34
|
-
},
|
|
35
|
-
"labels.multiple": {
|
|
36
|
-
control: { type: "text" },
|
|
37
|
-
description: "Texte affiché si count > 1 (utiliser {{count}})",
|
|
38
|
-
table: { category: "labels" },
|
|
39
|
-
},
|
|
40
29
|
scheme: {
|
|
41
30
|
control: { type: "select", options: ["notification", "qualification"] },
|
|
42
|
-
description: "Thème
|
|
31
|
+
description: "Thème visuel du bouton",
|
|
43
32
|
},
|
|
44
33
|
iconClassName: {
|
|
45
34
|
control: { type: "text" },
|
|
46
|
-
description: "Classe CSS de l
|
|
35
|
+
description: "Classe CSS de l'icône à afficher",
|
|
47
36
|
},
|
|
48
37
|
iconAriaLabel: {
|
|
49
38
|
control: { type: "text" },
|
|
50
|
-
description: "Label accessible pour l
|
|
39
|
+
description: "Label accessible pour l'icône",
|
|
51
40
|
},
|
|
52
41
|
onClick: { action: "clicked" },
|
|
53
42
|
},
|
|
54
43
|
parameters: {
|
|
55
44
|
docs: {
|
|
56
45
|
description: {
|
|
57
|
-
component: "Bouton
|
|
46
|
+
component: "Bouton avec compteur dynamique et thèmes visuels configurables pour notifications et qualifications.",
|
|
58
47
|
},
|
|
59
48
|
},
|
|
60
49
|
},
|
|
61
50
|
};
|
|
62
|
-
var Template = function (args) { return (React.createElement("div", { style: { padding: "20px",
|
|
51
|
+
var Template = function (args) { return (React.createElement("div", { style: { padding: "20px", maxWidth: "300px" } },
|
|
63
52
|
React.createElement(InboxButton, __assign({}, args)))); };
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
// ===========================================
|
|
54
|
+
// NOTIFICATION SCHEME
|
|
55
|
+
// ===========================================
|
|
56
|
+
export var NotificationZero = Template.bind({});
|
|
57
|
+
NotificationZero.args = {
|
|
66
58
|
count: 0,
|
|
59
|
+
scheme: "notification",
|
|
67
60
|
labels: {
|
|
68
|
-
none: "Aucune
|
|
69
|
-
one: "1
|
|
70
|
-
multiple: "{{count}}
|
|
61
|
+
none: "Aucune notification",
|
|
62
|
+
one: "1 notification",
|
|
63
|
+
multiple: "{{count}} notifications",
|
|
71
64
|
},
|
|
72
|
-
scheme: "notification",
|
|
73
65
|
iconClassName: "allaw-icon-inbox",
|
|
74
|
-
iconAriaLabel: "
|
|
66
|
+
iconAriaLabel: "Notifications",
|
|
75
67
|
};
|
|
76
|
-
export var
|
|
77
|
-
|
|
68
|
+
export var NotificationOne = Template.bind({});
|
|
69
|
+
NotificationOne.args = {
|
|
78
70
|
count: 1,
|
|
71
|
+
scheme: "notification",
|
|
79
72
|
labels: {
|
|
80
|
-
none: "Aucune
|
|
81
|
-
one: "1
|
|
82
|
-
multiple: "{{count}}
|
|
73
|
+
none: "Aucune notification",
|
|
74
|
+
one: "1 notification",
|
|
75
|
+
multiple: "{{count}} notifications",
|
|
83
76
|
},
|
|
84
|
-
scheme: "notification",
|
|
85
77
|
iconClassName: "allaw-icon-inbox",
|
|
86
|
-
iconAriaLabel: "
|
|
78
|
+
iconAriaLabel: "Notifications",
|
|
87
79
|
};
|
|
88
|
-
export var
|
|
89
|
-
|
|
90
|
-
count:
|
|
80
|
+
export var NotificationMultiple = Template.bind({});
|
|
81
|
+
NotificationMultiple.args = {
|
|
82
|
+
count: 5,
|
|
83
|
+
scheme: "notification",
|
|
91
84
|
labels: {
|
|
92
|
-
none: "Aucune
|
|
93
|
-
one: "1
|
|
94
|
-
multiple: "{{count}}
|
|
85
|
+
none: "Aucune notification",
|
|
86
|
+
one: "1 notification",
|
|
87
|
+
multiple: "{{count}} notifications",
|
|
95
88
|
},
|
|
96
|
-
scheme: "notification",
|
|
97
89
|
iconClassName: "allaw-icon-inbox",
|
|
98
|
-
iconAriaLabel: "
|
|
90
|
+
iconAriaLabel: "Notifications",
|
|
99
91
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
92
|
+
// ===========================================
|
|
93
|
+
// QUALIFICATION SCHEME
|
|
94
|
+
// ===========================================
|
|
95
|
+
export var QualificationZero = Template.bind({});
|
|
96
|
+
QualificationZero.args = {
|
|
97
|
+
count: 0,
|
|
98
|
+
scheme: "qualification",
|
|
103
99
|
labels: {
|
|
104
|
-
none: "Aucune
|
|
105
|
-
one: "1
|
|
106
|
-
multiple: "{{count}}
|
|
100
|
+
none: "Aucune qualification",
|
|
101
|
+
one: "1 contact à qualifier",
|
|
102
|
+
multiple: "{{count}} contacts à qualifier",
|
|
107
103
|
},
|
|
104
|
+
iconClassName: "allaw-icon-check-circle",
|
|
105
|
+
iconAriaLabel: "Qualification",
|
|
106
|
+
};
|
|
107
|
+
export var QualificationOne = Template.bind({});
|
|
108
|
+
QualificationOne.args = {
|
|
109
|
+
count: 1,
|
|
108
110
|
scheme: "qualification",
|
|
111
|
+
labels: {
|
|
112
|
+
none: "Aucune qualification",
|
|
113
|
+
one: "1 contact à qualifier",
|
|
114
|
+
multiple: "{{count}} contacts à qualifier",
|
|
115
|
+
},
|
|
109
116
|
iconClassName: "allaw-icon-check-circle",
|
|
110
|
-
iconAriaLabel: "
|
|
117
|
+
iconAriaLabel: "Qualification",
|
|
118
|
+
};
|
|
119
|
+
export var QualificationMultiple = Template.bind({});
|
|
120
|
+
QualificationMultiple.args = {
|
|
121
|
+
count: 3,
|
|
122
|
+
scheme: "qualification",
|
|
123
|
+
labels: {
|
|
124
|
+
none: "Aucune qualification",
|
|
125
|
+
one: "1 contact à qualifier",
|
|
126
|
+
multiple: "{{count}} contacts à qualifier",
|
|
127
|
+
},
|
|
128
|
+
iconClassName: "allaw-icon-check-circle",
|
|
129
|
+
iconAriaLabel: "Qualification",
|
|
130
|
+
};
|
|
131
|
+
// ===========================================
|
|
132
|
+
// SANS ICÔNE
|
|
133
|
+
// ===========================================
|
|
134
|
+
export var SansIcone = Template.bind({});
|
|
135
|
+
SansIcone.args = {
|
|
136
|
+
count: 2,
|
|
137
|
+
scheme: "qualification",
|
|
138
|
+
labels: {
|
|
139
|
+
none: "Aucun élément",
|
|
140
|
+
one: "1 élément",
|
|
141
|
+
multiple: "{{count}} éléments",
|
|
142
|
+
},
|
|
111
143
|
};
|