less-rails-semantic_ui 2.2.11.0 → 2.2.13.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 +4 -4
- data/README.md +1 -0
- data/assets/javascripts/semantic_ui/definitions/modules/dropdown.js +49 -10
- data/assets/javascripts/semantic_ui/definitions/modules/modal.js +25 -4
- data/assets/javascripts/semantic_ui/definitions/modules/popup.js +2 -2
- data/assets/stylesheets/semantic_ui/definitions/collections/menu.less +0 -1
- data/assets/stylesheets/semantic_ui/definitions/modules/dropdown.less +2 -2
- data/assets/stylesheets/semantic_ui/definitions/modules/modal.less +6 -0
- data/assets/stylesheets/semantic_ui/themes/bookish/elements/header.overrides +1 -1
- data/assets/stylesheets/semantic_ui/themes/chubby/elements/button.overrides +1 -1
- data/assets/stylesheets/semantic_ui/themes/chubby/elements/header.overrides +1 -1
- data/assets/stylesheets/semantic_ui/themes/default/elements/header.variables +1 -1
- data/assets/stylesheets/semantic_ui/themes/default/elements/list.variables +1 -1
- data/assets/stylesheets/semantic_ui/themes/default/modules/modal.variables +6 -0
- data/assets/stylesheets/semantic_ui/themes/instagram/views/card.overrides +1 -1
- data/assets/stylesheets/semantic_ui/themes/rtl/globals/site.overrides +1 -1
- data/lib/less/rails/semantic_ui/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aacf50940a4e0bc57c380fc73ae34b0dda05d217
|
4
|
+
data.tar.gz: 8b2f22f7ddd48f40f0e6fbb630d00259cf57cb3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f11911c48cc9522f474e0989d291c057b2d945d68faf98ad734e9a8796fa27d0a3d6dcdca553427aef5c3d089102772adedd76852e69760acf125c557c4949b
|
7
|
+
data.tar.gz: 97b66e0343e6ebb4deea59b34605ac13d98e08540bddc2b35ccb90a14cab7b80befb6c55e9d4c3f06ca4725191a3b1e344812dda0ec8a20f1f40e3151385da86
|
data/README.md
CHANGED
@@ -17,6 +17,7 @@ Add this block to your application's Gemfile:
|
|
17
17
|
|
18
18
|
gem 'less-rails-semantic_ui', '~> x.x.x'
|
19
19
|
gem 'autoprefixer-rails', '~> x.x.x'
|
20
|
+
gem 'therubyracer'
|
20
21
|
```
|
21
22
|
|
22
23
|
> Semantic UI is using [autoprefixer](https://github.com/postcss/autoprefixer) (in our case [autoprefixer-rails](https://github.com/ai/autoprefixer-rails))
|
@@ -97,7 +97,13 @@ $.fn.dropdown = function(parameters) {
|
|
97
97
|
module.setup.reference();
|
98
98
|
}
|
99
99
|
else {
|
100
|
+
|
100
101
|
module.setup.layout();
|
102
|
+
|
103
|
+
if(settings.values) {
|
104
|
+
module.change.values(settings.values);
|
105
|
+
}
|
106
|
+
|
101
107
|
module.refreshData();
|
102
108
|
|
103
109
|
module.save.defaults();
|
@@ -162,7 +168,7 @@ $.fn.dropdown = function(parameters) {
|
|
162
168
|
observe: {
|
163
169
|
select: function() {
|
164
170
|
if(module.has.input()) {
|
165
|
-
selectObserver.observe($
|
171
|
+
selectObserver.observe($module[0], {
|
166
172
|
childList : true,
|
167
173
|
subtree : true
|
168
174
|
});
|
@@ -383,19 +389,16 @@ $.fn.dropdown = function(parameters) {
|
|
383
389
|
reference: function() {
|
384
390
|
module.debug('Dropdown behavior was called on select, replacing with closest dropdown');
|
385
391
|
// replace module reference
|
386
|
-
$module
|
392
|
+
$module = $module.parent(selector.dropdown);
|
393
|
+
instance = $module.data(moduleNamespace);
|
394
|
+
element = $module.get(0);
|
387
395
|
module.refresh();
|
388
396
|
module.setup.returnedObject();
|
389
|
-
// invoke method in context of current instance
|
390
|
-
if(methodInvoked) {
|
391
|
-
instance = module;
|
392
|
-
module.invoke(query);
|
393
|
-
}
|
394
397
|
},
|
395
398
|
returnedObject: function() {
|
396
399
|
var
|
397
400
|
$firstModules = $allModules.slice(0, elementIndex),
|
398
|
-
$lastModules
|
401
|
+
$lastModules = $allModules.slice(elementIndex + 1)
|
399
402
|
;
|
400
403
|
// adjust all modules to use correct reference
|
401
404
|
$allModules = $firstModules.add($module).add($lastModules);
|
@@ -913,6 +916,23 @@ $.fn.dropdown = function(parameters) {
|
|
913
916
|
}
|
914
917
|
},
|
915
918
|
|
919
|
+
change: {
|
920
|
+
values: function(values) {
|
921
|
+
if(!settings.allowAdditions) {
|
922
|
+
module.clear();
|
923
|
+
}
|
924
|
+
module.debug('Creating dropdown with specified values', values);
|
925
|
+
module.setup.menu({values: values});
|
926
|
+
$.each(values, function(index, item) {
|
927
|
+
if(item.selected == true) {
|
928
|
+
module.debug('Setting initial selection to', item.value);
|
929
|
+
module.set.selected(item.value);
|
930
|
+
return true;
|
931
|
+
}
|
932
|
+
});
|
933
|
+
}
|
934
|
+
},
|
935
|
+
|
916
936
|
event: {
|
917
937
|
change: function() {
|
918
938
|
if(!internalChange) {
|
@@ -1081,7 +1101,22 @@ $.fn.dropdown = function(parameters) {
|
|
1081
1101
|
select: {
|
1082
1102
|
mutation: function(mutations) {
|
1083
1103
|
module.debug('<select> modified, recreating menu');
|
1084
|
-
|
1104
|
+
var
|
1105
|
+
isSelectMutation = false
|
1106
|
+
;
|
1107
|
+
$.each(mutations, function(index, mutation) {
|
1108
|
+
if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {
|
1109
|
+
isSelectMutation = true;
|
1110
|
+
return true;
|
1111
|
+
}
|
1112
|
+
});
|
1113
|
+
if(isSelectMutation) {
|
1114
|
+
module.disconnect.selectObserver();
|
1115
|
+
module.refresh();
|
1116
|
+
module.setup.select();
|
1117
|
+
module.set.selected();
|
1118
|
+
module.observe.select();
|
1119
|
+
}
|
1085
1120
|
}
|
1086
1121
|
},
|
1087
1122
|
menu: {
|
@@ -1619,6 +1654,9 @@ $.fn.dropdown = function(parameters) {
|
|
1619
1654
|
return $module.data(metadata.defaultValue);
|
1620
1655
|
},
|
1621
1656
|
placeholderText: function() {
|
1657
|
+
if(settings.placeholder != 'auto' && typeof settings.placeholder == 'string') {
|
1658
|
+
return settings.placeholder;
|
1659
|
+
}
|
1622
1660
|
return $module.data(metadata.placeholderText) || '';
|
1623
1661
|
},
|
1624
1662
|
text: function() {
|
@@ -3044,7 +3082,7 @@ $.fn.dropdown = function(parameters) {
|
|
3044
3082
|
return $(event.target).closest($icon).length > 0;
|
3045
3083
|
},
|
3046
3084
|
alreadySetup: function() {
|
3047
|
-
return ($module.is('select') && $module.parent(selector.dropdown).
|
3085
|
+
return ($module.is('select') && $module.parent(selector.dropdown).data(moduleNamespace) !== undefined && $module.prev().length === 0);
|
3048
3086
|
},
|
3049
3087
|
animating: function($subMenu) {
|
3050
3088
|
return ($subMenu)
|
@@ -3594,6 +3632,7 @@ $.fn.dropdown.settings = {
|
|
3594
3632
|
on : 'click', // what event should show menu action on item selection
|
3595
3633
|
action : 'activate', // action on item selection (nothing, activate, select, combo, hide, function(){})
|
3596
3634
|
|
3635
|
+
values : false, // specify values to use for dropdown
|
3597
3636
|
|
3598
3637
|
apiSettings : false,
|
3599
3638
|
selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used
|
@@ -329,6 +329,9 @@ $.fn.modal = function(parameters) {
|
|
329
329
|
module.hideOthers(module.showModal);
|
330
330
|
}
|
331
331
|
else {
|
332
|
+
if(settings.allowMultiple && settings.detachable) {
|
333
|
+
$module.detach().appendTo($dimmer);
|
334
|
+
}
|
332
335
|
settings.onShow.call(element);
|
333
336
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
334
337
|
module.debug('Showing modal with css animations');
|
@@ -532,24 +535,41 @@ $.fn.modal = function(parameters) {
|
|
532
535
|
},
|
533
536
|
|
534
537
|
cacheSizes: function() {
|
538
|
+
$module.addClass(className.loading);
|
535
539
|
var
|
536
|
-
|
540
|
+
scrollHeight = $module.prop('scrollHeight'),
|
541
|
+
modalHeight = $module.outerHeight()
|
537
542
|
;
|
538
543
|
if(module.cache === undefined || modalHeight !== 0) {
|
539
544
|
module.cache = {
|
540
545
|
pageHeight : $(document).outerHeight(),
|
541
546
|
height : modalHeight + settings.offset,
|
547
|
+
scrollHeight : scrollHeight + settings.offset,
|
542
548
|
contextHeight : (settings.context == 'body')
|
543
549
|
? $(window).height()
|
544
|
-
: $dimmable.height()
|
550
|
+
: $dimmable.height(),
|
545
551
|
};
|
552
|
+
module.cache.topOffset = -(module.cache.height / 2);
|
546
553
|
}
|
554
|
+
$module.removeClass(className.loading);
|
547
555
|
module.debug('Caching modal and container sizes', module.cache);
|
548
556
|
},
|
549
557
|
|
550
558
|
can: {
|
551
559
|
fit: function() {
|
552
|
-
|
560
|
+
var
|
561
|
+
contextHeight = module.cache.contextHeight,
|
562
|
+
verticalCenter = module.cache.contextHeight / 2,
|
563
|
+
topOffset = module.cache.topOffset,
|
564
|
+
scrollHeight = module.cache.scrollHeight,
|
565
|
+
height = module.cache.height,
|
566
|
+
paddingHeight = settings.padding,
|
567
|
+
startPosition = (verticalCenter + topOffset)
|
568
|
+
;
|
569
|
+
return (scrollHeight > height)
|
570
|
+
? (startPosition + scrollHeight + paddingHeight < contextHeight)
|
571
|
+
: (height + (paddingHeight * 2) < contextHeight)
|
572
|
+
;
|
553
573
|
}
|
554
574
|
},
|
555
575
|
|
@@ -664,7 +684,7 @@ $.fn.modal = function(parameters) {
|
|
664
684
|
$module
|
665
685
|
.css({
|
666
686
|
top: '',
|
667
|
-
marginTop:
|
687
|
+
marginTop: module.cache.topOffset
|
668
688
|
})
|
669
689
|
;
|
670
690
|
}
|
@@ -937,6 +957,7 @@ $.fn.modal.settings = {
|
|
937
957
|
animating : 'animating',
|
938
958
|
blurring : 'blurring',
|
939
959
|
inverted : 'inverted',
|
960
|
+
loading : 'loading',
|
940
961
|
scrolling : 'scrolling',
|
941
962
|
undetached : 'undetached'
|
942
963
|
}
|
@@ -125,7 +125,7 @@ $.fn.popup = function(parameters) {
|
|
125
125
|
}
|
126
126
|
if(settings.popup) {
|
127
127
|
$popup.addClass(className.loading);
|
128
|
-
$offsetParent = module.get.offsetParent(
|
128
|
+
$offsetParent = module.get.offsetParent();
|
129
129
|
$popup.removeClass(className.loading);
|
130
130
|
if(settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {
|
131
131
|
module.debug('Moving popup to the same offset parent as target');
|
@@ -139,7 +139,7 @@ $.fn.popup = function(parameters) {
|
|
139
139
|
$offsetParent = (settings.inline)
|
140
140
|
? module.get.offsetParent($target)
|
141
141
|
: module.has.popup()
|
142
|
-
? module.get.offsetParent($
|
142
|
+
? module.get.offsetParent($popup)
|
143
143
|
: $body
|
144
144
|
;
|
145
145
|
}
|
@@ -843,8 +843,8 @@ select.ui.dropdown {
|
|
843
843
|
.ui.default.dropdown:not(.button) > .text {
|
844
844
|
color: @defaultTextColor;
|
845
845
|
}
|
846
|
-
.ui.dropdown:not(.button) > input:focus
|
847
|
-
.ui.default.dropdown:not(.button) > input:focus
|
846
|
+
.ui.dropdown:not(.button) > input:focus ~ .default.text,
|
847
|
+
.ui.default.dropdown:not(.button) > input:focus ~ .text {
|
848
848
|
color: @defaultTextFocusColor;
|
849
849
|
}
|
850
850
|
/*--------------------
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Overrides
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
@import url(
|
5
|
+
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);
|
6
6
|
|
7
7
|
.ui.labeled.icon.buttons > .button > .icon,
|
8
8
|
.ui.labeled.icon.button > .icon {
|
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
|
+
version: 2.2.13.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: 2017-
|
11
|
+
date: 2017-08-11 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:
|
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:
|
74
|
+
version: 2.0.0
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: minispec
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -2466,7 +2466,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2466
2466
|
version: '0'
|
2467
2467
|
requirements: []
|
2468
2468
|
rubyforge_project:
|
2469
|
-
rubygems_version: 2.
|
2469
|
+
rubygems_version: 2.6.12
|
2470
2470
|
signing_key:
|
2471
2471
|
specification_version: 4
|
2472
2472
|
summary: Semantic UI assets for Rails
|