@graupl/graupl 1.0.0-alpha.10 → 1.0.0-alpha.12
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 +33 -0
- package/dist/base/button.css +2 -0
- package/dist/base/button.css.map +1 -0
- package/dist/base/form.css.map +1 -1
- package/dist/base/link.css +1 -1
- package/dist/base/link.css.map +1 -1
- package/dist/base/table.css +1 -1
- package/dist/base/table.css.map +1 -1
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -1
- package/dist/component/input-group.css.map +1 -1
- package/dist/component.css +1 -1
- package/dist/component.css.map +1 -1
- package/dist/graupl.css +1 -1
- package/dist/graupl.css.map +1 -1
- package/dist/init.css +2 -0
- package/dist/init.css.map +1 -0
- package/dist/layout/columns.css.map +1 -1
- package/dist/layout/container.css.map +1 -1
- package/dist/layout.css +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/normalize.css +2 -0
- package/dist/normalize.css.map +1 -0
- package/dist/state/focus.css.map +1 -1
- package/dist/state.css.map +1 -1
- package/dist/theme/color.css +1 -1
- package/dist/theme/color.css.map +1 -1
- package/dist/theme/typography.css.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/theme.css.map +1 -1
- package/dist/utilities/spacing.css +1 -1
- package/dist/utilities/spacing.css.map +1 -1
- package/dist/utilities.css +1 -1
- package/dist/utilities.css.map +1 -1
- package/index.html +6 -7
- package/package.json +2 -1
- package/scss/base/button.scss +3 -0
- package/scss/base/form.scss +1 -1
- package/scss/base/link.scss +1 -1
- package/scss/base/table.scss +1 -1
- package/scss/base.scss +1 -1
- package/scss/component/input-group.scss +1 -1
- package/scss/component.scss +1 -1
- package/scss/graupl.scss +1 -3
- package/scss/init.scss +3 -0
- package/scss/layout/columns.scss +1 -1
- package/scss/layout/container.scss +1 -1
- package/scss/layout.scss +1 -1
- package/scss/normalize.scss +3 -0
- package/scss/state/focus.scss +1 -1
- package/scss/state.scss +1 -1
- package/scss/theme/color.scss +1 -1
- package/scss/theme/typography.scss +1 -1
- package/scss/theme.scss +1 -1
- package/scss/utilities/alignment.scss +1 -1
- package/scss/utilities/color.scss +1 -1
- package/scss/utilities/display.scss +1 -1
- package/scss/utilities/flex.scss +1 -1
- package/scss/utilities/inset.scss +1 -1
- package/scss/utilities/justification.scss +1 -1
- package/scss/utilities/list.scss +1 -1
- package/scss/utilities/postion.scss +1 -1
- package/scss/utilities/spacing.scss +1 -1
- package/scss/utilities/typography.scss +1 -1
- package/scss/utilities/visibility.scss +1 -1
- package/scss/utilities.scss +1 -1
- package/src/scss/_defaults.scss +6 -4
- package/src/scss/_index.scss +4 -3
- package/src/scss/_init.scss +2 -2
- package/src/scss/_normalize.scss +197 -0
- package/src/scss/_variables.scss +4 -1
- package/src/scss/base/_index.scss +2 -1
- package/src/scss/{component → base}/button/_defaults.scss +14 -5
- package/src/scss/base/button/_index.scss +147 -0
- package/src/scss/{component → base}/button/_variables.scss +8 -1
- package/src/scss/base/form/_defaults.scss +14 -4
- package/src/scss/base/form/_index.scss +21 -16
- package/src/scss/base/form/_variables.scss +4 -1
- package/src/scss/base/link/_defaults.scss +16 -4
- package/src/scss/base/link/_index.scss +49 -8
- package/src/scss/base/link/_variables.scss +69 -1
- package/src/scss/base/table/_defaults.scss +49 -4
- package/src/scss/base/table/_index.scss +104 -8
- package/src/scss/base/table/_variables.scss +67 -5
- package/src/scss/component/_index.scss +1 -3
- package/src/scss/component/input-group/_defaults.scss +11 -4
- package/src/scss/component/input-group/_index.scss +11 -9
- package/src/scss/component/input-group/_variables.scss +4 -1
- package/src/scss/functions/_important.scss +2 -0
- package/src/scss/functions/_theme.scss +2 -0
- package/src/scss/layout/_index.scss +1 -1
- package/src/scss/layout/columns/_defaults.scss +12 -4
- package/src/scss/layout/columns/_index.scss +5 -5
- package/src/scss/layout/columns/_variables.scss +4 -1
- package/src/scss/layout/container/_defaults.scss +13 -4
- package/src/scss/layout/container/_index.scss +12 -7
- package/src/scss/layout/container/_variables.scss +4 -1
- package/src/scss/mixins/_layer.scss +1 -1
- package/src/scss/mixins/_media-queries.scss +2 -1
- package/src/scss/state/_index.scss +1 -1
- package/src/scss/state/focus/_defaults.scss +6 -4
- package/src/scss/state/focus/_index.scss +1 -1
- package/src/scss/state/focus/_variables.scss +4 -1
- package/src/scss/theme/_index.scss +1 -1
- package/src/scss/theme/color/_defaults.scss +6 -4
- package/src/scss/theme/color/_index.scss +2 -2
- package/src/scss/theme/color/_variables.scss +6 -3
- package/src/scss/theme/typography/_defaults.scss +6 -4
- package/src/scss/theme/typography/_index.scss +1 -1
- package/src/scss/theme/typography/_variables.scss +4 -1
- package/src/scss/utilities/_index.scss +1 -1
- package/src/scss/utilities/alignment/_defaults.scss +6 -4
- package/src/scss/utilities/alignment/_index.scss +1 -1
- package/src/scss/utilities/alignment/_variables.scss +4 -1
- package/src/scss/utilities/color/_defaults.scss +6 -4
- package/src/scss/utilities/color/_index.scss +1 -1
- package/src/scss/utilities/color/_variables.scss +4 -1
- package/src/scss/utilities/display/_defaults.scss +6 -4
- package/src/scss/utilities/display/_index.scss +1 -1
- package/src/scss/utilities/display/_variables.scss +4 -1
- package/src/scss/utilities/flex/_defaults.scss +6 -4
- package/src/scss/utilities/flex/_index.scss +1 -1
- package/src/scss/utilities/flex/_variables.scss +4 -1
- package/src/scss/utilities/inset/_defaults.scss +6 -4
- package/src/scss/utilities/inset/_index.scss +1 -1
- package/src/scss/utilities/inset/_variables.scss +4 -1
- package/src/scss/utilities/justification/_defaults.scss +6 -4
- package/src/scss/utilities/justification/_index.scss +1 -1
- package/src/scss/utilities/justification/_variables.scss +4 -1
- package/src/scss/utilities/list/_defaults.scss +6 -4
- package/src/scss/utilities/list/_index.scss +1 -1
- package/src/scss/utilities/list/_variables.scss +4 -1
- package/src/scss/utilities/position/_defaults.scss +6 -4
- package/src/scss/utilities/position/_index.scss +1 -1
- package/src/scss/utilities/position/_variables.scss +4 -1
- package/src/scss/utilities/spacing/_defaults.scss +6 -4
- package/src/scss/utilities/spacing/_index.scss +8 -1
- package/src/scss/utilities/spacing/_variables.scss +4 -1
- package/src/scss/utilities/typography/_defaults.scss +6 -4
- package/src/scss/utilities/typography/_index.scss +1 -1
- package/src/scss/utilities/typography/_variables.scss +4 -1
- package/src/scss/utilities/visibility/_defaults.scss +6 -4
- package/src/scss/utilities/visibility/_index.scss +1 -1
- package/src/scss/utilities/visibility/_variables.scss +4 -1
- package/dist/component/button.css +0 -2
- package/dist/component/button.css.map +0 -1
- package/dist/component/table.css +0 -2
- package/dist/component/table.css.map +0 -1
- package/scss/component/button.scss +0 -3
- package/scss/component/table.scss +0 -3
- package/src/scss/component/button/_index.scss +0 -98
- package/src/scss/component/table/_defaults.scss +0 -30
- package/src/scss/component/table/_index.scss +0 -77
- package/src/scss/component/table/_variables.scss +0 -64
package/scss/utilities.scss
CHANGED
package/src/scss/_defaults.scss
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
package/src/scss/_index.scss
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// Forwards all components for easy development.
|
|
1
|
+
// @graupl/graupl styles.
|
|
4
2
|
|
|
5
3
|
// Forward the layer initialization.
|
|
6
4
|
@forward "init";
|
|
7
5
|
|
|
6
|
+
// Forward normalize.
|
|
7
|
+
@forward "normalize";
|
|
8
|
+
|
|
8
9
|
// Forward all layers.
|
|
9
10
|
@forward "base";
|
|
10
11
|
@forward "layout";
|
package/src/scss/_init.scss
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl layer initialization styles.
|
|
2
2
|
|
|
3
|
-
@layer graupl.base, graupl.layout, graupl.component, graupl.theme, graupl.utilities, graupl.state;
|
|
3
|
+
@layer graupl.normalize, graupl.base, graupl.layout, graupl.component, graupl.theme, graupl.utilities, graupl.state;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// @graupl/graupl normalize.
|
|
2
|
+
//
|
|
3
|
+
// This file is manually forked from normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
|
|
4
|
+
//
|
|
5
|
+
// We wanted to scope normalize.css to a normalize layer along with some customizations, so we forked it here.
|
|
6
|
+
//
|
|
7
|
+
// @use cannot be used in this file because you cannot insert it into a layer.
|
|
8
|
+
//
|
|
9
|
+
// @import would technically work, but it is not recommended by Sass and will eventually be removed.
|
|
10
|
+
// Using @import would cause headaches down the line, so a manual fork was the best option.
|
|
11
|
+
|
|
12
|
+
@use "mixins/layer" as *;
|
|
13
|
+
|
|
14
|
+
@include layer(normalize) {
|
|
15
|
+
// Correct box sizing of all elements to ensure everything is consistent.
|
|
16
|
+
*,
|
|
17
|
+
*::before,
|
|
18
|
+
*::after {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Document.
|
|
23
|
+
|
|
24
|
+
// 1. Correct the line height in all browsers.
|
|
25
|
+
// 2. Prevent adjustments of font size after orientation changes in iOS.
|
|
26
|
+
html {
|
|
27
|
+
line-height: 1.15; // 1.
|
|
28
|
+
text-size-adjust: 100%; // 2.
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Secions.
|
|
32
|
+
|
|
33
|
+
// Remove the margin in all browsers.
|
|
34
|
+
body {
|
|
35
|
+
margin: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Grouping content.
|
|
39
|
+
|
|
40
|
+
// Add the correct box sizing in Firefox.
|
|
41
|
+
hr {
|
|
42
|
+
box-sizing: content-box;
|
|
43
|
+
height: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 1. Correct the inheritance and scaling of font size in all browsers.
|
|
47
|
+
// 2. Correct the odd `em` font sizing in all browsers.
|
|
48
|
+
pre {
|
|
49
|
+
font-family: monospace; // 1.
|
|
50
|
+
font-size: 1em; // 2.
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Text-level semantics.
|
|
54
|
+
|
|
55
|
+
// 1. Remove the bottom border in Chrome 57-
|
|
56
|
+
// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
|
57
|
+
abbr[title] {
|
|
58
|
+
border-bottom: 0; // 1.
|
|
59
|
+
text-decoration: underline dotted; // 2.
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Add the correct font weight in Chrome, Edge, and Safari.
|
|
63
|
+
b,
|
|
64
|
+
strong {
|
|
65
|
+
font-weight: bolder;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 1. Correct the inheritance and scaling of font size in all browsers.
|
|
69
|
+
// 2. Correct the odd `em` font sizing in all browsers.
|
|
70
|
+
code,
|
|
71
|
+
kbd,
|
|
72
|
+
samp {
|
|
73
|
+
font-family: monospace; // 1.
|
|
74
|
+
font-size: 1em; // 2.
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Add the correct font size in all browsers.
|
|
78
|
+
small {
|
|
79
|
+
font-size: 80%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Prevent `sub` and `sup` elements from affecting the line height in all browsers.
|
|
83
|
+
sub,
|
|
84
|
+
sup {
|
|
85
|
+
position: relative;
|
|
86
|
+
font-size: 75%;
|
|
87
|
+
line-height: 0;
|
|
88
|
+
vertical-align: baseline;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
sub {
|
|
92
|
+
bottom: -0.25em;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
sup {
|
|
96
|
+
top: -0.5em;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Forms.
|
|
100
|
+
|
|
101
|
+
// 1. Change the font styles in all browsers.
|
|
102
|
+
// 2. Remove the margin in Firefox and Safari.
|
|
103
|
+
button,
|
|
104
|
+
input,
|
|
105
|
+
optgroup,
|
|
106
|
+
select,
|
|
107
|
+
textarea {
|
|
108
|
+
margin: 0; // 2.
|
|
109
|
+
font-family: inherit; // 1.
|
|
110
|
+
font-size: 100%; // 1.
|
|
111
|
+
line-height: 1.15; // 1.
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Remove the inheritance of text transform in Firefox.
|
|
115
|
+
button,
|
|
116
|
+
select {
|
|
117
|
+
/* 1 */
|
|
118
|
+
text-transform: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Correct the inability to style clickable types in iOS and Safari.
|
|
122
|
+
button,
|
|
123
|
+
[type="button"],
|
|
124
|
+
[type="reset"],
|
|
125
|
+
[type="submit"] {
|
|
126
|
+
appearance: button;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Remove the inner border and padding in Firefox.
|
|
130
|
+
button::-moz-focus-inner,
|
|
131
|
+
[type="button"]::-moz-focus-inner,
|
|
132
|
+
[type="reset"]::-moz-focus-inner,
|
|
133
|
+
[type="submit"]::-moz-focus-inner {
|
|
134
|
+
padding: 0;
|
|
135
|
+
border-style: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Restore the focus styles unset by the previous rule.
|
|
139
|
+
button:-moz-focusring,
|
|
140
|
+
[type="button"]:-moz-focusring,
|
|
141
|
+
[type="reset"]:-moz-focusring,
|
|
142
|
+
[type="submit"]:-moz-focusring {
|
|
143
|
+
outline: 1px dotted ButtonText;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Correct the padding in Firefox.
|
|
147
|
+
fieldset {
|
|
148
|
+
padding: 0.35em 0.75em 0.625em;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Remove the padding so developers are not caught out when they zero out `fieldset` elements in all browsers.
|
|
152
|
+
legend {
|
|
153
|
+
padding: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
|
157
|
+
progress {
|
|
158
|
+
vertical-align: baseline;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Correct the cursor style of increment and decrement buttons in Chrome.
|
|
162
|
+
[type="number"]::-webkit-inner-spin-button,
|
|
163
|
+
[type="number"]::-webkit-outer-spin-button {
|
|
164
|
+
height: auto;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// 1. Correct the odd appearance in Chrome and Safari.
|
|
168
|
+
// 2. Correct the outline style in Safari.
|
|
169
|
+
[type="search"] {
|
|
170
|
+
appearance: textfield; // 1.
|
|
171
|
+
outline-offset: -2px; // 2.
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Remove the inner padding in Chrome and Safari on macOS.
|
|
175
|
+
[type="search"]::-webkit-search-decoration {
|
|
176
|
+
appearance: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// 1. Correct the inability to style clickable types in iOS and Safari.
|
|
180
|
+
// 2. Change font properties to `inherit` in Safari.
|
|
181
|
+
::-webkit-file-upload-button {
|
|
182
|
+
appearance: button; /* 1 */
|
|
183
|
+
font: inherit; /* 2 */
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Interactive.
|
|
187
|
+
|
|
188
|
+
// Add the correct display in Edge, IE 10+, and Firefox.
|
|
189
|
+
details {
|
|
190
|
+
display: block;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Add the correct display in all browsers.
|
|
194
|
+
summary {
|
|
195
|
+
display: list-item;
|
|
196
|
+
}
|
|
197
|
+
}
|
package/src/scss/_variables.scss
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl button base default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling bases unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
11
|
+
// Button selectors.
|
|
12
|
+
$button-selector: ".button" !default;
|
|
13
|
+
$button-link-selector: ".link" !default;
|
|
14
|
+
$button-theme-selector-prefix: "." !default;
|
|
15
|
+
|
|
16
|
+
// Button properties.
|
|
17
|
+
$button-transform: none !default;
|
|
9
18
|
$button-hover-transform: none !default;
|
|
10
19
|
$button-hover-transform-reduced-motion: none !default;
|
|
11
20
|
$button-active-transform: scale(0.95) !default;
|
|
@@ -13,7 +22,7 @@ $button-active-transform-reduced-motion: scale(0.98) !default;
|
|
|
13
22
|
|
|
14
23
|
// Button state theme defaults.
|
|
15
24
|
// This map is used to define the default colour shades for the
|
|
16
|
-
// themed button
|
|
25
|
+
// themed button bases.
|
|
17
26
|
//
|
|
18
27
|
// e.g.
|
|
19
28
|
// Primary buttons will use primary--900 as the text colour, primary--100 as the background
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// @gruapl/graupl button base styles.
|
|
2
|
+
|
|
3
|
+
@use "defaults";
|
|
4
|
+
@use "../../defaults" as root-defaults;
|
|
5
|
+
@use "../../theme/color/variables" as color;
|
|
6
|
+
@use "../../base/link/variables" as link;
|
|
7
|
+
@use "variables" as *;
|
|
8
|
+
@use "../../mixins/layer" as *;
|
|
9
|
+
@use "../../mixins/media-queries" as *;
|
|
10
|
+
@use "sass:map";
|
|
11
|
+
|
|
12
|
+
@include layer(base) {
|
|
13
|
+
#{defaults.$button-selector} {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
min-width: $button-min-width;
|
|
18
|
+
min-height: $button-min-height;
|
|
19
|
+
padding: $button-padding;
|
|
20
|
+
transform: $button-transform;
|
|
21
|
+
transition: $button-transition;
|
|
22
|
+
border-width: $button-border-width;
|
|
23
|
+
border-style: $button-border-style;
|
|
24
|
+
border-radius: $button-border-radius;
|
|
25
|
+
font-size: $button-font-size;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
--#{root-defaults.$prefix}-button-transform: #{$button-hover-transform};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:active {
|
|
33
|
+
--#{root-defaults.$prefix}-button-transform: #{$button-active-transform};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:not(#{defaults.$button-link-selector}) {
|
|
37
|
+
--#{root-defaults.$prefix}-link-text-decoration: none;
|
|
38
|
+
--#{root-defaults.$prefix}-link-padding: #{$button-padding};
|
|
39
|
+
--#{root-defaults.$prefix}-link-transition: #{$button-transition};
|
|
40
|
+
--#{root-defaults.$prefix}-link-transition-reduced-motion: #{$button-transition-reduced-motion};
|
|
41
|
+
--#{root-defaults.$prefix}-link-transform: #{$button-transform};
|
|
42
|
+
--#{root-defaults.$prefix}-link-hover-transform: #{$button-hover-transform};
|
|
43
|
+
--#{root-defaults.$prefix}-link-active-transform: #{$button-active-transform};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:disabled,
|
|
47
|
+
&[disabled] {
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
|
|
50
|
+
&:hover,
|
|
51
|
+
&:active {
|
|
52
|
+
transform: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&#{defaults.$button-link-selector} {
|
|
57
|
+
--#{root-defaults.$prefix}-button-padding: #{link.$link-padding};
|
|
58
|
+
--#{root-defaults.$prefix}-button-transition: #{link.$link-transition};
|
|
59
|
+
--#{root-defaults.$prefix}-button-transition-reduced-motion: #{link.$link-transition-reduced-motion};
|
|
60
|
+
--#{root-defaults.$prefix}-button-transform: #{link.$link-transform};
|
|
61
|
+
--#{root-defaults.$prefix}-button-hover-transform: #{link.$link-hover-transform};
|
|
62
|
+
--#{root-defaults.$prefix}-button-active-transform: #{link.$link-active-transform};
|
|
63
|
+
|
|
64
|
+
min-width: auto;
|
|
65
|
+
min-height: auto;
|
|
66
|
+
border: 0;
|
|
67
|
+
font-size: inherit;
|
|
68
|
+
text-decoration: link.$link-text-decoration;
|
|
69
|
+
text-decoration-thickness: link.$link-text-decoration-thickness;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@include animation-off {
|
|
74
|
+
#{defaults.$button-selector} {
|
|
75
|
+
--#{root-defaults.$prefix}-button-transition: #{$button-transition-reduced-motion};
|
|
76
|
+
--#{root-defaults.$prefix}-button-hover-transform: #{$button-hover-transform-reduced-motion};
|
|
77
|
+
--#{root-defaults.$prefix}-button-active-transform: #{$button-active-transform-reduced-motion};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@include layer(theme) {
|
|
83
|
+
#{defaults.$button-selector} {
|
|
84
|
+
border-color: $button-border-color;
|
|
85
|
+
background: $button-background;
|
|
86
|
+
color: $button-color;
|
|
87
|
+
|
|
88
|
+
@each $color, $map in color.$theme-active {
|
|
89
|
+
&#{defaults.$button-theme-selector-prefix}#{$color} {
|
|
90
|
+
@each $prop, $shade in defaults.$button-state-theme-map {
|
|
91
|
+
--#{root-defaults.$prefix}-button-#{$prop}: #{map.get($map, $shade)};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&#{defaults.$button-link-selector} {
|
|
97
|
+
--#{root-defaults.$prefix}-button-color: #{link.$link-color};
|
|
98
|
+
--#{root-defaults.$prefix}-button-hover-color: #{link.$link-hover-color};
|
|
99
|
+
--#{root-defaults.$prefix}-button-active-color: #{link.$link-active-color};
|
|
100
|
+
--#{root-defaults.$prefix}-button-disabled-color: #{link.$link-disabled-color};
|
|
101
|
+
--#{root-defaults.$prefix}-button-background: #{link.$link-background};
|
|
102
|
+
--#{root-defaults.$prefix}-button-hover-background: #{link.$link-hover-background};
|
|
103
|
+
--#{root-defaults.$prefix}-button-active-background: #{link.$link-active-background};
|
|
104
|
+
--#{root-defaults.$prefix}-button-disabled-background: #{link.$link-disabled-background};
|
|
105
|
+
--#{root-defaults.$prefix}-button-border-color: none;
|
|
106
|
+
--#{root-defaults.$prefix}-button-hover-border-color: none;
|
|
107
|
+
--#{root-defaults.$prefix}-button-active-border-color: none;
|
|
108
|
+
--#{root-defaults.$prefix}-button-disabled-border-color: none;
|
|
109
|
+
--#{root-defaults.$prefix}-button-hover-transform: none;
|
|
110
|
+
--#{root-defaults.$prefix}-button-active-transform: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&:not(#{defaults.$button-link-selector}) {
|
|
114
|
+
--#{root-defaults.$prefix}-link-color: #{$button-color};
|
|
115
|
+
--#{root-defaults.$prefix}-link-hover-color: #{$button-hover-color};
|
|
116
|
+
--#{root-defaults.$prefix}-link-active-color: #{$button-active-color};
|
|
117
|
+
--#{root-defaults.$prefix}-link-visited-color: #{$button-hover-color};
|
|
118
|
+
--#{root-defaults.$prefix}-link-disabled-color: #{$button-disabled-color};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
--#{root-defaults.$prefix}-button-border-color: #{$button-hover-border-color};
|
|
123
|
+
--#{root-defaults.$prefix}-button-background: #{$button-hover-background};
|
|
124
|
+
--#{root-defaults.$prefix}-button-color: #{$button-hover-color};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&:active {
|
|
128
|
+
--#{root-defaults.$prefix}-button-border-color: #{$button-active-border-color};
|
|
129
|
+
--#{root-defaults.$prefix}-button-background: #{$button-active-background};
|
|
130
|
+
--#{root-defaults.$prefix}-button-color: #{$button-active-color};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:disabled,
|
|
134
|
+
&[disabled] {
|
|
135
|
+
--#{root-defaults.$prefix}-button-border-color: #{$button-disabled-border-color};
|
|
136
|
+
--#{root-defaults.$prefix}-button-background: #{$button-disabled-background};
|
|
137
|
+
--#{root-defaults.$prefix}-button-color: #{$button-disabled-color};
|
|
138
|
+
|
|
139
|
+
&:hover,
|
|
140
|
+
&:active {
|
|
141
|
+
--#{root-defaults.$prefix}-button-border-color: #{$button-disabled-border-color};
|
|
142
|
+
--#{root-defaults.$prefix}-button-background: #{$button-disabled-background};
|
|
143
|
+
--#{root-defaults.$prefix}-button-color: #{$button-disabled-color};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl button base variables.
|
|
2
|
+
//
|
|
3
|
+
// These values are to be used to directly style bases and provide a
|
|
4
|
+
// cleaner way to reference custom properties.
|
|
2
5
|
|
|
3
6
|
@use "defaults";
|
|
4
7
|
@use "../../variables" as root-variables;
|
|
@@ -46,6 +49,10 @@ $button-transition-reduced-motion: var(
|
|
|
46
49
|
);
|
|
47
50
|
|
|
48
51
|
// Transform properties.
|
|
52
|
+
$button-transform: var(
|
|
53
|
+
--#{root-defaults.$prefix}-button-transform,
|
|
54
|
+
#{defaults.$button-transform}
|
|
55
|
+
);
|
|
49
56
|
$button-hover-transform: var(
|
|
50
57
|
--#{root-defaults.$prefix}-button-hover-transform,
|
|
51
58
|
#{defaults.$button-hover-transform}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl form base default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling bases unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
8
|
+
|
|
9
|
+
// Form selectors.
|
|
10
|
+
$input-selector: "input" !default;
|
|
11
|
+
$textarea-selector: "textarea" !default;
|
|
12
|
+
$select-selector: "select" !default;
|
|
13
|
+
$label-selector: "label" !default;
|
|
14
|
+
$fieldset-selector: "fieldset" !default;
|
|
6
15
|
|
|
16
|
+
// Fieldset properties.
|
|
7
17
|
$fieldset-direction: column !default;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @gruapl/graupl form base styles.
|
|
2
2
|
|
|
3
|
+
@use "defaults";
|
|
3
4
|
@use "variables" as *;
|
|
4
5
|
@use "../../mixins/layer" as *;
|
|
5
6
|
|
|
6
7
|
@include layer(base) {
|
|
7
|
-
input,
|
|
8
|
-
textarea,
|
|
9
|
-
select {
|
|
8
|
+
#{defaults.$input-selector},
|
|
9
|
+
#{defaults.$textarea-selector},
|
|
10
|
+
#{defaults.$select-selector} {
|
|
10
11
|
padding: $input-padding;
|
|
11
12
|
border-width: $input-border-width;
|
|
12
13
|
border-style: $input-border-style;
|
|
@@ -18,11 +19,11 @@
|
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
label {
|
|
22
|
+
#{defaults.$label-selector} {
|
|
22
23
|
font-size: $label-font-size;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
fieldset {
|
|
26
|
+
#{defaults.$fieldset-selector} {
|
|
26
27
|
display: flex;
|
|
27
28
|
flex-flow: $fieldset-direction wrap;
|
|
28
29
|
gap: $fieldset-gap;
|
|
@@ -33,9 +34,9 @@
|
|
|
33
34
|
font-size: $fieldset-font-size;
|
|
34
35
|
|
|
35
36
|
&:disabled {
|
|
36
|
-
input,
|
|
37
|
-
textarea,
|
|
38
|
-
select {
|
|
37
|
+
#{defaults.$input-selector},
|
|
38
|
+
#{defaults.$textarea-selector},
|
|
39
|
+
#{defaults.$select-selector} {
|
|
39
40
|
cursor: not-allowed;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -43,9 +44,9 @@
|
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
@include layer(theme) {
|
|
46
|
-
input,
|
|
47
|
-
textarea,
|
|
48
|
-
select {
|
|
47
|
+
#{defaults.$input-selector},
|
|
48
|
+
#{defaults.$textarea-selector},
|
|
49
|
+
#{defaults.$select-selector} {
|
|
49
50
|
border-color: $input-border-color;
|
|
50
51
|
background: $input-background;
|
|
51
52
|
color: $input-color;
|
|
@@ -65,15 +66,19 @@
|
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
label {
|
|
69
|
+
#{defaults.$label-selector} {
|
|
69
70
|
color: $label-color;
|
|
70
71
|
|
|
71
|
-
&:has(
|
|
72
|
+
&:has(
|
|
73
|
+
+ #{defaults.$input-selector}:disabled,
|
|
74
|
+
+ #{defaults.$textarea-selector}:disabled,
|
|
75
|
+
+ #{defaults.$select-selector}:disabled
|
|
76
|
+
) {
|
|
72
77
|
color: $label-disabled-color;
|
|
73
78
|
}
|
|
74
79
|
}
|
|
75
80
|
|
|
76
|
-
fieldset {
|
|
81
|
+
#{defaults.$fieldset-selector} {
|
|
77
82
|
border-color: $fieldset-border-color;
|
|
78
83
|
background: $fieldset-background;
|
|
79
84
|
color: $fieldset-color;
|
|
@@ -82,7 +87,7 @@
|
|
|
82
87
|
border-color: $fieldset-disabled-border-color;
|
|
83
88
|
color: $fieldset-disabled-color;
|
|
84
89
|
|
|
85
|
-
label {
|
|
90
|
+
#{defaults.$label-selector} {
|
|
86
91
|
color: $label-disabled-color;
|
|
87
92
|
}
|
|
88
93
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl form base variables.
|
|
2
|
+
//
|
|
3
|
+
// These values are to be used to directly style bases and provide a
|
|
4
|
+
// cleaner way to reference custom properties.
|
|
2
5
|
|
|
3
6
|
@use "defaults";
|
|
4
7
|
@use "../../variables" as root-variables;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl link base default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling bases unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
8
|
+
|
|
9
|
+
// Link selectors.
|
|
10
|
+
$link-selector: "a" !default;
|
|
6
11
|
|
|
12
|
+
// Link properties.
|
|
7
13
|
$link-text-decoration: underline;
|
|
14
|
+
$link-hover-text-decoration: underline;
|
|
15
|
+
$link-transform: none !default;
|
|
16
|
+
$link-hover-transform: none !default;
|
|
17
|
+
$link-hover-transform-reduced-motion: none !default;
|
|
18
|
+
$link-active-transform: none !default;
|
|
19
|
+
$link-active-transform-reduced-motion: none !default;
|