ethosstyles 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +87 -0
  3. data/app/assets/stylesheets/_ethosstyles.scss +2 -0
  4. data/app/assets/stylesheets/components/_base.scss +4 -0
  5. data/app/assets/stylesheets/components/_blurbs.scss +96 -5
  6. data/app/assets/stylesheets/components/_buttons.scss +3 -2
  7. data/app/assets/stylesheets/components/_forms.scss +128 -3
  8. data/app/assets/stylesheets/components/_grid.scss +36 -3
  9. data/app/assets/stylesheets/components/_highlights.scss +17 -0
  10. data/app/assets/stylesheets/components/_icons.scss +1 -0
  11. data/app/assets/stylesheets/components/_list-groups.scss +32 -0
  12. data/app/assets/stylesheets/components/_lists.scss +28 -7
  13. data/app/assets/stylesheets/components/_logs.scss +15 -0
  14. data/app/assets/stylesheets/components/_notes.scss +43 -0
  15. data/app/assets/stylesheets/components/_notices.scss +19 -0
  16. data/app/assets/stylesheets/components/_panels.scss +35 -1
  17. data/app/assets/stylesheets/components/_tables.scss +68 -13
  18. data/app/assets/stylesheets/components/_tooltips.scss +18 -21
  19. data/app/assets/stylesheets/pages/_styleguide.scss +6 -0
  20. data/app/assets/stylesheets/utilities/_mixins.scss +7 -33
  21. data/app/assets/stylesheets/utilities/_utilities.scss +10 -1
  22. data/app/views/blurbs.php +31 -0
  23. data/app/views/forms.php +68 -0
  24. data/app/views/grid.php +19 -0
  25. data/app/views/index.php +56 -2
  26. data/app/views/list-groups.php +69 -8
  27. data/app/views/logs.php +12 -0
  28. data/app/views/notes.php +10 -0
  29. data/app/views/notices.php +11 -0
  30. data/app/views/panels.php +8 -0
  31. data/app/views/partial_tooltips.php +6 -16
  32. data/app/views/tables.php +102 -0
  33. data/app/views/tooltips.php +6 -10
  34. data/lib/ethosstyles/version.rb +1 -1
  35. metadata +13 -3
@@ -2,27 +2,35 @@
2
2
  // Tooltips
3
3
  //
4
4
 
5
- .rf-tooltip + .tooltip {
5
+ .rf-tooltip {
6
6
  line-height: 1.1em;
7
7
 
8
+ .tooltip-inner {
9
+ padding: 4px 8px;
10
+ background-color: $prewhite;
11
+ color: $black;
12
+ }
13
+
14
+ &.left .tooltip-arrow { border-left-color: $prewhite; }
15
+ &.top .tooltip-arrow { border-top-color: $prewhite }
16
+ &.right .tooltip-arrow { border-right-color: $prewhite; }
17
+ &.bottom .tooltip-arrow { border-bottom-color: $prewhite; }
18
+ }
19
+
20
+ .rf-tooltip--small {
8
21
  &.left {
9
22
  width: 78px;
10
- margin-left: -10px;
11
23
  }
12
24
 
13
25
  &.right {
14
26
  width: 78px;
15
- margin-left: +10px;
16
- }
17
-
18
- .tooltip-inner {
19
- padding: 4px 8px;
20
27
  }
21
28
  }
22
29
 
23
- .rf-tooltip--danger + .tooltip {
30
+ .rf-tooltip--danger {
24
31
  .tooltip-inner {
25
32
  background-color: $red;
33
+ color: $white;
26
34
  }
27
35
 
28
36
  &.left .tooltip-arrow { border-left-color: $red; }
@@ -31,21 +39,10 @@
31
39
  &.bottom .tooltip-arrow { border-bottom-color: $red; }
32
40
  }
33
41
 
34
- .rf-tooltip--pending + .tooltip {
35
- .tooltip-inner {
36
- background-color: $lemon;
37
- color: $charcoal;
38
- }
39
-
40
- &.left .tooltip-arrow { border-left-color: $lemon; }
41
- &.top .tooltip-arrow { border-top-color: $lemon; }
42
- &.right .tooltip-arrow { border-right-color: $lemon; }
43
- &.bottom .tooltip-arrow { border-bottom-color: $lemon; }
44
- }
45
-
46
- .rf-tooltip--valid + .tooltip {
42
+ .rf-tooltip--success {
47
43
  .tooltip-inner {
48
44
  background-color: $green;
45
+ color: $white;
49
46
  }
50
47
 
51
48
  &.left .tooltip-arrow { border-left-color: $green; }
@@ -12,3 +12,9 @@
12
12
  color: $white;
13
13
  }
14
14
  }
15
+
16
+ // Basic border
17
+
18
+ .rf-border--dark {
19
+ border: 1px solid black;
20
+ }
@@ -23,36 +23,6 @@
23
23
  }
24
24
 
25
25
 
26
- // Round the corners of a table by a specified radius
27
- // NOTE: default is to use $border-radius. Depends
28
- // on borders being present, and made by td's
29
- // Also needs border-collapese: seperate
30
- //
31
- // (outer type or class) {
32
- // Simple usage
33
- // @include round-table-corners(<value>);
34
- //
35
- // Detailed Usage
36
- // @include round-table-corners(<value>);
37
- // }
38
- @mixin round-table-corners($radius: $border-radius) {
39
- tr:first-of-type td:first-of-type {
40
- border-top-left-radius: $border-radius;
41
- }
42
-
43
- tr:first-of-type td:last-of-type {
44
- border-top-right-radius: $border-radius;
45
- }
46
-
47
- tr:last-of-type td:first-of-type {
48
- border-bottom-left-radius: $border-radius;
49
- }
50
-
51
- tr:last-of-type td:last-of-type {
52
- border-bottom-right-radius: $border-radius;
53
- }
54
- }
55
-
56
26
  // Simple truncation mixin to cut off text using an ellipsis after a certain
57
27
  // width.
58
28
  //
@@ -157,7 +127,7 @@
157
127
  &[aria-expanded='false']:after,
158
128
  &[aria-expanded='true']:after {
159
129
  color: inherit;
160
- font-family: 'octicons';
130
+ font-family: $font-icon-f5;
161
131
  font-size: 14px;
162
132
  vertical-align: middle;
163
133
  height: $arrow-height;
@@ -173,10 +143,14 @@
173
143
  }
174
144
 
175
145
  &[aria-expanded='false']:after {
176
- content: '\f05a'; // triangle right
146
+ content: "\f0da"; // triangle right
177
147
  }
178
148
 
179
149
  &[aria-expanded='true']:after {
180
- content: '\f05b'; // triangle down
150
+ content: "\f0d7"; // triangle down
181
151
  }
182
152
  }
153
+
154
+ @mixin border-status( $color ) {
155
+ border-left: 6px solid $color;
156
+ }
@@ -88,6 +88,16 @@
88
88
  color: $red !important;
89
89
  }
90
90
 
91
+ //
92
+ // DISABLED
93
+ //
94
+
95
+ .rf-u-disabled,
96
+ %rf-u-disabled {
97
+ cursor: not-allowed;
98
+ opacity: .3;
99
+ }
100
+
91
101
 
92
102
  //
93
103
  // SHOW/HIDE
@@ -172,4 +182,3 @@
172
182
  .rf-u-mb0 {
173
183
  margin-bottom: 0;
174
184
  }
175
-
@@ -0,0 +1,31 @@
1
+ <section class="rf-section">
2
+
3
+ <div class="rf-blurb rf-blurb--success rf-u-mb">
4
+ <p>This is a <strong>SUCCESS</strong> blurb</p>
5
+ </div>
6
+
7
+ <div class="rf-blurb rf-blurb--error rf-u-mb">
8
+ <p>This is an <strong>ERROR</strong> blurb</p>
9
+ </div>
10
+
11
+ <div class="rf-blurb rf-blurb--warning rf-u-mb">
12
+ <p>This is a <strong>WARNING</strong> blurb</p>
13
+ </div>
14
+
15
+ <div class="rf-blurb rf-blurb--info rf-u-mb">
16
+ <p>This is an <strong>INFO</strong> blurb</p>
17
+ </div>
18
+
19
+ <div class="rf-blurb rf-blurb--plain rf-blurb--highlight rf-u-mb">
20
+ <p>This is a <strong>PLAIN HIGHLIGHTED</strong> blurb</p>
21
+ </div>
22
+
23
+ <div class="rf-blurb rf-blurb--condensed rf-blurb--info rf-u-mb">
24
+ <p>This is a <strong>CONDENSED</strong> info blurb</p>
25
+ </div>
26
+
27
+ <div class="rf-blurb rf-blurb--error rf-blurb--large rf-u-mb">
28
+ <p>This is a <strong>LARGE</strong> error blurb</p>
29
+ </div>
30
+
31
+ </section>
@@ -0,0 +1,68 @@
1
+ <section class="rf-section">
2
+ <form class="rf-form" action="">
3
+ <h2>Form Title</h2>
4
+ <div class="rf-form-group">
5
+ <label class="rf-label">Label for first input</label>
6
+ <input class="rf-form-control" type="text" name="first_data" placeholder="placeholder text">
7
+ </div>
8
+
9
+ <label class="rf-label">Label for select</label>
10
+ <div class="rf-form-group">
11
+ <select class="rf-form-control" placeholder="placeholder text">
12
+ <option>Option 1</option>
13
+ <option>Option 2</option>
14
+ <option>Option 3</option>
15
+ </select>
16
+ </div>
17
+
18
+ <div class="rf-form-group">
19
+ <label class="rf-label rf-label--required">Label for a required input</label>
20
+ <input class="rf-form-control" type="text" name="first_data" placeholder="required text input">
21
+ </div>
22
+
23
+ <div class="rf-form-group rf-u-disabled">
24
+ <label class="rf-label">Disabled input</label>
25
+ <input class="rf-form-control" type="text" name="first_data" placeholder="required text input">
26
+ </div>
27
+
28
+ <input class="rf-btn rf-btn--primary" type="submit" value="Submit">
29
+
30
+ </form>
31
+ </section>
32
+
33
+ <section class="rf-section">
34
+ <form class="rf-form" action="">
35
+ <h2>Condensed Form Title</h2>
36
+ <div class="rf-form-group rf-form-group--condensed">
37
+ <label class="rf-label">First text box</label>
38
+ <input class="rf-form-control" type="text" name="first_data" placeholder="Default Text">
39
+ </div>
40
+
41
+ <div class="rf-form-group rf-form-group--condensed">
42
+ <label class="rf-label">Second text box</label>
43
+ <input class="rf-form-control" type="text" name="second_data" placeholder="Default Text">
44
+ </div>
45
+
46
+ <input class="rf-btn rf-btn--primary rf-btn" type="submit" value="Submit">
47
+
48
+ </form>
49
+ </section>
50
+
51
+ <section class="rf-section">
52
+ <h2 class="rf-section__headline">Title for an inline select form</h2>
53
+
54
+ <label class="rf-label">Second text box</label>
55
+ <div class="rf-form-group rf-form-group--inline">
56
+ <select class="rf-form-control" placeholder="placeholder text">
57
+ <option>Option 1</option>
58
+ <option>Option 2</option>
59
+ <option>Option 3</option>
60
+ </select>
61
+ <input class="rf-btn rf-btn--primary" type="submit" value="Submit">
62
+ </div>
63
+
64
+ <div class="rf-form-group rf-form-group--inline">
65
+ <input class="rf-form-control" type="text" name="first_data" placeholder="placeholder text">
66
+ <input class="rf-btn rf-btn--secondary" type="submit" value="Submit">
67
+ </div>
68
+ </section>
@@ -0,0 +1,19 @@
1
+ <table class="rf-table rf-border--dark">
2
+ <p>Grid divides up a blocks width into 12 equal units. Distribute those units to the inner content however you see fit.</p>
3
+ <tr class="rf-row">
4
+
5
+ <td class="rf-col--8 rf-u-p rf-border--dark"><code>rf-col--8</code></td>
6
+ <td class="rf-col--4 rf-u-p rf-border--dark"><code>rf-col--4</code></td>
7
+ </tr>
8
+
9
+ <tr class="rf-row">
10
+ <td class="rf-col--3 rf-border--dark rf-u-p rf-border--dark"><code>rf-col--3</code></td>
11
+ <td class="rf-col--9 rf-u-p rf-border--dark"><code>rf-col--9</code></td>
12
+ </tr>
13
+
14
+ <tr class="rf-row">
15
+ <td class="rf-col--5 rf-u-p rf-border--dark"><code>rf-col--5</code></td>
16
+ <td class="rf-col--3 rf-u-p rf-border--dark"><code>rf-col--3</code></td>
17
+ <td class="rf-col--4 rf-u-p rf-border--dark"><code>rf-col--4</code></td>
18
+ </tr>
19
+ </table>
@@ -10,8 +10,13 @@
10
10
  <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
11
11
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
12
12
  <script>
13
- $(document).ready(function(){
14
- $('[data-toggle="tooltip"]').tooltip();
13
+ $(document).on('inserted.bs.tooltip', function(e) {
14
+ var tooltip = $(e.target).data('bs.tooltip');
15
+ tooltip.$tip.addClass($(e.target).data('tooltip-custom-classes'));
16
+ });
17
+ $('body').tooltip({
18
+ selector: "[title]",
19
+ html: true
15
20
  });
16
21
  </script>
17
22
 
@@ -22,12 +27,21 @@
22
27
  <body>
23
28
 
24
29
  <div class="rf-container">
30
+ <h2>Table of Contents</h2>
25
31
  <ul>
26
32
  <li><a href="#avatars">Avatars</a></li>
27
33
  <li><a href="#icons">Icons</a></li>
28
34
  <li><a href="#modals">Modals</a></li>
29
35
  <li><a href="#buttons">Buttons</a></li>
36
+ <li><a href="#list-groups">List Groups</a></li>
30
37
  <li><a href="#tooltips">Tooltips</a></li>
38
+ <li><a href="#blurbs">Blurbs</a></li>
39
+ <li><a href="#notes">Notes</a></li>
40
+ <li><a href="#forms">Forms</a></li>
41
+ <li><a href="#tables">Tables</a></li>
42
+ <li><a href="#logs">Logs</a></li>
43
+ <li><a href="#notices">Notices</a></li>
44
+ <li><a href="#panels">Panels</a></li>
31
45
  </ul>
32
46
 
33
47
  <section class="rf-section">
@@ -60,6 +74,46 @@
60
74
  <?php include "tooltips.php" ?>
61
75
  </section>
62
76
 
77
+ <section class="rf-section">
78
+ <h2 id="blurbs">Blurbs</h2>
79
+ <?php include "blurbs.php" ?>
80
+ </section>
81
+
82
+ <section class="rf-section">
83
+ <h2 id="notes">Notes</h2>
84
+ <?php include "notes.php" ?>
85
+ </section>
86
+
87
+ <section class="rf-section">
88
+ <h2 id="forms">Forms</h2>
89
+ <?php include "forms.php" ?>
90
+ </section>
91
+
92
+ <section class="rf-section">
93
+ <h2 id="grid">Grid</h2>
94
+ <?php include "grid.php" ?>
95
+ </section>
96
+
97
+ <section class="rf-section">
98
+ <h2 id="tables">Tables</h2>
99
+ <?php include "tables.php" ?>
100
+ </section>
101
+
102
+ <section class="rf-section">
103
+ <h2 id="logs">Logs</h2>
104
+ <?php include "logs.php" ?>
105
+ </section>
106
+
107
+ <section class="rf-section">
108
+ <h2 id="notices">Notices</h2>
109
+ <?php include "notices.php" ?>
110
+ </section>
111
+
112
+ <section class="rf-section">
113
+ <h2 id="panels">Panels</h2>
114
+ <?php include "panels.php" ?>
115
+ </section>
116
+
63
117
  </div>
64
118
 
65
119
  </body>
@@ -89,6 +89,14 @@
89
89
  <div class="rf-col--4">Are</div>
90
90
  <div class="rf-col--4">Here</div>
91
91
  </li>
92
+
93
+ <li class="rf-list-item rf-highlight--ready">
94
+ <h3 class="rf-list-item__title">Add <code>rf-highlight--ready</code> to highlight blocks of interest. Useful when lisitng out parameters</h3>
95
+ </li>
96
+
97
+ <li class="rf-list-item rf-highlight--none">
98
+ <h3 class="rf-list-item__title">Add <code>rf-highlight--none</code> to make highlighted items standout more when listed together</h3>
99
+ </li>
92
100
  </ul>
93
101
  </section>
94
102
 
@@ -98,11 +106,11 @@
98
106
  <ul class="rf-list-group rf-list-group--partial">
99
107
  <li class="rf-list-item">
100
108
  <h4 class="rf-list-item__title">
101
- List Item with Title
109
+ List Item with Title and Status
102
110
  </h4>
103
111
  </li>
104
112
 
105
- <li class="rf-list-item rf-list-item--danger">
113
+ <li class="rf-list-item rf-list-item--danger">
106
114
  <h4 class="rf-list-item__title">
107
115
  List Item with Title and Status
108
116
  </h4>
@@ -124,7 +132,7 @@
124
132
  </h4>
125
133
  </li>
126
134
 
127
- <li class="rf-list-item rf-list-item--danger">
135
+ <li class="rf-list-item rf-list-item--danger">
128
136
  <h4 class="rf-list-item__title">
129
137
  List Item with Title and Status
130
138
  </h4>
@@ -152,7 +160,7 @@
152
160
  <h3>Borderless Partial</h3>
153
161
 
154
162
  <ul class="rf-list-group rf-list-group--partial rf-list-group--borderless">
155
- <li class="rf-list-item">
163
+ <li class="rf-list-item rf-list-item--success">
156
164
  <h4 class="rf-list-item__title">
157
165
  List Item with Title
158
166
  </h4>
@@ -174,7 +182,7 @@
174
182
  </ul>
175
183
 
176
184
  <ul class="rf-list-group rf-list-group--partial rf-list-group--borderless collapse" id="borderlesspartial">
177
- <li class="rf-list-item">
185
+ <li class="rf-list-item rf-list-item--success">
178
186
  <h4 class="rf-list-item__title">
179
187
  List Item with Title
180
188
  </h4>
@@ -190,10 +198,13 @@
190
198
 
191
199
  <section class="rf-section">
192
200
 
193
- <h2>Table List Group</h2>
201
+ <h2>Table List Groups</h2>
202
+
203
+ <br>
194
204
 
205
+ <h3>Table</h3>
195
206
  <ul class="rf-list-group rf-list-group--table">
196
- <li class="rf-list-item rf-list-item--tr rf-list-item--tr--header">
207
+ <li class="rf-list-item--tr rf-list-item--tr--header">
197
208
  <div class="rf-list-item__th rf-col--4">header 1</div>
198
209
  <div class="rf-list-item__th rf-col--4">header 2</div>
199
210
  <div class="rf-list-item__th rf-col--4">header 3</div>
@@ -209,6 +220,56 @@
209
220
  <div class="rf-list-item__td">col 3</div>
210
221
  </li>
211
222
  </ul>
223
+
224
+ <br>
225
+
226
+ <?php /*
227
+ * Table row width is set by css. The combination of headers, triggers, and status
228
+ * borders create a problem where the trigger would center according the the first column.
229
+ * Additionally the collapsed rows would base their width off the row width without the borders,
230
+ * creating an odd indent. By making everything it's own list-group the problem is avoided.
231
+ */ ?>
232
+ <h3>Table Partial</h3>
233
+ <ul class="rf-list-group rf-list-group--table">
234
+ <li class="rf-list-item--tr rf-list-item--tr--header">
235
+ <div class="rf-list-item__th rf-col--4">header 1</div>
236
+ <div class="rf-list-item__th rf-col--2">header 2</div>
237
+ <div class="rf-list-item__th rf-col--6">header 3</div>
238
+ </li>
239
+ </ul>
240
+ <ul class="rf-list-group rf-list-group--partial rf-list-group--table">
241
+ <li class="rf-list-item rf-list-item--tr rf-list-item--success">
242
+ <div class="rf-list-item__td rf-col--4">col 1</div>
243
+ <div class="rf-list-item__td rf-col--2">col 2</div>
244
+ <div class="rf-list-item__td rf-col--6">col 3</div>
245
+ </li>
246
+ <li class="rf-list-item rf-list-item--tr rf-list-item--danger">
247
+ <div class="rf-list-item__td rf-col--4">col 1</div>
248
+ <div class="rf-list-item__td rf-col--2">col 2</div>
249
+ <div class="rf-list-item__td rf-col--6">col 3</div>
250
+ </li>
251
+ </ul>
252
+ <ul class="rf-list-group rf-list-group--partial rf-list-group--table collapse" id="partial-table">
253
+ <li class="rf-list-item rf-list-item--tr rf-list-item--success">
254
+ <div class="rf-list-item__td rf-col--4">col 1</div>
255
+ <div class="rf-list-item__td rf-col--2">col 2</div>
256
+ <div class="rf-list-item__td rf-col--6">col 3</div>
257
+ </li>
258
+ <li class="rf-list-item rf-list-item--tr rf-list-item--danger">
259
+ <div class="rf-list-item__td rf-col--4">col 1</div>
260
+ <div class="rf-list-item__td rf-col--2">col 2</div>
261
+ <div class="rf-list-item__td rf-col--6">col 3</div>
262
+ </li>
263
+ </ul>
264
+ <ul class="rf-list-group--partial">
265
+ <li class="rf-list-item--to-expand rf-u-textcenter"
266
+ data-target="#partial-table"
267
+ data-toggle="collapse"
268
+ aria-expanded="false"
269
+ aria-controls="partial">
270
+ <span class="rf-btn rf-btn--secondary">Click to see all</span>
271
+ </li>
272
+ </ul>
212
273
  </section>
213
274
 
214
275
  <hr/>
@@ -315,4 +376,4 @@
315
376
  </div>
316
377
  </li>
317
378
  </ul>
318
- </section>
379
+ </section>