active_frontend 14.1.12 → 14.1.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb7d2e2dc38ec29f446a3b87fbec04a382c8d2ba
4
- data.tar.gz: 0bbac34d846d4cdaabf1a5fd07fef2ce826baf39
3
+ metadata.gz: 5fe72a00b18afdd4c9f5826c9b12c6e939a440ce
4
+ data.tar.gz: c6289815947b25fe9a9a18c93ef6134f698acab9
5
5
  SHA512:
6
- metadata.gz: fcf96c088c8603aa652764fc33d72246463f5d69a2173a3ad2e34b493caec54312fe46014a0de368ad0ff973ad9c484ae7711a31a608f3b458fed676ab7e9b94
7
- data.tar.gz: 5f4520a7dea9addf6c4531f5dfbe2be3314b06e6ef5313c24afa4cce5f38c5ca6b56d9bc568fcaa4f5d0e7806d5739f926379ddf2cc8892451e62fff9af72a60
6
+ metadata.gz: 4af5fbb0fd4e5386384e48d23f81d5118eddb9112eb6d9e19c87e5b6eeaf08ec05760ec72c7ac5350394a4fe8f9c8115eadfec2d74785f50a83d7f4ce179190c
7
+ data.tar.gz: 8c9bc7cd7737ff136f855adf04cd444d19670649fcdf81467543bf571bd56c4a2f7bb28f8b3bac9fbec9511cd889447642acb3aa148c08ee887e0cc895c8975c
@@ -1,3 +1,3 @@
1
1
  module ActiveFrontend
2
- VERSION = '14.1.12'.freeze
2
+ VERSION = '14.1.13'.freeze
3
3
  end
@@ -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
 
@@ -18,7 +18,7 @@
18
18
  Typeahead.DEFAULTS = {
19
19
  autoSelect: true,
20
20
  item: '<li><a href="#"></a></li>',
21
- items: 8,
21
+ items: 5,
22
22
  menu: '<ul class="typeahead dropmenu caret"></ul>',
23
23
  minLength: 1,
24
24
  scrollHeight: 0,
@@ -48,6 +48,9 @@
48
48
  @function color($color) {
49
49
  @return map-get($colors, '' + $color);
50
50
  }
51
+ @function color-inverted($color) {
52
+ @return map-get($colors-inversions, '' + $color);
53
+ }
51
54
  @function lightish-color($color) {
52
55
  @return lighten(color($color), 2.5%);
53
56
  }
@@ -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
- 'primary': map-get($colors-brand, 'blue'),
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 { background: color(light-black); }
521
+ > label,
522
+ > .form-tags + label { background: color(light-black); }
514
523
  }
515
524
  &.light {
516
- > label { background: color(dark-haze); }
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.12
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-18 00:00:00.000000000 Z
11
+ date: 2017-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails