@dsrc-cm/core 0.1.0
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/dsrc.css +10743 -0
- package/dist/dsrc.min.css +1 -0
- package/package.json +44 -0
- package/src/base/print.css +404 -0
- package/src/base/reset.css +106 -0
- package/src/components/accordion/accordion.css +216 -0
- package/src/components/alert/alert.css +187 -0
- package/src/components/badge/badge.css +178 -0
- package/src/components/breadcrumb/breadcrumb.css +235 -0
- package/src/components/button/button.css +805 -0
- package/src/components/callout/callout.css +95 -0
- package/src/components/card/card.css +551 -0
- package/src/components/checkbox/checkbox.css +257 -0
- package/src/components/consent/consent.css +297 -0
- package/src/components/download/download.css +66 -0
- package/src/components/dropdown/dropdown.css +295 -0
- package/src/components/highlight/highlight.css +74 -0
- package/src/components/input/input.css +337 -0
- package/src/components/label/label.css +29 -0
- package/src/components/link/link.css +208 -0
- package/src/components/logo/logo.css +86 -0
- package/src/components/modal/modal.css +271 -0
- package/src/components/notice/notice.css +211 -0
- package/src/components/pagination/pagination.css +132 -0
- package/src/components/password/password.css +195 -0
- package/src/components/quote/quote.css +156 -0
- package/src/components/radio/radio.css +270 -0
- package/src/components/range/range.css +362 -0
- package/src/components/search/search.css +129 -0
- package/src/components/select/select.css +130 -0
- package/src/components/sidemenu/sidemenu.css +268 -0
- package/src/components/spinner/spinner.css +73 -0
- package/src/components/stepper/stepper.css +140 -0
- package/src/components/summary/summary.css +142 -0
- package/src/components/tab/tab.css +184 -0
- package/src/components/table/table.css +556 -0
- package/src/components/tag/tag.css +201 -0
- package/src/components/tile/tile.css +389 -0
- package/src/components/toggle/toggle.css +229 -0
- package/src/components/tooltip/tooltip.css +158 -0
- package/src/components/translate/translate.css +356 -0
- package/src/components/upload/upload.css +185 -0
- package/src/index.css +77 -0
- package/src/layout/bandeau/bandeau.css +44 -0
- package/src/layout/entete/entete.css +130 -0
- package/src/layout/footer/footer.css +107 -0
- package/src/layout/grid/grid.css +197 -0
- package/src/layout/hero/hero.css +86 -0
- package/src/layout/main/main.css +123 -0
- package/src/layout/navigation/navigation.css +206 -0
- package/src/utilities/utilities.css +430 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Notice Component
|
|
3
|
+
* Bandeau d'information pleine largeur (haut de page)
|
|
4
|
+
*
|
|
5
|
+
* Aligne sur les patrons du DSFR (fr-notice) adaptes pour le DSRC.
|
|
6
|
+
* - Bandeau pleine largeur sous le header
|
|
7
|
+
* - Conteneur interne centre avec max-width
|
|
8
|
+
* - Variantes : defaut (primaire/vert), --info, --warning, --error
|
|
9
|
+
* - Fermable via .dsrc-btn.dsrc-btn--close
|
|
10
|
+
* - Icone via pseudo-element
|
|
11
|
+
*
|
|
12
|
+
* Markup:
|
|
13
|
+
*
|
|
14
|
+
* <div class="dsrc-notice" role="status">
|
|
15
|
+
* <div class="dsrc-notice__inner">
|
|
16
|
+
* <p class="dsrc-notice__title">
|
|
17
|
+
* <span class="dsrc-notice__icon" aria-hidden="true"></span>
|
|
18
|
+
* Information importante : le service sera indisponible le 25 fevrier.
|
|
19
|
+
* </p>
|
|
20
|
+
* <button type="button" class="dsrc-btn dsrc-btn--close" title="Masquer le message">
|
|
21
|
+
* Masquer
|
|
22
|
+
* </button>
|
|
23
|
+
* </div>
|
|
24
|
+
* </div>
|
|
25
|
+
*
|
|
26
|
+
* <!-- Warning variant -->
|
|
27
|
+
* <div class="dsrc-notice dsrc-notice--warning" role="status">
|
|
28
|
+
* <div class="dsrc-notice__inner">
|
|
29
|
+
* <p class="dsrc-notice__title">
|
|
30
|
+
* <span class="dsrc-notice__icon" aria-hidden="true"></span>
|
|
31
|
+
* Attention : des travaux de maintenance sont prevus.
|
|
32
|
+
* </p>
|
|
33
|
+
* <button type="button" class="dsrc-btn dsrc-btn--close" title="Masquer le message">
|
|
34
|
+
* Masquer
|
|
35
|
+
* </button>
|
|
36
|
+
* </div>
|
|
37
|
+
* </div>
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/* ============================================
|
|
41
|
+
* 1. Base - full-width banner
|
|
42
|
+
* ============================================ */
|
|
43
|
+
|
|
44
|
+
.dsrc-notice {
|
|
45
|
+
display: block;
|
|
46
|
+
width: 100%;
|
|
47
|
+
font-family: var(--dsrc-font-family-sans);
|
|
48
|
+
font-size: var(--dsrc-font-size-small);
|
|
49
|
+
line-height: var(--dsrc-font-line-height-normal);
|
|
50
|
+
position: relative;
|
|
51
|
+
|
|
52
|
+
/* Default: primary green (Cameroon brand) */
|
|
53
|
+
background-color: var(--dsrc-color-primaire);
|
|
54
|
+
color: var(--dsrc-color-blanc);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* ============================================
|
|
58
|
+
* 2. Inner container - centered, max-width
|
|
59
|
+
* ============================================ */
|
|
60
|
+
|
|
61
|
+
.dsrc-notice__inner {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
gap: var(--dsrc-spacing-4);
|
|
66
|
+
max-width: var(--dsrc-layout-max-width);
|
|
67
|
+
margin-left: auto;
|
|
68
|
+
margin-right: auto;
|
|
69
|
+
padding: var(--dsrc-spacing-3) var(--dsrc-spacing-5);
|
|
70
|
+
position: relative;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* ============================================
|
|
74
|
+
* 3. Title (the main notice text)
|
|
75
|
+
* ============================================ */
|
|
76
|
+
|
|
77
|
+
.dsrc-notice__title {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
gap: var(--dsrc-spacing-2);
|
|
81
|
+
margin: 0;
|
|
82
|
+
flex: 1;
|
|
83
|
+
text-align: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* ============================================
|
|
88
|
+
* 4. Icon (inline span, styled via ::before)
|
|
89
|
+
* The icon is an inline "info" circle rendered
|
|
90
|
+
* with a data URI SVG. The SVG uses white fill
|
|
91
|
+
* by default and is overridden per variant.
|
|
92
|
+
* ============================================ */
|
|
93
|
+
|
|
94
|
+
.dsrc-notice__icon {
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
width: 1.25em;
|
|
100
|
+
height: 1.25em;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Info circle icon - white fill for default/dark backgrounds */
|
|
104
|
+
.dsrc-notice__icon::before {
|
|
105
|
+
content: "";
|
|
106
|
+
display: block;
|
|
107
|
+
width: 100%;
|
|
108
|
+
height: 100%;
|
|
109
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
|
|
110
|
+
mask-size: contain;
|
|
111
|
+
mask-repeat: no-repeat;
|
|
112
|
+
mask-position: center;
|
|
113
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
|
|
114
|
+
-webkit-mask-size: contain;
|
|
115
|
+
-webkit-mask-repeat: no-repeat;
|
|
116
|
+
-webkit-mask-position: center;
|
|
117
|
+
background-color: currentColor;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* ============================================
|
|
121
|
+
* 5. Links inside notice
|
|
122
|
+
* ============================================ */
|
|
123
|
+
|
|
124
|
+
.dsrc-notice a {
|
|
125
|
+
color: inherit;
|
|
126
|
+
text-decoration: underline;
|
|
127
|
+
text-underline-offset: 3px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.dsrc-notice a:hover {
|
|
131
|
+
opacity: 0.85;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* ============================================
|
|
135
|
+
* 6. Close button integration
|
|
136
|
+
* Uses .dsrc-btn.dsrc-btn--close from button.css
|
|
137
|
+
* The close button inherits white color from the
|
|
138
|
+
* notice on dark backgrounds.
|
|
139
|
+
* ============================================ */
|
|
140
|
+
|
|
141
|
+
.dsrc-notice > .dsrc-notice__inner > .dsrc-btn--close {
|
|
142
|
+
flex-shrink: 0;
|
|
143
|
+
color: inherit;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.dsrc-notice > .dsrc-notice__inner > .dsrc-btn--close:focus-visible {
|
|
147
|
+
outline-color: var(--dsrc-color-blanc);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* ============================================
|
|
151
|
+
* 7. Type variants
|
|
152
|
+
* ============================================ */
|
|
153
|
+
|
|
154
|
+
/* --- Info (blue) --- */
|
|
155
|
+
.dsrc-notice--info {
|
|
156
|
+
background-color: var(--dsrc-color-info-bordure);
|
|
157
|
+
color: var(--dsrc-color-blanc);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* --- Warning (orange) --- */
|
|
161
|
+
.dsrc-notice--warning {
|
|
162
|
+
background-color: var(--dsrc-color-alerte-bordure);
|
|
163
|
+
color: var(--dsrc-color-blanc);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* --- Error (red) --- */
|
|
167
|
+
.dsrc-notice--error {
|
|
168
|
+
background-color: var(--dsrc-color-erreur-bordure);
|
|
169
|
+
color: var(--dsrc-color-blanc);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* ============================================
|
|
173
|
+
* 8. Hidden state
|
|
174
|
+
* When dismissed (JS sets aria-hidden="true")
|
|
175
|
+
* ============================================ */
|
|
176
|
+
|
|
177
|
+
.dsrc-notice[aria-hidden="true"] {
|
|
178
|
+
display: none;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
/* ============================================
|
|
183
|
+
* 9. Compact variant (--sm)
|
|
184
|
+
* ============================================ */
|
|
185
|
+
|
|
186
|
+
.dsrc-notice--sm .dsrc-notice__inner {
|
|
187
|
+
padding: var(--dsrc-spacing-2) var(--dsrc-spacing-3);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.dsrc-notice--sm .dsrc-notice__text {
|
|
191
|
+
font-size: var(--dsrc-font-size-caption);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.dsrc-notice--sm .dsrc-notice__icon {
|
|
195
|
+
font-size: var(--dsrc-font-size-body);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
/* ============================================
|
|
200
|
+
* 10. Responsive mobile
|
|
201
|
+
* ============================================ */
|
|
202
|
+
|
|
203
|
+
@media (max-width: 767px) {
|
|
204
|
+
.dsrc-notice__inner {
|
|
205
|
+
padding: var(--dsrc-spacing-3) var(--dsrc-spacing-3);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.dsrc-notice__text {
|
|
209
|
+
font-size: var(--dsrc-font-size-caption);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Pagination Component
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* <nav class="dsrc-pagination" aria-label="Pagination">
|
|
6
|
+
* <a class="dsrc-pagination__link dsrc-pagination__link--prev" href="#">Precedent</a>
|
|
7
|
+
* <a class="dsrc-pagination__link" href="#">1</a>
|
|
8
|
+
* <a class="dsrc-pagination__link dsrc-pagination__link--active" href="#" aria-current="page">2</a>
|
|
9
|
+
* <a class="dsrc-pagination__link" href="#">3</a>
|
|
10
|
+
* <span class="dsrc-pagination__ellipsis">...</span>
|
|
11
|
+
* <a class="dsrc-pagination__link" href="#">12</a>
|
|
12
|
+
* <a class="dsrc-pagination__link dsrc-pagination__link--next" href="#">Suivant</a>
|
|
13
|
+
* </nav>
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
.dsrc-pagination {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: var(--dsrc-spacing-1);
|
|
20
|
+
font-family: var(--dsrc-font-family-sans);
|
|
21
|
+
font-size: var(--dsrc-font-size-small);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dsrc-pagination__link {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
min-width: 36px;
|
|
29
|
+
height: 36px;
|
|
30
|
+
padding: 0 var(--dsrc-spacing-2);
|
|
31
|
+
border: var(--dsrc-border-width-default) solid var(--dsrc-color-gris-200);
|
|
32
|
+
border-radius: var(--dsrc-radius-default);
|
|
33
|
+
color: var(--dsrc-color-noir);
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
font-weight: var(--dsrc-font-weight-medium);
|
|
36
|
+
transition: background-color 0.1s ease, border-color 0.1s ease;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.dsrc-pagination__link:hover {
|
|
40
|
+
background-color: var(--dsrc-color-gris-100);
|
|
41
|
+
border-color: var(--dsrc-color-gris-300);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dsrc-pagination__link--active,
|
|
45
|
+
.dsrc-pagination__link[aria-current="page"] {
|
|
46
|
+
background-color: var(--dsrc-color-primaire);
|
|
47
|
+
border-color: var(--dsrc-color-primaire);
|
|
48
|
+
color: var(--dsrc-color-blanc);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dsrc-pagination__link--disabled,
|
|
52
|
+
.dsrc-pagination__link[aria-disabled="true"] {
|
|
53
|
+
opacity: 0.5;
|
|
54
|
+
cursor: not-allowed;
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.dsrc-pagination__link:active {
|
|
59
|
+
background-color: var(--dsrc-color-gris-200);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.dsrc-pagination__link:focus-visible {
|
|
63
|
+
outline: var(--dsrc-outline-width) solid var(--dsrc-color-primaire-focus);
|
|
64
|
+
outline-offset: var(--dsrc-outline-offset);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dsrc-pagination__ellipsis {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
min-width: 36px;
|
|
72
|
+
height: 36px;
|
|
73
|
+
color: var(--dsrc-color-gris-500);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/* ============================================
|
|
78
|
+
* Size variants
|
|
79
|
+
* ============================================ */
|
|
80
|
+
|
|
81
|
+
.dsrc-pagination--sm .dsrc-pagination__link {
|
|
82
|
+
min-width: 28px;
|
|
83
|
+
height: 28px;
|
|
84
|
+
font-size: var(--dsrc-font-size-caption);
|
|
85
|
+
padding: 0 var(--dsrc-spacing-1);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.dsrc-pagination--sm .dsrc-pagination__ellipsis {
|
|
89
|
+
min-width: 28px;
|
|
90
|
+
height: 28px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.dsrc-pagination--lg .dsrc-pagination__link {
|
|
94
|
+
min-width: 44px;
|
|
95
|
+
height: 44px;
|
|
96
|
+
font-size: var(--dsrc-font-size-body);
|
|
97
|
+
padding: 0 var(--dsrc-spacing-3);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.dsrc-pagination--lg .dsrc-pagination__ellipsis {
|
|
101
|
+
min-width: 44px;
|
|
102
|
+
height: 44px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/* ============================================
|
|
107
|
+
* High contrast (forced-colors)
|
|
108
|
+
* ============================================ */
|
|
109
|
+
|
|
110
|
+
@media (forced-colors: active) {
|
|
111
|
+
.dsrc-pagination__link {
|
|
112
|
+
border: 1px solid ButtonText;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.dsrc-pagination__link--active,
|
|
116
|
+
.dsrc-pagination__link[aria-current="page"] {
|
|
117
|
+
border: 2px solid Highlight;
|
|
118
|
+
color: Highlight;
|
|
119
|
+
background-color: Canvas;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.dsrc-pagination__link--disabled,
|
|
123
|
+
.dsrc-pagination__link[aria-disabled="true"] {
|
|
124
|
+
border-color: GrayText;
|
|
125
|
+
color: GrayText;
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.dsrc-pagination__link:focus-visible {
|
|
130
|
+
outline: 2px solid Highlight;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Password Component
|
|
3
|
+
*
|
|
4
|
+
* Wrapper around an input field with a "show/hide" checkbox toggle
|
|
5
|
+
* and an optional capslock indicator.
|
|
6
|
+
*
|
|
7
|
+
* Variants:
|
|
8
|
+
* --error ...... Error state
|
|
9
|
+
* --valid ...... Valid state
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* <div class="dsrc-password">
|
|
13
|
+
* <label class="dsrc-label" for="pw">Mot de passe</label>
|
|
14
|
+
* <div class="dsrc-password__checkbox">
|
|
15
|
+
* <input type="checkbox" id="pw-show">
|
|
16
|
+
* <label for="pw-show">Afficher</label>
|
|
17
|
+
* </div>
|
|
18
|
+
* <div class="dsrc-input-wrap">
|
|
19
|
+
* <input type="password" id="pw" class="dsrc-password__input dsrc-input">
|
|
20
|
+
* </div>
|
|
21
|
+
* </div>
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/* ============================================
|
|
26
|
+
* 1. Base password wrapper
|
|
27
|
+
* ============================================ */
|
|
28
|
+
|
|
29
|
+
.dsrc-password {
|
|
30
|
+
position: relative;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
align-items: flex-start;
|
|
34
|
+
margin-bottom: var(--dsrc-spacing-2);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dsrc-password > .dsrc-label {
|
|
38
|
+
order: -1;
|
|
39
|
+
flex: 1;
|
|
40
|
+
min-width: 50%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/* ============================================
|
|
45
|
+
* 2. Show/hide checkbox
|
|
46
|
+
* ============================================ */
|
|
47
|
+
|
|
48
|
+
.dsrc-password__checkbox {
|
|
49
|
+
order: -1;
|
|
50
|
+
flex: 0;
|
|
51
|
+
align-self: flex-end;
|
|
52
|
+
margin-left: auto;
|
|
53
|
+
padding-left: var(--dsrc-spacing-2);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.dsrc-password__checkbox label {
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
font-family: var(--dsrc-font-family-sans);
|
|
59
|
+
font-size: var(--dsrc-font-size-caption);
|
|
60
|
+
color: var(--dsrc-color-noir);
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/* ============================================
|
|
66
|
+
* 3. Input wrapper
|
|
67
|
+
* ============================================ */
|
|
68
|
+
|
|
69
|
+
.dsrc-password .dsrc-input-wrap {
|
|
70
|
+
flex: 1 0 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dsrc-password__input {
|
|
74
|
+
width: 100%;
|
|
75
|
+
margin-bottom: var(--dsrc-spacing-3);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Hide native password reveal (Edge/Chrome) */
|
|
79
|
+
.dsrc-password__input::-ms-reveal {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dsrc-password__input::-webkit-caps-lock-indicator {
|
|
84
|
+
content: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
/* ============================================
|
|
89
|
+
* 4. Capslock indicator
|
|
90
|
+
* ============================================ */
|
|
91
|
+
|
|
92
|
+
.dsrc-password[data-capslock]::after {
|
|
93
|
+
content: '';
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: var(--dsrc-spacing-3);
|
|
96
|
+
right: var(--dsrc-spacing-4);
|
|
97
|
+
width: 16px;
|
|
98
|
+
height: 16px;
|
|
99
|
+
pointer-events: none;
|
|
100
|
+
background-color: var(--dsrc-color-gris-600);
|
|
101
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L4 11h3v5h10v-5h3L12 2zm-1 16h2v2h-2v-2z'/%3E%3C/svg%3E");
|
|
102
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L4 11h3v5h10v-5h3L12 2zm-1 16h2v2h-2v-2z'/%3E%3C/svg%3E");
|
|
103
|
+
-webkit-mask-size: contain;
|
|
104
|
+
mask-size: contain;
|
|
105
|
+
-webkit-mask-repeat: no-repeat;
|
|
106
|
+
mask-repeat: no-repeat;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
/* ============================================
|
|
111
|
+
* 5. Validation states
|
|
112
|
+
* ============================================ */
|
|
113
|
+
|
|
114
|
+
.dsrc-password--error {
|
|
115
|
+
padding-left: var(--dsrc-spacing-3);
|
|
116
|
+
border-left: 2px solid var(--dsrc-color-erreur-bordure);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.dsrc-password--valid {
|
|
120
|
+
padding-left: var(--dsrc-spacing-3);
|
|
121
|
+
border-left: 2px solid var(--dsrc-color-succes-bordure);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.dsrc-password--error .dsrc-message {
|
|
125
|
+
color: var(--dsrc-color-erreur-texte);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.dsrc-password--valid .dsrc-message {
|
|
129
|
+
color: var(--dsrc-color-succes-texte);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
/* ============================================
|
|
134
|
+
* 6. Strength indicator
|
|
135
|
+
* ============================================ */
|
|
136
|
+
|
|
137
|
+
.dsrc-password__strength {
|
|
138
|
+
width: 100%;
|
|
139
|
+
display: flex;
|
|
140
|
+
gap: var(--dsrc-spacing-1);
|
|
141
|
+
margin-bottom: var(--dsrc-spacing-2);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.dsrc-password__strength-bar {
|
|
145
|
+
flex: 1;
|
|
146
|
+
height: 4px;
|
|
147
|
+
border-radius: 2px;
|
|
148
|
+
background-color: var(--dsrc-color-gris-200);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.dsrc-password[data-strength="1"] .dsrc-password__strength-bar:nth-child(1) {
|
|
152
|
+
background-color: var(--dsrc-color-erreur-bordure);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.dsrc-password[data-strength="2"] .dsrc-password__strength-bar:nth-child(-n+2) {
|
|
156
|
+
background-color: var(--dsrc-color-avertissement-bordure);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.dsrc-password[data-strength="3"] .dsrc-password__strength-bar:nth-child(-n+3) {
|
|
160
|
+
background-color: var(--dsrc-color-info-bordure);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.dsrc-password[data-strength="4"] .dsrc-password__strength-bar {
|
|
164
|
+
background-color: var(--dsrc-color-succes-bordure);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
/* ============================================
|
|
169
|
+
* 7. High contrast (forced-colors)
|
|
170
|
+
* ============================================ */
|
|
171
|
+
|
|
172
|
+
@media (forced-colors: active) {
|
|
173
|
+
.dsrc-password[data-capslock]::after {
|
|
174
|
+
background-color: ButtonText;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.dsrc-password__strength-bar {
|
|
178
|
+
border: 1px solid ButtonText;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
/* ============================================
|
|
184
|
+
* 8. Print
|
|
185
|
+
* ============================================ */
|
|
186
|
+
|
|
187
|
+
@media print {
|
|
188
|
+
.dsrc-password__checkbox {
|
|
189
|
+
display: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.dsrc-password__strength {
|
|
193
|
+
display: none;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Quote Component
|
|
3
|
+
*
|
|
4
|
+
* Semantic <figure> + <blockquote> with author attribution.
|
|
5
|
+
*
|
|
6
|
+
* Variants:
|
|
7
|
+
* --column ... Author image on the left (desktop)
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* <figure class="dsrc-quote">
|
|
11
|
+
* <blockquote>
|
|
12
|
+
* <p>« Citation mise en valeur. »</p>
|
|
13
|
+
* </blockquote>
|
|
14
|
+
* <figcaption>
|
|
15
|
+
* <p class="dsrc-quote__author">Paul Biya</p>
|
|
16
|
+
* <ul class="dsrc-quote__source">
|
|
17
|
+
* <li>Discours</li>
|
|
18
|
+
* <li>20 mai 2024</li>
|
|
19
|
+
* </ul>
|
|
20
|
+
* </figcaption>
|
|
21
|
+
* </figure>
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/* ============================================
|
|
26
|
+
* 1. Base quote
|
|
27
|
+
* ============================================ */
|
|
28
|
+
|
|
29
|
+
.dsrc-quote {
|
|
30
|
+
position: relative;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0 var(--dsrc-spacing-2) var(--dsrc-spacing-8) var(--dsrc-spacing-2);
|
|
33
|
+
border-left: 4px solid var(--dsrc-color-primaire);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.dsrc-quote blockquote {
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.dsrc-quote blockquote p {
|
|
41
|
+
font-family: var(--dsrc-font-family-sans);
|
|
42
|
+
font-size: var(--dsrc-font-size-xl);
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
line-height: 1.5;
|
|
45
|
+
margin: 0 0 var(--dsrc-spacing-4);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/* ============================================
|
|
50
|
+
* 2. Author & source
|
|
51
|
+
* ============================================ */
|
|
52
|
+
|
|
53
|
+
.dsrc-quote__author {
|
|
54
|
+
font-family: var(--dsrc-font-family-sans);
|
|
55
|
+
font-size: var(--dsrc-font-size-body);
|
|
56
|
+
font-weight: 700;
|
|
57
|
+
line-height: 1.5;
|
|
58
|
+
margin: 0 0 var(--dsrc-spacing-1);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dsrc-quote__source {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-wrap: wrap;
|
|
64
|
+
align-items: center;
|
|
65
|
+
list-style: none;
|
|
66
|
+
padding: 0;
|
|
67
|
+
margin: 0;
|
|
68
|
+
font-family: var(--dsrc-font-family-sans);
|
|
69
|
+
font-size: var(--dsrc-font-size-caption);
|
|
70
|
+
color: var(--dsrc-color-gris-600);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dsrc-quote__source li {
|
|
74
|
+
display: inline-block;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.dsrc-quote__source li:not(:last-child)::after {
|
|
78
|
+
content: '\00B7';
|
|
79
|
+
padding: 0 var(--dsrc-spacing-1);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.dsrc-quote__source cite {
|
|
83
|
+
font-style: italic;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
/* ============================================
|
|
88
|
+
* 3. Author image
|
|
89
|
+
* ============================================ */
|
|
90
|
+
|
|
91
|
+
.dsrc-quote__image {
|
|
92
|
+
width: 68px;
|
|
93
|
+
height: 68px;
|
|
94
|
+
border-radius: 50%;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
display: flex;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.dsrc-quote__image img {
|
|
100
|
+
width: 100%;
|
|
101
|
+
height: 100%;
|
|
102
|
+
object-fit: cover;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/* ============================================
|
|
107
|
+
* 4. Column variant (image on the left)
|
|
108
|
+
* ============================================ */
|
|
109
|
+
|
|
110
|
+
.dsrc-quote--column {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
align-items: flex-start;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@media (min-width: 768px) {
|
|
117
|
+
.dsrc-quote--column {
|
|
118
|
+
margin-left: 100px;
|
|
119
|
+
min-height: 92px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.dsrc-quote--column .dsrc-quote__image {
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: 50%;
|
|
125
|
+
left: -100px;
|
|
126
|
+
width: 84px;
|
|
127
|
+
height: 84px;
|
|
128
|
+
margin-top: -42px;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
/* ============================================
|
|
134
|
+
* 5. High contrast (forced-colors)
|
|
135
|
+
* ============================================ */
|
|
136
|
+
|
|
137
|
+
@media (forced-colors: active) {
|
|
138
|
+
.dsrc-quote {
|
|
139
|
+
border-left: 4px solid ButtonText;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
/* ============================================
|
|
145
|
+
* 6. Print
|
|
146
|
+
* ============================================ */
|
|
147
|
+
|
|
148
|
+
@media print {
|
|
149
|
+
.dsrc-quote {
|
|
150
|
+
border-left: 2px solid var(--dsrc-color-gris-600);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.dsrc-quote__image {
|
|
154
|
+
display: none;
|
|
155
|
+
}
|
|
156
|
+
}
|