tungsten 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/tungsten/core/_buttons.scss +5 -8
- data/app/assets/stylesheets/tungsten/core/_tables.scss +3 -3
- data/app/assets/stylesheets/tungsten/form/_check-radio.scss +1 -0
- data/app/assets/stylesheets/tungsten/form/_check-switch.scss +12 -8
- data/app/assets/stylesheets/tungsten/form/_index.scss +1 -0
- data/app/assets/stylesheets/tungsten/form/_label-placeholder.scss +1 -1
- data/app/assets/stylesheets/tungsten/form/_slider.scss +387 -0
- data/app/helpers/tungsten/form_helper.rb +10 -2
- data/lib/tungsten/version.rb +1 -1
- data/public/{code-0.1.4.js → code-0.1.5.js} +1 -1
- data/public/{code-0.1.4.js.gz → code-0.1.5.js.gz} +0 -0
- data/public/{code-0.1.4.map.json → code-0.1.5.map.json} +0 -0
- data/public/{tungsten-0.1.4.css → tungsten-0.1.5.css} +405 -14
- data/public/tungsten-0.1.5.css.gz +0 -0
- data/public/{tungsten-0.1.4.js → tungsten-0.1.5.js} +2 -2
- data/public/{tungsten-0.1.4.js.gz → tungsten-0.1.5.js.gz} +0 -0
- data/public/tungsten-0.1.5.map.json +1 -0
- metadata +10 -9
- data/public/tungsten-0.1.4.css.gz +0 -0
- data/public/tungsten-0.1.4.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: f909f0937328ef9672199c895d0616a2260947f9
|
4
|
+
data.tar.gz: 775474c2bb1a15328c9fcb4c0d82cc5e60d6fde1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ece4c95ab1394b3dfff54e19514f92e48148e440b2d4db81d20f1ccb7ccaca658ef3dc62147338ecf0baf49e10ff481b933f873c070702a2fd9f6a3dbdf540e2
|
7
|
+
data.tar.gz: 0a05cd1a62943c91ea59368940c5a2309e2a593ba9a4a0d983b4483c2776024a1a651be0de749ad65994d3be52926a1c869a70d800810ea8268e3ef027a1b486
|
@@ -17,7 +17,7 @@
|
|
17
17
|
text-align: center;
|
18
18
|
text-decoration: none;
|
19
19
|
border: 0;
|
20
|
-
padding: 12px
|
20
|
+
padding: 8px 12px;
|
21
21
|
background: $white;
|
22
22
|
border-radius: $radius;
|
23
23
|
transition:
|
@@ -25,12 +25,9 @@
|
|
25
25
|
background $duration,
|
26
26
|
box-shadow $duration;
|
27
27
|
|
28
|
-
//
|
29
|
-
|
30
|
-
|
31
|
-
.button-group &,
|
32
|
-
&.small {
|
33
|
-
padding: 8px 12px;
|
28
|
+
// Make it bigger ¯\_(ツ)_/¯
|
29
|
+
&.large {
|
30
|
+
padding: 12px 15px;
|
34
31
|
}
|
35
32
|
|
36
33
|
// Normal state
|
@@ -146,4 +143,4 @@
|
|
146
143
|
// Siblings need their space
|
147
144
|
// .button + .button {
|
148
145
|
// margin-left: 10px;
|
149
|
-
// }
|
146
|
+
// }
|
@@ -43,7 +43,7 @@ table.ruled {
|
|
43
43
|
}
|
44
44
|
|
45
45
|
// Outlined cells
|
46
|
-
table.outlined {
|
46
|
+
table.outlined, table.doc-table {
|
47
47
|
border-collapse: collapse;
|
48
48
|
td,
|
49
49
|
th {
|
@@ -60,7 +60,7 @@ table.striped {
|
|
60
60
|
}
|
61
61
|
|
62
62
|
// Equal-width columns
|
63
|
-
table.stretched {
|
63
|
+
table.stretched, table.doc-table {
|
64
64
|
table-layout: fixed;
|
65
65
|
min-width: 100%;
|
66
66
|
}
|
@@ -78,4 +78,4 @@ table.filled {
|
|
78
78
|
td:last-child {
|
79
79
|
width: 99%;
|
80
80
|
}
|
81
|
-
}
|
81
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.check-switch {
|
2
|
-
$width:
|
3
|
-
$height:
|
4
|
-
$tick-width: $width/2 -
|
2
|
+
$width: 40px;
|
3
|
+
$height: 22px;
|
4
|
+
$tick-width: $width/2 - 2;
|
5
5
|
cursor: pointer;
|
6
6
|
flex-direction: row; align-items: center;
|
7
7
|
|
@@ -30,11 +30,11 @@
|
|
30
30
|
|
31
31
|
&-tick {
|
32
32
|
width: $tick-width;
|
33
|
-
height: $height -
|
33
|
+
height: $height - 4;
|
34
34
|
background: $white;
|
35
35
|
position: absolute;
|
36
|
-
bottom:
|
37
|
-
left:
|
36
|
+
bottom: 2px;
|
37
|
+
left: 2px;
|
38
38
|
border-radius: $height;
|
39
39
|
transition-property: transform;
|
40
40
|
transform: translate3d( 0, 0, 0 );
|
@@ -50,10 +50,12 @@
|
|
50
50
|
~ .check-switch-panel {
|
51
51
|
background: rgba( $gray-11, .2 );
|
52
52
|
}
|
53
|
+
~ .check-switch-panel .check-switch-tick {
|
54
|
+
transform: scale(1.1);
|
55
|
+
}
|
53
56
|
}
|
54
57
|
}
|
55
58
|
|
56
|
-
|
57
59
|
input:checked + &-panel &-tick {
|
58
60
|
transform: translate3d( $tick-width , 0, 0 );
|
59
61
|
}
|
@@ -66,7 +68,9 @@
|
|
66
68
|
background: darken( $blue-03, 2 );
|
67
69
|
box-shadow: input-shadow( $blue-04 );
|
68
70
|
}
|
71
|
+
~ .check-switch-panel .check-switch-tick {
|
72
|
+
transform: scale(1.1) translate3d( $tick-width - 2 , 0, 0 );
|
73
|
+
}
|
69
74
|
}
|
70
75
|
}
|
71
|
-
|
72
76
|
}
|
@@ -0,0 +1,387 @@
|
|
1
|
+
$slider-track: $gray-02;
|
2
|
+
$slider-track-line: rgba( $gray-11, .2 );
|
3
|
+
$slider-mark: $white;
|
4
|
+
$slider-active: $blue-01;//hsl(203, 47%, 65%);
|
5
|
+
|
6
|
+
@mixin slider-fill-theme($color, $class: 'fill', $index: '') {
|
7
|
+
$threshold: 8;
|
8
|
+
|
9
|
+
@if $index == '' {
|
10
|
+
$index: 'data-index';
|
11
|
+
} @else {
|
12
|
+
$index: 'data-index="#{$index}"';
|
13
|
+
}
|
14
|
+
|
15
|
+
.slider-input.#{$class} {
|
16
|
+
~ .slider-fills {
|
17
|
+
.slider-fill[#{$index}].filled {
|
18
|
+
background: $color;
|
19
|
+
border-right-color: darken($color, 12);
|
20
|
+
&:first-child {
|
21
|
+
border-left-color: darken($color, 12);
|
22
|
+
}
|
23
|
+
&:before {
|
24
|
+
box-shadow: darken($color, 12) 0 0 0 1px;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
~ .slider-track {
|
30
|
+
.filled .slider-segment-mark[#{$index}] {
|
31
|
+
&:before {
|
32
|
+
border-color: $color;
|
33
|
+
box-shadow: darken($color, 12) 0 0 0 1px inset;
|
34
|
+
}
|
35
|
+
&:after {
|
36
|
+
box-shadow: darken($color, 12) 0 0 0 1px;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
@mixin reset-slider {
|
45
|
+
-webkit-appearance: none;
|
46
|
+
-moz-appearance: none;
|
47
|
+
width: 100%;
|
48
|
+
margin: 0;
|
49
|
+
cursor: pointer;
|
50
|
+
&:focus { outline: none; }
|
51
|
+
&::-webkit-slider-thumb { -webkit-appearance: none; }
|
52
|
+
&::-moz-slider-thumb { -moz-appearance: none; }
|
53
|
+
&::-ms-track {
|
54
|
+
width: 100%;
|
55
|
+
cursor: pointer;
|
56
|
+
background: transparent;
|
57
|
+
border-color: transparent;
|
58
|
+
color: transparent;
|
59
|
+
}
|
60
|
+
&::-moz-focus-outer {
|
61
|
+
border: 0;
|
62
|
+
}
|
63
|
+
&::-moz-range-track {
|
64
|
+
border: inherit;
|
65
|
+
background: transparent;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
@mixin slider-thumb {
|
70
|
+
&::-moz-range-thumb { @content; }
|
71
|
+
&::-webkit-slider-thumb { @content; }
|
72
|
+
&::-ms-thumb { @content; }
|
73
|
+
}
|
74
|
+
|
75
|
+
@mixin slider-track {
|
76
|
+
@content;
|
77
|
+
&::-moz-slider-track {
|
78
|
+
@content;
|
79
|
+
}
|
80
|
+
&::-ms-track {
|
81
|
+
@content;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
.empty-label[data-slider-label] {
|
86
|
+
display: none;
|
87
|
+
}
|
88
|
+
|
89
|
+
input[type=range] {
|
90
|
+
@include reset-slider;
|
91
|
+
position: relative;
|
92
|
+
z-index: 4;
|
93
|
+
|
94
|
+
@include slider-thumb {
|
95
|
+
box-shadow: rgba(#000, .4) 0 0 0 1px, rgba(#000, .4) 0 1px 1px inset;
|
96
|
+
border: 6px solid #fff;
|
97
|
+
background: $slider-track-line;
|
98
|
+
box-sizing: border-box;
|
99
|
+
height: 19px;
|
100
|
+
width: 19px;
|
101
|
+
border-radius: 100%;
|
102
|
+
position: relative;
|
103
|
+
top: 3px;
|
104
|
+
transition: all .15s ease-in;
|
105
|
+
&:after {
|
106
|
+
box-sizing: border-box;
|
107
|
+
content: "";
|
108
|
+
position: absolute;
|
109
|
+
left: -15px; right: -15px; top: -15px; bottom: -15px;
|
110
|
+
|
111
|
+
}
|
112
|
+
&:active {
|
113
|
+
background: $slider-active;//#409bd9;
|
114
|
+
box-shadow: 0 0 2px 2px $slider-active, rgba(#000, .4) 0 1px 1px inset;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
&:focus {
|
119
|
+
@include slider-thumb {
|
120
|
+
background: $slider-active;//#409bd9;
|
121
|
+
box-shadow: 0 0 2px 2px $slider-active, rgba(#000, .4) 0 1px 1px inset;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
@include slider-track {
|
126
|
+
height: 16px;
|
127
|
+
background: transparent;
|
128
|
+
|
129
|
+
&:after {
|
130
|
+
position: absolute;
|
131
|
+
content: "";
|
132
|
+
left: 4px; right: 4px; top: 6px;
|
133
|
+
height: 5px;
|
134
|
+
background: $slider-track;
|
135
|
+
z-index: -1;
|
136
|
+
border-radius: 4px;
|
137
|
+
box-shadow: $slider-track-line 0 0 0 1px;
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
&.slider-input {
|
142
|
+
margin: 0;
|
143
|
+
|
144
|
+
@include slider-track {
|
145
|
+
&:after {
|
146
|
+
display: none;
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
input::-moz-focus-inner {
|
153
|
+
border: 0;
|
154
|
+
}
|
155
|
+
|
156
|
+
.slider-container {
|
157
|
+
position: relative;
|
158
|
+
padding: .5em 0;
|
159
|
+
|
160
|
+
@include at-least(400px){
|
161
|
+
display: flex;
|
162
|
+
flex-flow: row nowrap;
|
163
|
+
align-items: center;
|
164
|
+
&.with-label {
|
165
|
+
max-width: 320px;
|
166
|
+
}
|
167
|
+
}
|
168
|
+
|
169
|
+
&.line-labels {
|
170
|
+
padding: vr(1) 0 0;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
.slider-input-container {
|
175
|
+
position: relative;
|
176
|
+
flex: 1 0 auto;
|
177
|
+
/*margin: .6em 0;*/
|
178
|
+
}
|
179
|
+
|
180
|
+
.slider-track {
|
181
|
+
height: 0px;
|
182
|
+
display: flex;
|
183
|
+
align-items: center;
|
184
|
+
flex-flow: row wrap;
|
185
|
+
justify-content: space-between;
|
186
|
+
margin: 0 10px 0 9px;
|
187
|
+
position: relative;
|
188
|
+
top: -12px;
|
189
|
+
}
|
190
|
+
|
191
|
+
.slider-segment {
|
192
|
+
position: relative;
|
193
|
+
}
|
194
|
+
|
195
|
+
.slider-segment-mark {
|
196
|
+
&:before, &:after {
|
197
|
+
position: absolute;
|
198
|
+
content: "";
|
199
|
+
width: 13px;
|
200
|
+
height: 13px;
|
201
|
+
top: -4px;
|
202
|
+
left: -5px;
|
203
|
+
box-sizing: border-box;
|
204
|
+
border-radius: 100%;
|
205
|
+
}
|
206
|
+
&:before {
|
207
|
+
background: $slider-mark;
|
208
|
+
border: $slider-track 3px solid;
|
209
|
+
box-shadow: $slider-track-line 0 0 0 1px inset;
|
210
|
+
z-index: 3;
|
211
|
+
}
|
212
|
+
&:after {
|
213
|
+
box-shadow: $slider-track-line 0 0 0 1px;
|
214
|
+
z-index: 0;
|
215
|
+
}
|
216
|
+
}
|
217
|
+
|
218
|
+
.slider-fills {
|
219
|
+
position: absolute;
|
220
|
+
left: 9px;
|
221
|
+
right: 10px;
|
222
|
+
top: 9px;
|
223
|
+
height: 5px;
|
224
|
+
z-index: 1;
|
225
|
+
display: flex;
|
226
|
+
}
|
227
|
+
|
228
|
+
.slider-fill {
|
229
|
+
flex-grow: 1;
|
230
|
+
height: 5px;
|
231
|
+
position: relative;
|
232
|
+
|
233
|
+
box-sizing: border-box;
|
234
|
+
background: $slider-track;
|
235
|
+
border-left: 1px solid transparent;
|
236
|
+
border-right: 1px solid $slider-track-line;
|
237
|
+
|
238
|
+
&:before {
|
239
|
+
content: "";
|
240
|
+
position: absolute;
|
241
|
+
top: 0px; left: 0px; right: 0px; bottom: 0px;
|
242
|
+
box-shadow: $slider-track-line 0 0 0 1px;
|
243
|
+
z-index: -1;
|
244
|
+
}
|
245
|
+
|
246
|
+
&:first-child {
|
247
|
+
border-left: 1px solid $slider-track-line;
|
248
|
+
&, &:before {
|
249
|
+
border-top-left-radius: 5px;
|
250
|
+
border-bottom-left-radius: 5px;
|
251
|
+
}
|
252
|
+
&:before { left: 0px; }
|
253
|
+
}
|
254
|
+
|
255
|
+
&:last-child {
|
256
|
+
&, &:before {
|
257
|
+
border-top-right-radius: 5px;
|
258
|
+
border-bottom-right-radius: 5px;
|
259
|
+
}
|
260
|
+
&:before { right: 0px; }
|
261
|
+
}
|
262
|
+
|
263
|
+
}
|
264
|
+
|
265
|
+
.slider-input.no-segments, .slider-input[max='100'] {
|
266
|
+
~ .slider-fills .slider-fill { border-right: 0; }
|
267
|
+
}
|
268
|
+
|
269
|
+
.slider-line-label {
|
270
|
+
position: absolute;
|
271
|
+
white-space: nowrap;
|
272
|
+
font-size: 12px;
|
273
|
+
z-index: 3;
|
274
|
+
height: 1.25;
|
275
|
+
top: -28px;
|
276
|
+
right: -30px;
|
277
|
+
left: -28px;
|
278
|
+
text-align: center;
|
279
|
+
}
|
280
|
+
|
281
|
+
.slider-segment:first-child .slider-line-label {
|
282
|
+
left: -9px;
|
283
|
+
right: auto;
|
284
|
+
text-align: left;
|
285
|
+
&:before {
|
286
|
+
left: 8px;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
|
290
|
+
.slider-segment:last-child .slider-line-label {
|
291
|
+
right: -11px;
|
292
|
+
left: auto;
|
293
|
+
text-align: right;
|
294
|
+
&:before {
|
295
|
+
right: 9px;
|
296
|
+
}
|
297
|
+
}
|
298
|
+
|
299
|
+
.slider-label {
|
300
|
+
background: $slider-mark;
|
301
|
+
border-radius: 3px;
|
302
|
+
box-shadow: $slider-track-line 0 0 0 1px;
|
303
|
+
font-size: 14px;
|
304
|
+
padding: 4px 8px;
|
305
|
+
position: relative;
|
306
|
+
text-align: center;
|
307
|
+
|
308
|
+
@include at-least(400px){
|
309
|
+
white-space: nowrap;
|
310
|
+
position: absolute;
|
311
|
+
top: 50%;
|
312
|
+
transform: translatey(-50%);
|
313
|
+
transform-style: preserve-3d;
|
314
|
+
&:after, &:before {
|
315
|
+
content: "";
|
316
|
+
}
|
317
|
+
}
|
318
|
+
|
319
|
+
&:after, &:before {
|
320
|
+
position: absolute;
|
321
|
+
width: 0;
|
322
|
+
height: 0;
|
323
|
+
top: 50%;
|
324
|
+
transform: translatey(-50%);
|
325
|
+
transform-style: preserve-3d;
|
326
|
+
border-top: 7px solid transparent;
|
327
|
+
border-bottom: 7px solid transparent;
|
328
|
+
}
|
329
|
+
|
330
|
+
> * + * {
|
331
|
+
&:before { content: " — " }
|
332
|
+
|
333
|
+
@include at-least(400px) {
|
334
|
+
display: block;
|
335
|
+
&:before { content: ""; }
|
336
|
+
}
|
337
|
+
}
|
338
|
+
|
339
|
+
[class*=big] {
|
340
|
+
font-size: 1.15em;
|
341
|
+
}
|
342
|
+
|
343
|
+
[class*=small] {
|
344
|
+
font-size: .8em;
|
345
|
+
}
|
346
|
+
}
|
347
|
+
|
348
|
+
[data-slider-label] {
|
349
|
+
&:after { content: attr(data-after); }
|
350
|
+
&:before { content: attr(data-before); }
|
351
|
+
}
|
352
|
+
|
353
|
+
.slider-label.align-right {
|
354
|
+
@include at-least(400px) {
|
355
|
+
margin-left: 10px;
|
356
|
+
left: 100%;
|
357
|
+
text-align: left;
|
358
|
+
}
|
359
|
+
&:before, &:after {
|
360
|
+
left: -7px;
|
361
|
+
border-right: 7px solid $slider-track-line;
|
362
|
+
}
|
363
|
+
&:after {
|
364
|
+
border-right-color: $slider-mark;
|
365
|
+
left: -6px;
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
.slider-label.align-left {
|
370
|
+
@include at-least(400px) {
|
371
|
+
margin-right: 10px;
|
372
|
+
right: 100%;
|
373
|
+
text-align: right;
|
374
|
+
}
|
375
|
+
&:before, &:after {
|
376
|
+
right: -7px;
|
377
|
+
border-top: 7px solid transparent;
|
378
|
+
border-left: 7px solid $slider-track-line;
|
379
|
+
border-bottom: 7px solid transparent;
|
380
|
+
}
|
381
|
+
&:after {
|
382
|
+
border-left-color: $slider-mark;
|
383
|
+
right: -6px;
|
384
|
+
}
|
385
|
+
}
|
386
|
+
|
387
|
+
@include slider-fill-theme($slider-active, 'fill');
|