material-sass 0.0.4 → 1.0.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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/fonts/MaterialIcons-Regular.eot +0 -0
  3. data/app/assets/fonts/MaterialIcons-Regular.ijmap +1 -0
  4. data/app/assets/fonts/MaterialIcons-Regular.ttf +0 -0
  5. data/app/assets/fonts/MaterialIcons-Regular.woff +0 -0
  6. data/app/assets/fonts/MaterialIcons-Regular.woff2 +0 -0
  7. data/app/assets/images/bg/amber.jpg +0 -0
  8. data/app/assets/images/bg/brand.jpg +0 -0
  9. data/app/assets/images/bg/green.jpg +0 -0
  10. data/app/assets/images/bg/purple.jpg +0 -0
  11. data/app/assets/images/bg/red.jpg +0 -0
  12. data/app/assets/images/bg/teal.jpg +0 -0
  13. data/app/assets/javascripts/material.js +664 -507
  14. data/app/assets/javascripts/material.min.js +2 -0
  15. data/app/assets/javascripts/material/_.js +6 -3
  16. data/app/assets/javascripts/material/bootstrap.js +6 -3
  17. data/app/assets/javascripts/material/datepicker.js +95 -64
  18. data/app/assets/javascripts/material/form-adv-label.js +49 -0
  19. data/app/assets/javascripts/material/form-adv-textarea.js +13 -0
  20. data/app/assets/javascripts/material/header.js +12 -56
  21. data/app/assets/javascripts/material/menu.js +188 -38
  22. data/app/assets/javascripts/material/modal.js +10 -8
  23. data/app/assets/javascripts/material/snackbar.js +116 -0
  24. data/app/assets/javascripts/material/tab.js +47 -27
  25. data/app/assets/javascripts/material/tile.js +169 -74
  26. data/app/assets/javascripts/material/wave.js +12 -7
  27. data/app/assets/stylesheets/material.min.css +13 -0
  28. data/app/assets/stylesheets/material/addons/_material-icons.scss +9 -0
  29. data/app/assets/stylesheets/material/addons/_waves.scss +44 -0
  30. data/app/assets/stylesheets/material/{addon/material-design-icon → addons/material-icons}/_core.scss +8 -8
  31. data/app/assets/stylesheets/material/{addon/material-design-icon → addons/material-icons}/_larger.scss +5 -2
  32. data/app/assets/stylesheets/material/addons/material-icons/_path.scss +11 -0
  33. data/app/assets/stylesheets/material/addons/material-icons/_variables.scss +3 -0
  34. data/app/assets/stylesheets/material/base.scss +39 -40
  35. data/app/assets/stylesheets/material/{_grid.scss → base/_grid.scss} +13 -12
  36. data/app/assets/stylesheets/material/{_reset.scss → base/_reset.scss} +160 -161
  37. data/app/assets/stylesheets/material/components/_avatar.scss +94 -0
  38. data/app/assets/stylesheets/material/{element → components}/_breadcrumb.scss +3 -4
  39. data/app/assets/stylesheets/material/components/_button-flat.scss +35 -0
  40. data/app/assets/stylesheets/material/components/_button-float.scss +187 -0
  41. data/app/assets/stylesheets/material/components/_button.scss +86 -0
  42. data/app/assets/stylesheets/material/components/_card.scss +175 -0
  43. data/app/assets/stylesheets/material/{_code.scss → components/_code.scss} +14 -12
  44. data/app/assets/stylesheets/material/components/_dropdown.scss +103 -0
  45. data/app/assets/stylesheets/material/components/_form-adv-checkbox.scss +161 -0
  46. data/app/assets/stylesheets/material/{element → components}/_form-adv-datepicker.scss +87 -108
  47. data/app/assets/stylesheets/material/{element → components}/_form-adv-label.scss +17 -23
  48. data/app/assets/stylesheets/material/components/_form-adv-switch.scss +96 -0
  49. data/app/assets/stylesheets/material/{element → components}/_form-adv-textarea.scss +1 -1
  50. data/app/assets/stylesheets/material/{element → components}/_form.scss +34 -95
  51. data/app/assets/stylesheets/material/components/_label.scss +23 -0
  52. data/app/assets/stylesheets/material/{element → components}/_modal.scss +43 -18
  53. data/app/assets/stylesheets/material/{element → components}/_nav.scss +15 -8
  54. data/app/assets/stylesheets/material/{element → components}/_progress-circular.scss +36 -32
  55. data/app/assets/stylesheets/material/{element → components}/_progress-loadbar.scss +15 -21
  56. data/app/assets/stylesheets/material/{element → components}/_progress.scss +40 -30
  57. data/app/assets/stylesheets/material/components/_snackbar.scss +60 -0
  58. data/app/assets/stylesheets/material/components/_tab.scss +85 -0
  59. data/app/assets/stylesheets/material/components/_table.scss +82 -0
  60. data/app/assets/stylesheets/material/components/_tile.scss +155 -0
  61. data/app/assets/stylesheets/material/elements/_content.scss +42 -0
  62. data/app/assets/stylesheets/material/elements/_footer.scss +10 -0
  63. data/app/assets/stylesheets/material/elements/_header.scss +145 -0
  64. data/app/assets/stylesheets/material/{theme → elements}/_menu.scss +92 -150
  65. data/app/assets/stylesheets/material/mixin/_grid.scss +1 -9
  66. data/app/assets/stylesheets/material/mixin/_responsive.scss +1 -1
  67. data/app/assets/stylesheets/material/mixin/_utilities.scss +1 -1
  68. data/app/assets/stylesheets/material/{_print.scss → utilities/_print.scss} +4 -4
  69. data/app/assets/stylesheets/material/{_utilities-responsive.scss → utilities/_utilities-responsive.scss} +1 -1
  70. data/app/assets/stylesheets/material/{_utilities.scss → utilities/_utilities.scss} +197 -110
  71. data/app/assets/stylesheets/material/var/_colours.scss +336 -0
  72. data/app/assets/stylesheets/material/var/_variables.scss +78 -0
  73. data/lib/material-sass/version.rb +1 -1
  74. metadata +55 -53
  75. data/app/assets/javascripts/material/content.js +0 -46
  76. data/app/assets/javascripts/material/dropdown.js +0 -18
  77. data/app/assets/javascripts/material/esc.js +0 -10
  78. data/app/assets/javascripts/material/footer.js +0 -6
  79. data/app/assets/javascripts/material/form-adv.js +0 -64
  80. data/app/assets/javascripts/material/get-target.js +0 -8
  81. data/app/assets/javascripts/material/toast.js +0 -79
  82. data/app/assets/javascripts/material/webfont.js +0 -47
  83. data/app/assets/javascripts/material/winresize.js +0 -28
  84. data/app/assets/stylesheets/material/_variable.scss +0 -120
  85. data/app/assets/stylesheets/material/addon/_material-design-icon.scss +0 -9
  86. data/app/assets/stylesheets/material/addon/_waves.scss +0 -45
  87. data/app/assets/stylesheets/material/addon/material-design-icon/_path.scss +0 -11
  88. data/app/assets/stylesheets/material/addon/material-design-icon/_variables.scss +0 -3
  89. data/app/assets/stylesheets/material/element/_avatar.scss +0 -67
  90. data/app/assets/stylesheets/material/element/_button-flat.scss +0 -32
  91. data/app/assets/stylesheets/material/element/_button-float.scss +0 -202
  92. data/app/assets/stylesheets/material/element/_button.scss +0 -95
  93. data/app/assets/stylesheets/material/element/_card.scss +0 -245
  94. data/app/assets/stylesheets/material/element/_dropdown.scss +0 -132
  95. data/app/assets/stylesheets/material/element/_form-adv-checkbox.scss +0 -109
  96. data/app/assets/stylesheets/material/element/_form-adv-switch.scss +0 -102
  97. data/app/assets/stylesheets/material/element/_label.scss +0 -22
  98. data/app/assets/stylesheets/material/element/_sortable.scss +0 -8
  99. data/app/assets/stylesheets/material/element/_tab.scss +0 -107
  100. data/app/assets/stylesheets/material/element/_table.scss +0 -48
  101. data/app/assets/stylesheets/material/element/_tile.scss +0 -193
  102. data/app/assets/stylesheets/material/element/_toast.scss +0 -67
  103. data/app/assets/stylesheets/material/project.scss +0 -8
  104. data/app/assets/stylesheets/material/theme/_content.scss +0 -74
  105. data/app/assets/stylesheets/material/theme/_footer.scss +0 -17
  106. data/app/assets/stylesheets/material/theme/_header.scss +0 -128
@@ -1,36 +1,14 @@
1
1
  .menu {
2
2
  backface-visibility: hidden;
3
- background-color: transparent;
4
- height: 100%;
3
+ display: none;
5
4
  overflow: hidden;
5
+ outline: 0;
6
6
  position: fixed;
7
- top: 0;
8
- left: 0;
9
- transition: background-color 0.3s $timing, width 0s 0.3s;
10
- width: 0;
7
+ top: 0;
8
+ right: 0;
9
+ bottom: 0;
10
+ left: 0;
11
11
  z-index: ($header-base + 1);
12
- &.open {
13
- background-color: rgba(0, 0, 0, 0.5);
14
- transition: background-color 0.15s $timing, width 0s;
15
- width: 100%;
16
- }
17
- &.menu-right {
18
- // position
19
- right: 0;
20
- left: auto;
21
- }
22
- // 992
23
- @include responsive(md) {
24
- &.open {
25
- background-color: transparent;
26
- overflow: visible;
27
- width: ($grid-gutter * 20);
28
- }
29
- &.menu-right.open ~ .fbtn-container {
30
- // position
31
- right: ($grid-gutter * 21);
32
- }
33
- }
34
12
  }
35
13
 
36
14
  .menu-collapse-toggle {
@@ -38,7 +16,7 @@
38
16
  cursor: pointer;
39
17
  display: block;
40
18
  float: right;
41
- padding: ($line-height / 2) $grid-gutter;
19
+ padding: (($nav-height - $line-height) / 2) $grid-gutter;
42
20
  position: absolute;
43
21
  top: 0;
44
22
  right: 0;
@@ -50,15 +28,17 @@
50
28
 
51
29
  .menu-collapse-toggle-close {
52
30
  margin-top: ($font-size / -2);
31
+ margin-left: ($font-size / -2);
53
32
  opacity: 1;
54
33
  position: absolute;
55
34
  top: 50%;
56
- left: 0;
35
+ left: 50%;
57
36
  text-align: center;
58
37
  transform: rotate(0);
59
- transition: all 0.3s $timing;
38
+ transition-duration: 0.3s;
60
39
  transition-property: opacity, transform;
61
- width: 100%;
40
+ transition-timing-function: $timing;
41
+ width: $font-size;
62
42
  .menu-collapse-toggle.collapsed & {
63
43
  opacity: 0;
64
44
  transform: rotate(-225deg);
@@ -68,8 +48,9 @@
68
48
  .menu-collapse-toggle-default {
69
49
  opacity: 0;
70
50
  transform: rotate(225deg);
71
- transition: all 0.3s $timing;
51
+ transition-duration: 0.3s;
72
52
  transition-property: opacity, transform;
53
+ transition-timing-function: $timing;
73
54
  .menu-collapse-toggle.collapsed & {
74
55
  opacity: 1;
75
56
  transform: rotate(0);
@@ -77,26 +58,21 @@
77
58
  }
78
59
 
79
60
  .menu-content {
80
- padding-top: ($line-height / 2);
81
- padding-bottom: ($line-height / 2);
82
- hr {
83
- border-top-color: $black-bg;
84
- margin-top: ($line-height / 2);
85
- margin-bottom: ($line-height / 2);
86
- }
61
+ padding-top: $margin-base;
62
+ padding-bottom: $margin-base;
87
63
  .nav {
88
64
  margin-top: 0;
89
65
  margin-bottom: 0;
90
66
  a,
91
67
  .a {
92
- color: $black-sec;
93
- font-weight: $font-weight-bold;
68
+ color: $black-text-solid;
69
+ font-weight: $font-weight-medium;
94
70
  overflow: hidden;
95
71
  text-overflow: ellipsis;
96
72
  white-space: nowrap;
97
73
  &:focus,
98
74
  &:hover {
99
- background-color: $white-bg;
75
+ background-color: $offwhite-solid;
100
76
  }
101
77
  .fa,
102
78
  .icon {
@@ -112,41 +88,31 @@
112
88
  ul {
113
89
  a,
114
90
  .a {
115
- font-weight: $font-weight;
91
+ font-weight: $font-weight-normal;
116
92
  padding-left: ($grid-gutter * 2);
117
93
  }
118
94
  ul {
119
95
  a,
120
96
  .a {
121
- font-size: 90%;
97
+ font-size: $font-size-h6;
122
98
  font-weight: $font-weight-light;
123
- padding-top: ($line-height / 4);
124
- padding-bottom: ($line-height / 4);
99
+ padding-top: (($nav-height - $line-height) / 4);
100
+ padding-bottom: (($nav-height - $line-height) / 4);
125
101
  padding-left: ($grid-gutter * 3);
126
102
  }
127
103
  }
128
104
  }
129
105
  }
130
- // no boxshadow
131
- .nav {
132
- .no-boxshadow & {
133
- margin-right: 1px;
134
- }
135
- .no-boxshadow .menu.menu-right & {
136
- margin-right: 0;
137
- margin-left: 1px;
138
- }
139
- }
140
106
  }
141
107
 
142
108
  // colour
143
- @each $color in $palette-list {
144
- $i: index($palette-list, $color);
109
+ @each $color in $palette-list-class {
110
+ $i: index($palette-list-class, $color);
145
111
 
146
112
  .page-#{$color} .menu-content .nav li.active {
147
113
  > a,
148
114
  > .a {
149
- color: nth($palette-color, $i);
115
+ color: nth($palette-list-color, $i);
150
116
  }
151
117
  }
152
118
  }
@@ -156,20 +122,39 @@
156
122
  padding-left: $grid-gutter;
157
123
  }
158
124
 
125
+ .menu-backdrop {
126
+ backface-visibility: hidden;
127
+ background-color: $black;
128
+ opacity: 0;
129
+ position: fixed;
130
+ top: 0;
131
+ right: 0;
132
+ bottom: 0;
133
+ left: 0;
134
+ transition: opacity 0.3s $timing;
135
+ z-index: $header-base;
136
+ &.in {
137
+ opacity: 0.5;
138
+ }
139
+ }
140
+
159
141
  .menu-logo {
160
142
  @extend .header-logo;
161
- border-bottom: 1px solid $black-bg;
162
- color: $black-text;
143
+ border-bottom: 1px solid $black-divider-solid;
144
+ color: $black-text-solid;
163
145
  float: none;
164
- margin-bottom: ($line-height / 2);
146
+ height: $header-height;
147
+ margin-right: 0;
148
+ margin-bottom: $margin-base;
149
+ margin-left: 0;
150
+ padding: (($header-height - $line-height-h4) / 2) $grid-gutter (($header-height - $line-height-h4) / 2 - 1);
165
151
  &:focus,
166
152
  &:hover {
167
- color: $black-text;
168
- text-decoration: none;
153
+ color: $black-text-solid;
169
154
  }
170
155
  .menu-content > & {
171
156
  &:first-child {
172
- margin-top: ($line-height / -2);
157
+ margin-top: ($margin-base * -1);
173
158
  }
174
159
  }
175
160
  }
@@ -179,83 +164,43 @@
179
164
  height: 100%;
180
165
  max-width: 85%;
181
166
  max-width: calc(100% - #{$grid-gutter * 4});
182
- overflow: hidden;
183
- position: absolute;
167
+ overflow-x: hidden;
168
+ overflow-y: auto;
169
+ position: fixed;
184
170
  top: 0;
185
- left: ($grid-gutter * -20);
186
- transition: all 0.3s $timing;
187
- transition-property: box-shadow, left;
171
+ left: 0;
172
+ transform: translateX(-100%);
173
+ transition: transform 0.3s $timing;
188
174
  width: ($grid-gutter * 20);
189
175
  z-index: 1;
190
- .menu.open & {
191
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
192
- // left
193
- left: 0;
194
- }
176
+ -webkit-overflow-scrolling: touch;
177
+ -ms-overflow-style: none;
195
178
  .menu-right & {
196
- // position
197
- right: ($grid-gutter * -20);
198
- left: auto;
199
- transition-property: box-shadow, right;
200
- }
201
- .menu-right.open & {
202
179
  // position
203
180
  right: 0;
204
181
  left: auto;
182
+ transform: translateX(100%);
183
+ }
184
+ .menu.in & {
185
+ transform: translateX(0);
205
186
  }
206
187
  // 992
207
188
  @include responsive(md) {
208
189
  max-width: none;
209
190
  }
210
- // no boxshadow
211
- .no-boxshadow & {
212
- &:after {
213
- background-color: $black-bg;
214
- content: "";
215
- display: block;
216
- height: 100%;
217
- position: absolute;
218
- top: 0;
219
- right: 0;
220
- width: 1px;
221
- }
222
- }
223
- .no-boxshadow .menu.menu-right & {
224
- &:after {
225
- // position
226
- right: auto;
227
- left: 0;
228
- }
229
- }
230
191
  }
231
192
 
232
193
  .menu-top {
233
- background-color: $brand-color-dark-m;
234
- color: $white-bg;
194
+ background-color: $black;
195
+ color: $white-text-solid;
235
196
  position: relative;
236
197
  z-index: 1;
237
- a {
238
- color: $white-bg;
198
+ a,
199
+ a:focus,
200
+ a:hover {
201
+ color: inherit;
239
202
  text-decoration: none;
240
- &:focus,
241
- &:hover {
242
- color: $white;
243
- }
244
- }
245
- }
246
-
247
- // colour
248
- @each $color in $palette-list {
249
- $i: index($palette-list, $color);
250
-
251
- .page-#{$color} .menu-top {
252
- background-color: nth($palette-color-dark-m, $i);
253
- }
254
203
  }
255
-
256
- .menu-top-form {
257
- margin-top: ($line-height / 4);
258
- margin-bottom: ($line-height / 4);
259
204
  }
260
205
 
261
206
  .menu-top-img {
@@ -276,49 +221,41 @@
276
221
  }
277
222
 
278
223
  .menu-top-info {
279
- padding: ($line-height * 1.5) $grid-gutter;
224
+ padding: $margin-sm $grid-gutter;
280
225
  position: relative;
226
+ // 768
227
+ @include responsive(sm) {
228
+ padding-top: $margin-md;
229
+ padding-bottom: $margin-md;
230
+ }
281
231
  }
282
232
 
283
233
  .menu-top-info-sub {
284
234
  font-weight: $font-weight-light;
285
- padding: ($line-height / 2) $grid-gutter;
235
+ padding: $margin-sm $grid-gutter;
286
236
  position: relative;
237
+ // 768
238
+ @include responsive(sm) {
239
+ padding-top: $margin-md;
240
+ }
287
241
  }
288
242
 
289
243
  .menu-top-user {
290
244
  align-items: center;
291
245
  display: flex;
292
- @include clearfix();
293
- }
294
-
295
- .menu-wrap {
296
- overflow-x: hidden;
297
- overflow-y: auto;
298
- position: absolute;
299
- top: 0;
300
- right: 0;
301
- bottom: 0;
302
- left: 0;
303
- -webkit-overflow-scrolling: touch;
304
- -ms-overflow-style: none;
305
- // 480
306
- @include responsive(xs) {
307
- padding-right: ($grid-gutter * 2);
308
- // position
309
- right: ($grid-gutter * -2);
310
- }
311
246
  }
312
247
 
313
248
  @mixin nav-drawer() {
314
249
  background-color: transparent;
250
+ display: block !important;
315
251
  overflow: visible;
316
252
  width: ($grid-gutter * 15);
317
- .menu-scroll {
318
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
319
- // left
320
- left: 0;
321
- width: ($grid-gutter * 15);
253
+ z-index: $header-base;
254
+ &.in ~ .menu-backdrop {
255
+ display: none;
256
+ ~ .menu-backdrop {
257
+ display: block;
258
+ }
322
259
  }
323
260
  &.menu-left {
324
261
  ~ .content {
@@ -350,6 +287,11 @@
350
287
  right: ($grid-gutter * 15);
351
288
  }
352
289
  }
290
+ .menu-scroll {
291
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
292
+ transform: none;
293
+ width: ($grid-gutter * 15);
294
+ }
353
295
  }
354
296
 
355
297
  .nav-drawer {
@@ -4,14 +4,6 @@
4
4
  padding-right: $grid-gutter;
5
5
  padding-left: $grid-gutter;
6
6
  @include clearfix();
7
- // 992
8
- @include responsive(md) {
9
- max-width: ($screen-md - $grid-gutter * 2);
10
- }
11
- // 1440
12
- @include responsive(lg) {
13
- max-width: ($screen-lg - $grid-gutter * 2);
14
- }
15
7
  }
16
8
 
17
9
  @mixin make-row() {
@@ -83,4 +75,4 @@
83
75
  @include loop-col($grid-cols, $class, offset);
84
76
  @include loop-col($grid-cols, $class, pull);
85
77
  @include loop-col($grid-cols, $class, push);
86
- }
78
+ }
@@ -29,4 +29,4 @@
29
29
  @content;
30
30
  }
31
31
  }
32
- }
32
+ }
@@ -33,4 +33,4 @@
33
33
  overflow: hidden;
34
34
  text-overflow: ellipsis;
35
35
  white-space: nowrap;
36
- }
36
+ }
@@ -27,7 +27,7 @@
27
27
 
28
28
  blockquote,
29
29
  pre {
30
- border: 1px solid $black-hint;
30
+ border: 1px solid $black-divider-solid;
31
31
  page-break-inside: avoid;
32
32
  }
33
33
 
@@ -65,7 +65,7 @@
65
65
 
66
66
  .card,
67
67
  .tile {
68
- border: 1px solid $black-hint;
68
+ border: 1px solid $black-divider-solid;
69
69
  }
70
70
 
71
71
  .fbtn-container,
@@ -83,7 +83,7 @@
83
83
  }
84
84
 
85
85
  .tab-nav .nav > li.active > a {
86
- border-bottom: 3px solid $black-text;
86
+ border-bottom: 3px solid $black-divider-solid;
87
87
  padding-bottom: ($line-height / 2 - 3);
88
88
  }
89
89
  }
@@ -116,4 +116,4 @@
116
116
  .hidden-print {
117
117
  display: none !important;
118
118
  }
119
- }
119
+ }