semantic-ui-sass 0.11.0.0 → 0.12.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/app/assets/javascripts/semantic-ui/behavior/form.js +1 -1
- data/app/assets/javascripts/semantic-ui/dimmer.js +2 -2
- data/app/assets/javascripts/semantic-ui/dropdown.js +67 -15
- data/app/assets/javascripts/semantic-ui/modal.js +36 -22
- data/app/assets/javascripts/semantic-ui/sidebar.js +1 -3
- data/app/assets/javascripts/semantic-ui/transition.js +16 -3
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +7 -1
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +0 -4
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +11 -2
- data/app/assets/stylesheets/semantic-ui/elements/_progress.scss +10 -0
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +9 -0
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +0 -3
- data/lib/semantic/ui/sass/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eabd932f7975fc97862e1cc6022a0d37ac1495b5
|
4
|
+
data.tar.gz: b35cacc8df7eb6470d30f2ddd5016725f08953b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3521dda09ac0074e78edeb25cf8c8d4438fa2fc31fdf9717a2b76669063b2e0877b310ea4f42449cbc197cd27481d5afa4e6991f745799995a3a2631a1ece5ab
|
7
|
+
data.tar.gz: 590638915066fcf616a418305e485c001a2e3032a8adc862f4bb3686dffb1eb70d2a4bc8b63fba21e16054f6f8c1f6aa86189dfd595748b10db51a6280c560c1
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -360,7 +360,7 @@ $.fn.form = function(fields, parameters) {
|
|
360
360
|
var
|
361
361
|
$field = module.get.field(field.identifier),
|
362
362
|
type = validation.type,
|
363
|
-
value = $field.val() + '',
|
363
|
+
value = $.trim($field.val() + ''),
|
364
364
|
|
365
365
|
bracketRegExp = /\[(.*?)\]/i,
|
366
366
|
bracket = bracketRegExp.exec(type),
|
@@ -155,7 +155,7 @@ $.fn.dimmer = function(parameters) {
|
|
155
155
|
: function(){}
|
156
156
|
;
|
157
157
|
module.set.dimmed();
|
158
|
-
if(settings.useCSS && $.fn.transition !== undefined && $
|
158
|
+
if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
|
159
159
|
$dimmer
|
160
160
|
.transition({
|
161
161
|
animation : settings.transition + ' in',
|
@@ -190,7 +190,7 @@ $.fn.dimmer = function(parameters) {
|
|
190
190
|
? callback
|
191
191
|
: function(){}
|
192
192
|
;
|
193
|
-
if(settings.useCSS && $.fn.transition !== undefined && $
|
193
|
+
if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
|
194
194
|
module.verbose('Hiding dimmer with css');
|
195
195
|
$dimmer
|
196
196
|
.transition({
|
@@ -61,12 +61,12 @@ $.fn.dropdown = function(parameters) {
|
|
61
61
|
initialize: function() {
|
62
62
|
module.debug('Initializing dropdown', settings);
|
63
63
|
|
64
|
+
module.save.defaults();
|
64
65
|
module.set.selected();
|
65
66
|
|
66
67
|
if(hasTouch) {
|
67
68
|
module.bind.touchEvents();
|
68
69
|
}
|
69
|
-
// no use detecting mouse events because touch devices emulate them
|
70
70
|
module.bind.mouseEvents();
|
71
71
|
module.instantiate();
|
72
72
|
},
|
@@ -145,6 +145,7 @@ $.fn.dropdown = function(parameters) {
|
|
145
145
|
if(hasTouch) {
|
146
146
|
$document
|
147
147
|
.off('touchstart' + eventNamespace)
|
148
|
+
.off('touchmove' + eventNamespace)
|
148
149
|
;
|
149
150
|
}
|
150
151
|
$document
|
@@ -215,11 +216,19 @@ $.fn.dropdown = function(parameters) {
|
|
215
216
|
: $choice.text(),
|
216
217
|
value = ( $choice.data(metadata.value) !== undefined)
|
217
218
|
? $choice.data(metadata.value)
|
218
|
-
: text.toLowerCase()
|
219
|
+
: text.toLowerCase(),
|
220
|
+
callback = function() {
|
221
|
+
module.determine.selectAction(text, value);
|
222
|
+
$.proxy(settings.onChange, element)(value, text);
|
223
|
+
}
|
219
224
|
;
|
220
225
|
if( $choice.find(selector.menu).size() === 0 ) {
|
221
|
-
|
222
|
-
|
226
|
+
if(event.type == 'touchstart') {
|
227
|
+
$choice.one('click', callback);
|
228
|
+
}
|
229
|
+
else {
|
230
|
+
callback();
|
231
|
+
}
|
223
232
|
}
|
224
233
|
}
|
225
234
|
|
@@ -325,7 +334,7 @@ $.fn.dropdown = function(parameters) {
|
|
325
334
|
},
|
326
335
|
item: function(value) {
|
327
336
|
var
|
328
|
-
$selectedItem
|
337
|
+
$selectedItem = false
|
329
338
|
;
|
330
339
|
value = (value !== undefined)
|
331
340
|
? value
|
@@ -345,9 +354,11 @@ $.fn.dropdown = function(parameters) {
|
|
345
354
|
? $choice.data(metadata.value)
|
346
355
|
: optionText.toLowerCase()
|
347
356
|
;
|
348
|
-
if( optionValue == value
|
357
|
+
if( optionValue == value ) {
|
358
|
+
$selectedItem = $(this);
|
359
|
+
}
|
360
|
+
else if( !$selectedItem && optionText == value ) {
|
349
361
|
$selectedItem = $(this);
|
350
|
-
return false;
|
351
362
|
}
|
352
363
|
})
|
353
364
|
;
|
@@ -359,6 +370,43 @@ $.fn.dropdown = function(parameters) {
|
|
359
370
|
}
|
360
371
|
},
|
361
372
|
|
373
|
+
restore: {
|
374
|
+
defaults: function() {
|
375
|
+
module.restore.defaultText();
|
376
|
+
module.restore.defaultValue();
|
377
|
+
},
|
378
|
+
defaultText: function() {
|
379
|
+
var
|
380
|
+
defaultText = $module.data(metadata.defaultText)
|
381
|
+
;
|
382
|
+
module.debug('Restoring default text', defaultText);
|
383
|
+
module.set.text(defaultText);
|
384
|
+
},
|
385
|
+
defaultValue: function() {
|
386
|
+
var
|
387
|
+
defaultValue = $module.data(metadata.defaultValue)
|
388
|
+
;
|
389
|
+
if(defaultValue !== undefined) {
|
390
|
+
module.debug('Restoring default value', defaultValue);
|
391
|
+
module.set.selected(defaultValue);
|
392
|
+
module.set.value(defaultValue);
|
393
|
+
}
|
394
|
+
}
|
395
|
+
},
|
396
|
+
|
397
|
+
save: {
|
398
|
+
defaults: function() {
|
399
|
+
module.save.defaultText();
|
400
|
+
module.save.defaultValue();
|
401
|
+
},
|
402
|
+
defaultValue: function() {
|
403
|
+
$module.data(metadata.defaultValue, module.get.value() );
|
404
|
+
},
|
405
|
+
defaultText: function() {
|
406
|
+
$module.data(metadata.defaultText, $text.text() );
|
407
|
+
}
|
408
|
+
},
|
409
|
+
|
362
410
|
set: {
|
363
411
|
text: function(text) {
|
364
412
|
module.debug('Changing text', text, $text);
|
@@ -506,12 +554,14 @@ $.fn.dropdown = function(parameters) {
|
|
506
554
|
if(module.is.visible($currentMenu) ) {
|
507
555
|
module.verbose('Doing menu hide animation', $currentMenu);
|
508
556
|
if($.fn.transition !== undefined && $module.transition('is supported')) {
|
509
|
-
$currentMenu
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
557
|
+
$currentMenu
|
558
|
+
.transition({
|
559
|
+
animation : settings.transition + ' out',
|
560
|
+
duration : settings.duration,
|
561
|
+
complete : callback,
|
562
|
+
queue : false
|
563
|
+
})
|
564
|
+
;
|
515
565
|
}
|
516
566
|
else if(settings.transition == 'none') {
|
517
567
|
callback();
|
@@ -818,8 +868,10 @@ $.fn.dropdown.settings = {
|
|
818
868
|
},
|
819
869
|
|
820
870
|
metadata: {
|
821
|
-
|
822
|
-
|
871
|
+
defaultText : 'defaultText',
|
872
|
+
defaultValue : 'defaultValue',
|
873
|
+
text : 'text',
|
874
|
+
value : 'value'
|
823
875
|
},
|
824
876
|
|
825
877
|
selector : {
|
@@ -77,8 +77,12 @@ $.fn.modal = function(parameters) {
|
|
77
77
|
hide : settings.duration * 1.1
|
78
78
|
}
|
79
79
|
})
|
80
|
-
.dimmer('add content', $module)
|
81
80
|
;
|
81
|
+
|
82
|
+
if(settings.detachable) {
|
83
|
+
$dimmable.dimmer('add content', $module);
|
84
|
+
}
|
85
|
+
|
82
86
|
$dimmer = $dimmable
|
83
87
|
.dimmer('get dimmer')
|
84
88
|
;
|
@@ -173,7 +177,12 @@ $.fn.modal = function(parameters) {
|
|
173
177
|
click: function(event) {
|
174
178
|
if( $(event.target).closest(selector.modal).size() === 0 ) {
|
175
179
|
module.debug('Dimmer clicked, hiding all modals');
|
176
|
-
|
180
|
+
if(settings.allowMultiple) {
|
181
|
+
module.hide();
|
182
|
+
}
|
183
|
+
else {
|
184
|
+
module.hideAll();
|
185
|
+
}
|
177
186
|
event.stopImmediatePropagation();
|
178
187
|
}
|
179
188
|
},
|
@@ -232,7 +241,7 @@ $.fn.modal = function(parameters) {
|
|
232
241
|
module.set.position();
|
233
242
|
module.set.type();
|
234
243
|
|
235
|
-
if( $otherModals.filter(':visible').size() > 0 ) {
|
244
|
+
if( $otherModals.filter(':visible').size() > 0 && !settings.allowMultiple) {
|
236
245
|
module.debug('Other modals visible, queueing show animation');
|
237
246
|
module.hideOthers(module.showModal);
|
238
247
|
}
|
@@ -278,7 +287,9 @@ $.fn.modal = function(parameters) {
|
|
278
287
|
? callback
|
279
288
|
: function(){}
|
280
289
|
;
|
281
|
-
|
290
|
+
if($allModals.filter(':visible').size() <= 1) {
|
291
|
+
module.hideDimmer();
|
292
|
+
}
|
282
293
|
module.hideModal(callback);
|
283
294
|
},
|
284
295
|
|
@@ -653,29 +664,32 @@ $.fn.modal = function(parameters) {
|
|
653
664
|
|
654
665
|
$.fn.modal.settings = {
|
655
666
|
|
656
|
-
name
|
657
|
-
namespace
|
667
|
+
name : 'Modal',
|
668
|
+
namespace : 'modal',
|
669
|
+
|
670
|
+
debug : true,
|
671
|
+
verbose : true,
|
672
|
+
performance : true,
|
658
673
|
|
659
|
-
|
660
|
-
|
661
|
-
|
674
|
+
allowMultiple : true,
|
675
|
+
detachable : true,
|
676
|
+
closable : true,
|
677
|
+
context : 'body',
|
662
678
|
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
offset : 0,
|
668
|
-
transition : 'scale',
|
679
|
+
duration : 500,
|
680
|
+
easing : 'easeOutExpo',
|
681
|
+
offset : 0,
|
682
|
+
transition : 'scale',
|
669
683
|
|
670
|
-
onShow
|
671
|
-
onHide
|
672
|
-
onApprove
|
673
|
-
onDeny
|
684
|
+
onShow : function(){},
|
685
|
+
onHide : function(){},
|
686
|
+
onApprove : function(){ return true; },
|
687
|
+
onDeny : function(){ return true; },
|
674
688
|
|
675
689
|
selector : {
|
676
690
|
close : '.close, .actions .button',
|
677
|
-
approve : '.actions .positive, .actions .approve',
|
678
|
-
deny : '.actions .negative, .actions .cancel',
|
691
|
+
approve : '.actions .positive, .actions .approve, .actions .ok',
|
692
|
+
deny : '.actions .negative, .actions .deny, .actions .cancel',
|
679
693
|
modal : '.ui.modal'
|
680
694
|
},
|
681
695
|
error : {
|
@@ -689,4 +703,4 @@ $.fn.modal.settings = {
|
|
689
703
|
};
|
690
704
|
|
691
705
|
|
692
|
-
})( jQuery, window , document );
|
706
|
+
})( jQuery, window , document );
|
@@ -202,15 +202,13 @@ $.fn.sidebar = function(parameters) {
|
|
202
202
|
add: {
|
203
203
|
bodyCSS: function(direction, distance) {
|
204
204
|
var
|
205
|
-
invertDirection,
|
206
205
|
style
|
207
206
|
;
|
208
207
|
if(direction !== className.bottom) {
|
209
|
-
invertDirection = direction === 'right' ? -1 : 1;
|
210
208
|
style = ''
|
211
209
|
+ '<style title="' + namespace + '">'
|
212
210
|
+ 'body.pushed {'
|
213
|
-
+ ' margin-
|
211
|
+
+ ' margin-' + direction + ': ' + distance + 'px !important;'
|
214
212
|
+ '}'
|
215
213
|
+ '</style>'
|
216
214
|
;
|
@@ -130,7 +130,12 @@ $.fn.transition = function() {
|
|
130
130
|
}
|
131
131
|
module.debug('Preparing animation', settings.animation);
|
132
132
|
if(module.is.animating() && settings.queue) {
|
133
|
-
module.
|
133
|
+
if(!settings.allowRepeats && module.has.direction() && module.is.occuring() && instance.queuing !== true) {
|
134
|
+
module.error(error.repeated);
|
135
|
+
}
|
136
|
+
else {
|
137
|
+
module.queue(settings.animation);
|
138
|
+
}
|
134
139
|
return false;
|
135
140
|
}
|
136
141
|
if(module.can.animate) {
|
@@ -540,6 +545,10 @@ $.fn.transition = function() {
|
|
540
545
|
looping: function() {
|
541
546
|
return $module.hasClass(className.looping);
|
542
547
|
},
|
548
|
+
occuring: function(animation) {
|
549
|
+
animation = animation || settings.animation;
|
550
|
+
return ( $module.hasClass(animation) );
|
551
|
+
},
|
543
552
|
visible: function() {
|
544
553
|
return $module.is(':visible');
|
545
554
|
},
|
@@ -766,9 +775,12 @@ $.fn.transition.settings = {
|
|
766
775
|
onShow : function() {},
|
767
776
|
onHide : function() {},
|
768
777
|
|
778
|
+
// whether animation can occur twice in a row
|
779
|
+
allowRepeats : false,
|
780
|
+
|
769
781
|
// animation duration
|
770
|
-
animation
|
771
|
-
duration
|
782
|
+
animation : 'fade',
|
783
|
+
duration : '700ms',
|
772
784
|
|
773
785
|
// new animations will occur after previous ones
|
774
786
|
queue : true,
|
@@ -788,6 +800,7 @@ $.fn.transition.settings = {
|
|
788
800
|
// possible errors
|
789
801
|
error: {
|
790
802
|
noAnimation : 'There is no css animation matching the one you specified.',
|
803
|
+
repeated : 'That animation is already occurring, cancelling repeated animation',
|
791
804
|
method : 'The method you called is not defined',
|
792
805
|
support : 'This browser does not support CSS animations'
|
793
806
|
}
|
@@ -1561,7 +1561,7 @@
|
|
1561
1561
|
|
1562
1562
|
.ui.menu.fixed {
|
1563
1563
|
position: fixed;
|
1564
|
-
z-index:
|
1564
|
+
z-index: 999;
|
1565
1565
|
margin: 0em;
|
1566
1566
|
border: none;
|
1567
1567
|
width: 100%;
|
@@ -1605,6 +1605,12 @@
|
|
1605
1605
|
height: 100%;
|
1606
1606
|
}
|
1607
1607
|
|
1608
|
+
/* Coupling with Grid */
|
1609
|
+
|
1610
|
+
.ui.fixed.menu + .ui.grid {
|
1611
|
+
padding-top: 2.75rem;
|
1612
|
+
}
|
1613
|
+
|
1608
1614
|
/*-------------------
|
1609
1615
|
Pointing
|
1610
1616
|
--------------------*/
|
@@ -1544,8 +1544,6 @@ i.icon.star {
|
|
1544
1544
|
|
1545
1545
|
/* left side icons */
|
1546
1546
|
|
1547
|
-
i.icon.left,
|
1548
|
-
i.icon.left,
|
1549
1547
|
i.icon.left {
|
1550
1548
|
width: auto;
|
1551
1549
|
margin: 0em 0.5em 0em 0em;
|
@@ -1554,8 +1552,6 @@ i.icon.left {
|
|
1554
1552
|
/* right side icons */
|
1555
1553
|
|
1556
1554
|
i.icon.search,
|
1557
|
-
i.icon.up,
|
1558
|
-
i.icon.down,
|
1559
1555
|
i.icon.right {
|
1560
1556
|
width: auto;
|
1561
1557
|
margin: 0em 0em 0em 0.5em;
|
@@ -53,11 +53,11 @@
|
|
53
53
|
|
54
54
|
/* browsers require these rules separate */
|
55
55
|
|
56
|
-
.ui.input::-
|
56
|
+
.ui.input::-webkit-input-placeholder {
|
57
57
|
color: #BBBBBB;
|
58
58
|
}
|
59
59
|
|
60
|
-
.ui.input::-moz
|
60
|
+
.ui.input::-moz-placeholder {
|
61
61
|
color: #BBBBBB;
|
62
62
|
}
|
63
63
|
|
@@ -269,6 +269,15 @@
|
|
269
269
|
vertical-align: top;
|
270
270
|
}
|
271
271
|
|
272
|
+
.ui.fluid.action.input {
|
273
|
+
display: table;
|
274
|
+
width: 100%;
|
275
|
+
}
|
276
|
+
|
277
|
+
.ui.fluid.action.input > .button {
|
278
|
+
width: 0.01%;
|
279
|
+
}
|
280
|
+
|
272
281
|
/*--------------------
|
273
282
|
Fluid
|
274
283
|
---------------------*/
|
@@ -55,6 +55,16 @@
|
|
55
55
|
animation: none !important;
|
56
56
|
}
|
57
57
|
|
58
|
+
.ui.warning.progress .bar {
|
59
|
+
background-color: #E96633 !important;
|
60
|
+
}
|
61
|
+
|
62
|
+
.ui.warning.progress .bar,
|
63
|
+
.ui.warning.progress .bar::after {
|
64
|
+
-webkit-animation: none !important;
|
65
|
+
animation: none !important;
|
66
|
+
}
|
67
|
+
|
58
68
|
/*--------------
|
59
69
|
Failed
|
60
70
|
---------------*/
|
@@ -179,6 +179,9 @@
|
|
179
179
|
min-width: 1em;
|
180
180
|
height: 1em;
|
181
181
|
border-radius: 500px;
|
182
|
+
-webkit-transform: none;
|
183
|
+
-ms-transform: none;
|
184
|
+
transform: none;
|
182
185
|
}
|
183
186
|
|
184
187
|
.ui.radio.checkbox .box:after,
|
@@ -233,6 +236,9 @@
|
|
233
236
|
z-index: 1;
|
234
237
|
width: 1.5em;
|
235
238
|
height: 1.5em;
|
239
|
+
-webkit-transform: none;
|
240
|
+
-ms-transform: none;
|
241
|
+
transform: none;
|
236
242
|
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
|
237
243
|
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
|
238
244
|
border-radius: 50rem;
|
@@ -314,6 +320,9 @@
|
|
314
320
|
background-color: #FFFFFF;
|
315
321
|
width: 3em;
|
316
322
|
height: 1.5em;
|
323
|
+
-webkit-transform: none;
|
324
|
+
-ms-transform: none;
|
325
|
+
transform: none;
|
317
326
|
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
|
318
327
|
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
|
319
328
|
border-radius: 50rem;
|
@@ -30,10 +30,8 @@
|
|
30
30
|
opacity: 0;
|
31
31
|
line-height: 1;
|
32
32
|
-webkit-animation-fill-mode: both;
|
33
|
-
-ms-animation-fill-mode: both;
|
34
33
|
animation-fill-mode: both;
|
35
34
|
-webkit-animation-duration: 0.5s;
|
36
|
-
-ms-animation-duration: 0.5s;
|
37
35
|
animation-duration: 0.5s;
|
38
36
|
-webkit-transition: background-color 0.5s linear;
|
39
37
|
transition: background-color 0.5s linear;
|
@@ -43,7 +41,6 @@
|
|
43
41
|
user-select: none;
|
44
42
|
-webkit-box-sizing: border-box;
|
45
43
|
-moz-box-sizing: border-box;
|
46
|
-
-ms-box-sizing: border-box;
|
47
44
|
box-sizing: border-box;
|
48
45
|
z-index: 1000;
|
49
46
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semantic-ui-sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- doabit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|