material_components_web-sass 0.17.0 → 0.18.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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/lib/material_components_web/sass/version.rb +1 -1
  4. data/vendor/assets/javascripts/material-components-web.js +1207 -1035
  5. data/vendor/assets/stylesheets/@material/button/mdc-button.scss +91 -110
  6. data/vendor/assets/stylesheets/@material/dialog/mdc-dialog.scss +2 -2
  7. data/vendor/assets/stylesheets/@material/drawer/permanent/mdc-permanent-drawer.scss +1 -1
  8. data/vendor/assets/stylesheets/@material/drawer/persistent/mdc-persistent-drawer.scss +1 -1
  9. data/vendor/assets/stylesheets/@material/drawer/slidable/_mixins.scss +15 -15
  10. data/vendor/assets/stylesheets/@material/drawer/slidable/_variables.scss +15 -15
  11. data/vendor/assets/stylesheets/@material/fab/mdc-fab.scss +2 -2
  12. data/vendor/assets/stylesheets/@material/grid-list/mdc-grid-list.scss +3 -0
  13. data/vendor/assets/stylesheets/@material/icon-toggle/mdc-icon-toggle.scss +3 -3
  14. data/vendor/assets/stylesheets/@material/layout-grid/_variables.scss +1 -1
  15. data/vendor/assets/stylesheets/@material/layout-grid/mdc-layout-grid.scss +3 -3
  16. data/vendor/assets/stylesheets/@material/linear-progress/mdc-linear-progress.scss +1 -1
  17. data/vendor/assets/stylesheets/@material/ripple/mdc-ripple.scss +2 -2
  18. data/vendor/assets/stylesheets/@material/snackbar/mdc-snackbar.scss +1 -1
  19. data/vendor/assets/stylesheets/@material/tabs/tab-bar/mdc-tab-bar.scss +3 -3
  20. data/vendor/assets/stylesheets/@material/textfield/mdc-textfield.scss +1 -1
  21. data/vendor/assets/stylesheets/@material/theme/_color_palette.scss +290 -0
  22. data/vendor/assets/stylesheets/@material/theme/_constants.scss +10 -12
  23. data/vendor/assets/stylesheets/@material/theme/_functions.scss +6 -12
  24. data/vendor/assets/stylesheets/@material/theme/_mixins.scss +36 -40
  25. data/vendor/assets/stylesheets/@material/theme/_variables.scss +79 -17
  26. data/vendor/assets/stylesheets/@material/theme/mdc-theme.scss +4 -4
  27. data/vendor/assets/stylesheets/@material/toolbar/mdc-toolbar.scss +2 -2
  28. metadata +3 -2
@@ -16,20 +16,43 @@
16
16
 
17
17
  @import "./functions";
18
18
 
19
- /*
20
- Main theme colors.
21
- If you're a user customizing your color scheme in SASS, these are probably the only variables you need to change.
22
- */
23
- $mdc-theme-primary: #3f51b5 !default; /* Indigo 500 */
24
- $mdc-theme-accent: #ff4081 !default; /* Pink A200 */
25
- $mdc-theme-background: #fff !default; /* White */
19
+ //
20
+ // Main theme colors for your brand.
21
+ //
22
+ // If you're a user customizing your color scheme in SASS, these are probably the only variables you need to change.
23
+ //
24
+
25
+ $mdc-theme-primary: #3f51b5 !default; // Indigo 500
26
+ $mdc-theme-primary-light: lighten($mdc-theme-primary, 14%) !default;
27
+ $mdc-theme-primary-dark: darken($mdc-theme-primary, 14%) !default;
28
+
29
+ // The $mdc-theme-accent variable is DEPRECATED - it exists purely for backward compatibility.
30
+ // The $mdc-theme-secondary* variables should be used for all new projects.
31
+ $mdc-theme-accent: #ff4081 !default; // Pink A200
32
+ $mdc-theme-secondary: $mdc-theme-accent !default;
33
+ $mdc-theme-secondary-light: lighten($mdc-theme-secondary, 14%) !default;
34
+ $mdc-theme-secondary-dark: darken($mdc-theme-secondary, 14%) !default;
35
+
36
+ $mdc-theme-background: #fff !default; // White
37
+
38
+ //
39
+ // Which set of text colors to use for each main theme color (light or dark).
40
+ //
26
41
 
27
- /* Which set of text colors to use for each main theme color (light or dark) */
28
42
  $mdc-theme-primary-tone: mdc-theme-light-or-dark($mdc-theme-primary);
29
- $mdc-theme-accent-tone: mdc-theme-light-or-dark($mdc-theme-accent);
43
+ $mdc-theme-primary-light-tone: mdc-theme-light-or-dark($mdc-theme-primary-light);
44
+ $mdc-theme-primary-dark-tone: mdc-theme-light-or-dark($mdc-theme-primary-dark);
45
+
46
+ $mdc-theme-secondary-tone: mdc-theme-light-or-dark($mdc-theme-secondary);
47
+ $mdc-theme-secondary-light-tone: mdc-theme-light-or-dark($mdc-theme-secondary-light);
48
+ $mdc-theme-secondary-dark-tone: mdc-theme-light-or-dark($mdc-theme-secondary-dark);
49
+
30
50
  $mdc-theme-background-tone: mdc-theme-light-or-dark($mdc-theme-background);
31
51
 
32
- /* Text colors according to light vs dark and text type */
52
+ //
53
+ // Text colors according to light vs dark and text type.
54
+ //
55
+
33
56
  $mdc-theme-text-colors: (
34
57
  dark: (
35
58
  primary: rgba(black, .87),
@@ -47,31 +70,70 @@ $mdc-theme-text-colors: (
47
70
  )
48
71
  );
49
72
 
50
- /* Primary text colors for each of the theme colors */
73
+ //
74
+ // Primary text colors for each of the theme colors.
75
+ //
76
+
51
77
  $mdc-theme-property-values: (
78
+ // Primary
52
79
  primary: $mdc-theme-primary,
53
- accent: $mdc-theme-accent,
80
+ primary-light: $mdc-theme-primary-light,
81
+ primary-dark: $mdc-theme-primary-dark,
82
+ // Secondary
83
+ secondary: $mdc-theme-secondary,
84
+ secondary-light: $mdc-theme-secondary-light,
85
+ secondary-dark: $mdc-theme-secondary-dark,
86
+ // Background
54
87
  background: $mdc-theme-background,
88
+ // Text-primary on "primary" background
55
89
  text-primary-on-primary: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-tone), primary),
56
90
  text-secondary-on-primary: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-tone), secondary),
57
91
  text-hint-on-primary: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-tone), hint),
58
92
  text-disabled-on-primary: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-tone), disabled),
59
93
  text-icon-on-primary: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-tone), icon),
60
- text-primary-on-accent: map-get(map-get($mdc-theme-text-colors, $mdc-theme-accent-tone), primary),
61
- text-secondary-on-accent: map-get(map-get($mdc-theme-text-colors, $mdc-theme-accent-tone), secondary),
62
- text-hint-on-accent: map-get(map-get($mdc-theme-text-colors, $mdc-theme-accent-tone), hint),
63
- text-disabled-on-accent: map-get(map-get($mdc-theme-text-colors, $mdc-theme-accent-tone), disabled),
64
- text-icon-on-accent: map-get(map-get($mdc-theme-text-colors, $mdc-theme-accent-tone), icon),
94
+ // Text-primary on "primary-light" background
95
+ text-primary-on-primary-light: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-light-tone), primary),
96
+ text-secondary-on-primary-light: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-light-tone), secondary),
97
+ text-hint-on-primary-light: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-light-tone), hint),
98
+ text-disabled-on-primary-light: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-light-tone), disabled),
99
+ text-icon-on-primary-light: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-light-tone), icon),
100
+ // Text-primary on "primary-dark" background
101
+ text-primary-on-primary-dark: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-dark-tone), primary),
102
+ text-secondary-on-primary-dark: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-dark-tone), secondary),
103
+ text-hint-on-primary-dark: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-dark-tone), hint),
104
+ text-disabled-on-primary-dark: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-dark-tone), disabled),
105
+ text-icon-on-primary-dark: map-get(map-get($mdc-theme-text-colors, $mdc-theme-primary-dark-tone), icon),
106
+ // Text-primary on "secondary" background
107
+ text-primary-on-secondary: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-tone), primary),
108
+ text-secondary-on-secondary: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-tone), secondary),
109
+ text-hint-on-secondary: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-tone), hint),
110
+ text-disabled-on-secondary: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-tone), disabled),
111
+ text-icon-on-secondary: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-tone), icon),
112
+ // Text-primary on "secondary-light" background
113
+ text-primary-on-secondary-light: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-light-tone), primary),
114
+ text-secondary-on-secondary-light: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-light-tone), secondary),
115
+ text-hint-on-secondary-light: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-light-tone), hint),
116
+ text-disabled-on-secondary-light: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-light-tone), disabled),
117
+ text-icon-on-secondary-light: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-light-tone), icon),
118
+ // Text-primary on "secondary-dark" background
119
+ text-primary-on-secondary-dark: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-dark-tone), primary),
120
+ text-secondary-on-secondary-dark: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-dark-tone), secondary),
121
+ text-hint-on-secondary-dark: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-dark-tone), hint),
122
+ text-disabled-on-secondary-dark: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-dark-tone), disabled),
123
+ text-icon-on-secondary-dark: map-get(map-get($mdc-theme-text-colors, $mdc-theme-secondary-dark-tone), icon),
124
+ // Text-primary on "background" background
65
125
  text-primary-on-background: map-get(map-get($mdc-theme-text-colors, $mdc-theme-background-tone), primary),
66
126
  text-secondary-on-background: map-get(map-get($mdc-theme-text-colors, $mdc-theme-background-tone), secondary),
67
127
  text-hint-on-background: map-get(map-get($mdc-theme-text-colors, $mdc-theme-background-tone), hint),
68
128
  text-disabled-on-background: map-get(map-get($mdc-theme-text-colors, $mdc-theme-background-tone), disabled),
69
129
  text-icon-on-background: map-get(map-get($mdc-theme-text-colors, $mdc-theme-background-tone), icon),
130
+ // Text-primary on "light" background
70
131
  text-primary-on-light: map-get(map-get($mdc-theme-text-colors, dark), primary),
71
132
  text-secondary-on-light: map-get(map-get($mdc-theme-text-colors, dark), secondary),
72
133
  text-hint-on-light: map-get(map-get($mdc-theme-text-colors, dark), hint),
73
134
  text-disabled-on-light: map-get(map-get($mdc-theme-text-colors, dark), disabled),
74
135
  text-icon-on-light: map-get(map-get($mdc-theme-text-colors, dark), icon),
136
+ // Text-primary on "dark" background
75
137
  text-primary-on-dark: map-get(map-get($mdc-theme-text-colors, light), primary),
76
138
  text-secondary-on-dark: map-get(map-get($mdc-theme-text-colors, light), secondary),
77
139
  text-hint-on-dark: map-get(map-get($mdc-theme-text-colors, light), hint),
@@ -18,11 +18,11 @@
18
18
 
19
19
  :root {
20
20
  @each $style in map-keys($mdc-theme-property-values) {
21
- --mdc-theme-#{$style}: map-get($mdc-theme-property-values, $style);
21
+ --mdc-theme-#{$style}: #{map-get($mdc-theme-property-values, $style)};
22
22
  }
23
23
  }
24
24
 
25
- /* Special case, so that .mdc-theme--background changes background color, not text color. */
25
+ // Special case, so that .mdc-theme--background changes background color, not text color.
26
26
  .mdc-theme--background {
27
27
  @include mdc-theme-prop(background-color, background);
28
28
  }
@@ -35,8 +35,8 @@
35
35
  }
36
36
  }
37
37
 
38
- /* CSS rules for using primary and accent as background colors. */
39
- @each $style in ("primary", "accent") {
38
+ // CSS rules for using primary and secondary (plus light/dark variants) as background colors.
39
+ @each $style in ("primary", "primary-light", "primary-dark", "secondary", "secondary-light", "secondary-dark") {
40
40
  .mdc-theme--#{$style}-bg {
41
41
  @include mdc-theme-prop(background-color, $style, true);
42
42
  }
@@ -93,7 +93,7 @@
93
93
  cursor: pointer;
94
94
  }
95
95
 
96
- &__icon:last-child {
96
+ &__icon:last-of-type {
97
97
  padding-right: 16px;
98
98
  }
99
99
 
@@ -136,7 +136,7 @@
136
136
  .mdc-toolbar--flexible {
137
137
  // stylelint-disable plugin/selector-bem-pattern
138
138
  // bem linter is disabled because it cannot correctly reconcile mdc prefix for css variables.
139
- --mdc-toolbar-ratio-to-extend-flexible: $mdc-toolbar-ratio-to-extend-flexible;
139
+ --mdc-toolbar-ratio-to-extend-flexible: #{$mdc-toolbar-ratio-to-extend-flexible};
140
140
  // stylelint-enable plugin/selector-bem-pattern
141
141
 
142
142
  .mdc-toolbar__row:first-child {
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.17.0
4
+ version: 0.18.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-08-08 00:00:00.000000000 Z
11
+ date: 2017-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autoprefixer-rails
@@ -176,6 +176,7 @@ files:
176
176
  - vendor/assets/stylesheets/@material/tabs/tab-bar/mdc-tab-bar.scss
177
177
  - vendor/assets/stylesheets/@material/tabs/tab/mdc-tab.scss
178
178
  - vendor/assets/stylesheets/@material/textfield/mdc-textfield.scss
179
+ - vendor/assets/stylesheets/@material/theme/_color_palette.scss
179
180
  - vendor/assets/stylesheets/@material/theme/_constants.scss
180
181
  - vendor/assets/stylesheets/@material/theme/_functions.scss
181
182
  - vendor/assets/stylesheets/@material/theme/_mixins.scss