less-rails-semantic_ui 2.2.4.0 → 2.2.6.0

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: 8d35b6037a80fa7bb8b858084271872714b06464
4
- data.tar.gz: 4bfbd97790b1a09a199ed887bcda08171c53165b
3
+ metadata.gz: a57722bdb9b8e6e61fa5aadacc99a4f3ce307ab1
4
+ data.tar.gz: f3e39204f3d59511d592b47bdf9517acae6fd276
5
5
  SHA512:
6
- metadata.gz: 0f5f784e47461cd7a4997d5f08c2ea916455288bc9abf1bb9448c615532b56dfcb5f05e7ce69c75d91f9f1c464e3926818533c5a7bff91375eb7a0633531c894
7
- data.tar.gz: 1b05c57d9c681c75269430982610952f2141f95a197f0a37a6ec5b846875dba93143e0782108cabcefca6c29b283246019a48c90335970533a757129f3bc3bd4
6
+ metadata.gz: f91facbdd023e494e1a613b988d6fec7c9b41c8ec6e9e566aeb1a027ed159d51bdd8b1cddb6c9c9aa0e6e74f7ffa38598d7d52e6e196aa0c1c43669a9dd1ac63
7
+ data.tar.gz: 9920a1d94462d39ae097cd8bd4ce58136b569d6307422fbd3571199cfa19dea8255136b37b287cf6776285ced10895d9d70024f2798d3cd8338b3f2d77f513cb
@@ -153,6 +153,24 @@ $.fn.progress = function(parameters) {
153
153
  }
154
154
  },
155
155
 
156
+ bind: {
157
+ transitionEnd: function(callback) {
158
+ var
159
+ transitionEnd = module.get.transitionEnd()
160
+ ;
161
+ $bar
162
+ .one(transitionEnd + eventNamespace, function(event) {
163
+ clearTimeout(module.failSafeTimer);
164
+ callback.call(this, event);
165
+ })
166
+ ;
167
+ module.failSafeTimer = setTimeout(function() {
168
+ $bar.triggerHandler(transitionEnd);
169
+ }, settings.duration + settings.failSafeDelay);
170
+ module.verbose('Adding fail safe timer', module.timer);
171
+ }
172
+ },
173
+
156
174
  increment: function(incrementValue) {
157
175
  var
158
176
  maxValue,
@@ -449,7 +467,7 @@ $.fn.progress = function(parameters) {
449
467
  }
450
468
  ;
451
469
  clearInterval(module.interval);
452
- $bar.one(transitionEnd + eventNamespace, animationCallback);
470
+ module.bind.transitionEnd(animationCallback);
453
471
  animating = true;
454
472
  module.interval = setInterval(function() {
455
473
  var
@@ -526,7 +544,7 @@ $.fn.progress = function(parameters) {
526
544
  if(text) {
527
545
  module.set.label(text);
528
546
  }
529
- $bar.one(transitionEnd + eventNamespace, function() {
547
+ module.bind.transitionEnd(function() {
530
548
  settings.onActive.call(element, module.value, module.total);
531
549
  });
532
550
  },
@@ -546,7 +564,7 @@ $.fn.progress = function(parameters) {
546
564
  text = settings.onLabelUpdate('active', text, module.value, module.total);
547
565
  module.set.label(text);
548
566
  }
549
- $bar.one(transitionEnd + eventNamespace, function() {
567
+ module.bind.transitionEnd(function() {
550
568
  settings.onSuccess.call(element, module.total);
551
569
  });
552
570
  },
@@ -562,7 +580,7 @@ $.fn.progress = function(parameters) {
562
580
  if(text) {
563
581
  module.set.label(text);
564
582
  }
565
- $bar.one(transitionEnd + eventNamespace, function() {
583
+ module.bind.transitionEnd(function() {
566
584
  settings.onWarning.call(element, module.value, module.total);
567
585
  });
568
586
  },
@@ -578,7 +596,7 @@ $.fn.progress = function(parameters) {
578
596
  if(text) {
579
597
  module.set.label(text);
580
598
  }
581
- $bar.one(transitionEnd + eventNamespace, function() {
599
+ module.bind.transitionEnd(function() {
582
600
  settings.onError.call(element, module.value, module.total);
583
601
  });
584
602
  },
@@ -856,6 +874,9 @@ $.fn.progress.settings = {
856
874
  total : false,
857
875
  value : false,
858
876
 
877
+ // delay in ms for fail safe animation callback
878
+ failSafeDelay : 100,
879
+
859
880
  onLabelUpdate : function(state, text, value, total){
860
881
  return text;
861
882
  },
@@ -238,13 +238,15 @@ $.fn.search = function(parameters) {
238
238
  handleKeyboard: function(event) {
239
239
  var
240
240
  // force selector refresh
241
- $result = $module.find(selector.result),
242
- $category = $module.find(selector.category),
243
- currentIndex = $result.index( $result.filter('.' + className.active) ),
244
- resultSize = $result.length,
245
-
246
- keyCode = event.which,
247
- keys = {
241
+ $result = $module.find(selector.result),
242
+ $category = $module.find(selector.category),
243
+ $activeResult = $result.filter('.' + className.active),
244
+ currentIndex = $result.index( $activeResult ),
245
+ resultSize = $result.length,
246
+ hasActiveResult = $activeResult.length > 0,
247
+
248
+ keyCode = event.which,
249
+ keys = {
248
250
  backspace : 8,
249
251
  enter : 13,
250
252
  escape : 27,
@@ -267,7 +269,7 @@ $.fn.search = function(parameters) {
267
269
  return false;
268
270
  }
269
271
  }
270
- else if(keyCode == keys.upArrow) {
272
+ else if(keyCode == keys.upArrow && hasActiveResult) {
271
273
  module.verbose('Up key pressed, changing active result');
272
274
  newIndex = (currentIndex - 1 < 0)
273
275
  ? currentIndex
@@ -364,7 +366,14 @@ $.fn.search = function(parameters) {
364
366
  return $results.hasClass(className.hidden);
365
367
  },
366
368
  inMessage: function(event) {
367
- return (event.target && $(event.target).closest(selector.message).length > 0);
369
+ if(!event.target) {
370
+ return;
371
+ }
372
+ var
373
+ $target = $(event.target),
374
+ isInDOM = $.contains(document.documentElement, event.target)
375
+ ;
376
+ return (isInDOM && $target.closest(selector.message).length > 0);
368
377
  },
369
378
  empty: function() {
370
379
  return ($results.html() === '');
@@ -135,7 +135,12 @@ $.fn.sticky = function(parameters) {
135
135
  },
136
136
 
137
137
  determineContainer: function() {
138
- $container = $module.offsetParent();
138
+ if(settings.container) {
139
+ $container = $(settings.container);
140
+ }
141
+ else {
142
+ $container = $module.offsetParent();
143
+ }
139
144
  },
140
145
 
141
146
  determineContext: function() {
@@ -882,6 +887,7 @@ $.fn.sticky.settings = {
882
887
  pushing : false,
883
888
 
884
889
  context : false,
890
+ container : false,
885
891
 
886
892
  // Context to watch scroll events
887
893
  scrollContext : window,
@@ -429,13 +429,21 @@ $.fn.tab = function(parameters) {
429
429
  ? evaluateScripts
430
430
  : settings.evaluateScripts
431
431
  ;
432
- if(evaluateScripts) {
433
- module.debug('Updating HTML and evaluating inline scripts', tabPath, html);
434
- $tab.html(html);
432
+ if(typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && typeof html !== 'string') {
433
+ $tab
434
+ .empty()
435
+ .append($(html).clone(true))
436
+ ;
435
437
  }
436
438
  else {
437
- module.debug('Updating HTML', tabPath, html);
438
- tab.innerHTML = html;
439
+ if(evaluateScripts) {
440
+ module.debug('Updating HTML and evaluating inline scripts', tabPath, html);
441
+ $tab.html(html);
442
+ }
443
+ else {
444
+ module.debug('Updating HTML', tabPath, html);
445
+ tab.innerHTML = html;
446
+ }
439
447
  }
440
448
  }
441
449
  },
@@ -467,7 +475,17 @@ $.fn.tab = function(parameters) {
467
475
  }
468
476
  settings.onFirstLoad.call($tab[0], tabPath, parameterArray, historyEvent);
469
477
  settings.onLoad.call($tab[0], tabPath, parameterArray, historyEvent);
470
- if(settings.cacheType != 'response') {
478
+
479
+ if(typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && $tab.children().length > 0) {
480
+ setTimeout(function() {
481
+ var
482
+ $clone = $tab.children().clone(true)
483
+ ;
484
+ $clone = $clone.not('script');
485
+ module.cache.add(fullTabPath, $clone);
486
+ }, 0);
487
+ }
488
+ else {
471
489
  module.cache.add(fullTabPath, $tab.html());
472
490
  }
473
491
  },
@@ -612,11 +612,15 @@ $.fn.transition = function() {
612
612
  : duration
613
613
  ;
614
614
  },
615
- displayType: function() {
615
+ displayType: function(shouldDetermine) {
616
+ shouldDetermine = (shouldDetermine !== undefined)
617
+ ? shouldDetermine
618
+ : true
619
+ ;
616
620
  if(settings.displayType) {
617
621
  return settings.displayType;
618
622
  }
619
- if($module.data(metadata.displayType) === undefined) {
623
+ if(shouldDetermine && $module.data(metadata.displayType) === undefined) {
620
624
  // create fake element to determine display state
621
625
  module.can.transition(true);
622
626
  }
@@ -673,13 +677,13 @@ $.fn.transition = function() {
673
677
  var
674
678
  animation = settings.animation,
675
679
  transitionExists = module.get.transitionExists(animation),
680
+ displayType = module.get.displayType(false),
676
681
  elementClass,
677
682
  tagName,
678
683
  $clone,
679
684
  currentAnimation,
680
685
  inAnimation,
681
- directionExists,
682
- displayType
686
+ directionExists
683
687
  ;
684
688
  if( transitionExists === undefined || forced) {
685
689
  module.verbose('Determining whether animation exists');
@@ -699,16 +703,18 @@ $.fn.transition = function() {
699
703
  .addClass(className.inward)
700
704
  .css('animationName')
701
705
  ;
702
- displayType = $clone
703
- .attr('class', elementClass)
704
- .removeAttr('style')
705
- .removeClass(className.hidden)
706
- .removeClass(className.visible)
707
- .show()
708
- .css('display')
709
- ;
710
- module.verbose('Determining final display state', displayType);
711
- module.save.displayType(displayType);
706
+ if(!displayType) {
707
+ displayType = $clone
708
+ .attr('class', elementClass)
709
+ .removeAttr('style')
710
+ .removeClass(className.hidden)
711
+ .removeClass(className.visible)
712
+ .show()
713
+ .css('display')
714
+ ;
715
+ module.verbose('Determining final display state', displayType);
716
+ module.save.displayType(displayType);
717
+ }
712
718
 
713
719
  $clone.remove();
714
720
  if(currentAnimation != inAnimation) {
@@ -510,6 +510,7 @@
510
510
  top: @toggleLaneVerticalOffset;
511
511
 
512
512
  background: @toggleLaneBackground;
513
+ box-shadow: @toggleLaneBoxShadow;
513
514
  width: @toggleLaneWidth;
514
515
  height: @toggleLaneHeight;
515
516
  border-radius: @toggleHandleRadius;
@@ -538,6 +539,7 @@
538
539
  .ui.toggle.checkbox input ~ .box:after,
539
540
  .ui.toggle.checkbox input ~ label:after {
540
541
  left: @toggleOffOffset;
542
+ box-shadow: @toggleOffHandleBoxShadow;
541
543
  }
542
544
 
543
545
  /* Focus */
@@ -566,6 +568,7 @@
566
568
  .ui.toggle.checkbox input:checked ~ .box:after,
567
569
  .ui.toggle.checkbox input:checked ~ label:after {
568
570
  left: @toggleOnOffset;
571
+ box-shadow: @toggleOnHandleBoxShadow;
569
572
  }
570
573
 
571
574
 
@@ -162,6 +162,7 @@
162
162
 
163
163
  @toggleLaneBackground: @transparentBlack;
164
164
  @toggleLaneHeight: @toggleHandleSize;
165
+ @toggleLaneBoxShadow: none;
165
166
  @toggleLaneVerticalOffset: 0rem;
166
167
  @toggleOffOffset: -0.05rem;
167
168
  @toggleOnOffset: (@toggleLaneWidth - @toggleHandleSize) + 0.15rem;
@@ -175,10 +176,13 @@
175
176
  @toggleHoverColor: @toggleFocusColor;
176
177
 
177
178
  @toggleOffLabelColor: @checkboxColor;
179
+ @toggleOffHandleBoxShadow: none;
178
180
 
179
181
  @toggleOnLabelColor: @selectedTextColor;
180
182
  @toggleOnLaneColor: @primaryColor;
181
183
 
184
+ @toggleOnHandleBoxShadow: none;
185
+
182
186
  @toggleOnFocusLaneColor: @primaryColorFocus;
183
187
  @toggleOnFocusLabelColor: @toggleOnLabelColor;
184
188
 
@@ -25,6 +25,7 @@
25
25
  @inputBorder: none;
26
26
  @inputBorderRadius: 0em;
27
27
  @inputBoxShadow: none;
28
+ @invertedInputColor: @invertedTextColor;
28
29
 
29
30
  @textAreaPadding: 1em;
30
31
  @textAreaBackground: transparent;
@@ -1,7 +1,7 @@
1
1
  module Less
2
2
  module Rails
3
3
  module SemanticUI
4
- VERSION = '2.2.4.0'
4
+ VERSION = '2.2.6.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: less-rails-semantic_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4.0
4
+ version: 2.2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxim Dobryakov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-20 00:00:00.000000000 Z
11
+ date: 2016-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: less-rails
@@ -62,16 +62,16 @@ dependencies:
62
62
  name: rack
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - "~>"
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '1'
67
+ version: 2.0.0
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - "~>"
72
+ - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: '1'
74
+ version: 2.0.0
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minispec
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -2465,7 +2465,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2465
2465
  version: '0'
2466
2466
  requirements: []
2467
2467
  rubyforge_project:
2468
- rubygems_version: 2.4.8
2468
+ rubygems_version: 2.4.5.1
2469
2469
  signing_key:
2470
2470
  specification_version: 4
2471
2471
  summary: Semantic UI assets for Rails