material_components_web-sass 0.23.0 → 0.24.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/CHANGELOG.md +9 -0
- data/lib/material_components_web/sass/version.rb +1 -1
- data/vendor/assets/javascripts/material-components-web.js +12 -7
- data/vendor/assets/stylesheets/@material/button/_mixins.scss +5 -11
- data/vendor/assets/stylesheets/@material/button/mdc-button.scss +3 -2
- data/vendor/assets/stylesheets/@material/checkbox/_mixins.scss +0 -8
- data/vendor/assets/stylesheets/@material/checkbox/_variables.scss +1 -0
- data/vendor/assets/stylesheets/@material/checkbox/mdc-checkbox.scss +4 -2
- data/vendor/assets/stylesheets/@material/drawer/_mixins.scss +3 -3
- data/vendor/assets/stylesheets/@material/drawer/permanent/mdc-permanent-drawer.scss +9 -9
- data/vendor/assets/stylesheets/@material/drawer/persistent/mdc-persistent-drawer.scss +3 -3
- data/vendor/assets/stylesheets/@material/drawer/temporary/mdc-temporary-drawer.scss +8 -8
- data/vendor/assets/stylesheets/@material/fab/_mixins.scss +6 -9
- data/vendor/assets/stylesheets/@material/fab/mdc-fab.scss +3 -2
- data/vendor/assets/stylesheets/@material/icon-toggle/mdc-icon-toggle.scss +6 -9
- data/vendor/assets/stylesheets/@material/layout-grid/_mixins.scss +2 -0
- data/vendor/assets/stylesheets/@material/list/mdc-list.scss +4 -5
- data/vendor/assets/stylesheets/@material/radio/_functions.scss +26 -0
- data/vendor/assets/stylesheets/@material/radio/_mixins.scss +45 -0
- data/vendor/assets/stylesheets/@material/radio/_variables.scss +23 -0
- data/vendor/assets/stylesheets/@material/radio/mdc-radio.scss +15 -44
- data/vendor/assets/stylesheets/@material/ripple/_keyframes.scss +31 -29
- data/vendor/assets/stylesheets/@material/ripple/_mixins.scss +98 -177
- data/vendor/assets/stylesheets/@material/{fab → ripple}/_variables.scss +5 -2
- data/vendor/assets/stylesheets/@material/ripple/mdc-ripple.scss +6 -17
- data/vendor/assets/stylesheets/@material/snackbar/mdc-snackbar.scss +4 -3
- data/vendor/assets/stylesheets/@material/switch/_functions.scss +21 -0
- data/vendor/assets/stylesheets/@material/switch/_mixins.scss +74 -0
- data/vendor/assets/stylesheets/@material/switch/_variables.scss +9 -5
- data/vendor/assets/stylesheets/@material/switch/mdc-switch.scss +36 -43
- data/vendor/assets/stylesheets/@material/tabs/tab/mdc-tab.scss +5 -7
- data/vendor/assets/stylesheets/@material/textfield/_mixins.scss +23 -0
- data/vendor/assets/stylesheets/@material/textfield/_variables.scss +9 -0
- data/vendor/assets/stylesheets/@material/textfield/mdc-textfield.scss +20 -61
- data/vendor/assets/stylesheets/@material/theme/{_color_palette.scss → _color-palette.scss} +0 -0
- data/vendor/assets/stylesheets/@material/theme/_variables.scss +24 -0
- metadata +9 -4
@@ -36,9 +36,18 @@ $mdc-textfield-dark-placeholder: rgba(black, .38);
|
|
36
36
|
$mdc-textfield-light-background: rgba(white, 1);
|
37
37
|
$mdc-textfield-light-label: rgba(white, .7);
|
38
38
|
$mdc-textfield-light-placeholder: rgba(white, .3);
|
39
|
+
|
40
|
+
$mdc-textfield-box-background: rgba(black, .04);
|
41
|
+
$mdc-textfield-box-background-dark: rgba(white, .1);
|
42
|
+
$mdc-textfield-box-disabled-background: rgba(black, .02);
|
43
|
+
$mdc-textfield-box-disabled-background-dark: rgba(white, .05);
|
44
|
+
$mdc-textfield-box-secondary-text: rgba(black, .6);
|
45
|
+
|
39
46
|
$mdc-textarea-border-on-light: rgba(black, .73);
|
40
47
|
$mdc-textarea-border-on-dark: rgba(white, 1);
|
41
48
|
$mdc-textarea-light-background: rgba(white, 1);
|
42
49
|
$mdc-textarea-dark-background: rgba(48, 48, 48, 1);
|
43
50
|
$mdc-textarea-disabled-background-on-light: rgba(249, 249, 249, 1);
|
44
51
|
$mdc-textarea-disabled-background-on-dark: rgba(47, 47, 47, 1);
|
52
|
+
|
53
|
+
$mdc-text-field-border-radius: 4px !default;
|
@@ -43,7 +43,10 @@
|
|
43
43
|
@include mdc-typography-base;
|
44
44
|
// We use only a subset of the MDC typography values here as changing things such as line-height
|
45
45
|
// affects how the labels are transformed.
|
46
|
-
|
46
|
+
// TODO: Re-add setting the font-size from mdc-typography-styles (currently
|
47
|
+
// setting it here has no effect because it is overriden by the font-size
|
48
|
+
// given below).
|
49
|
+
@each $prop in (letter-spacing) {
|
47
50
|
#{$prop}: map-get(map-get($mdc-typography-styles, subheading2), $prop);
|
48
51
|
}
|
49
52
|
|
@@ -160,52 +163,30 @@
|
|
160
163
|
}
|
161
164
|
|
162
165
|
.mdc-textfield--box {
|
166
|
+
@include mdc-ripple-surface;
|
167
|
+
@include mdc-ripple-color(black, .04);
|
168
|
+
@include mdc-ripple-radius;
|
169
|
+
@include mdc-text-field-box-corner-radius($mdc-text-field-border-radius);
|
170
|
+
|
163
171
|
display: inline-flex;
|
164
172
|
position: relative;
|
165
173
|
height: 56px;
|
166
|
-
|
167
|
-
background-color: rgba(black, .04);
|
174
|
+
background-color: $mdc-textfield-box-background;
|
168
175
|
overflow: hidden;
|
169
176
|
|
170
177
|
@include mdc-theme-dark(".mdc-textfield", true) {
|
171
|
-
background-color:
|
178
|
+
background-color: $mdc-textfield-box-background-dark;
|
172
179
|
}
|
173
180
|
|
174
|
-
|
175
|
-
|
176
|
-
position: absolute;
|
177
|
-
top: 0;
|
178
|
-
left: 0;
|
179
|
-
width: 100%;
|
180
|
-
height: 100%;
|
181
|
-
border-radius: 50%;
|
182
|
-
background-color: inherit;
|
183
|
-
opacity: 0;
|
184
|
-
pointer-events: none;
|
185
|
-
content: "";
|
181
|
+
@include mdc-theme-dark(".mdc-textfield", true) {
|
182
|
+
@include mdc-ripple-color(white, .05);
|
186
183
|
}
|
187
184
|
|
188
|
-
// NOTE: For some
|
185
|
+
// NOTE: For some reason, stylelint complains that the patterns below don't follow BEM.
|
189
186
|
// However, it seems to emit the wrong selector for that pattern. Thus, we disable it above where
|
190
|
-
// we would normally disable it (
|
187
|
+
// we would normally disable it (on combined selectors) as a workaround.
|
191
188
|
|
192
189
|
// stylelint-disable plugin/selector-bem-pattern
|
193
|
-
// TODO: Refactor this out once #194 lands
|
194
|
-
$opacity-duration: 83ms;
|
195
|
-
|
196
|
-
&::before {
|
197
|
-
transition: opacity 17ms linear, transform 0ms $opacity-duration+2 linear;
|
198
|
-
}
|
199
|
-
|
200
|
-
&:hover {
|
201
|
-
&::before {
|
202
|
-
transition:
|
203
|
-
opacity $opacity-duration linear 17ms,
|
204
|
-
transform 250ms $mdc-animation-deceleration-curve-timing-function 17ms;
|
205
|
-
opacity: 1;
|
206
|
-
}
|
207
|
-
}
|
208
|
-
|
209
190
|
.mdc-textfield__input {
|
210
191
|
align-self: flex-end;
|
211
192
|
box-sizing: border-box;
|
@@ -219,7 +200,7 @@
|
|
219
200
|
position: absolute;
|
220
201
|
bottom: 20px;
|
221
202
|
width: calc(100% - #{$mdc-textfield-icon-padding});
|
222
|
-
color:
|
203
|
+
color: $mdc-textfield-box-secondary-text;
|
223
204
|
text-overflow: ellipsis;
|
224
205
|
white-space: nowrap;
|
225
206
|
pointer-events: none;
|
@@ -243,34 +224,11 @@
|
|
243
224
|
}
|
244
225
|
}
|
245
226
|
|
246
|
-
&.mdc-ripple-upgraded {
|
247
|
-
@include mdc-ripple-base;
|
248
|
-
// TODO: Add ::before as ripple bg once #194 lands
|
249
|
-
@include mdc-ripple-fg((pseudo: "::after", opacity: .04));
|
250
|
-
|
251
|
-
&::before {
|
252
|
-
top: calc(50% - var(--mdc-ripple-fg-size, 100%) / 2);
|
253
|
-
left: calc(50% - var(--mdc-ripple-fg-size, 100%) / 2);
|
254
|
-
width: var(--mdc-ripple-fg-size, 100%);
|
255
|
-
height: var(--mdc-ripple-fg-size, 100%);
|
256
|
-
transform: scale(.8);
|
257
|
-
}
|
258
|
-
|
259
|
-
&:hover::before {
|
260
|
-
transform: scale(calc(var(--mdc-ripple-fg-scale, 1) + .1));
|
261
|
-
}
|
262
|
-
|
263
|
-
@include mdc-theme-dark(".mdc-textfield", true) {
|
264
|
-
@include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .05));
|
265
|
-
}
|
266
|
-
}
|
267
|
-
|
268
227
|
&.mdc-textfield--disabled {
|
269
|
-
@include mdc-theme-prop(background-color, $mdc-textfield-light-background);
|
270
228
|
@include mdc-theme-prop(color, $mdc-textfield-light-placeholder);
|
271
229
|
|
272
230
|
border-bottom: none;
|
273
|
-
background-color:
|
231
|
+
background-color: $mdc-textfield-box-disabled-background;
|
274
232
|
|
275
233
|
@include mdc-theme-dark(".mdc-textfield", true) {
|
276
234
|
@include mdc-theme-prop(background-color, $mdc-textfield-dark-background);
|
@@ -500,6 +458,8 @@
|
|
500
458
|
}
|
501
459
|
|
502
460
|
.mdc-textfield--textarea {
|
461
|
+
@include mdc-text-field-textarea-corner-radius($mdc-text-field-border-radius);
|
462
|
+
|
503
463
|
$padding-inset: 16px;
|
504
464
|
$label-offset-y: $padding-inset + 2;
|
505
465
|
$label-offset-x: $padding-inset;
|
@@ -508,7 +468,7 @@
|
|
508
468
|
height: initial;
|
509
469
|
transition: none;
|
510
470
|
border: 1px solid $mdc-textarea-border-on-light;
|
511
|
-
|
471
|
+
overflow: hidden;
|
512
472
|
|
513
473
|
@include mdc-theme-dark(".mdc-textfield") {
|
514
474
|
border-color: $mdc-textarea-border-on-dark;
|
@@ -519,7 +479,6 @@
|
|
519
479
|
padding: $padding-inset;
|
520
480
|
padding-top: $padding-inset * 2;
|
521
481
|
border: 1px solid transparent;
|
522
|
-
border-radius: 2px;
|
523
482
|
|
524
483
|
&:focus {
|
525
484
|
@include mdc-theme-prop(border-color, primary);
|
File without changes
|
@@ -140,3 +140,27 @@ $mdc-theme-property-values: (
|
|
140
140
|
text-disabled-on-dark: map-get(map-get($mdc-theme-text-colors, light), disabled),
|
141
141
|
text-icon-on-dark: map-get(map-get($mdc-theme-text-colors, light), icon)
|
142
142
|
);
|
143
|
+
|
144
|
+
// If `$property` is a literal color value (e.g., `blue`, `#fff`), it is returned verbatim. Otherwise, the value of the
|
145
|
+
// corresponding theme property (from `$mdc-theme-property-values`) is returned. If `$property` is not a color and no
|
146
|
+
// such theme property exists, an error is thrown.
|
147
|
+
//
|
148
|
+
// This is mainly useful in situations where `mdc-theme-prop` cannot be used directly (e.g., `box-shadow`).
|
149
|
+
//
|
150
|
+
// Examples:
|
151
|
+
//
|
152
|
+
// 1. mdc-theme-prop-value(primary) => "#3f51b5"
|
153
|
+
// 2. mdc-theme-prop-value(blue) => "blue"
|
154
|
+
//
|
155
|
+
// NOTE: This function must be defined in _variables.scss instead of _functions.scss to avoid circular imports.
|
156
|
+
@function mdc-theme-prop-value($property) {
|
157
|
+
@if type-of($property) == color {
|
158
|
+
@return $property;
|
159
|
+
}
|
160
|
+
|
161
|
+
@if not map-has-key($mdc-theme-property-values, $property) {
|
162
|
+
@error "Invalid theme property: '#{$property}'. Choose one of: #{map-keys($mdc-theme-property-values)}";
|
163
|
+
}
|
164
|
+
|
165
|
+
@return map-get($mdc-theme-property-values, $property);
|
166
|
+
}
|
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.24.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-10-
|
11
|
+
date: 2017-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autoprefixer-rails
|
@@ -147,7 +147,6 @@ files:
|
|
147
147
|
- vendor/assets/stylesheets/@material/elevation/_variables.scss
|
148
148
|
- vendor/assets/stylesheets/@material/elevation/mdc-elevation.scss
|
149
149
|
- vendor/assets/stylesheets/@material/fab/_mixins.scss
|
150
|
-
- vendor/assets/stylesheets/@material/fab/_variables.scss
|
151
150
|
- vendor/assets/stylesheets/@material/fab/mdc-fab.scss
|
152
151
|
- vendor/assets/stylesheets/@material/fonts/material-icons.scss
|
153
152
|
- vendor/assets/stylesheets/@material/fonts/roboto.scss
|
@@ -162,9 +161,13 @@ files:
|
|
162
161
|
- vendor/assets/stylesheets/@material/list/mdc-list.scss
|
163
162
|
- vendor/assets/stylesheets/@material/menu/mdc-menu.scss
|
164
163
|
- vendor/assets/stylesheets/@material/menu/simple/mdc-simple-menu.scss
|
164
|
+
- vendor/assets/stylesheets/@material/radio/_functions.scss
|
165
|
+
- vendor/assets/stylesheets/@material/radio/_mixins.scss
|
166
|
+
- vendor/assets/stylesheets/@material/radio/_variables.scss
|
165
167
|
- vendor/assets/stylesheets/@material/radio/mdc-radio.scss
|
166
168
|
- vendor/assets/stylesheets/@material/ripple/_keyframes.scss
|
167
169
|
- vendor/assets/stylesheets/@material/ripple/_mixins.scss
|
170
|
+
- vendor/assets/stylesheets/@material/ripple/_variables.scss
|
168
171
|
- vendor/assets/stylesheets/@material/ripple/mdc-ripple.scss
|
169
172
|
- vendor/assets/stylesheets/@material/rtl/_mixins.scss
|
170
173
|
- vendor/assets/stylesheets/@material/select/mdc-select.scss
|
@@ -172,6 +175,8 @@ files:
|
|
172
175
|
- vendor/assets/stylesheets/@material/slider/mdc-slider.scss
|
173
176
|
- vendor/assets/stylesheets/@material/snackbar/_variables.scss
|
174
177
|
- vendor/assets/stylesheets/@material/snackbar/mdc-snackbar.scss
|
178
|
+
- vendor/assets/stylesheets/@material/switch/_functions.scss
|
179
|
+
- vendor/assets/stylesheets/@material/switch/_mixins.scss
|
175
180
|
- vendor/assets/stylesheets/@material/switch/_variables.scss
|
176
181
|
- vendor/assets/stylesheets/@material/switch/mdc-switch.scss
|
177
182
|
- vendor/assets/stylesheets/@material/tabs/mdc-tabs.scss
|
@@ -181,7 +186,7 @@ files:
|
|
181
186
|
- vendor/assets/stylesheets/@material/textfield/_mixins.scss
|
182
187
|
- vendor/assets/stylesheets/@material/textfield/_variables.scss
|
183
188
|
- vendor/assets/stylesheets/@material/textfield/mdc-textfield.scss
|
184
|
-
- vendor/assets/stylesheets/@material/theme/
|
189
|
+
- vendor/assets/stylesheets/@material/theme/_color-palette.scss
|
185
190
|
- vendor/assets/stylesheets/@material/theme/_constants.scss
|
186
191
|
- vendor/assets/stylesheets/@material/theme/_functions.scss
|
187
192
|
- vendor/assets/stylesheets/@material/theme/_mixins.scss
|