active_frontend 14.0.53 → 14.0.54

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: 6cf837bb93b0b3ffd0843b5c01d31de824cb203e
4
- data.tar.gz: 6dc91ab85e573365c58086ab5488fb56c4880752
3
+ metadata.gz: 6665cd2dcd34430218f9dd3c756816c964a90625
4
+ data.tar.gz: 5fb5106da4b9aca9ff99dbc83d2c70990f95bdfc
5
5
  SHA512:
6
- metadata.gz: ce36b39112db75360f69c72cd1fdf36433945a5f1eb95a190bc6641f6387d733072ffd9ba9fd8fca5586bd1af95ff082deea6418ac386540bfe98d50bd4a52b3
7
- data.tar.gz: e93d89217efe565203971d531288607c93dad4af687fb48c89a8f3ca50b66318cd6b24fabcbeb0e437a584e912a125eaaf189cafe6f9c4fd2709a23ef655d54e
6
+ metadata.gz: e2bceb409511bd0151f01738d171ad853315dc5f40b59d121a60f4c955c170cb556ce0182729e012faae8932ff1e2c3e697bda1e6cb437d6bc70734c5ded7e72
7
+ data.tar.gz: ff6f3c55640ce872d0e139e3d93afaaf6d2bdd60f2d20625ad5feea0f0cacc923f39faac050912b574e9f68c3c0d136efb7220f448c21259710ab69e131d4128
@@ -1,3 +1,3 @@
1
1
  module ActiveFrontend
2
- VERSION = '14.0.53'.freeze
2
+ VERSION = '14.0.54'.freeze
3
3
  end
@@ -84,13 +84,15 @@
84
84
  };
85
85
 
86
86
  Switch.prototype.enable = function () {
87
- this.$switch.removeAttr('disabled');
88
87
  this.$element.prop('disabled', false);
88
+ this.$switch.removeAttr('disabled')
89
+ .removeClass('disabled');
89
90
  };
90
91
 
91
92
  Switch.prototype.disable = function () {
92
- this.$switch.attr('disabled', 'disabled');
93
93
  this.$element.prop('disabled', true);
94
+ this.$switch.attr('disabled', 'disabled')
95
+ .addClass('disabled');
94
96
  };
95
97
 
96
98
  Switch.prototype.update = function (silent) {
@@ -101,8 +103,12 @@
101
103
  }
102
104
 
103
105
  if (this.$element.prop('checked')) {
106
+ this.$switch
107
+ .addClass(this.options.onClass);
104
108
  this.on(silent);
105
109
  } else {
110
+ this.$switch
111
+ .addClass(this.options.offClass);
106
112
  this.off(silent);
107
113
  }
108
114
  };
@@ -360,11 +360,20 @@ textarea {
360
360
  visibility: hidden;
361
361
  top: -9999px;
362
362
 
363
+ &[disabled] + label {
364
+ background: lightish-color(haze);
365
+ box-shadow: none !important;
366
+ cursor: not-allowed;
367
+ }
363
368
  &:checked + label {
364
369
  background: color(green);
365
370
  border-color: color(green);
366
371
  color: color(white);
367
372
  }
373
+ &[disabled]:checked + label {
374
+ background: lightish-color(green) !important;
375
+ color: transparentize(color(white), 0.35);
376
+ }
368
377
 
369
378
  + label { vertical-align: baseline; }
370
379
  }
@@ -392,6 +401,11 @@ textarea {
392
401
 
393
402
  &:hover { background: color(dark-black); }
394
403
  }
404
+
405
+ input[type='checkbox'],
406
+ input[type='radio'] {
407
+ &[disabled] + label { background: lightish-color(dark-black); }
408
+ }
395
409
  }
396
410
  &.light {
397
411
  label {
@@ -400,6 +414,11 @@ textarea {
400
414
 
401
415
  &:hover { background: color(dark-haze); }
402
416
  }
417
+
418
+ input[type='checkbox'],
419
+ input[type='radio'] {
420
+ &[disabled] + label { background: lightish-color(dark-haze); }
421
+ }
403
422
  }
404
423
  }
405
424
  .form-radio { border-radius: border-radius(xl); }
@@ -7,7 +7,7 @@
7
7
  .card {
8
8
  border-color: color(dark-haze);
9
9
 
10
- img { border-radius: 0; }
10
+ > img { border-radius: 0; }
11
11
  }
12
12
  .card-header,
13
13
  .card-body,
@@ -18,7 +18,15 @@
18
18
  vertical-align: top;
19
19
  width: 56px;
20
20
 
21
- input[type='checkbox'] { display: none; }
21
+ input[type='checkbox'],
22
+ input[type='radio'] {
23
+ left: -9999px;
24
+ margin: 0;
25
+ padding: 0;
26
+ position: absolute;
27
+ visibility: hidden;
28
+ top: -9999px;
29
+ }
22
30
 
23
31
  .switch-group {
24
32
  @include transition(left 0.125s ease-in-out);
@@ -70,6 +78,11 @@
70
78
  .switch-group { left: -100%; }
71
79
  .switch-handle { right: calc(50% - 27px); }
72
80
  }
81
+ &.disabled {
82
+ cursor: not-allowed;
83
+
84
+ * { cursor: not-allowed; }
85
+ }
73
86
  &.dark {
74
87
  .switch-handle { background: color(light-black); }
75
88
  }
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.0.53
4
+ version: 14.0.54
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-01-03 00:00:00.000000000 Z
11
+ date: 2017-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails