@expressivecss/expressive 0.1.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/LICENSE +21 -0
- package/README.md +82 -0
- package/dist/css/expressive.css +9914 -0
- package/dist/css/expressive.min.css +1 -0
- package/dist/js/components/autocomplete.d.ts +152 -0
- package/dist/js/components/buttons.d.ts +66 -0
- package/dist/js/components/cards.d.ts +50 -0
- package/dist/js/components/carousel.d.ts +131 -0
- package/dist/js/components/chips.d.ts +135 -0
- package/dist/js/components/collapsible.d.ts +74 -0
- package/dist/js/components/datepicker.d.ts +336 -0
- package/dist/js/components/dropdown.d.ts +148 -0
- package/dist/js/components/index.d.ts +21 -0
- package/dist/js/components/materialbox.d.ts +97 -0
- package/dist/js/components/modal.d.ts +45 -0
- package/dist/js/components/parallax.d.ts +40 -0
- package/dist/js/components/pushpin.d.ts +51 -0
- package/dist/js/components/scrollspy.d.ts +80 -0
- package/dist/js/components/sidenav.d.ts +125 -0
- package/dist/js/components/slider.d.ts +101 -0
- package/dist/js/components/tabs.d.ts +80 -0
- package/dist/js/components/tap-target.d.ts +58 -0
- package/dist/js/components/timepicker.d.ts +207 -0
- package/dist/js/components/toast.d.ts +93 -0
- package/dist/js/components/tooltip.d.ts +117 -0
- package/dist/js/components/waves.d.ts +15 -0
- package/dist/js/expressive.js +8239 -0
- package/dist/js/expressive.js.map +1 -0
- package/dist/js/expressive.min.js +2 -0
- package/dist/js/expressive.min.js.map +1 -0
- package/dist/js/expressive.mjs +8206 -0
- package/dist/js/expressive.mjs.map +1 -0
- package/dist/js/forms/character-counter.d.ts +36 -0
- package/dist/js/forms/forms.d.ts +17 -0
- package/dist/js/forms/index.d.ts +4 -0
- package/dist/js/forms/range.d.ts +40 -0
- package/dist/js/forms/select.d.ts +77 -0
- package/dist/js/foundation/component.d.ts +73 -0
- package/dist/js/foundation/index.d.ts +2 -0
- package/dist/js/foundation/utils.d.ts +122 -0
- package/dist/js/index.d.ts +52 -0
- package/dist/js/plugins/docked-display.d.ts +34 -0
- package/dist/js/plugins/index.d.ts +1 -0
- package/package.json +71 -0
- package/src/scss/components/_appbar.scss +454 -0
- package/src/scss/components/_badges.scss +77 -0
- package/src/scss/components/_breadcrumb.scss +27 -0
- package/src/scss/components/_buttons.scss +412 -0
- package/src/scss/components/_cards.scss +267 -0
- package/src/scss/components/_carousel.scss +93 -0
- package/src/scss/components/_chips.scss +147 -0
- package/src/scss/components/_collapsible.scss +84 -0
- package/src/scss/components/_collection.scss +114 -0
- package/src/scss/components/_date-picker.scss +268 -0
- package/src/scss/components/_dropdown.scss +98 -0
- package/src/scss/components/_index.scss +28 -0
- package/src/scss/components/_material-box.scss +42 -0
- package/src/scss/components/_material-icons.scss +6 -0
- package/src/scss/components/_modal.scss +84 -0
- package/src/scss/components/_pagination.scss +45 -0
- package/src/scss/components/_parallax.scss +26 -0
- package/src/scss/components/_preloader.scss +422 -0
- package/src/scss/components/_pulse.scss +35 -0
- package/src/scss/components/_sidenav.scss +229 -0
- package/src/scss/components/_slider.scss +119 -0
- package/src/scss/components/_table-of-contents.scss +32 -0
- package/src/scss/components/_tabs.scss +176 -0
- package/src/scss/components/_tap-target.scss +102 -0
- package/src/scss/components/_time-picker.scss +294 -0
- package/src/scss/components/_toast.scss +70 -0
- package/src/scss/components/_tooltip.scss +49 -0
- package/src/scss/components/_transitions.scss +19 -0
- package/src/scss/components/_video.scss +15 -0
- package/src/scss/expressive.scss +7 -0
- package/src/scss/forms/_checkboxes.scss +199 -0
- package/src/scss/forms/_file-input.scss +41 -0
- package/src/scss/forms/_index.scss +17 -0
- package/src/scss/forms/_input-fields.scss +360 -0
- package/src/scss/forms/_radio-buttons.scss +114 -0
- package/src/scss/forms/_range.scss +148 -0
- package/src/scss/forms/_select.scss +108 -0
- package/src/scss/forms/_switches.scss +127 -0
- package/src/scss/foundation/_base.scss +71 -0
- package/src/scss/foundation/_color-palette.scss +402 -0
- package/src/scss/foundation/_index.scss +10 -0
- package/src/scss/foundation/_mixins.scss +198 -0
- package/src/scss/foundation/_motion.scss +70 -0
- package/src/scss/foundation/_normalize.scss +349 -0
- package/src/scss/foundation/_shape.scss +30 -0
- package/src/scss/foundation/_state-layers.scss +68 -0
- package/src/scss/foundation/_theme.scss +238 -0
- package/src/scss/foundation/_tokens.scss +511 -0
- package/src/scss/foundation/_variables.scss +57 -0
- package/src/scss/layout/_footer.scss +26 -0
- package/src/scss/layout/_grid.scss +172 -0
- package/src/scss/layout/_index.scss +3 -0
- package/src/scss/layout/_table.scss +119 -0
- package/src/scss/utilities/_a11y.scss +77 -0
- package/src/scss/utilities/_colors.scss +74 -0
- package/src/scss/utilities/_elevation.scss +63 -0
- package/src/scss/utilities/_helpers.scss +50 -0
- package/src/scss/utilities/_index.scss +7 -0
- package/src/scss/utilities/_responsive.scss +62 -0
- package/src/scss/utilities/_spacing.scss +38 -0
- package/src/scss/utilities/_typography.scss +115 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
@use '../foundation/mixins' as *;
|
|
2
|
+
@use '../foundation/variables' as *;
|
|
3
|
+
@use '../utilities/elevation' as *;
|
|
4
|
+
|
|
5
|
+
// ===== Component Tokens =====
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--btn-height: 40px;
|
|
9
|
+
--btn-font-size-icon: 18px;
|
|
10
|
+
--btn-padding: 24px;
|
|
11
|
+
--btn-padding-icon: 16px;
|
|
12
|
+
--btn-gap-icon: 8px;
|
|
13
|
+
--btn-border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
14
|
+
--btn-font-size: 14px;
|
|
15
|
+
|
|
16
|
+
// FAB component tokens
|
|
17
|
+
--md-fab-container-height: 56px;
|
|
18
|
+
--md-fab-container-width: 56px;
|
|
19
|
+
--md-fab-container-shape: var(--md-sys-shape-corner-large, 16px);
|
|
20
|
+
--md-fab-container-color: var(--md-sys-color-primary-container);
|
|
21
|
+
--md-fab-icon-color: var(--md-sys-color-on-primary-container);
|
|
22
|
+
--md-fab-icon-size: 24px;
|
|
23
|
+
--md-fab-small-container-height: 40px;
|
|
24
|
+
--md-fab-small-container-width: 40px;
|
|
25
|
+
--md-fab-small-container-shape: var(--md-sys-shape-corner-medium, 12px);
|
|
26
|
+
--md-fab-large-container-height: 96px;
|
|
27
|
+
--md-fab-large-container-width: 96px;
|
|
28
|
+
--md-fab-large-container-shape: var(--md-sys-shape-corner-extra-large, 28px);
|
|
29
|
+
--md-fab-large-icon-size: 36px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ===== M3 Expressive Button Classes =====
|
|
33
|
+
|
|
34
|
+
// Base for all button types
|
|
35
|
+
.filled-button,
|
|
36
|
+
.filled-tonal-button,
|
|
37
|
+
.elevated-button,
|
|
38
|
+
.outlined-button,
|
|
39
|
+
.text-button,
|
|
40
|
+
.btn, .btn-floating, .btn-large, .btn-small, .btn-flat {
|
|
41
|
+
@include btn(
|
|
42
|
+
var(--btn-height),
|
|
43
|
+
var(--btn-border-radius),
|
|
44
|
+
var(--btn-padding),
|
|
45
|
+
var(--btn-padding),
|
|
46
|
+
var(--btn-font-size)
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// ===== Filled Button =====
|
|
51
|
+
|
|
52
|
+
.filled-button {
|
|
53
|
+
@include btn-filled;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// ===== Filled Tonal Button =====
|
|
57
|
+
|
|
58
|
+
.filled-tonal-button {
|
|
59
|
+
@include btn-tonal;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// ===== Elevated Button =====
|
|
63
|
+
|
|
64
|
+
.elevated-button {
|
|
65
|
+
@include btn-elevated;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ===== Outlined Button =====
|
|
69
|
+
|
|
70
|
+
.outlined-button {
|
|
71
|
+
@include btn-outlined;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// ===== Text Button =====
|
|
75
|
+
|
|
76
|
+
.text-button {
|
|
77
|
+
@include btn-flat;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// ===== Icon positioning (shared across button types) =====
|
|
81
|
+
|
|
82
|
+
.filled-button,
|
|
83
|
+
.filled-tonal-button,
|
|
84
|
+
.elevated-button,
|
|
85
|
+
.outlined-button,
|
|
86
|
+
.text-button,
|
|
87
|
+
.btn {
|
|
88
|
+
&.icon-left, &.icon-right {
|
|
89
|
+
position: relative;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.icon-left {
|
|
93
|
+
padding-left: calc(var(--btn-padding-icon) + var(--btn-font-size-icon) + var(--btn-gap-icon));
|
|
94
|
+
|
|
95
|
+
i {
|
|
96
|
+
left: var(--btn-padding-icon);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&.icon-right {
|
|
101
|
+
padding-right: calc(var(--btn-padding-icon) + var(--btn-font-size-icon) + var(--btn-gap-icon));
|
|
102
|
+
|
|
103
|
+
i {
|
|
104
|
+
right: var(--btn-padding-icon);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&.icon-left i, &.icon-right i {
|
|
109
|
+
position: absolute;
|
|
110
|
+
font-size: var(--btn-font-size-icon);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// ===== Deprecated .btn variants (aliases) =====
|
|
115
|
+
|
|
116
|
+
.btn {
|
|
117
|
+
&.filled {
|
|
118
|
+
@include btn-filled;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&.tonal {
|
|
122
|
+
@include btn-tonal;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&.elevated {
|
|
126
|
+
@include btn-elevated;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&.outlined {
|
|
130
|
+
@include btn-outlined;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&.text {
|
|
134
|
+
@include btn-flat;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&.rounded {
|
|
138
|
+
border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.btn-flat {
|
|
143
|
+
@include btn-flat;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// ===== Disabled =====
|
|
147
|
+
|
|
148
|
+
.filled-button,
|
|
149
|
+
.filled-tonal-button,
|
|
150
|
+
.elevated-button,
|
|
151
|
+
.outlined-button,
|
|
152
|
+
.text-button,
|
|
153
|
+
.btn, .btn-floating, .btn-large, .btn-small, .btn-flat {
|
|
154
|
+
&.disabled, &:disabled, &[disabled] {
|
|
155
|
+
@include btn-disabled();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// ===== FAB (Floating Action Button) =====
|
|
160
|
+
|
|
161
|
+
.fab,
|
|
162
|
+
.btn-floating {
|
|
163
|
+
width: var(--md-fab-container-width);
|
|
164
|
+
height: var(--md-fab-container-height);
|
|
165
|
+
color: var(--md-fab-icon-color);
|
|
166
|
+
background-color: var(--md-fab-container-color);
|
|
167
|
+
border-radius: var(--md-fab-container-shape);
|
|
168
|
+
padding: 0;
|
|
169
|
+
display: grid;
|
|
170
|
+
place-items: center;
|
|
171
|
+
position: relative;
|
|
172
|
+
overflow: hidden;
|
|
173
|
+
z-index: 1;
|
|
174
|
+
@extend .elevation-3;
|
|
175
|
+
transition: background-color var(--md-sys-motion-duration-short4, 200ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
176
|
+
box-shadow var(--md-sys-motion-duration-short4, 200ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
vertical-align: middle;
|
|
179
|
+
border: none;
|
|
180
|
+
|
|
181
|
+
&:hover {
|
|
182
|
+
@extend .elevation-4;
|
|
183
|
+
background-color: color-mix(in srgb, var(--md-fab-container-color), var(--md-fab-icon-color) 8%);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&:focus {
|
|
187
|
+
@extend .elevation-3;
|
|
188
|
+
background-color: color-mix(in srgb, var(--md-fab-container-color), var(--md-fab-icon-color) 10%);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:active {
|
|
192
|
+
@extend .elevation-3;
|
|
193
|
+
background-color: color-mix(in srgb, var(--md-fab-container-color), var(--md-fab-icon-color) 10%);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@include focus-visible();
|
|
197
|
+
|
|
198
|
+
// Small FAB
|
|
199
|
+
&.fab-small,
|
|
200
|
+
&.btn-small {
|
|
201
|
+
width: var(--md-fab-small-container-width);
|
|
202
|
+
height: var(--md-fab-small-container-height);
|
|
203
|
+
border-radius: var(--md-fab-small-container-shape);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Large FAB
|
|
207
|
+
&.fab-large,
|
|
208
|
+
&.btn-large {
|
|
209
|
+
width: var(--md-fab-large-container-width);
|
|
210
|
+
height: var(--md-fab-large-container-height);
|
|
211
|
+
border-radius: var(--md-fab-large-container-shape);
|
|
212
|
+
padding: 0;
|
|
213
|
+
|
|
214
|
+
i {
|
|
215
|
+
font-size: var(--md-fab-large-icon-size);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&.halfway-fab {
|
|
219
|
+
bottom: calc(var(--md-fab-large-container-height) * -0.5);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
&.halfway-fab {
|
|
224
|
+
position: absolute;
|
|
225
|
+
right: 24px;
|
|
226
|
+
bottom: calc(var(--md-fab-container-height) * -0.5);
|
|
227
|
+
|
|
228
|
+
&.left {
|
|
229
|
+
right: auto;
|
|
230
|
+
left: 24px;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
i {
|
|
235
|
+
font-size: var(--md-fab-icon-size);
|
|
236
|
+
width: inherit;
|
|
237
|
+
display: inline-block;
|
|
238
|
+
text-align: center;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// ===== Fixed FAB =====
|
|
243
|
+
|
|
244
|
+
.fab-fixed,
|
|
245
|
+
.fixed-action-btn {
|
|
246
|
+
position: fixed;
|
|
247
|
+
right: 23px;
|
|
248
|
+
bottom: 23px;
|
|
249
|
+
padding-top: 15px;
|
|
250
|
+
margin-bottom: 0;
|
|
251
|
+
z-index: 997;
|
|
252
|
+
|
|
253
|
+
&.active {
|
|
254
|
+
ul {
|
|
255
|
+
visibility: visible;
|
|
256
|
+
padding-left: 0;
|
|
257
|
+
list-style-type: none;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
&.direction-left,
|
|
262
|
+
&.direction-right {
|
|
263
|
+
padding: 0 0 0 15px;
|
|
264
|
+
|
|
265
|
+
ul {
|
|
266
|
+
text-align: right;
|
|
267
|
+
right: 64px;
|
|
268
|
+
top: 50%;
|
|
269
|
+
transform: translateY(-50%);
|
|
270
|
+
height: 100%;
|
|
271
|
+
left: auto;
|
|
272
|
+
width: 500px;
|
|
273
|
+
|
|
274
|
+
li {
|
|
275
|
+
display: inline-block;
|
|
276
|
+
margin: 7.5px 15px 0 0;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
&.direction-right {
|
|
282
|
+
padding: 0 15px 0 0;
|
|
283
|
+
|
|
284
|
+
ul {
|
|
285
|
+
text-align: left;
|
|
286
|
+
direction: rtl;
|
|
287
|
+
left: 64px;
|
|
288
|
+
right: auto;
|
|
289
|
+
|
|
290
|
+
li {
|
|
291
|
+
margin: 7.5px 0 0 15px;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
&.direction-bottom {
|
|
297
|
+
padding: 0 0 15px 0;
|
|
298
|
+
|
|
299
|
+
ul {
|
|
300
|
+
top: 64px;
|
|
301
|
+
bottom: auto;
|
|
302
|
+
display: flex;
|
|
303
|
+
flex-direction: column-reverse;
|
|
304
|
+
|
|
305
|
+
li {
|
|
306
|
+
margin: 15px 0 0 0;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&.toolbar {
|
|
312
|
+
padding: 0;
|
|
313
|
+
height: 56px;
|
|
314
|
+
|
|
315
|
+
&.active {
|
|
316
|
+
& > a i {
|
|
317
|
+
opacity: 0;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
ul {
|
|
322
|
+
display: flex;
|
|
323
|
+
top: 0;
|
|
324
|
+
bottom: 0;
|
|
325
|
+
z-index: 1;
|
|
326
|
+
|
|
327
|
+
li {
|
|
328
|
+
flex: 1;
|
|
329
|
+
display: inline-block;
|
|
330
|
+
margin: 0;
|
|
331
|
+
height: 100%;
|
|
332
|
+
transition: none;
|
|
333
|
+
|
|
334
|
+
a {
|
|
335
|
+
display: block;
|
|
336
|
+
overflow: hidden;
|
|
337
|
+
position: relative;
|
|
338
|
+
width: 100%;
|
|
339
|
+
height: 100%;
|
|
340
|
+
background-color: transparent;
|
|
341
|
+
box-shadow: none;
|
|
342
|
+
color: var(--md-fab-icon-color);
|
|
343
|
+
line-height: 56px;
|
|
344
|
+
z-index: 1;
|
|
345
|
+
|
|
346
|
+
i {
|
|
347
|
+
line-height: inherit;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
ul {
|
|
355
|
+
left: 0;
|
|
356
|
+
right: 0;
|
|
357
|
+
text-align: center;
|
|
358
|
+
position: absolute;
|
|
359
|
+
bottom: 64px;
|
|
360
|
+
margin: 0;
|
|
361
|
+
visibility: hidden;
|
|
362
|
+
|
|
363
|
+
li {
|
|
364
|
+
margin-bottom: 15px;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
a.btn-floating,
|
|
368
|
+
a.fab {
|
|
369
|
+
opacity: 0;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.fab-backdrop {
|
|
374
|
+
position: absolute;
|
|
375
|
+
top: 0;
|
|
376
|
+
left: 0;
|
|
377
|
+
z-index: -1;
|
|
378
|
+
width: var(--md-fab-container-width);
|
|
379
|
+
height: var(--md-fab-container-height);
|
|
380
|
+
background-color: var(--md-fab-container-color);
|
|
381
|
+
border-radius: var(--md-fab-container-shape);
|
|
382
|
+
transform: scale(0);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// ===== Helper Classes =====
|
|
387
|
+
|
|
388
|
+
.btn-large {
|
|
389
|
+
@extend .btn;
|
|
390
|
+
height: calc(1.5 * var(--btn-height));
|
|
391
|
+
font-size: 18px;
|
|
392
|
+
padding: 0 28px;
|
|
393
|
+
|
|
394
|
+
i {
|
|
395
|
+
font-size: 1.6rem;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.btn-small {
|
|
400
|
+
@extend .btn;
|
|
401
|
+
height: calc(0.75 * var(--btn-height));
|
|
402
|
+
font-size: 13px;
|
|
403
|
+
|
|
404
|
+
i {
|
|
405
|
+
font-size: 1.2rem;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.btn-block {
|
|
410
|
+
display: block;
|
|
411
|
+
width: 100%;
|
|
412
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
@use '../foundation/variables' as *;
|
|
2
|
+
@use '../foundation/mixins' as *;
|
|
3
|
+
@use '../utilities/elevation' as *;
|
|
4
|
+
|
|
5
|
+
// ===== Card Component Tokens =====
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--md-card-container-shape: var(--md-sys-shape-corner-medium, 12px);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// ===== Shared Card Base =====
|
|
12
|
+
|
|
13
|
+
%card-base {
|
|
14
|
+
position: relative;
|
|
15
|
+
transition: box-shadow var(--md-sys-motion-duration-medium1, 250ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
16
|
+
border-radius: var(--md-card-container-shape);
|
|
17
|
+
|
|
18
|
+
.card-title {
|
|
19
|
+
font-size: 24px;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Card Sizes
|
|
24
|
+
&.small, &.medium, &.large {
|
|
25
|
+
position: relative;
|
|
26
|
+
|
|
27
|
+
.card-image {
|
|
28
|
+
max-height: 60%;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.card-image + .card-content {
|
|
33
|
+
max-height: 40%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.card-content {
|
|
37
|
+
max-height: 100%;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.card-action {
|
|
42
|
+
position: absolute;
|
|
43
|
+
bottom: 0;
|
|
44
|
+
left: 0;
|
|
45
|
+
right: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.small {
|
|
50
|
+
height: 300px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.medium {
|
|
54
|
+
height: 400px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.large {
|
|
58
|
+
height: 500px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Horizontal Cards
|
|
62
|
+
&.horizontal {
|
|
63
|
+
display: flex;
|
|
64
|
+
|
|
65
|
+
&.small, &.medium, &.large {
|
|
66
|
+
.card-image {
|
|
67
|
+
height: 100%;
|
|
68
|
+
max-height: none;
|
|
69
|
+
overflow: visible;
|
|
70
|
+
|
|
71
|
+
img {
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.card-image {
|
|
78
|
+
max-width: 50%;
|
|
79
|
+
|
|
80
|
+
img {
|
|
81
|
+
border-radius: var(--md-card-container-shape) 0 0 var(--md-card-container-shape);
|
|
82
|
+
max-width: 100%;
|
|
83
|
+
width: auto;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.card-stacked {
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
flex: 1;
|
|
91
|
+
position: relative;
|
|
92
|
+
|
|
93
|
+
.card-content {
|
|
94
|
+
flex-grow: 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Sticky Action Section
|
|
100
|
+
&.sticky-action {
|
|
101
|
+
.card-action {
|
|
102
|
+
z-index: 2;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.card-reveal {
|
|
106
|
+
z-index: 1;
|
|
107
|
+
padding-bottom: 64px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.card-image {
|
|
112
|
+
position: relative;
|
|
113
|
+
|
|
114
|
+
img {
|
|
115
|
+
display: block;
|
|
116
|
+
border-radius: var(--md-card-container-shape) var(--md-card-container-shape) 0 0;
|
|
117
|
+
position: relative;
|
|
118
|
+
left: 0;
|
|
119
|
+
right: 0;
|
|
120
|
+
top: 0;
|
|
121
|
+
bottom: 0;
|
|
122
|
+
width: 100%;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.card-title {
|
|
126
|
+
color: var(--md-sys-color-surface);
|
|
127
|
+
position: absolute;
|
|
128
|
+
bottom: 0;
|
|
129
|
+
left: 0;
|
|
130
|
+
max-width: 100%;
|
|
131
|
+
padding: 24px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.activator {
|
|
135
|
+
position: absolute;
|
|
136
|
+
left: 0;
|
|
137
|
+
right: 0;
|
|
138
|
+
top: 0;
|
|
139
|
+
bottom: 0;
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
img.activator {
|
|
144
|
+
position: relative;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.card-content {
|
|
149
|
+
padding: 24px;
|
|
150
|
+
border-radius: 0 0 var(--md-card-container-shape) var(--md-card-container-shape);
|
|
151
|
+
|
|
152
|
+
p {
|
|
153
|
+
margin: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.card-title {
|
|
157
|
+
display: block;
|
|
158
|
+
line-height: 32px;
|
|
159
|
+
margin-bottom: 8px;
|
|
160
|
+
|
|
161
|
+
i {
|
|
162
|
+
line-height: 32px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&.activator {
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.card-action {
|
|
172
|
+
padding: 0 1.6rem;
|
|
173
|
+
|
|
174
|
+
&:last-child {
|
|
175
|
+
border-radius: 0 0 var(--md-card-container-shape) var(--md-card-container-shape);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
a {
|
|
179
|
+
@include btn(
|
|
180
|
+
var(--btn-height),
|
|
181
|
+
var(--btn-border-radius),
|
|
182
|
+
var(--btn-padding),
|
|
183
|
+
var(--btn-padding),
|
|
184
|
+
var(--btn-font-size)
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
&:first-child {
|
|
188
|
+
margin-left: -1.6rem;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:last-child {
|
|
192
|
+
margin-right: -1.6rem;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.btn,
|
|
197
|
+
.filled-button,
|
|
198
|
+
.filled-tonal-button,
|
|
199
|
+
.elevated-button,
|
|
200
|
+
.outlined-button {
|
|
201
|
+
margin: 0 .26rem 1.6rem 0;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.card-reveal {
|
|
206
|
+
padding: 24px;
|
|
207
|
+
position: absolute;
|
|
208
|
+
background-color: var(--md-sys-color-surface);
|
|
209
|
+
width: 100%;
|
|
210
|
+
overflow-y: auto;
|
|
211
|
+
left: 0;
|
|
212
|
+
top: 100%;
|
|
213
|
+
height: 100%;
|
|
214
|
+
z-index: 3;
|
|
215
|
+
display: none;
|
|
216
|
+
|
|
217
|
+
.card-title {
|
|
218
|
+
cursor: pointer;
|
|
219
|
+
display: block;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// ===== M3 Expressive Card Variants =====
|
|
225
|
+
|
|
226
|
+
// Elevated Card (default .card behavior)
|
|
227
|
+
.elevated-card {
|
|
228
|
+
@extend %card-base;
|
|
229
|
+
background-color: var(--md-sys-color-surface-container-low);
|
|
230
|
+
@extend .elevation-1;
|
|
231
|
+
|
|
232
|
+
&:hover {
|
|
233
|
+
@extend .elevation-2;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Filled Card
|
|
238
|
+
.filled-card {
|
|
239
|
+
@extend %card-base;
|
|
240
|
+
background-color: var(--md-sys-color-surface-container-highest);
|
|
241
|
+
@extend .elevation-0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Outlined Card
|
|
245
|
+
.outlined-card {
|
|
246
|
+
@extend %card-base;
|
|
247
|
+
background-color: var(--md-sys-color-surface);
|
|
248
|
+
@extend .elevation-0;
|
|
249
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// ===== Deprecated .card alias =====
|
|
253
|
+
|
|
254
|
+
.card-panel {
|
|
255
|
+
transition: box-shadow var(--md-sys-motion-duration-medium1, 250ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
256
|
+
padding: 24px;
|
|
257
|
+
margin: $element-top-margin 0 $element-bottom-margin 0;
|
|
258
|
+
border-radius: var(--md-card-container-shape);
|
|
259
|
+
@extend .elevation-1;
|
|
260
|
+
background-color: var(--md-sys-color-surface);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.card {
|
|
264
|
+
@extend %card-base;
|
|
265
|
+
background-color: var(--md-sys-color-surface-container-low);
|
|
266
|
+
@extend .elevation-1;
|
|
267
|
+
}
|