fomantic-ui 2.10.0-beta.4 → 2.10.0-beta.40
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/.eslintrc.js +0 -10
- package/CHANGELOG.md +5289 -2325
- package/README.md +4 -5
- package/changelog-setup.js +85 -69
- package/changelog-template.hbs +256 -251
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +103 -142
- 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 +152 -205
- 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 -2
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +308 -346
- 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 +85 -127
- 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 +58 -91
- 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 +7 -5
- package/dist/components/dropdown.js +744 -1071
- 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 +83 -113
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +3809 -7617
- package/dist/components/emoji.min.css +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 +1 -1
- package/dist/components/flyout.js +225 -314
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +325 -429
- package/dist/components/form.min.css +1 -1
- 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 +2 -1
- 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 +40 -40
- 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 +3 -3
- package/dist/components/modal.js +259 -358
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +67 -97
- 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 +190 -264
- 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 +103 -138
- 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 +90 -123
- 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 +270 -373
- 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 +157 -223
- 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 +125 -165
- 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 +38 -57
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +242 -325
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +68 -98
- 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 +131 -176
- 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 +168 -233
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +8 -8
- package/dist/components/table.min.css +2 -2
- 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 +104 -143
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +86 -141
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +145 -223
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +3916 -7722
- package/dist/semantic.js +4324 -5973
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/assets/show-examples.js +2 -4
- package/examples/attached.html +1 -1
- package/examples/components/menu.html +1 -1
- package/gulpfile.js +5 -7
- package/package.json +1 -3
- package/scripts/nightly-version.js +7 -10
- package/src/definitions/behaviors/api.js +151 -204
- package/src/definitions/behaviors/form.js +324 -428
- package/src/definitions/behaviors/state.js +67 -97
- package/src/definitions/behaviors/visibility.js +144 -222
- package/src/definitions/collections/menu.less +101 -96
- package/src/definitions/collections/table.less +7 -7
- package/src/definitions/elements/button.less +0 -1
- package/src/definitions/elements/label.less +1 -0
- package/src/definitions/globals/site.js +37 -56
- package/src/definitions/modules/accordion.js +102 -141
- package/src/definitions/modules/calendar.js +307 -345
- package/src/definitions/modules/checkbox.js +84 -126
- package/src/definitions/modules/dimmer.js +57 -90
- package/src/definitions/modules/dropdown.js +743 -1070
- package/src/definitions/modules/dropdown.less +11 -5
- package/src/definitions/modules/embed.js +82 -112
- package/src/definitions/modules/flyout.js +224 -313
- package/src/definitions/modules/modal.js +258 -357
- package/src/definitions/modules/modal.less +1 -1
- package/src/definitions/modules/nag.js +66 -96
- package/src/definitions/modules/popup.js +189 -263
- package/src/definitions/modules/progress.js +102 -137
- package/src/definitions/modules/rating.js +89 -122
- package/src/definitions/modules/search.js +269 -372
- package/src/definitions/modules/shape.js +156 -222
- package/src/definitions/modules/sidebar.js +124 -164
- package/src/definitions/modules/slider.js +241 -324
- package/src/definitions/modules/sticky.js +130 -175
- package/src/definitions/modules/tab.js +167 -232
- package/src/definitions/modules/toast.js +103 -142
- package/src/definitions/modules/transition.js +85 -140
- package/src/themes/chubby/collections/menu.variables +1 -1
- package/src/themes/default/collections/menu.variables +23 -23
- package/src/themes/default/globals/variation.variables +3 -2
- package/src/themes/default/modules/dropdown.variables +1 -0
- package/src/themes/default/modules/modal.variables +1 -1
- package/tasks/admin/components/create.js +88 -108
- package/tasks/admin/components/init.js +26 -32
- package/tasks/admin/components/update.js +46 -53
- package/tasks/admin/distributions/create.js +71 -101
- package/tasks/admin/distributions/init.js +27 -33
- package/tasks/admin/distributions/update.js +45 -52
- package/tasks/admin/register.js +11 -15
- package/tasks/build/assets.js +14 -18
- package/tasks/build/css.js +54 -63
- package/tasks/build/javascript.js +45 -53
- package/tasks/build.js +4 -6
- package/tasks/check-install.js +5 -7
- package/tasks/clean.js +2 -4
- package/tasks/collections/admin.js +13 -15
- package/tasks/collections/build.js +6 -8
- package/tasks/collections/docs.js +2 -4
- package/tasks/collections/install.js +2 -4
- package/tasks/collections/rtl.js +2 -4
- package/tasks/collections/various.js +2 -4
- package/tasks/config/admin/github.js +7 -9
- package/tasks/config/admin/templates/css-package.js +1 -3
- package/tasks/config/admin/templates/less-package.js +1 -3
- package/tasks/config/defaults.js +0 -1
- package/tasks/config/npm/gulpfile.js +4 -6
- package/tasks/config/project/config.js +22 -30
- package/tasks/config/project/install.js +61 -78
- package/tasks/config/project/release.js +6 -8
- package/tasks/config/tasks.js +8 -12
- package/tasks/config/user.js +13 -17
- package/tasks/docs/build.js +26 -31
- package/tasks/docs/metadata.js +24 -30
- package/tasks/docs/serve.js +20 -26
- package/tasks/install.js +81 -109
- package/tasks/rtl/build.js +2 -4
- package/tasks/rtl/watch.js +2 -4
- package/tasks/watch.js +9 -11
- package/test/meteor/fonts.js +1 -2
- package/test/modules/module.spec.js +16 -18
- package/types/fomantic-ui-dropdown.d.ts +44 -0
- package/types/fomantic-ui-embed.d.ts +1 -1
- package/types/fomantic-ui-search.d.ts +6 -6
@@ -20,71 +20,69 @@
|
|
20
20
|
: globalThis;
|
21
21
|
|
22
22
|
$.fn.sidebar = function (parameters) {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
$context = win.frameElement ? contextCheck(context, win.parent) : $body;
|
45
|
-
}
|
23
|
+
let $allModules = $(this);
|
24
|
+
let $window = $(window);
|
25
|
+
let $document = $(document);
|
26
|
+
let $body = $('body');
|
27
|
+
let $html = $('html');
|
28
|
+
let $head = $('head');
|
29
|
+
|
30
|
+
let time = Date.now();
|
31
|
+
let performance = [];
|
32
|
+
|
33
|
+
let query = arguments[0];
|
34
|
+
let methodInvoked = typeof query === 'string';
|
35
|
+
let queryArguments = [].slice.call(arguments, 1);
|
36
|
+
let contextCheck = function (context, win) {
|
37
|
+
let $context;
|
38
|
+
if ([window, document].indexOf(context) >= 0) {
|
39
|
+
$context = $body;
|
40
|
+
} else {
|
41
|
+
$context = $(win.document).find(context);
|
42
|
+
if ($context.length === 0) {
|
43
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : $body;
|
46
44
|
}
|
45
|
+
}
|
47
46
|
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
return $context;
|
48
|
+
};
|
49
|
+
let returnedValue;
|
51
50
|
|
52
51
|
$allModules.each(function () {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
;
|
52
|
+
let settings = $.isPlainObject(parameters)
|
53
|
+
? $.extend(true, {}, $.fn.sidebar.settings, parameters)
|
54
|
+
: $.extend({}, $.fn.sidebar.settings);
|
55
|
+
|
56
|
+
let selector = settings.selector;
|
57
|
+
let className = settings.className;
|
58
|
+
let namespace = settings.namespace;
|
59
|
+
let regExp = settings.regExp;
|
60
|
+
let error = settings.error;
|
61
|
+
|
62
|
+
let eventNamespace = '.' + namespace;
|
63
|
+
let moduleNamespace = 'module-' + namespace;
|
64
|
+
|
65
|
+
let $module = $(this);
|
66
|
+
let $context = contextCheck(settings.context, window);
|
67
|
+
let isBody = $context[0] === $body[0];
|
68
|
+
|
69
|
+
let $sidebars = $module.children(selector.sidebar);
|
70
|
+
let $fixed = $context.children(selector.fixed);
|
71
|
+
let $pusher = $context.children(selector.pusher);
|
72
|
+
let $style;
|
73
|
+
|
74
|
+
let element = this;
|
75
|
+
let instance = $module.data(moduleNamespace);
|
76
|
+
|
77
|
+
let elementNamespace;
|
78
|
+
let id;
|
79
|
+
let currentScroll;
|
80
|
+
let initialBodyMargin = '';
|
81
|
+
let initialBodyMarginInt = 0;
|
82
|
+
let tempBodyMargin = 0;
|
83
|
+
let hadScrollbar = false;
|
84
|
+
|
85
|
+
let module;
|
88
86
|
|
89
87
|
module = {
|
90
88
|
|
@@ -111,8 +109,7 @@
|
|
111
109
|
module.verbose('Storing instance of module', module);
|
112
110
|
instance = module;
|
113
111
|
$module
|
114
|
-
.data(moduleNamespace, module)
|
115
|
-
;
|
112
|
+
.data(moduleNamespace, module);
|
116
113
|
},
|
117
114
|
|
118
115
|
create: {
|
@@ -127,8 +124,7 @@
|
|
127
124
|
module.verbose('Destroying previous module for', $module);
|
128
125
|
$module
|
129
126
|
.off(eventNamespace)
|
130
|
-
.removeData(moduleNamespace)
|
131
|
-
;
|
127
|
+
.removeData(moduleNamespace);
|
132
128
|
// bound by uuid
|
133
129
|
$context.off(elementNamespace);
|
134
130
|
$window.off(elementNamespace);
|
@@ -138,10 +134,8 @@
|
|
138
134
|
event: {
|
139
135
|
clickaway: function (event) {
|
140
136
|
if (settings.closable) {
|
141
|
-
|
142
|
-
|
143
|
-
clickedContext = $context.is(event.target)
|
144
|
-
;
|
137
|
+
let clickedInPusher = $pusher.find(event.target).length > 0 || $pusher.is(event.target);
|
138
|
+
let clickedContext = $context.is(event.target);
|
145
139
|
if (clickedInPusher) {
|
146
140
|
module.verbose('User clicked on dimmed page');
|
147
141
|
module.hide();
|
@@ -175,8 +169,7 @@
|
|
175
169
|
module.verbose('Adding clickaway events to context', $context);
|
176
170
|
$context
|
177
171
|
.on('click' + elementNamespace, module.event.clickaway)
|
178
|
-
.on('touchend' + elementNamespace, module.event.clickaway)
|
179
|
-
;
|
172
|
+
.on('touchend' + elementNamespace, module.event.clickaway);
|
180
173
|
},
|
181
174
|
scrollLock: function () {
|
182
175
|
if (settings.scrollLock) {
|
@@ -190,11 +183,9 @@
|
|
190
183
|
}
|
191
184
|
module.verbose('Adding events to contain sidebar scroll');
|
192
185
|
$document
|
193
|
-
.on('touchmove' + elementNamespace, module.event.touch)
|
194
|
-
;
|
186
|
+
.on('touchmove' + elementNamespace, module.event.touch);
|
195
187
|
$module
|
196
|
-
.on('scroll' + eventNamespace, module.event.containScroll)
|
197
|
-
;
|
188
|
+
.on('scroll' + eventNamespace, module.event.containScroll);
|
198
189
|
},
|
199
190
|
},
|
200
191
|
unbind: {
|
@@ -215,19 +206,17 @@
|
|
215
206
|
|
216
207
|
add: {
|
217
208
|
inlineCSS: function () {
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
style
|
230
|
-
;
|
209
|
+
let width = module.cache.width || $module.outerWidth();
|
210
|
+
let height = module.cache.height || $module.outerHeight();
|
211
|
+
let isRTL = module.is.rtl();
|
212
|
+
let direction = module.get.direction();
|
213
|
+
let distance = {
|
214
|
+
left: width,
|
215
|
+
right: -width,
|
216
|
+
top: height,
|
217
|
+
bottom: -height,
|
218
|
+
};
|
219
|
+
let style;
|
231
220
|
|
232
221
|
if (isRTL) {
|
233
222
|
module.verbose('RTL detected, flipping widths');
|
@@ -254,8 +243,7 @@
|
|
254
243
|
|
255
244
|
style += '</style>';
|
256
245
|
$style = $(style)
|
257
|
-
.appendTo($head)
|
258
|
-
;
|
246
|
+
.appendTo($head);
|
259
247
|
module.debug('Adding sizing css to head', $style);
|
260
248
|
},
|
261
249
|
},
|
@@ -277,7 +265,7 @@
|
|
277
265
|
repaint: function () {
|
278
266
|
module.verbose('Forcing repaint event');
|
279
267
|
element.style.display = 'none';
|
280
|
-
|
268
|
+
let ignored = element.offsetHeight;
|
281
269
|
element.scrollTop = element.scrollTop; // eslint-disable-line no-self-assign
|
282
270
|
element.style.display = '';
|
283
271
|
},
|
@@ -298,8 +286,7 @@
|
|
298
286
|
.children()
|
299
287
|
.not(selector.omitted)
|
300
288
|
.not($sidebars)
|
301
|
-
.wrapAll($pusher)
|
302
|
-
;
|
289
|
+
.wrapAll($pusher);
|
303
290
|
module.refresh();
|
304
291
|
}
|
305
292
|
if ($module.nextAll(selector.pusher).length === 0 || $module.nextAll(selector.pusher)[0] !== $pusher[0]) {
|
@@ -315,17 +302,14 @@
|
|
315
302
|
},
|
316
303
|
|
317
304
|
attachEvents: function (selector, event) {
|
318
|
-
|
319
|
-
$toggle = $(selector)
|
320
|
-
;
|
305
|
+
let $toggle = $(selector);
|
321
306
|
event = isFunction(module[event])
|
322
307
|
? module[event]
|
323
308
|
: module.toggle;
|
324
309
|
if ($toggle.length > 0) {
|
325
310
|
module.debug('Attaching sidebar events to element', selector, event);
|
326
311
|
$toggle
|
327
|
-
.on('click' + eventNamespace, event)
|
328
|
-
;
|
312
|
+
.on('click' + eventNamespace, event);
|
329
313
|
} else {
|
330
314
|
module.error(error.notFound, selector);
|
331
315
|
}
|
@@ -342,11 +326,9 @@
|
|
342
326
|
save: {
|
343
327
|
bodyMargin: function () {
|
344
328
|
initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
;
|
349
|
-
tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
|
329
|
+
initialBodyMarginInt = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10);
|
330
|
+
let bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth;
|
331
|
+
tempBodyMargin = initialBodyMarginInt + bodyScrollbarWidth;
|
350
332
|
},
|
351
333
|
},
|
352
334
|
show: function (callback) {
|
@@ -416,11 +398,9 @@
|
|
416
398
|
},
|
417
399
|
|
418
400
|
hideOthers: function (callback) {
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
callbackCount = 0
|
423
|
-
;
|
401
|
+
let $otherSidebars = $sidebars.not($module).filter('.' + className.visible);
|
402
|
+
let sidebarCount = $otherSidebars.length;
|
403
|
+
let callbackCount = 0;
|
424
404
|
callback = callback || function () {};
|
425
405
|
$otherSidebars
|
426
406
|
.sidebar('hide', function () {
|
@@ -428,8 +408,7 @@
|
|
428
408
|
if (callbackCount === sidebarCount) {
|
429
409
|
callback();
|
430
410
|
}
|
431
|
-
})
|
432
|
-
;
|
411
|
+
});
|
433
412
|
},
|
434
413
|
|
435
414
|
toggle: function () {
|
@@ -442,15 +421,13 @@
|
|
442
421
|
},
|
443
422
|
|
444
423
|
pushPage: function (callback) {
|
445
|
-
|
446
|
-
|
447
|
-
$
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
transitionEnd
|
453
|
-
;
|
424
|
+
let transition = module.get.transition();
|
425
|
+
let $transition = transition === 'overlay' || module.othersActive()
|
426
|
+
? $module
|
427
|
+
: $pusher;
|
428
|
+
let animate;
|
429
|
+
let dim;
|
430
|
+
let transitionEnd;
|
454
431
|
callback = isFunction(callback)
|
455
432
|
? callback
|
456
433
|
: function () {};
|
@@ -488,14 +465,12 @@
|
|
488
465
|
},
|
489
466
|
|
490
467
|
pullPage: function (callback) {
|
491
|
-
|
492
|
-
|
493
|
-
$
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
transitionEnd
|
498
|
-
;
|
468
|
+
let transition = module.get.transition();
|
469
|
+
let $transition = transition === 'overlay' || module.othersActive()
|
470
|
+
? $module
|
471
|
+
: $pusher;
|
472
|
+
let animate;
|
473
|
+
let transitionEnd;
|
499
474
|
callback = isFunction(callback)
|
500
475
|
? callback
|
501
476
|
: function () {};
|
@@ -553,13 +528,11 @@
|
|
553
528
|
|
554
529
|
set: {
|
555
530
|
bodyMargin: function () {
|
556
|
-
|
531
|
+
let position = module.can.leftBodyScrollbar() ? 'left' : 'right';
|
557
532
|
$context.css((isBody ? 'margin-' : 'padding-') + position, tempBodyMargin + 'px');
|
558
533
|
$context.find(selector.bodyFixed.replace('right', position)).each(function () {
|
559
|
-
|
560
|
-
|
561
|
-
attribute = el.css('position') === 'fixed' ? 'padding-' + position : position
|
562
|
-
;
|
534
|
+
let el = $(this);
|
535
|
+
let attribute = el.css('position') === 'fixed' ? 'padding-' + position : position;
|
563
536
|
el.css(attribute, 'calc(' + el.css(attribute) + ' + ' + tempBodyMargin + 'px)');
|
564
537
|
});
|
565
538
|
},
|
@@ -653,13 +626,11 @@
|
|
653
626
|
},
|
654
627
|
restore: {
|
655
628
|
bodyMargin: function () {
|
656
|
-
|
657
|
-
$context.css((isBody ? 'margin-' : 'padding-') + position, initialBodyMargin);
|
629
|
+
let position = module.can.leftBodyScrollbar() ? 'left' : 'right';
|
630
|
+
$context.css((isBody ? 'margin-' : 'padding-') + position, initialBodyMarginInt === 0 ? '' : initialBodyMargin);
|
658
631
|
$context.find(selector.bodyFixed.replace('right', position)).each(function () {
|
659
|
-
|
660
|
-
|
661
|
-
attribute = el.css('position') === 'fixed' ? 'padding-' + position : position
|
662
|
-
;
|
632
|
+
let el = $(this);
|
633
|
+
let attribute = el.css('position') === 'fixed' ? 'padding-' + position : position;
|
663
634
|
el.css(attribute, '');
|
664
635
|
});
|
665
636
|
},
|
@@ -679,10 +650,8 @@
|
|
679
650
|
return className.left;
|
680
651
|
},
|
681
652
|
transition: function () {
|
682
|
-
|
683
|
-
|
684
|
-
transition
|
685
|
-
;
|
653
|
+
let direction = module.get.direction();
|
654
|
+
let transition;
|
686
655
|
transition = module.is.mobile()
|
687
656
|
? (settings.mobileTransition === 'auto'
|
688
657
|
? settings.defaultTransition.mobile[direction]
|
@@ -719,10 +688,8 @@
|
|
719
688
|
return !(self === top);
|
720
689
|
},
|
721
690
|
mobile: function () {
|
722
|
-
|
723
|
-
|
724
|
-
isMobile = userAgent.match(regExp.mobile)
|
725
|
-
;
|
691
|
+
let userAgent = navigator.userAgent;
|
692
|
+
let isMobile = userAgent.match(regExp.mobile);
|
726
693
|
if (isMobile) {
|
727
694
|
module.verbose('Browser was found to be mobile', userAgent);
|
728
695
|
|
@@ -812,11 +779,9 @@
|
|
812
779
|
},
|
813
780
|
performance: {
|
814
781
|
log: function (message) {
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
previousTime
|
819
|
-
;
|
782
|
+
let currentTime;
|
783
|
+
let executionTime;
|
784
|
+
let previousTime;
|
820
785
|
if (settings.performance) {
|
821
786
|
currentTime = Date.now();
|
822
787
|
previousTime = time || currentTime;
|
@@ -835,10 +800,8 @@
|
|
835
800
|
}, 500);
|
836
801
|
},
|
837
802
|
display: function () {
|
838
|
-
|
839
|
-
|
840
|
-
totalTime = 0
|
841
|
-
;
|
803
|
+
let title = settings.name + ':';
|
804
|
+
let totalTime = 0;
|
842
805
|
time = false;
|
843
806
|
clearTimeout(module.performance.timer);
|
844
807
|
$.each(performance, function (index, data) {
|
@@ -860,22 +823,19 @@
|
|
860
823
|
},
|
861
824
|
},
|
862
825
|
invoke: function (query, passedArguments, context) {
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
response
|
868
|
-
;
|
826
|
+
let object = instance;
|
827
|
+
let maxDepth;
|
828
|
+
let found;
|
829
|
+
let response;
|
869
830
|
passedArguments = passedArguments || queryArguments;
|
870
831
|
context = context || element;
|
871
832
|
if (typeof query === 'string' && object !== undefined) {
|
872
833
|
query = query.split(/[ .]/);
|
873
834
|
maxDepth = query.length - 1;
|
874
835
|
$.each(query, function (depth, value) {
|
875
|
-
|
836
|
+
let camelCaseValue = depth !== maxDepth
|
876
837
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
877
|
-
: query
|
878
|
-
;
|
838
|
+
: query;
|
879
839
|
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
880
840
|
object = object[camelCaseValue];
|
881
841
|
} else if (object[camelCaseValue] !== undefined) {
|