material-sass 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,13 +1,13 @@
1
1
  .nav {
2
2
  list-style: none;
3
- margin: $line-height 0;
3
+ margin: $margin-md 0;
4
4
  padding: 0;
5
5
  position: relative;
6
6
  @include clearfix();
7
7
  a,
8
8
  .a {
9
9
  display: block;
10
- padding: ($line-height / 2) $grid-gutter;
10
+ padding: (($nav-height - $line-height) / 2) $grid-gutter;
11
11
  position: relative;
12
12
  &:focus,
13
13
  &:hover {
@@ -24,20 +24,27 @@
24
24
  }
25
25
  }
26
26
 
27
+ .nav-justified,
28
+ .nav-list {
29
+ align-items: flex-start;
30
+ display: flex;
31
+ justify-content: flex-start;
32
+ }
33
+
27
34
  .nav-justified {
28
- width: 100%;
35
+ flex-wrap: nowrap;
29
36
  > li {
30
- display: table-cell !important;
31
- float: none !important;
32
- width: 1% !important;
33
- > a {
37
+ flex-grow: 1;
38
+ > a,
39
+ > .a {
34
40
  text-align: center;
35
41
  }
36
42
  }
37
43
  }
38
44
 
39
45
  .nav-list {
46
+ flex-wrap: wrap;
40
47
  > li {
41
48
  float: left;
42
49
  }
43
- }
50
+ }
@@ -1,10 +1,10 @@
1
1
  .progress-circular {
2
- height: ($line-height * 2);
3
- margin-top: $line-height;
4
- margin-bottom: $line-height;
2
+ height: $pcircular-height;
3
+ margin-top: $margin-md;
4
+ margin-bottom: $margin-md;
5
5
  overflow: hidden;
6
6
  position: relative;
7
- width: ($line-height * 2);
7
+ width: $pcircular-height;
8
8
  }
9
9
 
10
10
  .progress-circular-center {
@@ -13,21 +13,23 @@
13
13
  }
14
14
 
15
15
  .progress-circular-gap {
16
- border-top: ($base / 2) solid $link-color;
16
+ border-top: 2px solid $brand-color-accent;
17
17
  position: absolute;
18
18
  top: 0;
19
- right: ($line-height - 1);
19
+ right: ($pcircular-height / 2 - 1);
20
20
  bottom: 0;
21
- left: ($line-height - 1);
21
+ left: ($pcircular-height / 2 - 1);
22
22
  }
23
23
 
24
24
  // colour
25
- @each $color in $palette-list {
26
- $i: index($palette-list, $color);
27
-
28
- .progress-circular-gap {
29
- .progress-circular-#{$color} & {
30
- border-top-color: nth($palette-color, $i);
25
+ @each $color in $palette-list-class {
26
+ $i: index($palette-list-class, $color);
27
+
28
+ @if $color != "brand-accent" {
29
+ .progress-circular-gap {
30
+ .progress-circular-#{$color} & {
31
+ border-top-color: nth($palette-list-color, $i);
32
+ }
31
33
  }
32
34
  }
33
35
  }
@@ -40,19 +42,19 @@
40
42
 
41
43
  .progress-circular-inner {
42
44
  animation: pcircular-inner-rotate 5.25s cubic-bezier(0.35, 0, 0.25, 1) infinite;
43
- height: ($line-height * 2);
45
+ height: $pcircular-height;
44
46
  position: relative;
45
- width: ($line-height * 2);
47
+ width: $pcircular-height;
46
48
  will-change: transform;
47
49
  }
48
50
 
49
51
  .progress-circular-left,
50
52
  .progress-circular-right {
51
- height: ($line-height * 2);
53
+ height: $pcircular-height;
52
54
  overflow: hidden;
53
55
  position: absolute;
54
56
  top: 0;
55
- width: $line-height;
57
+ width: ($pcircular-height / 2);
56
58
  }
57
59
 
58
60
  .progress-circular-left {
@@ -66,13 +68,13 @@
66
68
  }
67
69
 
68
70
  .progress-circular-spinner {
69
- border: ($base / 2) solid $link-color;
71
+ border: ($base / 2) solid $brand-color-accent;
70
72
  border-bottom-color: transparent;
71
73
  border-radius: 50%;
72
- height: ($line-height * 2);
74
+ height: $pcircular-height;
73
75
  position: absolute;
74
76
  top: 0;
75
- width: ($line-height * 2);
77
+ width: $pcircular-height;
76
78
  will-change: transform;
77
79
  .progress-circular-left & {
78
80
  animation: pcircular-spinner-left 1.3125s cubic-bezier(0.35, 0, 0.25, 1) infinite;
@@ -89,18 +91,20 @@
89
91
  }
90
92
 
91
93
  // colour
92
- @each $color in $palette-list {
93
- $i: index($palette-list, $color);
94
-
95
- .progress-circular-spinner {
96
- .progress-circular-#{$color} & {
97
- border-top-color: nth($palette-color, $i);
98
- }
99
- .progress-circular-#{$color} .progress-circular-left & {
100
- border-left-color: nth($palette-color, $i);
101
- }
102
- .progress-circular-#{$color} .progress-circular-right & {
103
- border-right-color: nth($palette-color, $i);
94
+ @each $color in $palette-list-class {
95
+ $i: index($palette-list-class, $color);
96
+
97
+ @if $color != "brand-accent" {
98
+ .progress-circular-spinner {
99
+ .progress-circular-#{$color} & {
100
+ border-top-color: nth($palette-list-color, $i);
101
+ }
102
+ .progress-circular-#{$color} .progress-circular-left & {
103
+ border-left-color: nth($palette-list-color, $i);
104
+ }
105
+ .progress-circular-#{$color} .progress-circular-right & {
106
+ border-right-color: nth($palette-list-color, $i);
107
+ }
104
108
  }
105
109
  }
106
110
  }
@@ -9,18 +9,18 @@
9
9
  }
10
10
 
11
11
  .load-bar-base {
12
- animation: load-bar-right-in 1s $timing 1 forwards;
13
- background-color: $link-color;
12
+ animation: load-bar-right-in 0.9s $timing 1 forwards;
13
+ background-color: $brand-color-accent;
14
14
  float: left;
15
15
  height: 100%;
16
16
  overflow: hidden;
17
- transform: translate3d(-100%, 0, 0);
17
+ transform: translate(-100%, 0);
18
18
  transform-origin: top right;
19
19
  width: 100%;
20
20
  will-change: transform;
21
21
  .load-bar:first-child & {
22
- animation: load-bar-left-in 1s $timing 1 forwards;
23
- transform: translate3d(100%, 0, 0);
22
+ animation: load-bar-left-in 0.9s $timing 1 forwards;
23
+ transform: translate(100%, 0);
24
24
  transform-origin: top left;
25
25
  }
26
26
  }
@@ -29,28 +29,24 @@
29
29
  @keyframes load-bar-left-in {
30
30
  0% {
31
31
  transform: translate(100%, 0);
32
- transform: translate3d(100%, 0, 0);
33
32
  }
34
33
  100% {
35
34
  transform: translate(0, 0);
36
- transform: translate3d(0, 0, 0);
37
35
  }
38
36
  }
39
37
 
40
38
  @keyframes load-bar-right-in {
41
39
  0% {
42
40
  transform: translate(-100%, 0);
43
- transform: translate3d(-100%, 0, 0);
44
41
  }
45
42
  100% {
46
43
  transform: translate(0, 0);
47
- transform: translate3d(0, 0, 0);
48
44
  }
49
45
  }
50
46
 
51
47
  .load-bar-content {
52
- animation: load-bar-right 4s linear infinite forwards;
53
- animation-delay: 1s;
48
+ animation: load-bar-right 3.6s linear infinite forwards;
49
+ animation-delay: 0.9s;
54
50
  float: left;
55
51
  height: 100%;
56
52
  position: relative;
@@ -58,8 +54,8 @@
58
54
  width: 400%;
59
55
  will-change: transform;
60
56
  .load-bar:first-child & {
61
- animation: load-bar-left 4s linear infinite forwards;
62
- animation-delay: 1s;
57
+ animation: load-bar-left 3.6s linear infinite forwards;
58
+ animation-delay: 0.9s;
63
59
  }
64
60
  }
65
61
 
@@ -67,22 +63,18 @@
67
63
  @keyframes load-bar-left {
68
64
  0% {
69
65
  transform: translate(0, 0);
70
- transform: translate3d(0, 0, 0);
71
66
  }
72
67
  100% {
73
68
  transform: translate(-100%, 0);
74
- transform: translate3d(-100%, 0, 0);
75
69
  }
76
70
  }
77
71
 
78
72
  @keyframes load-bar-right {
79
73
  0% {
80
74
  transform: translate(-100%, 0);
81
- transform: translate3d(-100%, 0, 0);
82
75
  }
83
76
  100% {
84
77
  transform: translate(0, 0);
85
- transform: translate3d(0, 0, 0);
86
78
  }
87
79
  }
88
80
 
@@ -94,10 +86,12 @@
94
86
  }
95
87
 
96
88
  // colour
97
- @each $color in $palette-list {
98
- $i: index($palette-list, $color);
89
+ @each $color in $palette-list-class {
90
+ $i: index($palette-list-class, $color);
99
91
 
100
- .load-bar-progress-#{$color} {
101
- background-color: nth($palette-color, $i);
92
+ @if $color != "brand-accent" {
93
+ .load-bar-progress-#{$color} {
94
+ background-color: nth($palette-list-color, $i);
95
+ }
102
96
  }
103
97
  }
@@ -1,14 +1,14 @@
1
1
  .progress {
2
- background-color: lighten($link-color, 30%);
2
+ background-color: $brand-color-accent-light;
3
3
  height: ($base / 2);
4
- margin-top: ($line-height - $base / 4);
5
- margin-bottom: ($line-height - $base / 4);
4
+ margin-top: $margin-md;
5
+ margin-bottom: $margin-md;
6
6
  overflow: hidden;
7
7
  position: relative;
8
8
  }
9
9
 
10
10
  .progress-bar {
11
- background-color: $link-color;
11
+ background-color: $brand-color-accent;
12
12
  border-radius: 0 1px 1px 0;
13
13
  height: 100%;
14
14
  position: absolute;
@@ -18,21 +18,26 @@
18
18
  }
19
19
 
20
20
  // colour
21
- @each $color in $palette-list {
22
- $i: index($palette-list, $color);
21
+ @each $color in $palette-list-class {
22
+ $i: index($palette-list-class, $color);
23
23
 
24
- .progress-#{$color} {
25
- background-color: nth($palette-color-light, $i);
26
- .progress-bar {
27
- background-color: nth($palette-color, $i);
24
+ @if $color != "brand-accent" {
25
+ .progress-#{$color} {
26
+ background-color: nth($palette-list-light, $i);
27
+ .progress-bar {
28
+ background-color: nth($palette-list-color, $i);
29
+ }
28
30
  }
29
31
  }
30
32
  }
31
33
 
32
34
  .progress-bar-indeterminate {
33
- background-color: $link-color;
35
+ background-color: $brand-color-accent;
34
36
  &:after,
35
37
  &:before {
38
+ animation-duration: 2.1s;
39
+ animation-iteration-count: infinite;
40
+ animation-timing-function: linear;
36
41
  background-color: inherit;
37
42
  border-radius: 1px;
38
43
  content: '';
@@ -41,14 +46,18 @@
41
46
  top: 0;
42
47
  bottom: 0;
43
48
  left: 0;
44
- will-change: left, right;
49
+ transition: width 0.3s $timing;
50
+ will-change: left, width;
45
51
  }
46
52
  &:after {
47
- animation: pbar-indeterminate-one 3s cubic-bezier(0.6, 0.8, 0.6, 0.4) infinite;
53
+ animation-name: pbar-indeterminate-one;
54
+ // position
55
+ left: 0;
48
56
  }
49
57
  &:before {
50
- animation: pbar-indeterminate-two 3s cubic-bezier(0.2, 0.8, 0.2, 0.8) infinite;
51
- animation-delay: 1.5s;
58
+ animation-name: pbar-indeterminate-two;
59
+ // position
60
+ right: 0;
52
61
  }
53
62
  }
54
63
 
@@ -56,36 +65,37 @@
56
65
  @keyframes pbar-indeterminate-one {
57
66
  0% {
58
67
  // position
59
- right: 100%;
60
- left: -35%;
68
+ left: 0%;
69
+ width: 0%;
61
70
  }
62
- 60% {
71
+ 50% {
63
72
  // position
64
- right: -90%;
65
- left: 100%;
73
+ left: 25%;
74
+ width: 75%;
66
75
  }
67
- 100% {
76
+ 75% {
68
77
  // position
69
- right: -90%;
70
78
  left: 100%;
79
+ width: 0%;
71
80
  }
72
81
  }
73
82
 
74
83
  @keyframes pbar-indeterminate-two {
75
- 0% {
84
+ 0%,
85
+ 50% {
76
86
  // position
77
- right: 100%;
78
- left: -150%;
87
+ left: 0%;
88
+ width: 0%;
79
89
  }
80
- 60% {
90
+ 75% {
81
91
  // position
82
- right: -35%;
83
- left: 135%;
92
+ left: 0%;
93
+ width: 25%;
84
94
  }
85
95
  100% {
86
96
  // position
87
- right: -35%;
88
- left: 135%;
97
+ left: 100%;
98
+ width: 0%;
89
99
  }
90
100
  }
91
101
 
@@ -0,0 +1,60 @@
1
+ .snackbar {
2
+ position: fixed;
3
+ right: 0;
4
+ bottom: 0;
5
+ left: 0;
6
+ z-index: ($content-base + 1);
7
+ a {
8
+ cursor: pointer;
9
+ &:focus,
10
+ &:hover {
11
+ text-decoration: none;
12
+ }
13
+ }
14
+ // 768
15
+ @include responsive(sm) {
16
+ padding-right: $grid-gutter;
17
+ padding-left: $grid-gutter;
18
+ // position
19
+ bottom: $margin-md;
20
+ .fbtn-container ~ & {
21
+ // position
22
+ right: ($base * 2 + $fbtn-height + $grid-gutter);
23
+ }
24
+ }
25
+ }
26
+
27
+ .snackbar-inner {
28
+ backface-visibility: hidden;
29
+ background-color: $black-text;
30
+ box-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
31
+ color: $white-text-solid;
32
+ display: flex;
33
+ max-width: 100%;
34
+ padding: $margin-sm $grid-gutter;
35
+ transform: translate(0, 200%);
36
+ transition: transform 0.3s $timing;
37
+ @include clearfix();
38
+ &.in {
39
+ transform: translate(0, 0);
40
+ }
41
+ // 768
42
+ @include responsive(sm) {
43
+ border-radius: 2px;
44
+ float: left;
45
+ }
46
+ }
47
+
48
+ .snackbar-text {
49
+ overflow: hidden;
50
+ }
51
+
52
+ [data-dismiss="snackbar"] {
53
+ cursor: pointer;
54
+ float: right;
55
+ font-weight: $font-weight-medium;
56
+ margin-left: $grid-gutter;
57
+ order: 1;
58
+ text-transform: uppercase;
59
+ white-space: nowrap;
60
+ }