@jrgermain/stylesheet 0.2.1 → 0.3.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/index.css +2677 -2574
- package/dist/index.css.map +1 -1
- package/dist/index.min.css +2 -2
- package/dist/index.min.css.map +1 -1
- package/package.json +12 -12
- package/src/styles/components/{_details.scss → accordion.css} +58 -69
- package/src/styles/components/alert.css +12 -0
- package/src/styles/components/{_app.scss → app.css} +106 -47
- package/src/styles/components/banner.css +33 -0
- package/src/styles/components/{_button.scss → button.css} +145 -24
- package/src/styles/components/{_card.scss → card.css} +15 -19
- package/src/styles/components/chip.css +217 -0
- package/src/styles/components/{_hr.scss → divider.css} +7 -6
- package/src/styles/components/drawer.css +111 -0
- package/src/styles/components/{_field.scss → field.css} +22 -21
- package/src/styles/components/{_layout.scss → flex.css} +5 -25
- package/src/styles/components/heading.css +60 -0
- package/src/styles/components/highlight.css +39 -0
- package/src/styles/components/link.css +41 -0
- package/src/styles/components/meter.css +80 -0
- package/src/styles/components/modal.css +39 -0
- package/src/styles/components/progress.css +73 -0
- package/src/styles/components/quote.css +31 -0
- package/src/styles/components/{_skeleton.scss → skeleton.css} +17 -18
- package/src/styles/components/skip-link.css +44 -0
- package/src/styles/components/slider.css +96 -0
- package/src/styles/components/{_switch.scss → switch.css} +24 -12
- package/src/styles/components/table.css +86 -0
- package/src/styles/components/text.css +120 -0
- package/src/styles/components/visually-hidden.css +13 -0
- package/src/styles/experimental/dialog-animations.css +6 -6
- package/src/styles/index.css +32 -0
- package/src/styles/shared/base-alert.css +112 -0
- package/src/styles/shared/base-dialog.css +90 -0
- package/src/styles/shared/dismiss-button.css +27 -0
- package/src/styles/utils/reset.css +29 -0
- package/src/styles/{_variables.scss → utils/variables.css} +43 -52
- package/src/svg/dropdown-invert-thick.svg +4 -0
- package/src/svg/dropdown-invert.svg +4 -0
- package/src/svg/dropdown-thick.svg +4 -0
- package/src/svg/dropdown.svg +1 -1
- package/src/styles/_utils.scss +0 -87
- package/src/styles/components/_alert.scss +0 -178
- package/src/styles/components/_chip.scss +0 -151
- package/src/styles/components/_dialog.scss +0 -234
- package/src/styles/components/_progress-meter.scss +0 -149
- package/src/styles/components/_range.scss +0 -96
- package/src/styles/components/_table.scss +0 -82
- package/src/styles/components/_text.scss +0 -295
- package/src/styles/index.scss +0 -47
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
@use "sass:color";
|
|
3
|
-
@use "sass:math";
|
|
4
|
-
|
|
5
1
|
:root,
|
|
6
2
|
::backdrop {
|
|
7
3
|
--opacity-low: 20%;
|
|
8
4
|
--opacity-medium: 40%;
|
|
9
5
|
--opacity-high: 70%;
|
|
6
|
+
--opacity-disabled: 65%;
|
|
10
7
|
|
|
11
|
-
|
|
8
|
+
/* Brand */
|
|
12
9
|
--color-brand-1: oklch(15% 55% 275deg);
|
|
13
10
|
--color-brand-2: oklch(25% 52% 275deg);
|
|
14
11
|
--color-brand-3: oklch(35% 52% 275deg);
|
|
@@ -21,7 +18,7 @@
|
|
|
21
18
|
--color-brand-transparent: oklch(55% 52% 275deg / var(--opacity-medium));
|
|
22
19
|
--color-brand-extra-transparent: oklch(55% 52% 275deg / var(--opacity-low));
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
/* Red */
|
|
25
22
|
--color-red-1: oklch(15% 55% 30deg);
|
|
26
23
|
--color-red-2: oklch(25% 52% 30deg);
|
|
27
24
|
--color-red-3: oklch(35% 54% 30deg);
|
|
@@ -34,7 +31,7 @@
|
|
|
34
31
|
--color-red-transparent: oklch(55% 50% 30deg / var(--opacity-medium));
|
|
35
32
|
--color-red-extra-transparent: oklch(55% 50% 30deg / var(--opacity-low));
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
/* Orange */
|
|
38
35
|
--color-orange-1: oklch(15% 60% 55deg);
|
|
39
36
|
--color-orange-2: oklch(25% 60% 55deg);
|
|
40
37
|
--color-orange-3: oklch(35% 55% 55deg);
|
|
@@ -47,7 +44,7 @@
|
|
|
47
44
|
--color-orange-transparent: oklch(55% 50% 55deg / var(--opacity-medium));
|
|
48
45
|
--color-orange-extra-transparent: oklch(55% 50% 55deg / var(--opacity-low));
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
/* Yellow */
|
|
51
48
|
--color-yellow-1: oklch(15% 55% 88deg);
|
|
52
49
|
--color-yellow-2: oklch(25% 55% 88deg);
|
|
53
50
|
--color-yellow-3: oklch(35% 55% 88deg);
|
|
@@ -60,7 +57,7 @@
|
|
|
60
57
|
--color-yellow-transparent: oklch(55% 45% 88deg / var(--opacity-medium));
|
|
61
58
|
--color-yellow-extra-transparent: oklch(55% 45% 88deg / var(--opacity-low));
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
/* Green */
|
|
64
61
|
--color-green-1: oklch(15% 55% 133deg);
|
|
65
62
|
--color-green-2: oklch(25% 50% 133deg);
|
|
66
63
|
--color-green-3: oklch(35% 48% 133deg);
|
|
@@ -73,7 +70,7 @@
|
|
|
73
70
|
--color-green-transparent: oklch(55% 46% 133deg / var(--opacity-medium));
|
|
74
71
|
--color-green-extra-transparent: oklch(55% 46% 133deg / var(--opacity-low));
|
|
75
72
|
|
|
76
|
-
|
|
73
|
+
/* Sky */
|
|
77
74
|
--color-sky-1: oklch(15% 55% 195deg);
|
|
78
75
|
--color-sky-2: oklch(25% 55% 195deg);
|
|
79
76
|
--color-sky-3: oklch(35% 50% 195deg);
|
|
@@ -86,7 +83,7 @@
|
|
|
86
83
|
--color-sky-transparent: oklch(55% 52% 195deg / var(--opacity-medium));
|
|
87
84
|
--color-sky-extra-transparent: oklch(55% 52% 195deg / var(--opacity-low));
|
|
88
85
|
|
|
89
|
-
|
|
86
|
+
/* Blue */
|
|
90
87
|
--color-blue-1: oklch(15% 52% 260deg);
|
|
91
88
|
--color-blue-2: oklch(25% 48% 260deg);
|
|
92
89
|
--color-blue-3: oklch(35% 46% 260deg);
|
|
@@ -99,7 +96,7 @@
|
|
|
99
96
|
--color-blue-transparent: oklch(55% 50% 260deg / var(--opacity-medium));
|
|
100
97
|
--color-blue-extra-transparent: oklch(55% 50% 260deg / var(--opacity-low));
|
|
101
98
|
|
|
102
|
-
|
|
99
|
+
/* Purple */
|
|
103
100
|
--color-purple-1: oklch(15% 55% 310deg);
|
|
104
101
|
--color-purple-2: oklch(25% 55% 310deg);
|
|
105
102
|
--color-purple-3: oklch(35% 53% 310deg);
|
|
@@ -112,7 +109,7 @@
|
|
|
112
109
|
--color-purple-transparent: oklch(55% 52% 310deg / var(--opacity-medium));
|
|
113
110
|
--color-purple-extra-transparent: oklch(55% 52% 310deg / var(--opacity-low));
|
|
114
111
|
|
|
115
|
-
|
|
112
|
+
/* Magenta */
|
|
116
113
|
--color-magenta-1: oklch(15% 55% 356deg);
|
|
117
114
|
--color-magenta-2: oklch(25% 55% 356deg);
|
|
118
115
|
--color-magenta-3: oklch(35% 54% 356deg);
|
|
@@ -125,7 +122,7 @@
|
|
|
125
122
|
--color-magenta-transparent: oklch(55% 50% 356deg / var(--opacity-medium));
|
|
126
123
|
--color-magenta-extra-transparent: oklch(55% 50% 356deg / var(--opacity-low));
|
|
127
124
|
|
|
128
|
-
|
|
125
|
+
/* Gray */
|
|
129
126
|
--color-gray-1: oklch(15% 2% 263deg);
|
|
130
127
|
--color-gray-2: oklch(25% 2% 263deg);
|
|
131
128
|
--color-gray-3: oklch(35% 2% 263deg);
|
|
@@ -138,8 +135,8 @@
|
|
|
138
135
|
--color-gray-transparent: oklch(55% 2% 263deg / var(--opacity-medium));
|
|
139
136
|
--color-gray-extra-transparent: oklch(55% 2% 263deg / var(--opacity-low));
|
|
140
137
|
|
|
141
|
-
|
|
142
|
-
--color-body: oklch(98.5%
|
|
138
|
+
/* Individual colors */
|
|
139
|
+
--color-body: oklch(98.5% 0.8% 263deg);
|
|
143
140
|
--color-body-alt: white;
|
|
144
141
|
--color-body-text: oklch(10% 2% 263deg);
|
|
145
142
|
--color-body-text-alt: oklch(38% 2% 263deg);
|
|
@@ -147,7 +144,7 @@
|
|
|
147
144
|
--color-outline: oklch(89% 2% 263deg);
|
|
148
145
|
|
|
149
146
|
@media (prefers-color-scheme: dark) {
|
|
150
|
-
|
|
147
|
+
/* Brand */
|
|
151
148
|
--color-brand-9: oklch(15% 55% 275deg);
|
|
152
149
|
--color-brand-8: oklch(25% 52% 275deg);
|
|
153
150
|
--color-brand-7: oklch(35% 52% 275deg);
|
|
@@ -157,7 +154,7 @@
|
|
|
157
154
|
--color-brand-2: oklch(85% 42% 275deg);
|
|
158
155
|
--color-brand-1: oklch(95% 36% 275deg);
|
|
159
156
|
|
|
160
|
-
|
|
157
|
+
/* Red */
|
|
161
158
|
--color-red-9: oklch(15% 55% 30deg);
|
|
162
159
|
--color-red-8: oklch(25% 52% 30deg);
|
|
163
160
|
--color-red-7: oklch(35% 54% 30deg);
|
|
@@ -167,7 +164,7 @@
|
|
|
167
164
|
--color-red-2: oklch(85% 45% 30deg);
|
|
168
165
|
--color-red-1: oklch(95% 38% 30deg);
|
|
169
166
|
|
|
170
|
-
|
|
167
|
+
/* Orange */
|
|
171
168
|
--color-orange-9: oklch(15% 60% 55deg);
|
|
172
169
|
--color-orange-8: oklch(25% 60% 55deg);
|
|
173
170
|
--color-orange-7: oklch(35% 55% 55deg);
|
|
@@ -177,7 +174,7 @@
|
|
|
177
174
|
--color-orange-2: oklch(85% 40% 55deg);
|
|
178
175
|
--color-orange-1: oklch(95% 38% 55deg);
|
|
179
176
|
|
|
180
|
-
|
|
177
|
+
/* Yellow */
|
|
181
178
|
--color-yellow-9: oklch(15% 55% 88deg);
|
|
182
179
|
--color-yellow-8: oklch(25% 55% 88deg);
|
|
183
180
|
--color-yellow-7: oklch(35% 55% 88deg);
|
|
@@ -187,7 +184,7 @@
|
|
|
187
184
|
--color-yellow-2: oklch(85% 30% 88deg);
|
|
188
185
|
--color-yellow-1: oklch(95% 28% 88deg);
|
|
189
186
|
|
|
190
|
-
|
|
187
|
+
/* Green */
|
|
191
188
|
--color-green-9: oklch(15% 55% 133deg);
|
|
192
189
|
--color-green-8: oklch(25% 50% 133deg);
|
|
193
190
|
--color-green-7: oklch(35% 48% 133deg);
|
|
@@ -197,7 +194,7 @@
|
|
|
197
194
|
--color-green-2: oklch(85% 40% 133deg);
|
|
198
195
|
--color-green-1: oklch(95% 20% 133deg);
|
|
199
196
|
|
|
200
|
-
|
|
197
|
+
/* Sky */
|
|
201
198
|
--color-sky-9: oklch(15% 55% 195deg);
|
|
202
199
|
--color-sky-8: oklch(25% 55% 195deg);
|
|
203
200
|
--color-sky-7: oklch(35% 50% 195deg);
|
|
@@ -207,7 +204,7 @@
|
|
|
207
204
|
--color-sky-2: oklch(85% 25% 195deg);
|
|
208
205
|
--color-sky-1: oklch(95% 12% 195deg);
|
|
209
206
|
|
|
210
|
-
|
|
207
|
+
/* Blue */
|
|
211
208
|
--color-blue-9: oklch(15% 52% 260deg);
|
|
212
209
|
--color-blue-8: oklch(25% 48% 260deg);
|
|
213
210
|
--color-blue-7: oklch(35% 46% 260deg);
|
|
@@ -217,7 +214,7 @@
|
|
|
217
214
|
--color-blue-2: oklch(85% 45% 260deg);
|
|
218
215
|
--color-blue-1: oklch(95% 42% 260deg);
|
|
219
216
|
|
|
220
|
-
|
|
217
|
+
/* Purple */
|
|
221
218
|
--color-purple-9: oklch(15% 55% 310deg);
|
|
222
219
|
--color-purple-8: oklch(25% 55% 310deg);
|
|
223
220
|
--color-purple-7: oklch(35% 53% 310deg);
|
|
@@ -227,7 +224,7 @@
|
|
|
227
224
|
--color-purple-2: oklch(85% 42% 310deg);
|
|
228
225
|
--color-purple-1: oklch(95% 40% 310deg);
|
|
229
226
|
|
|
230
|
-
|
|
227
|
+
/* Magenta */
|
|
231
228
|
--color-magenta-9: oklch(15% 55% 356deg);
|
|
232
229
|
--color-magenta-8: oklch(25% 55% 356deg);
|
|
233
230
|
--color-magenta-7: oklch(35% 54% 356deg);
|
|
@@ -237,7 +234,7 @@
|
|
|
237
234
|
--color-magenta-2: oklch(85% 36% 356deg);
|
|
238
235
|
--color-magenta-1: oklch(95% 34% 356deg);
|
|
239
236
|
|
|
240
|
-
|
|
237
|
+
/* Gray */
|
|
241
238
|
--color-gray-9: oklch(15% 2% 263deg);
|
|
242
239
|
--color-gray-8: oklch(25% 2% 263deg);
|
|
243
240
|
--color-gray-7: oklch(35% 2% 263deg);
|
|
@@ -247,7 +244,7 @@
|
|
|
247
244
|
--color-gray-2: oklch(85% 2% 263deg);
|
|
248
245
|
--color-gray-1: oklch(95% 2% 263deg);
|
|
249
246
|
|
|
250
|
-
|
|
247
|
+
/* Darker replacements for semantic colors */
|
|
251
248
|
--color-body: oklch(20% 2% 263deg);
|
|
252
249
|
--color-body-alt: oklch(8% 2% 263deg);
|
|
253
250
|
--color-body-text: white;
|
|
@@ -255,19 +252,14 @@
|
|
|
255
252
|
--color-shadow: oklch(5% 2% 263deg / 40%);
|
|
256
253
|
--color-outline: oklch(39% 2% 263deg);
|
|
257
254
|
|
|
258
|
-
|
|
259
|
-
--font-weight-black: 900;
|
|
260
|
-
--font-weight-bold: 700;
|
|
261
|
-
--font-weight-semibold: 550;
|
|
262
|
-
--font-weight-normal: 375;
|
|
263
|
-
|
|
264
|
-
// Slightly increase opacity
|
|
255
|
+
/* Slightly increase opacity */
|
|
265
256
|
--opacity-low: 35%;
|
|
266
257
|
--opacity-medium: 50%;
|
|
267
258
|
--opacity-high: 80%;
|
|
259
|
+
--opacity-disabled: 50%;
|
|
268
260
|
}
|
|
269
261
|
|
|
270
|
-
|
|
262
|
+
/* Font sizes */
|
|
271
263
|
--font-size-xs: clamp(0.6944rem, 0.6855rem + 0.0446vw, 0.72rem);
|
|
272
264
|
--font-size-s: clamp(0.8331rem, 0.8099rem + 0.1163vw, 0.9rem);
|
|
273
265
|
--font-size-m: clamp(1rem, 0.9565rem + 0.2174vw, 1.125rem);
|
|
@@ -277,22 +269,21 @@
|
|
|
277
269
|
--font-size-3xl: clamp(2.0738rem, 1.8396rem + 1.1707vw, 2.7469rem);
|
|
278
270
|
--font-size-4xl: clamp(2.4881rem, 2.1594rem + 1.6435vw, 3.4331rem);
|
|
279
271
|
|
|
280
|
-
|
|
281
|
-
--font-weight-
|
|
282
|
-
--font-weight-bold: 750;
|
|
283
|
-
--font-weight-semibold: 600;
|
|
272
|
+
/* Font weights */
|
|
273
|
+
--font-weight-light: 300;
|
|
284
274
|
--font-weight-normal: 400;
|
|
285
|
-
--font-weight-
|
|
275
|
+
--font-weight-semibold: 600;
|
|
276
|
+
--font-weight-bold: 700;
|
|
277
|
+
--font-weight-black: 900;
|
|
286
278
|
|
|
287
|
-
|
|
288
|
-
--font-family-body: "
|
|
289
|
-
"
|
|
290
|
-
--font-family-heading:
|
|
291
|
-
|
|
292
|
-
--font-family-mono: "Source Code Pro
|
|
293
|
-
"Source Code Pro", "Menlo", "Consolas", "DejaVu Sans Mono", monospace;
|
|
279
|
+
/* Font families */
|
|
280
|
+
--font-family-body: "Avenir Next", avenir, corbel, source-sans-pro,
|
|
281
|
+
"DejaVu Sans", ui-sans-serif, sans-serif;
|
|
282
|
+
--font-family-heading: seravek, "Gill Sans Nova", verdana, "DejaVu Sans",
|
|
283
|
+
source-sans-pro, ui-sans-serif, sans-serif;
|
|
284
|
+
--font-family-mono: ui-monospace, "Source Code Pro", ui-monospace, monospace;
|
|
294
285
|
|
|
295
|
-
|
|
286
|
+
/* Spacing */
|
|
296
287
|
--space-3xs: clamp(4px, 3.6528px + 0.1087vw, 5px);
|
|
297
288
|
--space-2xs: clamp(8px, 7.6528px + 0.1087vw, 9px);
|
|
298
289
|
--space-xs: clamp(12px, 11.304px + 0.2174vw, 14px);
|
|
@@ -303,10 +294,10 @@
|
|
|
303
294
|
--space-2xl: clamp(64px, 61.2176px + 0.8696vw, 72px);
|
|
304
295
|
--space-3xl: clamp(96px, 91.8256px + 1.3043vw, 108px);
|
|
305
296
|
|
|
306
|
-
|
|
297
|
+
/* Between xs and m based on screen width */
|
|
307
298
|
--space-body: clamp(12px, 6.7824px + 1.6304vw, 27px);
|
|
308
299
|
|
|
309
|
-
|
|
300
|
+
/* Radii */
|
|
310
301
|
--radius-none: 0;
|
|
311
302
|
--radius-s: 3px;
|
|
312
303
|
--radius-m: 6px;
|
|
@@ -315,14 +306,14 @@
|
|
|
315
306
|
--radius-2xl: 64px;
|
|
316
307
|
--radius-full: 9999px;
|
|
317
308
|
|
|
318
|
-
|
|
309
|
+
/* Shadows */
|
|
319
310
|
--shadow-none: none;
|
|
320
311
|
--shadow-s: 0 1px 3px -1px var(--color-shadow);
|
|
321
312
|
--shadow-m: 0 1px 7px -1px var(--color-shadow);
|
|
322
313
|
--shadow-l: var(--shadow-s), 0 1px 11px -1px var(--color-shadow);
|
|
323
314
|
--shadow-xl: var(--shadow-m), 0 1px 15px -1px var(--color-shadow);
|
|
324
315
|
|
|
325
|
-
|
|
316
|
+
/* Border widths */
|
|
326
317
|
--border-none: 0;
|
|
327
318
|
--border-s: 1px;
|
|
328
319
|
--border-m: 2px;
|
package/src/svg/dropdown.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
-
<path fill="none" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="
|
|
2
|
+
<path fill="none" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"
|
|
3
3
|
d="m6 9l6 6l6-6" />
|
|
4
4
|
</svg>
|
package/src/styles/_utils.scss
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
@use "sass:string";
|
|
2
|
-
@use "sass:list";
|
|
3
|
-
|
|
4
|
-
// Adapted from https://css-tricks.com/snippets/sass/str-replace-function/
|
|
5
|
-
@function replace-all($string, $search, $replace) {
|
|
6
|
-
$index: string.index($string, $search);
|
|
7
|
-
|
|
8
|
-
@if $index {
|
|
9
|
-
/* stylelint-disable-next-line scss/operator-no-newline-after */
|
|
10
|
-
@return string.slice($string, 1, $index - 1) + $replace +
|
|
11
|
-
replace-all(
|
|
12
|
-
string.slice($string, $index + string.length($search)),
|
|
13
|
-
$search,
|
|
14
|
-
$replace
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@return $string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@function svg-to-data-url($svg) {
|
|
22
|
-
$svg: replace-all($svg, "%", "%25");
|
|
23
|
-
$svg: replace-all($svg, '"', "'");
|
|
24
|
-
$svg: replace-all($svg, "#", "%23");
|
|
25
|
-
$svg: replace-all($svg, "<", "%3C");
|
|
26
|
-
$svg: replace-all($svg, ">", "%3E");
|
|
27
|
-
$svg: replace-all($svg, "[", "%5B");
|
|
28
|
-
$svg: replace-all($svg, "]", "%5D");
|
|
29
|
-
$svg: replace-all($svg, "^", "%5E");
|
|
30
|
-
$svg: replace-all($svg, "`", "%60");
|
|
31
|
-
$svg: replace-all($svg, "{", "%7B");
|
|
32
|
-
$svg: replace-all($svg, "|", "%7C");
|
|
33
|
-
$svg: replace-all($svg, "}", "%7D");
|
|
34
|
-
|
|
35
|
-
// The below characters are tolerated by browsers, so don't NEED to be escaped:
|
|
36
|
-
// $svg: replace-all($svg, " ", "%20");
|
|
37
|
-
// $svg: replace-all($svg, "!", "%21");
|
|
38
|
-
// $svg: replace-all($svg, "$", "%24");
|
|
39
|
-
// $svg: replace-all($svg, "&", "%26");
|
|
40
|
-
// $svg: replace-all($svg, "'", "%27");
|
|
41
|
-
// $svg: replace-all($svg, "(", "%28");
|
|
42
|
-
// $svg: replace-all($svg, ")", "%29");
|
|
43
|
-
// $svg: replace-all($svg, "*", "%2A");
|
|
44
|
-
// $svg: replace-all($svg, "+", "%2B");
|
|
45
|
-
// $svg: replace-all($svg, ",", "%2C");
|
|
46
|
-
// $svg: replace-all($svg, "-", "%2D");
|
|
47
|
-
// $svg: replace-all($svg, ".", "%2E");
|
|
48
|
-
// $svg: replace-all($svg, "/", "%2F");
|
|
49
|
-
// $svg: replace-all($svg, ":", "%3A");
|
|
50
|
-
// $svg: replace-all($svg, ";", "%3B");
|
|
51
|
-
// $svg: replace-all($svg, "=", "%3D");
|
|
52
|
-
// $svg: replace-all($svg, "?", "%3F");
|
|
53
|
-
// $svg: replace-all($svg, "@", "%40");
|
|
54
|
-
// $svg: replace-all($svg, "\\", "%5C");
|
|
55
|
-
// $svg: replace-all($svg, "_", "%5F");
|
|
56
|
-
// $svg: replace-all($svg, "~", "%7F");
|
|
57
|
-
|
|
58
|
-
@return 'url("data:image/svg+xml,#{$svg}")';
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@mixin transition($properties, $duration: 200ms, $timing-function: "ease") {
|
|
62
|
-
$properties-string: "";
|
|
63
|
-
|
|
64
|
-
@if type-of($properties) != list and type-of($properties) != string {
|
|
65
|
-
@error 'Properties must be a string or list of strings';
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@each $property in $properties {
|
|
69
|
-
@if $properties-string != "" {
|
|
70
|
-
$properties-string: $properties-string + ", ";
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
$properties-string: $properties-string + $property;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@if list.length($properties) == 1 {
|
|
77
|
-
transition: #{string.unquote($properties-string)}
|
|
78
|
-
$duration
|
|
79
|
-
#{string.unquote($timing-function)};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@if list.length($properties) > 1 {
|
|
83
|
-
transition-property: string.unquote($properties-string);
|
|
84
|
-
transition-duration: $duration;
|
|
85
|
-
transition-timing-function: string.unquote($timing-function);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
@use "../utils";
|
|
2
|
-
|
|
3
|
-
.alert {
|
|
4
|
-
display: block;
|
|
5
|
-
border-radius: var(--radius-s);
|
|
6
|
-
border-start-start-radius: calc(var(--space-2xs) + 2em);
|
|
7
|
-
border-end-start-radius: calc(var(--space-2xs) + 2em);
|
|
8
|
-
padding: var(--space-2xs);
|
|
9
|
-
padding-inline-start: calc(var(--space-2xs) + 2em);
|
|
10
|
-
font-size: var(--font-size-m);
|
|
11
|
-
color: var(--color-body-text);
|
|
12
|
-
position: relative;
|
|
13
|
-
background:
|
|
14
|
-
linear-gradient(var(--alert-bg-color), var(--alert-bg-color)) padding-box,
|
|
15
|
-
linear-gradient(
|
|
16
|
-
to right,
|
|
17
|
-
var(--alert-border-start-color),
|
|
18
|
-
var(--alert-border-end-color)
|
|
19
|
-
)
|
|
20
|
-
border-box;
|
|
21
|
-
border: var(--border-m) solid transparent;
|
|
22
|
-
line-height: 1.4;
|
|
23
|
-
|
|
24
|
-
> * {
|
|
25
|
-
line-height: 1.4;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@media print {
|
|
29
|
-
& {
|
|
30
|
-
border-color: var(--alert-border-start-color);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&::before,
|
|
35
|
-
&::after {
|
|
36
|
-
content: "";
|
|
37
|
-
print-color-adjust: exact;
|
|
38
|
-
position: absolute;
|
|
39
|
-
inset-block: 0;
|
|
40
|
-
inset-inline-start: calc(var(--space-2xs) * 0.5);
|
|
41
|
-
margin: auto;
|
|
42
|
-
width: 2em;
|
|
43
|
-
height: 2em;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&::before {
|
|
47
|
-
z-index: 2;
|
|
48
|
-
mask-image: var(--alert-icon);
|
|
49
|
-
mask-repeat: no-repeat;
|
|
50
|
-
mask-size: contain;
|
|
51
|
-
background-color: var(--alert-border-start-color);
|
|
52
|
-
scale: 0.5;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&::after {
|
|
56
|
-
z-index: 1;
|
|
57
|
-
background-color: #fffe;
|
|
58
|
-
border-radius: var(--radius-full);
|
|
59
|
-
border: 3px solid var(--alert-border-start-color);
|
|
60
|
-
scale: 0.75;
|
|
61
|
-
|
|
62
|
-
@media (prefers-color-scheme: dark) {
|
|
63
|
-
background-color: #000e;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&.error {
|
|
68
|
-
--alert-bg-color: var(--color-red-9);
|
|
69
|
-
--alert-border-start-color: var(--color-red-5);
|
|
70
|
-
--alert-border-end-color: var(--color-red-6);
|
|
71
|
-
--alert-dismiss-icon-color: var(--color-red-4);
|
|
72
|
-
--alert-dismiss-hover-bg: var(--color-red-extra-transparent);
|
|
73
|
-
--alert-dismiss-focus-bg: var(--color-red-transparent);
|
|
74
|
-
--alert-icon: #{utils.svg-to-data-url(
|
|
75
|
-
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="64" d="M368 368L144 144M368 144L144 368"/></svg>'
|
|
76
|
-
)};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&.warning {
|
|
80
|
-
--alert-bg-color: var(--color-yellow-9);
|
|
81
|
-
--alert-border-start-color: var(--color-yellow-5);
|
|
82
|
-
--alert-border-end-color: var(--color-yellow-6);
|
|
83
|
-
--alert-dismiss-icon-color: var(--color-yellow-4);
|
|
84
|
-
--alert-dismiss-hover-bg: var(--color-yellow-extra-transparent);
|
|
85
|
-
--alert-dismiss-focus-bg: var(--color-yellow-transparent);
|
|
86
|
-
--alert-icon: #{utils.svg-to-data-url(
|
|
87
|
-
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 80c-8.66 0-16.58 7.36-16 16l8 216a8 8 0 008 8h0a8 8 0 008-8l8-216c.58-8.64-7.34-16-16-16z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="64"/><circle cx="256" cy="436" r="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48"/></svg>'
|
|
88
|
-
)};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&.success {
|
|
92
|
-
--alert-bg-color: var(--color-green-9);
|
|
93
|
-
--alert-border-start-color: var(--color-green-5);
|
|
94
|
-
--alert-border-end-color: var(--color-green-6);
|
|
95
|
-
--alert-dismiss-icon-color: var(--color-green-4);
|
|
96
|
-
--alert-dismiss-hover-bg: var(--color-green-extra-transparent);
|
|
97
|
-
--alert-dismiss-focus-bg: var(--color-green-transparent);
|
|
98
|
-
--alert-icon: #{utils.svg-to-data-url(
|
|
99
|
-
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="64" d="M416 128L192 384l-96-96"/></svg>'
|
|
100
|
-
)};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&.info {
|
|
104
|
-
--alert-bg-color: var(--color-sky-9);
|
|
105
|
-
--alert-border-start-color: var(--color-sky-5);
|
|
106
|
-
--alert-border-end-color: var(--color-sky-6);
|
|
107
|
-
--alert-dismiss-icon-color: var(--color-sky-4);
|
|
108
|
-
--alert-dismiss-hover-bg: var(--color-sky-extra-transparent);
|
|
109
|
-
--alert-dismiss-focus-bg: var(--color-sky-transparent);
|
|
110
|
-
--alert-icon: #{utils.svg-to-data-url(
|
|
111
|
-
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="64" d="M196 220h64v172"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="64" d="M187 396h138"/><circle cx="253 " cy="118" r="44"/></svg>'
|
|
112
|
-
)};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&.banner {
|
|
116
|
-
border-radius: 0;
|
|
117
|
-
border-width: var(--border-m) 0;
|
|
118
|
-
width: 100%;
|
|
119
|
-
padding: var(--space-xs);
|
|
120
|
-
padding-inline-start: calc(var(--space-xs) + 2em);
|
|
121
|
-
|
|
122
|
-
&:has(.button.dismiss) {
|
|
123
|
-
padding-inline-end: calc(var(--space-xs) + 2em);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&::before,
|
|
127
|
-
&::after {
|
|
128
|
-
inset-inline-start: calc(var(--space-xs) * 0.5);
|
|
129
|
-
margin: auto;
|
|
130
|
-
width: 2em;
|
|
131
|
-
height: 2em;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.button.dismiss {
|
|
135
|
-
--button-fg-color: var(--alert-dismiss-icon-color);
|
|
136
|
-
--button-bg-color: transparent;
|
|
137
|
-
--button-border-color: transparent;
|
|
138
|
-
--button-hover-bg-color: var(--alert-dismiss-hover-bg);
|
|
139
|
-
--button-focus-ring-color: transparent;
|
|
140
|
-
--button-shadow: none;
|
|
141
|
-
|
|
142
|
-
font-size: 0.75rem;
|
|
143
|
-
position: absolute;
|
|
144
|
-
inset-block: 0;
|
|
145
|
-
inset-inline-end: var(--space-3xs);
|
|
146
|
-
margin: auto;
|
|
147
|
-
width: 3em;
|
|
148
|
-
height: 3em;
|
|
149
|
-
|
|
150
|
-
&:is(:focus-visible, .focus) {
|
|
151
|
-
--button-bg-color: var(--alert-dismiss-focus-bg);
|
|
152
|
-
--button-hover-bg-color: transparent;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
&::after {
|
|
156
|
-
content: "";
|
|
157
|
-
width: 1.8em;
|
|
158
|
-
height: 1.8em;
|
|
159
|
-
mask-image: #{utils.svg-to-data-url(
|
|
160
|
-
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>'
|
|
161
|
-
)};
|
|
162
|
-
mask-size: contain;
|
|
163
|
-
mask-repeat: no-repeat;
|
|
164
|
-
background-color: currentcolor;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.alert-title {
|
|
171
|
-
font-family: var(--font-family-heading);
|
|
172
|
-
font-weight: var(--font-weight-bold);
|
|
173
|
-
line-height: 1;
|
|
174
|
-
color: var(--alert-border-start-color);
|
|
175
|
-
font-size: 0.85em;
|
|
176
|
-
margin: 0;
|
|
177
|
-
margin-block-end: 0.15em;
|
|
178
|
-
}
|