tungsten 0.1.2 → 0.1.3
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.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ab9260819e6dccadd68a7ba4b198552dfe36333
|
4
|
+
data.tar.gz: 132a10903f5919c9a8b79970e37568fed04d0a51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 407f8aed971b13c08039363318af6e42b594224dfe983097f042c9f7b79b4a6d2f23cb9da45feb9dd47122090ca102e26f107cb983808baed158fbdc5fa582cf
|
7
|
+
data.tar.gz: 861b148dfc2bf1399ea8f91cffb0625fa159603cec0a6c4869124737847e83125b71dd1300a4b73a31732f73ca1e51d0138b691f0b2fa6df378e226541a7ee4d
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd"><path d="M9.458 10.767l-2.916 1.683-3.125-1.804-2.917-1.684v-3.608l3.125-1.804 2.917 1.683 2.916-1.683 3.125 1.804 2.917 1.684v3.608l-3.125 1.804-2.917-1.683zm.209-.361v-2.887l2.5 1.443v2.887l-2.5-1.443zm-5.834 0v-2.887l2.5 1.443v2.887l-2.5-1.443zm-2.916-1.684v-2.887l2.5 1.443v2.887l-2.5-1.443zm5.625-3.007l2.5 1.443-2.5 1.443-2.501-1.443 2.501-1.443zm5.833 0l2.5 1.443-2.5 1.443-2.5-1.443 2.5-1.443zm-8.75-1.684l2.5 1.443-2.5 1.443-2.5-1.443 2.5-1.443zm5.833 0l2.5 1.443-2.5 1.443-2.5-1.443 2.5-1.443z"/></svg>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/* ========================================================================== *
|
2
|
+
* Badges module
|
3
|
+
* -------------------------------------------------------------------------- */
|
4
|
+
|
5
|
+
/* ===================================== *
|
6
|
+
* Common
|
7
|
+
* ------------------------------------- */
|
8
|
+
|
9
|
+
.badge {
|
10
|
+
display: inline-flex;
|
11
|
+
align-items: center;
|
12
|
+
border-radius: 50%;
|
13
|
+
width: 26px;
|
14
|
+
height: 26px;
|
15
|
+
text-align: center;
|
16
|
+
justify-content: center;
|
17
|
+
color: $white;
|
18
|
+
background: $green-01;
|
19
|
+
font-weight: 700;
|
20
|
+
margin: 0 2px;
|
21
|
+
}
|
@@ -1,8 +1,11 @@
|
|
1
1
|
/* ========================================================================== *
|
2
|
-
*
|
2
|
+
* Buttons module
|
3
3
|
* -------------------------------------------------------------------------- */
|
4
4
|
|
5
|
-
|
5
|
+
/* ===================================== *
|
6
|
+
* Common
|
7
|
+
* ------------------------------------- */
|
8
|
+
|
6
9
|
.button {
|
7
10
|
display: inline-flex;
|
8
11
|
align-items: center;
|
@@ -46,6 +49,64 @@
|
|
46
49
|
0 1px 3px rgba($gray-11, .25);
|
47
50
|
}
|
48
51
|
|
52
|
+
// Destructive action
|
53
|
+
&.destructive {
|
54
|
+
|
55
|
+
// Normal state
|
56
|
+
@include normal {
|
57
|
+
color: $red-01;
|
58
|
+
}
|
59
|
+
|
60
|
+
// Active state
|
61
|
+
@include active {
|
62
|
+
color: $red-02;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
// Primary action
|
67
|
+
&.primary {
|
68
|
+
|
69
|
+
// Normal state
|
70
|
+
@include normal {
|
71
|
+
color: $white;
|
72
|
+
background: $blue-03;
|
73
|
+
box-shadow:
|
74
|
+
0 0 0 1px darken($blue-03, 5),
|
75
|
+
0 1px 3px rgba($gray-11, .15);
|
76
|
+
}
|
77
|
+
|
78
|
+
// Active state
|
79
|
+
@include active {
|
80
|
+
color: $white;
|
81
|
+
background: $blue-04;
|
82
|
+
box-shadow:
|
83
|
+
0 0 0 1px $blue-04,
|
84
|
+
0 1px 3px rgba($gray-11, .15);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
// Primary destructive action
|
89
|
+
&.primary.destructive {
|
90
|
+
|
91
|
+
// Normal state
|
92
|
+
@include normal {
|
93
|
+
color: $white;
|
94
|
+
background: $red-01;
|
95
|
+
box-shadow:
|
96
|
+
0 0 0 1px darken($red-01, 5),
|
97
|
+
0 1px 3px rgba($gray-11, .15);
|
98
|
+
}
|
99
|
+
|
100
|
+
// Active state
|
101
|
+
@include active {
|
102
|
+
color: $white;
|
103
|
+
background: $red-02;
|
104
|
+
box-shadow:
|
105
|
+
0 0 0 1px $red-02,
|
106
|
+
0 1px 3px rgba($gray-11, .15);
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
49
110
|
// Disabled
|
50
111
|
&[disabled] {
|
51
112
|
color: $gray-05 !important;
|
@@ -82,62 +143,6 @@
|
|
82
143
|
}
|
83
144
|
}
|
84
145
|
|
85
|
-
// Destructive action
|
86
|
-
.button.destructive {
|
87
|
-
|
88
|
-
// Normal state
|
89
|
-
@include normal {
|
90
|
-
color: $red-01;
|
91
|
-
}
|
92
|
-
|
93
|
-
// Active state
|
94
|
-
@include active {
|
95
|
-
color: $red-02;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
|
99
|
-
// Primary action
|
100
|
-
.button.primary {
|
101
|
-
|
102
|
-
// Normal state
|
103
|
-
@include normal {
|
104
|
-
color: $white;
|
105
|
-
background: $blue-03;
|
106
|
-
box-shadow:
|
107
|
-
0 0 0 1px darken($blue-03, 5),
|
108
|
-
0 1px 3px rgba($gray-11, .15);
|
109
|
-
}
|
110
|
-
|
111
|
-
// Active state
|
112
|
-
@include active {
|
113
|
-
color: $white;
|
114
|
-
background: $blue-04;
|
115
|
-
box-shadow:
|
116
|
-
0 0 0 1px $blue-04,
|
117
|
-
0 1px 3px rgba($gray-11, .15);
|
118
|
-
}
|
119
|
-
}
|
120
|
-
|
121
|
-
.primary.destructive {
|
122
|
-
|
123
|
-
// Normal state
|
124
|
-
@include normal {
|
125
|
-
background: $red-01;
|
126
|
-
box-shadow:
|
127
|
-
0 0 0 1px darken($red-01, 5),
|
128
|
-
0 1px 3px rgba($gray-11, .15);
|
129
|
-
}
|
130
|
-
|
131
|
-
// Active state
|
132
|
-
@include active {
|
133
|
-
color: $white;
|
134
|
-
background: $red-02;
|
135
|
-
box-shadow:
|
136
|
-
0 0 0 1px $red-02,
|
137
|
-
0 1px 3px rgba($gray-11, .15);
|
138
|
-
}
|
139
|
-
}
|
140
|
-
|
141
146
|
// Siblings need their space
|
142
147
|
.button + .button {
|
143
148
|
margin-left: 10px;
|
@@ -11,17 +11,14 @@
|
|
11
11
|
}
|
12
12
|
|
13
13
|
.card {
|
14
|
-
display: flex;
|
15
|
-
flex-direction: column;
|
16
14
|
position: relative;
|
17
15
|
padding: $card-padding;
|
18
|
-
|
19
|
-
@include collapse-top;
|
16
|
+
@include collapse-bottom;
|
20
17
|
|
21
18
|
&-actions {
|
22
19
|
display: flex;
|
23
20
|
align-items: baseline;
|
24
|
-
margin-
|
21
|
+
margin-bottom: $card-padding;
|
25
22
|
flex-direction: row-reverse;
|
26
23
|
|
27
24
|
> *:last-child {
|
@@ -34,7 +31,7 @@
|
|
34
31
|
|
35
32
|
a,
|
36
33
|
button {
|
37
|
-
margin-
|
34
|
+
margin-bottom: 10px;
|
38
35
|
}
|
39
36
|
|
40
37
|
a {
|
@@ -43,7 +40,7 @@
|
|
43
40
|
}
|
44
41
|
|
45
42
|
#{$block-elements} {
|
46
|
-
margin-
|
43
|
+
margin-bottom: $vertical-margin;
|
47
44
|
}
|
48
45
|
|
49
46
|
&:not([class*='columns']) {
|
@@ -51,6 +48,8 @@
|
|
51
48
|
}
|
52
49
|
|
53
50
|
&[class*='columns'] {
|
51
|
+
position: relative;
|
52
|
+
z-index: 1;
|
54
53
|
flex-direction: row;
|
55
54
|
|
56
55
|
&:before {
|
@@ -69,19 +68,25 @@
|
|
69
68
|
font-size: 16px;
|
70
69
|
}
|
71
70
|
|
72
|
-
header,
|
71
|
+
&-header,
|
72
|
+
&-footer {
|
73
73
|
display: flex;
|
74
74
|
align-items: baseline;
|
75
|
+
|
75
76
|
.card-actions {
|
76
|
-
margin-
|
77
|
+
margin-bottom: 0;
|
77
78
|
margin-left: auto;
|
78
79
|
}
|
79
80
|
}
|
80
81
|
|
81
|
-
|
82
|
+
&-description {
|
83
|
+
font-size: 12px;
|
84
|
+
}
|
85
|
+
|
86
|
+
&-footer {
|
82
87
|
display: flex;
|
83
88
|
align-items: baseline;
|
84
|
-
@include collapse-
|
89
|
+
@include collapse-bottom;
|
85
90
|
font-size: 12px;
|
86
91
|
padding: $card-padding;
|
87
92
|
background: $gray-01;
|
@@ -65,7 +65,10 @@ $timing: cubic-bezier(0.4, 0.0, 0.2, 1);
|
|
65
65
|
* ------------------------------------- */
|
66
66
|
|
67
67
|
// Block-level elements that get vertical margin
|
68
|
-
$block-elements: p, ul, ol, h1, h2, h3, h4, h5, h6, pre, table;
|
68
|
+
$block-elements: p, ul, ol, h1, h2, h3, h4, h5, h6, pre, table, '.card';
|
69
|
+
|
70
|
+
// Text-based inputs
|
71
|
+
$text-inputs: 'input[type=url], input[type=tel], input[type=text], input[type=email], input[type=number], input[type=password], input[type=search]';
|
69
72
|
|
70
73
|
// Border radius
|
71
74
|
$radius: 2px;
|
@@ -73,6 +76,9 @@ $radius: 2px;
|
|
73
76
|
// Card padding
|
74
77
|
$card-padding: 20px;
|
75
78
|
|
79
|
+
// Block element vertical margin
|
80
|
+
$vertical-margin: 20px;
|
81
|
+
|
76
82
|
// Inner content padding
|
77
83
|
$content-padding: 40px;
|
78
84
|
|
@@ -6,10 +6,10 @@
|
|
6
6
|
* Utilities
|
7
7
|
* ------------------------------------- */
|
8
8
|
|
9
|
-
$small-gutter :
|
10
|
-
$medium-gutter:
|
9
|
+
$small-gutter : 10px;
|
10
|
+
$medium-gutter: 20px;
|
11
11
|
$large-gutter : 30px;
|
12
|
-
$columns : 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight'
|
12
|
+
$columns : 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight';
|
13
13
|
|
14
14
|
// Horizontal gutter mixin
|
15
15
|
@mixin horizontal-gutter($amount) {
|
@@ -24,10 +24,10 @@ $columns : 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',
|
|
24
24
|
|
25
25
|
// Vertical gutter mixin
|
26
26
|
@mixin vertical-gutter($amount) {
|
27
|
-
margin-bottom:
|
27
|
+
margin-bottom: -$amount;
|
28
28
|
|
29
29
|
> * {
|
30
|
-
margin-bottom:
|
30
|
+
margin-bottom: $amount;
|
31
31
|
}
|
32
32
|
}
|
33
33
|
|
@@ -74,7 +74,7 @@ form [class*='columns'] {
|
|
74
74
|
}
|
75
75
|
|
76
76
|
// Flexible columns
|
77
|
-
.
|
77
|
+
.flex {
|
78
78
|
flex: 1;
|
79
79
|
}
|
80
80
|
|
@@ -159,6 +159,72 @@ form [class*='columns'] {
|
|
159
159
|
.large-gutter > .#{nth($columns, $a)}-of-#{nth($columns, $b)} {
|
160
160
|
@extend %span-#{nth($columns, $key)}-large-gutter;
|
161
161
|
}
|
162
|
+
|
163
|
+
// Alias for full-width columns
|
164
|
+
@if $key == length($columns) {
|
165
|
+
|
166
|
+
// No gutter
|
167
|
+
.span {
|
168
|
+
@extend %span-#{nth($columns, $key)};
|
169
|
+
}
|
170
|
+
|
171
|
+
// Regular gutter
|
172
|
+
.gutter > .span {
|
173
|
+
@extend %span-#{nth($columns, $key)}-gutter;
|
174
|
+
}
|
175
|
+
|
176
|
+
// Small gutter
|
177
|
+
.small-gutter > .span {
|
178
|
+
@extend %span-#{nth($columns, $key)}-small-gutter;
|
179
|
+
}
|
180
|
+
|
181
|
+
// Large gutter
|
182
|
+
.large-gutter > .span {
|
183
|
+
@extend %span-#{nth($columns, $key)}-large-gutter;
|
184
|
+
}
|
185
|
+
}
|
162
186
|
}
|
163
187
|
}
|
188
|
+
}
|
189
|
+
|
190
|
+
/* ===================================== *
|
191
|
+
* Vertical alignment
|
192
|
+
* ------------------------------------- */
|
193
|
+
|
194
|
+
.top-aligned {
|
195
|
+
align-items: flex-start;
|
196
|
+
}
|
197
|
+
|
198
|
+
.center-aligned {
|
199
|
+
align-items: center;
|
200
|
+
}
|
201
|
+
|
202
|
+
.bottom-aligned {
|
203
|
+
align-items: flex-end;
|
204
|
+
}
|
205
|
+
|
206
|
+
/* ===================================== *
|
207
|
+
* Horizontal justification
|
208
|
+
* ------------------------------------- */
|
209
|
+
|
210
|
+
.left-justified {
|
211
|
+
justify-items: flex-start;
|
212
|
+
}
|
213
|
+
|
214
|
+
.center-justified {
|
215
|
+
justify-items: center;
|
216
|
+
}
|
217
|
+
|
218
|
+
.right-justified {
|
219
|
+
justify-items: flex-end;
|
220
|
+
}
|
221
|
+
|
222
|
+
/* ===================================== *
|
223
|
+
* Breakpoints
|
224
|
+
* ------------------------------------- */
|
225
|
+
|
226
|
+
[class*='columns'].medium-breakpoint > * {
|
227
|
+
@media (max-width: 950px) {
|
228
|
+
flex: 0 1 100%;
|
229
|
+
}
|
164
230
|
}
|
@@ -29,6 +29,20 @@ textarea {
|
|
29
29
|
color: $gray-11;
|
30
30
|
}
|
31
31
|
|
32
|
+
#{$block-elements} {
|
33
|
+
margin-bottom: $vertical-margin;
|
34
|
+
}
|
35
|
+
|
36
|
+
|
37
|
+
/* ===================================== *
|
38
|
+
* Application
|
39
|
+
* ------------------------------------- */
|
40
|
+
|
41
|
+
.application-content {
|
42
|
+
padding: $content-padding;
|
43
|
+
background: $gray-02;
|
44
|
+
}
|
45
|
+
|
32
46
|
/* ===================================== *
|
33
47
|
* Visibility
|
34
48
|
* ------------------------------------- */
|
@@ -36,12 +50,4 @@ textarea {
|
|
36
50
|
.hidden {
|
37
51
|
display: none;
|
38
52
|
visibility: hidden;
|
39
|
-
}
|
40
|
-
|
41
|
-
// Temporary content stuffs
|
42
|
-
.content {
|
43
|
-
max-width: 1200px;
|
44
|
-
padding: $content-padding;
|
45
|
-
margin-left: auto;
|
46
|
-
margin-right: auto;
|
47
53
|
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/* ========================================================================== *
|
2
|
+
* Navigation module
|
3
|
+
* -------------------------------------------------------------------------- */
|
4
|
+
|
5
|
+
.horizontal-nav {
|
6
|
+
display: flex;
|
7
|
+
flex-flow: row wrap;
|
8
|
+
position: relative;
|
9
|
+
background: $white;
|
10
|
+
box-shadow:
|
11
|
+
0 -1px rgba($gray-11, .1) inset,
|
12
|
+
0 0 0 1px rgba($gray-11, .05) inset,
|
13
|
+
0 1px 3px -1px rgba($gray-11, .1);
|
14
|
+
|
15
|
+
a {
|
16
|
+
padding: 9px 12px;
|
17
|
+
text-decoration: none;
|
18
|
+
transition: background $duration;
|
19
|
+
|
20
|
+
@include normal {
|
21
|
+
color: $blue-03;
|
22
|
+
background: transparent;
|
23
|
+
}
|
24
|
+
|
25
|
+
&.active {
|
26
|
+
color: $blue-03;
|
27
|
+
background: rgba($blue-03, .1);
|
28
|
+
}
|
29
|
+
|
30
|
+
@include active {
|
31
|
+
color: $blue-03;
|
32
|
+
background: rgba($blue-03, .1);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|