active_frontend 14.1.12 → 14.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_frontend/version.rb +1 -1
- data/vendor/assets/javascripts/base/_tag.js +9 -2
- data/vendor/assets/javascripts/base/_typeahead.js +1 -1
- data/vendor/assets/stylesheets/_utility.scss +3 -0
- data/vendor/assets/stylesheets/_variable.scss +52 -7
- data/vendor/assets/stylesheets/blocks/_form.scss +32 -9
- data/vendor/assets/stylesheets/components/_label_and_badge.scss +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fe72a00b18afdd4c9f5826c9b12c6e939a440ce
|
4
|
+
data.tar.gz: c6289815947b25fe9a9a18c93ef6134f698acab9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4af5fbb0fd4e5386384e48d23f81d5118eddb9112eb6d9e19c87e5b6eeaf08ec05760ec72c7ac5350394a4fe8f9c8115eadfec2d74785f50a83d7f4ce179190c
|
7
|
+
data.tar.gz: 8c9bc7cd7737ff136f855adf04cd444d19670649fcdf81467543bf571bd56c4a2f7bb28f8b3bac9fbec9511cd889447642acb3aa148c08ee887e0cc895c8975c
|
@@ -18,6 +18,7 @@
|
|
18
18
|
this.$input = $('<input type="text" placeholder="' + this.placeholderText + '"/>').appendTo(this.$container);
|
19
19
|
this.$element.before(this.$container);
|
20
20
|
this.build(options);
|
21
|
+
this.moveLabel();
|
21
22
|
this.isInit = false;
|
22
23
|
};
|
23
24
|
|
@@ -34,13 +35,13 @@
|
|
34
35
|
},
|
35
36
|
onTagExists: function(item, $tag) {},
|
36
37
|
tagClass: function(item) {
|
37
|
-
return 'label';
|
38
|
+
return 'label label-color-primary label-color-inverted';
|
38
39
|
},
|
39
40
|
addOnBlur: true,
|
40
41
|
allowDuplicates: false,
|
41
42
|
cancelConfirmKeysOnEmpty: false,
|
42
43
|
confirmKeys: [13, 44],
|
43
|
-
delimiter: ',',
|
44
|
+
delimiter: ', ',
|
44
45
|
delimiterRegex: null,
|
45
46
|
focusClass: 'focus',
|
46
47
|
freeInput: true,
|
@@ -293,6 +294,12 @@
|
|
293
294
|
if (_self.options.triggerChange) _self.$element.trigger('change');
|
294
295
|
};
|
295
296
|
|
297
|
+
Tag.prototype.moveLabel = function () {
|
298
|
+
var label = this.$element.next('label');
|
299
|
+
|
300
|
+
if (label.length) label.insertAfter(this.$container);
|
301
|
+
};
|
302
|
+
|
296
303
|
Tag.prototype.build = function(options) {
|
297
304
|
var _self = this;
|
298
305
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
// Table of Contents
|
2
2
|
// ==================================================
|
3
|
+
// Functions
|
3
4
|
// Animation
|
4
5
|
// Color
|
5
6
|
// Common
|
@@ -7,6 +8,23 @@
|
|
7
8
|
// Grid
|
8
9
|
// Progress
|
9
10
|
|
11
|
+
// Functions
|
12
|
+
// ==================================================
|
13
|
+
@function map-collect($maps...) {
|
14
|
+
$collection: ();
|
15
|
+
|
16
|
+
@each $map in $maps {
|
17
|
+
$collection: map-merge($collection, $map);
|
18
|
+
}
|
19
|
+
|
20
|
+
@return $collection;
|
21
|
+
}
|
22
|
+
@function map-global-collect($global-collection, $global-name) {
|
23
|
+
$name: map-get($colors-global, $global-name);
|
24
|
+
|
25
|
+
@return map-get($global-collection, $name);
|
26
|
+
}
|
27
|
+
|
10
28
|
// Animation
|
11
29
|
// ==================================================
|
12
30
|
$animation-delays: (
|
@@ -33,6 +51,12 @@ $animation-durations: (
|
|
33
51
|
|
34
52
|
// Color
|
35
53
|
// ==================================================
|
54
|
+
$colors-global: (
|
55
|
+
'primary': 'blue',
|
56
|
+
'secondary': 'green',
|
57
|
+
'tertiary': 'red',
|
58
|
+
'quaditiary': 'yellow'
|
59
|
+
);
|
36
60
|
$colors-brand: (
|
37
61
|
'lime': rgba(164,217,111,1),
|
38
62
|
'green': rgba(52,208,102,1),
|
@@ -47,6 +71,32 @@ $colors-brand: (
|
|
47
71
|
'orange': rgba(252,174,70,1),
|
48
72
|
'yellow': rgba(248,214,72,1)
|
49
73
|
);
|
74
|
+
$colors-brand-global: (
|
75
|
+
'primary': map-global-collect($colors-brand, 'primary'),
|
76
|
+
'secondary': map-global-collect($colors-brand, 'secondary'),
|
77
|
+
'tertiary': map-global-collect($colors-brand, 'tertiary'),
|
78
|
+
'quaditiary': map-global-collect($colors-brand, 'quaditiary')
|
79
|
+
);
|
80
|
+
$colors-inverted: (
|
81
|
+
'lime': rgba(242,250,235,1),
|
82
|
+
'green': rgba(227,249,234,1),
|
83
|
+
'teal': rgba(234,251,248,1),
|
84
|
+
'sky': rgba(235,249,255,1),
|
85
|
+
'blue': rgba(227,241,255,1),
|
86
|
+
'indigo': rgba(245,242,252,1),
|
87
|
+
'purple': rgba(249,236,252,1),
|
88
|
+
'pink': rgba(253,234,236,1),
|
89
|
+
'red': rgba(253,229,228,1),
|
90
|
+
'brown': rgba(250,241,232,1),
|
91
|
+
'orange': rgba(255,242,224,1),
|
92
|
+
'yellow': rgba(254,248,223,1)
|
93
|
+
);
|
94
|
+
$colors-inverted-global: (
|
95
|
+
'primary': map-global-collect($colors-inverted, 'primary'),
|
96
|
+
'secondary': map-global-collect($colors-inverted, 'secondary'),
|
97
|
+
'tertiary': map-global-collect($colors-inverted, 'tertiary'),
|
98
|
+
'quaditiary': map-global-collect($colors-inverted, 'quaditiary')
|
99
|
+
);
|
50
100
|
$colors-grayscale: (
|
51
101
|
'transparent': rgba(0,0,0,0),
|
52
102
|
'dark-black': rgba(37,49,62,1),
|
@@ -60,13 +110,8 @@ $colors-grayscale: (
|
|
60
110
|
'light-haze': rgba(248,249,253,1),
|
61
111
|
'white': rgba(255,255,255,1)
|
62
112
|
);
|
63
|
-
$colors-global
|
64
|
-
|
65
|
-
'secondary': map-get($colors-brand, 'green'),
|
66
|
-
'tertiary': map-get($colors-brand, 'red'),
|
67
|
-
'quaditiary': map-get($colors-brand, 'yellow')
|
68
|
-
);
|
69
|
-
$colors: map-merge(map-merge($colors-brand, $colors-grayscale), $colors-global);
|
113
|
+
$colors: map-collect($colors-brand, $colors-brand-global, $colors-grayscale);
|
114
|
+
$colors-inversions: map-collect($colors-inverted, $colors-inverted-global);
|
70
115
|
$colors-black-text: 'transparent', 'dark-haze', 'haze', 'light-haze', 'white';
|
71
116
|
|
72
117
|
// Common
|
@@ -148,7 +148,8 @@ textarea {
|
|
148
148
|
|
149
149
|
&.form-size-l {
|
150
150
|
input,
|
151
|
-
textarea
|
151
|
+
textarea,
|
152
|
+
.form-tags {
|
152
153
|
font-size: text-size(l);
|
153
154
|
padding: 14px 20px 15px;
|
154
155
|
}
|
@@ -168,7 +169,8 @@ textarea {
|
|
168
169
|
}
|
169
170
|
&.form-size-m {
|
170
171
|
input,
|
171
|
-
textarea
|
172
|
+
textarea,
|
173
|
+
.form-tags {
|
172
174
|
font-size: text-size(m);
|
173
175
|
padding: 11px 20px 12px;
|
174
176
|
}
|
@@ -188,7 +190,8 @@ textarea {
|
|
188
190
|
}
|
189
191
|
&.form-size-s {
|
190
192
|
input,
|
191
|
-
textarea
|
193
|
+
textarea,
|
194
|
+
.form-tags {
|
192
195
|
font-size: text-size(s);
|
193
196
|
margin-bottom: 5px;
|
194
197
|
padding: 5px 10px;
|
@@ -454,7 +457,9 @@ textarea {
|
|
454
457
|
display: inline-block;
|
455
458
|
outline: none;
|
456
459
|
margin: 0;
|
457
|
-
padding: 0;
|
460
|
+
padding: 0 !important;
|
461
|
+
min-width: auto;
|
462
|
+
vertical-align: top;
|
458
463
|
width: auto;
|
459
464
|
}
|
460
465
|
}
|
@@ -477,7 +482,8 @@ textarea {
|
|
477
482
|
position: relative;
|
478
483
|
vertical-align: top;
|
479
484
|
|
480
|
-
> label
|
485
|
+
> label,
|
486
|
+
> .form-tags + label {
|
481
487
|
@include transition(all 0.3s ease-in-out);
|
482
488
|
background: color(haze);
|
483
489
|
border-radius: border-radius(s);
|
@@ -494,7 +500,8 @@ textarea {
|
|
494
500
|
|
495
501
|
&.form-size-l,
|
496
502
|
&.form-size-m {
|
497
|
-
> label
|
503
|
+
> label,
|
504
|
+
> .form-tags + label {
|
498
505
|
font-size: text-size(xs);
|
499
506
|
left: 21px;
|
500
507
|
margin-top: -9px;
|
@@ -502,7 +509,8 @@ textarea {
|
|
502
509
|
}
|
503
510
|
}
|
504
511
|
&.form-size-s {
|
505
|
-
> label
|
512
|
+
> label,
|
513
|
+
> .form-tags + label {
|
506
514
|
font-size: text-size(xxs);
|
507
515
|
left: 12px;
|
508
516
|
margin-top: -6px;
|
@@ -510,10 +518,12 @@ textarea {
|
|
510
518
|
}
|
511
519
|
}
|
512
520
|
&.dark {
|
513
|
-
> label
|
521
|
+
> label,
|
522
|
+
> .form-tags + label { background: color(light-black); }
|
514
523
|
}
|
515
524
|
&.light {
|
516
|
-
> label
|
525
|
+
> label,
|
526
|
+
> .form-tags + label { background: color(dark-haze); }
|
517
527
|
}
|
518
528
|
|
519
529
|
input,
|
@@ -531,6 +541,19 @@ textarea {
|
|
531
541
|
top: 0;
|
532
542
|
}
|
533
543
|
}
|
544
|
+
|
545
|
+
> .form-tags {
|
546
|
+
&.focus + label {
|
547
|
+
opacity: 1;
|
548
|
+
top: 0;
|
549
|
+
}
|
550
|
+
|
551
|
+
> .tag + input {
|
552
|
+
&::-webkit-input-placeholder { color: color(transparent); }
|
553
|
+
&::-moz-placeholder { color: color(transparent); }
|
554
|
+
&:-ms-input-placeholder { color: color(transparent); }
|
555
|
+
}
|
556
|
+
}
|
534
557
|
}
|
535
558
|
|
536
559
|
// Addons
|
@@ -43,6 +43,19 @@
|
|
43
43
|
&.label-outline { color: color($name); }
|
44
44
|
}
|
45
45
|
}
|
46
|
+
@each $name, $color in map-keys($colors-inversions) {
|
47
|
+
.badge-color-#{$name},
|
48
|
+
.label-color-#{$name} {
|
49
|
+
&.badge-color-inverted,
|
50
|
+
&.label-color-inverted {
|
51
|
+
background: color-inverted($name);
|
52
|
+
border-color: color-inverted($name);
|
53
|
+
color: color($name);
|
54
|
+
}
|
55
|
+
&.badge-outline,
|
56
|
+
&.label-outline { border-color: color($name); }
|
57
|
+
}
|
58
|
+
}
|
46
59
|
|
47
60
|
// Sizes
|
48
61
|
// ==================================================
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_frontend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.1.
|
4
|
+
version: 14.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|