fomantic-ui 2.10.0-beta.8 → 2.10.0-beta.81
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 +6 -23
- package/.github/workflows/ci.yml +9 -9
- package/.github/workflows/depsreview.yml +1 -1
- package/.github/workflows/nightly.yml +7 -5
- package/.github/workflows/release.yml +2 -2
- package/.stylelintrc.js +1 -15
- package/CHANGELOG.md +5289 -2325
- package/README.md +8 -4
- package/changelog-setup.js +32 -10
- package/changelog-template.hbs +256 -251
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +62 -73
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +3 -3
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +101 -161
- package/dist/components/api.min.js +3 -3
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +5 -6
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +3 -3
- package/dist/components/calendar.js +283 -332
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +3 -3
- 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 +58 -79
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +3 -3
- 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 +2 -2
- package/dist/components/dimmer.js +39 -52
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +3 -3
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +21 -35
- package/dist/components/dropdown.js +435 -531
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +3 -3
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +55 -68
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +3 -3
- 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 +149 -168
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +3 -3
- package/dist/components/form.css +3 -5
- package/dist/components/form.js +249 -269
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +3 -3
- package/dist/components/grid.css +2 -2
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +6 -6
- package/dist/components/header.min.css +2 -2
- package/dist/components/icon.css +10 -37
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +284 -12
- 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 +6 -14
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +3 -3
- package/dist/components/list.min.css +2 -2
- package/dist/components/loader.css +53 -53
- package/dist/components/loader.min.css +2 -2
- package/dist/components/menu.css +45 -60
- package/dist/components/menu.min.css +2 -2
- package/dist/components/message.css +2 -2
- package/dist/components/message.min.css +2 -2
- package/dist/components/modal.css +5 -5
- package/dist/components/modal.js +161 -170
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +3 -3
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +74 -88
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +3 -3
- package/dist/components/placeholder.css +2 -2
- package/dist/components/placeholder.min.css +2 -2
- package/dist/components/popup.css +19 -73
- package/dist/components/popup.js +105 -138
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +3 -3
- package/dist/components/progress.css +4 -13
- package/dist/components/progress.js +75 -97
- package/dist/components/progress.min.css +2 -2
- package/dist/components/progress.min.js +3 -3
- 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 +49 -61
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +3 -3
- package/dist/components/reset.css +48 -208
- package/dist/components/reset.min.css +2 -2
- package/dist/components/reveal.css +2 -5
- package/dist/components/reveal.min.css +2 -2
- package/dist/components/search.css +2 -3
- package/dist/components/search.js +178 -198
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +3 -3
- package/dist/components/segment.css +6 -6
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +59 -69
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +3 -3
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +81 -101
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +3 -3
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +37 -58
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +3 -3
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +169 -183
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +3 -3
- package/dist/components/state.js +45 -59
- package/dist/components/state.min.js +3 -3
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +4 -4
- package/dist/components/step.min.css +2 -2
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +95 -117
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +3 -3
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +83 -115
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +3 -3
- 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 +64 -74
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +3 -3
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +61 -85
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +3 -3
- package/dist/components/visibility.js +120 -140
- package/dist/components/visibility.min.js +3 -3
- package/dist/semantic.css +4480 -8222
- package/dist/semantic.js +2886 -3485
- package/dist/semantic.min.css +3 -3
- package/dist/semantic.min.js +3 -3
- package/examples/attached.html +1 -1
- package/examples/components/menu.html +1 -1
- package/package.json +8 -5
- package/scripts/nightly-version.js +4 -4
- package/src/definitions/behaviors/api.js +100 -160
- package/src/definitions/behaviors/form.js +248 -268
- package/src/definitions/behaviors/state.js +44 -58
- package/src/definitions/behaviors/visibility.js +119 -139
- package/src/definitions/collections/breadcrumb.less +0 -1
- package/src/definitions/collections/form.less +3 -9
- package/src/definitions/collections/grid.less +1 -2
- package/src/definitions/collections/menu.less +106 -117
- package/src/definitions/collections/message.less +1 -2
- package/src/definitions/collections/table.less +7 -8
- package/src/definitions/elements/button.less +4 -6
- package/src/definitions/elements/container.less +0 -1
- package/src/definitions/elements/divider.less +1 -2
- package/src/definitions/elements/emoji.less +1 -1
- package/src/definitions/elements/flag.less +1 -1
- package/src/definitions/elements/header.less +4 -5
- package/src/definitions/elements/icon.less +10 -37
- package/src/definitions/elements/image.less +0 -1
- package/src/definitions/elements/input.less +4 -7
- package/src/definitions/elements/label.less +5 -14
- package/src/definitions/elements/list.less +2 -3
- package/src/definitions/elements/loader.less +10 -11
- package/src/definitions/elements/placeholder.less +1 -2
- package/src/definitions/elements/rail.less +0 -1
- package/src/definitions/elements/reveal.less +1 -5
- package/src/definitions/elements/segment.less +5 -6
- package/src/definitions/elements/step.less +3 -4
- package/src/definitions/elements/text.less +0 -1
- package/src/definitions/globals/reset.less +0 -1
- package/src/definitions/globals/site.js +36 -57
- package/src/definitions/globals/site.less +0 -1
- package/src/definitions/modules/accordion.js +61 -72
- package/src/definitions/modules/accordion.less +0 -1
- package/src/definitions/modules/calendar.js +282 -331
- package/src/definitions/modules/calendar.less +2 -3
- package/src/definitions/modules/checkbox.js +57 -78
- package/src/definitions/modules/checkbox.less +0 -1
- package/src/definitions/modules/dimmer.js +38 -51
- package/src/definitions/modules/dimmer.less +1 -2
- package/src/definitions/modules/dropdown.js +434 -530
- package/src/definitions/modules/dropdown.less +27 -38
- package/src/definitions/modules/embed.js +54 -67
- package/src/definitions/modules/embed.less +0 -1
- package/src/definitions/modules/flyout.js +148 -167
- package/src/definitions/modules/flyout.less +0 -1
- package/src/definitions/modules/modal.js +160 -169
- package/src/definitions/modules/modal.less +3 -4
- package/src/definitions/modules/nag.js +73 -87
- package/src/definitions/modules/nag.less +0 -1
- package/src/definitions/modules/popup.js +104 -137
- package/src/definitions/modules/popup.less +18 -73
- package/src/definitions/modules/progress.js +74 -96
- package/src/definitions/modules/progress.less +3 -13
- package/src/definitions/modules/rating.js +48 -60
- package/src/definitions/modules/rating.less +0 -1
- package/src/definitions/modules/search.js +177 -197
- package/src/definitions/modules/search.less +2 -4
- package/src/definitions/modules/shape.js +58 -68
- package/src/definitions/modules/shape.less +0 -1
- package/src/definitions/modules/sidebar.js +80 -100
- package/src/definitions/modules/sidebar.less +0 -1
- package/src/definitions/modules/slider.js +168 -182
- package/src/definitions/modules/slider.less +0 -1
- package/src/definitions/modules/sticky.js +94 -116
- package/src/definitions/modules/sticky.less +0 -1
- package/src/definitions/modules/tab.js +82 -114
- package/src/definitions/modules/tab.less +0 -1
- package/src/definitions/modules/toast.js +63 -73
- package/src/definitions/modules/toast.less +0 -1
- package/src/definitions/modules/transition.js +60 -84
- package/src/definitions/modules/transition.less +1 -2
- package/src/definitions/views/ad.less +0 -1
- package/src/definitions/views/card.less +0 -1
- package/src/definitions/views/comment.less +0 -1
- package/src/definitions/views/feed.less +0 -1
- package/src/definitions/views/item.less +0 -1
- package/src/definitions/views/statistic.less +0 -1
- package/src/semantic.less +1 -1
- package/src/themes/amazon/elements/button.overrides +1 -1
- package/src/themes/amazon/elements/button.variables +5 -6
- package/src/themes/amazon/globals/site.variables +2 -3
- package/src/themes/bookish/elements/header.variables +2 -2
- package/src/themes/bootstrap3/elements/button.variables +4 -5
- package/src/themes/chubby/collections/menu.variables +1 -1
- package/src/themes/chubby/elements/button.overrides +4 -4
- package/src/themes/chubby/modules/accordion.overrides +1 -1
- package/src/themes/chubby/views/comment.overrides +2 -2
- package/src/themes/chubby/views/comment.variables +2 -2
- package/src/themes/classic/collections/table.variables +2 -2
- package/src/themes/classic/elements/button.variables +11 -11
- package/src/themes/classic/modules/progress.variables +2 -2
- package/src/themes/classic/views/card.variables +2 -2
- package/src/themes/default/collections/form.variables +2 -3
- package/src/themes/default/collections/menu.variables +28 -28
- package/src/themes/default/collections/message.variables +1 -1
- package/src/themes/default/collections/table.variables +4 -4
- package/src/themes/default/elements/button.variables +9 -10
- package/src/themes/default/elements/divider.variables +1 -1
- package/src/themes/default/elements/icon.variables +2 -2
- package/src/themes/default/elements/image.variables +1 -1
- package/src/themes/default/elements/input.variables +2 -2
- package/src/themes/default/elements/label.variables +4 -4
- package/src/themes/default/elements/list.variables +1 -1
- package/src/themes/default/elements/placeholder.variables +6 -6
- package/src/themes/default/elements/segment.variables +8 -8
- package/src/themes/default/globals/reset.overrides +45 -201
- package/src/themes/default/globals/site.variables +50 -50
- package/src/themes/default/globals/variation.variables +3 -2
- package/src/themes/default/modules/accordion.variables +0 -1
- package/src/themes/default/modules/checkbox.variables +1 -1
- package/src/themes/default/modules/dimmer.variables +12 -12
- package/src/themes/default/modules/dropdown.variables +17 -16
- package/src/themes/default/modules/embed.variables +2 -2
- package/src/themes/default/modules/flyout.variables +3 -3
- package/src/themes/default/modules/modal.variables +14 -14
- package/src/themes/default/modules/nag.variables +1 -1
- package/src/themes/default/modules/rating.variables +1 -1
- package/src/themes/default/modules/search.variables +1 -1
- package/src/themes/default/modules/shape.variables +1 -1
- package/src/themes/default/modules/sidebar.variables +2 -2
- package/src/themes/default/modules/toast.variables +4 -4
- package/src/themes/default/views/card.variables +6 -7
- package/src/themes/default/views/feed.variables +4 -4
- package/src/themes/default/views/item.variables +2 -3
- package/src/themes/flat/collections/form.variables +1 -1
- package/src/themes/flat/globals/site.variables +9 -9
- package/src/themes/github/collections/form.overrides +3 -3
- package/src/themes/github/collections/form.variables +3 -3
- package/src/themes/github/collections/menu.overrides +1 -1
- package/src/themes/github/collections/menu.variables +10 -10
- package/src/themes/github/collections/message.variables +6 -6
- package/src/themes/github/elements/button.variables +17 -17
- package/src/themes/github/elements/input.variables +3 -3
- package/src/themes/github/elements/segment.variables +2 -2
- package/src/themes/github/elements/step.overrides +4 -4
- package/src/themes/github/elements/step.variables +3 -3
- package/src/themes/github/globals/site.variables +2 -2
- package/src/themes/github/modules/dropdown.variables +1 -3
- package/src/themes/gmail/collections/message.variables +2 -2
- package/src/themes/material/collections/menu.variables +1 -1
- package/src/themes/material/elements/button.overrides +4 -4
- package/src/themes/material/elements/button.variables +5 -5
- package/src/themes/material/modules/dropdown.variables +1 -1
- package/src/themes/material/modules/modal.variables +1 -1
- package/src/themes/raised/elements/button.variables +1 -1
- package/src/themes/round/elements/button.variables +12 -12
- package/src/themes/striped/modules/progress.overrides +3 -3
- package/src/themes/timeline/views/feed.variables +2 -2
- package/src/themes/twitter/elements/button.overrides +1 -1
- package/src/themes/twitter/elements/button.variables +4 -5
- package/tasks/admin/components/create.js +12 -15
- package/tasks/admin/components/init.js +11 -12
- package/tasks/admin/components/update.js +19 -20
- package/tasks/admin/distributions/create.js +30 -51
- package/tasks/admin/distributions/init.js +11 -12
- package/tasks/admin/distributions/update.js +18 -19
- package/tasks/admin/register.js +7 -7
- package/tasks/build/assets.js +1 -1
- package/tasks/build/css.js +5 -5
- package/tasks/build/javascript.js +1 -1
- package/tasks/config/admin/github.js +1 -1
- package/tasks/config/admin/templates/css-package.js +1 -1
- package/tasks/config/admin/templates/less-package.js +1 -1
- package/tasks/config/project/config.js +10 -10
- package/tasks/config/project/install.js +12 -12
- package/tasks/config/project/release.js +6 -12
- package/tasks/config/tasks.js +15 -11
- package/tasks/config/user.js +1 -4
- package/tasks/docs/metadata.js +18 -20
- package/tasks/install.js +14 -12
- package/test/meteor/assets.js +4 -4
- package/test/meteor/fonts.js +10 -11
- package/test/modules/module.spec.js +18 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
|
2
|
+
* # Fomantic-UI 2.10.0-beta.81+4f706c2 - Sidebar
|
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
? window
|
|
20
20
|
: globalThis;
|
|
21
21
|
|
|
22
|
-
$.fn.sidebar = function (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
$.fn.sidebar = function (...args) {
|
|
23
|
+
const $allModules = $(this);
|
|
24
|
+
const $window = $(window);
|
|
25
|
+
const $document = $(document);
|
|
26
|
+
const $body = $('body');
|
|
27
|
+
const $html = $('html');
|
|
28
|
+
const $head = $('head');
|
|
29
29
|
|
|
30
30
|
let time = Date.now();
|
|
31
31
|
let performance = [];
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const parameters = args[0];
|
|
34
|
+
const methodInvoked = typeof parameters === 'string';
|
|
35
|
+
const queryArguments = args.slice(1);
|
|
36
|
+
const contextCheck = function (context, win) {
|
|
37
37
|
let $context;
|
|
38
|
-
if ([window, document].
|
|
38
|
+
if ([window, document].includes(context)) {
|
|
39
39
|
$context = $body;
|
|
40
40
|
} else {
|
|
41
41
|
$context = $(win.document).find(context);
|
|
@@ -49,41 +49,40 @@
|
|
|
49
49
|
let returnedValue;
|
|
50
50
|
|
|
51
51
|
$allModules.each(function () {
|
|
52
|
-
|
|
52
|
+
const settings = $.isPlainObject(parameters)
|
|
53
53
|
? $.extend(true, {}, $.fn.sidebar.settings, parameters)
|
|
54
54
|
: $.extend({}, $.fn.sidebar.settings);
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
const selector = settings.selector;
|
|
57
|
+
const className = settings.className;
|
|
58
|
+
const namespace = settings.namespace;
|
|
59
|
+
const regExp = settings.regExp;
|
|
60
|
+
const error = settings.error;
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
const eventNamespace = '.' + namespace;
|
|
63
|
+
const moduleNamespace = 'module-' + namespace;
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
const $module = $(this);
|
|
66
66
|
let $context = contextCheck(settings.context, window);
|
|
67
|
-
|
|
67
|
+
const isBody = $context[0] === $body[0];
|
|
68
68
|
|
|
69
69
|
let $sidebars = $module.children(selector.sidebar);
|
|
70
70
|
let $fixed = $context.children(selector.fixed);
|
|
71
71
|
let $pusher = $context.children(selector.pusher);
|
|
72
72
|
let $style;
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
const element = this;
|
|
75
75
|
let instance = $module.data(moduleNamespace);
|
|
76
76
|
|
|
77
77
|
let elementNamespace;
|
|
78
78
|
let id;
|
|
79
79
|
let currentScroll;
|
|
80
80
|
let initialBodyMargin = '';
|
|
81
|
-
let
|
|
81
|
+
let initialBodyMarginInt = 0;
|
|
82
|
+
let tempBodyMargin = 0;
|
|
82
83
|
let hadScrollbar = false;
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
module = {
|
|
85
|
+
const module = {
|
|
87
86
|
|
|
88
87
|
initialize: function () {
|
|
89
88
|
module.debug('Initializing sidebar', parameters);
|
|
@@ -133,8 +132,8 @@
|
|
|
133
132
|
event: {
|
|
134
133
|
clickaway: function (event) {
|
|
135
134
|
if (settings.closable) {
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
const clickedInPusher = $pusher.find(event.target).length > 0 || $pusher.is(event.target);
|
|
136
|
+
const clickedContext = $context.is(event.target);
|
|
138
137
|
if (clickedInPusher) {
|
|
139
138
|
module.verbose('User clicked on dimmed page');
|
|
140
139
|
module.hide();
|
|
@@ -205,11 +204,11 @@
|
|
|
205
204
|
|
|
206
205
|
add: {
|
|
207
206
|
inlineCSS: function () {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
const width = module.cache.width || $module.outerWidth();
|
|
208
|
+
const height = module.cache.height || $module.outerHeight();
|
|
209
|
+
const isRTL = module.is.rtl();
|
|
210
|
+
const direction = module.get.direction();
|
|
211
|
+
const distance = {
|
|
213
212
|
left: width,
|
|
214
213
|
right: -width,
|
|
215
214
|
top: height,
|
|
@@ -264,7 +263,7 @@
|
|
|
264
263
|
repaint: function () {
|
|
265
264
|
module.verbose('Forcing repaint event');
|
|
266
265
|
element.style.display = 'none';
|
|
267
|
-
|
|
266
|
+
const ignored = element.offsetHeight;
|
|
268
267
|
element.scrollTop = element.scrollTop; // eslint-disable-line no-self-assign
|
|
269
268
|
element.style.display = '';
|
|
270
269
|
},
|
|
@@ -301,7 +300,7 @@
|
|
|
301
300
|
},
|
|
302
301
|
|
|
303
302
|
attachEvents: function (selector, event) {
|
|
304
|
-
|
|
303
|
+
const $toggle = $(selector);
|
|
305
304
|
event = isFunction(module[event])
|
|
306
305
|
? module[event]
|
|
307
306
|
: module.toggle;
|
|
@@ -325,9 +324,9 @@
|
|
|
325
324
|
save: {
|
|
326
325
|
bodyMargin: function () {
|
|
327
326
|
initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
tempBodyMargin =
|
|
327
|
+
initialBodyMarginInt = Number.parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10);
|
|
328
|
+
const bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth;
|
|
329
|
+
tempBodyMargin = initialBodyMarginInt + bodyScrollbarWidth;
|
|
331
330
|
},
|
|
332
331
|
},
|
|
333
332
|
show: function (callback) {
|
|
@@ -396,15 +395,14 @@
|
|
|
396
395
|
return module.othersVisible() || module.othersAnimating();
|
|
397
396
|
},
|
|
398
397
|
|
|
399
|
-
hideOthers: function (callback) {
|
|
400
|
-
|
|
401
|
-
|
|
398
|
+
hideOthers: function (callback = function () {}) {
|
|
399
|
+
const $otherSidebars = $sidebars.not($module).filter('.' + className.visible);
|
|
400
|
+
const sidebarCount = $otherSidebars.length;
|
|
402
401
|
let callbackCount = 0;
|
|
403
|
-
callback = callback || function () {};
|
|
404
402
|
$otherSidebars
|
|
405
403
|
.sidebar('hide', function () {
|
|
406
404
|
callbackCount++;
|
|
407
|
-
if (callbackCount === sidebarCount) {
|
|
405
|
+
if (callbackCount === sidebarCount && isFunction(callback)) {
|
|
408
406
|
callback();
|
|
409
407
|
}
|
|
410
408
|
});
|
|
@@ -420,13 +418,10 @@
|
|
|
420
418
|
},
|
|
421
419
|
|
|
422
420
|
pushPage: function (callback) {
|
|
423
|
-
|
|
424
|
-
|
|
421
|
+
const transition = module.get.transition();
|
|
422
|
+
const $transition = transition === 'overlay' || module.othersActive()
|
|
425
423
|
? $module
|
|
426
424
|
: $pusher;
|
|
427
|
-
let animate;
|
|
428
|
-
let dim;
|
|
429
|
-
let transitionEnd;
|
|
430
425
|
callback = isFunction(callback)
|
|
431
426
|
? callback
|
|
432
427
|
: function () {};
|
|
@@ -439,16 +434,16 @@
|
|
|
439
434
|
module.bind.scrollLock();
|
|
440
435
|
module.set.transition(transition);
|
|
441
436
|
module.repaint();
|
|
442
|
-
animate = function () {
|
|
437
|
+
const animate = function () {
|
|
443
438
|
module.bind.clickaway();
|
|
444
439
|
module.add.inlineCSS();
|
|
445
440
|
module.set.animating();
|
|
446
441
|
module.set.visible();
|
|
447
442
|
};
|
|
448
|
-
dim = function () {
|
|
443
|
+
const dim = function () {
|
|
449
444
|
module.set.dimmed();
|
|
450
445
|
};
|
|
451
|
-
transitionEnd = function (event) {
|
|
446
|
+
const transitionEnd = function (event) {
|
|
452
447
|
if (event.target === $transition[0]) {
|
|
453
448
|
$transition.off('transitionend' + elementNamespace, transitionEnd);
|
|
454
449
|
module.remove.animating();
|
|
@@ -464,12 +459,10 @@
|
|
|
464
459
|
},
|
|
465
460
|
|
|
466
461
|
pullPage: function (callback) {
|
|
467
|
-
|
|
468
|
-
|
|
462
|
+
const transition = module.get.transition();
|
|
463
|
+
const $transition = transition === 'overlay' || module.othersActive()
|
|
469
464
|
? $module
|
|
470
465
|
: $pusher;
|
|
471
|
-
let animate;
|
|
472
|
-
let transitionEnd;
|
|
473
466
|
callback = isFunction(callback)
|
|
474
467
|
? callback
|
|
475
468
|
: function () {};
|
|
@@ -478,7 +471,7 @@
|
|
|
478
471
|
module.unbind.clickaway();
|
|
479
472
|
module.unbind.scrollLock();
|
|
480
473
|
|
|
481
|
-
animate = function () {
|
|
474
|
+
const animate = function () {
|
|
482
475
|
module.set.transition(transition);
|
|
483
476
|
module.set.animating();
|
|
484
477
|
if (settings.dimPage && !module.othersVisible()) {
|
|
@@ -486,7 +479,7 @@
|
|
|
486
479
|
}
|
|
487
480
|
module.remove.visible();
|
|
488
481
|
};
|
|
489
|
-
transitionEnd = function (event) {
|
|
482
|
+
const transitionEnd = function (event) {
|
|
490
483
|
if (event.target === $transition[0]) {
|
|
491
484
|
$transition.off('transitionend' + elementNamespace, transitionEnd);
|
|
492
485
|
module.remove.animating();
|
|
@@ -527,11 +520,11 @@
|
|
|
527
520
|
|
|
528
521
|
set: {
|
|
529
522
|
bodyMargin: function () {
|
|
530
|
-
|
|
523
|
+
const position = module.can.leftBodyScrollbar() ? 'left' : 'right';
|
|
531
524
|
$context.css((isBody ? 'margin-' : 'padding-') + position, tempBodyMargin + 'px');
|
|
532
525
|
$context.find(selector.bodyFixed.replace('right', position)).each(function () {
|
|
533
|
-
|
|
534
|
-
|
|
526
|
+
const el = $(this);
|
|
527
|
+
const attribute = el.css('position') === 'fixed' ? 'padding-' + position : position;
|
|
535
528
|
el.css(attribute, 'calc(' + el.css(attribute) + ' + ' + tempBodyMargin + 'px)');
|
|
536
529
|
});
|
|
537
530
|
},
|
|
@@ -566,12 +559,10 @@
|
|
|
566
559
|
closing: function () {
|
|
567
560
|
$pusher.addClass(className.closing);
|
|
568
561
|
},
|
|
569
|
-
transition: function (transition) {
|
|
570
|
-
transition = transition || module.get.transition();
|
|
562
|
+
transition: function (transition = module.get.transition()) {
|
|
571
563
|
$module.addClass(transition);
|
|
572
564
|
},
|
|
573
|
-
direction: function (direction) {
|
|
574
|
-
direction = direction || module.get.direction();
|
|
565
|
+
direction: function (direction = module.get.direction()) {
|
|
575
566
|
$module.addClass(className[direction]);
|
|
576
567
|
},
|
|
577
568
|
visible: function () {
|
|
@@ -608,12 +599,10 @@
|
|
|
608
599
|
closing: function () {
|
|
609
600
|
$pusher.removeClass(className.closing);
|
|
610
601
|
},
|
|
611
|
-
transition: function (transition) {
|
|
612
|
-
transition = transition || module.get.transition();
|
|
602
|
+
transition: function (transition = module.get.transition()) {
|
|
613
603
|
$module.removeClass(transition);
|
|
614
604
|
},
|
|
615
|
-
direction: function (direction) {
|
|
616
|
-
direction = direction || module.get.direction();
|
|
605
|
+
direction: function (direction = module.get.direction()) {
|
|
617
606
|
$module.removeClass(className[direction]);
|
|
618
607
|
},
|
|
619
608
|
visible: function () {
|
|
@@ -625,11 +614,11 @@
|
|
|
625
614
|
},
|
|
626
615
|
restore: {
|
|
627
616
|
bodyMargin: function () {
|
|
628
|
-
|
|
629
|
-
$context.css((isBody ? 'margin-' : 'padding-') + position, initialBodyMargin);
|
|
617
|
+
const position = module.can.leftBodyScrollbar() ? 'left' : 'right';
|
|
618
|
+
$context.css((isBody ? 'margin-' : 'padding-') + position, initialBodyMarginInt === 0 ? '' : initialBodyMargin);
|
|
630
619
|
$context.find(selector.bodyFixed.replace('right', position)).each(function () {
|
|
631
|
-
|
|
632
|
-
|
|
620
|
+
const el = $(this);
|
|
621
|
+
const attribute = el.css('position') === 'fixed' ? 'padding-' + position : position;
|
|
633
622
|
el.css(attribute, '');
|
|
634
623
|
});
|
|
635
624
|
},
|
|
@@ -649,9 +638,8 @@
|
|
|
649
638
|
return className.left;
|
|
650
639
|
},
|
|
651
640
|
transition: function () {
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
transition = module.is.mobile()
|
|
641
|
+
const direction = module.get.direction();
|
|
642
|
+
const transition = module.is.mobile()
|
|
655
643
|
? (settings.mobileTransition === 'auto'
|
|
656
644
|
? settings.defaultTransition.mobile[direction]
|
|
657
645
|
: settings.mobileTransition)
|
|
@@ -684,11 +672,11 @@
|
|
|
684
672
|
return module.cache.isFirefox;
|
|
685
673
|
},
|
|
686
674
|
iframe: function () {
|
|
687
|
-
return !(self === top);
|
|
675
|
+
return !(window.self === window.top);
|
|
688
676
|
},
|
|
689
677
|
mobile: function () {
|
|
690
|
-
|
|
691
|
-
|
|
678
|
+
const userAgent = navigator.userAgent;
|
|
679
|
+
const isMobile = userAgent.match(regExp.mobile);
|
|
692
680
|
if (isMobile) {
|
|
693
681
|
module.verbose('Browser was found to be mobile', userAgent);
|
|
694
682
|
|
|
@@ -750,30 +738,30 @@
|
|
|
750
738
|
return module[name];
|
|
751
739
|
}
|
|
752
740
|
},
|
|
753
|
-
debug: function () {
|
|
741
|
+
debug: function (...args) {
|
|
754
742
|
if (!settings.silent && settings.debug) {
|
|
755
743
|
if (settings.performance) {
|
|
756
|
-
module.performance.log(
|
|
744
|
+
module.performance.log(args);
|
|
757
745
|
} else {
|
|
758
746
|
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
|
759
|
-
module.debug.apply(console,
|
|
747
|
+
module.debug.apply(console, args);
|
|
760
748
|
}
|
|
761
749
|
}
|
|
762
750
|
},
|
|
763
|
-
verbose: function () {
|
|
751
|
+
verbose: function (...args) {
|
|
764
752
|
if (!settings.silent && settings.verbose && settings.debug) {
|
|
765
753
|
if (settings.performance) {
|
|
766
|
-
module.performance.log(
|
|
754
|
+
module.performance.log(args);
|
|
767
755
|
} else {
|
|
768
756
|
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
|
769
|
-
module.verbose.apply(console,
|
|
757
|
+
module.verbose.apply(console, args);
|
|
770
758
|
}
|
|
771
759
|
}
|
|
772
760
|
},
|
|
773
|
-
error: function () {
|
|
761
|
+
error: function (...args) {
|
|
774
762
|
if (!settings.silent) {
|
|
775
763
|
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
|
776
|
-
module.error.apply(console,
|
|
764
|
+
module.error.apply(console, args);
|
|
777
765
|
}
|
|
778
766
|
},
|
|
779
767
|
performance: {
|
|
@@ -788,7 +776,7 @@
|
|
|
788
776
|
time = currentTime;
|
|
789
777
|
performance.push({
|
|
790
778
|
Name: message[0],
|
|
791
|
-
Arguments:
|
|
779
|
+
Arguments: message.slice(1),
|
|
792
780
|
Element: element,
|
|
793
781
|
'Execution Time': executionTime,
|
|
794
782
|
});
|
|
@@ -809,30 +797,22 @@
|
|
|
809
797
|
title += ' ' + totalTime + 'ms';
|
|
810
798
|
if (performance.length > 0) {
|
|
811
799
|
console.groupCollapsed(title);
|
|
812
|
-
|
|
813
|
-
console.table(performance);
|
|
814
|
-
} else {
|
|
815
|
-
$.each(performance, function (index, data) {
|
|
816
|
-
console.log(data.Name + ': ' + data['Execution Time'] + 'ms');
|
|
817
|
-
});
|
|
818
|
-
}
|
|
800
|
+
console.table(performance);
|
|
819
801
|
console.groupEnd();
|
|
820
802
|
}
|
|
821
803
|
performance = [];
|
|
822
804
|
},
|
|
823
805
|
},
|
|
824
|
-
invoke: function (query, passedArguments, context) {
|
|
806
|
+
invoke: function (query, passedArguments = queryArguments, context = element) {
|
|
825
807
|
let object = instance;
|
|
826
808
|
let maxDepth;
|
|
827
809
|
let found;
|
|
828
810
|
let response;
|
|
829
|
-
passedArguments = passedArguments || queryArguments;
|
|
830
|
-
context = context || element;
|
|
831
811
|
if (typeof query === 'string' && object !== undefined) {
|
|
832
812
|
query = query.split(/[ .]/);
|
|
833
813
|
maxDepth = query.length - 1;
|
|
834
814
|
$.each(query, function (depth, value) {
|
|
835
|
-
|
|
815
|
+
const camelCaseValue = depth !== maxDepth
|
|
836
816
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
|
837
817
|
: query;
|
|
838
818
|
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
|
@@ -875,7 +855,7 @@
|
|
|
875
855
|
if (instance === undefined) {
|
|
876
856
|
module.initialize();
|
|
877
857
|
}
|
|
878
|
-
module.invoke(
|
|
858
|
+
module.invoke(parameters);
|
|
879
859
|
} else {
|
|
880
860
|
if (instance !== undefined) {
|
|
881
861
|
module.invoke('destroy');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* # Fomantic UI - 2.10.0-beta.
|
|
2
|
+
* # Fomantic UI - 2.10.0-beta.81+4f706c2
|
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
|
4
4
|
* https://fomantic-ui.com/
|
|
5
5
|
*
|
|
6
|
-
* Copyright
|
|
6
|
+
* Copyright 2026 Contributors
|
|
7
7
|
* Released under the MIT license
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
!function(R,j,V){"use strict";function q(e){return"function"==typeof e&&"number"!=typeof e.nodeType}j=void 0!==j&&j.Math===Math?j:globalThis,R.fn.sidebar=function(k){let e=R(this),w=R(j),A=R(V),F=R("body");R("html");let P=R("head"),H=Date.now(),M=[],B=k,O="string"==typeof B,E=[].slice.call(arguments,1),L=function(e,i){let n;return 0<=[j,V].indexOf(e)?n=F:0===(n=R(i.document).find(e)).length&&(n=i.frameElement?L(e,i.parent):F),n},D;return e.each(function(){let r=R.isPlainObject(k)?R.extend(!0,{},R.fn.sidebar.settings,k):R.extend({},R.fn.sidebar.settings),i=r.selector,s=r.className;var e=r.namespace;let n=r.regExp,a=r.error,t="."+e,o="module-"+e,l=R(this),c=L(r.context,j),d=c[0]===F[0],u=l.children(i.sidebar),f=void c.children(i.fixed),h=c.children(i.pusher),g,b=this,m=l.data(o),v,p,y,S="",x="",C=!1,T;T={initialize:function(){T.debug("Initializing sidebar",k),T.create.id(),r.delaySetup?requestAnimationFrame(T.setup.layout):T.setup.layout(),requestAnimationFrame(function(){T.setup.cache()}),T.instantiate()},instantiate:function(){T.verbose("Storing instance of module",T),m=T,l.data(o,T)},create:{id:function(){p=(Math.random().toString(16)+"000000000").slice(2,10),v="."+p,T.verbose("Creating unique id for element",p)}},destroy:function(){T.verbose("Destroying previous module for",l),l.off(t).removeData(o),c.off(v),w.off(v),A.off(v)},event:{clickaway:function(e){var i;r.closable&&(i=0<h.find(e.target).length||h.is(e.target),e=c.is(e.target),i&&(T.verbose("User clicked on dimmed page"),T.hide()),e&&(T.verbose("User clicked on dimmable context (scaled out page)"),T.hide()))},touch:function(e){},containScroll:function(e){b.scrollTop<=0&&(b.scrollTop=1),b.scrollTop+b.offsetHeight>=b.scrollHeight&&(b.scrollTop=b.scrollHeight-b.offsetHeight-1)},scroll:function(e){0===R(e.target).closest(i.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){T.verbose("Adding clickaway events to context",c),c.on("click"+v,T.event.clickaway).on("touchend"+v,T.event.clickaway)},scrollLock:function(){r.scrollLock&&(T.debug("Disabling page scroll"),(C=T.has.scrollbar())&&(T.save.bodyMargin(),T.set.bodyMargin()),c.addClass(s.locked)),T.verbose("Adding events to contain sidebar scroll"),A.on("touchmove"+v,T.event.touch),l.on("scroll"+t,T.event.containScroll)}},unbind:{clickaway:function(){T.verbose("Removing clickaway events from context",c),c.off(v)},scrollLock:function(){T.verbose("Removing scroll lock from page"),C&&T.restore.bodyMargin(),c.removeClass(s.locked),A.off(v),l.off("scroll"+t)}},add:{inlineCSS:function(){var e=T.cache.width||l.outerWidth(),i=T.cache.height||l.outerHeight(),n=T.is.rtl(),t=T.get.direction();let o={left:e,right:-e,top:i,bottom:-i},r;n&&(T.verbose("RTL detected, flipping widths"),o.left=-e,o.right=e),r="<style>","left"===t||"right"===t?(T.debug("Adding CSS rules for animation distance",e),r+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d("+o[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!==t||(r+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d(0, "+o[t]+"px, 0); }"),r+="</style>",g=R(r).appendTo(P),T.debug("Adding sizing css to head",g)}},refresh:function(){T.verbose("Refreshing selector cache"),c=L(r.context,j),T.refreshSidebars(),h=c.children(i.pusher),f=c.children(i.fixed),T.clear.cache()},refreshSidebars:function(){T.verbose("Refreshing other sidebars"),u=c.children(i.sidebar)},repaint:function(){T.verbose("Forcing repaint event"),b.style.display="none";b.offsetHeight;b.scrollTop=b.scrollTop,b.style.display=""},setup:{cache:function(){T.cache={width:l.outerWidth(),height:l.outerHeight()}},layout:function(){0===c.children(i.pusher).length&&(T.debug("Adding wrapper element for sidebar"),T.error(a.pusher),h=R('<div class="pusher" />'),c.children().not(i.omitted).not(u).wrapAll(h),T.refresh()),0!==l.nextAll(i.pusher).length&&l.nextAll(i.pusher)[0]===h[0]||(T.debug("Moved sidebar to correct parent element"),T.error(a.movedSidebar,b),l.detach().prependTo(c),T.refresh()),T.clear.cache(),T.set.pushable(),T.set.direction()}},attachEvents:function(e,i){let n=R(e);i=q(T[i])?T[i]:T.toggle,0<n.length?(T.debug("Attaching sidebar events to element",e,i),n.on("click"+t,i)):T.error(a.notFound,e)},can:{leftBodyScrollbar:function(){return void 0===T.cache.leftBodyScrollbar&&(T.cache.leftBodyScrollbar=T.is.rtl()&&(T.is.iframe&&!T.is.firefox()||T.is.safari())),T.cache.leftBodyScrollbar}},save:{bodyMargin:function(){S=c.css((d?"margin-":"padding-")+(T.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(S.replace(/[^\d.]/g,""),10),i=d?j.innerWidth-V.documentElement.clientWidth:c[0].offsetWidth-c[0].clientWidth;x=e+i}},show:function(e){if(e=q(e)?e:function(){},T.is.hidden())if(!1===r.onShow.call(b))T.verbose("Show callback returned false cancelling show");else{if(r.overlay&&(T.error(a.overlay),r.transition="overlay"),T.refresh(),T.othersActive())if(T.debug("Other sidebars currently visible"),r.exclusive){if("overlay"!==r.transition)return void T.hideOthers(T.show);T.hideOthers()}else r.transition="overlay";T.set.dimmerStyles(),T.pushPage(function(){e.call(b),r.onVisible.call(b)}),r.onChange.call(b)}else T.debug("Sidebar is already visible")},hide:function(e){e=q(e)?e:function(){},(T.is.visible()||T.is.animating())&&!1!==r.onHide.call(b)&&(T.debug("Hiding sidebar",e),T.refreshSidebars(),T.pullPage(function(){e.call(b),r.onHidden.call(b)}),r.onChange.call(b))},othersAnimating:function(){return 0<u.not(l).filter("."+s.animating).length},othersVisible:function(){return 0<u.not(l).filter("."+s.visible).length},othersActive:function(){return T.othersVisible()||T.othersAnimating()},hideOthers:function(e){let i=u.not(l).filter("."+s.visible),n=i.length,t=0;e=e||function(){},i.sidebar("hide",function(){++t===n&&e()})},toggle:function(){T.verbose("Determining toggled direction"),T.is.hidden()?T.show():T.hide()},pushPage:function(i){var e,n=T.get.transition();let t="overlay"===n||T.othersActive()?l:h,o;i=q(i)?i:function(){},r.returnScroll&&(y=(d?w:c).scrollTop()),"scale down"===r.transition&&T.scrollToTop(),T.bind.scrollLock(),T.set.transition(n),T.repaint(),n=function(){T.bind.clickaway(),T.add.inlineCSS(),T.set.animating(),T.set.visible()},e=function(){T.set.dimmed()},o=function(e){e.target===t[0]&&(t.off("transitionend"+v,o),T.remove.animating(),i.call(b))},t.off("transitionend"+v),t.on("transitionend"+v,o),requestAnimationFrame(n),r.dimPage&&!T.othersVisible()&&requestAnimationFrame(e)},pullPage:function(i){let n=T.get.transition(),t="overlay"===n||T.othersActive()?l:h;var e;let o;i=q(i)?i:function(){},T.verbose("Removing context push state",T.get.direction()),T.unbind.clickaway(),T.unbind.scrollLock(),e=function(){T.set.transition(n),T.set.animating(),r.dimPage&&!T.othersVisible()&&T.set.closing(),T.remove.visible()},o=function(e){e.target===t[0]&&(t.off("transitionend"+v,o),T.remove.animating(),T.remove.closing(),T.remove.transition(),T.remove.inlineCSS(),"scale down"!==n&&!r.returnScroll||T.scrollBack(),r.dimPage&&!T.othersVisible()&&h.removeClass(s.dimmed),i.call(b))},t.off("transitionend"+v),t.on("transitionend"+v,o),requestAnimationFrame(e)},scrollToTop:function(){T.verbose("Scrolling to top of page to avoid animation issues"),l.scrollTop(0),(d?w:c)[0].scrollTo(0,0)},scrollBack:function(){T.verbose("Scrolling back to original page position"),(d?w:c)[0].scrollTo(0,y)},clear:{cache:function(){T.verbose("Clearing cached dimensions"),T.cache={}}},set:{bodyMargin:function(){let n=T.can.leftBodyScrollbar()?"left":"right";c.css((d?"margin-":"padding-")+n,x+"px"),c.find(i.bodyFixed.replace("right",n)).each(function(){let e=R(this);var i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"calc("+e.css(i)+" + "+x+"px)")})},dimmerStyles:function(){r.blurring?h.addClass(s.blurring):h.removeClass(s.blurring)},pushed:function(){c.addClass(s.pushed)},pushable:function(){c.addClass(s.pushable)},dimmed:function(){h.addClass(s.dimmed)},active:function(){l.addClass(s.active)},animating:function(){l.addClass(s.animating)},closing:function(){h.addClass(s.closing)},transition:function(e){e=e||T.get.transition(),l.addClass(e)},direction:function(e){e=e||T.get.direction(),l.addClass(s[e])},visible:function(){l.addClass(s.visible)},overlay:function(){l.addClass(s.overlay)}},remove:{inlineCSS:function(){T.debug("Removing inline css styles",g),g&&0<g.length&&g.remove()},pushed:function(){c.removeClass(s.pushed)},pushable:function(){c.removeClass(s.pushable)},active:function(){l.removeClass(s.active)},animating:function(){l.removeClass(s.animating)},closing:function(){h.removeClass(s.closing)},transition:function(e){e=e||T.get.transition(),l.removeClass(e)},direction:function(e){e=e||T.get.direction(),l.removeClass(s[e])},visible:function(){l.removeClass(s.visible)},overlay:function(){l.removeClass(s.overlay)}},restore:{bodyMargin:function(){let n=T.can.leftBodyScrollbar()?"left":"right";c.css((d?"margin-":"padding-")+n,S),c.find(i.bodyFixed.replace("right",n)).each(function(){let e=R(this);var i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"")})}},get:{direction:function(){return l.hasClass(s.top)?s.top:l.hasClass(s.right)?s.right:l.hasClass(s.bottom)?s.bottom:s.left},transition:function(){var e=T.get.direction(),e=T.is.mobile()?"auto"===r.mobileTransition?r.defaultTransition.mobile[e]:r.mobileTransition:"auto"===r.transition?r.defaultTransition.computer[e]:r.transition;return T.verbose("Determined transition",e),e}},has:{scrollbar:function(){return d||"hidden"!==c.css("overflow-y")}},is:{safari:function(){return void 0===T.cache.isSafari&&(T.cache.isSafari=/constructor/i.test(j.HTMLElement)||!!j.ApplePaySession),T.cache.isSafari},firefox:function(){return void 0===T.cache.isFirefox&&(T.cache.isFirefox=!!j.InstallTrigger),T.cache.isFirefox},iframe:function(){return!(self===top)},mobile:function(){let e=navigator.userAgent;return e.match(n.mobile)?(T.verbose("Browser was found to be mobile",e),!0):(T.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!T.is.visible()},visible:function(){return l.hasClass(s.visible)},open:function(){return T.is.visible()},closed:function(){return T.is.hidden()},vertical:function(){return l.hasClass(s.top)},animating:function(){return c.hasClass(s.animating)},rtl:function(){return void 0===T.cache.isRTL&&(T.cache.isRTL="rtl"===l.attr("dir")||"rtl"===l.css("direction")||"rtl"===F.attr("dir")||"rtl"===F.css("direction")||"rtl"===c.attr("dir")||"rtl"===c.css("direction")),T.cache.isRTL}},setting:function(e,i){if(T.debug("Changing setting",e,i),R.isPlainObject(e))R.extend(!0,r,e);else{if(void 0===i)return r[e];R.isPlainObject(r[e])?R.extend(!0,r[e],i):r[e]=i}},internal:function(e,i){if(R.isPlainObject(e))R.extend(!0,T,e);else{if(void 0===i)return T[e];T[e]=i}},debug:function(){!r.silent&&r.debug&&(r.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,r.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),T.verbose.apply(console,arguments)))},error:function(){r.silent||(T.error=Function.prototype.bind.call(console.error,console,r.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var i,n;r.performance&&(n=(i=Date.now())-(H||i),H=i,M.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(function(){T.performance.display()},500)},display:function(){var e=r.name+":";let n=0;H=!1,clearTimeout(T.performance.timer),R.each(M,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",0<M.length&&(console.groupCollapsed(e),console.table?console.table(M):R.each(M,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),M=[]}},invoke:function(t,e,i){let o=m,r,s,n;return e=e||E,i=i||b,"string"==typeof t&&void 0!==o&&(t=t.split(/[ .]/),r=t.length-1,R.each(t,function(e,i){var n=e!==r?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(R.isPlainObject(o[n])&&e!==r)o=o[n];else{if(void 0!==o[n])return s=o[n],!1;{if(!R.isPlainObject(o[i])||e===r)return void 0!==o[i]?s=o[i]:T.error(a.method,t),!1;o=o[i]}}})),q(s)?n=s.apply(i,e):void 0!==s&&(n=s),Array.isArray(D)?D.push(n):void 0!==D?D=[D,n]:void 0!==n&&(D=n),s}},O?(void 0===m&&T.initialize(),T.invoke(B)):(void 0!==m&&T.invoke("destroy"),T.initialize())}),void 0!==D?D:this},R.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document);
|
|
11
|
+
!function(R,j,V){"use strict";function q(e){return"function"==typeof e&&"number"!=typeof e.nodeType}j=void 0!==j&&j.Math===Math?j:globalThis,R.fn.sidebar=function(...e){const i=R(this),w=R(j),A=R(V),F=R("body");R("html");const P=R("head");let H=Date.now(),M=[];const B=e[0],O="string"==typeof B,E=e.slice(1),L=function(e,i){let n;return[j,V].includes(e)?n=F:0===(n=R(i.document).find(e)).length&&(n=i.frameElement?L(e,i.parent):F),n};let D;return i.each(function(){const r=R.isPlainObject(B)?R.extend(!0,{},R.fn.sidebar.settings,B):R.extend({},R.fn.sidebar.settings),i=r.selector,s=r.className;var e=r.namespace;const n=r.regExp,a=r.error,t="."+e,o="module-"+e,l=R(this);let c=L(r.context,j);const d=c[0]===F[0];let u=l.children(i.sidebar),f=void c.children(i.fixed),h=c.children(i.pusher),g;const b=this;let m=l.data(o),v,p,y,S="",x=0,C=0,T=!1;const k={initialize:function(){k.debug("Initializing sidebar",B),k.create.id(),r.delaySetup?requestAnimationFrame(k.setup.layout):k.setup.layout(),requestAnimationFrame(function(){k.setup.cache()}),k.instantiate()},instantiate:function(){k.verbose("Storing instance of module",k),m=k,l.data(o,k)},create:{id:function(){p=(Math.random().toString(16)+"000000000").slice(2,10),v="."+p,k.verbose("Creating unique id for element",p)}},destroy:function(){k.verbose("Destroying previous module for",l),l.off(t).removeData(o),c.off(v),w.off(v),A.off(v)},event:{clickaway:function(e){var i;r.closable&&(i=0<h.find(e.target).length||h.is(e.target),e=c.is(e.target),i&&(k.verbose("User clicked on dimmed page"),k.hide()),e&&(k.verbose("User clicked on dimmable context (scaled out page)"),k.hide()))},touch:function(e){},containScroll:function(e){b.scrollTop<=0&&(b.scrollTop=1),b.scrollTop+b.offsetHeight>=b.scrollHeight&&(b.scrollTop=b.scrollHeight-b.offsetHeight-1)},scroll:function(e){0===R(e.target).closest(i.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){k.verbose("Adding clickaway events to context",c),c.on("click"+v,k.event.clickaway).on("touchend"+v,k.event.clickaway)},scrollLock:function(){r.scrollLock&&(k.debug("Disabling page scroll"),(T=k.has.scrollbar())&&(k.save.bodyMargin(),k.set.bodyMargin()),c.addClass(s.locked)),k.verbose("Adding events to contain sidebar scroll"),A.on("touchmove"+v,k.event.touch),l.on("scroll"+t,k.event.containScroll)}},unbind:{clickaway:function(){k.verbose("Removing clickaway events from context",c),c.off(v)},scrollLock:function(){k.verbose("Removing scroll lock from page"),T&&k.restore.bodyMargin(),c.removeClass(s.locked),A.off(v),l.off("scroll"+t)}},add:{inlineCSS:function(){var e=k.cache.width||l.outerWidth(),i=k.cache.height||l.outerHeight(),n=k.is.rtl(),t=k.get.direction();const o={left:e,right:-e,top:i,bottom:-i};let r;n&&(k.verbose("RTL detected, flipping widths"),o.left=-e,o.right=e),r="<style>","left"===t||"right"===t?(k.debug("Adding CSS rules for animation distance",e),r+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d("+o[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!==t||(r+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d(0, "+o[t]+"px, 0); }"),r+="</style>",g=R(r).appendTo(P),k.debug("Adding sizing css to head",g)}},refresh:function(){k.verbose("Refreshing selector cache"),c=L(r.context,j),k.refreshSidebars(),h=c.children(i.pusher),f=c.children(i.fixed),k.clear.cache()},refreshSidebars:function(){k.verbose("Refreshing other sidebars"),u=c.children(i.sidebar)},repaint:function(){k.verbose("Forcing repaint event"),b.style.display="none";b.offsetHeight;b.scrollTop=b.scrollTop,b.style.display=""},setup:{cache:function(){k.cache={width:l.outerWidth(),height:l.outerHeight()}},layout:function(){0===c.children(i.pusher).length&&(k.debug("Adding wrapper element for sidebar"),k.error(a.pusher),h=R('<div class="pusher" />'),c.children().not(i.omitted).not(u).wrapAll(h),k.refresh()),0!==l.nextAll(i.pusher).length&&l.nextAll(i.pusher)[0]===h[0]||(k.debug("Moved sidebar to correct parent element"),k.error(a.movedSidebar,b),l.detach().prependTo(c),k.refresh()),k.clear.cache(),k.set.pushable(),k.set.direction()}},attachEvents:function(e,i){const n=R(e);i=q(k[i])?k[i]:k.toggle,0<n.length?(k.debug("Attaching sidebar events to element",e,i),n.on("click"+t,i)):k.error(a.notFound,e)},can:{leftBodyScrollbar:function(){return void 0===k.cache.leftBodyScrollbar&&(k.cache.leftBodyScrollbar=k.is.rtl()&&(k.is.iframe&&!k.is.firefox()||k.is.safari())),k.cache.leftBodyScrollbar}},save:{bodyMargin:function(){S=c.css((d?"margin-":"padding-")+(k.can.leftBodyScrollbar()?"left":"right")),x=Number.parseInt(S.replace(/[^\d.]/g,""),10);var e=d?j.innerWidth-V.documentElement.clientWidth:c[0].offsetWidth-c[0].clientWidth;C=x+e}},show:function(e){if(e=q(e)?e:function(){},k.is.hidden())if(!1===r.onShow.call(b))k.verbose("Show callback returned false cancelling show");else{if(r.overlay&&(k.error(a.overlay),r.transition="overlay"),k.refresh(),k.othersActive())if(k.debug("Other sidebars currently visible"),r.exclusive){if("overlay"!==r.transition)return void k.hideOthers(k.show);k.hideOthers()}else r.transition="overlay";k.set.dimmerStyles(),k.pushPage(function(){e.call(b),r.onVisible.call(b)}),r.onChange.call(b)}else k.debug("Sidebar is already visible")},hide:function(e){e=q(e)?e:function(){},(k.is.visible()||k.is.animating())&&!1!==r.onHide.call(b)&&(k.debug("Hiding sidebar",e),k.refreshSidebars(),k.pullPage(function(){e.call(b),r.onHidden.call(b)}),r.onChange.call(b))},othersAnimating:function(){return 0<u.not(l).filter("."+s.animating).length},othersVisible:function(){return 0<u.not(l).filter("."+s.visible).length},othersActive:function(){return k.othersVisible()||k.othersAnimating()},hideOthers:function(e=function(){}){const i=u.not(l).filter("."+s.visible),n=i.length;let t=0;i.sidebar("hide",function(){++t===n&&q(e)&&e()})},toggle:function(){k.verbose("Determining toggled direction"),k.is.hidden()?k.show():k.hide()},pushPage:function(i){var e=k.get.transition();const n="overlay"===e||k.othersActive()?l:h;i=q(i)?i:function(){},r.returnScroll&&(y=(d?w:c).scrollTop()),"scale down"===r.transition&&k.scrollToTop(),k.bind.scrollLock(),k.set.transition(e),k.repaint();function t(e){e.target===n[0]&&(n.off("transitionend"+v,t),k.remove.animating(),i.call(b))}n.off("transitionend"+v),n.on("transitionend"+v,t),requestAnimationFrame(function(){k.bind.clickaway(),k.add.inlineCSS(),k.set.animating(),k.set.visible()}),r.dimPage&&!k.othersVisible()&&requestAnimationFrame(function(){k.set.dimmed()})},pullPage:function(i){const n=k.get.transition(),t="overlay"===n||k.othersActive()?l:h;i=q(i)?i:function(){},k.verbose("Removing context push state",k.get.direction()),k.unbind.clickaway(),k.unbind.scrollLock();function o(e){e.target===t[0]&&(t.off("transitionend"+v,o),k.remove.animating(),k.remove.closing(),k.remove.transition(),k.remove.inlineCSS(),"scale down"!==n&&!r.returnScroll||k.scrollBack(),r.dimPage&&!k.othersVisible()&&h.removeClass(s.dimmed),i.call(b))}t.off("transitionend"+v),t.on("transitionend"+v,o),requestAnimationFrame(function(){k.set.transition(n),k.set.animating(),r.dimPage&&!k.othersVisible()&&k.set.closing(),k.remove.visible()})},scrollToTop:function(){k.verbose("Scrolling to top of page to avoid animation issues"),l.scrollTop(0),(d?w:c)[0].scrollTo(0,0)},scrollBack:function(){k.verbose("Scrolling back to original page position"),(d?w:c)[0].scrollTo(0,y)},clear:{cache:function(){k.verbose("Clearing cached dimensions"),k.cache={}}},set:{bodyMargin:function(){const n=k.can.leftBodyScrollbar()?"left":"right";c.css((d?"margin-":"padding-")+n,C+"px"),c.find(i.bodyFixed.replace("right",n)).each(function(){const e=R(this);var i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"calc("+e.css(i)+" + "+C+"px)")})},dimmerStyles:function(){r.blurring?h.addClass(s.blurring):h.removeClass(s.blurring)},pushed:function(){c.addClass(s.pushed)},pushable:function(){c.addClass(s.pushable)},dimmed:function(){h.addClass(s.dimmed)},active:function(){l.addClass(s.active)},animating:function(){l.addClass(s.animating)},closing:function(){h.addClass(s.closing)},transition:function(e=k.get.transition()){l.addClass(e)},direction:function(e=k.get.direction()){l.addClass(s[e])},visible:function(){l.addClass(s.visible)},overlay:function(){l.addClass(s.overlay)}},remove:{inlineCSS:function(){k.debug("Removing inline css styles",g),g&&0<g.length&&g.remove()},pushed:function(){c.removeClass(s.pushed)},pushable:function(){c.removeClass(s.pushable)},active:function(){l.removeClass(s.active)},animating:function(){l.removeClass(s.animating)},closing:function(){h.removeClass(s.closing)},transition:function(e=k.get.transition()){l.removeClass(e)},direction:function(e=k.get.direction()){l.removeClass(s[e])},visible:function(){l.removeClass(s.visible)},overlay:function(){l.removeClass(s.overlay)}},restore:{bodyMargin:function(){const n=k.can.leftBodyScrollbar()?"left":"right";c.css((d?"margin-":"padding-")+n,0===x?"":S),c.find(i.bodyFixed.replace("right",n)).each(function(){const e=R(this);var i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"")})}},get:{direction:function(){return l.hasClass(s.top)?s.top:l.hasClass(s.right)?s.right:l.hasClass(s.bottom)?s.bottom:s.left},transition:function(){var e=k.get.direction(),e=k.is.mobile()?"auto"===r.mobileTransition?r.defaultTransition.mobile[e]:r.mobileTransition:"auto"===r.transition?r.defaultTransition.computer[e]:r.transition;return k.verbose("Determined transition",e),e}},has:{scrollbar:function(){return d||"hidden"!==c.css("overflow-y")}},is:{safari:function(){return void 0===k.cache.isSafari&&(k.cache.isSafari=/constructor/i.test(j.HTMLElement)||!!j.ApplePaySession),k.cache.isSafari},firefox:function(){return void 0===k.cache.isFirefox&&(k.cache.isFirefox=!!j.InstallTrigger),k.cache.isFirefox},iframe:function(){return!(j.self===j.top)},mobile:function(){const e=navigator.userAgent;return e.match(n.mobile)?(k.verbose("Browser was found to be mobile",e),!0):(k.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!k.is.visible()},visible:function(){return l.hasClass(s.visible)},open:function(){return k.is.visible()},closed:function(){return k.is.hidden()},vertical:function(){return l.hasClass(s.top)},animating:function(){return c.hasClass(s.animating)},rtl:function(){return void 0===k.cache.isRTL&&(k.cache.isRTL="rtl"===l.attr("dir")||"rtl"===l.css("direction")||"rtl"===F.attr("dir")||"rtl"===F.css("direction")||"rtl"===c.attr("dir")||"rtl"===c.css("direction")),k.cache.isRTL}},setting:function(e,i){if(k.debug("Changing setting",e,i),R.isPlainObject(e))R.extend(!0,r,e);else{if(void 0===i)return r[e];R.isPlainObject(r[e])?R.extend(!0,r[e],i):r[e]=i}},internal:function(e,i){if(R.isPlainObject(e))R.extend(!0,k,e);else{if(void 0===i)return k[e];k[e]=i}},debug:function(...e){!r.silent&&r.debug&&(r.performance?k.performance.log(e):(k.debug=Function.prototype.bind.call(console.info,console,r.name+":"),k.debug.apply(console,e)))},verbose:function(...e){!r.silent&&r.verbose&&r.debug&&(r.performance?k.performance.log(e):(k.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),k.verbose.apply(console,e)))},error:function(...e){r.silent||(k.error=Function.prototype.bind.call(console.error,console,r.name+":"),k.error.apply(console,e))},performance:{log:function(e){var i,n;r.performance&&(n=(i=Date.now())-(H||i),H=i,M.push({Name:e[0],Arguments:e.slice(1),Element:b,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(function(){k.performance.display()},500)},display:function(){var e=r.name+":";let n=0;H=!1,clearTimeout(k.performance.timer),R.each(M,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",0<M.length&&(console.groupCollapsed(e),console.table(M),console.groupEnd()),M=[]}},invoke:function(t,e=E,i=b){let o=m,r,s,n;return"string"==typeof t&&void 0!==o&&(t=t.split(/[ .]/),r=t.length-1,R.each(t,function(e,i){var n=e!==r?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(R.isPlainObject(o[n])&&e!==r)o=o[n];else{if(void 0!==o[n])return s=o[n],!1;{if(!R.isPlainObject(o[i])||e===r)return void 0!==o[i]?s=o[i]:k.error(a.method,t),!1;o=o[i]}}})),q(s)?n=s.apply(i,e):void 0!==s&&(n=s),Array.isArray(D)?D.push(n):void 0!==D?D=[D,n]:void 0!==n&&(D=n),s}};O?(void 0===m&&k.initialize(),k.invoke(B)):(void 0!==m&&k.invoke("destroy"),k.initialize())}),void 0!==D?D:this},R.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document);
|
package/dist/components/site.css
CHANGED