@graupl/graupl 1.0.0-alpha.2 → 1.0.0-alpha.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/CHANGELOG.md +44 -0
- package/dist/base/form/form.css +1 -85
- package/dist/base/form/form.css.map +1 -1
- package/dist/base/link/link.css +1 -25
- package/dist/base/link/link.css.map +1 -1
- package/dist/component/button/button.css +1 -61
- package/dist/component/button/button.css.map +1 -1
- package/dist/graupl.css +1 -320
- package/dist/graupl.css.map +1 -1
- package/dist/layout/columns/columns.css +1 -40
- package/dist/layout/columns/columns.css.map +1 -1
- package/dist/layout/container/container.css +1 -37
- package/dist/layout/container/container.css.map +1 -1
- package/dist/state/focus/focus.css +1 -9
- package/dist/state/focus/focus.css.map +1 -1
- package/dist/theme/theme.css +1 -69
- package/dist/theme/theme.css.map +1 -1
- package/dist/utilities/background/background.css +1 -0
- package/dist/utilities/colors/colors.css +2 -0
- package/dist/utilities/colors/colors.css.map +1 -0
- package/docs/.vitepress/config.js +41 -1
- package/docs/.vitepress/theme/custom.scss +29 -29
- package/docs/compiling-graupl.md +56 -0
- package/docs/introduction.md +5 -0
- package/index.html +6 -2
- package/package.json +27 -1
- package/postcss.config.cjs +1 -1
- package/scss/_defaults.scss +3 -0
- package/scss/_index.scss +14 -0
- package/scss/_init.scss +3 -0
- package/scss/base/form/_variables.scss +8 -8
- package/scss/base/link/_variables.scss +5 -8
- package/scss/component/button/_defaults.scss +2 -0
- package/scss/component/button/_index.scss +47 -19
- package/scss/component/button/_variables.scss +36 -10
- package/scss/functions/_important.scss +11 -0
- package/scss/functions/_theme.scss +11 -0
- package/scss/graupl.scss +1 -5
- package/scss/layout/columns/_index.scss +1 -1
- package/scss/state/focus/_variables.scss +3 -3
- package/scss/theme/_defaults.scss +48 -31
- package/scss/theme/_index.scss +13 -66
- package/scss/theme/_variables.scss +102 -452
- package/scss/utilities/_index.scss +3 -0
- package/scss/utilities/colors/_defaults.scss +7 -0
- package/scss/utilities/colors/_index.scss +22 -0
- package/scss/utilities/colors/_variables.scss +3 -0
- package/scss/utilities/colors/colors.scss +3 -0
|
@@ -3,469 +3,119 @@
|
|
|
3
3
|
@use "defaults";
|
|
4
4
|
@use "sass:map";
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
$
|
|
8
|
-
100:
|
|
9
|
-
var(--#{defaults.$prefix}-primary--100, #{map.get(defaults.$primary, 100)}),
|
|
10
|
-
200:
|
|
11
|
-
var(--#{defaults.$prefix}-primary--200, #{map.get(defaults.$primary, 200)}),
|
|
12
|
-
300:
|
|
13
|
-
var(--#{defaults.$prefix}-primary--300, #{map.get(defaults.$primary, 300)}),
|
|
14
|
-
400:
|
|
15
|
-
var(--#{defaults.$prefix}-primary--400, #{map.get(defaults.$primary, 400)}),
|
|
16
|
-
500:
|
|
17
|
-
var(--#{defaults.$prefix}-primary--500, #{map.get(defaults.$primary, 500)}),
|
|
18
|
-
600:
|
|
19
|
-
var(--#{defaults.$prefix}-primary--600, #{map.get(defaults.$primary, 600)}),
|
|
20
|
-
700:
|
|
21
|
-
var(--#{defaults.$prefix}-primary--700, #{map.get(defaults.$primary, 700)}),
|
|
22
|
-
800:
|
|
23
|
-
var(--#{defaults.$prefix}-primary--800, #{map.get(defaults.$primary, 800)}),
|
|
24
|
-
900:
|
|
25
|
-
var(--#{defaults.$prefix}-primary--900, #{map.get(defaults.$primary, 900)}),
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
// Secondary theme colours.
|
|
29
|
-
$secondary: (
|
|
30
|
-
100:
|
|
31
|
-
var(
|
|
32
|
-
--#{defaults.$prefix}-secondary--100,
|
|
33
|
-
#{map.get(defaults.$secondary, 100)}
|
|
34
|
-
),
|
|
35
|
-
200:
|
|
36
|
-
var(
|
|
37
|
-
--#{defaults.$prefix}-secondary--200,
|
|
38
|
-
#{map.get(defaults.$secondary, 200)}
|
|
39
|
-
),
|
|
40
|
-
300:
|
|
41
|
-
var(
|
|
42
|
-
--#{defaults.$prefix}-secondary--300,
|
|
43
|
-
#{map.get(defaults.$secondary, 300)}
|
|
44
|
-
),
|
|
45
|
-
400:
|
|
46
|
-
var(
|
|
47
|
-
--#{defaults.$prefix}-secondary--400,
|
|
48
|
-
#{map.get(defaults.$secondary, 400)}
|
|
49
|
-
),
|
|
50
|
-
500:
|
|
51
|
-
var(
|
|
52
|
-
--#{defaults.$prefix}-secondary--500,
|
|
53
|
-
#{map.get(defaults.$secondary, 500)}
|
|
54
|
-
),
|
|
55
|
-
600:
|
|
56
|
-
var(
|
|
57
|
-
--#{defaults.$prefix}-secondary--600,
|
|
58
|
-
#{map.get(defaults.$secondary, 600)}
|
|
59
|
-
),
|
|
60
|
-
700:
|
|
61
|
-
var(
|
|
62
|
-
--#{defaults.$prefix}-secondary--700,
|
|
63
|
-
#{map.get(defaults.$secondary, 700)}
|
|
64
|
-
),
|
|
65
|
-
800:
|
|
66
|
-
var(
|
|
67
|
-
--#{defaults.$prefix}-secondary--800,
|
|
68
|
-
#{map.get(defaults.$secondary, 800)}
|
|
69
|
-
),
|
|
70
|
-
900:
|
|
71
|
-
var(
|
|
72
|
-
--#{defaults.$prefix}-secondary--900,
|
|
73
|
-
#{map.get(defaults.$secondary, 900)}
|
|
74
|
-
),
|
|
75
|
-
);
|
|
6
|
+
// A colour map of base colours and their shades.
|
|
7
|
+
$colors: ();
|
|
76
8
|
|
|
77
|
-
//
|
|
78
|
-
$
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
--#{defaults.$prefix}-tertiary--100,
|
|
82
|
-
#{map.get(defaults.$tertiary, 100)}
|
|
83
|
-
),
|
|
84
|
-
200:
|
|
85
|
-
var(
|
|
86
|
-
--#{defaults.$prefix}-tertiary--200,
|
|
87
|
-
#{map.get(defaults.$tertiary, 200)}
|
|
88
|
-
),
|
|
89
|
-
300:
|
|
90
|
-
var(
|
|
91
|
-
--#{defaults.$prefix}-tertiary--300,
|
|
92
|
-
#{map.get(defaults.$tertiary, 300)}
|
|
93
|
-
),
|
|
94
|
-
400:
|
|
95
|
-
var(
|
|
96
|
-
--#{defaults.$prefix}-tertiary--400,
|
|
97
|
-
#{map.get(defaults.$tertiary, 400)}
|
|
98
|
-
),
|
|
99
|
-
500:
|
|
100
|
-
var(
|
|
101
|
-
--#{defaults.$prefix}-tertiary--500,
|
|
102
|
-
#{map.get(defaults.$tertiary, 500)}
|
|
103
|
-
),
|
|
104
|
-
600:
|
|
105
|
-
var(
|
|
106
|
-
--#{defaults.$prefix}-tertiary--600,
|
|
107
|
-
#{map.get(defaults.$tertiary, 600)}
|
|
108
|
-
),
|
|
109
|
-
700:
|
|
110
|
-
var(
|
|
111
|
-
--#{defaults.$prefix}-tertiary--700,
|
|
112
|
-
#{map.get(defaults.$tertiary, 700)}
|
|
113
|
-
),
|
|
114
|
-
800:
|
|
115
|
-
var(
|
|
116
|
-
--#{defaults.$prefix}-tertiary--800,
|
|
117
|
-
#{map.get(defaults.$tertiary, 800)}
|
|
118
|
-
),
|
|
119
|
-
900:
|
|
120
|
-
var(
|
|
121
|
-
--#{defaults.$prefix}-tertiary--900,
|
|
122
|
-
#{map.get(defaults.$tertiary, 900)}
|
|
123
|
-
),
|
|
124
|
-
);
|
|
9
|
+
// Create a map for each colour.
|
|
10
|
+
@each $color, $map in defaults.$colors {
|
|
11
|
+
// A map for the current colour.
|
|
12
|
+
$color-map: ();
|
|
125
13
|
|
|
126
|
-
|
|
127
|
-
//
|
|
128
|
-
$
|
|
129
|
-
--#{defaults.$prefix}-theme-light--primary--100,
|
|
130
|
-
#{map.get($primary, 100)}
|
|
131
|
-
);
|
|
132
|
-
$theme-light--primary--200: var(
|
|
133
|
-
--#{defaults.$prefix}-theme-light--primary--200,
|
|
134
|
-
#{map.get($primary, 200)}
|
|
135
|
-
);
|
|
136
|
-
$theme-light--primary--300: var(
|
|
137
|
-
--#{defaults.$prefix}-theme-light--primary--300,
|
|
138
|
-
#{map.get($primary, 300)}
|
|
139
|
-
);
|
|
140
|
-
$theme-light--primary--400: var(
|
|
141
|
-
--#{defaults.$prefix}-theme-light--primary--400,
|
|
142
|
-
#{map.get($primary, 400)}
|
|
143
|
-
);
|
|
144
|
-
$theme-light--primary--500: var(
|
|
145
|
-
--#{defaults.$prefix}-theme-light--primary--500,
|
|
146
|
-
#{map.get($primary, 500)}
|
|
147
|
-
);
|
|
148
|
-
$theme-light--primary--600: var(
|
|
149
|
-
--#{defaults.$prefix}-theme-light--primary--600,
|
|
150
|
-
#{map.get($primary, 600)}
|
|
151
|
-
);
|
|
152
|
-
$theme-light--primary--700: var(
|
|
153
|
-
--#{defaults.$prefix}-theme-light--primary--700,
|
|
154
|
-
#{map.get($primary, 700)}
|
|
155
|
-
);
|
|
156
|
-
$theme-light--primary--800: var(
|
|
157
|
-
--#{defaults.$prefix}-theme-light--primary--800,
|
|
158
|
-
#{map.get($primary, 800)}
|
|
159
|
-
);
|
|
160
|
-
$theme-light--primary--900: var(
|
|
161
|
-
--#{defaults.$prefix}-theme-light--primary--900,
|
|
162
|
-
#{map.get($primary, 900)}
|
|
163
|
-
);
|
|
14
|
+
@each $shade, $value in $map {
|
|
15
|
+
// Set the custom prop name and fallback value.
|
|
16
|
+
$color-property: var(--#{defaults.$prefix}-#{$color}--#{$shade}, $value);
|
|
164
17
|
|
|
165
|
-
//
|
|
166
|
-
$
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
);
|
|
174
|
-
$theme-dark--primary--300: var(
|
|
175
|
-
--#{defaults.$prefix}-theme-dark--primary--300,
|
|
176
|
-
#{map.get($primary, 700)}
|
|
177
|
-
);
|
|
178
|
-
$theme-dark--primary--400: var(
|
|
179
|
-
--#{defaults.$prefix}-theme-dark--primary--400,
|
|
180
|
-
#{map.get($primary, 600)}
|
|
181
|
-
);
|
|
182
|
-
$theme-dark--primary--500: var(
|
|
183
|
-
--#{defaults.$prefix}-theme-dark--primary--500,
|
|
184
|
-
#{map.get($primary, 500)}
|
|
185
|
-
);
|
|
186
|
-
$theme-dark--primary--600: var(
|
|
187
|
-
--#{defaults.$prefix}-theme-dark--primary--600,
|
|
188
|
-
#{map.get($primary, 400)}
|
|
189
|
-
);
|
|
190
|
-
$theme-dark--primary--700: var(
|
|
191
|
-
--#{defaults.$prefix}-theme-dark--primary--700,
|
|
192
|
-
#{map.get($primary, 300)}
|
|
193
|
-
);
|
|
194
|
-
$theme-dark--primary--800: var(
|
|
195
|
-
--#{defaults.$prefix}-theme-dark--primary--800,
|
|
196
|
-
#{map.get($primary, 200)}
|
|
197
|
-
);
|
|
198
|
-
$theme-dark--primary--900: var(
|
|
199
|
-
--#{defaults.$prefix}-theme-dark--primary--900,
|
|
200
|
-
#{map.get($primary, 100)}
|
|
201
|
-
);
|
|
18
|
+
// Add the custom prop to the map.
|
|
19
|
+
$color-map: map.merge(
|
|
20
|
+
$color-map,
|
|
21
|
+
(
|
|
22
|
+
$shade: $color-property,
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
202
26
|
|
|
203
|
-
//
|
|
204
|
-
$
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
);
|
|
212
|
-
$theme-active--primary--300: var(
|
|
213
|
-
--#{defaults.$prefix}-theme-active--primary--300,
|
|
214
|
-
#{$theme-light--primary--300}
|
|
215
|
-
);
|
|
216
|
-
$theme-active--primary--400: var(
|
|
217
|
-
--#{defaults.$prefix}-theme-active--primary--400,
|
|
218
|
-
#{$theme-light--primary--400}
|
|
219
|
-
);
|
|
220
|
-
$theme-active--primary--500: var(
|
|
221
|
-
--#{defaults.$prefix}-theme-active--primary--500,
|
|
222
|
-
#{$theme-light--primary--500}
|
|
223
|
-
);
|
|
224
|
-
$theme-active--primary--600: var(
|
|
225
|
-
--#{defaults.$prefix}-theme-active--primary--600,
|
|
226
|
-
#{$theme-light--primary--600}
|
|
227
|
-
);
|
|
228
|
-
$theme-active--primary--700: var(
|
|
229
|
-
--#{defaults.$prefix}-theme-active--primary--700,
|
|
230
|
-
#{$theme-light--primary--700}
|
|
231
|
-
);
|
|
232
|
-
$theme-active--primary--800: var(
|
|
233
|
-
--#{defaults.$prefix}-theme-active--primary--800,
|
|
234
|
-
#{$theme-light--primary--800}
|
|
235
|
-
);
|
|
236
|
-
$theme-active--primary--900: var(
|
|
237
|
-
--#{defaults.$prefix}-theme-active--primary--900,
|
|
238
|
-
#{$theme-light--primary--900}
|
|
239
|
-
);
|
|
27
|
+
// Merge the colour map with the existing colours.
|
|
28
|
+
$colors: map.merge(
|
|
29
|
+
$colors,
|
|
30
|
+
(
|
|
31
|
+
$color: $color-map,
|
|
32
|
+
)
|
|
33
|
+
);
|
|
34
|
+
}
|
|
240
35
|
|
|
241
|
-
//
|
|
242
|
-
$theme-light
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
);
|
|
246
|
-
$theme-light--secondary--200: var(
|
|
247
|
-
--#{defaults.$prefix}-theme-light--secondary--200,
|
|
248
|
-
#{map.get($secondary, 200)}
|
|
249
|
-
);
|
|
250
|
-
$theme-light--secondary--300: var(
|
|
251
|
-
--#{defaults.$prefix}-theme-light--secondary--300,
|
|
252
|
-
#{map.get($secondary, 300)}
|
|
253
|
-
);
|
|
254
|
-
$theme-light--secondary--400: var(
|
|
255
|
-
--#{defaults.$prefix}-theme-light--secondary--400,
|
|
256
|
-
#{map.get($secondary, 400)}
|
|
257
|
-
);
|
|
258
|
-
$theme-light--secondary--500: var(
|
|
259
|
-
--#{defaults.$prefix}-theme-light--secondary--500,
|
|
260
|
-
#{map.get($secondary, 500)}
|
|
261
|
-
);
|
|
262
|
-
$theme-light--secondary--600: var(
|
|
263
|
-
--#{defaults.$prefix}-theme-light--secondary--600,
|
|
264
|
-
#{map.get($secondary, 600)}
|
|
265
|
-
);
|
|
266
|
-
$theme-light--secondary--700: var(
|
|
267
|
-
--#{defaults.$prefix}-theme-light--secondary--700,
|
|
268
|
-
#{map.get($secondary, 700)}
|
|
269
|
-
);
|
|
270
|
-
$theme-light--secondary--800: var(
|
|
271
|
-
--#{defaults.$prefix}-theme-light--secondary--800,
|
|
272
|
-
#{map.get($secondary, 800)}
|
|
273
|
-
);
|
|
274
|
-
$theme-light--secondary--900: var(
|
|
275
|
-
--#{defaults.$prefix}-theme-light--secondary--900,
|
|
276
|
-
#{map.get($secondary, 900)}
|
|
277
|
-
);
|
|
36
|
+
// Theme properties.
|
|
37
|
+
$theme-light: ();
|
|
38
|
+
$theme-dark: ();
|
|
39
|
+
$theme-active: ();
|
|
278
40
|
|
|
279
|
-
//
|
|
280
|
-
$
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
);
|
|
284
|
-
$
|
|
285
|
-
--#{defaults.$prefix}-theme-dark--secondary--200,
|
|
286
|
-
#{map.get($secondary, 800)}
|
|
287
|
-
);
|
|
288
|
-
$theme-dark--secondary--300: var(
|
|
289
|
-
--#{defaults.$prefix}-theme-dark--secondary--300,
|
|
290
|
-
#{map.get($secondary, 700)}
|
|
291
|
-
);
|
|
292
|
-
$theme-dark--secondary--400: var(
|
|
293
|
-
--#{defaults.$prefix}-theme-dark--secondary--400,
|
|
294
|
-
#{map.get($secondary, 600)}
|
|
295
|
-
);
|
|
296
|
-
$theme-dark--secondary--500: var(
|
|
297
|
-
--#{defaults.$prefix}-theme-dark--secondary--500,
|
|
298
|
-
#{map.get($secondary, 500)}
|
|
299
|
-
);
|
|
300
|
-
$theme-dark--secondary--600: var(
|
|
301
|
-
--#{defaults.$prefix}-theme-dark--secondary--600,
|
|
302
|
-
#{map.get($secondary, 400)}
|
|
303
|
-
);
|
|
304
|
-
$theme-dark--secondary--700: var(
|
|
305
|
-
--#{defaults.$prefix}-theme-dark--secondary--700,
|
|
306
|
-
#{map.get($secondary, 300)}
|
|
307
|
-
);
|
|
308
|
-
$theme-dark--secondary--800: var(
|
|
309
|
-
--#{defaults.$prefix}-theme-dark--secondary--800,
|
|
310
|
-
#{map.get($secondary, 200)}
|
|
311
|
-
);
|
|
312
|
-
$theme-dark--secondary--900: var(
|
|
313
|
-
--#{defaults.$prefix}-theme-dark--secondary--900,
|
|
314
|
-
#{map.get($secondary, 100)}
|
|
315
|
-
);
|
|
41
|
+
// Create a map for each colour theme.
|
|
42
|
+
@each $color, $map in $colors {
|
|
43
|
+
// Maps for the current colour theme variants.
|
|
44
|
+
$light-map: ();
|
|
45
|
+
$dark-map: ();
|
|
46
|
+
$active-map: ();
|
|
316
47
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
);
|
|
322
|
-
$theme-active--secondary--200: var(
|
|
323
|
-
--#{defaults.$prefix}-theme-active--secondary--200,
|
|
324
|
-
#{$theme-light--secondary--200}
|
|
325
|
-
);
|
|
326
|
-
$theme-active--secondary--300: var(
|
|
327
|
-
--#{defaults.$prefix}-theme-active--secondary--300,
|
|
328
|
-
#{$theme-light--secondary--300}
|
|
329
|
-
);
|
|
330
|
-
$theme-active--secondary--400: var(
|
|
331
|
-
--#{defaults.$prefix}-theme-active--secondary--400,
|
|
332
|
-
#{$theme-light--secondary--400}
|
|
333
|
-
);
|
|
334
|
-
$theme-active--secondary--500: var(
|
|
335
|
-
--#{defaults.$prefix}-theme-active--secondary--500,
|
|
336
|
-
#{$theme-light--secondary--500}
|
|
337
|
-
);
|
|
338
|
-
$theme-active--secondary--600: var(
|
|
339
|
-
--#{defaults.$prefix}-theme-active--secondary--600,
|
|
340
|
-
#{$theme-light--secondary--600}
|
|
341
|
-
);
|
|
342
|
-
$theme-active--secondary--700: var(
|
|
343
|
-
--#{defaults.$prefix}-theme-active--secondary--700,
|
|
344
|
-
#{$theme-light--secondary--700}
|
|
345
|
-
);
|
|
346
|
-
$theme-active--secondary--800: var(
|
|
347
|
-
--#{defaults.$prefix}-theme-active--secondary--800,
|
|
348
|
-
#{$theme-light--secondary--800}
|
|
349
|
-
);
|
|
350
|
-
$theme-active--secondary--900: var(
|
|
351
|
-
--#{defaults.$prefix}-theme-active--secondary--900,
|
|
352
|
-
#{$theme-light--secondary--900}
|
|
353
|
-
);
|
|
48
|
+
@each $shade, $value in $map {
|
|
49
|
+
// Get the dark shade and value.
|
|
50
|
+
$dark-shade: map.get(defaults.$dark-map, $shade);
|
|
51
|
+
$dark-value: map.get($map, $dark-shade);
|
|
354
52
|
|
|
355
|
-
//
|
|
356
|
-
$
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
);
|
|
360
|
-
$
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
);
|
|
364
|
-
$
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
);
|
|
368
|
-
$theme-light--tertiary--400: var(
|
|
369
|
-
--#{defaults.$prefix}-theme-light--tertiary--400,
|
|
370
|
-
#{map.get($tertiary, 400)}
|
|
371
|
-
);
|
|
372
|
-
$theme-light--tertiary--500: var(
|
|
373
|
-
--#{defaults.$prefix}-theme-light--tertiary--500,
|
|
374
|
-
#{map.get($tertiary, 500)}
|
|
375
|
-
);
|
|
376
|
-
$theme-light--tertiary--600: var(
|
|
377
|
-
--#{defaults.$prefix}-theme-light--tertiary--600,
|
|
378
|
-
#{map.get($tertiary, 600)}
|
|
379
|
-
);
|
|
380
|
-
$theme-light--tertiary--700: var(
|
|
381
|
-
--#{defaults.$prefix}-theme-light--tertiary--700,
|
|
382
|
-
#{map.get($tertiary, 700)}
|
|
383
|
-
);
|
|
384
|
-
$theme-light--tertiary--800: var(
|
|
385
|
-
--#{defaults.$prefix}-theme-light--tertiary--800,
|
|
386
|
-
#{map.get($tertiary, 800)}
|
|
387
|
-
);
|
|
388
|
-
$theme-light--tertiary--900: var(
|
|
389
|
-
--#{defaults.$prefix}-theme-light--tertiary--900,
|
|
390
|
-
#{map.get($tertiary, 900)}
|
|
391
|
-
);
|
|
53
|
+
// Set the custom prop names and fallback values.
|
|
54
|
+
$light-property: var(
|
|
55
|
+
--#{defaults.$prefix}-theme-light--#{$color}--#{$shade},
|
|
56
|
+
$value
|
|
57
|
+
);
|
|
58
|
+
$dark-property: var(
|
|
59
|
+
--#{defaults.$prefix}-theme-dark--#{$color}--#{$shade},
|
|
60
|
+
$dark-value
|
|
61
|
+
);
|
|
62
|
+
$active-property: var(
|
|
63
|
+
--#{defaults.$prefix}-theme-active--#{$color}--#{$shade},
|
|
64
|
+
$light-property
|
|
65
|
+
);
|
|
392
66
|
|
|
393
|
-
//
|
|
394
|
-
$
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
);
|
|
406
|
-
$
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
);
|
|
414
|
-
$theme-dark--tertiary--600: var(
|
|
415
|
-
--#{defaults.$prefix}-theme-dark--tertiary--600,
|
|
416
|
-
#{map.get($tertiary, 400)}
|
|
417
|
-
);
|
|
418
|
-
$theme-dark--tertiary--700: var(
|
|
419
|
-
--#{defaults.$prefix}-theme-dark--tertiary--700,
|
|
420
|
-
#{map.get($tertiary, 300)}
|
|
421
|
-
);
|
|
422
|
-
$theme-dark--tertiary--800: var(
|
|
423
|
-
--#{defaults.$prefix}-theme-dark--tertiary--800,
|
|
424
|
-
#{map.get($tertiary, 200)}
|
|
425
|
-
);
|
|
426
|
-
$theme-dark--tertiary--900: var(
|
|
427
|
-
--#{defaults.$prefix}-theme-dark--tertiary--900,
|
|
428
|
-
#{map.get($tertiary, 100)}
|
|
429
|
-
);
|
|
67
|
+
// Add the custom props to the maps.
|
|
68
|
+
$light-map: map.merge(
|
|
69
|
+
$light-map,
|
|
70
|
+
(
|
|
71
|
+
$shade: $light-property,
|
|
72
|
+
)
|
|
73
|
+
);
|
|
74
|
+
$dark-map: map.merge(
|
|
75
|
+
$dark-map,
|
|
76
|
+
(
|
|
77
|
+
$shade: $dark-property,
|
|
78
|
+
)
|
|
79
|
+
);
|
|
80
|
+
$active-map: map.merge(
|
|
81
|
+
$active-map,
|
|
82
|
+
(
|
|
83
|
+
$shade: $active-property,
|
|
84
|
+
)
|
|
85
|
+
);
|
|
86
|
+
}
|
|
430
87
|
|
|
431
|
-
//
|
|
432
|
-
$theme-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
);
|
|
444
|
-
$theme-active
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
);
|
|
452
|
-
$theme-active--tertiary--600: var(
|
|
453
|
-
--#{defaults.$prefix}-theme-active--tertiary--600,
|
|
454
|
-
#{$theme-light--tertiary--600}
|
|
455
|
-
);
|
|
456
|
-
$theme-active--tertiary--700: var(
|
|
457
|
-
--#{defaults.$prefix}-theme-active--tertiary--700,
|
|
458
|
-
#{$theme-light--tertiary--700}
|
|
459
|
-
);
|
|
460
|
-
$theme-active--tertiary--800: var(
|
|
461
|
-
--#{defaults.$prefix}-theme-active--tertiary--800,
|
|
462
|
-
#{$theme-light--tertiary--800}
|
|
463
|
-
);
|
|
464
|
-
$theme-active--tertiary--900: var(
|
|
465
|
-
--#{defaults.$prefix}-theme-active--tertiary--900,
|
|
466
|
-
#{$theme-light--tertiary--900}
|
|
467
|
-
);
|
|
88
|
+
// Merge the theme maps with the existing themes.
|
|
89
|
+
$theme-light: map.merge(
|
|
90
|
+
$theme-light,
|
|
91
|
+
(
|
|
92
|
+
$color: $light-map,
|
|
93
|
+
)
|
|
94
|
+
);
|
|
95
|
+
$theme-dark: map.merge(
|
|
96
|
+
$theme-dark,
|
|
97
|
+
(
|
|
98
|
+
$color: $dark-map,
|
|
99
|
+
)
|
|
100
|
+
);
|
|
101
|
+
$theme-active: map.merge(
|
|
102
|
+
$theme-active,
|
|
103
|
+
(
|
|
104
|
+
$color: $active-map,
|
|
105
|
+
)
|
|
106
|
+
);
|
|
107
|
+
}
|
|
468
108
|
|
|
469
109
|
// Font properties.
|
|
470
110
|
$font-family: var(--#{defaults.$prefix}-font-family, #{defaults.$font-family});
|
|
471
111
|
$font-size: var(--#{defaults.$prefix}-font-size, #{defaults.$font-size});
|
|
112
|
+
|
|
113
|
+
// Colour properties.
|
|
114
|
+
$font-color: var(
|
|
115
|
+
--#{defaults.$prefix}-font-color,
|
|
116
|
+
#{map.get(map.get($theme-active, primary), 900)}
|
|
117
|
+
);
|
|
118
|
+
$background: var(
|
|
119
|
+
--#{defaults.$prefix}-background,
|
|
120
|
+
#{map.get(map.get($theme-active, primary), 100)}
|
|
121
|
+
);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Default values for Graupl.
|
|
2
|
+
//
|
|
3
|
+
// Generally, these should not be used directly when styling components.
|
|
4
|
+
// They are mainly used to provide default fallbacks for custom properties
|
|
5
|
+
// which can be found in the `variables.scss` file.
|
|
6
|
+
|
|
7
|
+
@forward "../../defaults";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Graupl color utilities.
|
|
2
|
+
|
|
3
|
+
@use "variables" as *;
|
|
4
|
+
@use "../../mixins/layer" as *;
|
|
5
|
+
@use "../../functions/important";
|
|
6
|
+
@use "../../theme/variables" as theme;
|
|
7
|
+
|
|
8
|
+
@include layer(utilities) {
|
|
9
|
+
@each $color, $map in theme.$theme-active {
|
|
10
|
+
@each $shade, $value in $map {
|
|
11
|
+
$name: #{$color}-#{$shade};
|
|
12
|
+
|
|
13
|
+
.bg-#{$name} {
|
|
14
|
+
background: important.insert($value);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.text-#{$name} {
|
|
18
|
+
color: important.insert($value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|