fomantic-ui 2.9.4-beta.2 → 2.9.4-beta.20
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.
- package/.all-contributorsrc +11 -1
- package/.github/workflows/ci.yml +2 -2
- package/.github/workflows/nightly.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/CONTRIBUTORS.md +1 -0
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +1 -1
- package/dist/components/api.min.js +1 -1
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +1 -1
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +1 -1
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +15 -17
- package/dist/components/dropdown.js +2 -2
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +1 -1
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +1 -1
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +1 -1
- package/dist/components/form.css +14 -5
- package/dist/components/form.js +44 -20
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +5 -5
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +4 -1
- package/dist/components/header.min.css +2 -2
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +30 -10
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -2
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -2
- package/dist/components/menu.min.css +2 -2
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +1 -1
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +1 -1
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -2
- package/dist/components/popup.js +1 -1
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +1 -1
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +1 -1
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +1 -1
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +1 -1
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +118 -89
- package/dist/semantic.js +70 -46
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/form.js +43 -19
- package/src/definitions/collections/form.less +13 -4
- package/src/definitions/collections/grid.less +4 -4
- package/src/definitions/elements/header.less +5 -0
- package/src/definitions/elements/input.less +14 -6
- package/src/definitions/modules/dropdown.js +1 -1
- package/src/definitions/modules/dropdown.less +2 -2
- package/src/themes/default/collections/form.variables +1 -0
- package/src/themes/default/globals/variation.variables +1 -0
- package/types/fomantic-ui-api.d.ts +8 -2
- package/types/fomantic-ui-calendar.d.ts +93 -8
- package/types/fomantic-ui-checkbox.d.ts +14 -4
- package/types/fomantic-ui-dropdown.d.ts +12 -17
- package/types/fomantic-ui-flyout.d.ts +21 -7
- package/types/fomantic-ui-form.d.ts +112 -17
- package/types/fomantic-ui-modal.d.ts +74 -4
- package/types/fomantic-ui-nag.d.ts +1 -1
- package/types/fomantic-ui-popup.d.ts +8 -8
- package/types/fomantic-ui-progress.d.ts +6 -0
- package/types/fomantic-ui-search.d.ts +30 -12
- package/types/fomantic-ui-tab.d.ts +1 -1
- package/types/fomantic-ui-tests.ts +162 -0
- package/types/fomantic-ui-toast.d.ts +6 -1
- package/types/fomantic-ui-transition.d.ts +28 -0
- package/types/fomantic-ui-visibility.d.ts +2 -2
package/package.json
CHANGED
@@ -538,6 +538,13 @@
|
|
538
538
|
fullFields[name].rules.push({ type: rule });
|
539
539
|
});
|
540
540
|
}
|
541
|
+
|
542
|
+
$.each(fullFields[name].rules, function (index, rule) {
|
543
|
+
var ruleName = module.get.ruleName(rule);
|
544
|
+
if (ruleName === 'empty') {
|
545
|
+
module.warn('*** DEPRECATED *** : Rule "empty" for field "' + name + '" will be removed in a future version. -> Use "notEmpty" rule instead.');
|
546
|
+
}
|
547
|
+
});
|
541
548
|
});
|
542
549
|
|
543
550
|
return fullFields;
|
@@ -552,7 +559,7 @@
|
|
552
559
|
$field = module.get.field(field.identifier),
|
553
560
|
value = $field.val(),
|
554
561
|
prompt = isFunction(rule.prompt)
|
555
|
-
? rule.prompt(value)
|
562
|
+
? rule.prompt.call($field[0], value)
|
556
563
|
: rule.prompt || settings.prompt[ruleName] || settings.text.unspecifiedRule,
|
557
564
|
requiresValue = prompt.search('{value}') !== -1,
|
558
565
|
requiresName = prompt.search('{name}') !== -1,
|
@@ -591,10 +598,10 @@
|
|
591
598
|
},
|
592
599
|
settings: function () {
|
593
600
|
if ($.isPlainObject(parameters)) {
|
594
|
-
if (parameters.fields) {
|
595
|
-
parameters.fields = module.get.fieldsFromShorthand(parameters.fields);
|
596
|
-
}
|
597
601
|
settings = $.extend(true, {}, $.fn.form.settings, parameters);
|
602
|
+
if (settings.fields) {
|
603
|
+
settings.fields = module.get.fieldsFromShorthand(settings.fields);
|
604
|
+
}
|
598
605
|
validation = $.extend(true, {}, $.fn.form.settings.defaults, settings.fields);
|
599
606
|
module.verbose('Extending settings', validation, settings);
|
600
607
|
} else {
|
@@ -619,7 +626,7 @@
|
|
619
626
|
// refresh selector cache
|
620
627
|
(instance || module).refresh();
|
621
628
|
},
|
622
|
-
field: function (identifier, strict) {
|
629
|
+
field: function (identifier, strict, ignoreMissing) {
|
623
630
|
module.verbose('Finding field with identifier', identifier);
|
624
631
|
identifier = module.escape.string(identifier);
|
625
632
|
var t;
|
@@ -639,7 +646,9 @@
|
|
639
646
|
if (t.length > 0) {
|
640
647
|
return t;
|
641
648
|
}
|
642
|
-
|
649
|
+
if (!ignoreMissing) {
|
650
|
+
module.error(error.noField.replace('{identifier}', identifier));
|
651
|
+
}
|
643
652
|
|
644
653
|
return strict ? $() : $('<input/>');
|
645
654
|
},
|
@@ -709,7 +718,7 @@
|
|
709
718
|
var
|
710
719
|
$field = $(field),
|
711
720
|
$calendar = $field.closest(selector.uiCalendar),
|
712
|
-
name = $field.prop('name'),
|
721
|
+
name = $field.prop('name') || $field.prop('id'),
|
713
722
|
value = $field.val(),
|
714
723
|
isCheckbox = $field.is(selector.checkbox),
|
715
724
|
isRadio = $field.is(selector.radio),
|
@@ -817,10 +826,10 @@
|
|
817
826
|
|
818
827
|
has: {
|
819
828
|
|
820
|
-
field: function (identifier) {
|
829
|
+
field: function (identifier, ignoreMissing) {
|
821
830
|
module.verbose('Checking for existence of a field with identifier', identifier);
|
822
831
|
|
823
|
-
return module.get.field(identifier, true).length > 0;
|
832
|
+
return module.get.field(identifier, true, ignoreMissing).length > 0;
|
824
833
|
},
|
825
834
|
|
826
835
|
},
|
@@ -1020,7 +1029,7 @@
|
|
1020
1029
|
}
|
1021
1030
|
if (rule === undefined) {
|
1022
1031
|
module.debug('Removed all rules');
|
1023
|
-
if (module.has.field(field)) {
|
1032
|
+
if (module.has.field(field, true)) {
|
1024
1033
|
validation[field].rules = [];
|
1025
1034
|
} else {
|
1026
1035
|
delete validation[field];
|
@@ -1221,7 +1230,7 @@
|
|
1221
1230
|
module.debug('Enabling auto check on required fields');
|
1222
1231
|
if (validation) {
|
1223
1232
|
$.each(validation, function (fieldName) {
|
1224
|
-
if (!module.has.field(fieldName)) {
|
1233
|
+
if (!module.has.field(fieldName, true)) {
|
1225
1234
|
module.verbose('Field not found, removing from validation', fieldName);
|
1226
1235
|
module.remove.field(fieldName);
|
1227
1236
|
}
|
@@ -1235,20 +1244,20 @@
|
|
1235
1244
|
isRequired = $el.prop('required') || $elGroup.hasClass(className.required) || $elGroup.parent().hasClass(className.required),
|
1236
1245
|
isDisabled = $el.is(':disabled') || $elGroup.hasClass(className.disabled) || $elGroup.parent().hasClass(className.disabled),
|
1237
1246
|
validation = module.get.validation($el),
|
1238
|
-
|
1247
|
+
hasNotEmptyRule = validation
|
1239
1248
|
? $.grep(validation.rules, function (rule) {
|
1240
|
-
return rule.type
|
1241
|
-
})
|
1249
|
+
return ['notEmpty', 'checked', 'empty'].indexOf(rule.type) >= 0;
|
1250
|
+
}).length > 0
|
1242
1251
|
: false,
|
1243
1252
|
identifier = module.get.identifier(validation, $el)
|
1244
1253
|
;
|
1245
|
-
if (isRequired && !isDisabled && !
|
1254
|
+
if (isRequired && !isDisabled && !hasNotEmptyRule && identifier !== undefined) {
|
1246
1255
|
if (isCheckbox) {
|
1247
1256
|
module.verbose("Adding 'checked' rule on field", identifier);
|
1248
1257
|
module.add.rule(identifier, 'checked');
|
1249
1258
|
} else {
|
1250
|
-
module.verbose("Adding '
|
1251
|
-
module.add.rule(identifier, '
|
1259
|
+
module.verbose("Adding 'notEmpty' rule on field", identifier);
|
1260
|
+
module.add.rule(identifier, 'notEmpty');
|
1252
1261
|
}
|
1253
1262
|
}
|
1254
1263
|
});
|
@@ -1347,13 +1356,14 @@
|
|
1347
1356
|
fieldErrors = [],
|
1348
1357
|
isDisabled = $field.filter(':not(:disabled)').length === 0,
|
1349
1358
|
validationMessage = $field[0].validationMessage,
|
1359
|
+
noNativeValidation = field.noNativeValidation || settings.noNativeValidation || $field.filter('[formnovalidate],[novalidate]').length > 0 || $module.filter('[novalidate]').length > 0,
|
1350
1360
|
errorLimit
|
1351
1361
|
;
|
1352
1362
|
if (!field.identifier) {
|
1353
1363
|
module.debug('Using field name as identifier', identifier);
|
1354
1364
|
field.identifier = identifier;
|
1355
1365
|
}
|
1356
|
-
if (validationMessage) {
|
1366
|
+
if (validationMessage && !noNativeValidation) {
|
1357
1367
|
module.debug('Field is natively invalid', identifier);
|
1358
1368
|
fieldErrors.push(validationMessage);
|
1359
1369
|
fieldValid = false;
|
@@ -1489,6 +1499,12 @@
|
|
1489
1499
|
module.error.apply(console, arguments);
|
1490
1500
|
}
|
1491
1501
|
},
|
1502
|
+
warn: function () {
|
1503
|
+
if (!settings.silent) {
|
1504
|
+
module.warn = Function.prototype.bind.call(console.warn, console, settings.name + ':');
|
1505
|
+
module.warn.apply(console, arguments);
|
1506
|
+
}
|
1507
|
+
},
|
1492
1508
|
performance: {
|
1493
1509
|
log: function (message) {
|
1494
1510
|
var
|
@@ -1603,6 +1619,7 @@
|
|
1603
1619
|
name: 'Form',
|
1604
1620
|
namespace: 'form',
|
1605
1621
|
|
1622
|
+
silent: false,
|
1606
1623
|
debug: false,
|
1607
1624
|
verbose: false,
|
1608
1625
|
performance: true,
|
@@ -1625,6 +1642,7 @@
|
|
1625
1642
|
errorFocus: true,
|
1626
1643
|
dateHandling: 'date', // 'date', 'input', 'formatter'
|
1627
1644
|
errorLimit: 0,
|
1645
|
+
noNativeValidation: false,
|
1628
1646
|
|
1629
1647
|
onValid: function () {},
|
1630
1648
|
onInvalid: function () {},
|
@@ -1667,6 +1685,7 @@
|
|
1667
1685
|
maxValue: '{name} must have a maximum value of {ruleValue}',
|
1668
1686
|
minValue: '{name} must have a minimum value of {ruleValue}',
|
1669
1687
|
empty: '{name} must have a value',
|
1688
|
+
notEmpty: '{name} must have a value',
|
1670
1689
|
checked: '{name} must be checked',
|
1671
1690
|
email: '{name} must be a valid e-mail',
|
1672
1691
|
url: '{name} must be a valid url',
|
@@ -1799,10 +1818,15 @@
|
|
1799
1818
|
rules: {
|
1800
1819
|
|
1801
1820
|
// is not empty or blank string
|
1802
|
-
|
1821
|
+
notEmpty: function (value) {
|
1803
1822
|
return !(value === undefined || value === '' || (Array.isArray(value) && value.length === 0));
|
1804
1823
|
},
|
1805
1824
|
|
1825
|
+
/* Deprecated */
|
1826
|
+
empty: function (value) {
|
1827
|
+
return $.fn.form.settings.rules.notEmpty(value);
|
1828
|
+
},
|
1829
|
+
|
1806
1830
|
// checkbox checked
|
1807
1831
|
checked: function () {
|
1808
1832
|
return $(this).filter(':checked').length > 0;
|
@@ -162,6 +162,11 @@
|
|
162
162
|
font-family: @inputFont;
|
163
163
|
line-height: @textAreaLineHeight;
|
164
164
|
resize: @textAreaResize;
|
165
|
+
min-height: @actionTextareaMinHeight;
|
166
|
+
}
|
167
|
+
.ui.input > textarea {
|
168
|
+
flex: 1 1 auto;
|
169
|
+
max-width: 100%;
|
165
170
|
}
|
166
171
|
.ui.form textarea:not([rows]) {
|
167
172
|
height: @textAreaHeight;
|
@@ -291,8 +296,10 @@
|
|
291
296
|
|
292
297
|
/* Auto Input */
|
293
298
|
.ui.form .fields .field .ui.input input,
|
294
|
-
.ui.form .field .ui.input
|
295
|
-
|
299
|
+
.ui.form .fields .field .ui.input textarea,
|
300
|
+
.ui.form .field .ui.input input,
|
301
|
+
.ui.form .field .ui.input textarea {
|
302
|
+
width: 100%;
|
296
303
|
}
|
297
304
|
|
298
305
|
& when (@variationFormEqualWidth) or (@variationFormWide) {
|
@@ -441,7 +448,8 @@
|
|
441
448
|
input[type="text"]:focus,
|
442
449
|
input[type="file"]:focus,
|
443
450
|
input[type="url"]:focus,
|
444
|
-
input[type="week"]:focus
|
451
|
+
input[type="week"]:focus,
|
452
|
+
textarea:focus {
|
445
453
|
border-top-right-radius: 0;
|
446
454
|
border-bottom-right-radius: 0;
|
447
455
|
}
|
@@ -462,7 +470,8 @@
|
|
462
470
|
input[type="text"],
|
463
471
|
input[type="file"],
|
464
472
|
input[type="url"],
|
465
|
-
input[type="week"]
|
473
|
+
input[type="week"],
|
474
|
+
textarea {
|
466
475
|
border-bottom-left-radius: 0;
|
467
476
|
border-top-left-radius: 0;
|
468
477
|
}
|
@@ -1723,10 +1723,10 @@
|
|
1723
1723
|
border-top: none !important;
|
1724
1724
|
}
|
1725
1725
|
& when (@variationGridInverted) {
|
1726
|
-
.ui.inverted.stackable.celled.grid > .column:not(.row),
|
1727
|
-
.ui.inverted.stackable.divided.grid > .column:not(.row),
|
1728
|
-
.ui.inverted.stackable.celled.grid > .row > .column,
|
1729
|
-
.ui.inverted.stackable.divided.grid > .row > .column {
|
1726
|
+
.ui.ui.inverted.stackable.celled.grid > .column:not(.row),
|
1727
|
+
.ui.ui.inverted.stackable.divided.grid > .column:not(.row),
|
1728
|
+
.ui.ui.inverted.stackable.celled.grid > .row > .column,
|
1729
|
+
.ui.ui.inverted.stackable.divided.grid > .row > .column {
|
1730
1730
|
border-top: @stackableInvertedMobileBorder;
|
1731
1731
|
}
|
1732
1732
|
}
|
@@ -467,6 +467,11 @@
|
|
467
467
|
.ui.bottom.attached.header {
|
468
468
|
border-radius: 0 0 @attachedBorderRadius @attachedBorderRadius;
|
469
469
|
}
|
470
|
+
& when (@variationHeaderSeamless) {
|
471
|
+
.ui.seamless.attached:not(.bottom).header {
|
472
|
+
border-bottom: none;
|
473
|
+
}
|
474
|
+
}
|
470
475
|
|
471
476
|
/* Attached Sizes */
|
472
477
|
.ui.attached.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
|
@@ -35,7 +35,7 @@
|
|
35
35
|
.ui.input > input {
|
36
36
|
margin: 0;
|
37
37
|
max-width: 100%;
|
38
|
-
flex: 1
|
38
|
+
flex: 1 1 auto;
|
39
39
|
outline: none;
|
40
40
|
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
41
41
|
text-align: @textAlign;
|
@@ -524,7 +524,11 @@
|
|
524
524
|
.ui.form .field.@{state} > .ui.action.input:not([class*="left action"]) > input + .ui.button,
|
525
525
|
.ui.form .field.@{state} > .ui.right.labeled.input:not([class*="corner labeled"]) > input + .ui.label,
|
526
526
|
.ui.action.input.@{state}:not([class*="left action"]) > input + .ui.button,
|
527
|
-
.ui.right.labeled.input.@{state}:not([class*="corner labeled"]) > input + .ui.label
|
527
|
+
.ui.right.labeled.input.@{state}:not([class*="corner labeled"]) > input + .ui.label,
|
528
|
+
.ui.form .field.@{state} > .ui.action.input:not([class*="left action"]) > textarea + .ui.button,
|
529
|
+
.ui.form .field.@{state} > .ui.right.labeled.input:not([class*="corner labeled"]) > textarea + .ui.label,
|
530
|
+
.ui.action.input.@{state}:not([class*="left action"]) > textarea + .ui.button,
|
531
|
+
.ui.right.labeled.input.@{state}:not([class*="corner labeled"]) > textarea + .ui.label {
|
528
532
|
border-right: @borderWidth solid @borderColor;
|
529
533
|
}
|
530
534
|
.ui.form .field.@{state} > .ui.right.labeled.input:not([class*="corner labeled"]) > .ui.label:first-child,
|
@@ -553,14 +557,16 @@
|
|
553
557
|
}
|
554
558
|
|
555
559
|
/* Input when ui Left */
|
556
|
-
.ui[class*="left action"].input > input
|
560
|
+
.ui[class*="left action"].input > input,
|
561
|
+
.ui[class*="left action"].input > textarea {
|
557
562
|
border-top-left-radius: 0;
|
558
563
|
border-bottom-left-radius: 0;
|
559
564
|
border-left-color: transparent;
|
560
565
|
}
|
561
566
|
|
562
567
|
/* Input when ui Right */
|
563
|
-
.ui.action.input:not([class*="left action"]) > input
|
568
|
+
.ui.action.input:not([class*="left action"]) > input,
|
569
|
+
.ui.action.input:not([class*="left action"]) > textarea {
|
564
570
|
border-top-right-radius: 0;
|
565
571
|
border-bottom-right-radius: 0;
|
566
572
|
border-right-color: transparent;
|
@@ -584,11 +590,13 @@
|
|
584
590
|
}
|
585
591
|
|
586
592
|
/* Input Focus */
|
587
|
-
.ui.action.input:not([class*="left action"]) > input:focus
|
593
|
+
.ui.action.input:not([class*="left action"]) > input:focus,
|
594
|
+
.ui.action.input:not([class*="left action"]) > textarea:focus {
|
588
595
|
border-right-color: @focusBorderColor;
|
589
596
|
}
|
590
597
|
|
591
|
-
.ui.ui[class*="left action"].input > input:focus
|
598
|
+
.ui.ui[class*="left action"].input > input:focus,
|
599
|
+
.ui.ui[class*="left action"].input > textarea:focus {
|
592
600
|
border-left-color: @focusBorderColor;
|
593
601
|
}
|
594
602
|
}
|
@@ -2806,8 +2806,8 @@
|
|
2806
2806
|
module.save.remoteData(selectedText, selectedValue);
|
2807
2807
|
}
|
2808
2808
|
if (settings.useLabels) {
|
2809
|
-
module.add.value(selectedValue, selectedText, $selected, preventChangeTrigger);
|
2810
2809
|
module.add.label(selectedValue, selectedText, shouldAnimate);
|
2810
|
+
module.add.value(selectedValue, selectedText, $selected, preventChangeTrigger);
|
2811
2811
|
module.set.activeItem($selected);
|
2812
2812
|
module.filterActive();
|
2813
2813
|
module.select.nextAvailable($selectedItem);
|
@@ -1853,8 +1853,8 @@ select.ui.dropdown {
|
|
1853
1853
|
& when not (@variationDropdownSizes = false) {
|
1854
1854
|
each(@variationDropdownSizes, {
|
1855
1855
|
@s: @@value;
|
1856
|
-
.ui.@{value}.dropdown,
|
1857
|
-
.ui.@{value}.dropdown .menu > .item {
|
1856
|
+
.ui.ui.@{value}.dropdown,
|
1857
|
+
.ui.ui.@{value}.dropdown .menu > .item {
|
1858
1858
|
font-size: @s;
|
1859
1859
|
}
|
1860
1860
|
});
|
@@ -82,6 +82,7 @@
|
|
82
82
|
@variationHeaderDividing: true;
|
83
83
|
@variationHeaderBlock: true;
|
84
84
|
@variationHeaderAttached: true;
|
85
|
+
@variationHeaderSeamless: true;
|
85
86
|
@variationHeaderTags: h1, h2, h3, h4, h5, h6;
|
86
87
|
@variationHeaderSizes: @variationAllSizes;
|
87
88
|
@variationHeaderColors: @variationAllColors;
|
@@ -125,6 +125,12 @@ declare namespace FomanticUI {
|
|
125
125
|
*/
|
126
126
|
on: string;
|
127
127
|
|
128
|
+
/**
|
129
|
+
* Object containing all templates endpoints
|
130
|
+
* @default {}
|
131
|
+
*/
|
132
|
+
api: {[key: string]: string};
|
133
|
+
|
128
134
|
/**
|
129
135
|
* Can be set to 'local' to cache successful returned AJAX responses when using a JSON API.
|
130
136
|
* This helps avoid server roundtrips when API endpoints will return the same results when accessed repeatedly.
|
@@ -137,7 +143,7 @@ declare namespace FomanticUI {
|
|
137
143
|
* UI state will be applied to this element, defaults to triggering element.
|
138
144
|
* @default false
|
139
145
|
*/
|
140
|
-
stateContext: false | JQuery
|
146
|
+
stateContext: false | string | JQuery<any>;
|
141
147
|
|
142
148
|
/**
|
143
149
|
* Whether to encode parameters with 'encodeURIComponent' before adding into url string.
|
@@ -259,7 +265,7 @@ declare namespace FomanticUI {
|
|
259
265
|
* Method for transmitting request to server.
|
260
266
|
* @default 'get'
|
261
267
|
*/
|
262
|
-
method: 'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'
|
268
|
+
method: Uppercase<'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'> | Lowercase<'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'>;
|
263
269
|
|
264
270
|
/**
|
265
271
|
* Expected data type of response.
|
@@ -37,7 +37,7 @@ declare namespace FomanticUI {
|
|
37
37
|
* Pass false to updateInput to disable updating the input.
|
38
38
|
* Pass false to fireChange to disable the onBeforeChange and onChange callbacks for this change
|
39
39
|
*/
|
40
|
-
(behavior: 'set date', date: string, updateInput
|
40
|
+
(behavior: 'set date', date: Date | string | null, updateInput?: boolean, fireChange?: boolean): JQuery;
|
41
41
|
|
42
42
|
/**
|
43
43
|
* Get the current selection mode (year, month, day, hour, minute)
|
@@ -82,12 +82,12 @@ declare namespace FomanticUI {
|
|
82
82
|
/**
|
83
83
|
* Set the minimal selectable date
|
84
84
|
*/
|
85
|
-
(behavior: 'set minDate', date: Date | string): JQuery;
|
85
|
+
(behavior: 'set minDate', date: Date | string | null): JQuery;
|
86
86
|
|
87
87
|
/**
|
88
88
|
* Set the maximal selectable date
|
89
89
|
*/
|
90
|
-
(behavior: 'set maxDate', date: Date | string): JQuery;
|
90
|
+
(behavior: 'set maxDate', date: Date | string | null): JQuery;
|
91
91
|
|
92
92
|
(behavior: 'destroy'): JQuery;
|
93
93
|
|
@@ -214,7 +214,7 @@ declare namespace FomanticUI {
|
|
214
214
|
*
|
215
215
|
* @default null
|
216
216
|
*/
|
217
|
-
initialDate:
|
217
|
+
initialDate: Date | string | null;
|
218
218
|
|
219
219
|
/**
|
220
220
|
* Display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day').
|
@@ -319,12 +319,14 @@ declare namespace FomanticUI {
|
|
319
319
|
*
|
320
320
|
* @default false
|
321
321
|
*/
|
322
|
-
selectAdjacentDays:
|
322
|
+
selectAdjacentDays: boolean;
|
323
323
|
|
324
324
|
popupOptions: Calendar.PopupSettings;
|
325
325
|
|
326
326
|
text: Calendar.TextSettings;
|
327
327
|
|
328
|
+
formatter: Calendar.FormatterSettings;
|
329
|
+
|
328
330
|
// endregion
|
329
331
|
|
330
332
|
// region Callbacks
|
@@ -333,12 +335,12 @@ declare namespace FomanticUI {
|
|
333
335
|
* Is called before a calendar date changes. 'return false;' will cancel the change.
|
334
336
|
* @since 2.8.0
|
335
337
|
*/
|
336
|
-
onBeforeChange(this: JQuery): void;
|
338
|
+
onBeforeChange(this: JQuery, date?: Date, text?: string, mode?: string): void;
|
337
339
|
|
338
340
|
/**
|
339
341
|
* Is called after a calendar date has changed.
|
340
342
|
*/
|
341
|
-
onChange(this: JQuery): void;
|
343
|
+
onChange(this: JQuery, date?: Date): void;
|
342
344
|
|
343
345
|
/**
|
344
346
|
* Is called before a calendar is shown. 'return false;' will prevent the calendar to be shown.
|
@@ -364,7 +366,7 @@ declare namespace FomanticUI {
|
|
364
366
|
* Is called when a cell of the calendar is selected providing its value and current mode.
|
365
367
|
* 'return false;' will prevent the selection.
|
366
368
|
*/
|
367
|
-
onSelect(this: JQuery, date
|
369
|
+
onSelect(this: JQuery, date?: Date, mode?: string): void;
|
368
370
|
|
369
371
|
// endregion
|
370
372
|
|
@@ -436,6 +438,7 @@ declare namespace FomanticUI {
|
|
436
438
|
namespace Calendar {
|
437
439
|
type PopupSettings = Partial<Pick<Settings.Popup, keyof Settings.Popup>>;
|
438
440
|
type TextSettings = Partial<Pick<Settings.Texts, keyof Settings.Texts>>;
|
441
|
+
type FormatterSettings = Partial<Pick<Settings.Formatters, keyof Settings.Formatters>>;
|
439
442
|
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
440
443
|
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
441
444
|
type RegExpSettings = Partial<Pick<Settings.RegExps, keyof Settings.RegExps>>;
|
@@ -471,6 +474,16 @@ declare namespace FomanticUI {
|
|
471
474
|
*/
|
472
475
|
days: string[];
|
473
476
|
|
477
|
+
/**
|
478
|
+
* @default ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
479
|
+
*/
|
480
|
+
dayNamesShort: string[];
|
481
|
+
|
482
|
+
/**
|
483
|
+
* @default ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
484
|
+
*/
|
485
|
+
dayNames: string[];
|
486
|
+
|
474
487
|
/**
|
475
488
|
* @default ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
476
489
|
*/
|
@@ -507,6 +520,78 @@ declare namespace FomanticUI {
|
|
507
520
|
weekNo: string;
|
508
521
|
}
|
509
522
|
|
523
|
+
interface Formatters {
|
524
|
+
/**
|
525
|
+
*
|
526
|
+
*/
|
527
|
+
yearHeader(date: Date, settings?: CalendarSettings): string;
|
528
|
+
|
529
|
+
/**
|
530
|
+
* @default 'YYYY'
|
531
|
+
*/
|
532
|
+
monthHeader: string;
|
533
|
+
|
534
|
+
/**
|
535
|
+
* @default 'MMMM YYYY'
|
536
|
+
*/
|
537
|
+
dayHeader: string;
|
538
|
+
|
539
|
+
/**
|
540
|
+
* @default 'MMMM D, YYYY'
|
541
|
+
*/
|
542
|
+
hourHeader: string;
|
543
|
+
|
544
|
+
/**
|
545
|
+
* @default 'MMMM D, YYYY'
|
546
|
+
*/
|
547
|
+
minuteHeader: string;
|
548
|
+
|
549
|
+
/**
|
550
|
+
* @default 'MMMM D, YYYY'
|
551
|
+
*/
|
552
|
+
dayColumnHeader(day: number, settings: CalendarSettings): string;
|
553
|
+
|
554
|
+
/**
|
555
|
+
* @default 'MMMM D, YYYY h:mm A'
|
556
|
+
*/
|
557
|
+
datetime: string;
|
558
|
+
|
559
|
+
/**
|
560
|
+
* @default 'MMMM D, YYYY'
|
561
|
+
*/
|
562
|
+
date: string;
|
563
|
+
|
564
|
+
/**
|
565
|
+
* @default 'h:mm A'
|
566
|
+
*/
|
567
|
+
time: string;
|
568
|
+
|
569
|
+
/**
|
570
|
+
* @default 'h:mm A'
|
571
|
+
*/
|
572
|
+
cellTime: string;
|
573
|
+
|
574
|
+
/**
|
575
|
+
* @default 'MMMM YYYY'
|
576
|
+
*/
|
577
|
+
month: string;
|
578
|
+
|
579
|
+
/**
|
580
|
+
* @default 'YYYY'
|
581
|
+
*/
|
582
|
+
year: string;
|
583
|
+
|
584
|
+
/**
|
585
|
+
*
|
586
|
+
*/
|
587
|
+
today(settings: CalendarSettings): string;
|
588
|
+
|
589
|
+
/**
|
590
|
+
*
|
591
|
+
*/
|
592
|
+
cell(cell: string, date: Date, cellOptions: any): any
|
593
|
+
}
|
594
|
+
|
510
595
|
interface Selectors {
|
511
596
|
/**
|
512
597
|
* @default '.ui.popup'
|
@@ -32,6 +32,11 @@ declare namespace FomanticUI {
|
|
32
32
|
*/
|
33
33
|
(behavior: 'enable'): JQuery;
|
34
34
|
|
35
|
+
/**
|
36
|
+
* Disable interaction with a checkbox.
|
37
|
+
*/
|
38
|
+
(behavior: 'disable'): JQuery;
|
39
|
+
|
35
40
|
/**
|
36
41
|
* Set a checkbox state to checked without callbacks.
|
37
42
|
*/
|
@@ -82,6 +87,11 @@ declare namespace FomanticUI {
|
|
82
87
|
*/
|
83
88
|
(behavior: 'is unchecked'): boolean;
|
84
89
|
|
90
|
+
/**
|
91
|
+
* Returns whether element is not determinate.
|
92
|
+
*/
|
93
|
+
(behavior: 'is indeterminate'): boolean;
|
94
|
+
|
85
95
|
/**
|
86
96
|
* Returns whether element is able to be changed.
|
87
97
|
*/
|
@@ -175,22 +185,22 @@ declare namespace FomanticUI {
|
|
175
185
|
/**
|
176
186
|
* Callback before a checkbox is checked. Can cancel change by returning 'false'.
|
177
187
|
*/
|
178
|
-
beforeChecked(this: JQuery): void |
|
188
|
+
beforeChecked(this: JQuery): void | Promise<void> | boolean;
|
179
189
|
|
180
190
|
/**
|
181
191
|
* Callback before a checkbox is set to indeterminate. Can cancel change by returning 'false'.
|
182
192
|
*/
|
183
|
-
beforeIndeterminate(this: JQuery): void | false;
|
193
|
+
beforeIndeterminate(this: JQuery): void | Promise<void> | false;
|
184
194
|
|
185
195
|
/**
|
186
196
|
* Callback before a checkbox is set to determinate. Can cancel change by returning 'false'.
|
187
197
|
*/
|
188
|
-
beforeDeterminate(this: JQuery): void | false;
|
198
|
+
beforeDeterminate(this: JQuery): void | Promise<void> | false;
|
189
199
|
|
190
200
|
/**
|
191
201
|
* Callback before a checkbox is unchecked. Can cancel change by returning 'false'.
|
192
202
|
*/
|
193
|
-
beforeUnchecked(this: JQuery): void | false;
|
203
|
+
beforeUnchecked(this: JQuery): void | Promise<void> | false;
|
194
204
|
|
195
205
|
/**
|
196
206
|
* Callback after a checkbox is enabled.
|