fomantic-ui 2.9.1-beta.22 → 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 +13 -70
- package/.stylelintrc.js +5 -7
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +26 -26
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +95 -94
- package/dist/components/api.min.js +2 -2
- 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 +3 -3
- package/dist/components/calendar.js +181 -151
- package/dist/components/calendar.min.css +2 -2
- 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 +14 -14
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- 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 +23 -25
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- 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 +252 -254
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +27 -33
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- 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 +2 -2
- package/dist/components/flyout.js +50 -44
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +2 -2
- package/dist/components/form.js +187 -163
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- 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 +49 -45
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +22 -20
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- 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 +71 -71
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +46 -46
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- 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 +15 -15
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- 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 +69 -74
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- 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 +39 -39
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +39 -37
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +22 -21
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +69 -64
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +15 -15
- package/dist/components/state.min.js +2 -2
- 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 +25 -25
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +55 -57
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- 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 +57 -30
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +7 -7
- package/dist/components/transition.js +45 -39
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +25 -25
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +60 -60
- package/dist/semantic.js +1518 -1427
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/responsive.html +1 -1
- package/gulpfile.js +1 -1
- package/package.json +2 -1
- package/scripts/nightly-version.js +6 -4
- package/src/definitions/behaviors/api.js +94 -93
- package/src/definitions/behaviors/form.js +186 -162
- package/src/definitions/behaviors/state.js +14 -14
- package/src/definitions/behaviors/visibility.js +24 -24
- package/src/definitions/collections/menu.less +2 -2
- package/src/definitions/elements/button.less +2 -2
- package/src/definitions/elements/loader.less +4 -4
- package/src/definitions/elements/step.less +1 -1
- package/src/definitions/globals/site.js +21 -20
- package/src/definitions/modules/accordion.js +25 -25
- package/src/definitions/modules/calendar.js +180 -150
- package/src/definitions/modules/calendar.less +2 -2
- package/src/definitions/modules/checkbox.js +13 -13
- package/src/definitions/modules/dimmer.js +22 -24
- package/src/definitions/modules/dimmer.less +10 -10
- package/src/definitions/modules/dropdown.js +251 -253
- package/src/definitions/modules/embed.js +26 -32
- package/src/definitions/modules/flyout.js +49 -43
- package/src/definitions/modules/flyout.less +1 -1
- package/src/definitions/modules/modal.js +48 -44
- package/src/definitions/modules/nag.js +21 -19
- package/src/definitions/modules/popup.js +70 -70
- package/src/definitions/modules/progress.js +45 -45
- package/src/definitions/modules/rating.js +14 -14
- package/src/definitions/modules/search.js +68 -73
- package/src/definitions/modules/shape.js +38 -38
- package/src/definitions/modules/sidebar.js +38 -36
- package/src/definitions/modules/slider.js +68 -63
- package/src/definitions/modules/sticky.js +24 -24
- package/src/definitions/modules/tab.js +54 -56
- package/src/definitions/modules/toast.js +56 -29
- package/src/definitions/modules/transition.js +44 -38
- package/src/themes/amazon/elements/button.overrides +7 -7
- package/src/themes/default/collections/form.variables +1 -1
- package/src/themes/default/elements/reveal.variables +1 -1
- package/src/themes/default/globals/site.variables +1 -1
- package/src/themes/default/modules/dimmer.variables +6 -6
- package/src/themes/default/modules/modal.variables +1 -1
- package/src/themes/default/modules/slider.variables +4 -4
- package/src/themes/default/modules/toast.variables +2 -2
- package/src/themes/default/modules/transition.overrides +12 -12
- package/src/themes/flat/collections/form.overrides +2 -2
- package/src/themes/flat/globals/site.variables +1 -1
- package/src/themes/github/collections/form.overrides +2 -2
- package/src/themes/github/collections/menu.variables +1 -1
- package/src/themes/github/collections/message.overrides +3 -3
- package/src/themes/github/elements/input.overrides +2 -2
- package/src/themes/timeline/views/feed.overrides +3 -3
- package/src/themes/twitter/elements/button.overrides +2 -2
- package/tasks/README.md +1 -3
- package/tasks/admin/components/create.js +9 -16
- package/tasks/admin/components/init.js +7 -7
- package/tasks/admin/components/update.js +10 -10
- package/tasks/admin/distributions/create.js +16 -18
- package/tasks/admin/distributions/init.js +7 -7
- package/tasks/admin/distributions/update.js +10 -10
- package/tasks/admin/publish.js +1 -3
- package/tasks/admin/register.js +6 -6
- package/tasks/admin/release.js +1 -3
- package/tasks/build/assets.js +2 -2
- package/tasks/build/css.js +8 -3
- package/tasks/build/javascript.js +3 -1
- package/tasks/build.js +1 -1
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/README.md +3 -5
- package/tasks/collections/admin.js +1 -1
- package/tasks/collections/docs.js +1 -1
- package/tasks/collections/install.js +1 -1
- package/tasks/collections/rtl.js +1 -1
- package/tasks/collections/various.js +1 -1
- package/tasks/config/admin/github.js +6 -8
- package/tasks/config/admin/templates/css-package.js +1 -1
- package/tasks/config/admin/templates/less-package.js +1 -1
- package/tasks/config/npm/gulpfile.js +7 -7
- package/tasks/config/project/config.js +14 -19
- package/tasks/config/project/install.js +35 -34
- package/tasks/config/project/release.js +15 -16
- package/tasks/config/tasks.js +18 -20
- package/tasks/config/user.js +5 -3
- package/tasks/docs/build.js +5 -3
- package/tasks/docs/metadata.js +7 -8
- package/tasks/docs/serve.js +6 -3
- package/tasks/install.js +39 -39
- 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/test/.eslintrc.js +0 -4
- package/test/meteor/assets.js +1 -1
- package/test/modules/module.spec.js +15 -15
- package/test/modules/popup.spec.js +1 -1
- package/test/modules/search.spec.js +1 -1
- package/test/modules/tab.spec.js +1 -1
- package/test/modules/transition.spec.js +1 -1
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -25,11 +25,11 @@
|
|
25
25
|
|
26
26
|
moduleSelector = $allModules.selector || '',
|
27
27
|
|
28
|
-
time =
|
28
|
+
time = Date.now(),
|
29
29
|
performance = [],
|
30
30
|
|
31
31
|
query = arguments[0],
|
32
|
-
methodInvoked =
|
32
|
+
methodInvoked = typeof query === 'string',
|
33
33
|
queryArguments = [].slice.call(arguments, 1),
|
34
34
|
|
35
35
|
returnedValue
|
@@ -37,7 +37,7 @@
|
|
37
37
|
|
38
38
|
$allModules.each(function () {
|
39
39
|
var
|
40
|
-
settings =
|
40
|
+
settings = $.isPlainObject(parameters)
|
41
41
|
? $.extend(true, {}, $.fn.embed.settings, parameters)
|
42
42
|
: $.extend({}, $.fn.embed.settings),
|
43
43
|
|
@@ -206,32 +206,26 @@
|
|
206
206
|
return settings.placeholder || $module.data(metadata.placeholder);
|
207
207
|
},
|
208
208
|
icon: function () {
|
209
|
-
return
|
210
|
-
?
|
211
|
-
:
|
212
|
-
? $module.data(metadata.icon)
|
213
|
-
: module.determine.icon();
|
209
|
+
return settings.icon || ($module.data(metadata.icon) !== undefined
|
210
|
+
? $module.data(metadata.icon)
|
211
|
+
: module.determine.icon());
|
214
212
|
},
|
215
213
|
source: function (url) {
|
216
|
-
return
|
217
|
-
?
|
218
|
-
:
|
219
|
-
? $module.data(metadata.source)
|
220
|
-
: module.determine.source();
|
214
|
+
return settings.source || ($module.data(metadata.source) !== undefined
|
215
|
+
? $module.data(metadata.source)
|
216
|
+
: module.determine.source());
|
221
217
|
},
|
222
218
|
type: function () {
|
223
219
|
var source = module.get.source();
|
224
220
|
|
225
|
-
return
|
221
|
+
return sources[source] !== undefined
|
226
222
|
? sources[source].type
|
227
223
|
: false;
|
228
224
|
},
|
229
225
|
url: function () {
|
230
|
-
return
|
231
|
-
?
|
232
|
-
:
|
233
|
-
? $module.data(metadata.url)
|
234
|
-
: module.determine.url();
|
226
|
+
return settings.url || ($module.data(metadata.url) !== undefined
|
227
|
+
? $module.data(metadata.url)
|
228
|
+
: module.determine.url());
|
235
229
|
},
|
236
230
|
},
|
237
231
|
|
@@ -263,7 +257,7 @@
|
|
263
257
|
source = module.get.source()
|
264
258
|
;
|
265
259
|
|
266
|
-
return
|
260
|
+
return sources[source] !== undefined
|
267
261
|
? sources[source].icon
|
268
262
|
: false;
|
269
263
|
},
|
@@ -273,7 +267,7 @@
|
|
273
267
|
source = settings.source || $module.data(metadata.source),
|
274
268
|
url
|
275
269
|
;
|
276
|
-
url =
|
270
|
+
url = sources[source] !== undefined
|
277
271
|
? sources[source].url.replace('{id}', id)
|
278
272
|
: false;
|
279
273
|
if (url) {
|
@@ -342,7 +336,7 @@
|
|
342
336
|
},
|
343
337
|
parameters: function (source, extraParameters) {
|
344
338
|
var
|
345
|
-
parameters =
|
339
|
+
parameters = sources[source] && sources[source].parameters !== undefined
|
346
340
|
? sources[source].parameters(settings)
|
347
341
|
: {}
|
348
342
|
;
|
@@ -358,7 +352,7 @@
|
|
358
352
|
|
359
353
|
has: {
|
360
354
|
embed: function () {
|
361
|
-
return
|
355
|
+
return $embed.length > 0;
|
362
356
|
},
|
363
357
|
placeholder: function () {
|
364
358
|
return settings.placeholder || $module.data(metadata.placeholder);
|
@@ -367,8 +361,8 @@
|
|
367
361
|
|
368
362
|
should: {
|
369
363
|
autoplay: function () {
|
370
|
-
return
|
371
|
-
?
|
364
|
+
return settings.autoplay === 'auto'
|
365
|
+
? settings.placeholder || $module.data(metadata.placeholder) !== undefined
|
372
366
|
: settings.autoplay;
|
373
367
|
},
|
374
368
|
},
|
@@ -436,7 +430,7 @@
|
|
436
430
|
previousTime
|
437
431
|
;
|
438
432
|
if (settings.performance) {
|
439
|
-
currentTime =
|
433
|
+
currentTime = Date.now();
|
440
434
|
previousTime = time || currentTime;
|
441
435
|
executionTime = currentTime - previousTime;
|
442
436
|
time = currentTime;
|
@@ -465,7 +459,7 @@
|
|
465
459
|
title += ' \'' + moduleSelector + '\'';
|
466
460
|
}
|
467
461
|
if ($allModules.length > 1) {
|
468
|
-
title += '
|
462
|
+
title += ' (' + $allModules.length + ')';
|
469
463
|
}
|
470
464
|
if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
|
471
465
|
console.groupCollapsed(title);
|
@@ -490,11 +484,11 @@
|
|
490
484
|
;
|
491
485
|
passedArguments = passedArguments || queryArguments;
|
492
486
|
context = context || element;
|
493
|
-
if (typeof query
|
494
|
-
query = query.split(/[
|
487
|
+
if (typeof query === 'string' && object !== undefined) {
|
488
|
+
query = query.split(/[ .]/);
|
495
489
|
maxDepth = query.length - 1;
|
496
490
|
$.each(query, function (depth, value) {
|
497
|
-
var camelCaseValue =
|
491
|
+
var camelCaseValue = depth != maxDepth
|
498
492
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
499
493
|
: query
|
500
494
|
;
|
@@ -547,7 +541,7 @@
|
|
547
541
|
}
|
548
542
|
});
|
549
543
|
|
550
|
-
return
|
544
|
+
return returnedValue !== undefined
|
551
545
|
? returnedValue
|
552
546
|
: this;
|
553
547
|
};
|
@@ -15,11 +15,11 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
22
|
-
$.
|
22
|
+
$.fn.flyout = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
25
|
$window = $(window),
|
@@ -30,11 +30,11 @@
|
|
30
30
|
|
31
31
|
moduleSelector = $allModules.selector || '',
|
32
32
|
|
33
|
-
time =
|
33
|
+
time = Date.now(),
|
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
|
requestAnimationFrame = window.requestAnimationFrame
|
@@ -50,7 +50,7 @@
|
|
50
50
|
|
51
51
|
$allModules.each(function () {
|
52
52
|
var
|
53
|
-
settings =
|
53
|
+
settings = $.isPlainObject(parameters)
|
54
54
|
? $.extend(true, {}, $.fn.flyout.settings, parameters)
|
55
55
|
: $.extend({}, $.fn.flyout.settings),
|
56
56
|
|
@@ -128,10 +128,14 @@
|
|
128
128
|
}
|
129
129
|
settings.actions.forEach(function (el) {
|
130
130
|
var
|
131
|
-
icon = el[fields.icon]
|
131
|
+
icon = el[fields.icon]
|
132
|
+
? '<i ' + (el[fields.text] ? 'aria-hidden="true"' : '') + ' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>'
|
133
|
+
: '',
|
132
134
|
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
133
135
|
cls = module.helpers.deQuote(el[fields.class] || ''),
|
134
|
-
click = el[fields.click] && isFunction(el[fields.click])
|
136
|
+
click = el[fields.click] && isFunction(el[fields.click])
|
137
|
+
? el[fields.click]
|
138
|
+
: function () {}
|
135
139
|
;
|
136
140
|
$actions.append($('<button/>', {
|
137
141
|
html: icon + text,
|
@@ -262,8 +266,8 @@
|
|
262
266
|
clickaway: function (event) {
|
263
267
|
if (settings.closable) {
|
264
268
|
var
|
265
|
-
clickedInPusher =
|
266
|
-
clickedContext =
|
269
|
+
clickedInPusher = $pusher.find(event.target).length > 0 || $pusher.is(event.target),
|
270
|
+
clickedContext = $context.is(event.target)
|
267
271
|
;
|
268
272
|
if (clickedInPusher) {
|
269
273
|
module.verbose('User clicked on dimmed page');
|
@@ -652,13 +656,13 @@
|
|
652
656
|
},
|
653
657
|
|
654
658
|
othersAnimating: function () {
|
655
|
-
return
|
659
|
+
return $flyouts.not($module).filter('.' + className.animating).length > 0;
|
656
660
|
},
|
657
661
|
othersVisible: function () {
|
658
|
-
return
|
662
|
+
return $flyouts.not($module).filter('.' + className.visible).length > 0;
|
659
663
|
},
|
660
664
|
othersActive: function () {
|
661
|
-
return
|
665
|
+
return module.othersVisible() || module.othersAnimating();
|
662
666
|
},
|
663
667
|
|
664
668
|
hideOthers: function (callback) {
|
@@ -794,7 +798,7 @@
|
|
794
798
|
autofocus: function () {
|
795
799
|
var
|
796
800
|
$autofocus = $inputs.filter('[autofocus]'),
|
797
|
-
$input =
|
801
|
+
$input = $autofocus.length > 0
|
798
802
|
? $autofocus.first()
|
799
803
|
: ($inputs.length > 1 ? $inputs.filter(':not(i.close)') : $inputs).first()
|
800
804
|
;
|
@@ -915,9 +919,11 @@
|
|
915
919
|
direction: function () {
|
916
920
|
if ($module.hasClass(className.top)) {
|
917
921
|
return className.top;
|
918
|
-
}
|
922
|
+
}
|
923
|
+
if ($module.hasClass(className.right)) {
|
919
924
|
return className.right;
|
920
|
-
}
|
925
|
+
}
|
926
|
+
if ($module.hasClass(className.bottom)) {
|
921
927
|
return className.bottom;
|
922
928
|
}
|
923
929
|
|
@@ -974,7 +980,7 @@
|
|
974
980
|
bodyMargin: function () {
|
975
981
|
initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
|
976
982
|
var
|
977
|
-
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
|
983
|
+
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
|
978
984
|
bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
|
979
985
|
;
|
980
986
|
tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
|
@@ -1009,10 +1015,10 @@
|
|
1009
1015
|
ie: function () {
|
1010
1016
|
if (module.cache.isIE === undefined) {
|
1011
1017
|
var
|
1012
|
-
isIE11 =
|
1013
|
-
isIE =
|
1018
|
+
isIE11 = !window.ActiveXObject && 'ActiveXObject' in window,
|
1019
|
+
isIE = 'ActiveXObject' in window
|
1014
1020
|
;
|
1015
|
-
module.cache.isIE =
|
1021
|
+
module.cache.isIE = isIE11 || isIE;
|
1016
1022
|
}
|
1017
1023
|
|
1018
1024
|
return module.cache.isIE;
|
@@ -1027,9 +1033,9 @@
|
|
1027
1033
|
module.verbose('Browser was found to be iOS', userAgent);
|
1028
1034
|
|
1029
1035
|
return true;
|
1030
|
-
} else {
|
1031
|
-
return false;
|
1032
1036
|
}
|
1037
|
+
|
1038
|
+
return false;
|
1033
1039
|
},
|
1034
1040
|
mobile: function () {
|
1035
1041
|
var
|
@@ -1040,11 +1046,11 @@
|
|
1040
1046
|
module.verbose('Browser was found to be mobile', userAgent);
|
1041
1047
|
|
1042
1048
|
return true;
|
1043
|
-
} else {
|
1044
|
-
module.verbose('Browser is not mobile, using regular transition', userAgent);
|
1045
|
-
|
1046
|
-
return false;
|
1047
1049
|
}
|
1050
|
+
|
1051
|
+
module.verbose('Browser is not mobile, using regular transition', userAgent);
|
1052
|
+
|
1053
|
+
return false;
|
1048
1054
|
},
|
1049
1055
|
hidden: function () {
|
1050
1056
|
return !module.is.visible();
|
@@ -1101,8 +1107,8 @@
|
|
1101
1107
|
return string;
|
1102
1108
|
}
|
1103
1109
|
var
|
1104
|
-
badChars = /[
|
1105
|
-
shouldEscape = /[
|
1110
|
+
badChars = /["'<>`]/g,
|
1111
|
+
shouldEscape = /["&'<>`]/,
|
1106
1112
|
escape = {
|
1107
1113
|
'<': '<',
|
1108
1114
|
'>': '>',
|
@@ -1115,7 +1121,7 @@
|
|
1115
1121
|
}
|
1116
1122
|
;
|
1117
1123
|
if (shouldEscape.test(string)) {
|
1118
|
-
string = string.replace(/&(?![a-
|
1124
|
+
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
1119
1125
|
|
1120
1126
|
return string.replace(badChars, escapedChar);
|
1121
1127
|
}
|
@@ -1181,7 +1187,7 @@
|
|
1181
1187
|
previousTime
|
1182
1188
|
;
|
1183
1189
|
if (settings.performance) {
|
1184
|
-
currentTime =
|
1190
|
+
currentTime = Date.now();
|
1185
1191
|
previousTime = time || currentTime;
|
1186
1192
|
executionTime = currentTime - previousTime;
|
1187
1193
|
time = currentTime;
|
@@ -1232,11 +1238,11 @@
|
|
1232
1238
|
;
|
1233
1239
|
passedArguments = passedArguments || queryArguments;
|
1234
1240
|
context = element || context;
|
1235
|
-
if (typeof query
|
1236
|
-
query = query.split(/[
|
1241
|
+
if (typeof query === 'string' && object !== undefined) {
|
1242
|
+
query = query.split(/[ .]/);
|
1237
1243
|
maxDepth = query.length - 1;
|
1238
1244
|
$.each(query, function (depth, value) {
|
1239
|
-
var camelCaseValue =
|
1245
|
+
var camelCaseValue = depth != maxDepth
|
1240
1246
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1241
1247
|
: query
|
1242
1248
|
;
|
@@ -1303,10 +1309,11 @@
|
|
1303
1309
|
}
|
1304
1310
|
});
|
1305
1311
|
|
1306
|
-
return
|
1312
|
+
return returnedValue !== undefined
|
1307
1313
|
? returnedValue
|
1308
1314
|
: this;
|
1309
1315
|
};
|
1316
|
+
$.flyout = $.fn.flyout;
|
1310
1317
|
|
1311
1318
|
$.fn.flyout.settings = {
|
1312
1319
|
|
@@ -1440,17 +1447,16 @@
|
|
1440
1447
|
content: '',
|
1441
1448
|
title: '',
|
1442
1449
|
}, queryArguments[0]);
|
1443
|
-
} else {
|
1444
|
-
if (!isFunction(queryArguments[queryArguments.length - 1])) {
|
1445
|
-
queryArguments.push(function () {});
|
1446
|
-
}
|
1447
|
-
|
1448
|
-
return {
|
1449
|
-
handler: queryArguments.pop(),
|
1450
|
-
content: queryArguments.pop() || '',
|
1451
|
-
title: queryArguments.pop() || '',
|
1452
|
-
};
|
1453
1450
|
}
|
1451
|
+
if (!isFunction(queryArguments[queryArguments.length - 1])) {
|
1452
|
+
queryArguments.push(function () {});
|
1453
|
+
}
|
1454
|
+
|
1455
|
+
return {
|
1456
|
+
handler: queryArguments.pop(),
|
1457
|
+
content: queryArguments.pop() || '',
|
1458
|
+
title: queryArguments.pop() || '',
|
1459
|
+
};
|
1454
1460
|
},
|
1455
1461
|
alert: function () {
|
1456
1462
|
var
|
@@ -15,11 +15,11 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
22
|
-
$.
|
22
|
+
$.fn.modal = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
25
|
$window = $(window),
|
@@ -28,11 +28,11 @@
|
|
28
28
|
|
29
29
|
moduleSelector = $allModules.selector || '',
|
30
30
|
|
31
|
-
time =
|
31
|
+
time = Date.now(),
|
32
32
|
performance = [],
|
33
33
|
|
34
34
|
query = arguments[0],
|
35
|
-
methodInvoked =
|
35
|
+
methodInvoked = typeof query === 'string',
|
36
36
|
queryArguments = [].slice.call(arguments, 1),
|
37
37
|
|
38
38
|
requestAnimationFrame = window.requestAnimationFrame
|
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
$allModules.each(function () {
|
50
50
|
var
|
51
|
-
settings =
|
51
|
+
settings = $.isPlainObject(parameters)
|
52
52
|
? $.extend(true, {}, $.fn.modal.settings, parameters)
|
53
53
|
: $.extend({}, $.fn.modal.settings),
|
54
54
|
|
@@ -121,10 +121,14 @@
|
|
121
121
|
}
|
122
122
|
settings.actions.forEach(function (el) {
|
123
123
|
var
|
124
|
-
icon = el[fields.icon]
|
124
|
+
icon = el[fields.icon]
|
125
|
+
? '<i ' + (el[fields.text] ? 'aria-hidden="true"' : '') + ' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>'
|
126
|
+
: '',
|
125
127
|
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
126
128
|
cls = module.helpers.deQuote(el[fields.class] || ''),
|
127
|
-
click = el[fields.click] && isFunction(el[fields.click])
|
129
|
+
click = el[fields.click] && isFunction(el[fields.click])
|
130
|
+
? el[fields.click]
|
131
|
+
: function () {}
|
128
132
|
;
|
129
133
|
$actions.append($('<button/>', {
|
130
134
|
html: icon + text,
|
@@ -422,7 +426,7 @@
|
|
422
426
|
$target = $(event.target),
|
423
427
|
isRtl = module.is.rtl()
|
424
428
|
;
|
425
|
-
initialMouseDownInModal =
|
429
|
+
initialMouseDownInModal = $target.closest(selector.modal).length > 0;
|
426
430
|
if (initialMouseDownInModal) {
|
427
431
|
module.verbose('Mouse down event registered inside the modal');
|
428
432
|
}
|
@@ -449,7 +453,7 @@
|
|
449
453
|
}
|
450
454
|
var
|
451
455
|
$target = $(event.target),
|
452
|
-
isInModal =
|
456
|
+
isInModal = $target.closest(selector.modal).length > 0,
|
453
457
|
isInDOM = $.contains(document.documentElement, event.target)
|
454
458
|
;
|
455
459
|
if (!isInModal && isInDOM && module.is.active() && $module.hasClass(className.front)) {
|
@@ -672,7 +676,7 @@
|
|
672
676
|
},
|
673
677
|
|
674
678
|
hideDimmer: function () {
|
675
|
-
if ($dimmable.dimmer('is animating') ||
|
679
|
+
if ($dimmable.dimmer('is animating') || $dimmable.dimmer('is active')) {
|
676
680
|
module.unbind.scrollLock();
|
677
681
|
$dimmable.dimmer('hide', function () {
|
678
682
|
if (hadScrollbar) {
|
@@ -727,10 +731,10 @@
|
|
727
731
|
|
728
732
|
others: {
|
729
733
|
active: function () {
|
730
|
-
return
|
734
|
+
return $otherModals.filter('.' + className.active).length > 0;
|
731
735
|
},
|
732
736
|
animating: function () {
|
733
|
-
return
|
737
|
+
return $otherModals.filter('.' + className.animating).length > 0;
|
734
738
|
},
|
735
739
|
},
|
736
740
|
|
@@ -756,7 +760,7 @@
|
|
756
760
|
bodyMargin: function () {
|
757
761
|
initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
|
758
762
|
var
|
759
|
-
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
|
763
|
+
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
|
760
764
|
bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
|
761
765
|
;
|
762
766
|
tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
|
@@ -864,8 +868,8 @@
|
|
864
868
|
return string;
|
865
869
|
}
|
866
870
|
var
|
867
|
-
badChars = /[
|
868
|
-
shouldEscape = /[
|
871
|
+
badChars = /["'<>`]/g,
|
872
|
+
shouldEscape = /["&'<>`]/,
|
869
873
|
escape = {
|
870
874
|
'<': '<',
|
871
875
|
'>': '>',
|
@@ -878,7 +882,7 @@
|
|
878
882
|
}
|
879
883
|
;
|
880
884
|
if (shouldEscape.test(string)) {
|
881
|
-
string = string.replace(/&(?![a-
|
885
|
+
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
882
886
|
|
883
887
|
return string.replace(badChars, escapedChar);
|
884
888
|
}
|
@@ -914,12 +918,12 @@
|
|
914
918
|
scrollHeight = module.cache.scrollHeight,
|
915
919
|
height = module.cache.height,
|
916
920
|
paddingHeight = settings.padding,
|
917
|
-
startPosition =
|
921
|
+
startPosition = verticalCenter + topOffset
|
918
922
|
;
|
919
923
|
|
920
|
-
return
|
921
|
-
?
|
922
|
-
:
|
924
|
+
return scrollHeight > height
|
925
|
+
? startPosition + scrollHeight + paddingHeight < contextHeight
|
926
|
+
: height + (paddingHeight * 2) < contextHeight;
|
923
927
|
},
|
924
928
|
},
|
925
929
|
has: {
|
@@ -937,10 +941,10 @@
|
|
937
941
|
ie: function () {
|
938
942
|
if (module.cache.isIE === undefined) {
|
939
943
|
var
|
940
|
-
isIE11 =
|
941
|
-
isIE =
|
944
|
+
isIE11 = !window.ActiveXObject && 'ActiveXObject' in window,
|
945
|
+
isIE = 'ActiveXObject' in window
|
942
946
|
;
|
943
|
-
module.cache.isIE =
|
947
|
+
module.cache.isIE = isIE11 || isIE;
|
944
948
|
}
|
945
949
|
|
946
950
|
return module.cache.isIE;
|
@@ -994,7 +998,7 @@
|
|
994
998
|
autofocus: function () {
|
995
999
|
var
|
996
1000
|
$autofocus = $inputs.filter('[autofocus]'),
|
997
|
-
$input =
|
1001
|
+
$input = $autofocus.length > 0
|
998
1002
|
? $autofocus.first()
|
999
1003
|
: ($inputs.length > 1 ? $inputs.filter(':not(i.close)') : $inputs).first()
|
1000
1004
|
;
|
@@ -1048,7 +1052,7 @@
|
|
1048
1052
|
dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)
|
1049
1053
|
;
|
1050
1054
|
if (settings.inverted) {
|
1051
|
-
dimmerSettings.variation =
|
1055
|
+
dimmerSettings.variation = dimmerSettings.variation !== undefined
|
1052
1056
|
? dimmerSettings.variation + ' inverted'
|
1053
1057
|
: 'inverted';
|
1054
1058
|
}
|
@@ -1071,18 +1075,18 @@
|
|
1071
1075
|
var canFit = module.can.fit();
|
1072
1076
|
$module
|
1073
1077
|
.css({
|
1074
|
-
top:
|
1078
|
+
top: !$module.hasClass('aligned') && canFit
|
1075
1079
|
? $document.scrollTop() + (module.cache.contextHeight - module.cache.height) / 2
|
1076
|
-
: !canFit || $module.hasClass('top')
|
1080
|
+
: (!canFit || $module.hasClass('top')
|
1077
1081
|
? $document.scrollTop() + settings.padding
|
1078
|
-
: $document.scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
|
1082
|
+
: $document.scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding)),
|
1079
1083
|
marginLeft: -(module.cache.width / 2),
|
1080
1084
|
})
|
1081
1085
|
;
|
1082
1086
|
} else {
|
1083
1087
|
$module
|
1084
1088
|
.css({
|
1085
|
-
marginTop:
|
1089
|
+
marginTop: !$module.hasClass('aligned') && module.can.fit()
|
1086
1090
|
? -(module.cache.height / 2)
|
1087
1091
|
: settings.padding / 2,
|
1088
1092
|
marginLeft: -(module.cache.width / 2),
|
@@ -1189,7 +1193,7 @@
|
|
1189
1193
|
previousTime
|
1190
1194
|
;
|
1191
1195
|
if (settings.performance) {
|
1192
|
-
currentTime =
|
1196
|
+
currentTime = Date.now();
|
1193
1197
|
previousTime = time || currentTime;
|
1194
1198
|
executionTime = currentTime - previousTime;
|
1195
1199
|
time = currentTime;
|
@@ -1240,11 +1244,11 @@
|
|
1240
1244
|
;
|
1241
1245
|
passedArguments = passedArguments || queryArguments;
|
1242
1246
|
context = context || element;
|
1243
|
-
if (typeof query
|
1244
|
-
query = query.split(/[
|
1247
|
+
if (typeof query === 'string' && object !== undefined) {
|
1248
|
+
query = query.split(/[ .]/);
|
1245
1249
|
maxDepth = query.length - 1;
|
1246
1250
|
$.each(query, function (depth, value) {
|
1247
|
-
var camelCaseValue =
|
1251
|
+
var camelCaseValue = depth != maxDepth
|
1248
1252
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1249
1253
|
: query;
|
1250
1254
|
if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
|
@@ -1308,10 +1312,11 @@
|
|
1308
1312
|
}
|
1309
1313
|
});
|
1310
1314
|
|
1311
|
-
return
|
1315
|
+
return returnedValue !== undefined
|
1312
1316
|
? returnedValue
|
1313
1317
|
: this;
|
1314
1318
|
};
|
1319
|
+
$.modal = $.fn.modal;
|
1315
1320
|
|
1316
1321
|
$.fn.modal.settings = {
|
1317
1322
|
|
@@ -1463,17 +1468,16 @@
|
|
1463
1468
|
content: '',
|
1464
1469
|
title: '',
|
1465
1470
|
}, queryArguments[0]);
|
1466
|
-
} else {
|
1467
|
-
if (!isFunction(queryArguments[queryArguments.length - 1])) {
|
1468
|
-
queryArguments.push(function () {});
|
1469
|
-
}
|
1470
|
-
|
1471
|
-
return {
|
1472
|
-
handler: queryArguments.pop(),
|
1473
|
-
content: queryArguments.pop() || '',
|
1474
|
-
title: queryArguments.pop() || '',
|
1475
|
-
};
|
1476
1471
|
}
|
1472
|
+
if (!isFunction(queryArguments[queryArguments.length - 1])) {
|
1473
|
+
queryArguments.push(function () {});
|
1474
|
+
}
|
1475
|
+
|
1476
|
+
return {
|
1477
|
+
handler: queryArguments.pop(),
|
1478
|
+
content: queryArguments.pop() || '',
|
1479
|
+
title: queryArguments.pop() || '',
|
1480
|
+
};
|
1477
1481
|
},
|
1478
1482
|
alert: function () {
|
1479
1483
|
var
|