less-rails-semantic_ui 2.1.6.0 → 2.1.7.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: 8015578315d8efe81cd31843e16049190f72c2f6
4
- data.tar.gz: 03d5fa3f3ed5eb13bb122d21e518922b49653530
3
+ metadata.gz: 00583014392cf630a334e1652002e31d46cd0b46
4
+ data.tar.gz: c817f07a35cc9ed7edc4801444141c12e7a9f62c
5
5
  SHA512:
6
- metadata.gz: 8a262e9e26052563b7475d120360c2b08c17ec0c776d4f1d3dbfda76cfd5d101e42f99d221f9d17efbb44f3cbc12cbdd9a9a80d617119003e255187fed9c0267
7
- data.tar.gz: adfa00e7df1e04481a5e99905670a60933ef5e858514d9be391e911f27eb23c1f9c4e50afcde1f608331c8a60282cf7658e32dd050d8fdef38d50b2939e8e023
6
+ metadata.gz: 0c82c6bb26dd17a8a531f18be2be0923cea03e1e765319d3cb4a93cacabffda27ca1c8c24a7a07695ec0ef8842b06b0f60b18fec6281e73bade5c1c9bf2ffc8e
7
+ data.tar.gz: 4c52aea2f2d19644c0eda465a02ba83ceab7f9095df19c98a4fcce9177bd3a9eb472b195b47baab045439db75d9b9bf88b6352eafd319f23fb1009d859af7916
@@ -213,12 +213,12 @@ $.api = $.fn.api = function(parameters) {
213
213
 
214
214
  // replace variables
215
215
  url = module.add.urlData( url );
216
-
217
216
  // missing url parameters
218
217
  if( !url && !module.is.mocked()) {
219
218
  return;
220
219
  }
221
220
 
221
+ requestSettings.url = settings.base + url;
222
222
 
223
223
  // look for jQuery ajax parameters in settings
224
224
  ajaxSettings = $.extend(true, {}, settings, {
@@ -280,7 +280,7 @@ $.api = $.fn.api = function(parameters) {
280
280
  return $module.is('form') || $context.is('form');
281
281
  },
282
282
  mocked: function() {
283
- return (settings.mockResponse || settings.mockResponseAsync);
283
+ return (settings.mockResponse || settings.mockResponseAsync || settings.response || settings.responseAsync);
284
284
  },
285
285
  input: function() {
286
286
  return $module.is('input');
@@ -592,9 +592,11 @@ $.api = $.fn.api = function(parameters) {
592
592
  mockedXHR: function () {
593
593
  var
594
594
  // xhr does not simulate these properties of xhr but must return them
595
- textStatus = false,
596
- status = false,
597
- httpMessage = false,
595
+ textStatus = false,
596
+ status = false,
597
+ httpMessage = false,
598
+ responder = settings.mockResponse || settings.response,
599
+ asyncResponder = settings.mockResponseAsync || settings.responseAsync,
598
600
  asyncCallback,
599
601
  response,
600
602
  mockedXHR
@@ -606,19 +608,19 @@ $.api = $.fn.api = function(parameters) {
606
608
  .fail(module.event.xhr.fail)
607
609
  ;
608
610
 
609
- if(settings.mockResponse) {
610
- if( $.isFunction(settings.mockResponse) ) {
611
- module.debug('Using mocked callback returning response', settings.mockResponse);
612
- response = settings.mockResponse.call(context, settings);
611
+ if(responder) {
612
+ if( $.isFunction(responder) ) {
613
+ module.debug('Using specified synchronous callback', responder);
614
+ response = responder.call(context, requestSettings);
613
615
  }
614
616
  else {
615
- module.debug('Using specified response', settings.mockResponse);
616
- response = settings.mockResponse;
617
+ module.debug('Using settings specified response', responder);
618
+ response = responder;
617
619
  }
618
620
  // simulating response
619
621
  mockedXHR.resolveWith(context, [ response, textStatus, { responseText: response }]);
620
622
  }
621
- else if( $.isFunction(settings.mockResponseAsync) ) {
623
+ else if( $.isFunction(asyncResponder) ) {
622
624
  asyncCallback = function(response) {
623
625
  module.debug('Async callback returned response', response);
624
626
 
@@ -629,8 +631,8 @@ $.api = $.fn.api = function(parameters) {
629
631
  mockedXHR.rejectWith(context, [{ responseText: response }, status, httpMessage]);
630
632
  }
631
633
  };
632
- module.debug('Using async mocked response', settings.mockResponseAsync);
633
- settings.mockResponseAsync.call(context, settings, asyncCallback);
634
+ module.debug('Using specified async response callback', asyncResponder);
635
+ asyncResponder.call(context, requestSettings, asyncCallback);
634
636
  }
635
637
  return mockedXHR;
636
638
  },
@@ -722,8 +724,8 @@ $.api = $.fn.api = function(parameters) {
722
724
  module.error(error.noReturnedValue);
723
725
  }
724
726
  return (runSettings !== undefined)
725
- ? runSettings
726
- : settings
727
+ ? $.extend(true, {}, runSettings)
728
+ : $.extend(true, {}, settings)
727
729
  ;
728
730
  },
729
731
  urlEncodedValue: function(value) {
@@ -1066,6 +1068,10 @@ $.api.settings = {
1066
1068
  mockResponse : false,
1067
1069
  mockResponseAsync : false,
1068
1070
 
1071
+ // aliases for mock
1072
+ response : false,
1073
+ responseAsync : false,
1074
+
1069
1075
  // callbacks before request
1070
1076
  beforeSend : function(settings) { return settings; },
1071
1077
  beforeXHR : function(xhr) {},
@@ -268,7 +268,7 @@ $.fn.checkbox = function(parameters) {
268
268
  }
269
269
  module.debug('Enabling checkbox');
270
270
  module.set.enabled();
271
- settings.onEnable.call(input);
271
+ settings.onEnabled.call(input);
272
272
  },
273
273
 
274
274
  disable: function() {
@@ -278,7 +278,7 @@ $.fn.checkbox = function(parameters) {
278
278
  }
279
279
  module.debug('Disabling checkbox');
280
280
  module.set.disabled();
281
- settings.onDisable.call(input);
281
+ settings.onDisabled.call(input);
282
282
  },
283
283
 
284
284
  get: {
@@ -781,8 +781,8 @@ $.fn.checkbox.settings = {
781
781
  onDeterminate : function() {},
782
782
  onIndeterminate : function() {},
783
783
 
784
- onEnabled : function(){},
785
- onDisabled : function(){},
784
+ onEnable : function(){},
785
+ onDisable : function(){},
786
786
 
787
787
  className : {
788
788
  checked : 'checked',
@@ -841,6 +841,7 @@ $.fn.popup = function(parameters) {
841
841
  module.remove.attempts();
842
842
  module.remove.loading();
843
843
  module.reset();
844
+ settings.onUnplaceable.call($popup, element);
844
845
  return false;
845
846
  }
846
847
  }
@@ -1011,13 +1012,13 @@ $.fn.popup = function(parameters) {
1011
1012
  return $module.hasClass(className.active);
1012
1013
  },
1013
1014
  animating: function() {
1014
- return ( $popup && $popup.hasClass(className.animating) );
1015
+ return ($popup !== undefined && $popup.hasClass(className.animating) );
1015
1016
  },
1016
1017
  fluid: function() {
1017
- return ( $popup && $popup.hasClass(className.fluid));
1018
+ return ($popup !== undefined && $popup.hasClass(className.fluid));
1018
1019
  },
1019
1020
  visible: function() {
1020
- return $popup && $popup.hasClass(className.visible);
1021
+ return ($popup !== undefined && $popup.hasClass(className.visible));
1021
1022
  },
1022
1023
  dropdown: function() {
1023
1024
  return $module.hasClass(className.dropdown);
@@ -1244,6 +1245,9 @@ $.fn.popup.settings = {
1244
1245
  // callback before hide animation
1245
1246
  onHide : function(){},
1246
1247
 
1248
+ // callback when popup cannot be positioned in visible screen
1249
+ onUnplaceable: function(){},
1250
+
1247
1251
  // callback after hide animation
1248
1252
  onHidden : function(){},
1249
1253
 
@@ -134,12 +134,29 @@ $.fn.search = function(parameters) {
134
134
  },
135
135
  blur: function(event) {
136
136
  var
137
- pageLostFocus = (document.activeElement === this)
137
+ pageLostFocus = (document.activeElement === this),
138
+ callback = function() {
139
+ module.cancel.query();
140
+ module.remove.focus();
141
+ module.timer = setTimeout(module.hideResults, settings.hideDelay);
142
+ }
138
143
  ;
139
- if(!pageLostFocus && !module.resultsClicked) {
140
- module.cancel.query();
141
- module.remove.focus();
142
- module.timer = setTimeout(module.hideResults, settings.hideDelay);
144
+ if(pageLostFocus) {
145
+ return;
146
+ }
147
+ if(module.resultsClicked) {
148
+ module.debug('Determining if user action caused search to close');
149
+ $module
150
+ .one('click', selector.results, function(event) {
151
+ if( !module.is.animating() && !module.is.hidden() ) {
152
+ callback();
153
+ }
154
+ })
155
+ ;
156
+ }
157
+ else {
158
+ module.debug('Input blurred without user action, closing results');
159
+ callback();
143
160
  }
144
161
  },
145
162
  result: {
@@ -298,6 +315,12 @@ $.fn.search = function(parameters) {
298
315
  },
299
316
 
300
317
  is: {
318
+ animating: function() {
319
+ return $results.hasClass(className.animating);
320
+ },
321
+ hidden: function() {
322
+ return $results.hasClass(className.hidden);
323
+ },
301
324
  empty: function() {
302
325
  return ($results.html() === '');
303
326
  },
@@ -1106,12 +1129,14 @@ $.fn.search.settings = {
1106
1129
  onResultsClose : function(){},
1107
1130
 
1108
1131
  className: {
1109
- active : 'active',
1110
- empty : 'empty',
1111
- focus : 'focus',
1112
- loading : 'loading',
1113
- results : 'results',
1114
- pressed : 'down'
1132
+ animating : 'animating',
1133
+ active : 'active',
1134
+ empty : 'empty',
1135
+ focus : 'focus',
1136
+ hidden : 'hidden',
1137
+ loading : 'loading',
1138
+ results : 'results',
1139
+ pressed : 'down'
1115
1140
  },
1116
1141
 
1117
1142
  error : {
@@ -1062,7 +1062,7 @@ $.fn.transition.settings = {
1062
1062
 
1063
1063
  // possible errors
1064
1064
  error: {
1065
- noAnimation : 'There is no css animation matching the one you specified. Please make sure your css is vendor prefixed, and you have included transition css.',
1065
+ noAnimation : 'Element is no longer attached to DOM. Unable to animate.',
1066
1066
  repeated : 'That animation is already occurring, cancelling repeated animation',
1067
1067
  method : 'The method you called is not defined',
1068
1068
  support : 'This browser does not support CSS animations'
@@ -609,10 +609,6 @@
609
609
  position: relative;
610
610
  cursor: default;
611
611
  point-events: none;
612
- text-shadow: none !important;
613
- color: transparent !important;
614
- transition: all 0s linear;
615
- z-index: 100;
616
612
  }
617
613
  .ui.loading.form:before {
618
614
  position: absolute;
@@ -646,7 +646,8 @@ Floated Menu / Item
646
646
  }
647
647
 
648
648
  /* Coupling with segment for attachment */
649
- .ui.tabular.menu + .bottom.attached.segment {
649
+ .ui.tabular.menu + .attached:not(.top).segment,
650
+ .ui.tabular.menu + .attached:not(.top).segment + .attached:not(.top).segment {
650
651
  border-top: none;
651
652
  margin: 0px;
652
653
  width: 100%;
@@ -55,7 +55,7 @@ i.flag:not(.icon) {
55
55
  i.flag:not(.icon):before {
56
56
  display: inline-block;
57
57
  content: '';
58
- background: asset-url(@spritePath) no-repeat 0px 0px;
58
+ background: asset-url(@spritePath) no-repeat -108px -1976px;
59
59
  width: @width;
60
60
  height: @height;
61
61
  }
@@ -285,7 +285,40 @@
285
285
  *******************************/
286
286
 
287
287
  /*--------------
288
- Categories
288
+ Selection
289
+ ---------------*/
290
+
291
+ .ui.search.selection .prompt {
292
+ border-radius: @selectionPromptBorderRadius;
293
+ }
294
+
295
+ /* Remove input */
296
+ .ui.search.selection > .icon.input > .remove.icon {
297
+ pointer-events: none;
298
+ position: absolute;
299
+ left: auto;
300
+ opacity: 0;
301
+ color: @selectionCloseIconColor;
302
+ top: @selectionCloseTop;
303
+ right: @selectionCloseRight;
304
+ transition: @selectionCloseTransition;
305
+ }
306
+ .ui.search.selection > .icon.input > .active.remove.icon {
307
+ cursor: pointer;
308
+ opacity: @selectionCloseIconOpacity;
309
+ pointer-events: auto;
310
+ }
311
+ .ui.search.selection > .icon.input:not([class*="left icon"]) > .icon ~ .remove.icon {
312
+ right: @selectionCloseIconInputRight;
313
+ }
314
+ .ui.search.selection > .icon.input > .remove.icon:hover {
315
+ opacity: @selectionCloseIconHoverOpacity;
316
+ color: @selectionCloseIconHoverColor;
317
+ }
318
+
319
+
320
+ /*--------------
321
+ Category
289
322
  ---------------*/
290
323
 
291
324
  .ui.category.search .results {
@@ -58,7 +58,6 @@
58
58
  /* GPU Layers for Child Elements */
59
59
  .ui.sidebar > * {
60
60
  backface-visibility: hidden;
61
- transform: rotateZ(0deg);
62
61
  }
63
62
 
64
63
 
@@ -275,14 +274,14 @@ html.ios body {
275
274
  ---------------*/
276
275
 
277
276
  /* Left / Right */
278
- .ui[class*="very thin"].left.sidebar,
279
- .ui[class*="very thin"].right.sidebar {
280
- width: @veryThinWidth;
281
- }
282
277
  .ui.thin.left.sidebar,
283
278
  .ui.thin.right.sidebar {
284
279
  width: @thinWidth;
285
280
  }
281
+ .ui[class*="very thin"].left.sidebar,
282
+ .ui[class*="very thin"].right.sidebar {
283
+ width: @veryThinWidth;
284
+ }
286
285
  .ui.left.sidebar,
287
286
  .ui.right.sidebar {
288
287
  width: @width;
@@ -297,14 +296,14 @@ html.ios body {
297
296
  }
298
297
 
299
298
  /* Left Visible */
300
- .ui.visible[class*="very thin"].left.sidebar ~ .fixed,
301
- .ui.visible[class*="very thin"].left.sidebar ~ .pusher {
302
- transform: translate3d(@veryThinWidth, 0, 0);
303
- }
304
299
  .ui.visible.thin.left.sidebar ~ .fixed,
305
300
  .ui.visible.thin.left.sidebar ~ .pusher {
306
301
  transform: translate3d(@thinWidth, 0, 0);
307
302
  }
303
+ .ui.visible[class*="very thin"].left.sidebar ~ .fixed,
304
+ .ui.visible[class*="very thin"].left.sidebar ~ .pusher {
305
+ transform: translate3d(@veryThinWidth, 0, 0);
306
+ }
308
307
  .ui.visible.wide.left.sidebar ~ .fixed,
309
308
  .ui.visible.wide.left.sidebar ~ .pusher {
310
309
  transform: translate3d(@wideWidth, 0, 0);
@@ -315,14 +314,14 @@ html.ios body {
315
314
  }
316
315
 
317
316
  /* Right Visible */
318
- .ui.visible[class*="very thin"].right.sidebar ~ .fixed,
319
- .ui.visible[class*="very thin"].right.sidebar ~ .pusher {
320
- transform: translate3d(-@veryThinWidth, 0, 0);
321
- }
322
317
  .ui.visible.thin.right.sidebar ~ .fixed,
323
318
  .ui.visible.thin.right.sidebar ~ .pusher {
324
319
  transform: translate3d(-@thinWidth, 0, 0);
325
320
  }
321
+ .ui.visible[class*="very thin"].right.sidebar ~ .fixed,
322
+ .ui.visible[class*="very thin"].right.sidebar ~ .pusher {
323
+ transform: translate3d(-@veryThinWidth, 0, 0);
324
+ }
326
325
  .ui.visible.wide.right.sidebar ~ .fixed,
327
326
  .ui.visible.wide.right.sidebar ~ .pusher {
328
327
  transform: translate3d(-@wideWidth, 0, 0);
@@ -114,6 +114,22 @@
114
114
  Types
115
115
  *******************************/
116
116
 
117
+ /* Selection */
118
+ @selectionPromptBorderRadius: @defaultBorderRadius;
119
+
120
+ @selectionCloseTop: 0em;
121
+ @selectionCloseTransition:
122
+ color @defaultDuration @defaultEasing,
123
+ opacity @defaultDuration @defaultEasing
124
+ ;
125
+ @selectionCloseRight: 0em;
126
+ @selectionCloseIconOpacity: 0.8;
127
+ @selectionCloseIconColor: '';
128
+ @selectionCloseIconHoverOpacity: 1;
129
+ @selectionCloseIconHoverColor: @red;
130
+
131
+ @selectionCloseIconInputRight: 1.85714em;
132
+
117
133
  /* Category */
118
134
  @categoryBackground: @darkWhite;
119
135
  @categoryBoxShadow: none;
@@ -1,7 +1,7 @@
1
1
  module Less
2
2
  module Rails
3
3
  module SemanticUI
4
- VERSION = '2.1.6.0'
4
+ VERSION = '2.1.7.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.1.6.0
4
+ version: 2.1.7.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: 2015-11-07 00:00:00.000000000 Z
11
+ date: 2015-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: less-rails
@@ -580,7 +580,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
580
580
  version: '0'
581
581
  requirements: []
582
582
  rubyforge_project:
583
- rubygems_version: 2.4.3
583
+ rubygems_version: 2.4.8
584
584
  signing_key:
585
585
  specification_version: 4
586
586
  summary: Semantic UI assets for Rails