fomantic-ui 2.10.0-beta.7 → 2.10.0-beta.9

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 (229) hide show
  1. package/.eslintrc.js +0 -10
  2. package/README.md +4 -5
  3. package/changelog-setup.js +64 -70
  4. package/dist/components/accordion.css +1 -1
  5. package/dist/components/accordion.js +94 -131
  6. package/dist/components/accordion.min.css +1 -1
  7. package/dist/components/accordion.min.js +2 -2
  8. package/dist/components/ad.css +1 -1
  9. package/dist/components/ad.min.css +1 -1
  10. package/dist/components/api.js +152 -205
  11. package/dist/components/api.min.js +2 -2
  12. package/dist/components/breadcrumb.css +1 -1
  13. package/dist/components/breadcrumb.min.css +1 -1
  14. package/dist/components/button.css +1 -1
  15. package/dist/components/button.min.css +1 -1
  16. package/dist/components/calendar.css +1 -1
  17. package/dist/components/calendar.js +305 -341
  18. package/dist/components/calendar.min.css +1 -1
  19. package/dist/components/calendar.min.js +2 -2
  20. package/dist/components/card.css +1 -1
  21. package/dist/components/card.min.css +1 -1
  22. package/dist/components/checkbox.css +1 -1
  23. package/dist/components/checkbox.js +76 -116
  24. package/dist/components/checkbox.min.css +1 -1
  25. package/dist/components/checkbox.min.js +2 -2
  26. package/dist/components/comment.css +1 -1
  27. package/dist/components/comment.min.css +1 -1
  28. package/dist/components/container.css +1 -1
  29. package/dist/components/container.min.css +1 -1
  30. package/dist/components/dimmer.css +1 -1
  31. package/dist/components/dimmer.js +58 -91
  32. package/dist/components/dimmer.min.css +1 -1
  33. package/dist/components/dimmer.min.js +2 -2
  34. package/dist/components/divider.css +1 -1
  35. package/dist/components/divider.min.css +1 -1
  36. package/dist/components/dropdown.css +7 -5
  37. package/dist/components/dropdown.js +653 -943
  38. package/dist/components/dropdown.min.css +2 -2
  39. package/dist/components/dropdown.min.js +2 -2
  40. package/dist/components/embed.css +1 -1
  41. package/dist/components/embed.js +71 -109
  42. package/dist/components/embed.min.css +1 -1
  43. package/dist/components/embed.min.js +2 -2
  44. package/dist/components/emoji.css +1 -1
  45. package/dist/components/emoji.min.css +1 -1
  46. package/dist/components/feed.css +1 -1
  47. package/dist/components/feed.min.css +1 -1
  48. package/dist/components/flag.css +1 -1
  49. package/dist/components/flag.min.css +1 -1
  50. package/dist/components/flyout.css +1 -1
  51. package/dist/components/flyout.js +183 -257
  52. package/dist/components/flyout.min.css +1 -1
  53. package/dist/components/flyout.min.js +2 -2
  54. package/dist/components/form.css +1 -1
  55. package/dist/components/form.js +325 -429
  56. package/dist/components/form.min.css +1 -1
  57. package/dist/components/form.min.js +2 -2
  58. package/dist/components/grid.css +1 -1
  59. package/dist/components/grid.min.css +1 -1
  60. package/dist/components/header.css +1 -1
  61. package/dist/components/header.min.css +1 -1
  62. package/dist/components/icon.css +1 -1
  63. package/dist/components/icon.min.css +1 -1
  64. package/dist/components/image.css +1 -1
  65. package/dist/components/image.min.css +1 -1
  66. package/dist/components/input.css +1 -1
  67. package/dist/components/input.min.css +1 -1
  68. package/dist/components/item.css +1 -1
  69. package/dist/components/item.min.css +1 -1
  70. package/dist/components/label.css +1 -1
  71. package/dist/components/label.min.css +1 -1
  72. package/dist/components/list.css +1 -1
  73. package/dist/components/list.min.css +1 -1
  74. package/dist/components/loader.css +1 -1
  75. package/dist/components/loader.min.css +1 -1
  76. package/dist/components/menu.css +1 -1
  77. package/dist/components/menu.min.css +1 -1
  78. package/dist/components/message.css +1 -1
  79. package/dist/components/message.min.css +1 -1
  80. package/dist/components/modal.css +1 -1
  81. package/dist/components/modal.js +212 -296
  82. package/dist/components/modal.min.css +1 -1
  83. package/dist/components/modal.min.js +2 -2
  84. package/dist/components/nag.css +1 -1
  85. package/dist/components/nag.js +67 -97
  86. package/dist/components/nag.min.css +1 -1
  87. package/dist/components/nag.min.js +2 -2
  88. package/dist/components/placeholder.css +1 -1
  89. package/dist/components/placeholder.min.css +1 -1
  90. package/dist/components/popup.css +1 -1
  91. package/dist/components/popup.js +176 -236
  92. package/dist/components/popup.min.css +1 -1
  93. package/dist/components/popup.min.js +2 -2
  94. package/dist/components/progress.css +1 -1
  95. package/dist/components/progress.js +103 -138
  96. package/dist/components/progress.min.css +1 -1
  97. package/dist/components/progress.min.js +2 -2
  98. package/dist/components/rail.css +1 -1
  99. package/dist/components/rail.min.css +1 -1
  100. package/dist/components/rating.css +1 -1
  101. package/dist/components/rating.js +80 -121
  102. package/dist/components/rating.min.css +1 -1
  103. package/dist/components/rating.min.js +2 -2
  104. package/dist/components/reset.css +1 -1
  105. package/dist/components/reset.min.css +1 -1
  106. package/dist/components/reveal.css +1 -1
  107. package/dist/components/reveal.min.css +1 -1
  108. package/dist/components/search.css +1 -1
  109. package/dist/components/search.js +240 -334
  110. package/dist/components/search.min.css +1 -1
  111. package/dist/components/search.min.js +2 -2
  112. package/dist/components/segment.css +1 -1
  113. package/dist/components/segment.min.css +1 -1
  114. package/dist/components/shape.css +1 -1
  115. package/dist/components/shape.js +157 -223
  116. package/dist/components/shape.min.css +1 -1
  117. package/dist/components/shape.min.js +2 -2
  118. package/dist/components/sidebar.css +1 -1
  119. package/dist/components/sidebar.js +122 -163
  120. package/dist/components/sidebar.min.css +1 -1
  121. package/dist/components/sidebar.min.js +2 -2
  122. package/dist/components/site.css +1 -1
  123. package/dist/components/site.js +38 -57
  124. package/dist/components/site.min.css +1 -1
  125. package/dist/components/site.min.js +2 -2
  126. package/dist/components/slider.css +1 -1
  127. package/dist/components/slider.js +242 -325
  128. package/dist/components/slider.min.css +1 -1
  129. package/dist/components/slider.min.js +2 -2
  130. package/dist/components/state.js +68 -98
  131. package/dist/components/state.min.js +2 -2
  132. package/dist/components/statistic.css +1 -1
  133. package/dist/components/statistic.min.css +1 -1
  134. package/dist/components/step.css +1 -1
  135. package/dist/components/step.min.css +1 -1
  136. package/dist/components/sticky.css +1 -1
  137. package/dist/components/sticky.js +116 -159
  138. package/dist/components/sticky.min.css +1 -1
  139. package/dist/components/sticky.min.js +2 -2
  140. package/dist/components/tab.css +1 -1
  141. package/dist/components/tab.js +168 -233
  142. package/dist/components/tab.min.css +1 -1
  143. package/dist/components/tab.min.js +2 -2
  144. package/dist/components/table.css +1 -1
  145. package/dist/components/table.min.css +1 -1
  146. package/dist/components/text.css +1 -1
  147. package/dist/components/text.min.css +1 -1
  148. package/dist/components/toast.css +1 -1
  149. package/dist/components/toast.js +90 -115
  150. package/dist/components/toast.min.css +1 -1
  151. package/dist/components/toast.min.js +2 -2
  152. package/dist/components/transition.css +1 -1
  153. package/dist/components/transition.js +86 -141
  154. package/dist/components/transition.min.css +1 -1
  155. package/dist/components/transition.min.js +2 -2
  156. package/dist/components/visibility.js +134 -210
  157. package/dist/components/visibility.min.js +2 -2
  158. package/dist/semantic.css +59 -57
  159. package/dist/semantic.js +4015 -5567
  160. package/dist/semantic.min.css +2 -2
  161. package/dist/semantic.min.js +2 -2
  162. package/examples/assets/show-examples.js +2 -4
  163. package/gulpfile.js +5 -7
  164. package/package.json +1 -1
  165. package/scripts/nightly-version.js +7 -10
  166. package/src/definitions/behaviors/api.js +151 -204
  167. package/src/definitions/behaviors/form.js +324 -428
  168. package/src/definitions/behaviors/state.js +67 -97
  169. package/src/definitions/behaviors/visibility.js +133 -209
  170. package/src/definitions/globals/site.js +37 -56
  171. package/src/definitions/modules/accordion.js +93 -130
  172. package/src/definitions/modules/calendar.js +304 -340
  173. package/src/definitions/modules/checkbox.js +75 -115
  174. package/src/definitions/modules/dimmer.js +57 -90
  175. package/src/definitions/modules/dropdown.js +652 -942
  176. package/src/definitions/modules/dropdown.less +11 -5
  177. package/src/definitions/modules/embed.js +70 -108
  178. package/src/definitions/modules/flyout.js +182 -256
  179. package/src/definitions/modules/modal.js +211 -295
  180. package/src/definitions/modules/nag.js +66 -96
  181. package/src/definitions/modules/popup.js +175 -235
  182. package/src/definitions/modules/progress.js +102 -137
  183. package/src/definitions/modules/rating.js +79 -120
  184. package/src/definitions/modules/search.js +239 -333
  185. package/src/definitions/modules/shape.js +156 -222
  186. package/src/definitions/modules/sidebar.js +121 -162
  187. package/src/definitions/modules/slider.js +241 -324
  188. package/src/definitions/modules/sticky.js +115 -158
  189. package/src/definitions/modules/tab.js +167 -232
  190. package/src/definitions/modules/toast.js +89 -114
  191. package/src/definitions/modules/transition.js +85 -140
  192. package/src/themes/default/modules/dropdown.variables +1 -0
  193. package/tasks/admin/components/create.js +88 -108
  194. package/tasks/admin/components/init.js +26 -32
  195. package/tasks/admin/components/update.js +46 -53
  196. package/tasks/admin/distributions/create.js +71 -101
  197. package/tasks/admin/distributions/init.js +27 -33
  198. package/tasks/admin/distributions/update.js +45 -52
  199. package/tasks/admin/register.js +11 -15
  200. package/tasks/build/assets.js +14 -18
  201. package/tasks/build/css.js +54 -63
  202. package/tasks/build/javascript.js +45 -53
  203. package/tasks/build.js +4 -6
  204. package/tasks/check-install.js +5 -7
  205. package/tasks/clean.js +2 -4
  206. package/tasks/collections/admin.js +13 -15
  207. package/tasks/collections/build.js +6 -8
  208. package/tasks/collections/docs.js +2 -4
  209. package/tasks/collections/install.js +2 -4
  210. package/tasks/collections/rtl.js +2 -4
  211. package/tasks/collections/various.js +2 -4
  212. package/tasks/config/admin/github.js +7 -9
  213. package/tasks/config/admin/templates/css-package.js +1 -3
  214. package/tasks/config/admin/templates/less-package.js +1 -3
  215. package/tasks/config/npm/gulpfile.js +4 -6
  216. package/tasks/config/project/config.js +22 -30
  217. package/tasks/config/project/install.js +56 -70
  218. package/tasks/config/project/release.js +6 -8
  219. package/tasks/config/tasks.js +8 -12
  220. package/tasks/config/user.js +13 -17
  221. package/tasks/docs/build.js +26 -31
  222. package/tasks/docs/metadata.js +24 -30
  223. package/tasks/docs/serve.js +20 -26
  224. package/tasks/install.js +71 -98
  225. package/tasks/rtl/build.js +2 -4
  226. package/tasks/rtl/watch.js +2 -4
  227. package/tasks/watch.js +9 -11
  228. package/test/meteor/fonts.js +1 -2
  229. package/test/modules/module.spec.js +16 -18
@@ -20,42 +20,38 @@
20
20
  : globalThis;
21
21
 
22
22
  $.fn.rating = function (parameters) {
23
- var
24
- $allModules = $(this),
23
+ let $allModules = $(this);
25
24
 
26
- time = Date.now(),
27
- performance = [],
25
+ let time = Date.now();
26
+ let performance = [];
28
27
 
29
- query = arguments[0],
30
- methodInvoked = typeof query === 'string',
31
- queryArguments = [].slice.call(arguments, 1),
32
- returnedValue
33
- ;
28
+ let query = arguments[0];
29
+ let methodInvoked = typeof query === 'string';
30
+ let queryArguments = [].slice.call(arguments, 1);
31
+ let returnedValue;
34
32
  $allModules.each(function () {
35
- var
36
- settings = $.isPlainObject(parameters)
37
- ? $.extend(true, {}, $.fn.rating.settings, parameters)
38
- : $.extend({}, $.fn.rating.settings),
33
+ let settings = $.isPlainObject(parameters)
34
+ ? $.extend(true, {}, $.fn.rating.settings, parameters)
35
+ : $.extend({}, $.fn.rating.settings);
39
36
 
40
- namespace = settings.namespace,
41
- className = settings.className,
42
- error = settings.error,
43
- metadata = settings.metadata,
44
- selector = settings.selector,
45
- cssVars = settings.cssVars,
37
+ let namespace = settings.namespace;
38
+ let className = settings.className;
39
+ let error = settings.error;
40
+ let metadata = settings.metadata;
41
+ let selector = settings.selector;
42
+ let cssVars = settings.cssVars;
46
43
 
47
- eventNamespace = '.' + namespace,
48
- moduleNamespace = 'module-' + namespace,
44
+ let eventNamespace = '.' + namespace;
45
+ let moduleNamespace = 'module-' + namespace;
49
46
 
50
- element = this,
51
- instance = $(this).data(moduleNamespace),
47
+ let element = this;
48
+ let instance = $(this).data(moduleNamespace);
52
49
 
53
- $module = $(this),
54
- $icon = $module.find(selector.icon),
50
+ let $module = $(this);
51
+ let $icon = $module.find(selector.icon);
55
52
 
56
- initialLoad,
57
- module
58
- ;
53
+ let initialLoad;
54
+ let module;
59
55
 
60
56
  module = {
61
57
 
@@ -81,16 +77,14 @@
81
77
  module.verbose('Instantiating module', settings);
82
78
  instance = module;
83
79
  $module
84
- .data(moduleNamespace, module)
85
- ;
80
+ .data(moduleNamespace, module);
86
81
  },
87
82
 
88
83
  destroy: function () {
89
84
  module.verbose('Destroying previous instance', instance);
90
85
  module.remove.events();
91
86
  $module
92
- .removeData(moduleNamespace)
93
- ;
87
+ .removeData(moduleNamespace);
94
88
  },
95
89
 
96
90
  refresh: function () {
@@ -99,54 +93,42 @@
99
93
 
100
94
  setup: {
101
95
  layout: function () {
102
- var
103
- maxRating = module.get.maxRating(),
104
- icon = module.get.icon(),
105
- html = $.fn.rating.settings.templates.icon(maxRating, icon)
106
- ;
96
+ let maxRating = module.get.maxRating();
97
+ let icon = module.get.icon();
98
+ let html = $.fn.rating.settings.templates.icon(maxRating, icon);
107
99
  module.debug('Generating icon html dynamically');
108
100
  $module
109
- .html(html)
110
- ;
101
+ .html(html);
111
102
  module.refresh();
112
103
  },
113
104
  },
114
105
 
115
106
  event: {
116
107
  mouseenter: function () {
117
- var
118
- $activeIcon = $(this)
119
- ;
108
+ let $activeIcon = $(this);
120
109
  $activeIcon
121
110
  .nextAll()
122
- .removeClass(className.selected)
123
- ;
111
+ .removeClass(className.selected);
124
112
  $module
125
- .addClass(className.selected)
126
- ;
113
+ .addClass(className.selected);
127
114
  $activeIcon
128
115
  .addClass(className.selected)
129
116
  .prevAll()
130
- .addClass(className.selected)
131
- ;
117
+ .addClass(className.selected);
132
118
  },
133
119
  mouseleave: function () {
134
120
  $module
135
- .removeClass(className.selected)
136
- ;
121
+ .removeClass(className.selected);
137
122
  $icon
138
- .removeClass(className.selected)
139
- ;
123
+ .removeClass(className.selected);
140
124
  },
141
125
  click: function () {
142
- var
143
- $activeIcon = $(this),
144
- currentRating = module.get.rating(),
145
- rating = $icon.index($activeIcon) + 1,
146
- canClear = settings.clearable === 'auto'
147
- ? $icon.length === 1
148
- : settings.clearable
149
- ;
126
+ let $activeIcon = $(this);
127
+ let currentRating = module.get.rating();
128
+ let rating = $icon.index($activeIcon) + 1;
129
+ let canClear = settings.clearable === 'auto'
130
+ ? $icon.length === 1
131
+ : settings.clearable;
150
132
  if (canClear && currentRating === rating) {
151
133
  module.clearRating();
152
134
  } else {
@@ -166,8 +148,7 @@
166
148
  $module
167
149
  .on('mouseenter' + eventNamespace, selector.icon, module.event.mouseenter)
168
150
  .on('mouseleave' + eventNamespace, selector.icon, module.event.mouseleave)
169
- .on('click' + eventNamespace, selector.icon, module.event.click)
170
- ;
151
+ .on('click' + eventNamespace, selector.icon, module.event.click);
171
152
  },
172
153
  },
173
154
 
@@ -175,8 +156,7 @@
175
156
  events: function () {
176
157
  module.verbose('Removing events');
177
158
  $module
178
- .off(eventNamespace)
179
- ;
159
+ .off(eventNamespace);
180
160
  },
181
161
  initialLoad: function () {
182
162
  initialLoad = false;
@@ -187,16 +167,14 @@
187
167
  module.debug('Setting rating to interactive mode');
188
168
  module.bind.events();
189
169
  $module
190
- .removeClass(className.disabled)
191
- ;
170
+ .removeClass(className.disabled);
192
171
  },
193
172
 
194
173
  disable: function () {
195
174
  module.debug('Setting rating to read-only mode');
196
175
  module.remove.events();
197
176
  $module
198
- .addClass(className.disabled)
199
- ;
177
+ .addClass(className.disabled);
200
178
  },
201
179
 
202
180
  is: {
@@ -210,7 +188,7 @@
210
188
 
211
189
  get: {
212
190
  icon: function () {
213
- var icon = $module.data(metadata.icon);
191
+ let icon = $module.data(metadata.icon);
214
192
  if (icon) {
215
193
  $module.removeData(metadata.icon);
216
194
  }
@@ -236,9 +214,7 @@
236
214
  return settings.maxRating;
237
215
  },
238
216
  rating: function () {
239
- var
240
- currentRating = $icon.filter('.' + className.active).length
241
- ;
217
+ let currentRating = $icon.filter('.' + className.active).length;
242
218
  module.verbose('Current rating retrieved', currentRating);
243
219
 
244
220
  return currentRating;
@@ -247,46 +223,38 @@
247
223
 
248
224
  set: {
249
225
  rating: function (rating) {
250
- var
251
- ratingIndex = Math.floor(
252
- rating - 1 >= 0
253
- ? rating - 1
254
- : 0
255
- ),
256
- $activeIcon = $icon.eq(ratingIndex),
257
- $partialActiveIcon = rating <= 1
258
- ? $activeIcon
259
- : $activeIcon.next(),
260
- filledPercentage = (rating % 1) * 100
261
- ;
226
+ let ratingIndex = Math.floor(
227
+ rating - 1 >= 0
228
+ ? rating - 1
229
+ : 0
230
+ );
231
+ let $activeIcon = $icon.eq(ratingIndex);
232
+ let $partialActiveIcon = rating <= 1
233
+ ? $activeIcon
234
+ : $activeIcon.next();
235
+ let filledPercentage = (rating % 1) * 100;
262
236
  $module
263
- .removeClass(className.selected)
264
- ;
237
+ .removeClass(className.selected);
265
238
  $icon
266
239
  .removeClass(className.selected)
267
240
  .removeClass(className.active)
268
- .removeClass(className.partiallyActive)
269
- ;
241
+ .removeClass(className.partiallyActive);
270
242
  if (rating > 0) {
271
243
  module.verbose('Setting current rating to', rating);
272
244
  $activeIcon
273
245
  .prevAll()
274
246
  .addBack()
275
- .addClass(className.active)
276
- ;
247
+ .addClass(className.active);
277
248
  if ($activeIcon.next() && rating % 1 !== 0) {
278
249
  $partialActiveIcon
279
250
  .addClass(className.partiallyActive)
280
- .addClass(className.active)
281
- ;
251
+ .addClass(className.active);
282
252
  $partialActiveIcon
283
- .css(cssVars.filledCustomPropName, filledPercentage + '%')
284
- ;
253
+ .css(cssVars.filledCustomPropName, filledPercentage + '%');
285
254
  if ($partialActiveIcon.css('backgroundColor') === 'transparent') {
286
255
  $partialActiveIcon
287
256
  .removeClass(className.partiallyActive)
288
- .removeClass(className.active)
289
- ;
257
+ .removeClass(className.active);
290
258
  }
291
259
  }
292
260
  }
@@ -350,11 +318,9 @@
350
318
  },
351
319
  performance: {
352
320
  log: function (message) {
353
- var
354
- currentTime,
355
- executionTime,
356
- previousTime
357
- ;
321
+ let currentTime;
322
+ let executionTime;
323
+ let previousTime;
358
324
  if (settings.performance) {
359
325
  currentTime = Date.now();
360
326
  previousTime = time || currentTime;
@@ -373,10 +339,8 @@
373
339
  }, 500);
374
340
  },
375
341
  display: function () {
376
- var
377
- title = settings.name + ':',
378
- totalTime = 0
379
- ;
342
+ let title = settings.name + ':';
343
+ let totalTime = 0;
380
344
  time = false;
381
345
  clearTimeout(module.performance.timer);
382
346
  $.each(performance, function (index, data) {
@@ -401,22 +365,19 @@
401
365
  },
402
366
  },
403
367
  invoke: function (query, passedArguments, context) {
404
- var
405
- object = instance,
406
- maxDepth,
407
- found,
408
- response
409
- ;
368
+ let object = instance;
369
+ let maxDepth;
370
+ let found;
371
+ let response;
410
372
  passedArguments = passedArguments || queryArguments;
411
373
  context = context || element;
412
374
  if (typeof query === 'string' && object !== undefined) {
413
375
  query = query.split(/[ .]/);
414
376
  maxDepth = query.length - 1;
415
377
  $.each(query, function (depth, value) {
416
- var camelCaseValue = depth !== maxDepth
378
+ let camelCaseValue = depth !== maxDepth
417
379
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
418
- : query
419
- ;
380
+ : query;
420
381
  if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
421
382
  object = object[camelCaseValue];
422
383
  } else if (object[camelCaseValue] !== undefined) {
@@ -528,14 +489,12 @@
528
489
  '>': '&gt;',
529
490
  };
530
491
 
531
- return string.replace(badChars, (chr) => escape[chr]);
492
+ return String(string).replace(badChars, (chr) => escape[chr]);
532
493
  },
533
494
  icon: function (maxRating, iconClass) {
534
- var
535
- icon = 1,
536
- html = '',
537
- escape = $.fn.rating.settings.templates.escape
538
- ;
495
+ let icon = 1;
496
+ let html = '';
497
+ let escape = $.fn.rating.settings.templates.escape;
539
498
  while (icon <= maxRating) {
540
499
  html += '<i class="' + escape(iconClass) + ' icon"></i>';
541
500
  icon++;