tungsten 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/tungsten/safari-pinned-tab.svg +1 -0
- data/app/assets/stylesheets/tungsten/core/_badges.scss +21 -0
- data/app/assets/stylesheets/tungsten/core/_buttons.scss +63 -58
- data/app/assets/stylesheets/tungsten/core/_cards.scss +16 -11
- data/app/assets/stylesheets/tungsten/core/_globals.scss +7 -1
- data/app/assets/stylesheets/tungsten/core/_grid.scss +72 -6
- data/app/assets/stylesheets/tungsten/core/_index.scss +4 -0
- data/app/assets/stylesheets/tungsten/core/_layout.scss +14 -8
- data/app/assets/stylesheets/tungsten/core/_navigation.scss +35 -0
- data/app/assets/stylesheets/tungsten/core/_sections.scss +25 -0
- data/app/assets/stylesheets/tungsten/core/_tables.scss +66 -0
- data/app/assets/stylesheets/tungsten/core/_text.scss +1 -0
- data/app/assets/stylesheets/tungsten/form/_base.scss +26 -168
- data/app/assets/stylesheets/tungsten/form/_check-radio.scss +43 -43
- data/app/assets/stylesheets/tungsten/form/_check-switch.scss +18 -18
- data/app/assets/stylesheets/tungsten/form/_validation.scss +7 -7
- data/app/helpers/tungsten/card_helper.rb +12 -2
- data/app/helpers/tungsten/content_helper.rb +45 -0
- data/app/helpers/tungsten/section_helper.rb +43 -0
- data/lib/tungsten/version.rb +1 -1
- data/public/{code-0.1.2.js → code-0.1.3.js} +8 -8
- data/public/code-0.1.3.js.gz +0 -0
- data/public/code-0.1.3.map.json +1 -0
- data/public/{tungsten-0.1.2.css → tungsten-0.1.3.css} +318 -396
- data/public/tungsten-0.1.3.css.gz +0 -0
- data/public/{tungsten-0.1.2.js → tungsten-0.1.3.js} +2 -2
- data/public/tungsten-0.1.3.js.gz +0 -0
- data/public/tungsten-0.1.3.map.json +1 -0
- metadata +17 -10
- data/public/code-0.1.2.js.gz +0 -0
- data/public/code-0.1.2.map.json +0 -1
- data/public/tungsten-0.1.2.css.gz +0 -0
- data/public/tungsten-0.1.2.js.gz +0 -0
- data/public/tungsten-0.1.2.map.json +0 -1
@@ -0,0 +1,25 @@
|
|
1
|
+
/* ========================================================================== *
|
2
|
+
* Sections module
|
3
|
+
* -------------------------------------------------------------------------- */
|
4
|
+
|
5
|
+
.app-section {
|
6
|
+
|
7
|
+
&-header,
|
8
|
+
&-footer {
|
9
|
+
display: flex;
|
10
|
+
align-items: baseline;
|
11
|
+
|
12
|
+
.section-actions {
|
13
|
+
margin-bottom: 0;
|
14
|
+
margin-left: auto;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
&-header {
|
19
|
+
justify-content: space-between;
|
20
|
+
}
|
21
|
+
|
22
|
+
&-heading {
|
23
|
+
font-size: 18px;
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
/* ========================================================================== *
|
2
|
+
* Tables module
|
3
|
+
* -------------------------------------------------------------------------- */
|
4
|
+
|
5
|
+
/* ===================================== *
|
6
|
+
* Common
|
7
|
+
* ------------------------------------- */
|
8
|
+
|
9
|
+
table {
|
10
|
+
vertical-align: top;
|
11
|
+
border-spacing: 0;
|
12
|
+
}
|
13
|
+
|
14
|
+
th,
|
15
|
+
td {
|
16
|
+
padding: 8px;
|
17
|
+
text-align: left;
|
18
|
+
background: $white;
|
19
|
+
|
20
|
+
// Right-aligned button panels
|
21
|
+
&.action-panel {
|
22
|
+
min-width: 120px;
|
23
|
+
text-align: right;
|
24
|
+
white-space: nowrap;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
caption {
|
29
|
+
display: none;
|
30
|
+
}
|
31
|
+
|
32
|
+
// Ruled cells
|
33
|
+
table.ruled {
|
34
|
+
tfoot th,
|
35
|
+
tbody tr:nth-child(n+2) th,
|
36
|
+
tbody tr:nth-child(n+2) td {
|
37
|
+
border-top: 1px solid $gray-04;
|
38
|
+
}
|
39
|
+
|
40
|
+
thead th {
|
41
|
+
border-bottom: 1px solid $gray-04;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
// Outlined cells
|
46
|
+
table.outlined {
|
47
|
+
border-collapse: collapse;
|
48
|
+
td,
|
49
|
+
th {
|
50
|
+
border: 1px solid $gray-04;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
// Striped rows
|
55
|
+
table.striped {
|
56
|
+
tbody tr:nth-child(2n+1) th,
|
57
|
+
tbody tr:nth-child(2n+1) td {
|
58
|
+
background: $gray-03;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
// Equal-width columns
|
63
|
+
table.stretched {
|
64
|
+
table-layout: fixed;
|
65
|
+
min-width: 100%;
|
66
|
+
}
|
@@ -1,63 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
@mixin input-active {
|
5
|
-
&:focus,
|
6
|
-
&:hover:not([disabled]),
|
7
|
-
&:active {
|
8
|
-
@content;
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
|
-
$input-weight-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
13
|
-
$empty-shadow: 0 0 0 transparent;
|
14
|
-
|
15
|
-
label { *, *:before, *:after {
|
16
|
-
transition-duration: $duration;
|
17
|
-
transition-timing-function: $timing;
|
18
|
-
}}
|
19
|
-
|
20
|
-
@function input-shadow($color: $gray-06, $size: 1px) {
|
21
|
-
@return 0 0 0 $size $color inset, $empty-shadow;
|
22
|
-
}
|
23
|
-
|
24
|
-
@function input-focus-shadow($color: $gray-08, $size: 1px) {
|
25
|
-
@return 0 0 0 $size $color inset, $input-weight-shadow
|
26
|
-
}
|
27
|
-
|
28
|
-
$focus-shadow: input-focus-shadow();
|
29
|
-
$input-shadow: input-shadow();
|
30
|
-
|
31
|
-
form {
|
32
|
-
width: 100%;
|
1
|
+
.switch-label,
|
2
|
+
.tick-label {
|
3
|
+
pointer-events: none;
|
33
4
|
|
34
|
-
|
35
|
-
|
5
|
+
* {
|
6
|
+
pointer-events: all;
|
36
7
|
}
|
37
|
-
|
38
|
-
}
|
39
|
-
|
40
|
-
.switch-label, .tick-label {
|
41
|
-
pointer-events: none;
|
42
|
-
* { pointer-events: all; }
|
43
8
|
}
|
44
9
|
|
45
10
|
label {
|
46
|
-
|
47
|
-
|
48
|
-
+ select,
|
49
|
-
+ textarea {
|
50
|
-
margin-top: -5px;
|
51
|
-
}
|
52
|
-
|
53
|
-
[type=checkbox], [type=radio] {
|
11
|
+
[type=checkbox],
|
12
|
+
[type=radio] {
|
54
13
|
position: absolute;
|
55
14
|
border: none;
|
56
15
|
cursor: pointer;
|
57
16
|
opacity: 0;
|
58
17
|
z-index: -1;
|
59
18
|
}
|
60
|
-
}
|
19
|
+
}
|
61
20
|
|
62
21
|
fieldset {
|
63
22
|
border: 0;
|
@@ -66,48 +25,26 @@ fieldset {
|
|
66
25
|
margin-right: 0;
|
67
26
|
}
|
68
27
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
padding-top: 11px;
|
74
|
-
width: 100%;
|
75
|
-
margin-bottom: 19px;
|
76
|
-
+ * {
|
77
|
-
clear: both;
|
78
|
-
}
|
79
|
-
}
|
80
|
-
|
81
|
-
fieldset h2, legend.header {
|
82
|
-
text-transform: none;
|
83
|
-
letter-spacing: normal;
|
84
|
-
justify-content: space-between;
|
85
|
-
box-shadow: none;
|
86
|
-
font-weight: 300;
|
87
|
-
width: 100%;
|
88
|
-
float: left;
|
89
|
-
font-size: 24px;
|
90
|
-
padding: 20px 0 0; // 30px
|
91
|
-
margin: 0 0 30px; // 30px
|
92
|
-
text-align: center;
|
93
|
-
+ * { clear: both; }
|
94
|
-
}
|
95
|
-
|
96
|
-
|
97
|
-
@mixin input-base {
|
98
|
-
width: 100%;
|
99
|
-
font-size: 16px;
|
28
|
+
select,
|
29
|
+
textarea,
|
30
|
+
#{$text-inputs} {
|
31
|
+
appearance: none;
|
100
32
|
border: none;
|
101
|
-
|
33
|
+
width: 100%;
|
102
34
|
padding: 9px 12px;
|
103
35
|
border-radius: $radius;
|
104
|
-
transition
|
105
|
-
|
106
|
-
|
36
|
+
transition: box-shadow $duration;
|
37
|
+
|
38
|
+
// Normal state
|
39
|
+
@include normal {
|
40
|
+
box-shadow: 0 0 0 1px rgba($gray-11, .1);
|
41
|
+
}
|
107
42
|
|
108
|
-
//
|
109
|
-
|
110
|
-
|
43
|
+
// Active state
|
44
|
+
@include active {
|
45
|
+
box-shadow:
|
46
|
+
0 0 0 1px rgba($gray-11, .2),
|
47
|
+
0 1px 3px rgba($gray-11, .25);
|
111
48
|
}
|
112
49
|
|
113
50
|
&:disabled:not([type="submit"]) {
|
@@ -116,30 +53,6 @@ fieldset h2, legend.header {
|
|
116
53
|
}
|
117
54
|
}
|
118
55
|
|
119
|
-
input, select, textarea {
|
120
|
-
outline: 0;
|
121
|
-
outline-style: none;
|
122
|
-
border: none;
|
123
|
-
|
124
|
-
&::-moz-focus-inner {
|
125
|
-
border: none;
|
126
|
-
padding: 0;
|
127
|
-
}
|
128
|
-
|
129
|
-
}
|
130
|
-
|
131
|
-
#{$text-inputs}, select, textarea {
|
132
|
-
@include input-base;
|
133
|
-
|
134
|
-
@include input-active {
|
135
|
-
box-shadow: $focus-shadow;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
|
139
|
-
textarea {
|
140
|
-
line-height: 20px;
|
141
|
-
}
|
142
|
-
|
143
56
|
// Override default search styling
|
144
57
|
input[type=search] {
|
145
58
|
&,
|
@@ -150,7 +63,7 @@ input[type=search] {
|
|
150
63
|
}
|
151
64
|
|
152
65
|
select {
|
153
|
-
min-height:
|
66
|
+
min-height: 40px;
|
154
67
|
cursor: pointer;
|
155
68
|
background: $white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 14'%3E%3Cpolygon fill='%237A7B7C' points='3.5,0 0,6 7,6'/%3E%3Cpolygon fill='%237A7B7C' points='3.5,14 0,8 7,8'/%3E%3C/svg%3E") calc(100% - 14px) 50% / 7px 14px no-repeat;
|
156
69
|
}
|
@@ -159,17 +72,7 @@ select {
|
|
159
72
|
textarea {
|
160
73
|
display: block;
|
161
74
|
resize: vertical;
|
162
|
-
|
163
|
-
min-height: 100px;
|
164
|
-
}
|
165
|
-
|
166
|
-
// Bare inputs
|
167
|
-
:not(label) > {
|
168
|
-
input,
|
169
|
-
select,
|
170
|
-
textarea {
|
171
|
-
margin: 15px 0;
|
172
|
-
}
|
75
|
+
min-height: 75px;
|
173
76
|
}
|
174
77
|
|
175
78
|
::placeholder {
|
@@ -183,56 +86,11 @@ input[type=number]::-webkit-inner-spin-button {
|
|
183
86
|
margin: 0;
|
184
87
|
}
|
185
88
|
|
186
|
-
.form-row {
|
187
|
-
display: flex;
|
188
|
-
justify-content: space-between;
|
189
|
-
align-items: flex-end;
|
190
|
-
flex-wrap: wrap;
|
191
|
-
margin: 0 -5px;
|
192
|
-
|
193
|
-
> * {
|
194
|
-
padding: 0 5px;
|
195
|
-
}
|
196
|
-
}
|
197
|
-
|
198
|
-
.wide-cell {
|
199
|
-
flex: 1 0 auto;
|
200
|
-
@include until(400px) {
|
201
|
-
width: 100%;
|
202
|
-
}
|
203
|
-
}
|
204
|
-
|
205
|
-
.button-cell {
|
206
|
-
display: flex;
|
207
|
-
flex-direction: row-reverse;
|
208
|
-
|
209
|
-
@include until(550px) {
|
210
|
-
width: 100%;
|
211
|
-
}
|
212
|
-
|
213
|
-
@include until(400px) {
|
214
|
-
a.button, button {
|
215
|
-
width: 100%;
|
216
|
-
}
|
217
|
-
}
|
218
|
-
}
|
219
|
-
|
220
89
|
label {
|
221
90
|
display: flex;
|
222
|
-
font-size: 15px;
|
223
91
|
flex-direction: column;
|
224
92
|
position: relative;
|
225
93
|
flex: 1 0 auto;
|
226
|
-
margin: 18px 0;
|
227
|
-
|
228
|
-
.label-text {
|
229
|
-
transition-property: box-shadow, color;
|
230
|
-
padding-bottom: .2em;
|
231
|
-
}
|
232
|
-
|
233
|
-
select, input, textarea {
|
234
|
-
margin: 0px;
|
235
|
-
}
|
236
94
|
}
|
237
95
|
|
238
96
|
form.button_to {
|
@@ -17,14 +17,14 @@ label.tick-box {
|
|
17
17
|
margin: 0 8px 0 0;
|
18
18
|
background: $white;
|
19
19
|
transition-property: box-shadow;
|
20
|
-
box-shadow: input-shadow(), $empty-shadow inset;
|
20
|
+
// box-shadow: input-shadow(), $empty-shadow inset;
|
21
21
|
}
|
22
22
|
|
23
|
-
@include input-active {
|
24
|
-
border: none;
|
23
|
+
// @include input-active {
|
24
|
+
// border: none;
|
25
25
|
|
26
|
-
+ .tick { box-shadow: input-shadow( $gray-08 ), $empty-shadow inset; }
|
27
|
-
}
|
26
|
+
// + .tick { box-shadow: input-shadow( $gray-08 ), $empty-shadow inset; }
|
27
|
+
// }
|
28
28
|
|
29
29
|
&:disabled {
|
30
30
|
pointer-events: none;
|
@@ -63,7 +63,7 @@ label.tick-box {
|
|
63
63
|
|
64
64
|
// Checked
|
65
65
|
&:checked + .tick {
|
66
|
-
box-shadow: input-shadow( darken($blue-03, 3) ), 0 0 0 8px $blue-03 inset;
|
66
|
+
// box-shadow: input-shadow( darken($blue-03, 3) ), 0 0 0 8px $blue-03 inset;
|
67
67
|
|
68
68
|
&:after {
|
69
69
|
box-shadow: 0 1px 0 2px darken($blue-03, 15);
|
@@ -72,22 +72,22 @@ label.tick-box {
|
|
72
72
|
}
|
73
73
|
|
74
74
|
// Hover, focus, active
|
75
|
-
@include input-active {
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
}
|
75
|
+
// @include input-active {
|
76
|
+
|
77
|
+
// // Active Unchecked
|
78
|
+
// + .tick {
|
79
|
+
// &:before { transform: scale(.35); }
|
80
|
+
// &:after { transform: scale(0); }
|
81
|
+
// }
|
82
|
+
|
83
|
+
// // Active Checked
|
84
|
+
// &:checked + .tick {
|
85
|
+
// box-shadow: input-shadow( darken($blue-03, 15) ), 0 0 0 8px darken( $blue-03, 5 ) inset;
|
86
|
+
|
87
|
+
// &:before { transform: scale(0); }
|
88
|
+
// &:after { transform: scale(.35); }
|
89
|
+
// }
|
90
|
+
// }
|
91
91
|
}
|
92
92
|
|
93
93
|
// Checkboxes
|
@@ -115,7 +115,7 @@ label.tick-box {
|
|
115
115
|
|
116
116
|
// Checked
|
117
117
|
&:checked + .tick {
|
118
|
-
box-shadow: input-shadow( darken($blue-03, 3) ), 0 0 0 10px $blue-03 inset;
|
118
|
+
// box-shadow: input-shadow( darken($blue-03, 3) ), 0 0 0 10px $blue-03 inset;
|
119
119
|
|
120
120
|
&:after, &:before {
|
121
121
|
transform: scale(.5) rotate(-50deg);
|
@@ -129,26 +129,26 @@ label.tick-box {
|
|
129
129
|
}
|
130
130
|
|
131
131
|
// Hover, focus, active
|
132
|
-
@include input-active {
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
}
|
132
|
+
// @include input-active {
|
133
|
+
|
134
|
+
// // Active Uncheked
|
135
|
+
// + .tick:before {
|
136
|
+
// border-color: $gray-06;
|
137
|
+
// transform: scale(.4) rotate(-50deg);
|
138
|
+
// }
|
139
|
+
|
140
|
+
// // Active Checked
|
141
|
+
// &:checked + .tick {
|
142
|
+
// box-shadow: input-shadow( darken($blue-03, 15) ), 0 0 0 10px darken( $blue-03, 5 ) inset;
|
143
|
+
|
144
|
+
// &:before {
|
145
|
+
// top: 1px;
|
146
|
+
// opacity: 1;
|
147
|
+
// transform: scale(.5) rotate(-50deg);
|
148
|
+
// border-color: darken( $blue-03, 10 );
|
149
|
+
// }
|
150
|
+
// }
|
151
|
+
// }
|
152
152
|
}
|
153
153
|
}
|
154
154
|
|