fomantic-ui 2.9.1-beta.23 → 2.9.1-beta.24
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/.eslint/index.js +23 -0
- package/.eslint/no-extra-parens-rule.js +17 -0
- package/.eslint/package.json +11 -0
- package/.eslintrc.js +6 -11
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +22 -22
- 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 +47 -47
- 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 +69 -58
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- 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 +9 -9
- 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 +11 -11
- 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 +1 -1
- package/dist/components/dropdown.js +171 -173
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +1 -1
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +16 -16
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +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 +21 -17
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +1 -1
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +87 -87
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +1 -1
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- 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 +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- 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/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +30 -26
- 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 +7 -7
- 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 -1
- package/dist/components/popup.js +45 -45
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +30 -32
- 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 +10 -10
- 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 +31 -31
- 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 +34 -34
- 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 +21 -21
- 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 +14 -14
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.js +33 -25
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +11 -11
- 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 +21 -21
- 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 +23 -23
- 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 +41 -17
- 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 +21 -21
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +21 -21
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +50 -50
- package/dist/semantic.js +847 -800
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/gulpfile.js +1 -1
- package/package.json +2 -1
- package/scripts/nightly-version.js +3 -1
- package/src/definitions/behaviors/api.js +46 -46
- package/src/definitions/behaviors/form.js +86 -86
- package/src/definitions/behaviors/state.js +10 -10
- package/src/definitions/behaviors/visibility.js +20 -20
- package/src/definitions/globals/site.js +13 -13
- package/src/definitions/modules/accordion.js +21 -21
- package/src/definitions/modules/calendar.js +68 -57
- package/src/definitions/modules/checkbox.js +8 -8
- package/src/definitions/modules/dimmer.js +10 -10
- package/src/definitions/modules/dropdown.js +170 -172
- package/src/definitions/modules/embed.js +15 -15
- package/src/definitions/modules/flyout.js +20 -16
- package/src/definitions/modules/modal.js +29 -25
- package/src/definitions/modules/nag.js +6 -6
- package/src/definitions/modules/popup.js +44 -44
- package/src/definitions/modules/progress.js +29 -31
- package/src/definitions/modules/rating.js +9 -9
- package/src/definitions/modules/search.js +30 -30
- package/src/definitions/modules/shape.js +33 -33
- package/src/definitions/modules/sidebar.js +20 -20
- package/src/definitions/modules/slider.js +32 -24
- package/src/definitions/modules/sticky.js +20 -20
- package/src/definitions/modules/tab.js +22 -22
- package/src/definitions/modules/toast.js +40 -16
- package/src/definitions/modules/transition.js +20 -20
- package/tasks/admin/components/create.js +1 -1
- package/tasks/admin/components/init.js +1 -1
- package/tasks/admin/components/update.js +4 -4
- package/tasks/admin/distributions/create.js +2 -2
- package/tasks/admin/distributions/init.js +1 -1
- package/tasks/admin/distributions/update.js +4 -4
- package/tasks/admin/publish.js +1 -3
- package/tasks/admin/register.js +5 -5
- package/tasks/admin/release.js +1 -3
- package/tasks/build/assets.js +1 -1
- package/tasks/build.js +1 -1
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/admin.js +1 -1
- package/tasks/collections/rtl.js +1 -1
- package/tasks/config/admin/github.js +3 -4
- package/tasks/config/npm/gulpfile.js +1 -1
- package/tasks/config/project/config.js +8 -6
- package/tasks/config/project/install.js +10 -10
- package/tasks/config/project/release.js +3 -2
- package/tasks/config/tasks.js +2 -2
- package/tasks/config/user.js +5 -3
- package/tasks/docs/build.js +1 -1
- package/tasks/docs/metadata.js +1 -1
- package/tasks/docs/serve.js +2 -1
- package/tasks/install.js +2 -2
- package/tasks/rtl/build.js +1 -3
- package/tasks/rtl/watch.js +1 -3
- package/tasks/version.js +1 -3
- package/tasks/watch.js +1 -1
package/gulpfile.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "fomantic-ui",
|
3
|
-
"version": "2.9.1-beta.
|
3
|
+
"version": "2.9.1-beta.24+029436f",
|
4
4
|
"description": "Fomantic empowers designers and developers by creating a shared vocabulary for UI.",
|
5
5
|
"keywords": [
|
6
6
|
"fomantic-ui",
|
@@ -73,6 +73,7 @@
|
|
73
73
|
"yamljs": "^0.3.0"
|
74
74
|
},
|
75
75
|
"devDependencies": {
|
76
|
+
"@internal/eslint-plugin": "file:.eslint",
|
76
77
|
"all-contributors-cli": "^6.7.0",
|
77
78
|
"auto-changelog": "^2.4.0",
|
78
79
|
"eslint": "^8.29.0",
|
@@ -44,7 +44,9 @@ const getPublishedVersion = async function () {
|
|
44
44
|
.then((p) => {
|
45
45
|
let nightly = p['dist-tags'].nightly ?? '';
|
46
46
|
let versionInfo = p.versions[nightly] ?? {};
|
47
|
-
let buildCommit = nightly.indexOf('+') === -1 && versionInfo.gitHead
|
47
|
+
let buildCommit = nightly.indexOf('+') === -1 && versionInfo.gitHead
|
48
|
+
? '+' + (versionInfo.gitHead ?? '').slice(0, 7)
|
49
|
+
: '';
|
48
50
|
|
49
51
|
return nightly + buildCommit;
|
50
52
|
})
|
@@ -19,7 +19,7 @@
|
|
19
19
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
20
20
|
}
|
21
21
|
|
22
|
-
window =
|
22
|
+
window = window !== undefined && window.Math === Math
|
23
23
|
? window
|
24
24
|
: globalThis;
|
25
25
|
|
@@ -34,7 +34,7 @@
|
|
34
34
|
performance = [],
|
35
35
|
|
36
36
|
query = arguments[0],
|
37
|
-
methodInvoked =
|
37
|
+
methodInvoked = typeof query === 'string',
|
38
38
|
queryArguments = [].slice.call(arguments, 1),
|
39
39
|
|
40
40
|
returnedValue
|
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
$allModules.each(function () {
|
44
44
|
var
|
45
|
-
settings =
|
45
|
+
settings = $.isPlainObject(parameters)
|
46
46
|
? $.extend(true, {}, $.fn.api.settings, parameters)
|
47
47
|
: $.extend({}, $.fn.api.settings),
|
48
48
|
|
@@ -62,7 +62,7 @@
|
|
62
62
|
$form = $module.closest(selector.form),
|
63
63
|
|
64
64
|
// context used for state
|
65
|
-
$context =
|
65
|
+
$context = settings.stateContext
|
66
66
|
? ([window, document].indexOf(settings.stateContext) < 0 ? $(document).find(settings.stateContext) : $(settings.stateContext))
|
67
67
|
: $module,
|
68
68
|
|
@@ -274,13 +274,13 @@
|
|
274
274
|
|
275
275
|
should: {
|
276
276
|
removeError: function () {
|
277
|
-
return
|
277
|
+
return settings.hideError === true || (settings.hideError === 'auto' && !module.is.form());
|
278
278
|
},
|
279
279
|
},
|
280
280
|
|
281
281
|
is: {
|
282
282
|
disabled: function () {
|
283
|
-
return
|
283
|
+
return $module.filter(selector.disabled).length > 0;
|
284
284
|
},
|
285
285
|
expectingJSON: function () {
|
286
286
|
return settings.dataType === 'json' || settings.dataType === 'jsonp';
|
@@ -289,14 +289,14 @@
|
|
289
289
|
return $module.is('form') || $context.is('form');
|
290
290
|
},
|
291
291
|
mocked: function () {
|
292
|
-
return
|
292
|
+
return settings.mockResponse || settings.mockResponseAsync || settings.response || settings.responseAsync;
|
293
293
|
},
|
294
294
|
input: function () {
|
295
295
|
return $module.is('input');
|
296
296
|
},
|
297
297
|
loading: function () {
|
298
|
-
return
|
299
|
-
?
|
298
|
+
return module.request
|
299
|
+
? module.request.state() == 'pending'
|
300
300
|
: false;
|
301
301
|
},
|
302
302
|
abortedRequest: function (xhr) {
|
@@ -311,7 +311,7 @@
|
|
311
311
|
return false;
|
312
312
|
},
|
313
313
|
validResponse: function (response) {
|
314
|
-
if (
|
314
|
+
if (!module.is.expectingJSON() || !isFunction(settings.successTest)) {
|
315
315
|
module.verbose('Response is not JSON, skipping validation', settings.successTest, response);
|
316
316
|
|
317
317
|
return true;
|
@@ -331,16 +331,16 @@
|
|
331
331
|
|
332
332
|
was: {
|
333
333
|
cancelled: function () {
|
334
|
-
return
|
334
|
+
return module.cancelled || false;
|
335
335
|
},
|
336
336
|
successful: function () {
|
337
|
-
return
|
337
|
+
return module.request && module.request.state() == 'resolved';
|
338
338
|
},
|
339
339
|
failure: function () {
|
340
|
-
return
|
340
|
+
return module.request && module.request.state() == 'rejected';
|
341
341
|
},
|
342
342
|
complete: function () {
|
343
|
-
return
|
343
|
+
return module.request && (module.request.state() == 'resolved' || module.request.state() == 'rejected');
|
344
344
|
},
|
345
345
|
},
|
346
346
|
|
@@ -359,16 +359,16 @@
|
|
359
359
|
$.each(requiredVariables, function (index, templatedString) {
|
360
360
|
var
|
361
361
|
// allow legacy {$var} style
|
362
|
-
variable =
|
362
|
+
variable = templatedString.indexOf('$') !== -1
|
363
363
|
? templatedString.slice(2, -1)
|
364
364
|
: templatedString.slice(1, -1),
|
365
|
-
value =
|
365
|
+
value = $.isPlainObject(urlData) && urlData[variable] !== undefined
|
366
366
|
? urlData[variable]
|
367
|
-
: ($module.data(variable) !== undefined
|
367
|
+
: ($module.data(variable) !== undefined
|
368
368
|
? $module.data(variable)
|
369
|
-
: ($context.data(variable) !== undefined
|
369
|
+
: ($context.data(variable) !== undefined // eslint-disable-line unicorn/no-nested-ternary
|
370
370
|
? $context.data(variable)
|
371
|
-
: urlData[variable]
|
371
|
+
: urlData[variable]))
|
372
372
|
;
|
373
373
|
// remove value
|
374
374
|
if (value === undefined) {
|
@@ -379,7 +379,7 @@
|
|
379
379
|
}
|
380
380
|
|
381
381
|
module.verbose('Found required variable', variable, value);
|
382
|
-
value =
|
382
|
+
value = settings.encodeParameters
|
383
383
|
? module.get.urlEncodedValue(value)
|
384
384
|
: value;
|
385
385
|
url = url.replace(templatedString, value);
|
@@ -390,16 +390,16 @@
|
|
390
390
|
$.each(optionalVariables, function (index, templatedString) {
|
391
391
|
var
|
392
392
|
// allow legacy {/$var} style
|
393
|
-
variable =
|
393
|
+
variable = templatedString.indexOf('$') !== -1
|
394
394
|
? templatedString.slice(3, -1)
|
395
395
|
: templatedString.slice(2, -1),
|
396
|
-
value =
|
396
|
+
value = $.isPlainObject(urlData) && urlData[variable] !== undefined
|
397
397
|
? urlData[variable]
|
398
|
-
: ($module.data(variable) !== undefined
|
398
|
+
: ($module.data(variable) !== undefined
|
399
399
|
? $module.data(variable)
|
400
|
-
: ($context.data(variable) !== undefined
|
400
|
+
: ($context.data(variable) !== undefined // eslint-disable-line unicorn/no-nested-ternary
|
401
401
|
? $context.data(variable)
|
402
|
-
: urlData[variable]
|
402
|
+
: urlData[variable]))
|
403
403
|
;
|
404
404
|
// optional replacement
|
405
405
|
if (value !== undefined) {
|
@@ -536,15 +536,15 @@
|
|
536
536
|
done: function (response, textStatus, xhr) {
|
537
537
|
var
|
538
538
|
context = this,
|
539
|
-
elapsedTime =
|
540
|
-
timeLeft =
|
541
|
-
translatedResponse =
|
542
|
-
? module.is.expectingJSON() && !settings.rawResponse
|
539
|
+
elapsedTime = Date.now() - requestStartTime,
|
540
|
+
timeLeft = settings.loadingDuration - elapsedTime,
|
541
|
+
translatedResponse = isFunction(settings.onResponse)
|
542
|
+
? (module.is.expectingJSON() && !settings.rawResponse
|
543
543
|
? settings.onResponse.call(context, $.extend(true, {}, response))
|
544
|
-
: settings.onResponse.call(context, response)
|
544
|
+
: settings.onResponse.call(context, response))
|
545
545
|
: false
|
546
546
|
;
|
547
|
-
timeLeft =
|
547
|
+
timeLeft = timeLeft > 0
|
548
548
|
? timeLeft
|
549
549
|
: 0;
|
550
550
|
if (translatedResponse) {
|
@@ -565,10 +565,10 @@
|
|
565
565
|
fail: function (xhr, status, httpMessage) {
|
566
566
|
var
|
567
567
|
context = this,
|
568
|
-
elapsedTime =
|
569
|
-
timeLeft =
|
568
|
+
elapsedTime = Date.now() - requestStartTime,
|
569
|
+
timeLeft = settings.loadingDuration - elapsedTime
|
570
570
|
;
|
571
|
-
timeLeft =
|
571
|
+
timeLeft = timeLeft > 0
|
572
572
|
? timeLeft
|
573
573
|
: 0;
|
574
574
|
if (timeLeft > 0) {
|
@@ -748,17 +748,17 @@
|
|
748
748
|
},
|
749
749
|
responseFromXHR: function (xhr) {
|
750
750
|
return $.isPlainObject(xhr)
|
751
|
-
? (module.is.expectingJSON()
|
751
|
+
? (module.is.expectingJSON()
|
752
752
|
? module.decode.json(xhr.responseText)
|
753
|
-
: xhr.responseText
|
753
|
+
: xhr.responseText)
|
754
754
|
: false;
|
755
755
|
},
|
756
756
|
errorFromRequest: function (response, status, httpMessage) {
|
757
|
-
return
|
757
|
+
return $.isPlainObject(response) && response.error !== undefined
|
758
758
|
? response.error // use json error message
|
759
|
-
: (settings.error[status] !== undefined
|
759
|
+
: (settings.error[status] !== undefined // use server error message
|
760
760
|
? settings.error[status]
|
761
|
-
: httpMessage;
|
761
|
+
: httpMessage);
|
762
762
|
},
|
763
763
|
request: function () {
|
764
764
|
return module.request || false;
|
@@ -795,7 +795,7 @@
|
|
795
795
|
return runSettings;
|
796
796
|
}
|
797
797
|
|
798
|
-
return
|
798
|
+
return runSettings !== undefined
|
799
799
|
? $.extend(true, {}, runSettings)
|
800
800
|
: $.extend(true, {}, settings);
|
801
801
|
},
|
@@ -803,7 +803,7 @@
|
|
803
803
|
var
|
804
804
|
decodedValue = window.decodeURIComponent(value),
|
805
805
|
encodedValue = window.encodeURIComponent(value),
|
806
|
-
alreadyEncoded =
|
806
|
+
alreadyEncoded = decodedValue !== value
|
807
807
|
;
|
808
808
|
if (alreadyEncoded) {
|
809
809
|
module.debug('URL value is already encoded, avoiding double encoding', value);
|
@@ -836,11 +836,11 @@
|
|
836
836
|
}
|
837
837
|
if (settings.on == 'auto') {
|
838
838
|
if ($module.is('input')) {
|
839
|
-
return
|
839
|
+
return element.oninput !== undefined
|
840
840
|
? 'input'
|
841
|
-
: (element.onpropertychange !== undefined
|
841
|
+
: (element.onpropertychange !== undefined
|
842
842
|
? 'propertychange'
|
843
|
-
: 'keyup';
|
843
|
+
: 'keyup');
|
844
844
|
}
|
845
845
|
if ($module.is('form')) {
|
846
846
|
return 'submit';
|
@@ -1004,7 +1004,7 @@
|
|
1004
1004
|
query = query.split(/[ .]/);
|
1005
1005
|
maxDepth = query.length - 1;
|
1006
1006
|
$.each(query, function (depth, value) {
|
1007
|
-
var camelCaseValue =
|
1007
|
+
var camelCaseValue = depth != maxDepth
|
1008
1008
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1009
1009
|
: query
|
1010
1010
|
;
|
@@ -1057,7 +1057,7 @@
|
|
1057
1057
|
}
|
1058
1058
|
});
|
1059
1059
|
|
1060
|
-
return
|
1060
|
+
return returnedValue !== undefined
|
1061
1061
|
? returnedValue
|
1062
1062
|
: this;
|
1063
1063
|
};
|