@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,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Label Component
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* <label class="dsrc-label">
|
|
6
|
+
* Nom complet <span class="dsrc-label__required">*</span>
|
|
7
|
+
* </label>
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.dsrc-label {
|
|
11
|
+
display: block;
|
|
12
|
+
font-family: var(--dsrc-font-family-sans);
|
|
13
|
+
font-size: var(--dsrc-font-size-small);
|
|
14
|
+
font-weight: var(--dsrc-font-weight-semibold);
|
|
15
|
+
color: var(--dsrc-color-gris-800);
|
|
16
|
+
margin-bottom: var(--dsrc-spacing-1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.dsrc-label__required {
|
|
20
|
+
color: var(--dsrc-color-erreur-texte);
|
|
21
|
+
margin-left: var(--dsrc-spacing-1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dsrc-label__hint {
|
|
25
|
+
font-weight: var(--dsrc-font-weight-regular);
|
|
26
|
+
color: var(--dsrc-color-gris-600);
|
|
27
|
+
font-size: var(--dsrc-font-size-caption);
|
|
28
|
+
margin-left: var(--dsrc-spacing-2);
|
|
29
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Link Component
|
|
3
|
+
* Design Systeme de la Republique du Cameroun
|
|
4
|
+
*
|
|
5
|
+
* Architecture alignee sur le DSFR pour les liens avec
|
|
6
|
+
* icones, tailles, et variantes.
|
|
7
|
+
*
|
|
8
|
+
* Usage :
|
|
9
|
+
* <a class="dsrc-link" href="/page">Voir la page</a>
|
|
10
|
+
* <a class="dsrc-link dsrc-link--icon-right" href="/page">Suivant</a>
|
|
11
|
+
* <a class="dsrc-link dsrc-link--external" href="https://..." target="_blank" rel="noopener">Site externe</a>
|
|
12
|
+
* <a class="dsrc-link dsrc-link--download" href="/file.pdf" download>Telecharger (PDF, 1.2 Mo)</a>
|
|
13
|
+
*
|
|
14
|
+
* Modificateurs :
|
|
15
|
+
* --sm Taille reduite
|
|
16
|
+
* --lg Taille augmentee
|
|
17
|
+
* --icon-left Fleche a gauche du texte
|
|
18
|
+
* --icon-right Fleche a droite du texte
|
|
19
|
+
* --external Icone lien externe
|
|
20
|
+
* --download Icone telechargement
|
|
21
|
+
* --neutral Couleur grise
|
|
22
|
+
* --no-underline Sans soulignement par defaut
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/* ==========================================================================
|
|
27
|
+
1. BASE LINK
|
|
28
|
+
========================================================================== */
|
|
29
|
+
|
|
30
|
+
.dsrc-link {
|
|
31
|
+
font-family: var(--dsrc-font-family-sans);
|
|
32
|
+
font-size: var(--dsrc-font-size-body);
|
|
33
|
+
color: var(--dsrc-color-primaire);
|
|
34
|
+
text-decoration: underline;
|
|
35
|
+
text-underline-offset: 3px;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: var(--dsrc-spacing-1);
|
|
40
|
+
transition: color var(--dsrc-transition-duration-fast) ease;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.dsrc-link:hover {
|
|
44
|
+
color: var(--dsrc-color-primaire-fonce);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dsrc-link:active {
|
|
48
|
+
color: var(--dsrc-color-primaire-fonce);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dsrc-link:focus-visible {
|
|
52
|
+
outline: var(--dsrc-outline-width) solid var(--dsrc-color-primaire-focus);
|
|
53
|
+
outline-offset: var(--dsrc-outline-offset);
|
|
54
|
+
border-radius: var(--dsrc-radius-small);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dsrc-link:visited {
|
|
58
|
+
color: var(--dsrc-color-primaire-fonce);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/* ==========================================================================
|
|
63
|
+
2. SIZE MODIFIERS
|
|
64
|
+
========================================================================== */
|
|
65
|
+
|
|
66
|
+
.dsrc-link--sm {
|
|
67
|
+
font-size: var(--dsrc-font-size-small);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.dsrc-link--lg {
|
|
71
|
+
font-size: var(--dsrc-font-size-h5, 1.125rem);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/* ==========================================================================
|
|
76
|
+
3. ICON VARIANTS
|
|
77
|
+
Arrows via CSS mask-image.
|
|
78
|
+
========================================================================== */
|
|
79
|
+
|
|
80
|
+
/* --------------------------------------------------------------------------
|
|
81
|
+
3.1 Icon left (back arrow)
|
|
82
|
+
-------------------------------------------------------------------------- */
|
|
83
|
+
|
|
84
|
+
.dsrc-link--icon-left::before {
|
|
85
|
+
content: '';
|
|
86
|
+
display: inline-block;
|
|
87
|
+
width: 1em;
|
|
88
|
+
height: 1em;
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
background-color: currentColor;
|
|
91
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M10 3L5 8l5 5' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
92
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M10 3L5 8l5 5' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
93
|
+
-webkit-mask-repeat: no-repeat;
|
|
94
|
+
mask-repeat: no-repeat;
|
|
95
|
+
-webkit-mask-size: contain;
|
|
96
|
+
mask-size: contain;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* --------------------------------------------------------------------------
|
|
100
|
+
3.2 Icon right (forward arrow)
|
|
101
|
+
-------------------------------------------------------------------------- */
|
|
102
|
+
|
|
103
|
+
.dsrc-link--icon-right::after {
|
|
104
|
+
content: '';
|
|
105
|
+
display: inline-block;
|
|
106
|
+
width: 1em;
|
|
107
|
+
height: 1em;
|
|
108
|
+
flex-shrink: 0;
|
|
109
|
+
background-color: currentColor;
|
|
110
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M6 3l5 5-5 5' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
111
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M6 3l5 5-5 5' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
112
|
+
-webkit-mask-repeat: no-repeat;
|
|
113
|
+
mask-repeat: no-repeat;
|
|
114
|
+
-webkit-mask-size: contain;
|
|
115
|
+
mask-size: contain;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
/* ==========================================================================
|
|
120
|
+
4. EXTERNAL LINK VARIANT
|
|
121
|
+
========================================================================== */
|
|
122
|
+
|
|
123
|
+
.dsrc-link--external::after {
|
|
124
|
+
content: '';
|
|
125
|
+
display: inline-block;
|
|
126
|
+
width: 1em;
|
|
127
|
+
height: 1em;
|
|
128
|
+
flex-shrink: 0;
|
|
129
|
+
background-color: currentColor;
|
|
130
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M13 9v4a1 1 0 01-1 1H4a1 1 0 01-1-1V5a1 1 0 011-1h4M9 2h5v5M14 2L7 9' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
131
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M13 9v4a1 1 0 01-1 1H4a1 1 0 01-1-1V5a1 1 0 011-1h4M9 2h5v5M14 2L7 9' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
132
|
+
-webkit-mask-repeat: no-repeat;
|
|
133
|
+
mask-repeat: no-repeat;
|
|
134
|
+
-webkit-mask-size: contain;
|
|
135
|
+
mask-size: contain;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
/* ==========================================================================
|
|
140
|
+
5. DOWNLOAD LINK VARIANT
|
|
141
|
+
========================================================================== */
|
|
142
|
+
|
|
143
|
+
.dsrc-link--download::before {
|
|
144
|
+
content: '';
|
|
145
|
+
display: inline-block;
|
|
146
|
+
width: 1em;
|
|
147
|
+
height: 1em;
|
|
148
|
+
flex-shrink: 0;
|
|
149
|
+
background-color: currentColor;
|
|
150
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M8 2v8M8 10L4.5 6.5M8 10l3.5-3.5M3 14h10' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
151
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M8 2v8M8 10L4.5 6.5M8 10l3.5-3.5M3 14h10' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
152
|
+
-webkit-mask-repeat: no-repeat;
|
|
153
|
+
mask-repeat: no-repeat;
|
|
154
|
+
-webkit-mask-size: contain;
|
|
155
|
+
mask-size: contain;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
/* ==========================================================================
|
|
160
|
+
6. COLOR MODIFIERS
|
|
161
|
+
========================================================================== */
|
|
162
|
+
|
|
163
|
+
.dsrc-link--neutral {
|
|
164
|
+
color: var(--dsrc-color-gris-700);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.dsrc-link--neutral:hover {
|
|
168
|
+
color: var(--dsrc-color-noir);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.dsrc-link--neutral:visited {
|
|
172
|
+
color: var(--dsrc-color-gris-700);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
/* ==========================================================================
|
|
177
|
+
7. TEXT-DECORATION MODIFIER
|
|
178
|
+
========================================================================== */
|
|
179
|
+
|
|
180
|
+
.dsrc-link--no-underline {
|
|
181
|
+
text-decoration: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.dsrc-link--no-underline:hover {
|
|
185
|
+
text-decoration: underline;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
/* ==========================================================================
|
|
190
|
+
8. HIGH CONTRAST (forced-colors)
|
|
191
|
+
========================================================================== */
|
|
192
|
+
|
|
193
|
+
@media (forced-colors: active) {
|
|
194
|
+
.dsrc-link {
|
|
195
|
+
text-decoration: underline;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.dsrc-link:focus-visible {
|
|
199
|
+
outline: 2px solid Highlight;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.dsrc-link--icon-left::before,
|
|
203
|
+
.dsrc-link--icon-right::after,
|
|
204
|
+
.dsrc-link--external::after,
|
|
205
|
+
.dsrc-link--download::before {
|
|
206
|
+
background-color: LinkText;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Logo Component
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* <div class="dsrc-logo">
|
|
6
|
+
* <div class="dsrc-logo__flag">
|
|
7
|
+
* <span class="dsrc-logo__flag-green"></span>
|
|
8
|
+
* <span class="dsrc-logo__flag-red"></span>
|
|
9
|
+
* <span class="dsrc-logo__flag-yellow"></span>
|
|
10
|
+
* </div>
|
|
11
|
+
* <div class="dsrc-logo__text">
|
|
12
|
+
* <span class="dsrc-logo__title">Republique du Cameroun</span>
|
|
13
|
+
* <span class="dsrc-logo__motto">Paix - Travail - Patrie</span>
|
|
14
|
+
* </div>
|
|
15
|
+
* </div>
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
.dsrc-logo {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: var(--dsrc-spacing-3);
|
|
22
|
+
text-decoration: none;
|
|
23
|
+
color: var(--dsrc-color-noir);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dsrc-logo__flag {
|
|
27
|
+
display: flex;
|
|
28
|
+
width: 36px;
|
|
29
|
+
height: 28px;
|
|
30
|
+
border-radius: var(--dsrc-radius-small);
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dsrc-logo__flag-green {
|
|
36
|
+
flex: 1;
|
|
37
|
+
background-color: var(--dsrc-color-drapeau-vert);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.dsrc-logo__flag-red {
|
|
41
|
+
flex: 1;
|
|
42
|
+
background-color: var(--dsrc-color-drapeau-rouge);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dsrc-logo__flag-yellow {
|
|
46
|
+
flex: 1;
|
|
47
|
+
background-color: var(--dsrc-color-drapeau-jaune);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.dsrc-logo__text {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dsrc-logo__title {
|
|
56
|
+
font-family: var(--dsrc-font-family-sans);
|
|
57
|
+
font-size: var(--dsrc-font-size-small);
|
|
58
|
+
font-weight: var(--dsrc-font-weight-bold);
|
|
59
|
+
line-height: var(--dsrc-font-line-height-tight);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.dsrc-logo__motto {
|
|
63
|
+
font-family: var(--dsrc-font-family-sans);
|
|
64
|
+
font-size: var(--dsrc-font-size-micro);
|
|
65
|
+
color: var(--dsrc-color-gris-600);
|
|
66
|
+
font-style: italic;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.dsrc-logo--lg .dsrc-logo__flag {
|
|
70
|
+
width: 48px;
|
|
71
|
+
height: 36px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dsrc-logo--lg .dsrc-logo__title {
|
|
75
|
+
font-size: var(--dsrc-font-size-body);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.dsrc-logo--lg .dsrc-logo__motto {
|
|
79
|
+
font-size: var(--dsrc-font-size-caption);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.dsrc-logo:focus-visible {
|
|
83
|
+
outline: var(--dsrc-outline-width) solid var(--dsrc-color-primaire-focus);
|
|
84
|
+
outline-offset: var(--dsrc-outline-offset);
|
|
85
|
+
border-radius: var(--dsrc-radius-small);
|
|
86
|
+
}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSRC Modal Component
|
|
3
|
+
*
|
|
4
|
+
* Based on the native <dialog> element for built-in a11y.
|
|
5
|
+
* Layout: flex column with header / body (scrollable) / footer (sticky).
|
|
6
|
+
*
|
|
7
|
+
* Variants:
|
|
8
|
+
* --top ... Anchored to top instead of bottom on mobile
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* <dialog class="dsrc-modal" id="modal1">
|
|
12
|
+
* <div class="dsrc-modal__body">
|
|
13
|
+
* <div class="dsrc-modal__header">
|
|
14
|
+
* <h2 class="dsrc-modal__title">Titre</h2>
|
|
15
|
+
* </div>
|
|
16
|
+
* <div class="dsrc-modal__content">
|
|
17
|
+
* <p>Contenu de la modale.</p>
|
|
18
|
+
* </div>
|
|
19
|
+
* <div class="dsrc-modal__footer">
|
|
20
|
+
* <button class="dsrc-btn">Confirmer</button>
|
|
21
|
+
* </div>
|
|
22
|
+
* </div>
|
|
23
|
+
* </dialog>
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/* ============================================
|
|
28
|
+
* 1. Base modal (dialog reset)
|
|
29
|
+
* ============================================ */
|
|
30
|
+
|
|
31
|
+
.dsrc-modal {
|
|
32
|
+
border: none;
|
|
33
|
+
color: inherit;
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
padding: 0;
|
|
36
|
+
margin: 0;
|
|
37
|
+
position: fixed;
|
|
38
|
+
top: 0;
|
|
39
|
+
right: 0;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
left: 0;
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: stretch;
|
|
47
|
+
justify-content: flex-end;
|
|
48
|
+
z-index: var(--dsrc-z-index-modal, 1000);
|
|
49
|
+
visibility: hidden;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
transition: opacity 0.3s, visibility 0.3s;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/* ============================================
|
|
56
|
+
* 2. Overlay (::backdrop)
|
|
57
|
+
* ============================================ */
|
|
58
|
+
|
|
59
|
+
.dsrc-modal::backdrop {
|
|
60
|
+
background-color: rgba(0, 0, 0, 0.64);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/* ============================================
|
|
65
|
+
* 3. Open state
|
|
66
|
+
* ============================================ */
|
|
67
|
+
|
|
68
|
+
.dsrc-modal[open] {
|
|
69
|
+
visibility: visible;
|
|
70
|
+
opacity: 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/* ============================================
|
|
75
|
+
* 4. Spacers (center the body vertically)
|
|
76
|
+
* ============================================ */
|
|
77
|
+
|
|
78
|
+
.dsrc-modal::before {
|
|
79
|
+
content: '';
|
|
80
|
+
display: block;
|
|
81
|
+
width: 0;
|
|
82
|
+
height: 32px;
|
|
83
|
+
flex: 1 0 32px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.dsrc-modal::after {
|
|
87
|
+
content: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Top variant: body at top on mobile */
|
|
91
|
+
.dsrc-modal--top::before {
|
|
92
|
+
content: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.dsrc-modal--top::after {
|
|
96
|
+
content: '';
|
|
97
|
+
display: block;
|
|
98
|
+
width: 0;
|
|
99
|
+
height: 32px;
|
|
100
|
+
flex: 1 0 32px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@media (min-width: 768px) {
|
|
104
|
+
.dsrc-modal {
|
|
105
|
+
justify-content: center;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.dsrc-modal::before {
|
|
109
|
+
height: 10%;
|
|
110
|
+
flex: 1 0 10%;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.dsrc-modal::after {
|
|
114
|
+
content: '';
|
|
115
|
+
display: block;
|
|
116
|
+
width: 0;
|
|
117
|
+
height: 10%;
|
|
118
|
+
flex: 1 0 10%;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.dsrc-modal--top::before {
|
|
122
|
+
content: '';
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
/* ============================================
|
|
128
|
+
* 5. Modal body (white card)
|
|
129
|
+
* ============================================ */
|
|
130
|
+
|
|
131
|
+
.dsrc-modal__body {
|
|
132
|
+
--modal-max-height: calc(100vh - 2rem);
|
|
133
|
+
pointer-events: all;
|
|
134
|
+
overflow-y: auto;
|
|
135
|
+
flex: 1 1 auto;
|
|
136
|
+
max-height: var(--modal-max-height);
|
|
137
|
+
background-color: var(--dsrc-color-blanc);
|
|
138
|
+
box-shadow: var(--dsrc-shadow-lg);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@media (min-width: 768px) {
|
|
142
|
+
.dsrc-modal__body {
|
|
143
|
+
max-height: 80vh;
|
|
144
|
+
max-width: 600px;
|
|
145
|
+
margin: 0 auto;
|
|
146
|
+
width: 100%;
|
|
147
|
+
border-radius: var(--dsrc-radius-default);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
/* ============================================
|
|
153
|
+
* 6. Header
|
|
154
|
+
* ============================================ */
|
|
155
|
+
|
|
156
|
+
.dsrc-modal__header {
|
|
157
|
+
flex: 0 0 auto;
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
padding: var(--dsrc-spacing-4);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@media (min-width: 768px) {
|
|
164
|
+
.dsrc-modal__header {
|
|
165
|
+
padding: var(--dsrc-spacing-4) var(--dsrc-spacing-8);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.dsrc-modal__title {
|
|
170
|
+
font-family: var(--dsrc-font-family-sans);
|
|
171
|
+
font-size: var(--dsrc-font-size-h4);
|
|
172
|
+
font-weight: 700;
|
|
173
|
+
margin: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
/* ============================================
|
|
178
|
+
* 7. Content
|
|
179
|
+
* ============================================ */
|
|
180
|
+
|
|
181
|
+
.dsrc-modal__content {
|
|
182
|
+
padding: 0 var(--dsrc-spacing-4) var(--dsrc-spacing-14);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (min-width: 768px) {
|
|
186
|
+
.dsrc-modal__content {
|
|
187
|
+
padding: 0 var(--dsrc-spacing-8) var(--dsrc-spacing-16);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
/* ============================================
|
|
193
|
+
* 8. Footer (sticky)
|
|
194
|
+
* ============================================ */
|
|
195
|
+
|
|
196
|
+
.dsrc-modal__footer {
|
|
197
|
+
flex: 0 0 auto;
|
|
198
|
+
display: flex;
|
|
199
|
+
padding: var(--dsrc-spacing-4);
|
|
200
|
+
position: sticky;
|
|
201
|
+
bottom: 0;
|
|
202
|
+
background-color: var(--dsrc-color-blanc);
|
|
203
|
+
transition: box-shadow 0.3s;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@media (min-width: 768px) {
|
|
207
|
+
.dsrc-modal__footer {
|
|
208
|
+
padding: var(--dsrc-spacing-8);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
/* ============================================
|
|
214
|
+
* 9. Close button
|
|
215
|
+
* ============================================ */
|
|
216
|
+
|
|
217
|
+
.dsrc-modal__close {
|
|
218
|
+
margin-left: auto;
|
|
219
|
+
background: none;
|
|
220
|
+
border: none;
|
|
221
|
+
padding: var(--dsrc-spacing-1);
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
color: var(--dsrc-color-noir);
|
|
224
|
+
line-height: 1;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.dsrc-modal__close:focus-visible {
|
|
228
|
+
outline: 2px solid var(--dsrc-color-primaire);
|
|
229
|
+
outline-offset: 2px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
/* ============================================
|
|
234
|
+
* 10. High contrast (forced-colors)
|
|
235
|
+
* ============================================ */
|
|
236
|
+
|
|
237
|
+
@media (forced-colors: active) {
|
|
238
|
+
.dsrc-modal__body {
|
|
239
|
+
border: 1px solid ButtonText;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.dsrc-modal__footer {
|
|
243
|
+
border-top: 1px solid ButtonText;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
/* ============================================
|
|
249
|
+
* 11. Reduced motion
|
|
250
|
+
* ============================================ */
|
|
251
|
+
|
|
252
|
+
@media (prefers-reduced-motion: reduce) {
|
|
253
|
+
.dsrc-modal {
|
|
254
|
+
transition: none;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.dsrc-modal__footer {
|
|
258
|
+
transition: none;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
/* ============================================
|
|
264
|
+
* 12. Print
|
|
265
|
+
* ============================================ */
|
|
266
|
+
|
|
267
|
+
@media print {
|
|
268
|
+
.dsrc-modal {
|
|
269
|
+
display: none;
|
|
270
|
+
}
|
|
271
|
+
}
|