fomantic-ui 2.10.0-beta.0 → 2.10.0-beta.10

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.
Files changed (288) hide show
  1. package/.all-contributorsrc +9 -0
  2. package/.eslintrc.js +0 -10
  3. package/.github/workflows/ci.yml +3 -3
  4. package/CONTRIBUTING.md +4 -1
  5. package/CONTRIBUTORS.md +1 -0
  6. package/FAQ.md +7 -2
  7. package/README.md +5 -9
  8. package/ROADMAP.md +4 -4
  9. package/SECURITY.md +8 -7
  10. package/changelog-setup.js +64 -70
  11. package/dist/components/accordion.css +1 -1
  12. package/dist/components/accordion.js +103 -142
  13. package/dist/components/accordion.min.css +1 -1
  14. package/dist/components/accordion.min.js +2 -2
  15. package/dist/components/ad.css +1 -1
  16. package/dist/components/ad.min.css +1 -1
  17. package/dist/components/api.js +157 -210
  18. package/dist/components/api.min.js +2 -2
  19. package/dist/components/breadcrumb.css +1 -1
  20. package/dist/components/breadcrumb.min.css +1 -1
  21. package/dist/components/button.css +1 -2
  22. package/dist/components/button.min.css +2 -2
  23. package/dist/components/calendar.css +1 -2
  24. package/dist/components/calendar.js +314 -352
  25. package/dist/components/calendar.min.css +2 -2
  26. package/dist/components/calendar.min.js +2 -2
  27. package/dist/components/card.css +1 -1
  28. package/dist/components/card.min.css +1 -1
  29. package/dist/components/checkbox.css +1 -2
  30. package/dist/components/checkbox.js +85 -135
  31. package/dist/components/checkbox.min.css +2 -2
  32. package/dist/components/checkbox.min.js +2 -2
  33. package/dist/components/comment.css +1 -1
  34. package/dist/components/comment.min.css +1 -1
  35. package/dist/components/container.css +2 -4
  36. package/dist/components/container.min.css +2 -2
  37. package/dist/components/dimmer.css +1 -11
  38. package/dist/components/dimmer.js +61 -94
  39. package/dist/components/dimmer.min.css +2 -2
  40. package/dist/components/dimmer.min.js +2 -2
  41. package/dist/components/divider.css +1 -2
  42. package/dist/components/divider.min.css +2 -2
  43. package/dist/components/dropdown.css +30 -51
  44. package/dist/components/dropdown.js +736 -1055
  45. package/dist/components/dropdown.min.css +2 -2
  46. package/dist/components/dropdown.min.js +2 -2
  47. package/dist/components/embed.css +1 -1
  48. package/dist/components/embed.js +85 -114
  49. package/dist/components/embed.min.css +1 -1
  50. package/dist/components/embed.min.js +2 -2
  51. package/dist/components/emoji.css +3809 -7617
  52. package/dist/components/emoji.min.css +2 -2
  53. package/dist/components/feed.css +1 -1
  54. package/dist/components/feed.min.css +1 -1
  55. package/dist/components/flag.css +1 -1
  56. package/dist/components/flag.min.css +1 -1
  57. package/dist/components/flyout.css +2 -3
  58. package/dist/components/flyout.js +226 -355
  59. package/dist/components/flyout.min.css +2 -2
  60. package/dist/components/flyout.min.js +2 -2
  61. package/dist/components/form.css +5 -95
  62. package/dist/components/form.js +335 -444
  63. package/dist/components/form.min.css +2 -2
  64. package/dist/components/form.min.js +2 -2
  65. package/dist/components/grid.css +2 -58
  66. package/dist/components/grid.min.css +2 -2
  67. package/dist/components/header.css +1 -1
  68. package/dist/components/header.min.css +1 -1
  69. package/dist/components/icon.css +4 -4
  70. package/dist/components/icon.min.css +2 -2
  71. package/dist/components/image.css +1 -1
  72. package/dist/components/image.min.css +1 -1
  73. package/dist/components/input.css +1 -536
  74. package/dist/components/input.min.css +2 -2
  75. package/dist/components/item.css +1 -1
  76. package/dist/components/item.min.css +1 -1
  77. package/dist/components/label.css +1 -1
  78. package/dist/components/label.min.css +1 -1
  79. package/dist/components/list.css +1 -3
  80. package/dist/components/list.min.css +2 -2
  81. package/dist/components/loader.css +1 -1
  82. package/dist/components/loader.min.css +1 -1
  83. package/dist/components/menu.css +1 -9
  84. package/dist/components/menu.min.css +2 -2
  85. package/dist/components/message.css +1 -1
  86. package/dist/components/message.min.css +1 -1
  87. package/dist/components/modal.css +5 -9
  88. package/dist/components/modal.js +261 -384
  89. package/dist/components/modal.min.css +2 -2
  90. package/dist/components/modal.min.js +2 -2
  91. package/dist/components/nag.css +1 -1
  92. package/dist/components/nag.js +68 -98
  93. package/dist/components/nag.min.css +1 -1
  94. package/dist/components/nag.min.js +2 -2
  95. package/dist/components/placeholder.css +1 -1
  96. package/dist/components/placeholder.min.css +1 -1
  97. package/dist/components/popup.css +1 -2
  98. package/dist/components/popup.js +198 -271
  99. package/dist/components/popup.min.css +2 -2
  100. package/dist/components/popup.min.js +2 -2
  101. package/dist/components/progress.css +1 -1
  102. package/dist/components/progress.js +109 -144
  103. package/dist/components/progress.min.css +1 -1
  104. package/dist/components/progress.min.js +2 -2
  105. package/dist/components/rail.css +1 -1
  106. package/dist/components/rail.min.css +1 -1
  107. package/dist/components/rating.css +1 -1
  108. package/dist/components/rating.js +91 -123
  109. package/dist/components/rating.min.css +1 -1
  110. package/dist/components/rating.min.js +2 -2
  111. package/dist/components/reset.css +1 -1
  112. package/dist/components/reset.min.css +1 -1
  113. package/dist/components/reveal.css +1 -1
  114. package/dist/components/reveal.min.css +1 -1
  115. package/dist/components/search.css +2 -9
  116. package/dist/components/search.js +277 -379
  117. package/dist/components/search.min.css +2 -2
  118. package/dist/components/search.min.js +2 -2
  119. package/dist/components/segment.css +2 -7
  120. package/dist/components/segment.min.css +2 -2
  121. package/dist/components/shape.css +1 -2
  122. package/dist/components/shape.js +158 -224
  123. package/dist/components/shape.min.css +2 -2
  124. package/dist/components/shape.min.js +2 -2
  125. package/dist/components/sidebar.css +2 -3
  126. package/dist/components/sidebar.js +124 -206
  127. package/dist/components/sidebar.min.css +2 -2
  128. package/dist/components/sidebar.min.js +2 -2
  129. package/dist/components/site.css +9 -25
  130. package/dist/components/site.js +38 -57
  131. package/dist/components/site.min.css +2 -2
  132. package/dist/components/site.min.js +2 -2
  133. package/dist/components/slider.css +1 -1
  134. package/dist/components/slider.js +246 -329
  135. package/dist/components/slider.min.css +1 -1
  136. package/dist/components/slider.min.js +2 -2
  137. package/dist/components/state.js +70 -100
  138. package/dist/components/state.min.js +2 -2
  139. package/dist/components/statistic.css +1 -1
  140. package/dist/components/statistic.min.css +1 -1
  141. package/dist/components/step.css +1 -1
  142. package/dist/components/step.min.css +1 -1
  143. package/dist/components/sticky.css +1 -1
  144. package/dist/components/sticky.js +135 -180
  145. package/dist/components/sticky.min.css +1 -1
  146. package/dist/components/sticky.min.js +2 -2
  147. package/dist/components/tab.css +1 -1
  148. package/dist/components/tab.js +176 -244
  149. package/dist/components/tab.min.css +1 -1
  150. package/dist/components/tab.min.js +2 -2
  151. package/dist/components/table.css +3 -37
  152. package/dist/components/table.min.css +2 -2
  153. package/dist/components/text.css +1 -1
  154. package/dist/components/text.min.css +1 -1
  155. package/dist/components/toast.css +1 -3
  156. package/dist/components/toast.js +109 -147
  157. package/dist/components/toast.min.css +1 -1
  158. package/dist/components/toast.min.js +2 -2
  159. package/dist/components/transition.css +1 -1
  160. package/dist/components/transition.js +91 -146
  161. package/dist/components/transition.min.css +1 -1
  162. package/dist/components/transition.min.js +2 -2
  163. package/dist/components/visibility.js +146 -224
  164. package/dist/components/visibility.min.js +2 -2
  165. package/dist/semantic.css +3906 -8720
  166. package/dist/semantic.js +4397 -6155
  167. package/dist/semantic.min.css +2 -2
  168. package/dist/semantic.min.js +2 -2
  169. package/examples/assets/show-examples.js +2 -4
  170. package/gulpfile.js +5 -7
  171. package/package.json +20 -16
  172. package/scripts/nightly-version.js +7 -10
  173. package/src/README.md +3 -3
  174. package/src/definitions/behaviors/api.js +156 -209
  175. package/src/definitions/behaviors/form.js +334 -443
  176. package/src/definitions/behaviors/state.js +69 -99
  177. package/src/definitions/behaviors/visibility.js +145 -223
  178. package/src/definitions/collections/form.less +1 -13
  179. package/src/definitions/collections/grid.less +1 -61
  180. package/src/definitions/collections/menu.less +0 -11
  181. package/src/definitions/collections/table.less +1 -35
  182. package/src/definitions/elements/input.less +1 -61
  183. package/src/definitions/elements/segment.less +0 -6
  184. package/src/definitions/globals/site.js +37 -56
  185. package/src/definitions/globals/site.less +2 -18
  186. package/src/definitions/modules/accordion.js +102 -141
  187. package/src/definitions/modules/calendar.js +313 -351
  188. package/src/definitions/modules/checkbox.js +84 -134
  189. package/src/definitions/modules/dimmer.js +60 -93
  190. package/src/definitions/modules/dimmer.less +0 -9
  191. package/src/definitions/modules/dropdown.js +735 -1054
  192. package/src/definitions/modules/dropdown.less +31 -47
  193. package/src/definitions/modules/embed.js +84 -113
  194. package/src/definitions/modules/flyout.js +225 -354
  195. package/src/definitions/modules/modal.js +260 -383
  196. package/src/definitions/modules/modal.less +1 -1
  197. package/src/definitions/modules/nag.js +67 -97
  198. package/src/definitions/modules/popup.js +197 -270
  199. package/src/definitions/modules/progress.js +108 -143
  200. package/src/definitions/modules/rating.js +90 -122
  201. package/src/definitions/modules/search.js +276 -378
  202. package/src/definitions/modules/search.less +0 -3
  203. package/src/definitions/modules/shape.js +157 -223
  204. package/src/definitions/modules/sidebar.js +123 -205
  205. package/src/definitions/modules/slider.js +245 -328
  206. package/src/definitions/modules/slider.less +1 -1
  207. package/src/definitions/modules/sticky.js +134 -179
  208. package/src/definitions/modules/tab.js +175 -243
  209. package/src/definitions/modules/toast.js +108 -146
  210. package/src/definitions/modules/toast.less +1 -1
  211. package/src/definitions/modules/transition.js +90 -145
  212. package/src/theme.less +0 -13
  213. package/src/themes/basic/elements/icon.variables +1 -1
  214. package/src/themes/default/collections/grid.variables +0 -30
  215. package/src/themes/default/collections/table.variables +1 -5
  216. package/src/themes/default/elements/icon.variables +3 -3
  217. package/src/themes/default/globals/site.variables +8 -15
  218. package/src/themes/default/globals/variation.variables +1 -2
  219. package/src/themes/default/modules/dropdown.variables +1 -0
  220. package/src/themes/default/modules/slider.variables +1 -1
  221. package/src/themes/github/elements/icon.variables +1 -1
  222. package/src/themes/material/elements/icon.variables +1 -1
  223. package/tasks/README.md +1 -1
  224. package/tasks/admin/components/create.js +89 -122
  225. package/tasks/admin/components/init.js +34 -65
  226. package/tasks/admin/components/update.js +50 -61
  227. package/tasks/admin/distributions/create.js +71 -111
  228. package/tasks/admin/distributions/init.js +32 -63
  229. package/tasks/admin/distributions/update.js +49 -57
  230. package/tasks/admin/publish.js +1 -1
  231. package/tasks/admin/register.js +14 -19
  232. package/tasks/admin/release.js +2 -2
  233. package/tasks/build/assets.js +14 -18
  234. package/tasks/build/css.js +59 -68
  235. package/tasks/build/javascript.js +48 -56
  236. package/tasks/build.js +4 -6
  237. package/tasks/check-install.js +5 -8
  238. package/tasks/clean.js +5 -7
  239. package/tasks/collections/admin.js +14 -16
  240. package/tasks/collections/build.js +6 -8
  241. package/tasks/collections/docs.js +4 -6
  242. package/tasks/collections/install.js +2 -4
  243. package/tasks/collections/rtl.js +2 -4
  244. package/tasks/collections/various.js +2 -4
  245. package/tasks/config/admin/github.js +9 -19
  246. package/tasks/config/admin/templates/README.md +2 -2
  247. package/tasks/config/admin/templates/bower.json +2 -4
  248. package/tasks/config/admin/templates/composer.json +1 -1
  249. package/tasks/config/admin/templates/css-package.js +1 -4
  250. package/tasks/config/admin/templates/less-package.js +1 -3
  251. package/tasks/config/defaults.js +0 -1
  252. package/tasks/config/npm/gulpfile.js +4 -6
  253. package/tasks/config/project/config.js +27 -35
  254. package/tasks/config/project/install.js +64 -82
  255. package/tasks/config/project/release.js +7 -9
  256. package/tasks/config/tasks.js +16 -30
  257. package/tasks/config/user.js +14 -20
  258. package/tasks/docs/build.js +26 -31
  259. package/tasks/docs/metadata.js +30 -39
  260. package/tasks/docs/serve.js +23 -27
  261. package/tasks/install.js +94 -128
  262. package/tasks/rtl/build.js +2 -4
  263. package/tasks/rtl/watch.js +3 -5
  264. package/tasks/watch.js +13 -13
  265. package/test/meteor/fonts.js +1 -2
  266. package/test/modules/module.spec.js +16 -18
  267. package/types/fomantic-ui-calendar.d.ts +1 -1
  268. package/types/fomantic-ui-dropdown.d.ts +45 -1
  269. package/types/fomantic-ui-embed.d.ts +1 -1
  270. package/types/fomantic-ui-flyout.d.ts +1 -1
  271. package/types/fomantic-ui-form.d.ts +0 -7
  272. package/types/fomantic-ui-modal.d.ts +1 -1
  273. package/types/fomantic-ui-search.d.ts +12 -6
  274. package/types/fomantic-ui-toast.d.ts +1 -1
  275. package/src/themes/basic/assets/fonts/icons.woff +0 -0
  276. package/src/themes/default/assets/fonts/Lato-Bold.woff +0 -0
  277. package/src/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
  278. package/src/themes/default/assets/fonts/Lato-Italic.woff +0 -0
  279. package/src/themes/default/assets/fonts/Lato-Regular.woff +0 -0
  280. package/src/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
  281. package/src/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
  282. package/src/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
  283. package/src/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
  284. package/src/themes/default/assets/fonts/brand-icons.woff +0 -0
  285. package/src/themes/default/assets/fonts/icons.woff +0 -0
  286. package/src/themes/default/assets/fonts/outline-icons.woff +0 -0
  287. package/src/themes/github/assets/fonts/octicons.woff +0 -0
  288. package/src/themes/material/assets/fonts/icons.woff +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.0+f24b47e - Sticky
2
+ * # Fomantic-UI 2.10.0-beta.10+3ca268e - Sticky
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -20,59 +20,55 @@
20
20
  : globalThis;
21
21
 
22
22
  $.fn.sticky = function (parameters) {
23
- var
24
- $allModules = $(this),
25
- $document = $(document),
26
-
27
- time = Date.now(),
28
- performance = [],
29
-
30
- query = arguments[0],
31
- methodInvoked = typeof query === 'string',
32
- queryArguments = [].slice.call(arguments, 1),
33
- contextCheck = function (context, win) {
34
- var $context;
35
- if ([window, document].indexOf(context) >= 0) {
36
- $context = $(context);
37
- } else {
38
- $context = $(win.document).find(context);
39
- if ($context.length === 0) {
40
- $context = win.frameElement ? contextCheck(context, win.parent) : window;
41
- }
23
+ let $allModules = $(this);
24
+ let $document = $(document);
25
+
26
+ let time = Date.now();
27
+ let performance = [];
28
+
29
+ let query = arguments[0];
30
+ let methodInvoked = typeof query === 'string';
31
+ let queryArguments = [].slice.call(arguments, 1);
32
+ let contextCheck = function (context, win) {
33
+ let $context;
34
+ if ([window, document].indexOf(context) >= 0) {
35
+ $context = $(context);
36
+ } else {
37
+ $context = $(win.document).find(context);
38
+ if ($context.length === 0) {
39
+ $context = win.frameElement ? contextCheck(context, win.parent) : window;
42
40
  }
41
+ }
43
42
 
44
- return $context;
45
- },
46
- returnedValue
47
- ;
43
+ return $context;
44
+ };
45
+ let returnedValue;
48
46
 
49
47
  $allModules.each(function () {
50
- var
51
- settings = $.isPlainObject(parameters)
52
- ? $.extend(true, {}, $.fn.sticky.settings, parameters)
53
- : $.extend({}, $.fn.sticky.settings),
48
+ let settings = $.isPlainObject(parameters)
49
+ ? $.extend(true, {}, $.fn.sticky.settings, parameters)
50
+ : $.extend({}, $.fn.sticky.settings);
54
51
 
55
- className = settings.className,
56
- namespace = settings.namespace,
57
- error = settings.error,
52
+ let className = settings.className;
53
+ let namespace = settings.namespace;
54
+ let error = settings.error;
58
55
 
59
- eventNamespace = '.' + namespace,
60
- moduleNamespace = 'module-' + namespace,
56
+ let eventNamespace = '.' + namespace;
57
+ let moduleNamespace = 'module-' + namespace;
61
58
 
62
- $module = $(this),
63
- $window = $(window),
64
- $scroll = contextCheck(settings.scrollContext, window),
65
- $container,
66
- $context,
59
+ let $module = $(this);
60
+ let $window = $(window);
61
+ let $scroll = contextCheck(settings.scrollContext, window);
62
+ let $container;
63
+ let $context;
67
64
 
68
- instance = $module.data(moduleNamespace),
65
+ let instance = $module.data(moduleNamespace);
69
66
 
70
- element = this,
67
+ let element = this;
71
68
 
72
- documentObserver,
73
- observer,
74
- module
75
- ;
69
+ let documentObserver;
70
+ let observer;
71
+ let module;
76
72
 
77
73
  module = {
78
74
 
@@ -95,8 +91,7 @@
95
91
  module.verbose('Storing instance of module', module);
96
92
  instance = module;
97
93
  $module
98
- .data(moduleNamespace, module)
99
- ;
94
+ .data(moduleNamespace, module);
100
95
  },
101
96
 
102
97
  destroy: function () {
@@ -110,32 +105,28 @@
110
105
  }
111
106
  $window
112
107
  .off('load' + eventNamespace, module.event.load)
113
- .off('resize' + eventNamespace, module.event.resize)
114
- ;
108
+ .off('resize' + eventNamespace, module.event.resize);
115
109
  $scroll
116
- .off('scrollchange' + eventNamespace, module.event.scrollchange)
117
- ;
110
+ .off('scrollchange' + eventNamespace, module.event.scrollchange);
118
111
  $module.removeData(moduleNamespace);
119
112
  },
120
113
 
121
114
  observeChanges: function () {
122
- if ('MutationObserver' in window) {
123
- documentObserver = new MutationObserver(module.event.documentChanged);
124
- observer = new MutationObserver(module.event.changed);
125
- documentObserver.observe(document, {
126
- childList: true,
127
- subtree: true,
128
- });
129
- observer.observe(element, {
130
- childList: true,
131
- subtree: true,
132
- });
133
- observer.observe($context[0], {
134
- childList: true,
135
- subtree: true,
136
- });
137
- module.debug('Setting up mutation observer', observer);
138
- }
115
+ documentObserver = new MutationObserver(module.event.documentChanged);
116
+ observer = new MutationObserver(module.event.changed);
117
+ documentObserver.observe(document, {
118
+ childList: true,
119
+ subtree: true,
120
+ });
121
+ observer.observe(element, {
122
+ childList: true,
123
+ subtree: true,
124
+ });
125
+ observer.observe($context[0], {
126
+ childList: true,
127
+ subtree: true,
128
+ });
129
+ module.debug('Setting up mutation observer', observer);
139
130
  },
140
131
 
141
132
  determineContainer: function () {
@@ -163,14 +154,12 @@
163
154
  events: function () {
164
155
  $window
165
156
  .on('load' + eventNamespace, module.event.load)
166
- .on('resize' + eventNamespace, module.event.resize)
167
- ;
157
+ .on('resize' + eventNamespace, module.event.resize);
168
158
  // pub/sub pattern
169
159
  $scroll
170
160
  .off('scroll' + eventNamespace)
171
161
  .on('scroll' + eventNamespace, module.event.scroll)
172
- .on('scrollchange' + eventNamespace, module.event.scrollchange)
173
- ;
162
+ .on('scrollchange' + eventNamespace, module.event.scrollchange);
174
163
  },
175
164
  },
176
165
 
@@ -228,9 +217,7 @@
228
217
 
229
218
  supports: {
230
219
  sticky: function () {
231
- var
232
- $element = $('<div/>')
233
- ;
220
+ let $element = $('<div/>');
234
221
  $element.addClass(className.supported);
235
222
 
236
223
  return $element.css('position').match('sticky');
@@ -245,24 +232,22 @@
245
232
  module.elementScroll = scroll;
246
233
  },
247
234
  positions: function () {
248
- var
249
- scrollContext = {
250
- height: $scroll.height(),
251
- },
252
- element = {
253
- margin: {
254
- top: parseInt($module.css('margin-top'), 10),
255
- bottom: parseInt($module.css('margin-bottom'), 10),
256
- },
257
- offset: $module.offset(),
258
- width: $module.outerWidth(),
259
- height: $module.outerHeight(),
235
+ let scrollContext = {
236
+ height: $scroll.height(),
237
+ };
238
+ let element = {
239
+ margin: {
240
+ top: parseInt($module.css('margin-top'), 10),
241
+ bottom: parseInt($module.css('margin-bottom'), 10),
260
242
  },
261
- context = {
262
- offset: $context.offset(),
263
- height: $context.outerHeight(),
264
- }
265
- ;
243
+ offset: $module.offset(),
244
+ width: $module.outerWidth(),
245
+ height: $module.outerHeight(),
246
+ };
247
+ let context = {
248
+ offset: $context.offset(),
249
+ height: $context.outerHeight(),
250
+ };
266
251
  if (!module.is.standardScroll()) {
267
252
  module.debug('Non-standard scroll. Removing scroll offset from element offset');
268
253
 
@@ -303,9 +288,7 @@
303
288
 
304
289
  get: {
305
290
  direction: function (scroll) {
306
- var
307
- direction = 'down'
308
- ;
291
+ let direction = 'down';
309
292
  scroll = scroll || $scroll.scrollTop();
310
293
  if (module.lastScroll && module.lastScroll > scroll) {
311
294
  direction = 'up';
@@ -332,14 +315,12 @@
332
315
 
333
316
  elementScroll: function (scroll) {
334
317
  scroll = scroll || $scroll.scrollTop();
335
- var
336
- element = module.cache.element,
337
- scrollContext = module.cache.scrollContext,
338
- delta = module.get.scrollChange(scroll),
339
- maxScroll = element.height - scrollContext.height + settings.offset,
340
- elementScroll = module.get.currentElementScroll(),
341
- possibleScroll = elementScroll + delta
342
- ;
318
+ let element = module.cache.element;
319
+ let scrollContext = module.cache.scrollContext;
320
+ let delta = module.get.scrollChange(scroll);
321
+ let maxScroll = element.height - scrollContext.height + settings.offset;
322
+ let elementScroll = module.get.currentElementScroll();
323
+ let possibleScroll = elementScroll + delta;
343
324
  if (module.cache.fits || possibleScroll < 0) {
344
325
  elementScroll = 0;
345
326
  } else if (possibleScroll > maxScroll) {
@@ -361,8 +342,7 @@
361
342
  },
362
343
  minimumSize: function () {
363
344
  $container
364
- .css('min-height', '')
365
- ;
345
+ .css('min-height', '');
366
346
  },
367
347
  offset: function () {
368
348
  $module.css('margin-top', '');
@@ -373,17 +353,14 @@
373
353
  offset: function () {
374
354
  module.verbose('Setting offset on element', settings.offset);
375
355
  $module
376
- .css('margin-top', settings.offset)
377
- ;
356
+ .css('margin-top', settings.offset);
378
357
  },
379
358
  containerSize: function () {
380
- var
381
- tagName = $container[0].tagName
382
- ;
359
+ let tagName = $container[0].tagName;
383
360
  if (tagName === 'HTML' || tagName === 'body') {
384
361
  module.determineContainer();
385
362
  } else {
386
- var tallestHeight = Math.max(module.cache.context.height, module.cache.element.height);
363
+ let tallestHeight = Math.max(module.cache.context.height, module.cache.element.height);
387
364
  if (tallestHeight - $container.outerHeight() > settings.jitter) {
388
365
  module.debug('Context is taller than container. Specifying exact height for container', module.cache.context.height);
389
366
  $container.css({
@@ -403,12 +380,9 @@
403
380
  }
404
381
  },
405
382
  minimumSize: function () {
406
- var
407
- element = module.cache.element
408
- ;
383
+ let element = module.cache.element;
409
384
  $container
410
- .css('min-height', element.height)
411
- ;
385
+ .css('min-height', element.height);
412
386
  },
413
387
  scroll: function (scroll) {
414
388
  module.debug('Setting scroll on element', scroll);
@@ -418,14 +392,12 @@
418
392
  if (module.is.top()) {
419
393
  $module
420
394
  .css('bottom', '')
421
- .css('top', -scroll + 'px')
422
- ;
395
+ .css('top', -scroll + 'px');
423
396
  }
424
397
  if (module.is.bottom()) {
425
398
  $module
426
399
  .css('top', '')
427
- .css('bottom', scroll + 'px')
428
- ;
400
+ .css('bottom', scroll + 'px');
429
401
  }
430
402
  },
431
403
  size: function () {
@@ -461,29 +433,27 @@
461
433
  },
462
434
 
463
435
  stick: function (scrollPosition) {
464
- var
465
- cachedPosition = scrollPosition || $scroll.scrollTop(),
466
- cache = module.cache,
467
- fits = cache.fits,
468
- sameHeight = cache.sameHeight,
469
- element = cache.element,
470
- scrollContext = cache.scrollContext,
471
- context = cache.context,
472
- offset = module.is.bottom() && settings.pushing
473
- ? settings.bottomOffset
474
- : settings.offset,
475
- scroll = {
476
- top: cachedPosition + offset,
477
- bottom: cachedPosition + offset + scrollContext.height,
478
- },
479
- elementScroll = fits
480
- ? 0
481
- : module.get.elementScroll(scroll.top),
482
-
483
- // shorthand
484
- doesntFit = !fits,
485
- elementVisible = element.height !== 0
486
- ;
436
+ let cachedPosition = scrollPosition || $scroll.scrollTop();
437
+ let cache = module.cache;
438
+ let fits = cache.fits;
439
+ let sameHeight = cache.sameHeight;
440
+ let element = cache.element;
441
+ let scrollContext = cache.scrollContext;
442
+ let context = cache.context;
443
+ let offset = module.is.bottom() && settings.pushing
444
+ ? settings.bottomOffset
445
+ : settings.offset;
446
+ let scroll = {
447
+ top: cachedPosition + offset,
448
+ bottom: cachedPosition + offset + scrollContext.height,
449
+ };
450
+ let elementScroll = fits
451
+ ? 0
452
+ : module.get.elementScroll(scroll.top);
453
+
454
+ // shorthand
455
+ let doesntFit = !fits;
456
+ let elementVisible = element.height !== 0;
487
457
  if (elementVisible && !sameHeight) {
488
458
  if (module.is.initialPosition()) {
489
459
  if (scroll.top >= context.bottom) {
@@ -560,8 +530,7 @@
560
530
  .removeClass(className.fixed)
561
531
  .removeClass(className.bottom)
562
532
  .addClass(className.bound)
563
- .addClass(className.top)
564
- ;
533
+ .addClass(className.top);
565
534
  settings.onTop.call(element);
566
535
  settings.onUnstick.call(element);
567
536
  },
@@ -579,8 +548,7 @@
579
548
  .removeClass(className.fixed)
580
549
  .removeClass(className.top)
581
550
  .addClass(className.bound)
582
- .addClass(className.bottom)
583
- ;
551
+ .addClass(className.bottom);
584
552
  settings.onBottom.call(element);
585
553
  settings.onUnstick.call(element);
586
554
  },
@@ -607,8 +575,7 @@
607
575
  .removeClass(className.bound)
608
576
  .removeClass(className.bottom)
609
577
  .addClass(className.fixed)
610
- .addClass(className.top)
611
- ;
578
+ .addClass(className.top);
612
579
  settings.onStick.call(element);
613
580
  },
614
581
 
@@ -628,8 +595,7 @@
628
595
  .removeClass(className.bound)
629
596
  .removeClass(className.top)
630
597
  .addClass(className.fixed)
631
- .addClass(className.bottom)
632
- ;
598
+ .addClass(className.bottom);
633
599
  settings.onStick.call(element);
634
600
  },
635
601
 
@@ -640,8 +606,7 @@
640
606
  $module
641
607
  .removeClass(className.bound)
642
608
  .removeClass(className.top)
643
- .removeClass(className.bottom)
644
- ;
609
+ .removeClass(className.bottom);
645
610
  }
646
611
  },
647
612
 
@@ -653,8 +618,7 @@
653
618
  $module
654
619
  .removeClass(className.fixed)
655
620
  .removeClass(className.top)
656
- .removeClass(className.bottom)
657
- ;
621
+ .removeClass(className.bottom);
658
622
  settings.onUnstick.call(element);
659
623
  }
660
624
  },
@@ -673,13 +637,11 @@
673
637
  .css({
674
638
  width: '',
675
639
  height: '',
676
- })
677
- ;
640
+ });
678
641
  $container
679
642
  .css({
680
643
  height: '',
681
- })
682
- ;
644
+ });
683
645
  },
684
646
 
685
647
  setting: function (name, value) {
@@ -728,11 +690,9 @@
728
690
  },
729
691
  performance: {
730
692
  log: function (message) {
731
- var
732
- currentTime,
733
- executionTime,
734
- previousTime
735
- ;
693
+ let currentTime;
694
+ let executionTime;
695
+ let previousTime;
736
696
  if (settings.performance) {
737
697
  currentTime = Date.now();
738
698
  previousTime = time || currentTime;
@@ -751,10 +711,8 @@
751
711
  }, 0);
752
712
  },
753
713
  display: function () {
754
- var
755
- title = settings.name + ':',
756
- totalTime = 0
757
- ;
714
+ let title = settings.name + ':';
715
+ let totalTime = 0;
758
716
  time = false;
759
717
  clearTimeout(module.performance.timer);
760
718
  $.each(performance, function (index, data) {
@@ -776,22 +734,19 @@
776
734
  },
777
735
  },
778
736
  invoke: function (query, passedArguments, context) {
779
- var
780
- object = instance,
781
- maxDepth,
782
- found,
783
- response
784
- ;
737
+ let object = instance;
738
+ let maxDepth;
739
+ let found;
740
+ let response;
785
741
  passedArguments = passedArguments || queryArguments;
786
742
  context = context || element;
787
743
  if (typeof query === 'string' && object !== undefined) {
788
744
  query = query.split(/[ .]/);
789
745
  maxDepth = query.length - 1;
790
746
  $.each(query, function (depth, value) {
791
- var camelCaseValue = depth !== maxDepth
747
+ let camelCaseValue = depth !== maxDepth
792
748
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
793
- : query
794
- ;
749
+ : query;
795
750
  if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
796
751
  object = object[camelCaseValue];
797
752
  } else if (object[camelCaseValue] !== undefined) {
@@ -871,10 +826,10 @@
871
826
  // Offset to adjust scroll when attached to bottom of screen
872
827
  bottomOffset: 0,
873
828
 
874
- // will only set container height if difference between context and container is larger than this number
829
+ // will only set container height if the difference between context and container is larger than this number
875
830
  jitter: 5,
876
831
 
877
- // set width of sticky element when it is fixed to page (used to make sure 100% width is maintained if no fixed size set)
832
+ // set width of the sticky element when it is fixed to page (used to make sure 100% width is maintained if no fixed size set)
878
833
  setSize: true,
879
834
 
880
835
  // Whether to automatically observe changes with Mutation Observers
@@ -886,10 +841,10 @@
886
841
  // Called on each scroll
887
842
  onScroll: function () {},
888
843
 
889
- // Called when element is stuck to viewport
844
+ // Called when the element is stuck to viewport
890
845
  onStick: function () {},
891
846
 
892
- // Called when element is unstuck from viewport
847
+ // Called when the element is unstuck from viewport
893
848
  onUnstick: function () {},
894
849
 
895
850
  // Called when element reaches top of context
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.0+f24b47e - Sticky
2
+ * # Fomantic-UI 2.10.0-beta.10+3ca268e - Sticky
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.10.0-beta.0+f24b47e
2
+ * # Fomantic UI - 2.10.0-beta.10+3ca268e
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -8,4 +8,4 @@
8
8
  * https://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
- !function(z,T,w){"use strict";T=void 0!==T&&T.Math===Math?T:globalThis,z.fn.sticky=function(p){var b,e=z(this),v=(z(w),Date.now()),x=[],C=p,S="string"==typeof C,y=[].slice.call(arguments,1),k=function(e,t){var o;return 0<=[T,w].indexOf(e)?o=z(e):0===(o=z(t.document).find(e)).length&&(o=t.frameElement?k(e,t.parent):T),o};return e.each(function(){var t,n,e,o,c=z.isPlainObject(p)?z.extend(!0,{},z.fn.sticky.settings,p):z.extend({},z.fn.sticky.settings),i=c.className,s=c.namespace,l=c.error,r="."+s,a="module-"+s,f=z(this),m=z(T),d=k(c.scrollContext,T),u=f.data(a),h=this,g={initialize:function(){g.determineContainer(),g.determineContext(),g.verbose("Initializing sticky",c,t),g.save.positions(),g.checkErrors(),g.bind.events(),c.observeChanges&&g.observeChanges(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of module",g),u=g,f.data(a,g)},destroy:function(){g.verbose("Destroying previous instance"),g.reset(),e&&e.disconnect(),o&&o.disconnect(),m.off("load"+r,g.event.load).off("resize"+r,g.event.resize),d.off("scrollchange"+r,g.event.scrollchange),f.removeData(a)},observeChanges:function(){"MutationObserver"in T&&(e=new MutationObserver(g.event.documentChanged),o=new MutationObserver(g.event.changed),e.observe(w,{childList:!0,subtree:!0}),o.observe(h,{childList:!0,subtree:!0}),o.observe(n[0],{childList:!0,subtree:!0}),g.debug("Setting up mutation observer",o))},determineContainer:function(){t=c.container?k(c.container,T):f.offsetParent()},determineContext:function(){0===(n=c.context?k(c.context,T):t).length&&g.error(l.invalidContext,c.context,f)},checkErrors:function(){g.is.hidden()&&g.error(l.visible,f),g.cache.element.height>g.cache.context.height&&(g.reset(),g.error(l.elementSize,f))},bind:{events:function(){m.on("load"+r,g.event.load).on("resize"+r,g.event.resize),d.off("scroll"+r).on("scroll"+r,g.event.scroll).on("scrollchange"+r,g.event.scrollchange)}},event:{changed:function(e){clearTimeout(g.timer),g.timer=setTimeout(function(){g.verbose("DOM tree modified, updating sticky menu",e),g.refresh()},100)},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e===h||0<z(e).find(h).length)&&(g.debug("Element removed from DOM, tearing down events"),g.destroy())})})},load:function(){g.verbose("Page contents finished loading"),requestAnimationFrame(g.refresh)},resize:function(){g.verbose("Window resized"),requestAnimationFrame(g.refresh)},scroll:function(){requestAnimationFrame(function(){d.triggerHandler("scrollchange"+r,d.scrollTop())})},scrollchange:function(e,t){g.stick(t),c.onScroll.call(h)}},refresh:function(e){g.reset(),c.context||g.determineContext(),e&&g.determineContainer(),g.save.positions(),g.stick(),c.onReposition.call(h)},supports:{sticky:function(){var e=z("<div/>");return e.addClass(i.supported),e.css("position").match("sticky")}},save:{lastScroll:function(e){g.lastScroll=e},elementScroll:function(e){g.elementScroll=e},positions:function(){var e={height:d.height()},t={margin:{top:parseInt(f.css("margin-top"),10),bottom:parseInt(f.css("margin-bottom"),10)},offset:f.offset(),width:f.outerWidth(),height:f.outerHeight()},o={offset:n.offset(),height:n.outerHeight()};g.is.standardScroll()||(g.debug("Non-standard scroll. Removing scroll offset from element offset"),e.top=d.scrollTop(),e.left=d.scrollLeft(),t.offset.top+=e.top,o.offset.top+=e.top,t.offset.left+=e.left,o.offset.left+=e.left),g.cache={fits:t.height+c.offset<=e.height,sameHeight:t.height===o.height,scrollContext:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:o.offset.top,height:o.height,bottom:o.offset.top+o.height}},g.set.containerSize(),g.stick(),g.debug("Caching element positions",g.cache)}},get:{direction:function(e){var t="down";return e=e||d.scrollTop(),t=g.lastScroll&&g.lastScroll>e?"up":t},scrollChange:function(e){return e=e||d.scrollTop(),g.lastScroll?e-g.lastScroll:0},currentElementScroll:function(){return g.elementScroll||(g.is.top()?Math.abs(parseInt(f.css("top"),10))||0:Math.abs(parseInt(f.css("bottom"),10))||0)},elementScroll:function(e){e=e||d.scrollTop();var t=g.cache.element,o=g.cache.scrollContext,e=g.get.scrollChange(e),t=t.height-o.height+c.offset,o=g.get.currentElementScroll(),e=o+e;return o=g.cache.fits||e<0?0:t<e?t:e}},remove:{lastScroll:function(){delete g.lastScroll},elementScroll:function(){delete g.elementScroll},minimumSize:function(){t.css("min-height","")},offset:function(){f.css("margin-top","")}},set:{offset:function(){g.verbose("Setting offset on element",c.offset),f.css("margin-top",c.offset)},containerSize:function(){var e=t[0].tagName;"HTML"===e||"body"===e?g.determineContainer():((e=Math.max(g.cache.context.height,g.cache.element.height))-t.outerHeight()>c.jitter?(g.debug("Context is taller than container. Specifying exact height for container",g.cache.context.height),t.css({height:e})):t.css({height:""}),Math.abs(t.outerHeight()-g.cache.context.height)>c.jitter&&(g.debug("Context has padding, specifying exact height for container",g.cache.context.height),t.css({height:g.cache.context.height})))},minimumSize:function(){var e=g.cache.element;t.css("min-height",e.height)},scroll:function(e){g.debug("Setting scroll on element",e),g.elementScroll!==e&&(g.is.top()&&f.css("bottom","").css("top",-e+"px"),g.is.bottom()&&f.css("top","").css("bottom",e+"px"))},size:function(){0!==g.cache.element.height&&0!==g.cache.element.width&&(h.style.setProperty("width",g.cache.element.width+"px","important"),h.style.setProperty("height",g.cache.element.height+"px","important"))}},is:{standardScroll:function(){return d[0]===T},top:function(){return f.hasClass(i.top)},bottom:function(){return f.hasClass(i.bottom)},initialPosition:function(){return!g.is.fixed()&&!g.is.bound()},hidden:function(){return!f.is(":visible")},bound:function(){return f.hasClass(i.bound)},fixed:function(){return f.hasClass(i.fixed)}},stick:function(e){var e=e||d.scrollTop(),t=g.cache,o=t.fits,n=t.sameHeight,i=t.element,s=t.scrollContext,t=t.context,r=g.is.bottom()&&c.pushing?c.bottomOffset:c.offset,e={top:e+r,bottom:e+r+s.height},r=o?0:g.get.elementScroll(e.top),s=!o;0===i.height||n||(g.is.initialPosition()?e.top>=t.bottom?(g.debug("Initial element position is bottom of container"),g.bindBottom()):e.top>i.top&&(i.height+e.top-r>=t.bottom&&i.height<t.height?(g.debug("Initial element position is bottom of container"),g.bindBottom()):(g.debug("Initial element position is fixed"),g.fixTop())):g.is.fixed()?g.is.top()?e.top<=i.top?(g.debug("Fixed element reached top of container"),g.setInitialPosition()):i.height+e.top-r>=t.bottom?(g.debug("Fixed element reached bottom of container"),g.bindBottom()):s&&(g.set.scroll(r),g.save.lastScroll(e.top),g.save.elementScroll(r)):g.is.bottom()&&(e.bottom-i.height<=i.top?(g.debug("Bottom fixed rail has reached top of container"),g.setInitialPosition()):e.bottom>=t.bottom?(g.debug("Bottom fixed rail has reached bottom of container"),g.bindBottom()):s&&(g.set.scroll(r),g.save.lastScroll(e.top),g.save.elementScroll(r))):g.is.bottom()&&(e.top<=i.top?(g.debug("Jumped from bottom fixed to top fixed, most likely used home/end button"),g.setInitialPosition()):c.pushing?g.is.bound()&&e.bottom<=t.bottom&&(g.debug("Fixing bottom attached element to bottom of browser."),g.fixBottom()):g.is.bound()&&e.top<=t.bottom-i.height&&(g.debug("Fixing bottom attached element to top of browser."),g.fixTop())))},bindTop:function(){g.debug("Binding element to top of parent container"),g.remove.offset(),c.setSize&&g.set.size(),f.css({left:"",top:"",marginBottom:""}).removeClass(i.fixed).removeClass(i.bottom).addClass(i.bound).addClass(i.top),c.onTop.call(h),c.onUnstick.call(h)},bindBottom:function(){g.debug("Binding element to bottom of parent container"),g.remove.offset(),c.setSize&&g.set.size(),f.css({left:"",top:""}).removeClass(i.fixed).removeClass(i.top).addClass(i.bound).addClass(i.bottom),c.onBottom.call(h),c.onUnstick.call(h)},setInitialPosition:function(){g.debug("Returning to initial position"),g.unfix(),g.unbind()},fixTop:function(){g.debug("Fixing element to top of page"),c.setSize&&g.set.size(),g.set.minimumSize(),g.set.offset(),f.css({left:g.cache.element.left,bottom:"",marginBottom:""}).removeClass(i.bound).removeClass(i.bottom).addClass(i.fixed).addClass(i.top),c.onStick.call(h)},fixBottom:function(){g.debug("Sticking element to bottom of page"),c.setSize&&g.set.size(),g.set.minimumSize(),g.set.offset(),f.css({left:g.cache.element.left,bottom:"",marginBottom:""}).removeClass(i.bound).removeClass(i.top).addClass(i.fixed).addClass(i.bottom),c.onStick.call(h)},unbind:function(){g.is.bound()&&(g.debug("Removing container bound position on element"),g.remove.offset(),f.removeClass(i.bound).removeClass(i.top).removeClass(i.bottom))},unfix:function(){g.is.fixed()&&(g.debug("Removing fixed position on element"),g.remove.minimumSize(),g.remove.offset(),f.removeClass(i.fixed).removeClass(i.top).removeClass(i.bottom),c.onUnstick.call(h))},reset:function(){g.debug("Resetting elements position"),g.unbind(),g.unfix(),g.resetCSS(),g.remove.offset(),g.remove.lastScroll()},resetCSS:function(){f.css({width:"",height:""}),t.css({height:""})},setting:function(e,t){if(z.isPlainObject(e))z.extend(!0,c,e);else{if(void 0===t)return c[e];c[e]=t}},internal:function(e,t){if(z.isPlainObject(e))z.extend(!0,g,e);else{if(void 0===t)return g[e];g[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,c.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),g.verbose.apply(console,arguments)))},error:function(){c.silent||(g.error=Function.prototype.bind.call(console.error,console,c.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,o;c.performance&&(o=(t=Date.now())-(v||t),v=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:h,"Execution Time":o})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(function(){g.performance.display()},0)},display:function(){var e=c.name+":",o=0;v=!1,clearTimeout(g.performance.timer),z.each(x,function(e,t){o+=t["Execution Time"]}),e+=" "+o+"ms",0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):z.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(n,e,t){var i,s,o,r,c=u;return e=e||y,t=t||h,"string"==typeof n&&void 0!==c&&(n=n.split(/[ .]/),i=n.length-1,z.each(n,function(e,t){var o=e!==i?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(z.isPlainObject(c[o])&&e!==i)c=c[o];else{if(void 0!==c[o])return s=c[o],!1;{if(!z.isPlainObject(c[t])||e===i)return void 0!==c[t]?s=c[t]:g.error(l.method,n),!1;c=c[t]}}})),"function"==typeof(r=s)&&"number"!=typeof r.nodeType?o=s.apply(t,e):void 0!==s&&(o=s),Array.isArray(b)?b.push(o):void 0!==b?b=[b,o]:void 0!==o&&(b=o),s}};S?(void 0===u&&g.initialize(),g.invoke(C)):(void 0!==u&&u.invoke("destroy"),g.initialize())}),void 0!==b?b:this},z.fn.sticky.settings={name:"Sticky",namespace:"sticky",silent:!1,debug:!1,verbose:!0,performance:!0,pushing:!1,context:!1,container:!1,scrollContext:T,offset:0,bottomOffset:0,jitter:5,setSize:!0,observeChanges:!1,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{visible:"Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}}}(jQuery,window,document);
11
+ !function(z,T,w){"use strict";T=void 0!==T&&T.Math===Math?T:globalThis,z.fn.sticky=function(p){let e=z(this);z(w);let b=Date.now(),v=[],x=p,C="string"==typeof x,S=[].slice.call(arguments,1),y=function(e,t){let o;return 0<=[T,w].indexOf(e)?o=z(e):0===(o=z(t.document).find(e)).length&&(o=t.frameElement?y(e,t.parent):T),o},k;return e.each(function(){let c=z.isPlainObject(p)?z.extend(!0,{},z.fn.sticky.settings,p):z.extend({},z.fn.sticky.settings),t=c.className;var e=c.namespace;let l=c.error,o="."+e,n="module-"+e,i=z(this),s=z(T),a=y(c.scrollContext,T),r,f,m=i.data(n),d=this,u,h,g;g={initialize:function(){g.determineContainer(),g.determineContext(),g.verbose("Initializing sticky",c,r),g.save.positions(),g.checkErrors(),g.bind.events(),c.observeChanges&&g.observeChanges(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of module",g),m=g,i.data(n,g)},destroy:function(){g.verbose("Destroying previous instance"),g.reset(),u&&u.disconnect(),h&&h.disconnect(),s.off("load"+o,g.event.load).off("resize"+o,g.event.resize),a.off("scrollchange"+o,g.event.scrollchange),i.removeData(n)},observeChanges:function(){u=new MutationObserver(g.event.documentChanged),h=new MutationObserver(g.event.changed),u.observe(w,{childList:!0,subtree:!0}),h.observe(d,{childList:!0,subtree:!0}),h.observe(f[0],{childList:!0,subtree:!0}),g.debug("Setting up mutation observer",h)},determineContainer:function(){r=c.container?y(c.container,T):i.offsetParent()},determineContext:function(){0===(f=c.context?y(c.context,T):r).length&&g.error(l.invalidContext,c.context,i)},checkErrors:function(){g.is.hidden()&&g.error(l.visible,i),g.cache.element.height>g.cache.context.height&&(g.reset(),g.error(l.elementSize,i))},bind:{events:function(){s.on("load"+o,g.event.load).on("resize"+o,g.event.resize),a.off("scroll"+o).on("scroll"+o,g.event.scroll).on("scrollchange"+o,g.event.scrollchange)}},event:{changed:function(e){clearTimeout(g.timer),g.timer=setTimeout(function(){g.verbose("DOM tree modified, updating sticky menu",e),g.refresh()},100)},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e===d||0<z(e).find(d).length)&&(g.debug("Element removed from DOM, tearing down events"),g.destroy())})})},load:function(){g.verbose("Page contents finished loading"),requestAnimationFrame(g.refresh)},resize:function(){g.verbose("Window resized"),requestAnimationFrame(g.refresh)},scroll:function(){requestAnimationFrame(function(){a.triggerHandler("scrollchange"+o,a.scrollTop())})},scrollchange:function(e,t){g.stick(t),c.onScroll.call(d)}},refresh:function(e){g.reset(),c.context||g.determineContext(),e&&g.determineContainer(),g.save.positions(),g.stick(),c.onReposition.call(d)},supports:{sticky:function(){let e=z("<div/>");return e.addClass(t.supported),e.css("position").match("sticky")}},save:{lastScroll:function(e){g.lastScroll=e},elementScroll:function(e){g.elementScroll=e},positions:function(){let e={height:a.height()},t={margin:{top:parseInt(i.css("margin-top"),10),bottom:parseInt(i.css("margin-bottom"),10)},offset:i.offset(),width:i.outerWidth(),height:i.outerHeight()},o={offset:f.offset(),height:f.outerHeight()};g.is.standardScroll()||(g.debug("Non-standard scroll. Removing scroll offset from element offset"),e.top=a.scrollTop(),e.left=a.scrollLeft(),t.offset.top+=e.top,o.offset.top+=e.top,t.offset.left+=e.left,o.offset.left+=e.left),g.cache={fits:t.height+c.offset<=e.height,sameHeight:t.height===o.height,scrollContext:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:o.offset.top,height:o.height,bottom:o.offset.top+o.height}},g.set.containerSize(),g.stick(),g.debug("Caching element positions",g.cache)}},get:{direction:function(e){let t="down";return e=e||a.scrollTop(),t=g.lastScroll&&g.lastScroll>e?"up":t},scrollChange:function(e){return e=e||a.scrollTop(),g.lastScroll?e-g.lastScroll:0},currentElementScroll:function(){return g.elementScroll||(g.is.top()?Math.abs(parseInt(i.css("top"),10))||0:Math.abs(parseInt(i.css("bottom"),10))||0)},elementScroll:function(e){e=e||a.scrollTop();var t=g.cache.element,o=g.cache.scrollContext,e=g.get.scrollChange(e),t=t.height-o.height+c.offset;let n=g.get.currentElementScroll();o=n+e;return n=g.cache.fits||o<0?0:t<o?t:o}},remove:{lastScroll:function(){delete g.lastScroll},elementScroll:function(){delete g.elementScroll},minimumSize:function(){r.css("min-height","")},offset:function(){i.css("margin-top","")}},set:{offset:function(){g.verbose("Setting offset on element",c.offset),i.css("margin-top",c.offset)},containerSize:function(){var e=r[0].tagName;"HTML"===e||"body"===e?g.determineContainer():((e=Math.max(g.cache.context.height,g.cache.element.height))-r.outerHeight()>c.jitter?(g.debug("Context is taller than container. Specifying exact height for container",g.cache.context.height),r.css({height:e})):r.css({height:""}),Math.abs(r.outerHeight()-g.cache.context.height)>c.jitter&&(g.debug("Context has padding, specifying exact height for container",g.cache.context.height),r.css({height:g.cache.context.height})))},minimumSize:function(){var e=g.cache.element;r.css("min-height",e.height)},scroll:function(e){g.debug("Setting scroll on element",e),g.elementScroll!==e&&(g.is.top()&&i.css("bottom","").css("top",-e+"px"),g.is.bottom()&&i.css("top","").css("bottom",e+"px"))},size:function(){0!==g.cache.element.height&&0!==g.cache.element.width&&(d.style.setProperty("width",g.cache.element.width+"px","important"),d.style.setProperty("height",g.cache.element.height+"px","important"))}},is:{standardScroll:function(){return a[0]===T},top:function(){return i.hasClass(t.top)},bottom:function(){return i.hasClass(t.bottom)},initialPosition:function(){return!g.is.fixed()&&!g.is.bound()},hidden:function(){return!i.is(":visible")},bound:function(){return i.hasClass(t.bound)},fixed:function(){return i.hasClass(t.fixed)}},stick:function(e){var e=e||a.scrollTop(),t=g.cache,o=t.fits,n=t.sameHeight,i=t.element,s=t.scrollContext,t=t.context,r=g.is.bottom()&&c.pushing?c.bottomOffset:c.offset,e={top:e+r,bottom:e+r+s.height},r=o?0:g.get.elementScroll(e.top),s=!o;0===i.height||n||(g.is.initialPosition()?e.top>=t.bottom?(g.debug("Initial element position is bottom of container"),g.bindBottom()):e.top>i.top&&(i.height+e.top-r>=t.bottom&&i.height<t.height?(g.debug("Initial element position is bottom of container"),g.bindBottom()):(g.debug("Initial element position is fixed"),g.fixTop())):g.is.fixed()?g.is.top()?e.top<=i.top?(g.debug("Fixed element reached top of container"),g.setInitialPosition()):i.height+e.top-r>=t.bottom?(g.debug("Fixed element reached bottom of container"),g.bindBottom()):s&&(g.set.scroll(r),g.save.lastScroll(e.top),g.save.elementScroll(r)):g.is.bottom()&&(e.bottom-i.height<=i.top?(g.debug("Bottom fixed rail has reached top of container"),g.setInitialPosition()):e.bottom>=t.bottom?(g.debug("Bottom fixed rail has reached bottom of container"),g.bindBottom()):s&&(g.set.scroll(r),g.save.lastScroll(e.top),g.save.elementScroll(r))):g.is.bottom()&&(e.top<=i.top?(g.debug("Jumped from bottom fixed to top fixed, most likely used home/end button"),g.setInitialPosition()):c.pushing?g.is.bound()&&e.bottom<=t.bottom&&(g.debug("Fixing bottom attached element to bottom of browser."),g.fixBottom()):g.is.bound()&&e.top<=t.bottom-i.height&&(g.debug("Fixing bottom attached element to top of browser."),g.fixTop())))},bindTop:function(){g.debug("Binding element to top of parent container"),g.remove.offset(),c.setSize&&g.set.size(),i.css({left:"",top:"",marginBottom:""}).removeClass(t.fixed).removeClass(t.bottom).addClass(t.bound).addClass(t.top),c.onTop.call(d),c.onUnstick.call(d)},bindBottom:function(){g.debug("Binding element to bottom of parent container"),g.remove.offset(),c.setSize&&g.set.size(),i.css({left:"",top:""}).removeClass(t.fixed).removeClass(t.top).addClass(t.bound).addClass(t.bottom),c.onBottom.call(d),c.onUnstick.call(d)},setInitialPosition:function(){g.debug("Returning to initial position"),g.unfix(),g.unbind()},fixTop:function(){g.debug("Fixing element to top of page"),c.setSize&&g.set.size(),g.set.minimumSize(),g.set.offset(),i.css({left:g.cache.element.left,bottom:"",marginBottom:""}).removeClass(t.bound).removeClass(t.bottom).addClass(t.fixed).addClass(t.top),c.onStick.call(d)},fixBottom:function(){g.debug("Sticking element to bottom of page"),c.setSize&&g.set.size(),g.set.minimumSize(),g.set.offset(),i.css({left:g.cache.element.left,bottom:"",marginBottom:""}).removeClass(t.bound).removeClass(t.top).addClass(t.fixed).addClass(t.bottom),c.onStick.call(d)},unbind:function(){g.is.bound()&&(g.debug("Removing container bound position on element"),g.remove.offset(),i.removeClass(t.bound).removeClass(t.top).removeClass(t.bottom))},unfix:function(){g.is.fixed()&&(g.debug("Removing fixed position on element"),g.remove.minimumSize(),g.remove.offset(),i.removeClass(t.fixed).removeClass(t.top).removeClass(t.bottom),c.onUnstick.call(d))},reset:function(){g.debug("Resetting elements position"),g.unbind(),g.unfix(),g.resetCSS(),g.remove.offset(),g.remove.lastScroll()},resetCSS:function(){i.css({width:"",height:""}),r.css({height:""})},setting:function(e,t){if(z.isPlainObject(e))z.extend(!0,c,e);else{if(void 0===t)return c[e];c[e]=t}},internal:function(e,t){if(z.isPlainObject(e))z.extend(!0,g,e);else{if(void 0===t)return g[e];g[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,c.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),g.verbose.apply(console,arguments)))},error:function(){c.silent||(g.error=Function.prototype.bind.call(console.error,console,c.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,o;c.performance&&(o=(t=Date.now())-(b||t),b=t,v.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":o})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(function(){g.performance.display()},0)},display:function(){var e=c.name+":";let o=0;b=!1,clearTimeout(g.performance.timer),z.each(v,function(e,t){o+=t["Execution Time"]}),e+=" "+o+"ms",0<v.length&&(console.groupCollapsed(e),console.table?console.table(v):z.each(v,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(n,e,t){let i=m,s,r,o;var c;return e=e||S,t=t||d,"string"==typeof n&&void 0!==i&&(n=n.split(/[ .]/),s=n.length-1,z.each(n,function(e,t){var o=e!==s?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(z.isPlainObject(i[o])&&e!==s)i=i[o];else{if(void 0!==i[o])return r=i[o],!1;{if(!z.isPlainObject(i[t])||e===s)return void 0!==i[t]?r=i[t]:g.error(l.method,n),!1;i=i[t]}}})),"function"==typeof(c=r)&&"number"!=typeof c.nodeType?o=r.apply(t,e):void 0!==r&&(o=r),Array.isArray(k)?k.push(o):void 0!==k?k=[k,o]:void 0!==o&&(k=o),r}},C?(void 0===m&&g.initialize(),g.invoke(x)):(void 0!==m&&m.invoke("destroy"),g.initialize())}),void 0!==k?k:this},z.fn.sticky.settings={name:"Sticky",namespace:"sticky",silent:!1,debug:!1,verbose:!0,performance:!0,pushing:!1,context:!1,container:!1,scrollContext:T,offset:0,bottomOffset:0,jitter:5,setSize:!0,observeChanges:!1,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{visible:"Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}}}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.0+f24b47e - Tab
2
+ * # Fomantic-UI 2.10.0-beta.10+3ca268e - Tab
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *