dlegr250_material_design 0.1.15 → 0.1.16

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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dlegr250_material_design/version.rb +1 -1
  3. data/vendor/assets/javascripts/base/init.js.coffee +1 -0
  4. data/vendor/assets/javascripts/components/forms.coffee +16 -3
  5. data/vendor/assets/javascripts/components/input_masks.coffee +11 -0
  6. data/vendor/assets/javascripts/components/snackbar_handler.coffee +5 -0
  7. data/vendor/assets/javascripts/dlegr250_material_design.js +1 -0
  8. data/vendor/assets/javascripts/third_party/jquery.inputmask.min.3.2.8-11.js +10 -0
  9. data/vendor/assets/stylesheets/base/base.scss +0 -1
  10. data/vendor/assets/stylesheets/base/global_classes.scss +25 -3
  11. data/vendor/assets/stylesheets/base/mixins.scss +22 -0
  12. data/vendor/assets/stylesheets/base/variables.scss +3 -1
  13. data/vendor/assets/stylesheets/components/badges.scss +14 -3
  14. data/vendor/assets/stylesheets/components/blank_slates.scss +6 -6
  15. data/vendor/assets/stylesheets/components/boxes.scss +33 -2
  16. data/vendor/assets/stylesheets/components/buttons.scss +8 -11
  17. data/vendor/assets/stylesheets/components/cards.scss +13 -1
  18. data/vendor/assets/stylesheets/components/dividers.scss +4 -4
  19. data/vendor/assets/stylesheets/components/forms/fields.scss +105 -12
  20. data/vendor/assets/stylesheets/components/forms/helper_texts.scss +16 -1
  21. data/vendor/assets/stylesheets/components/forms/labels.scss +28 -0
  22. data/vendor/assets/stylesheets/components/forms/segmented_controls.scss +13 -3
  23. data/vendor/assets/stylesheets/components/grid_lists.scss +40 -0
  24. data/vendor/assets/stylesheets/components/lists.scss +78 -136
  25. data/vendor/assets/stylesheets/components/panels.scss +40 -0
  26. data/vendor/assets/stylesheets/components/steppers.scss +100 -0
  27. data/vendor/assets/stylesheets/components/tabs.scss +7 -0
  28. data/vendor/assets/stylesheets/components/tooltips.scss +1 -0
  29. data/vendor/assets/stylesheets/dlegr250_material_design.scss +3 -0
  30. data/vendor/assets/stylesheets/layouts/application/appbar.scss +4 -0
  31. metadata +7 -2
@@ -31,7 +31,7 @@
31
31
  font-weight: normal;
32
32
 
33
33
  &.helper-text-bottom {
34
- display: inline-block;
34
+ display: block;
35
35
  line-height: 1.4;
36
36
  overflow: hidden;
37
37
  padding-top: $spacing-xsmall;
@@ -43,3 +43,18 @@
43
43
  color: color("red") !important;
44
44
  }
45
45
  }
46
+
47
+ // Error msgs
48
+ //----------------------------------------------------------------------
49
+
50
+ .error-messages {
51
+ color: color("red");
52
+ display: block;
53
+ font-size: $font-size-small;
54
+ font-weight: normal;
55
+ line-height: 1.4;
56
+ overflow: hidden;
57
+ padding-top: $spacing-xsmall;
58
+ position: relative;
59
+ vertical-align: middle;
60
+ }
@@ -15,3 +15,31 @@ label.top {
15
15
  display: block;
16
16
  padding-bottom: $spacing-xsmall;
17
17
  }
18
+
19
+ // Labels - marking as required; can be applied to any element, not
20
+ // just label elements.
21
+ //----------------------------------------------------------------------
22
+
23
+ .required:before {
24
+ color: color("red");
25
+ content: "* ";
26
+ }
27
+
28
+ // .field {
29
+ // label.responsive-label {
30
+ // display: block;
31
+ // margin-top: $spacing-xsmall;
32
+ // padding-bottom: $spacing-xsmall;
33
+ // }
34
+ // }
35
+ //
36
+ // @media (min-width: $medium-width) {
37
+ // .field {
38
+ // label.responsive-label {
39
+ // display: inline-block;
40
+ // margin-right: $spacing-normal;
41
+ // text-align: right;
42
+ // width: 160px;
43
+ // }
44
+ // }
45
+ // }
@@ -12,6 +12,9 @@
12
12
  //----------------------------------------------------------------------
13
13
 
14
14
  .segmented-control-container {
15
+ display: inline-block;
16
+ font-size: 0; // To remove extra spacing from inline-block
17
+
15
18
  // First element
16
19
  .segmented-control:first-child {
17
20
  margin-left: 0;
@@ -24,6 +27,7 @@
24
27
  // Last element
25
28
  .segmented-control:last-child {
26
29
  label {
30
+ border-right: 1px solid color("divider");
27
31
  @include rounded-right-corners;
28
32
  }
29
33
  }
@@ -34,9 +38,7 @@
34
38
 
35
39
  .segmented-control {
36
40
  display: inline-block;
37
- float: left;
38
41
  height: $button-height;
39
- margin-left: -1px;
40
42
 
41
43
  // Hide actual radio button
42
44
  input {
@@ -45,13 +47,21 @@
45
47
 
46
48
  label {
47
49
  border: 1px solid color("divider");
50
+ border-right: none;
48
51
  box-sizing: border-box;
49
52
  color: color("helper");
50
53
  display: inline-block;
51
54
  font-weight: normal;
52
55
  height: $button-height;
53
56
  line-height: $button-height;
54
- padding: 0 $spacing-normal;
57
+ padding: 0 ($spacing-normal * 0.75);
58
+ @include transition(background-color 0.30s ease);
59
+ }
60
+
61
+ @media (min-width: $medium-width) {
62
+ label {
63
+ padding: 0 $spacing-normal;
64
+ }
55
65
  }
56
66
 
57
67
  // Default colors
@@ -0,0 +1,40 @@
1
+ //======================================================================
2
+ // EXAMPLE:
3
+ //======================================================================
4
+
5
+ // Gridlists - base
6
+ //----------------------------------------------------------------------
7
+
8
+ // Flex parent
9
+ .gridlist {
10
+ @include flex-grid-list();
11
+ }
12
+
13
+ .gridlist-item {
14
+ box-sizing: border-box;
15
+ display: table-row;
16
+ font-size: $font-size-normal;
17
+ padding: $spacing-normal;
18
+ max-width: $card-width;
19
+ }
20
+
21
+ .gridlist-item-icon {
22
+ color: color("icon");
23
+ display: table-cell;
24
+ font-size: 40px;
25
+ text-align: left;
26
+ vertical-align: top;
27
+ width: 72px;
28
+ }
29
+
30
+ .gridlist-item-primary {
31
+ display: table-cell;
32
+ text-align: left;
33
+ vertical-align: top;
34
+
35
+ .gridlist-item-primary-subtext {
36
+ color: color("helper");
37
+ font-size: $font-size-normal;
38
+ padding-top: $spacing-xsmall;
39
+ }
40
+ }
@@ -8,7 +8,7 @@
8
8
  // <div class="list-item-primary">
9
9
  // Primary text
10
10
  // <div class="list-item-primary-subtext">
11
- // Smaller text
11
+ // Subtext
12
12
  // </div>
13
13
  // </div>
14
14
  // <div class="list-item-secondary">
@@ -31,212 +31,154 @@ ol {
31
31
  }
32
32
  }
33
33
 
34
- // Lists - base
34
+ // Lists - subheader to breakup lists
35
35
  //----------------------------------------------------------------------
36
36
 
37
- .list {
38
- background-color: color("white");
39
- display: table;
40
- table-layout: fixed;
41
- text-align: left;
42
- width: 100%;
37
+ .list-subheader {
38
+ color: color("helper");
39
+ font-weight: 600;
40
+ height: $tab-height;
41
+ line-height: $tab-height;
42
+ padding-left: $spacing-normal;
43
43
  }
44
44
 
45
- // Lists - hoverable
45
+ // Lists - header
46
46
  //----------------------------------------------------------------------
47
47
 
48
- // Hover over rows
49
- .list-hoverable {
50
- .list-item:hover {
51
- background-color: color("hover");
48
+ .list-header {
49
+ background-color: #f2f2f2;
50
+ min-height: 48px;
51
+ @include flex-parent-row();
52
+
53
+ .list-header-title,
54
+ .list-header-secondary {
55
+ box-sizing: border-box;
56
+ padding: $spacing-small $spacing-normal;
52
57
  }
53
58
 
54
- .list-item:active {
55
- .list-item-icon,
56
- .list-item-primary,
57
- .list-item-secondary {
58
- background-color: darken(color("hover"), 5%);
59
- }
59
+ .list-header-title {
60
+ flex: 1;
61
+ font-size: $font-size-large;
62
+ font-weight: bold;
63
+ overflow: hidden;
64
+ text-overflow: ellipsis;
65
+ white-space: nowrap;
66
+ }
67
+
68
+ .list-header-secondary {
69
+ text-align: right;
60
70
  }
61
71
  }
62
72
 
63
- // Lists - bordered (only on specific device dimensions)
73
+ // Lists - base
64
74
  //----------------------------------------------------------------------
65
75
 
66
- // On large and beyond, show borders and corners
67
- @media (min-width: $large-width) {
68
- .list.list-bordered {
76
+ .list {
77
+ background-color: color("white");
78
+
79
+ &.bordered {
69
80
  border: 1px solid color("divider");
70
81
  }
71
82
 
72
- .list-rounded {
73
- @include rounded-corners;
74
-
75
- // Note that rounding the first and last elements assume
76
- // that they are DIV elements. Did not want to use a "*"
77
- // wildcard as that is expensive for CSS.
78
-
79
- // Round first element
80
- .list-item:first-child {
81
- div:first-child {
82
- @include rounded-top-left-corner;
83
- }
84
-
85
- div:last-child {
86
- @include rounded-top-right-corner;
87
- }
83
+ &.divided {
84
+ .list-header,
85
+ .list-item {
86
+ border-bottom: 1px solid color("divider");
88
87
  }
89
88
 
90
- // Round last element
91
89
  .list-item:last-child {
92
- div:first-child {
93
- @include rounded-bottom-left-corner;
94
- }
95
-
96
- div:last-child {
97
- @include rounded-bottom-right-corner;
98
- }
90
+ border-bottom: none;
99
91
  }
100
92
  }
101
93
  }
102
94
 
103
- // Lists - divided
104
- //----------------------------------------------------------------------
105
-
106
- .list-divided > .list-item > div {
107
- border-bottom: 1px solid color("divider");
108
- }
109
-
110
- .list-item-border-top > div {
111
- border-top: 1px solid color("divider");
112
- }
113
-
114
- .list-item-border-bottom > div {
115
- border-bottom: 1px solid color("divider");
116
- }
117
-
118
95
  // Lists - list item
119
96
  //----------------------------------------------------------------------
120
97
 
121
98
  .list-item {
122
- box-sizing: border-box;
123
99
  color: color("text");
124
- display: table-row;
125
- font-size: $font-size-normal;
126
- text-decoration: none;
100
+ @include flex-parent-row();
127
101
  @include transition(background-color 0.30s ease);
128
102
  }
129
103
 
130
- // Lists - list item - shared
104
+ // Lists - list item children
131
105
  //----------------------------------------------------------------------
132
106
 
133
107
  .list-item-icon,
134
108
  .list-item-primary,
135
109
  .list-item-secondary {
136
110
  box-sizing: border-box;
137
- display: table-cell;
138
- height: 48px;
139
- min-height: 48px;
140
- margin: 0;
141
- padding: $spacing-normal 0;
142
- vertical-align: middle;
143
- @include transition(background-color 0.30s ease);
144
-
145
- &.align-top {
146
- padding-top: $spacing-normal;
147
- vertical-align: top;
148
- }
111
+ padding-bottom: $spacing-small;
112
+ padding-top: $spacing-small;
149
113
  }
150
114
 
151
- // Lists - list item - icon
115
+ // Lists - list item icon
152
116
  //----------------------------------------------------------------------
153
117
 
154
118
  .list-item-icon {
155
119
  color: color("icon");
156
120
  font-size: $font-size-icon;
157
- padding: 0;
158
- padding-left: $spacing-normal;
159
- width: 56px; // 72px(width) - 16px(padding-left)
121
+ padding: $spacing-normal;
122
+ text-align: center;
123
+ width: 56px;
160
124
  }
161
125
 
162
- // Lists - list item - primary
126
+ // Lists - list item primary
163
127
  //----------------------------------------------------------------------
164
128
 
165
129
  .list-item-primary {
130
+ flex: 1;
166
131
  overflow: hidden;
167
- padding-left: $spacing-normal;
168
- padding-right: $spacing-normal;
169
132
  text-overflow: ellipsis;
170
133
  white-space: nowrap;
171
134
 
172
- a {
173
- color: color("text");
174
- font-weight: bold;
175
-
176
- &:hover {
177
- text-decoration: underline;
178
- }
179
- }
180
- }
181
-
182
- .list-item-primary-subtext {
183
- color: color("helper");
184
- padding-top: $spacing-xsmall;
185
-
186
- a {
135
+ .list-item-primary-subtext {
187
136
  color: color("helper");
137
+ padding-top: $spacing-xsmall;
188
138
  }
189
139
  }
190
140
 
191
- // Lists - list item - secondary
141
+ // Lists - list item secondary
192
142
  //----------------------------------------------------------------------
193
143
 
194
144
  .list-item-secondary {
195
- text-align: right;
196
- width: $spacing-normal * 2 + $button-icon-height;
145
+ padding-left: $spacing-normal;
197
146
  padding-right: $spacing-normal;
198
-
199
- .icon {
200
- font-size: $font-size-icon;
201
- }
147
+ text-align: right;
202
148
  }
203
149
 
204
150
  // Lists - sizes
205
151
  //----------------------------------------------------------------------
206
152
 
207
- .list-dense {
208
- .list-item-icon,
209
- .list-item-primary,
210
- .list-item-secondary {
211
- padding-bottom: $spacing-small;
212
- padding-top: $spacing-small;
213
- }
214
- }
215
-
216
- // Lists - nested (only 1 level down)
217
- //----------------------------------------------------------------------
153
+ .list {
154
+ &.dense {
155
+ .list-header {
156
+ min-height: 40px;
157
+
158
+ .list-header-title,
159
+ .list-header-secondary {
160
+ padding-bottom: $spacing-xsmall;
161
+ padding-top: $spacing-xsmall;
162
+ }
163
+ }
218
164
 
219
- .list-item-nested {
220
- div:first-child {
221
- padding-left: $spacing-normal * 2;
165
+ .list-item {
166
+ .list-item-icon,
167
+ .list-item-primary,
168
+ .list-item-secondary {
169
+ padding-bottom: $spacing-xsmall;
170
+ padding-top: $spacing-xsmall;
171
+ }
172
+ }
222
173
  }
223
174
  }
224
175
 
225
- // Lists - media queries
176
+ // Lists - hoverable
226
177
  //----------------------------------------------------------------------
227
178
 
228
- @media (min-width: $medium-width) {
229
- .list-item-secondary {
230
- &.one-icons {
231
- width: $spacing-normal * 2 + $button-icon-height;
232
- }
233
-
234
- &.two-icons {
235
- width: $spacing-normal * 2 + $button-icon-height * 2;
236
- }
237
-
238
- &.three-icons {
239
- width: $spacing-normal * 2 + $button-icon-height * 3;
240
- }
179
+ .list.hoverable .list-item {
180
+ &:hover,
181
+ :active {
182
+ background-color: color("hover");
241
183
  }
242
184
  }