material_components_web-sass 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/material_components_web/sass/version.rb +1 -1
- data/vendor/assets/javascripts/material-components-web.js +883 -436
- data/vendor/assets/stylesheets/@material/button/mdc-button.scss +1 -0
- data/vendor/assets/stylesheets/@material/layout-grid/_mixins.scss +38 -0
- data/vendor/assets/stylesheets/@material/layout-grid/_variables.scss +6 -0
- data/vendor/assets/stylesheets/@material/layout-grid/mdc-layout-grid.scss +13 -0
- data/vendor/assets/stylesheets/@material/ripple/_mixins.scss +1 -1
- data/vendor/assets/stylesheets/@material/textfield/mdc-textfield.scss +208 -8
- data/vendor/assets/stylesheets/@material/toolbar/mdc-toolbar.scss +5 -0
- metadata +2 -2
@@ -14,6 +14,10 @@
|
|
14
14
|
|
15
15
|
// Private mixins, meant for internal use.
|
16
16
|
@mixin mdc-layout-grid-media-query_($size) {
|
17
|
+
@if not map-has-key($mdc-layout-grid-columns, $size) {
|
18
|
+
@error "Invalid style specified! Choose one of #{map-keys($mdc-layout-grid-columns)}";
|
19
|
+
}
|
20
|
+
|
17
21
|
@if $size == phone {
|
18
22
|
// Phone
|
19
23
|
@media (max-width: map-get($mdc-layout-grid-breakpoints, tablet) - 1px) {
|
@@ -37,6 +41,10 @@
|
|
37
41
|
}
|
38
42
|
|
39
43
|
@mixin mdc-layout-grid-cell-span_($size, $span, $gutter) {
|
44
|
+
@if not map-has-key($mdc-layout-grid-columns, $size) {
|
45
|
+
@error "Invalid style specified! Choose one of #{map-keys($mdc-layout-grid-columns)}";
|
46
|
+
}
|
47
|
+
|
40
48
|
$percent: percentage($span / map-get($mdc-layout-grid-columns, $size));
|
41
49
|
|
42
50
|
@if $percent > 100% {
|
@@ -54,6 +62,10 @@
|
|
54
62
|
|
55
63
|
// Public mixins, meant for developer usage.
|
56
64
|
@mixin mdc-layout-grid($size, $margin, $max-width: null) {
|
65
|
+
@if not map-has-key($mdc-layout-grid-columns, $size) {
|
66
|
+
@error "Invalid style specified! Choose one of #{map-keys($mdc-layout-grid-columns)}";
|
67
|
+
}
|
68
|
+
|
57
69
|
box-sizing: border-box;
|
58
70
|
margin: 0 auto;
|
59
71
|
|
@@ -66,6 +78,10 @@
|
|
66
78
|
}
|
67
79
|
|
68
80
|
@mixin mdc-layout-grid-inner($size, $margin, $gutter) {
|
81
|
+
@if not map-has-key($mdc-layout-grid-columns, $size) {
|
82
|
+
@error "Invalid style specified! Choose one of #{map-keys($mdc-layout-grid-columns)}";
|
83
|
+
}
|
84
|
+
|
69
85
|
display: flex;
|
70
86
|
flex-flow: row wrap;
|
71
87
|
align-items: stretch;
|
@@ -82,6 +98,10 @@
|
|
82
98
|
}
|
83
99
|
|
84
100
|
@mixin mdc-layout-grid-cell($size, $default-span, $gutter) {
|
101
|
+
@if not map-has-key($mdc-layout-grid-columns, $size) {
|
102
|
+
@error "Invalid style specified! Choose one of #{map-keys($mdc-layout-grid-columns)}";
|
103
|
+
}
|
104
|
+
|
85
105
|
box-sizing: border-box;
|
86
106
|
margin: $gutter / 2;
|
87
107
|
margin: calc(var(--mdc-layout-grid-gutter-#{$size}, #{$gutter}) / 2);
|
@@ -122,3 +142,21 @@
|
|
122
142
|
align-self: stretch;
|
123
143
|
}
|
124
144
|
}
|
145
|
+
|
146
|
+
@mixin mdc-layout-grid-fixed-column-width($size, $margin, $gutter, $column-width) {
|
147
|
+
@if not map-has-key($mdc-layout-grid-columns, $size) {
|
148
|
+
@error "Invalid style specified! Choose one of #{map-keys($mdc-layout-grid-columns)}";
|
149
|
+
}
|
150
|
+
|
151
|
+
$columnCount: map-get($mdc-layout-grid-columns, $size);
|
152
|
+
$gutter-number: $columnCount - 1;
|
153
|
+
$margin-number: 2;
|
154
|
+
|
155
|
+
width: $column-width * $columnCount + $gutter * $gutter-number + $margin * $margin-number;
|
156
|
+
width:
|
157
|
+
calc(
|
158
|
+
var(--mdc-layout-grid-column-width-#{$size}, #{$column-width}) * #{$columnCount} +
|
159
|
+
var(--mdc-layout-grid-gutter-#{$size}, #{$gutter}) * #{$gutter-number} +
|
160
|
+
var(--mdc-layout-grid-margin-#{$size}, #{$margin}) * #{$margin-number}
|
161
|
+
);
|
162
|
+
}
|
@@ -36,6 +36,12 @@ $mdc-layout-grid-default-gutter: (
|
|
36
36
|
phone: 16px
|
37
37
|
) !default;
|
38
38
|
|
39
|
+
$mdc-layout-grid-column-width: (
|
40
|
+
desktop: 72px,
|
41
|
+
tablet: 72px,
|
42
|
+
phone: 72px
|
43
|
+
) !default;
|
44
|
+
|
39
45
|
$mdc-layout-grid-default-column-span: 4 !default;
|
40
46
|
|
41
47
|
$mdc-layout-grid-max-width: null;
|
@@ -19,6 +19,7 @@
|
|
19
19
|
@each $size in map-keys($mdc-layout-grid-columns) {
|
20
20
|
--mdc-layout-grid-margin-#{$size}: map-get($mdc-layout-grid-default-margin, $size);
|
21
21
|
--mdc-layout-grid-gutter-#{$size}: map-get($mdc-layout-grid-default-gutter, $size);
|
22
|
+
--mdc-layout-grid-column-width-#{$size}: map-get($mdc-layout-grid-column-width, $size);
|
22
23
|
}
|
23
24
|
}
|
24
25
|
|
@@ -84,4 +85,16 @@
|
|
84
85
|
}
|
85
86
|
}
|
86
87
|
|
88
|
+
.mdc-layout-grid--fixed-column-width {
|
89
|
+
@each $size in map-keys($mdc-layout-grid-columns) {
|
90
|
+
@include mdc-layout-grid-media-query_($size) {
|
91
|
+
$margin: map-get($mdc-layout-grid-default-margin, $size);
|
92
|
+
$gutter: map-get($mdc-layout-grid-default-gutter, $size);
|
93
|
+
$column-width: map-get($mdc-layout-grid-column-width, $size);
|
94
|
+
|
95
|
+
@include mdc-layout-grid-fixed-column-width($size, $margin, $gutter, $column-width);
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
87
100
|
// postcss-bem-linter: end
|
@@ -213,6 +213,6 @@
|
|
213
213
|
&.mdc-ripple-upgraded--foreground-deactivation#{$pseudo} {
|
214
214
|
// Retain transform from mdc-ripple-fg-radius-in activation
|
215
215
|
transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));
|
216
|
-
animation:
|
216
|
+
animation: 83ms mdc-ripple-fg-opacity-out;
|
217
217
|
}
|
218
218
|
}
|
@@ -15,6 +15,7 @@
|
|
15
15
|
//
|
16
16
|
|
17
17
|
@import "@material/animation/variables";
|
18
|
+
@import "@material/ripple/mixins";
|
18
19
|
@import "@material/rtl/mixins";
|
19
20
|
@import "@material/theme/variables";
|
20
21
|
@import "@material/theme/mixins";
|
@@ -75,7 +76,7 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
|
|
75
76
|
}
|
76
77
|
|
77
78
|
@include mdc-theme-dark {
|
78
|
-
color
|
79
|
+
@include mdc-theme-prop(color, text-primary-on-dark);
|
79
80
|
|
80
81
|
&::placeholder {
|
81
82
|
@include mdc-theme-prop(color, text-hint-on-dark);
|
@@ -123,10 +124,196 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
|
|
123
124
|
transform: translateY(-100%) scale(.75, .75);
|
124
125
|
cursor: auto;
|
125
126
|
}
|
126
|
-
// stylelint-enable plugin/selector-bem-pattern
|
127
|
+
// stylelint-enable plugin/selector-bem-pattern
|
127
128
|
}
|
128
129
|
|
129
|
-
.mdc-textfield--
|
130
|
+
.mdc-textfield--box {
|
131
|
+
display: inline-flex;
|
132
|
+
position: relative;
|
133
|
+
height: 56px;
|
134
|
+
border-radius: 4px 4px 0 0;
|
135
|
+
background-color: rgba(black, .04);
|
136
|
+
overflow: hidden;
|
137
|
+
|
138
|
+
@include mdc-theme-dark(".mdc-textfield", true) {
|
139
|
+
background-color: rgba(white, .1);
|
140
|
+
}
|
141
|
+
|
142
|
+
&::before,
|
143
|
+
&::after {
|
144
|
+
position: absolute;
|
145
|
+
top: 0;
|
146
|
+
left: 0;
|
147
|
+
width: 100%;
|
148
|
+
height: 100%;
|
149
|
+
border-radius: 50%;
|
150
|
+
background-color: inherit;
|
151
|
+
content: "";
|
152
|
+
opacity: 0;
|
153
|
+
pointer-events: none;
|
154
|
+
}
|
155
|
+
|
156
|
+
// NOTE: For some reasons, stylelint complains that the two patterns below don't follow BEM.
|
157
|
+
// However, it seems to emit the wrong selector for that pattern. Thus, we disable it above where
|
158
|
+
// we would normally disable it (&.mdc-textfield--disabled) as a workaround.
|
159
|
+
|
160
|
+
// stylelint-disable plugin/selector-bem-pattern
|
161
|
+
// TODO: Refactor this out once #194 lands
|
162
|
+
$opacity-duration: 83ms;
|
163
|
+
|
164
|
+
&::before {
|
165
|
+
transition: opacity 17ms linear, transform 0ms $opacity-duration+2 linear;
|
166
|
+
}
|
167
|
+
|
168
|
+
&:hover {
|
169
|
+
&::before {
|
170
|
+
transition:
|
171
|
+
opacity $opacity-duration linear 17ms,
|
172
|
+
transform 250ms $mdc-animation-linear-out-slow-in-timing-function 17ms;
|
173
|
+
opacity: 1;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
.mdc-textfield__input {
|
178
|
+
align-self: flex-end;
|
179
|
+
height: 100%;
|
180
|
+
box-sizing: border-box;
|
181
|
+
padding: 20px 16px 0;
|
182
|
+
}
|
183
|
+
|
184
|
+
.mdc-textfield__label {
|
185
|
+
@include mdc-rtl-reflexive-position(left, 16px);
|
186
|
+
|
187
|
+
position: absolute;
|
188
|
+
bottom: 20px;
|
189
|
+
color: rgba(black, .6);
|
190
|
+
pointer-events: none;
|
191
|
+
// Force the label into its own layer to prevent to prevent visible layer promotion adjustments
|
192
|
+
// when the ripple is activated behind it.
|
193
|
+
will-change: transform;
|
194
|
+
|
195
|
+
@include mdc-theme-dark(".mdc-textfield") {
|
196
|
+
@include mdc-theme-prop(color, text-secondary-on-dark);
|
197
|
+
}
|
198
|
+
|
199
|
+
&--float-above {
|
200
|
+
transform: translateY(-50%) scale(.75, .75);
|
201
|
+
}
|
202
|
+
}
|
203
|
+
|
204
|
+
&.mdc-ripple-upgraded {
|
205
|
+
@include mdc-ripple-base;
|
206
|
+
// TODO: Add ::before as ripple bg once #194 lands
|
207
|
+
@include mdc-ripple-fg((pseudo: "::after", opacity: .04));
|
208
|
+
|
209
|
+
&::before {
|
210
|
+
top: calc(50% - var(--mdc-ripple-fg-size, 100%) / 2);
|
211
|
+
left: calc(50% - var(--mdc-ripple-fg-size, 100%) / 2);
|
212
|
+
width: var(--mdc-ripple-fg-size, 100%);
|
213
|
+
height: var(--mdc-ripple-fg-size, 100%);
|
214
|
+
transform: scale(.8);
|
215
|
+
}
|
216
|
+
|
217
|
+
&:hover::before {
|
218
|
+
transform: scale(calc(var(--mdc-ripple-fg-scale, 1) + .1));
|
219
|
+
}
|
220
|
+
|
221
|
+
@include mdc-theme-dark(".mdc-textfield", true) {
|
222
|
+
@include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .05));
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
&.mdc-textfield--disabled {
|
227
|
+
border-bottom: none;
|
228
|
+
background-color: rgba(black, .02);
|
229
|
+
color: rgba(black, .38);
|
230
|
+
|
231
|
+
@include mdc-theme-dark(".mdc-textfield", true) {
|
232
|
+
border-bottom: none;
|
233
|
+
background-color: rgba(white, .05);
|
234
|
+
}
|
235
|
+
|
236
|
+
.mdc-textfield__label {
|
237
|
+
bottom: 20px;
|
238
|
+
}
|
239
|
+
|
240
|
+
.mdc-textfield__input {
|
241
|
+
padding-bottom: 0;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
|
245
|
+
// TODO: Move into general .mdc-textfield decl and replace ::after textfield styles with this
|
246
|
+
// element as part of #675
|
247
|
+
.mdc-textfield__bottom-line {
|
248
|
+
position: absolute;
|
249
|
+
bottom: 0;
|
250
|
+
left: 0;
|
251
|
+
width: 100%;
|
252
|
+
height: 1px;
|
253
|
+
transform: scaleY(1);
|
254
|
+
transform-origin: center bottom;
|
255
|
+
transition:
|
256
|
+
background-color 33ms $mdc-animation-fast-out-slow-in-timing-function,
|
257
|
+
mdc-textfield-transition(transform);
|
258
|
+
background-color: rgba(black, .42);
|
259
|
+
pointer-events: none;
|
260
|
+
|
261
|
+
&::after {
|
262
|
+
position: absolute;
|
263
|
+
top: 0;
|
264
|
+
left: 0;
|
265
|
+
width: 100%;
|
266
|
+
height: 100%;
|
267
|
+
transition: mdc-textfield-transition(opacity);
|
268
|
+
background-color: $mdc-textfield-error-on-light;
|
269
|
+
content: "";
|
270
|
+
opacity: 0;
|
271
|
+
}
|
272
|
+
|
273
|
+
@include mdc-theme-dark(".mdc-textfield") {
|
274
|
+
@include mdc-theme-prop(background-color, text-hint-on-dark);
|
275
|
+
|
276
|
+
&::after {
|
277
|
+
background-color: $mdc-textfield-error-on-dark;
|
278
|
+
}
|
279
|
+
}
|
280
|
+
}
|
281
|
+
|
282
|
+
&.mdc-textfield--focused .mdc-textfield__bottom-line {
|
283
|
+
@include mdc-theme-prop(background-color, primary);
|
284
|
+
|
285
|
+
transform: scaleY(2);
|
286
|
+
}
|
287
|
+
|
288
|
+
&.mdc-textfield--disabled .mdc-textfield__bottom-line {
|
289
|
+
display: none;
|
290
|
+
}
|
291
|
+
|
292
|
+
&.mdc-textfield--invalid .mdc-textfield__bottom-line::after {
|
293
|
+
opacity: 1;
|
294
|
+
}
|
295
|
+
|
296
|
+
&.mdc-textfield--dense {
|
297
|
+
height: 44px;
|
298
|
+
|
299
|
+
.mdc-textfield__input {
|
300
|
+
padding: 12px 12px 0;
|
301
|
+
}
|
302
|
+
|
303
|
+
.mdc-textfield__label {
|
304
|
+
@include mdc-rtl-reflexive-position(left, 12px);
|
305
|
+
|
306
|
+
bottom: 12px;
|
307
|
+
|
308
|
+
&--float-above {
|
309
|
+
transform: translateY(calc(-75% - 2px)) scale(.923, .923);
|
310
|
+
}
|
311
|
+
}
|
312
|
+
}
|
313
|
+
// stylelint-enable plugin/selector-bem-pattern
|
314
|
+
}
|
315
|
+
|
316
|
+
.mdc-textfield--upgraded:not(.mdc-textfield--fullwidth):not(.mdc-textfield--box) {
|
130
317
|
display: inline-flex;
|
131
318
|
position: relative;
|
132
319
|
box-sizing: border-box;
|
@@ -171,7 +358,7 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
|
|
171
358
|
@include mdc-theme-prop(color, primary);
|
172
359
|
}
|
173
360
|
|
174
|
-
&.mdc-textfield--upgraded:not(.mdc-textfield--fullwidth):not(.mdc-textfield--multiline)::after {
|
361
|
+
&.mdc-textfield--upgraded:not(.mdc-textfield--fullwidth):not(.mdc-textfield--multiline):not(.mdc-textfield--box)::after {
|
175
362
|
@include mdc-textfield-after-styles;
|
176
363
|
|
177
364
|
@include mdc-theme-dark(".mdc-textfield", true) {
|
@@ -200,7 +387,7 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
|
|
200
387
|
}
|
201
388
|
|
202
389
|
.mdc-textfield--invalid {
|
203
|
-
&:not(.mdc-textfield--focused) {
|
390
|
+
&:not(.mdc-textfield--focused):not(.mdc-textfield--box) {
|
204
391
|
&::after,
|
205
392
|
&.mdc-textfield--upgraded::after {
|
206
393
|
background-color: $mdc-textfield-error-on-light;
|
@@ -226,6 +413,8 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
|
|
226
413
|
}
|
227
414
|
|
228
415
|
.mdc-textfield--disabled {
|
416
|
+
pointer-events: none;
|
417
|
+
|
229
418
|
&::after {
|
230
419
|
display: none;
|
231
420
|
}
|
@@ -276,10 +465,8 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
|
|
276
465
|
|
277
466
|
.mdc-textfield--focused & {
|
278
467
|
color: $mdc-textfield-error-on-light;
|
279
|
-
}
|
280
468
|
|
281
|
-
|
282
|
-
.mdc-textfield--focused & {
|
469
|
+
@include mdc-theme-dark(".mdc-textfield", true) {
|
283
470
|
color: $mdc-textfield-error-on-dark;
|
284
471
|
}
|
285
472
|
}
|
@@ -460,6 +647,19 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
|
|
460
647
|
}
|
461
648
|
}
|
462
649
|
|
650
|
+
.mdc-textfield--box:not(.mdc-textfield--upgraded) {
|
651
|
+
height: 36px;
|
652
|
+
|
653
|
+
&::before,
|
654
|
+
&::after {
|
655
|
+
border-radius: 0;
|
656
|
+
}
|
657
|
+
|
658
|
+
.mdc-textfield__input {
|
659
|
+
padding-top: 0;
|
660
|
+
}
|
661
|
+
}
|
662
|
+
|
463
663
|
// postcss-bem-linter: end
|
464
664
|
|
465
665
|
// postcss-bem-linter: define textfield-helptext
|
@@ -188,6 +188,11 @@
|
|
188
188
|
.mdc-toolbar-fixed-adjust {
|
189
189
|
margin-top: $mdc-toolbar-row-height;
|
190
190
|
|
191
|
+
@media (max-width: $mdc-toolbar-mobile-landscape-width-breakpoint)
|
192
|
+
and (orientation: landscape) {
|
193
|
+
margin-top: $mdc-toolbar-mobile-landscape-row-height;
|
194
|
+
}
|
195
|
+
|
191
196
|
@media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
192
197
|
margin-top: $mdc-toolbar-mobile-row-height;
|
193
198
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: material_components_web-sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Tarasov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autoprefixer-rails
|