fomantic-ui 2.9.0-beta.302 → 2.9.0-beta.303

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 (157) hide show
  1. package/.all-contributorsrc +14 -1
  2. package/CONTRIBUTORS.md +2 -1
  3. package/dist/components/accordion.css +1 -1
  4. package/dist/components/accordion.js +1 -1
  5. package/dist/components/accordion.min.css +1 -1
  6. package/dist/components/accordion.min.js +1 -1
  7. package/dist/components/ad.css +1 -1
  8. package/dist/components/ad.min.css +1 -1
  9. package/dist/components/api.js +1 -1
  10. package/dist/components/api.min.js +1 -1
  11. package/dist/components/breadcrumb.css +1 -1
  12. package/dist/components/breadcrumb.min.css +1 -1
  13. package/dist/components/button.css +1 -1
  14. package/dist/components/button.min.css +1 -1
  15. package/dist/components/calendar.css +1 -1
  16. package/dist/components/calendar.js +1 -1
  17. package/dist/components/calendar.min.css +1 -1
  18. package/dist/components/calendar.min.js +1 -1
  19. package/dist/components/card.css +1 -1
  20. package/dist/components/card.min.css +1 -1
  21. package/dist/components/checkbox.css +1 -1
  22. package/dist/components/checkbox.js +1 -1
  23. package/dist/components/checkbox.min.css +1 -1
  24. package/dist/components/checkbox.min.js +1 -1
  25. package/dist/components/comment.css +1 -1
  26. package/dist/components/comment.min.css +1 -1
  27. package/dist/components/container.css +1 -1
  28. package/dist/components/container.min.css +1 -1
  29. package/dist/components/dimmer.css +1 -1
  30. package/dist/components/dimmer.js +1 -1
  31. package/dist/components/dimmer.min.css +1 -1
  32. package/dist/components/dimmer.min.js +1 -1
  33. package/dist/components/divider.css +1 -1
  34. package/dist/components/divider.min.css +1 -1
  35. package/dist/components/dropdown.css +1 -1
  36. package/dist/components/dropdown.js +30 -18
  37. package/dist/components/dropdown.min.css +1 -1
  38. package/dist/components/dropdown.min.js +2 -2
  39. package/dist/components/embed.css +1 -1
  40. package/dist/components/embed.js +12 -6
  41. package/dist/components/embed.min.css +1 -1
  42. package/dist/components/embed.min.js +2 -2
  43. package/dist/components/feed.css +1 -1
  44. package/dist/components/feed.min.css +1 -1
  45. package/dist/components/flag.css +1 -1
  46. package/dist/components/flag.min.css +1 -1
  47. package/dist/components/form.css +2 -2
  48. package/dist/components/form.js +1 -1
  49. package/dist/components/form.min.css +2 -2
  50. package/dist/components/form.min.js +1 -1
  51. package/dist/components/grid.css +1 -1
  52. package/dist/components/grid.min.css +1 -1
  53. package/dist/components/header.css +1 -1
  54. package/dist/components/header.min.css +1 -1
  55. package/dist/components/icon.css +1 -1
  56. package/dist/components/icon.min.css +1 -1
  57. package/dist/components/image.css +1 -1
  58. package/dist/components/image.min.css +1 -1
  59. package/dist/components/input.css +1 -1
  60. package/dist/components/input.min.css +1 -1
  61. package/dist/components/item.css +1 -1
  62. package/dist/components/item.min.css +1 -1
  63. package/dist/components/label.css +1 -1
  64. package/dist/components/label.min.css +1 -1
  65. package/dist/components/list.css +1 -1
  66. package/dist/components/list.min.css +1 -1
  67. package/dist/components/loader.css +1 -1
  68. package/dist/components/loader.min.css +1 -1
  69. package/dist/components/message.css +1 -1
  70. package/dist/components/message.min.css +1 -1
  71. package/dist/components/modal.css +1 -1
  72. package/dist/components/modal.js +2 -2
  73. package/dist/components/modal.min.css +1 -1
  74. package/dist/components/modal.min.js +2 -2
  75. package/dist/components/nag.css +1 -1
  76. package/dist/components/nag.js +1 -1
  77. package/dist/components/nag.min.css +1 -1
  78. package/dist/components/nag.min.js +1 -1
  79. package/dist/components/placeholder.css +1 -1
  80. package/dist/components/placeholder.min.css +1 -1
  81. package/dist/components/popup.css +1 -1
  82. package/dist/components/popup.js +1 -1
  83. package/dist/components/popup.min.css +1 -1
  84. package/dist/components/popup.min.js +1 -1
  85. package/dist/components/progress.css +1 -1
  86. package/dist/components/progress.js +1 -1
  87. package/dist/components/progress.min.css +1 -1
  88. package/dist/components/progress.min.js +1 -1
  89. package/dist/components/rail.css +1 -1
  90. package/dist/components/rail.min.css +1 -1
  91. package/dist/components/rating.css +1 -1
  92. package/dist/components/rating.js +7 -3
  93. package/dist/components/rating.min.css +1 -1
  94. package/dist/components/rating.min.js +2 -2
  95. package/dist/components/reset.css +1 -1
  96. package/dist/components/reset.min.css +1 -1
  97. package/dist/components/reveal.css +1 -1
  98. package/dist/components/reveal.min.css +1 -1
  99. package/dist/components/search.css +1 -1
  100. package/dist/components/search.js +1 -1
  101. package/dist/components/search.min.css +1 -1
  102. package/dist/components/search.min.js +1 -1
  103. package/dist/components/segment.css +1 -1
  104. package/dist/components/segment.min.css +1 -1
  105. package/dist/components/shape.css +1 -1
  106. package/dist/components/shape.js +1 -1
  107. package/dist/components/shape.min.css +1 -1
  108. package/dist/components/shape.min.js +1 -1
  109. package/dist/components/sidebar.css +1 -1
  110. package/dist/components/sidebar.js +1 -1
  111. package/dist/components/sidebar.min.css +1 -1
  112. package/dist/components/sidebar.min.js +1 -1
  113. package/dist/components/site.css +1 -1
  114. package/dist/components/site.js +1 -1
  115. package/dist/components/site.min.css +1 -1
  116. package/dist/components/site.min.js +1 -1
  117. package/dist/components/slider.js +1 -1
  118. package/dist/components/slider.min.js +1 -1
  119. package/dist/components/state.js +1 -1
  120. package/dist/components/state.min.js +1 -1
  121. package/dist/components/statistic.css +1 -1
  122. package/dist/components/statistic.min.css +1 -1
  123. package/dist/components/step.css +1 -1
  124. package/dist/components/step.min.css +1 -1
  125. package/dist/components/sticky.css +1 -1
  126. package/dist/components/sticky.js +1 -1
  127. package/dist/components/sticky.min.css +1 -1
  128. package/dist/components/sticky.min.js +1 -1
  129. package/dist/components/tab.css +1 -1
  130. package/dist/components/tab.js +1 -1
  131. package/dist/components/tab.min.css +1 -1
  132. package/dist/components/tab.min.js +1 -1
  133. package/dist/components/table.css +1 -1
  134. package/dist/components/table.min.css +1 -1
  135. package/dist/components/text.css +1 -1
  136. package/dist/components/text.min.css +1 -1
  137. package/dist/components/toast.css +1 -1
  138. package/dist/components/toast.js +1 -1
  139. package/dist/components/toast.min.css +1 -1
  140. package/dist/components/toast.min.js +1 -1
  141. package/dist/components/transition.css +1 -1
  142. package/dist/components/transition.js +3 -1
  143. package/dist/components/transition.min.css +1 -1
  144. package/dist/components/transition.min.js +2 -2
  145. package/dist/components/visibility.js +1 -1
  146. package/dist/components/visibility.min.js +1 -1
  147. package/dist/semantic.css +50 -50
  148. package/dist/semantic.js +74 -50
  149. package/dist/semantic.min.css +2 -2
  150. package/dist/semantic.min.js +2 -2
  151. package/package.json +1 -1
  152. package/src/definitions/collections/form.less +3 -4
  153. package/src/definitions/modules/dropdown.js +29 -17
  154. package/src/definitions/modules/embed.js +11 -5
  155. package/src/definitions/modules/modal.js +1 -1
  156. package/src/definitions/modules/rating.js +6 -2
  157. package/src/definitions/modules/transition.js +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fomantic-ui",
3
- "version": "2.9.0-beta.302+091bcb0",
3
+ "version": "2.9.0-beta.303+76dc367",
4
4
  "description": "Fomantic empowers designers and developers by creating a shared vocabulary for UI.",
5
5
  "keywords": [
6
6
  "fomantic-ui",
@@ -69,11 +69,10 @@
69
69
  font-size: @labelFontSize;
70
70
  font-weight: @labelFontWeight;
71
71
  text-transform: @labelTextTransform;
72
- &:not(.button) {
73
- color: @labelColor;
74
- }
75
72
  }
76
-
73
+ .ui.form:not(.inverted) .field > label:not(.button) {
74
+ color: @labelColor;
75
+ }
77
76
  /*--------------------
78
77
  Standard Inputs
79
78
  ---------------------*/
@@ -111,6 +111,7 @@ $.fn.dropdown = function(parameters) {
111
111
  module.error(error.noNormalize, element);
112
112
  }
113
113
 
114
+ module.create.id();
114
115
  module.setup.layout();
115
116
 
116
117
  if(settings.values) {
@@ -124,7 +125,6 @@ $.fn.dropdown = function(parameters) {
124
125
  module.save.defaults();
125
126
  module.restore.selected();
126
127
 
127
- module.create.id();
128
128
  module.bind.events();
129
129
 
130
130
  module.observeChanges();
@@ -366,11 +366,20 @@ $.fn.dropdown = function(parameters) {
366
366
  }
367
367
  if( module.is.search() && !module.has.search() ) {
368
368
  module.verbose('Adding search input');
369
+ var
370
+ labelNode = $module.prev('label')
371
+ ;
369
372
  $search = $('<input />')
370
373
  .addClass(className.search)
371
374
  .prop('autocomplete', module.is.chrome() ? 'fomantic-search' : 'off')
372
- .insertBefore($text)
373
375
  ;
376
+ if (labelNode.length) {
377
+ if (!labelNode.attr('id')) {
378
+ labelNode.attr('id', module.get.id() + '_formLabel');
379
+ }
380
+ $search.attr('aria-labelledby', labelNode.attr('id'));
381
+ }
382
+ $search.insertBefore($text);
374
383
  }
375
384
  if( module.is.multiple() && module.is.searchSelection() && !module.has.sizer()) {
376
385
  module.create.sizer();
@@ -4248,7 +4257,8 @@ $.fn.dropdown.settings.templates = {
4248
4257
  var
4249
4258
  placeholder = select.placeholder || false,
4250
4259
  html = '',
4251
- escape = $.fn.dropdown.settings.templates.escape
4260
+ escape = $.fn.dropdown.settings.templates.escape,
4261
+ deQuote = $.fn.dropdown.settings.templates.deQuote
4252
4262
  ;
4253
4263
  html += '<i class="dropdown icon"></i>';
4254
4264
  if(placeholder) {
@@ -4257,7 +4267,7 @@ $.fn.dropdown.settings.templates = {
4257
4267
  else {
4258
4268
  html += '<div class="text"></div>';
4259
4269
  }
4260
- html += '<div class="'+className.menu+'">';
4270
+ html += '<div class="'+deQuote(className.menu)+'">';
4261
4271
  html += $.fn.dropdown.settings.templates.menu(select, fields, preserveHTML,className);
4262
4272
  html += '</div>';
4263
4273
  return html;
@@ -4295,27 +4305,27 @@ $.fn.dropdown.settings.templates = {
4295
4305
  : '',
4296
4306
  hasDescription = (escape(option[fields.description] || '', preserveHTML) != '')
4297
4307
  ;
4298
- html += '<div class="'+ maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] ? deQuote(option[fields.class]) : className.item)+'" data-value="' + deQuote(option[fields.value],true) + '"' + maybeText + '>';
4308
+ html += '<div class="'+ deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] ? option[fields.class] : className.item))+'" data-value="' + deQuote(option[fields.value],true) + '"' + maybeText + '>';
4299
4309
  if (isMenu) {
4300
4310
  html += '<i class="'+ (itemType.indexOf('left') !== -1 ? 'left' : '') + ' dropdown icon"></i>';
4301
4311
  }
4302
4312
  if(option[fields.image]) {
4303
- html += '<img class="'+(option[fields.imageClass] ? deQuote(option[fields.imageClass]) : className.image)+'" src="' + deQuote(option[fields.image]) + '">';
4313
+ html += '<img class="'+deQuote(option[fields.imageClass] ? option[fields.imageClass] : className.image)+'" src="' + deQuote(option[fields.image]) + '">';
4304
4314
  }
4305
4315
  if(option[fields.icon]) {
4306
- html += '<i class="'+deQuote(option[fields.icon])+' '+(option[fields.iconClass] ? deQuote(option[fields.iconClass]) : className.icon)+'"></i>';
4316
+ html += '<i class="'+deQuote(option[fields.icon]+' '+(option[fields.iconClass] ? option[fields.iconClass] : className.icon))+'"></i>';
4307
4317
  }
4308
4318
  if(hasDescription){
4309
- html += '<span class="'+ className.description +'">'+ escape(option[fields.description] || '', preserveHTML) + '</span>';
4310
- html += (!isMenu) ? '<span class="'+ className.text + '">' : '';
4319
+ html += '<span class="'+ deQuote(className.description) +'">'+ escape(option[fields.description] || '', preserveHTML) + '</span>';
4320
+ html += (!isMenu) ? '<span class="'+ deQuote(className.text) + '">' : '';
4311
4321
  }
4312
4322
  if (isMenu) {
4313
- html += '<span class="' + className.text + '">';
4323
+ html += '<span class="' + deQuote(className.text) + '">';
4314
4324
  }
4315
4325
  html += escape(option[fields.name] || '', preserveHTML);
4316
4326
  if (isMenu) {
4317
4327
  html += '</span>';
4318
- html += '<div class="' + itemType + '">';
4328
+ html += '<div class="' + deQuote(itemType) + '">';
4319
4329
  html += $.fn.dropdown.settings.templates.menu(option, fields, preserveHTML, className);
4320
4330
  html += '</div>';
4321
4331
  } else if(hasDescription){
@@ -4324,18 +4334,18 @@ $.fn.dropdown.settings.templates = {
4324
4334
  html += '</div>';
4325
4335
  } else if (itemType === 'header') {
4326
4336
  var groupName = escape(option[fields.name] || '', preserveHTML),
4327
- groupIcon = option[fields.icon] ? deQuote(option[fields.icon]) : className.groupIcon
4337
+ groupIcon = deQuote(option[fields.icon] ? option[fields.icon] : className.groupIcon)
4328
4338
  ;
4329
4339
  if(groupName !== '' || groupIcon !== '') {
4330
- html += '<div class="' + (option[fields.class] ? deQuote(option[fields.class]) : className.header) + '">';
4340
+ html += '<div class="' + deQuote(option[fields.class] ? option[fields.class] : className.header) + '">';
4331
4341
  if (groupIcon !== '') {
4332
- html += '<i class="' + groupIcon + ' ' + (option[fields.iconClass] ? deQuote(option[fields.iconClass]) : className.icon) + '"></i>';
4342
+ html += '<i class="' + deQuote(groupIcon + ' ' + (option[fields.iconClass] ? option[fields.iconClass] : className.icon)) + '"></i>';
4333
4343
  }
4334
4344
  html += groupName;
4335
4345
  html += '</div>';
4336
4346
  }
4337
4347
  if(option[fields.divider]){
4338
- html += '<div class="'+className.divider+'"></div>';
4348
+ html += '<div class="'+deQuote(className.divider)+'"></div>';
4339
4349
  }
4340
4350
  }
4341
4351
  });
@@ -4345,8 +4355,10 @@ $.fn.dropdown.settings.templates = {
4345
4355
  // generates label for multiselect
4346
4356
  label: function(value, text, preserveHTML, className) {
4347
4357
  var
4348
- escape = $.fn.dropdown.settings.templates.escape;
4349
- return escape(text,preserveHTML) + '<i class="'+className.delete+' icon"></i>';
4358
+ escape = $.fn.dropdown.settings.templates.escape,
4359
+ deQuote = $.fn.dropdown.settings.templates.deQuote
4360
+ ;
4361
+ return escape(text,preserveHTML) + '<i class="'+deQuote(className.delete)+' icon"></i>';
4350
4362
  },
4351
4363
 
4352
4364
 
@@ -671,26 +671,32 @@ $.fn.embed.settings = {
671
671
  },
672
672
 
673
673
  templates: {
674
+ deQuote: function(string, encode) {
675
+ return String(string).replace(/"/g,encode ? "&quot;" : "");
676
+ },
674
677
  iframe : function(url, parameters) {
675
- var src = url;
678
+ var src = url,
679
+ deQuote = $.fn.embed.settings.templates.deQuote
680
+ ;
676
681
  if (parameters) {
677
682
  src += '?' + parameters;
678
683
  }
679
684
  return ''
680
- + '<iframe src="' + src + '"'
685
+ + '<iframe src="' + deQuote(src) + '"'
681
686
  + ' width="100%" height="100%"'
682
687
  + ' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'
683
688
  ;
684
689
  },
685
690
  placeholder : function(image, icon) {
686
691
  var
687
- html = ''
692
+ html = '',
693
+ deQuote = $.fn.embed.settings.templates.deQuote
688
694
  ;
689
695
  if(icon) {
690
- html += '<i class="' + icon + ' icon"></i>';
696
+ html += '<i class="' + deQuote(icon) + ' icon"></i>';
691
697
  }
692
698
  if(image) {
693
- html += '<img class="placeholder" src="' + image + '">';
699
+ html += '<img class="placeholder" src="' + deQuote(image) + '">';
694
700
  }
695
701
  return html;
696
702
  }
@@ -1507,7 +1507,7 @@ $.fn.modal.settings.templates = {
1507
1507
  denyFn = function(){args.handler(null)}
1508
1508
  ;
1509
1509
  if (input.length === 0) {
1510
- args.content += '<p><div class="'+settings.className.prompt+'"><input placeholder="'+this.helpers.deQuote(args.placeholder || '')+'" type="text" value="'+this.helpers.deQuote(args.defaultValue || '')+'"></div></p>';
1510
+ args.content += '<p><div class="'+this.helpers.deQuote(settings.className.prompt)+'"><input placeholder="'+this.helpers.deQuote(args.placeholder || '')+'" type="text" value="'+this.helpers.deQuote(args.defaultValue || '')+'"></div></p>';
1511
1511
  }
1512
1512
  return {
1513
1513
  title : args.title,
@@ -536,13 +536,17 @@ $.fn.rating.settings = {
536
536
  },
537
537
 
538
538
  templates: {
539
+ deQuote: function(string, encode) {
540
+ return String(string).replace(/"/g,encode ? "&quot;" : "");
541
+ },
539
542
  icon: function(maxRating, iconClass) {
540
543
  var
541
544
  icon = 1,
542
- html = ''
545
+ html = '',
546
+ deQuote = $.fn.rating.settings.templates.deQuote
543
547
  ;
544
548
  while(icon <= maxRating) {
545
- html += '<i class="'+iconClass+' icon"></i>';
549
+ html += '<i class="'+deQuote(iconClass)+' icon"></i>';
546
550
  icon++;
547
551
  }
548
552
  return html;
@@ -698,11 +698,13 @@ $.fn.transition = function() {
698
698
  .addClass(className.transition)
699
699
  .css('animationName')
700
700
  ;
701
+ $clone.detach().insertAfter($module);
701
702
  inAnimation = $clone
702
703
  .addClass(className.inward)
703
704
  .css('animationName')
704
705
  ;
705
706
  if(!displayType) {
707
+ $clone.detach().insertAfter($module);
706
708
  displayType = $clone
707
709
  .attr('class', elementClass)
708
710
  .removeAttr('style')