@graupl/graupl 1.0.0-alpha.12 → 1.0.0-alpha.13
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 +34 -0
- package/dist/base/button.css +1 -1
- package/dist/base/button.css.map +1 -1
- package/dist/base/form.css +1 -1
- 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/card.css +2 -0
- package/dist/component/card.css.map +1 -0
- package/dist/component/input-group.css +1 -1
- package/dist/component/input-group.css.map +1 -1
- package/dist/component/menu.css +2 -0
- package/dist/component/menu.css.map +1 -0
- package/dist/component/navigation.css +2 -0
- package/dist/component/navigation.css.map +1 -0
- 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/layout/columns.css +1 -1
- package/dist/layout/columns.css.map +1 -1
- package/dist/layout/flex-columns.css +2 -0
- package/dist/layout/flex-columns.css.map +1 -0
- package/dist/layout.css +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/theme/typography.css +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/order.css +2 -0
- package/dist/utilities/order.css.map +1 -0
- package/dist/utilities/spacing.css +1 -1
- package/dist/utilities/spacing.css.map +1 -1
- package/dist/utilities/typography.css +1 -1
- package/dist/utilities/typography.css.map +1 -1
- package/dist/utilities.css +1 -1
- package/dist/utilities.css.map +1 -1
- package/eslint.config.js +1 -0
- package/index.html +619 -325
- package/package.json +1 -1
- package/scss/component/card.scss +3 -0
- package/scss/component/menu.scss +3 -0
- package/scss/component/navigation.scss +3 -0
- package/scss/layout/flex-columns.scss +3 -0
- package/scss/utilities/order.scss +3 -0
- package/src/js/navigation.js +34 -0
- package/src/scss/_defaults.scss +15 -1
- package/src/scss/base/button/_defaults.scss +8 -3
- package/src/scss/base/button/_index.scss +99 -36
- package/src/scss/base/button/_variables.scss +43 -11
- package/src/scss/base/form/_index.scss +2 -4
- package/src/scss/base/form/_variables.scss +8 -0
- package/src/scss/base/link/_defaults.scss +37 -6
- package/src/scss/base/link/_index.scss +72 -12
- package/src/scss/base/link/_variables.scss +175 -18
- package/src/scss/base/table/_index.scss +2 -4
- package/src/scss/base/table/_variables.scss +8 -0
- package/src/scss/component/_index.scss +3 -0
- package/src/scss/component/card/_defaults.scss +29 -0
- package/src/scss/component/card/_index.scss +143 -0
- package/src/scss/component/card/_variables.scss +185 -0
- package/src/scss/component/menu/_defaults.scss +65 -0
- package/src/scss/component/menu/_index.scss +304 -0
- package/src/scss/component/menu/_variables.scss +491 -0
- package/src/scss/component/navigation/_defaults.scss +29 -0
- package/src/scss/component/navigation/_index.scss +189 -0
- package/src/scss/component/navigation/_variables.scss +237 -0
- package/src/scss/functions/_theme.scss +16 -0
- package/src/scss/layout/_index.scss +1 -0
- package/src/scss/layout/columns/_index.scss +22 -0
- package/src/scss/layout/flex-columns/_defaults.scss +18 -0
- package/src/scss/layout/flex-columns/_index.scss +77 -0
- package/src/scss/layout/flex-columns/_variables.scss +26 -0
- package/src/scss/mixins/_media-queries.scss +8 -0
- package/src/scss/theme/typography/_defaults.scss +1 -1
- package/src/scss/theme/typography/_variables.scss +5 -2
- package/src/scss/utilities/_index.scss +2 -0
- package/src/scss/utilities/order/_defaults.scss +19 -0
- package/src/scss/utilities/order/_index.scss +35 -0
- package/src/scss/utilities/order/_variables.scss +6 -0
- package/src/scss/utilities/ratio/_defaults.scss +24 -0
- package/src/scss/utilities/ratio/_index.scss +26 -0
- package/src/scss/utilities/ratio/_variables.scss +9 -0
- package/src/scss/utilities/spacing/_index.scss +33 -16
|
@@ -14,22 +14,86 @@ $link-text-decoration: var(
|
|
|
14
14
|
--#{root-defaults.$prefix}-link-text-decoration,
|
|
15
15
|
#{defaults.$link-text-decoration}
|
|
16
16
|
);
|
|
17
|
-
$link-text-decoration
|
|
18
|
-
--#{root-defaults.$prefix}-link-text-decoration
|
|
19
|
-
#{
|
|
17
|
+
$link-visited-text-decoration: var(
|
|
18
|
+
--#{root-defaults.$prefix}-link-visited-text-decoration,
|
|
19
|
+
#{defaults.$link-visited-text-decoration}
|
|
20
20
|
);
|
|
21
|
-
$link-
|
|
22
|
-
--#{root-defaults.$prefix}-link-
|
|
23
|
-
#{
|
|
21
|
+
$link-focus-text-decoration: var(
|
|
22
|
+
--#{root-defaults.$prefix}-link-focus-text-decoration,
|
|
23
|
+
#{defaults.$link-focus-text-decoration}
|
|
24
24
|
);
|
|
25
25
|
$link-hover-text-decoration: var(
|
|
26
26
|
--#{root-defaults.$prefix}-link-hover-text-decoration,
|
|
27
27
|
#{defaults.$link-hover-text-decoration}
|
|
28
28
|
);
|
|
29
|
+
$link-active-text-decoration: var(
|
|
30
|
+
--#{root-defaults.$prefix}-link-active-text-decoration,
|
|
31
|
+
#{defaults.$link-active-text-decoration}
|
|
32
|
+
);
|
|
33
|
+
$link-disabled-text-decoration: var(
|
|
34
|
+
--#{root-defaults.$prefix}-link-disabled-text-decoration,
|
|
35
|
+
#{defaults.$link-disabled-text-decoration}
|
|
36
|
+
);
|
|
37
|
+
$link-text-decoration-thickness: var(
|
|
38
|
+
--#{root-defaults.$prefix}-link-text-decoration-thickness,
|
|
39
|
+
#{root-variables.$border-width}
|
|
40
|
+
);
|
|
41
|
+
$link-visited-text-decoration-thickness: var(
|
|
42
|
+
--#{root-defaults.$prefix}-link-visited-text-decoration-thickness,
|
|
43
|
+
#{root-variables.$border-width}
|
|
44
|
+
);
|
|
45
|
+
$link-focus-text-decoration-thickness: var(
|
|
46
|
+
--#{root-defaults.$prefix}-link-focus-text-decoration-thickness,
|
|
47
|
+
#{root-variables.$border-width}
|
|
48
|
+
);
|
|
29
49
|
$link-hover-text-decoration-thickness: var(
|
|
30
50
|
--#{root-defaults.$prefix}-link-hover-text-decoration-thickness,
|
|
31
51
|
#{root-variables.$border-width}
|
|
32
52
|
);
|
|
53
|
+
$link-active-text-decoration-thickness: var(
|
|
54
|
+
--#{root-defaults.$prefix}-link-active-text-decoration-thickness,
|
|
55
|
+
#{root-variables.$border-width}
|
|
56
|
+
);
|
|
57
|
+
$link-disabled-text-decoration-thickness: var(
|
|
58
|
+
--#{root-defaults.$prefix}-link-disabled-text-decoration-thickness,
|
|
59
|
+
#{root-variables.$border-width}
|
|
60
|
+
);
|
|
61
|
+
$link-text-decoration-style: var(
|
|
62
|
+
--#{root-defaults.$prefix}-link-text-decoration-style,
|
|
63
|
+
#{defaults.$link-text-decoration-style}
|
|
64
|
+
);
|
|
65
|
+
$link-visited-text-decoration-style: var(
|
|
66
|
+
--#{root-defaults.$prefix}-link-visited-text-decoration-style,
|
|
67
|
+
#{defaults.$link-visited-text-decoration-style}
|
|
68
|
+
);
|
|
69
|
+
$link-focus-text-decoration-style: var(
|
|
70
|
+
--#{root-defaults.$prefix}-link-focus-text-decoration-style,
|
|
71
|
+
#{defaults.$link-focus-text-decoration-style}
|
|
72
|
+
);
|
|
73
|
+
$link-hover-text-decoration-style: var(
|
|
74
|
+
--#{root-defaults.$prefix}-link-hover-text-decoration-style,
|
|
75
|
+
#{defaults.$link-hover-text-decoration-style}
|
|
76
|
+
);
|
|
77
|
+
$link-active-text-decoration-style: var(
|
|
78
|
+
--#{root-defaults.$prefix}-link-active-text-decoration-style,
|
|
79
|
+
#{defaults.$link-active-text-decoration-style}
|
|
80
|
+
);
|
|
81
|
+
$link-disabled-text-decoration-style: var(
|
|
82
|
+
--#{root-defaults.$prefix}-link-disabled-text-decoration-style,
|
|
83
|
+
#{defaults.$link-disabled-text-decoration-style}
|
|
84
|
+
);
|
|
85
|
+
$link-color: var(
|
|
86
|
+
--#{root-defaults.$prefix}-link-color,
|
|
87
|
+
#{theme.get(primary, 700)}
|
|
88
|
+
);
|
|
89
|
+
$link-visited-color: var(
|
|
90
|
+
--#{root-defaults.$prefix}-link-visited-color,
|
|
91
|
+
#{theme.get(primary, 700)}
|
|
92
|
+
);
|
|
93
|
+
$link-focus-color: var(
|
|
94
|
+
--#{root-defaults.$prefix}-link-focus-color,
|
|
95
|
+
#{theme.get(primary, 700)}
|
|
96
|
+
);
|
|
33
97
|
$link-hover-color: var(
|
|
34
98
|
--#{root-defaults.$prefix}-link-hover-color,
|
|
35
99
|
#{theme.get(tertiary, 700)}
|
|
@@ -38,30 +102,57 @@ $link-active-color: var(
|
|
|
38
102
|
--#{root-defaults.$prefix}-link-active-color,
|
|
39
103
|
#{theme.get(tertiary, 700)}
|
|
40
104
|
);
|
|
41
|
-
$link-visited-color: var(
|
|
42
|
-
--#{root-defaults.$prefix}-link-visited-color,
|
|
43
|
-
#{theme.get(primary, 700)}
|
|
44
|
-
);
|
|
45
105
|
$link-disabled-color: var(
|
|
46
106
|
--#{root-defaults.$prefix}-link-disabled-color,
|
|
47
107
|
#{theme.get(primary, 200)}
|
|
48
108
|
);
|
|
49
|
-
$link-
|
|
109
|
+
$link-text-decoration-color: var(
|
|
110
|
+
--#{root-defaults.$prefix}-link-text-decoration-color,
|
|
111
|
+
#{$link-color}
|
|
112
|
+
);
|
|
113
|
+
$link-visited-text-decoration-color: var(
|
|
114
|
+
--#{root-defaults.$prefix}-link-visited-text-decoration-color,
|
|
115
|
+
#{$link-visited-color}
|
|
116
|
+
);
|
|
117
|
+
$link-focus-text-decoration-color: var(
|
|
118
|
+
--#{root-defaults.$prefix}-link-focus-text-decoration-color,
|
|
119
|
+
#{$link-focus-color}
|
|
120
|
+
);
|
|
121
|
+
$link-hover-text-decoration-color: var(
|
|
122
|
+
--#{root-defaults.$prefix}-link-hover-text-decoration-color,
|
|
123
|
+
#{$link-hover-color}
|
|
124
|
+
);
|
|
125
|
+
$link-active-text-decoration-color: var(
|
|
126
|
+
--#{root-defaults.$prefix}-link-active-text-decoration-color,
|
|
127
|
+
#{$link-active-color}
|
|
128
|
+
);
|
|
129
|
+
$link-disabled-text-decoration-color: var(
|
|
130
|
+
--#{root-defaults.$prefix}-link-disabled-text-decoration-color,
|
|
131
|
+
#{$link-disabled-color}
|
|
132
|
+
);
|
|
133
|
+
$link-background: var(
|
|
134
|
+
--#{root-defaults.$prefix}-link-background,
|
|
135
|
+
#{defaults.$link-background}
|
|
136
|
+
);
|
|
137
|
+
$link-visited-background: var(
|
|
138
|
+
--#{root-defaults.$prefix}-link-visited-background,
|
|
139
|
+
#{defaults.$link-visited-background}
|
|
140
|
+
);
|
|
141
|
+
$link-focus-background: var(
|
|
142
|
+
--#{root-defaults.$prefix}-link-focus-background,
|
|
143
|
+
#{defaults.$link-focus-background}
|
|
144
|
+
);
|
|
50
145
|
$link-hover-background: var(
|
|
51
146
|
--#{root-defaults.$prefix}-link-hover-background,
|
|
52
|
-
|
|
147
|
+
#{defaults.$link-hover-background}
|
|
53
148
|
);
|
|
54
149
|
$link-active-background: var(
|
|
55
150
|
--#{root-defaults.$prefix}-link-active-background,
|
|
56
|
-
|
|
57
|
-
);
|
|
58
|
-
$link-visited-background: var(
|
|
59
|
-
--#{root-defaults.$prefix}-link-visited-background,
|
|
60
|
-
transparent
|
|
151
|
+
#{defaults.$link-active-background}
|
|
61
152
|
);
|
|
62
153
|
$link-disabled-background: var(
|
|
63
154
|
--#{root-defaults.$prefix}-link-disabled-background,
|
|
64
|
-
|
|
155
|
+
#{defaults.$link-disabled-background}
|
|
65
156
|
);
|
|
66
157
|
$link-padding-x: var(
|
|
67
158
|
--#{root-defaults.$prefix}-link-padding-x,
|
|
@@ -90,6 +181,14 @@ $link-transform: var(
|
|
|
90
181
|
--#{root-defaults.$prefix}-link-transform,
|
|
91
182
|
#{defaults.$link-transform}
|
|
92
183
|
);
|
|
184
|
+
$link-visited-transform: var(
|
|
185
|
+
--#{root-defaults.$prefix}-link-visited-transform,
|
|
186
|
+
#{defaults.$link-visited-transform}
|
|
187
|
+
);
|
|
188
|
+
$link-focus-transform: var(
|
|
189
|
+
--#{root-defaults.$prefix}-link-focus-transform,
|
|
190
|
+
#{defaults.$link-focus-transform}
|
|
191
|
+
);
|
|
93
192
|
$link-hover-transform: var(
|
|
94
193
|
--#{root-defaults.$prefix}-link-hover-transform,
|
|
95
194
|
#{defaults.$link-hover-transform}
|
|
@@ -98,3 +197,61 @@ $link-active-transform: var(
|
|
|
98
197
|
--#{root-defaults.$prefix}-link-active-transform,
|
|
99
198
|
#{defaults.$link-active-transform}
|
|
100
199
|
);
|
|
200
|
+
$link-disabled-transform: var(
|
|
201
|
+
--#{root-defaults.$prefix}-link-disabled-transform,
|
|
202
|
+
#{defaults.$link-disabled-transform}
|
|
203
|
+
);
|
|
204
|
+
$link-border-width: var(
|
|
205
|
+
--#{root-defaults.$prefix}-link-border-width,
|
|
206
|
+
#{defaults.$link-border-width}
|
|
207
|
+
);
|
|
208
|
+
$link-border-style: var(
|
|
209
|
+
--#{root-defaults.$prefix}-link-border-style,
|
|
210
|
+
#{root-variables.$border-style}
|
|
211
|
+
);
|
|
212
|
+
$link-border: var(
|
|
213
|
+
--#{root-defaults.$prefix}-link-border,
|
|
214
|
+
#{$link-border-width} #{$link-border-style}
|
|
215
|
+
);
|
|
216
|
+
$link-border-radius: var(
|
|
217
|
+
--#{root-defaults.$prefix}-link-border-radius,
|
|
218
|
+
#{root-variables.$border-radius}
|
|
219
|
+
);
|
|
220
|
+
$link-border-color: var(
|
|
221
|
+
--#{root-defaults.$prefix}-link-border-color,
|
|
222
|
+
#{defaults.$link-border-color}
|
|
223
|
+
);
|
|
224
|
+
$link-visited-border-color: var(
|
|
225
|
+
--#{root-defaults.$prefix}-link-visited-border-color,
|
|
226
|
+
#{defaults.$link-visited-border-color}
|
|
227
|
+
);
|
|
228
|
+
$link-focus-border-color: var(
|
|
229
|
+
--#{root-defaults.$prefix}-link-focus-border-color,
|
|
230
|
+
#{defaults.$link-focus-border-color}
|
|
231
|
+
);
|
|
232
|
+
$link-hover-border-color: var(
|
|
233
|
+
--#{root-defaults.$prefix}-link-hover-border-color,
|
|
234
|
+
#{defaults.$link-hover-border-color}
|
|
235
|
+
);
|
|
236
|
+
$link-active-border-color: var(
|
|
237
|
+
--#{root-defaults.$prefix}-link-active-border-color,
|
|
238
|
+
#{defaults.$link-active-border-color}
|
|
239
|
+
);
|
|
240
|
+
$link-disabled-border-color: var(
|
|
241
|
+
--#{root-defaults.$prefix}-link-disabled-border-color,
|
|
242
|
+
#{defaults.$link-disabled-border-color}
|
|
243
|
+
);
|
|
244
|
+
$link-min-width: var(
|
|
245
|
+
--#{root-defaults.$prefix}-link-min-width,
|
|
246
|
+
defaults.$link-min-width
|
|
247
|
+
);
|
|
248
|
+
$link-min-height: var(
|
|
249
|
+
--#{root-defaults.$prefix}-link-min-height,
|
|
250
|
+
defaults.$link-min-height
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
// Stretched link properties.
|
|
254
|
+
$stretched-link-z-index: var(
|
|
255
|
+
--#{root-defaults.$prefix}-stretched-link-z-index,
|
|
256
|
+
#{defaults.$stretched-link-z-index}
|
|
257
|
+
);
|
|
@@ -29,12 +29,10 @@
|
|
|
29
29
|
|
|
30
30
|
&#{defaults.$table-bordered-selector} {
|
|
31
31
|
border-collapse: collapse;
|
|
32
|
-
border
|
|
33
|
-
border-style: $table-border-style;
|
|
32
|
+
border: $table-border;
|
|
34
33
|
|
|
35
34
|
#{defaults.$table-row-selector} > * {
|
|
36
|
-
border
|
|
37
|
-
border-style: $table-cell-border-style;
|
|
35
|
+
border: $table-cell-border;
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
}
|
|
@@ -77,6 +77,10 @@ $table-border-style: var(
|
|
|
77
77
|
--#{root-defaults.$prefix}-table-border-style,
|
|
78
78
|
#{root-variables.$border-style}
|
|
79
79
|
);
|
|
80
|
+
$table-border: var(
|
|
81
|
+
--#{root-defaults.$prefix}-table-border,
|
|
82
|
+
#{$table-border-width} #{$table-border-style}
|
|
83
|
+
);
|
|
80
84
|
$table-border-color: var(
|
|
81
85
|
--#{root-defaults.$prefix}-table-border-color,
|
|
82
86
|
#{theme.get(primary, 900)}
|
|
@@ -91,6 +95,10 @@ $table-cell-border-style: var(
|
|
|
91
95
|
--#{root-defaults.$prefix}-table-cell-border-style,
|
|
92
96
|
#{$table-border-style}
|
|
93
97
|
);
|
|
98
|
+
$table-cell-border: var(
|
|
99
|
+
--#{root-defaults.$prefix}-table-cell-border,
|
|
100
|
+
#{$table-cell-border-width} #{$table-cell-border-style}
|
|
101
|
+
);
|
|
94
102
|
$table-cell-border-color: var(
|
|
95
103
|
--#{root-defaults.$prefix}-table-cell-border-color,
|
|
96
104
|
#{$table-border-color}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// @graupl/graupl card component default values.
|
|
2
|
+
//
|
|
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.
|
|
8
|
+
|
|
9
|
+
// Card selectors.
|
|
10
|
+
$card-selector: ".card" !default;
|
|
11
|
+
$card-image-selector: ".card-image" !default;
|
|
12
|
+
$card-content-selector: ".card-content" !default;
|
|
13
|
+
$card-body-selector: ".card-body" !default;
|
|
14
|
+
$card-header-selector: ".card-header" !default;
|
|
15
|
+
$card-footer-selector: ".card-footer" !default;
|
|
16
|
+
$card-title-selector: ".card-title" !default;
|
|
17
|
+
$horizontal-card-selector: ".horizontal" !default;
|
|
18
|
+
$horizontal-card-left-selector: ".left" !default;
|
|
19
|
+
$horizontal-card-right-selector: ".right" !default;
|
|
20
|
+
|
|
21
|
+
// Card properties.
|
|
22
|
+
$card-transform: none !default;
|
|
23
|
+
$card-hover-transform: $card-transform !default;
|
|
24
|
+
|
|
25
|
+
// Card layout properties.
|
|
26
|
+
$card-content-ratio: 1fr !default;
|
|
27
|
+
$card-image-ratio: auto !default;
|
|
28
|
+
$horizontal-card-content-ratio: 3fr !default;
|
|
29
|
+
$horizontal-card-image-ratio: 2fr !default;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// @gruapl/graupl card component styles.
|
|
2
|
+
|
|
3
|
+
@use "defaults";
|
|
4
|
+
@use "variables" as *;
|
|
5
|
+
@use "../../defaults" as root-defaults;
|
|
6
|
+
@use "../../mixins/layer" as *;
|
|
7
|
+
@use "../../mixins/media-queries" as *;
|
|
8
|
+
|
|
9
|
+
@include layer(component) {
|
|
10
|
+
#{defaults.$card-selector} {
|
|
11
|
+
display: grid;
|
|
12
|
+
position: relative;
|
|
13
|
+
grid-template-columns: 1fr;
|
|
14
|
+
grid-template-rows:
|
|
15
|
+
[image-start]
|
|
16
|
+
$card-image-ratio
|
|
17
|
+
[image-end content-start]
|
|
18
|
+
$card-content-ratio
|
|
19
|
+
[content-end];
|
|
20
|
+
padding: $card-padding;
|
|
21
|
+
transform: $card-transform;
|
|
22
|
+
transition: $card-transition;
|
|
23
|
+
border: $card-border;
|
|
24
|
+
border-radius: $card-border-radius;
|
|
25
|
+
gap: $card-gap;
|
|
26
|
+
isolation: isolate;
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
--#{root-defaults.$prefix}-card-transform: #{$card-hover-transform};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&#{defaults.$horizontal-card-selector} {
|
|
33
|
+
&,
|
|
34
|
+
&#{defaults.$horizontal-card-left-selector} {
|
|
35
|
+
--#{root-defaults.$prefix}-card-content-ratio: #{$horizontal-card-content-ratio};
|
|
36
|
+
--#{root-defaults.$prefix}-card-image-ratio: #{$horizontal-card-image-ratio};
|
|
37
|
+
|
|
38
|
+
grid-template-columns:
|
|
39
|
+
[image-start]
|
|
40
|
+
$card-image-ratio
|
|
41
|
+
[image-end content-start]
|
|
42
|
+
$card-content-ratio
|
|
43
|
+
[content-end];
|
|
44
|
+
grid-template-rows: 1fr;
|
|
45
|
+
|
|
46
|
+
#{defaults.$card-image-selector} img {
|
|
47
|
+
border-radius: calc($card-top-left-border-radius - $card-border-width)
|
|
48
|
+
0 0 calc($card-bottom-left-border-radius - $card-border-width);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&#{defaults.$horizontal-card-right-selector} {
|
|
53
|
+
grid-template-columns:
|
|
54
|
+
[content-start]
|
|
55
|
+
$card-content-ratio
|
|
56
|
+
[content-end image-start]
|
|
57
|
+
$card-image-ratio
|
|
58
|
+
[image-end];
|
|
59
|
+
|
|
60
|
+
#{defaults.$card-image-selector} img {
|
|
61
|
+
border-radius: 0
|
|
62
|
+
calc($card-top-right-border-radius - $card-border-width)
|
|
63
|
+
calc($card-bottom-right-border-radius - $card-border-width) 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
#{defaults.$card-image-selector} {
|
|
70
|
+
grid-area: image;
|
|
71
|
+
padding: $card-image-padding;
|
|
72
|
+
|
|
73
|
+
img {
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 100%;
|
|
76
|
+
border-radius: calc($card-top-left-border-radius - $card-border-width)
|
|
77
|
+
calc($card-top-right-border-radius - $card-border-width) 0 0;
|
|
78
|
+
object-fit: cover;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
#{defaults.$card-content-selector} {
|
|
83
|
+
display: flex;
|
|
84
|
+
grid-area: content;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
padding: $card-content-padding;
|
|
87
|
+
gap: $card-content-gap;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
#{defaults.$card-body-selector} {
|
|
91
|
+
flex: 1 0 auto;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
#{defaults.$card-footer-selector} {
|
|
95
|
+
flex: 0 0 auto;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
#{defaults.$card-title-selector} {
|
|
99
|
+
flex: 0 0 auto;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@include screen-trigger(force-vertical-card) {
|
|
103
|
+
#{defaults.$card-selector} {
|
|
104
|
+
&#{defaults.$horizontal-card-selector} {
|
|
105
|
+
&,
|
|
106
|
+
&#{defaults.$horizontal-card-left-selector},
|
|
107
|
+
&#{defaults.$horizontal-card-right-selector} {
|
|
108
|
+
--#{root-defaults.$prefix}-horizontal-card-image-ratio: #{defaults.$card-image-ratio};
|
|
109
|
+
--#{root-defaults.$prefix}-horizontal-card-content-ratio: #{defaults.$card-content-ratio};
|
|
110
|
+
|
|
111
|
+
grid-template-columns: 1fr;
|
|
112
|
+
grid-template-rows:
|
|
113
|
+
[image-start]
|
|
114
|
+
$card-image-ratio
|
|
115
|
+
[image-end content-start]
|
|
116
|
+
$card-content-ratio
|
|
117
|
+
[content-end];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@include animation-off {
|
|
124
|
+
#{defaults.$card-selector} {
|
|
125
|
+
--#{root-defaults.$prefix}-card-transition: #{$card-transition-reduced-motion};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@include layer(theme) {
|
|
131
|
+
#{defaults.$card-selector} {
|
|
132
|
+
border-color: $card-border-color;
|
|
133
|
+
background: $card-background;
|
|
134
|
+
color: $card-color;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
#{defaults.$card-title-selector} {
|
|
138
|
+
color: $card-title-color;
|
|
139
|
+
font-size: $card-title-font-size;
|
|
140
|
+
font-weight: $card-title-font-weight;
|
|
141
|
+
line-height: $card-title-line-height;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
// @graupl/graupl card component variables.
|
|
2
|
+
//
|
|
3
|
+
// These values are to be used to directly style components and provide a
|
|
4
|
+
// cleaner way to reference custom properties.
|
|
5
|
+
|
|
6
|
+
@use "defaults";
|
|
7
|
+
@use "../../defaults" as root-defaults;
|
|
8
|
+
@use "../../variables" as root-variables;
|
|
9
|
+
@use "../../theme/color/variables" as color;
|
|
10
|
+
@use "../../theme/typography/variables" as typography;
|
|
11
|
+
@use "sass:map";
|
|
12
|
+
|
|
13
|
+
// Card properties.
|
|
14
|
+
$card-padding-x: var(
|
|
15
|
+
--#{root-defaults.$prefix}-card-padding-x,
|
|
16
|
+
#{map.get(root-variables.$spacers, 0)}
|
|
17
|
+
);
|
|
18
|
+
$card-padding-y: var(
|
|
19
|
+
--#{root-defaults.$prefix}-card-padding-y,
|
|
20
|
+
#{map.get(root-variables.$spacers, 0)}
|
|
21
|
+
);
|
|
22
|
+
$card-padding: var(
|
|
23
|
+
--#{root-defaults.$prefix}-card-padding,
|
|
24
|
+
#{$card-padding-y} #{$card-padding-x}
|
|
25
|
+
);
|
|
26
|
+
$card-transition: var(
|
|
27
|
+
--#{root-defaults.$prefix}-card-transition,
|
|
28
|
+
transform #{map.get(root-variables.$transition-durations, fast)} #{root-variables.$transition-timing-function}
|
|
29
|
+
);
|
|
30
|
+
$card-transition-reduced-motion: var(
|
|
31
|
+
--#{root-defaults.$prefix}-card-transition-reduced-motion,
|
|
32
|
+
none
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
// Card transform properties.
|
|
36
|
+
$card-transform: var(
|
|
37
|
+
--#{root-defaults.$prefix}-card-transform,
|
|
38
|
+
#{defaults.$card-transform}
|
|
39
|
+
);
|
|
40
|
+
$card-hover-transform: var(
|
|
41
|
+
--#{root-defaults.$prefix}-card-hover-transform,
|
|
42
|
+
#{defaults.$card-hover-transform}
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// Card gap properties.
|
|
46
|
+
$card-column-gap: var(
|
|
47
|
+
--#{root-defaults.$prefix}-card-column-gap,
|
|
48
|
+
#{map.get(root-variables.$spacers, 0)}
|
|
49
|
+
);
|
|
50
|
+
$card-row-gap: var(
|
|
51
|
+
--#{root-defaults.$prefix}-card-row-gap,
|
|
52
|
+
#{map.get(root-variables.$spacers, 0)}
|
|
53
|
+
);
|
|
54
|
+
$card-gap: var(
|
|
55
|
+
--#{root-defaults.$prefix}-card-gap,
|
|
56
|
+
#{$card-column-gap} #{$card-row-gap}
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
// Card color properties.
|
|
60
|
+
$card-background: var(
|
|
61
|
+
--#{root-defaults.$prefix}-card-background,
|
|
62
|
+
#{color.$root-background}
|
|
63
|
+
);
|
|
64
|
+
$card-color: var(--#{root-defaults.$prefix}-card-color, #{color.$root-color});
|
|
65
|
+
|
|
66
|
+
// Card border-properties.
|
|
67
|
+
$card-border-color: var(
|
|
68
|
+
--#{root-defaults.$prefix}-card-border-color,
|
|
69
|
+
#{$card-color}
|
|
70
|
+
);
|
|
71
|
+
$card-top-left-border-radius: var(
|
|
72
|
+
--#{root-defaults.$prefix}-card-top-left-border-radius,
|
|
73
|
+
#{root-variables.$border-radius}
|
|
74
|
+
);
|
|
75
|
+
$card-top-right-border-radius: var(
|
|
76
|
+
--#{root-defaults.$prefix}-card-top-right-border-radius,
|
|
77
|
+
#{root-variables.$border-radius}
|
|
78
|
+
);
|
|
79
|
+
$card-bottom-left-border-radius: var(
|
|
80
|
+
--#{root-defaults.$prefix}-card-bottom-left-border-radius,
|
|
81
|
+
#{root-variables.$border-radius}
|
|
82
|
+
);
|
|
83
|
+
$card-bottom-right-border-radius: var(
|
|
84
|
+
--#{root-defaults.$prefix}-card-bottom-right-border-radius,
|
|
85
|
+
#{root-variables.$border-radius}
|
|
86
|
+
);
|
|
87
|
+
$card-border-radius: var(
|
|
88
|
+
--#{root-defaults.$prefix}-card-border-radius,
|
|
89
|
+
#{$card-top-left-border-radius} #{$card-top-right-border-radius} #{$card-bottom-right-border-radius}
|
|
90
|
+
#{$card-bottom-left-border-radius}
|
|
91
|
+
);
|
|
92
|
+
$card-border-style: var(
|
|
93
|
+
--#{root-defaults.$prefix}-card-border-style,
|
|
94
|
+
#{root-variables.$border-style}
|
|
95
|
+
);
|
|
96
|
+
$card-border-width: var(
|
|
97
|
+
--#{root-defaults.$prefix}-card-border-width,
|
|
98
|
+
#{root-variables.$border-width}
|
|
99
|
+
);
|
|
100
|
+
$card-border: var(
|
|
101
|
+
--#{root-defaults.$prefix}-card-border,
|
|
102
|
+
#{$card-border-width} #{$card-border-style}
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
// Card layout properties.
|
|
106
|
+
$card-content-ratio: var(
|
|
107
|
+
--#{root-defaults.$prefix}-card-content-ratio,
|
|
108
|
+
defaults.$card-content-ratio
|
|
109
|
+
);
|
|
110
|
+
$card-image-ratio: var(
|
|
111
|
+
--#{root-defaults.$prefix}-card-image-ratio,
|
|
112
|
+
defaults.$card-image-ratio
|
|
113
|
+
);
|
|
114
|
+
$horizontal-card-content-ratio: var(
|
|
115
|
+
--#{root-defaults.$prefix}-horizontal-card-content-ratio,
|
|
116
|
+
defaults.$horizontal-card-content-ratio
|
|
117
|
+
);
|
|
118
|
+
$horizontal-card-image-ratio: var(
|
|
119
|
+
--#{root-defaults.$prefix}-horizontal-card-image-ratio,
|
|
120
|
+
defaults.$horizontal-card-image-ratio
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
// Card image properties.
|
|
124
|
+
$card-image-padding-x: var(
|
|
125
|
+
--#{root-defaults.$prefix}-card-image-padding-x,
|
|
126
|
+
#{map.get(root-variables.$spacers, 0)}
|
|
127
|
+
);
|
|
128
|
+
$card-image-padding-y: var(
|
|
129
|
+
--#{root-defaults.$prefix}-card-image-padding-y,
|
|
130
|
+
#{map.get(root-variables.$spacers, 0)}
|
|
131
|
+
);
|
|
132
|
+
$card-image-padding: var(
|
|
133
|
+
--#{root-defaults.$prefix}-card-image-padding,
|
|
134
|
+
#{$card-image-padding-y} #{$card-image-padding-x}
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
// Card content properties.
|
|
138
|
+
$card-content-padding-x: var(
|
|
139
|
+
--#{root-defaults.$prefix}-card-content-padding-x,
|
|
140
|
+
#{map.get(root-variables.$spacers, 5)}
|
|
141
|
+
);
|
|
142
|
+
$card-content-padding-y: var(
|
|
143
|
+
--#{root-defaults.$prefix}-card-content-padding-y,
|
|
144
|
+
#{map.get(root-variables.$spacers, 3)}
|
|
145
|
+
);
|
|
146
|
+
$card-content-padding: var(
|
|
147
|
+
--#{root-defaults.$prefix}-card-content-padding,
|
|
148
|
+
#{$card-content-padding-y} #{$card-content-padding-x}
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
// Card content gap properties.
|
|
152
|
+
$card-content-column-gap: var(
|
|
153
|
+
--#{root-defaults.$prefix}-card-content-column-gap,
|
|
154
|
+
#{map.get(root-variables.$spacers, 0)}
|
|
155
|
+
);
|
|
156
|
+
$card-content-row-gap: var(
|
|
157
|
+
--#{root-defaults.$prefix}-card-content-row-gap,
|
|
158
|
+
#{map.get(root-variables.$spacers, 3)}
|
|
159
|
+
);
|
|
160
|
+
$card-content-gap: var(
|
|
161
|
+
--#{root-defaults.$prefix}-card-content-gap,
|
|
162
|
+
#{$card-content-column-gap} #{$card-content-row-gap}
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
// Card title properties.
|
|
166
|
+
$card-title-color: var(
|
|
167
|
+
--#{root-defaults.$prefix}-card-title-color,
|
|
168
|
+
#{$card-color}
|
|
169
|
+
);
|
|
170
|
+
$card-title-font-size: var(
|
|
171
|
+
--#{root-defaults.$prefix}-card-title-font-size,
|
|
172
|
+
#{typography.$h4-font-size}
|
|
173
|
+
);
|
|
174
|
+
$card-title-font-weight: var(
|
|
175
|
+
--#{root-defaults.$prefix}-card-title-font-weight,
|
|
176
|
+
#{typography.$h4-font-weight}
|
|
177
|
+
);
|
|
178
|
+
$card-title-font-family: var(
|
|
179
|
+
--#{root-defaults.$prefix}-card-title-font-family,
|
|
180
|
+
#{typography.$h4-font-family}
|
|
181
|
+
);
|
|
182
|
+
$card-title-line-height: var(
|
|
183
|
+
--#{root-defaults.$prefix}-card-title-line-height,
|
|
184
|
+
#{typography.$h4-line-height}
|
|
185
|
+
);
|