@graupl/graupl 1.0.0-alpha.2 → 1.0.0-alpha.3
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 +32 -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 +92 -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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Variables referencing custom properties.
|
|
2
2
|
|
|
3
3
|
@use "../../variables" as base;
|
|
4
|
-
@use "../../theme/variables" as theme;
|
|
5
4
|
@use "defaults";
|
|
6
5
|
@use "sass:map";
|
|
6
|
+
@use "../../functions/theme";
|
|
7
7
|
|
|
8
8
|
// Button properties.
|
|
9
9
|
$button-min-width: var(
|
|
@@ -34,6 +34,12 @@ $button-transition: var(
|
|
|
34
34
|
border-color #{map.get(base.$transition-duration, fast)} #{base.$transition-timing-function},
|
|
35
35
|
transform #{map.get(base.$transition-duration, fast)} #{base.$transition-timing-function}
|
|
36
36
|
);
|
|
37
|
+
$button-transition-reduced-motion: var(
|
|
38
|
+
--#{defaults.$prefix}-button-transition-reduced-motion,
|
|
39
|
+
background #{map.get(base.$transition-duration, none)} #{base.$transition-timing-function},
|
|
40
|
+
color #{map.get(base.$transition-duration, none)} #{base.$transition-timing-function},
|
|
41
|
+
border-color #{map.get(base.$transition-duration, none)} #{base.$transition-timing-function}
|
|
42
|
+
);
|
|
37
43
|
|
|
38
44
|
// Transform properties.
|
|
39
45
|
$button-hover-transform: var(
|
|
@@ -44,33 +50,49 @@ $button-active-transform: var(
|
|
|
44
50
|
--#{defaults.$prefix}-button-active-transform,
|
|
45
51
|
#{defaults.$button-active-transform}
|
|
46
52
|
);
|
|
53
|
+
$button-hover-transform-reduced-motion: var(
|
|
54
|
+
--#{defaults.$prefix}-button-hover-transform-reduced-motion,
|
|
55
|
+
#{defaults.$button-hover-transform-reduced-motion}
|
|
56
|
+
);
|
|
57
|
+
$button-active-transform-reduced-motion: var(
|
|
58
|
+
--#{defaults.$prefix}-button-active-transform-reduced-motion,
|
|
59
|
+
#{defaults.$button-active-transform-reduced-motion}
|
|
60
|
+
);
|
|
47
61
|
|
|
48
62
|
// Background properties.
|
|
49
63
|
$button-background: var(
|
|
50
64
|
--#{defaults.$prefix}-button-background,
|
|
51
|
-
#{theme
|
|
65
|
+
#{theme.get(primary, 100)}
|
|
52
66
|
);
|
|
53
67
|
$button-hover-background: var(
|
|
54
68
|
--#{defaults.$prefix}-button-hover-background,
|
|
55
|
-
#{theme
|
|
69
|
+
#{theme.get(primary, 900)}
|
|
56
70
|
);
|
|
57
71
|
$button-active-background: var(
|
|
58
72
|
--#{defaults.$prefix}-button-active-background,
|
|
59
|
-
#{theme
|
|
73
|
+
#{theme.get(primary, 900)}
|
|
74
|
+
);
|
|
75
|
+
$button-disabled-background: var(
|
|
76
|
+
--#{defaults.$prefix}-button-disabled-background,
|
|
77
|
+
#{theme.get(primary, 100)}
|
|
60
78
|
);
|
|
61
79
|
|
|
62
80
|
// Text properties.
|
|
63
81
|
$button-color: var(
|
|
64
82
|
--#{defaults.$prefix}-button-color,
|
|
65
|
-
#{theme
|
|
83
|
+
#{theme.get(primary, 900)}
|
|
66
84
|
);
|
|
67
85
|
$button-hover-color: var(
|
|
68
86
|
--#{defaults.$prefix}-button-hover-color,
|
|
69
|
-
#{theme
|
|
87
|
+
#{theme.get(primary, 100)}
|
|
70
88
|
);
|
|
71
89
|
$button-active-color: var(
|
|
72
90
|
--#{defaults.$prefix}-button-active-color,
|
|
73
|
-
#{theme
|
|
91
|
+
#{theme.get(primary, 100)}
|
|
92
|
+
);
|
|
93
|
+
$button-disabled-color: var(
|
|
94
|
+
--#{defaults.$prefix}-button-disabled-color,
|
|
95
|
+
#{theme.get(primary, 200)}
|
|
74
96
|
);
|
|
75
97
|
|
|
76
98
|
// Border properties.
|
|
@@ -90,13 +112,17 @@ $button-border-radius: var(
|
|
|
90
112
|
// Border colour properties.
|
|
91
113
|
$button-border-color: var(
|
|
92
114
|
--#{defaults.$prefix}-button-border-color,
|
|
93
|
-
#{theme
|
|
115
|
+
#{theme.get(primary, 900)}
|
|
94
116
|
);
|
|
95
117
|
$button-hover-border-color: var(
|
|
96
118
|
--#{defaults.$prefix}-button-hover-border-color,
|
|
97
|
-
#{theme
|
|
119
|
+
#{theme.get(primary, 900)}
|
|
98
120
|
);
|
|
99
121
|
$button-active-border-color: var(
|
|
100
122
|
--#{defaults.$prefix}-button-active-border-color,
|
|
101
|
-
#{theme
|
|
123
|
+
#{theme.get(primary, 900)}
|
|
124
|
+
);
|
|
125
|
+
$button-disabled-border-color: var(
|
|
126
|
+
--#{defaults.$prefix}-button-disabled-border-color,
|
|
127
|
+
#{theme.get(primary, 200)}
|
|
102
128
|
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// A function to get the specific theme shades.
|
|
2
|
+
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "../theme/variables" as theme;
|
|
5
|
+
|
|
6
|
+
@function get($color, $shade) {
|
|
7
|
+
$color-map: map.get(theme.$theme-active, $color);
|
|
8
|
+
$value: map.get($color-map, $shade);
|
|
9
|
+
|
|
10
|
+
@return $value;
|
|
11
|
+
}
|
package/scss/graupl.scss
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Variables referencing custom properties.
|
|
2
2
|
|
|
3
3
|
@use "../../variables" as base;
|
|
4
|
-
@use "../../theme/variables" as theme;
|
|
5
4
|
@use "defaults";
|
|
5
|
+
@use "../../functions/theme";
|
|
6
6
|
|
|
7
7
|
$focus-width: var(--#{defaults.$prefix}-focus-width, #{base.$border-width});
|
|
8
8
|
$focus-outline-color: var(
|
|
9
9
|
--#{defaults.$prefix}-focus-outline-color,
|
|
10
|
-
#{theme
|
|
10
|
+
#{theme.get(primary, 900)}
|
|
11
11
|
);
|
|
12
12
|
$focus-outline-width: var(
|
|
13
13
|
--#{defaults.$prefix}-focus-outline-width,
|
|
@@ -23,7 +23,7 @@ $focus-outline-offset: var(
|
|
|
23
23
|
);
|
|
24
24
|
$focus-box-shadow-color: var(
|
|
25
25
|
--#{defaults.$prefix}-focus-box-shadow-color,
|
|
26
|
-
#{theme
|
|
26
|
+
#{theme.get(primary, 100)}
|
|
27
27
|
);
|
|
28
28
|
$focus-box-shadow-style: var(
|
|
29
29
|
--#{defaults.$prefix}-focus-box-shadow-style,
|
|
@@ -8,38 +8,55 @@
|
|
|
8
8
|
@forward "../defaults";
|
|
9
9
|
|
|
10
10
|
// Colours.
|
|
11
|
-
$
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
$default-colors: (
|
|
12
|
+
primary: (
|
|
13
|
+
100: hsl(219deg 100% 95%),
|
|
14
|
+
200: hsl(219deg 90% 80%),
|
|
15
|
+
300: hsl(219deg 80% 65%),
|
|
16
|
+
400: hsl(219deg 75% 55%),
|
|
17
|
+
500: hsl(219deg 75% 50%),
|
|
18
|
+
600: hsl(219deg 75% 45%),
|
|
19
|
+
700: hsl(219deg 80% 35%),
|
|
20
|
+
800: hsl(219deg 90% 20%),
|
|
21
|
+
900: hsl(219deg 100% 10%),
|
|
22
|
+
),
|
|
23
|
+
secondary: (
|
|
24
|
+
100: hsl(235deg 40% 95%),
|
|
25
|
+
200: hsl(235deg 30% 80%),
|
|
26
|
+
300: hsl(235deg 20% 65%),
|
|
27
|
+
400: hsl(235deg 15% 55%),
|
|
28
|
+
500: hsl(235deg 15% 50%),
|
|
29
|
+
600: hsl(235deg 15% 45%),
|
|
30
|
+
700: hsl(235deg 20% 35%),
|
|
31
|
+
800: hsl(235deg 30% 20%),
|
|
32
|
+
900: hsl(235deg 40% 10%),
|
|
33
|
+
),
|
|
34
|
+
tertiary: (
|
|
35
|
+
100: hsl(340deg 85% 95%),
|
|
36
|
+
200: hsl(340deg 75% 80%),
|
|
37
|
+
300: hsl(340deg 65% 65%),
|
|
38
|
+
400: hsl(340deg 60% 55%),
|
|
39
|
+
500: hsl(340deg 60% 50%),
|
|
40
|
+
600: hsl(340deg 60% 45%),
|
|
41
|
+
700: hsl(340deg 65% 35%),
|
|
42
|
+
800: hsl(340deg 75% 20%),
|
|
43
|
+
900: hsl(340deg 85% 10%),
|
|
44
|
+
),
|
|
21
45
|
) !default;
|
|
22
|
-
$
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
300: hsl(340deg 65% 65%),
|
|
37
|
-
400: hsl(340deg 60% 55%),
|
|
38
|
-
500: hsl(340deg 60% 50%),
|
|
39
|
-
600: hsl(340deg 60% 45%),
|
|
40
|
-
700: hsl(340deg 65% 35%),
|
|
41
|
-
800: hsl(340deg 75% 20%),
|
|
42
|
-
900: hsl(340deg 85% 10%),
|
|
46
|
+
$custom-colors: () !default;
|
|
47
|
+
$colors: map.merge($default-colors, $custom-colors) !default;
|
|
48
|
+
|
|
49
|
+
// A map for reversing the shade values of the dark theme.
|
|
50
|
+
$dark-map: (
|
|
51
|
+
100: 900,
|
|
52
|
+
200: 800,
|
|
53
|
+
300: 700,
|
|
54
|
+
400: 600,
|
|
55
|
+
500: 500,
|
|
56
|
+
600: 400,
|
|
57
|
+
700: 300,
|
|
58
|
+
800: 200,
|
|
59
|
+
900: 100,
|
|
43
60
|
) !default;
|
|
44
61
|
|
|
45
62
|
// Font properties.
|
package/scss/theme/_index.scss
CHANGED
|
@@ -4,87 +4,34 @@
|
|
|
4
4
|
@use "../mixins/layer" as *;
|
|
5
5
|
@use "defaults";
|
|
6
6
|
@use "sass:map";
|
|
7
|
+
@use "../functions/theme";
|
|
7
8
|
|
|
8
9
|
@include layer(theme) {
|
|
9
10
|
:root {
|
|
10
|
-
background:
|
|
11
|
-
color:
|
|
11
|
+
background: theme.get(primary, 100);
|
|
12
|
+
color: theme.get(primary, 900);
|
|
12
13
|
font-family: $font-family;
|
|
13
14
|
font-size: $font-size;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
// Set the active theme for dark mode.
|
|
17
18
|
.dark-mode {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
--#{defaults.$prefix}-theme-active--primary--500: #{$theme-dark--primary--500};
|
|
24
|
-
--#{defaults.$prefix}-theme-active--primary--600: #{$theme-dark--primary--600};
|
|
25
|
-
--#{defaults.$prefix}-theme-active--primary--700: #{$theme-dark--primary--700};
|
|
26
|
-
--#{defaults.$prefix}-theme-active--primary--800: #{$theme-dark--primary--800};
|
|
27
|
-
--#{defaults.$prefix}-theme-active--primary--900: #{$theme-dark--primary--900};
|
|
28
|
-
|
|
29
|
-
// Secondary colours.
|
|
30
|
-
--#{defaults.$prefix}-theme-active--secondary--100: #{$theme-dark--secondary--100};
|
|
31
|
-
--#{defaults.$prefix}-theme-active--secondary--200: #{$theme-dark--secondary--200};
|
|
32
|
-
--#{defaults.$prefix}-theme-active--secondary--300: #{$theme-dark--secondary--300};
|
|
33
|
-
--#{defaults.$prefix}-theme-active--secondary--400: #{$theme-dark--secondary--400};
|
|
34
|
-
--#{defaults.$prefix}-theme-active--secondary--500: #{$theme-dark--secondary--500};
|
|
35
|
-
--#{defaults.$prefix}-theme-active--secondary--600: #{$theme-dark--secondary--600};
|
|
36
|
-
--#{defaults.$prefix}-theme-active--secondary--700: #{$theme-dark--secondary--700};
|
|
37
|
-
--#{defaults.$prefix}-theme-active--secondary--800: #{$theme-dark--secondary--800};
|
|
38
|
-
--#{defaults.$prefix}-theme-active--secondary--900: #{$theme-dark--secondary--900};
|
|
39
|
-
|
|
40
|
-
// Tertiary colours.
|
|
41
|
-
--#{defaults.$prefix}-theme-active--tertiary--100: #{$theme-dark--tertiary--100};
|
|
42
|
-
--#{defaults.$prefix}-theme-active--tertiary--200: #{$theme-dark--tertiary--200};
|
|
43
|
-
--#{defaults.$prefix}-theme-active--tertiary--300: #{$theme-dark--tertiary--300};
|
|
44
|
-
--#{defaults.$prefix}-theme-active--tertiary--400: #{$theme-dark--tertiary--400};
|
|
45
|
-
--#{defaults.$prefix}-theme-active--tertiary--500: #{$theme-dark--tertiary--500};
|
|
46
|
-
--#{defaults.$prefix}-theme-active--tertiary--600: #{$theme-dark--tertiary--600};
|
|
47
|
-
--#{defaults.$prefix}-theme-active--tertiary--700: #{$theme-dark--tertiary--700};
|
|
48
|
-
--#{defaults.$prefix}-theme-active--tertiary--800: #{$theme-dark--tertiary--800};
|
|
49
|
-
--#{defaults.$prefix}-theme-active--tertiary--900: #{$theme-dark--tertiary--900};
|
|
19
|
+
@each $color, $map in $theme-dark {
|
|
20
|
+
@each $shade, $value in $map {
|
|
21
|
+
--#{defaults.$prefix}-theme-active--#{$color}--#{$shade}: #{$value};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
50
24
|
|
|
51
25
|
color-scheme: dark;
|
|
52
26
|
}
|
|
53
27
|
|
|
54
28
|
// Set the active theme for light mode.
|
|
55
29
|
.light-mode {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
--#{defaults.$prefix}-theme-active--primary--500: #{$theme-light--primary--500};
|
|
62
|
-
--#{defaults.$prefix}-theme-active--primary--600: #{$theme-light--primary--600};
|
|
63
|
-
--#{defaults.$prefix}-theme-active--primary--700: #{$theme-light--primary--700};
|
|
64
|
-
--#{defaults.$prefix}-theme-active--primary--800: #{$theme-light--primary--800};
|
|
65
|
-
--#{defaults.$prefix}-theme-active--primary--900: #{$theme-light--primary--900};
|
|
66
|
-
|
|
67
|
-
// Secondary colours.
|
|
68
|
-
--#{defaults.$prefix}-theme-active--secondary--100: #{$theme-light--secondary--100};
|
|
69
|
-
--#{defaults.$prefix}-theme-active--secondary--200: #{$theme-light--secondary--200};
|
|
70
|
-
--#{defaults.$prefix}-theme-active--secondary--300: #{$theme-light--secondary--300};
|
|
71
|
-
--#{defaults.$prefix}-theme-active--secondary--400: #{$theme-light--secondary--400};
|
|
72
|
-
--#{defaults.$prefix}-theme-active--secondary--500: #{$theme-light--secondary--500};
|
|
73
|
-
--#{defaults.$prefix}-theme-active--secondary--600: #{$theme-light--secondary--600};
|
|
74
|
-
--#{defaults.$prefix}-theme-active--secondary--700: #{$theme-light--secondary--700};
|
|
75
|
-
--#{defaults.$prefix}-theme-active--secondary--800: #{$theme-light--secondary--800};
|
|
76
|
-
--#{defaults.$prefix}-theme-active--secondary--900: #{$theme-light--secondary--900};
|
|
77
|
-
|
|
78
|
-
// Tertiary colours.
|
|
79
|
-
--#{defaults.$prefix}-theme-active--tertiary--100: #{$theme-light--tertiary--100};
|
|
80
|
-
--#{defaults.$prefix}-theme-active--tertiary--200: #{$theme-light--tertiary--200};
|
|
81
|
-
--#{defaults.$prefix}-theme-active--tertiary--300: #{$theme-light--tertiary--300};
|
|
82
|
-
--#{defaults.$prefix}-theme-active--tertiary--400: #{$theme-light--tertiary--400};
|
|
83
|
-
--#{defaults.$prefix}-theme-active--tertiary--500: #{$theme-light--tertiary--500};
|
|
84
|
-
--#{defaults.$prefix}-theme-active--tertiary--600: #{$theme-light--tertiary--600};
|
|
85
|
-
--#{defaults.$prefix}-theme-active--tertiary--700: #{$theme-light--tertiary--700};
|
|
86
|
-
--#{defaults.$prefix}-theme-active--tertiary--800: #{$theme-light--tertiary--800};
|
|
87
|
-
--#{defaults.$prefix}-theme-active--tertiary--900: #{$theme-light--tertiary--900};
|
|
30
|
+
@each $color, $map in $theme-light {
|
|
31
|
+
@each $shade, $value in $map {
|
|
32
|
+
--#{defaults.$prefix}-theme-active--#{$color}--#{$shade}: #{$value};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
88
35
|
|
|
89
36
|
color-scheme: light;
|
|
90
37
|
}
|