fomantic-ui-sass 2.8.8.1 → 2.9.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/app/assets/fonts/semantic-ui/brand-icons.eot +0 -0
- data/app/assets/fonts/semantic-ui/brand-icons.svg +41 -6
- data/app/assets/fonts/semantic-ui/brand-icons.ttf +0 -0
- data/app/assets/fonts/semantic-ui/brand-icons.woff +0 -0
- data/app/assets/fonts/semantic-ui/brand-icons.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/icons.eot +0 -0
- data/app/assets/fonts/semantic-ui/icons.svg +245 -7
- data/app/assets/fonts/semantic-ui/icons.ttf +0 -0
- data/app/assets/fonts/semantic-ui/icons.woff +0 -0
- data/app/assets/fonts/semantic-ui/icons.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/outline-icons.eot +0 -0
- data/app/assets/fonts/semantic-ui/outline-icons.svg +2 -2
- data/app/assets/fonts/semantic-ui/outline-icons.ttf +0 -0
- data/app/assets/fonts/semantic-ui/outline-icons.woff +0 -0
- data/app/assets/fonts/semantic-ui/outline-icons.woff2 +0 -0
- data/app/assets/javascripts/semantic-ui/accordion.js +9 -3
- data/app/assets/javascripts/semantic-ui/api.js +92 -33
- data/app/assets/javascripts/semantic-ui/calendar.js +200 -82
- data/app/assets/javascripts/semantic-ui/checkbox.js +20 -13
- data/app/assets/javascripts/semantic-ui/dimmer.js +24 -9
- data/app/assets/javascripts/semantic-ui/dropdown.js +250 -205
- data/app/assets/javascripts/semantic-ui/embed.js +13 -9
- data/app/assets/javascripts/semantic-ui/flyout.js +1530 -0
- data/app/assets/javascripts/semantic-ui/form.js +47 -41
- data/app/assets/javascripts/semantic-ui/modal.js +187 -83
- data/app/assets/javascripts/semantic-ui/nag.js +2 -2
- data/app/assets/javascripts/semantic-ui/popup.js +16 -22
- data/app/assets/javascripts/semantic-ui/progress.js +7 -4
- data/app/assets/javascripts/semantic-ui/rating.js +7 -3
- data/app/assets/javascripts/semantic-ui/search.js +47 -20
- data/app/assets/javascripts/semantic-ui/shape.js +3 -3
- data/app/assets/javascripts/semantic-ui/sidebar.js +140 -43
- data/app/assets/javascripts/semantic-ui/site.js +1 -1
- data/app/assets/javascripts/semantic-ui/slider.js +78 -63
- data/app/assets/javascripts/semantic-ui/state.js +2 -2
- data/app/assets/javascripts/semantic-ui/sticky.js +30 -19
- data/app/assets/javascripts/semantic-ui/tab.js +24 -6
- data/app/assets/javascripts/semantic-ui/toast.js +67 -33
- data/app/assets/javascripts/semantic-ui/transition.js +27 -22
- data/app/assets/javascripts/semantic-ui/visibility.js +5 -5
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +160 -83
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +25 -21
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +110 -78
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +43 -43
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +1684 -272
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +204 -157
- data/app/assets/stylesheets/semantic-ui/elements/_container.scss +98 -4
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +31 -31
- data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +10799 -8841
- data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +1021 -915
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +6 -4
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +2110 -2061
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +759 -22
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +72 -68
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +31 -31
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +352 -352
- data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +33 -33
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +118 -34
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +32 -32
- data/app/assets/stylesheets/semantic-ui/elements/_text.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +5 -4
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +139 -42
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +177 -37
- data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +18 -1
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +93 -92
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +33 -18
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +101 -51
- data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +5 -5
- data/app/assets/stylesheets/semantic-ui/modules/_flyout.scss +592 -0
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +37 -6
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +103 -105
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +7 -46
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +6 -6
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +23 -9
- data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +17 -17
- data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +5 -5
- data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +49 -1
- data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +4 -4
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +754 -117
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +12 -12
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +29 -29
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +17 -17
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +4 -4
- data/lib/fomantic/ui/sass/version.rb +2 -2
- metadata +5 -3
@@ -131,6 +131,11 @@ $.fn.form = function(parameters) {
|
|
131
131
|
$reset = $module.find(selector.reset);
|
132
132
|
},
|
133
133
|
|
134
|
+
refreshEvents: function() {
|
135
|
+
module.removeEvents();
|
136
|
+
module.bindEvents();
|
137
|
+
},
|
138
|
+
|
134
139
|
submit: function() {
|
135
140
|
module.verbose('Submitting form', $module);
|
136
141
|
submitting = true;
|
@@ -391,7 +396,6 @@ $.fn.form = function(parameters) {
|
|
391
396
|
$module.off(eventNamespace);
|
392
397
|
$field.off(eventNamespace);
|
393
398
|
$submit.off(eventNamespace);
|
394
|
-
$field.off(eventNamespace);
|
395
399
|
},
|
396
400
|
|
397
401
|
event: {
|
@@ -419,6 +423,7 @@ $.fn.form = function(parameters) {
|
|
419
423
|
$field.one('keyup' + eventNamespace, module.event.field.keyup);
|
420
424
|
module.submit();
|
421
425
|
module.debug('Enter pressed on input submitting form');
|
426
|
+
event.preventDefault();
|
422
427
|
}
|
423
428
|
keyHeldDown = true;
|
424
429
|
}
|
@@ -460,7 +465,7 @@ $.fn.form = function(parameters) {
|
|
460
465
|
},
|
461
466
|
beforeUnload: function(event) {
|
462
467
|
if (module.is.dirty() && !submitting) {
|
463
|
-
|
468
|
+
event = event || window.event;
|
464
469
|
|
465
470
|
// For modern browsers
|
466
471
|
if (event) {
|
@@ -543,7 +548,7 @@ $.fn.form = function(parameters) {
|
|
543
548
|
parts,
|
544
549
|
suffixPrompt
|
545
550
|
;
|
546
|
-
if(ancillary && ancillary.indexOf('..') >= 0) {
|
551
|
+
if(ancillary && ['integer', 'decimal', 'number'].indexOf(ruleName) >= 0 && ancillary.indexOf('..') >= 0) {
|
547
552
|
parts = ancillary.split('..', 2);
|
548
553
|
if(!rule.prompt) {
|
549
554
|
suffixPrompt = (
|
@@ -585,7 +590,7 @@ $.fn.form = function(parameters) {
|
|
585
590
|
if(isLegacySettings) {
|
586
591
|
// 1.x (ducktyped)
|
587
592
|
settings = $.extend(true, {}, $.fn.form.settings, legacyParameters);
|
588
|
-
validation = $.extend({}, $.fn.form.settings.defaults, parameters);
|
593
|
+
validation = $.extend(true, {}, $.fn.form.settings.defaults, parameters);
|
589
594
|
module.error(settings.error.oldSyntax, element);
|
590
595
|
module.verbose('Extending settings from legacy parameters', validation, settings);
|
591
596
|
}
|
@@ -595,13 +600,13 @@ $.fn.form = function(parameters) {
|
|
595
600
|
parameters.fields = module.get.fieldsFromShorthand(parameters.fields);
|
596
601
|
}
|
597
602
|
settings = $.extend(true, {}, $.fn.form.settings, parameters);
|
598
|
-
validation = $.extend({}, $.fn.form.settings.defaults, settings.fields);
|
603
|
+
validation = $.extend(true, {}, $.fn.form.settings.defaults, settings.fields);
|
599
604
|
module.verbose('Extending settings', validation, settings);
|
600
605
|
}
|
601
606
|
}
|
602
607
|
else {
|
603
|
-
settings = $.fn.form.settings;
|
604
|
-
validation = $.fn.form.settings.defaults;
|
608
|
+
settings = $.extend(true, {}, $.fn.form.settings);
|
609
|
+
validation = $.extend(true, {}, $.fn.form.settings.defaults);
|
605
610
|
module.verbose('Using default form validation', validation, settings);
|
606
611
|
}
|
607
612
|
|
@@ -637,6 +642,7 @@ $.fn.form = function(parameters) {
|
|
637
642
|
if((t=$field.filter('[data-' + metadata.validate + '="'+ identifier +'"]')).length > 0 ) {
|
638
643
|
return t;
|
639
644
|
}
|
645
|
+
module.error(error.noField.replace('{identifier}',identifier));
|
640
646
|
return $('<input/>');
|
641
647
|
},
|
642
648
|
fields: function(fields) {
|
@@ -796,16 +802,11 @@ $.fn.form = function(parameters) {
|
|
796
802
|
if(typeof identifier !== 'string') {
|
797
803
|
module.error(error.identifier, identifier);
|
798
804
|
}
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
}
|
805
|
-
else if( $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').length > 0 ) {
|
806
|
-
return true;
|
807
|
-
}
|
808
|
-
return false;
|
805
|
+
return (
|
806
|
+
$field.filter('#' + identifier).length > 0 ||
|
807
|
+
$field.filter('[name="' + identifier +'"]').length > 0 ||
|
808
|
+
$field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').length > 0
|
809
|
+
);
|
809
810
|
}
|
810
811
|
|
811
812
|
},
|
@@ -863,9 +864,11 @@ $.fn.form = function(parameters) {
|
|
863
864
|
}
|
864
865
|
});
|
865
866
|
module.debug('Adding rules', newValidation.rules, validation);
|
867
|
+
module.refreshEvents();
|
866
868
|
},
|
867
869
|
fields: function(fields) {
|
868
|
-
validation = $.extend({}, validation, module.get.fieldsFromShorthand(fields));
|
870
|
+
validation = $.extend(true, {}, validation, module.get.fieldsFromShorthand(fields));
|
871
|
+
module.refreshEvents();
|
869
872
|
},
|
870
873
|
prompt: function(identifier, errors, internal) {
|
871
874
|
var
|
@@ -886,13 +889,13 @@ $.fn.form = function(parameters) {
|
|
886
889
|
}
|
887
890
|
if(settings.inline) {
|
888
891
|
if(!promptExists) {
|
889
|
-
$prompt =
|
892
|
+
$prompt = $('<div/>').addClass(className.label);
|
890
893
|
$prompt
|
891
894
|
.appendTo($fieldGroup)
|
892
895
|
;
|
893
896
|
}
|
894
897
|
$prompt
|
895
|
-
.html(errors
|
898
|
+
.html(settings.templates.prompt(errors))
|
896
899
|
;
|
897
900
|
if(!promptExists) {
|
898
901
|
if(settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
|
@@ -962,6 +965,7 @@ $.fn.form = function(parameters) {
|
|
962
965
|
$.each(fields, function(index, field) {
|
963
966
|
module.remove.rule(field);
|
964
967
|
});
|
968
|
+
module.refreshEvents();
|
965
969
|
},
|
966
970
|
// alias
|
967
971
|
rules: function(field, rules) {
|
@@ -1085,12 +1089,15 @@ $.fn.form = function(parameters) {
|
|
1085
1089
|
}
|
1086
1090
|
else if(isCheckbox) {
|
1087
1091
|
module.verbose('Setting checkbox value', value, $element);
|
1088
|
-
if(value === true || value === 1) {
|
1092
|
+
if(value === true || value === 1 || value === 'on') {
|
1089
1093
|
$element.checkbox('check');
|
1090
1094
|
}
|
1091
1095
|
else {
|
1092
1096
|
$element.checkbox('uncheck');
|
1093
1097
|
}
|
1098
|
+
if(typeof value === 'string') {
|
1099
|
+
$field.val(value);
|
1100
|
+
}
|
1094
1101
|
}
|
1095
1102
|
else if(isDropdown) {
|
1096
1103
|
module.verbose('Setting dropdown value', value, $element);
|
@@ -1203,10 +1210,10 @@ $.fn.form = function(parameters) {
|
|
1203
1210
|
if(event && $module.data('moduleApi') !== undefined) {
|
1204
1211
|
event.stopImmediatePropagation();
|
1205
1212
|
}
|
1206
|
-
if(settings.errorFocus) {
|
1213
|
+
if(settings.errorFocus && ignoreCallbacks !== true) {
|
1207
1214
|
var focusElement, hasTabIndex = true;
|
1208
1215
|
if (typeof settings.errorFocus === 'string') {
|
1209
|
-
focusElement = $(settings.errorFocus);
|
1216
|
+
focusElement = $(document).find(settings.errorFocus);
|
1210
1217
|
hasTabIndex = focusElement.is('[tabindex]');
|
1211
1218
|
// to be able to focus/scroll into non input elements we need a tabindex
|
1212
1219
|
if (!hasTabIndex) {
|
@@ -1446,7 +1453,7 @@ $.fn.form = function(parameters) {
|
|
1446
1453
|
response
|
1447
1454
|
;
|
1448
1455
|
passedArguments = passedArguments || queryArguments;
|
1449
|
-
context =
|
1456
|
+
context = context || element;
|
1450
1457
|
if(typeof query == 'string' && object !== undefined) {
|
1451
1458
|
query = query.split(/[\. ]/);
|
1452
1459
|
maxDepth = query.length - 1;
|
@@ -1526,7 +1533,7 @@ $.fn.form.settings = {
|
|
1526
1533
|
|
1527
1534
|
autoCheckRequired : false,
|
1528
1535
|
preventLeaving : false,
|
1529
|
-
errorFocus :
|
1536
|
+
errorFocus : true,
|
1530
1537
|
dateHandling : 'date', // 'date', 'input', 'formatter'
|
1531
1538
|
|
1532
1539
|
onValid : function() {},
|
@@ -1582,7 +1589,6 @@ $.fn.form.settings = {
|
|
1582
1589
|
doesntContain : '{name} cannot contain "{ruleValue}"',
|
1583
1590
|
doesntContainExactly : '{name} cannot contain exactly "{ruleValue}"',
|
1584
1591
|
minLength : '{name} must be at least {ruleValue} characters',
|
1585
|
-
length : '{name} must be at least {ruleValue} characters',
|
1586
1592
|
exactLength : '{name} must be exactly {ruleValue} characters',
|
1587
1593
|
maxLength : '{name} cannot be longer than {ruleValue} characters',
|
1588
1594
|
match : '{name} must match {ruleValue} field',
|
@@ -1596,7 +1602,7 @@ $.fn.form.settings = {
|
|
1596
1602
|
selector : {
|
1597
1603
|
checkbox : 'input[type="checkbox"], input[type="radio"]',
|
1598
1604
|
clear : '.clear',
|
1599
|
-
field : 'input:not(.search):not([type="file"]), textarea, select',
|
1605
|
+
field : 'input:not(.search):not([type="file"]):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',
|
1600
1606
|
group : '.field',
|
1601
1607
|
input : 'input:not([type="file"])',
|
1602
1608
|
message : '.error.message',
|
@@ -1623,6 +1629,7 @@ $.fn.form.settings = {
|
|
1623
1629
|
method : 'The method you called is not defined.',
|
1624
1630
|
noRule : 'There is no rule matching the one you specified',
|
1625
1631
|
oldSyntax : 'Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.',
|
1632
|
+
noField : 'Field identifier {identifier} not found',
|
1626
1633
|
noElement : 'This module requires ui {element}'
|
1627
1634
|
},
|
1628
1635
|
|
@@ -1637,15 +1644,22 @@ $.fn.form.settings = {
|
|
1637
1644
|
html += '<li>' + value + '</li>';
|
1638
1645
|
});
|
1639
1646
|
html += '</ul>';
|
1640
|
-
return
|
1647
|
+
return html;
|
1641
1648
|
},
|
1642
1649
|
|
1643
|
-
// template that produces label
|
1644
|
-
prompt: function(errors
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1650
|
+
// template that produces label content
|
1651
|
+
prompt: function(errors) {
|
1652
|
+
if(errors.length === 1){
|
1653
|
+
return errors[0];
|
1654
|
+
}
|
1655
|
+
var
|
1656
|
+
html = '<ul class="ui list">'
|
1648
1657
|
;
|
1658
|
+
$.each(errors, function(index, value) {
|
1659
|
+
html += '<li>' + value + '</li>';
|
1660
|
+
});
|
1661
|
+
html += '</ul>';
|
1662
|
+
return html;
|
1649
1663
|
}
|
1650
1664
|
},
|
1651
1665
|
|
@@ -1855,14 +1869,6 @@ $.fn.form.settings = {
|
|
1855
1869
|
;
|
1856
1870
|
},
|
1857
1871
|
|
1858
|
-
// see rls notes for 2.0.6 (this is a duplicate of minLength)
|
1859
|
-
length: function(value, requiredLength) {
|
1860
|
-
return (value !== undefined)
|
1861
|
-
? (value.length >= requiredLength)
|
1862
|
-
: false
|
1863
|
-
;
|
1864
|
-
},
|
1865
|
-
|
1866
1872
|
// is exactly length
|
1867
1873
|
exactLength: function(value, requiredLength) {
|
1868
1874
|
return (value !== undefined)
|