fomantic-ui 2.9.4-beta.5 → 2.9.4-beta.51

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 (248) hide show
  1. package/.all-contributorsrc +20 -1
  2. package/.eslintrc.js +17 -0
  3. package/.github/FUNDING.yml +1 -1
  4. package/.github/workflows/ci.yml +5 -5
  5. package/.github/workflows/depsreview.yml +14 -0
  6. package/.github/workflows/nightly.yml +1 -1
  7. package/.github/workflows/release.yml +1 -1
  8. package/CONTRIBUTORS.md +2 -0
  9. package/README.md +2 -12
  10. package/dist/components/accordion.css +1 -1
  11. package/dist/components/accordion.js +4 -2
  12. package/dist/components/accordion.min.css +1 -1
  13. package/dist/components/accordion.min.js +2 -2
  14. package/dist/components/ad.css +1 -1
  15. package/dist/components/ad.min.css +1 -1
  16. package/dist/components/api.js +7 -3
  17. package/dist/components/api.min.js +2 -2
  18. package/dist/components/breadcrumb.css +1 -1
  19. package/dist/components/breadcrumb.min.css +1 -1
  20. package/dist/components/button.css +19 -3
  21. package/dist/components/button.min.css +2 -2
  22. package/dist/components/calendar.css +1 -1
  23. package/dist/components/calendar.js +15 -3
  24. package/dist/components/calendar.min.css +1 -1
  25. package/dist/components/calendar.min.js +3 -3
  26. package/dist/components/card.css +1 -1
  27. package/dist/components/card.min.css +1 -1
  28. package/dist/components/checkbox.css +1 -1
  29. package/dist/components/checkbox.js +10 -4
  30. package/dist/components/checkbox.min.css +1 -1
  31. package/dist/components/checkbox.min.js +3 -3
  32. package/dist/components/comment.css +1 -1
  33. package/dist/components/comment.min.css +1 -1
  34. package/dist/components/container.css +1 -1
  35. package/dist/components/container.min.css +1 -1
  36. package/dist/components/dimmer.css +7 -3
  37. package/dist/components/dimmer.js +4 -2
  38. package/dist/components/dimmer.min.css +2 -2
  39. package/dist/components/dimmer.min.js +2 -2
  40. package/dist/components/divider.css +1 -1
  41. package/dist/components/divider.min.css +1 -1
  42. package/dist/components/dropdown.css +41 -38
  43. package/dist/components/dropdown.js +102 -33
  44. package/dist/components/dropdown.min.css +2 -2
  45. package/dist/components/dropdown.min.js +3 -3
  46. package/dist/components/embed.css +1 -1
  47. package/dist/components/embed.js +17 -7
  48. package/dist/components/embed.min.css +1 -1
  49. package/dist/components/embed.min.js +3 -3
  50. package/dist/components/emoji.css +1 -1
  51. package/dist/components/emoji.min.css +1 -1
  52. package/dist/components/feed.css +12 -1
  53. package/dist/components/feed.min.css +2 -2
  54. package/dist/components/flag.css +1 -1
  55. package/dist/components/flag.min.css +1 -1
  56. package/dist/components/flyout.css +1 -1
  57. package/dist/components/flyout.js +4 -2
  58. package/dist/components/flyout.min.css +1 -1
  59. package/dist/components/flyout.min.js +2 -2
  60. package/dist/components/form.css +15 -5
  61. package/dist/components/form.js +46 -20
  62. package/dist/components/form.min.css +2 -2
  63. package/dist/components/form.min.js +3 -3
  64. package/dist/components/grid.css +5 -5
  65. package/dist/components/grid.min.css +2 -2
  66. package/dist/components/header.css +4 -1
  67. package/dist/components/header.min.css +2 -2
  68. package/dist/components/icon.css +1 -1
  69. package/dist/components/icon.min.css +1 -1
  70. package/dist/components/image.css +1 -1
  71. package/dist/components/image.min.css +1 -1
  72. package/dist/components/input.css +30 -10
  73. package/dist/components/input.min.css +2 -2
  74. package/dist/components/item.css +1 -1
  75. package/dist/components/item.min.css +1 -1
  76. package/dist/components/label.css +1 -2
  77. package/dist/components/label.min.css +2 -2
  78. package/dist/components/list.css +1 -1
  79. package/dist/components/list.min.css +1 -1
  80. package/dist/components/loader.css +1 -1
  81. package/dist/components/loader.min.css +1 -1
  82. package/dist/components/menu.css +1 -2
  83. package/dist/components/menu.min.css +2 -2
  84. package/dist/components/message.css +1 -1
  85. package/dist/components/message.min.css +1 -1
  86. package/dist/components/modal.css +1 -1
  87. package/dist/components/modal.js +7 -3
  88. package/dist/components/modal.min.css +1 -1
  89. package/dist/components/modal.min.js +2 -2
  90. package/dist/components/nag.css +1 -1
  91. package/dist/components/nag.js +11 -5
  92. package/dist/components/nag.min.css +1 -1
  93. package/dist/components/nag.min.js +3 -3
  94. package/dist/components/placeholder.css +1 -1
  95. package/dist/components/placeholder.min.css +1 -1
  96. package/dist/components/popup.css +1 -2
  97. package/dist/components/popup.js +10 -4
  98. package/dist/components/popup.min.css +2 -2
  99. package/dist/components/popup.min.js +2 -2
  100. package/dist/components/progress.css +1 -1
  101. package/dist/components/progress.js +4 -2
  102. package/dist/components/progress.min.css +1 -1
  103. package/dist/components/progress.min.js +2 -2
  104. package/dist/components/rail.css +1 -1
  105. package/dist/components/rail.min.css +1 -1
  106. package/dist/components/rating.css +1 -1
  107. package/dist/components/rating.js +4 -2
  108. package/dist/components/rating.min.css +1 -1
  109. package/dist/components/rating.min.js +2 -2
  110. package/dist/components/reset.css +1 -1
  111. package/dist/components/reset.min.css +1 -1
  112. package/dist/components/reveal.css +1 -1
  113. package/dist/components/reveal.min.css +1 -1
  114. package/dist/components/search.css +1 -1
  115. package/dist/components/search.js +67 -14
  116. package/dist/components/search.min.css +1 -1
  117. package/dist/components/search.min.js +3 -3
  118. package/dist/components/segment.css +1 -1
  119. package/dist/components/segment.min.css +1 -1
  120. package/dist/components/shape.css +1 -1
  121. package/dist/components/shape.js +4 -2
  122. package/dist/components/shape.min.css +1 -1
  123. package/dist/components/shape.min.js +2 -2
  124. package/dist/components/sidebar.css +1 -1
  125. package/dist/components/sidebar.js +4 -2
  126. package/dist/components/sidebar.min.css +1 -1
  127. package/dist/components/sidebar.min.js +2 -2
  128. package/dist/components/site.css +14 -6
  129. package/dist/components/site.js +4 -2
  130. package/dist/components/site.min.css +2 -2
  131. package/dist/components/site.min.js +2 -2
  132. package/dist/components/slider.css +1 -1
  133. package/dist/components/slider.js +4 -2
  134. package/dist/components/slider.min.css +1 -1
  135. package/dist/components/slider.min.js +2 -2
  136. package/dist/components/state.js +4 -2
  137. package/dist/components/state.min.js +2 -2
  138. package/dist/components/statistic.css +1 -1
  139. package/dist/components/statistic.min.css +1 -1
  140. package/dist/components/step.css +1 -1
  141. package/dist/components/step.min.css +1 -1
  142. package/dist/components/sticky.css +1 -1
  143. package/dist/components/sticky.js +4 -2
  144. package/dist/components/sticky.min.css +1 -1
  145. package/dist/components/sticky.min.js +2 -2
  146. package/dist/components/tab.css +1 -1
  147. package/dist/components/tab.js +4 -2
  148. package/dist/components/tab.min.css +1 -1
  149. package/dist/components/tab.min.js +2 -2
  150. package/dist/components/table.css +32 -21
  151. package/dist/components/table.min.css +2 -2
  152. package/dist/components/text.css +1 -1
  153. package/dist/components/text.min.css +1 -1
  154. package/dist/components/toast.css +1 -1
  155. package/dist/components/toast.js +7 -3
  156. package/dist/components/toast.min.css +1 -1
  157. package/dist/components/toast.min.js +3 -3
  158. package/dist/components/transition.css +1 -1
  159. package/dist/components/transition.js +7 -3
  160. package/dist/components/transition.min.css +1 -1
  161. package/dist/components/transition.min.js +2 -2
  162. package/dist/components/visibility.js +4 -2
  163. package/dist/components/visibility.min.js +2 -2
  164. package/dist/semantic.css +239 -139
  165. package/dist/semantic.js +360 -130
  166. package/dist/semantic.min.css +3 -3
  167. package/dist/semantic.min.js +3 -3
  168. package/dist/themes/basic/assets/fonts/LICENSE.txt +91 -0
  169. package/dist/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
  170. package/dist/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
  171. package/dist/themes/github/assets/fonts/LICENSE.txt +94 -0
  172. package/dist/themes/material/assets/fonts/LICENSE.txt +202 -0
  173. package/package.json +3 -3
  174. package/src/definitions/behaviors/api.js +6 -2
  175. package/src/definitions/behaviors/form.js +45 -19
  176. package/src/definitions/behaviors/state.js +3 -1
  177. package/src/definitions/behaviors/visibility.js +3 -1
  178. package/src/definitions/collections/form.less +14 -4
  179. package/src/definitions/collections/grid.less +4 -4
  180. package/src/definitions/collections/table.less +69 -54
  181. package/src/definitions/elements/button.less +25 -3
  182. package/src/definitions/elements/header.less +5 -0
  183. package/src/definitions/elements/input.less +14 -6
  184. package/src/definitions/globals/site.js +3 -1
  185. package/src/definitions/globals/site.less +17 -12
  186. package/src/definitions/modules/accordion.js +3 -1
  187. package/src/definitions/modules/calendar.js +14 -2
  188. package/src/definitions/modules/checkbox.js +9 -3
  189. package/src/definitions/modules/dimmer.js +3 -1
  190. package/src/definitions/modules/dimmer.less +8 -5
  191. package/src/definitions/modules/dropdown.js +101 -32
  192. package/src/definitions/modules/dropdown.less +38 -27
  193. package/src/definitions/modules/embed.js +16 -6
  194. package/src/definitions/modules/flyout.js +3 -1
  195. package/src/definitions/modules/modal.js +6 -2
  196. package/src/definitions/modules/nag.js +10 -4
  197. package/src/definitions/modules/popup.js +9 -3
  198. package/src/definitions/modules/progress.js +3 -1
  199. package/src/definitions/modules/rating.js +3 -1
  200. package/src/definitions/modules/search.js +66 -13
  201. package/src/definitions/modules/search.less +9 -2
  202. package/src/definitions/modules/shape.js +3 -1
  203. package/src/definitions/modules/sidebar.js +3 -1
  204. package/src/definitions/modules/slider.js +3 -1
  205. package/src/definitions/modules/sticky.js +3 -1
  206. package/src/definitions/modules/tab.js +3 -1
  207. package/src/definitions/modules/toast.js +6 -2
  208. package/src/definitions/modules/transition.js +6 -2
  209. package/src/definitions/views/feed.less +11 -0
  210. package/src/themes/basic/assets/fonts/LICENSE.txt +91 -0
  211. package/src/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
  212. package/src/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
  213. package/src/themes/default/collections/form.variables +1 -0
  214. package/src/themes/default/elements/button.variables +2 -0
  215. package/src/themes/default/globals/site.variables +3 -0
  216. package/src/themes/default/globals/variation.variables +3 -0
  217. package/src/themes/default/modules/dropdown.variables +3 -0
  218. package/src/themes/default/modules/search.variables +3 -0
  219. package/src/themes/default/views/feed.variables +3 -0
  220. package/src/themes/github/assets/fonts/LICENSE.txt +94 -0
  221. package/src/themes/material/assets/fonts/LICENSE.txt +202 -0
  222. package/types/fomantic-ui-accordion.d.ts +1 -1
  223. package/types/fomantic-ui-api.d.ts +9 -3
  224. package/types/fomantic-ui-calendar.d.ts +93 -8
  225. package/types/fomantic-ui-checkbox.d.ts +14 -4
  226. package/types/fomantic-ui-dimmer.d.ts +1 -1
  227. package/types/fomantic-ui-dropdown.d.ts +48 -35
  228. package/types/fomantic-ui-embed.d.ts +19 -2
  229. package/types/fomantic-ui-flyout.d.ts +24 -10
  230. package/types/fomantic-ui-form.d.ts +123 -15
  231. package/types/fomantic-ui-modal.d.ts +75 -5
  232. package/types/fomantic-ui-nag.d.ts +4 -4
  233. package/types/fomantic-ui-popup.d.ts +11 -11
  234. package/types/fomantic-ui-progress.d.ts +12 -6
  235. package/types/fomantic-ui-rating.d.ts +1 -1
  236. package/types/fomantic-ui-search.d.ts +125 -14
  237. package/types/fomantic-ui-shape.d.ts +2 -2
  238. package/types/fomantic-ui-sidebar.d.ts +4 -4
  239. package/types/fomantic-ui-slider.d.ts +1 -1
  240. package/types/fomantic-ui-sticky.d.ts +1 -1
  241. package/types/fomantic-ui-tab.d.ts +5 -5
  242. package/types/fomantic-ui-toast.d.ts +14 -2
  243. package/types/fomantic-ui-transition.d.ts +29 -1
  244. package/types/fomantic-ui-visibility.d.ts +3 -3
  245. package/types/index.d.ts +25 -25
  246. package/types/tests.ts +188 -0
  247. package/types/tsconfig.json +1 -1
  248. package/types/fomantic-ui-tests.ts +0 -25
@@ -1219,7 +1219,9 @@
1219
1219
  });
1220
1220
  }
1221
1221
  clearTimeout(module.performance.timer);
1222
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
1222
+ module.performance.timer = setTimeout(function () {
1223
+ module.performance.display();
1224
+ }, 500);
1223
1225
  },
1224
1226
  display: function () {
1225
1227
  var
@@ -527,7 +527,9 @@
527
527
  },
528
528
  debounce: function (method, delay) {
529
529
  clearTimeout(module.timer);
530
- module.timer = setTimeout(function () { method(); }, delay);
530
+ module.timer = setTimeout(function () {
531
+ method();
532
+ }, delay);
531
533
  },
532
534
  keyboard: function (event) {
533
535
  var
@@ -1273,7 +1275,9 @@
1273
1275
  });
1274
1276
  }
1275
1277
  clearTimeout(module.performance.timer);
1276
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
1278
+ module.performance.timer = setTimeout(function () {
1279
+ module.performance.display();
1280
+ }, 500);
1277
1281
  },
1278
1282
  display: function () {
1279
1283
  var
@@ -88,7 +88,9 @@
88
88
  }
89
89
 
90
90
  if (settings.displayTime > 0) {
91
- setTimeout(function () { module.hide(); }, settings.displayTime);
91
+ setTimeout(function () {
92
+ module.hide();
93
+ }, settings.displayTime);
92
94
  }
93
95
  module.show();
94
96
  },
@@ -144,8 +146,10 @@
144
146
  module.debug('Dismissing nag', settings.storageMethod, settings.key, settings.value, settings.expires);
145
147
  module.storage.set(settings.key, settings.value);
146
148
  }
147
- event.stopImmediatePropagation();
148
- event.preventDefault();
149
+ if (event) {
150
+ event.stopImmediatePropagation();
151
+ event.preventDefault();
152
+ }
149
153
  },
150
154
 
151
155
  should: {
@@ -377,7 +381,9 @@
377
381
  });
378
382
  }
379
383
  clearTimeout(module.performance.timer);
380
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
384
+ module.performance.timer = setTimeout(function () {
385
+ module.performance.display();
386
+ }, 500);
381
387
  },
382
388
  display: function () {
383
389
  var
@@ -194,7 +194,9 @@
194
194
  ;
195
195
  clearTimeout(module.hideTimer);
196
196
  if (!openedWithTouch || (openedWithTouch && settings.addTouchEvents)) {
197
- module.showTimer = setTimeout(function () { module.show(); }, delay);
197
+ module.showTimer = setTimeout(function () {
198
+ module.show();
199
+ }, delay);
198
200
  }
199
201
  },
200
202
  end: function () {
@@ -204,7 +206,9 @@
204
206
  : settings.delay
205
207
  ;
206
208
  clearTimeout(module.showTimer);
207
- module.hideTimer = setTimeout(function () { module.hide(); }, delay);
209
+ module.hideTimer = setTimeout(function () {
210
+ module.hide();
211
+ }, delay);
208
212
  },
209
213
  touchstart: function (event) {
210
214
  openedWithTouch = true;
@@ -1244,7 +1248,9 @@
1244
1248
  });
1245
1249
  }
1246
1250
  clearTimeout(module.performance.timer);
1247
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
1251
+ module.performance.timer = setTimeout(function () {
1252
+ module.performance.display();
1253
+ }, 500);
1248
1254
  },
1249
1255
  display: function () {
1250
1256
  var
@@ -791,7 +791,9 @@
791
791
  });
792
792
  }
793
793
  clearTimeout(module.performance.timer);
794
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
794
+ module.performance.timer = setTimeout(function () {
795
+ module.performance.display();
796
+ }, 500);
795
797
  },
796
798
  display: function () {
797
799
  var
@@ -368,7 +368,9 @@
368
368
  });
369
369
  }
370
370
  clearTimeout(module.performance.timer);
371
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
371
+ module.performance.timer = setTimeout(function () {
372
+ module.performance.display();
373
+ }, 500);
372
374
  },
373
375
  display: function () {
374
376
  var
@@ -135,7 +135,10 @@
135
135
  // this makes sure $.extend does not add specified search fields to default fields
136
136
  // this is the only setting which should not extend defaults
137
137
  if (parameters && parameters.searchFields !== undefined) {
138
- settings.searchFields = parameters.searchFields;
138
+ settings.searchFields = Array.isArray(parameters.searchFields)
139
+ ? parameters.searchFields
140
+ : [parameters.searchFields]
141
+ ;
139
142
  }
140
143
  },
141
144
  },
@@ -169,7 +172,9 @@
169
172
  callback = function () {
170
173
  module.cancel.query();
171
174
  module.remove.focus();
172
- module.timer = setTimeout(function () { module.hideResults(); }, settings.hideDelay);
175
+ module.timer = setTimeout(function () {
176
+ module.hideResults();
177
+ }, settings.hideDelay);
173
178
  }
174
179
  ;
175
180
  if (pageLostFocus) {
@@ -629,7 +634,7 @@
629
634
  exactResults = [],
630
635
  fuzzyResults = [],
631
636
  searchExp = searchTerm.replace(regExp.escape, '\\$&'),
632
- matchRegExp = new RegExp(regExp.beginsWith + searchExp, 'i'),
637
+ matchRegExp = new RegExp(regExp.beginsWith + searchExp, settings.ignoreSearchCase ? 'i' : ''),
633
638
 
634
639
  // avoid duplicates when pushing results
635
640
  addResult = function (array, result) {
@@ -665,13 +670,14 @@
665
670
  var concatenatedContent = [];
666
671
  $.each(searchFields, function (index, field) {
667
672
  var
668
- fieldExists = (typeof content[field] === 'string') || (typeof content[field] === 'number')
673
+ fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
669
674
  ;
670
675
  if (fieldExists) {
671
676
  var text;
672
677
  text = typeof content[field] === 'string'
673
678
  ? module.remove.diacritics(content[field])
674
679
  : content[field].toString();
680
+ text = $('<div/>', { html: text }).text().trim();
675
681
  if (settings.fullTextSearch === 'all') {
676
682
  concatenatedContent.push(text);
677
683
  if (index < lastSearchFieldIndex) {
@@ -702,8 +708,10 @@
702
708
  },
703
709
  },
704
710
  exactSearch: function (query, term) {
705
- query = query.toLowerCase();
706
- term = term.toLowerCase();
711
+ if (settings.ignoreSearchCase) {
712
+ query = query.toLowerCase();
713
+ term = term.toLowerCase();
714
+ }
707
715
 
708
716
  return term.indexOf(query) > -1;
709
717
  },
@@ -730,8 +738,10 @@
730
738
  if (typeof query !== 'string') {
731
739
  return false;
732
740
  }
733
- query = query.toLowerCase();
734
- term = term.toLowerCase();
741
+ if (settings.ignoreSearchCase) {
742
+ query = query.toLowerCase();
743
+ term = term.toLowerCase();
744
+ }
735
745
  if (queryLength > termLength) {
736
746
  return false;
737
747
  }
@@ -1086,6 +1096,39 @@
1086
1096
  response[fields.results] = response[fields.results].slice(0, settings.maxResults);
1087
1097
  }
1088
1098
  }
1099
+ if (settings.highlightMatches) {
1100
+ var results = response[fields.results],
1101
+ regExpIgnore = settings.ignoreSearchCase ? 'i' : '',
1102
+ querySplit = module.get.value().split(''),
1103
+ diacriticReg = settings.ignoreDiacritics ? '[\u0300-\u036F]?' : '',
1104
+ htmlReg = '(?![^<]*>)',
1105
+ markedRegExp = new RegExp(htmlReg + '(' + querySplit.join(diacriticReg + ')(.*?)' + htmlReg + '(') + diacriticReg + ')', regExpIgnore),
1106
+ markedReplacer = function () {
1107
+ var args = [].slice.call(arguments, 1, querySplit.length * 2).map(function (x, i) {
1108
+ return i & 1 ? x : '<mark>' + x + '</mark>'; // eslint-disable-line no-bitwise
1109
+ });
1110
+
1111
+ return args.join('');
1112
+ }
1113
+ ;
1114
+ $.each(results, function (label, content) {
1115
+ $.each(settings.searchFields, function (index, field) {
1116
+ var
1117
+ fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
1118
+ ;
1119
+ if (fieldExists) {
1120
+ var markedHTML = typeof content[field] === 'string'
1121
+ ? content[field]
1122
+ : content[field].toString();
1123
+ if (settings.ignoreDiacritics) {
1124
+ markedHTML = markedHTML.normalize('NFD');
1125
+ }
1126
+ markedHTML = markedHTML.replace(/<\/?mark>/g, '');
1127
+ response[fields.results][label][field] = markedHTML.replace(markedRegExp, markedReplacer);
1128
+ }
1129
+ });
1130
+ });
1131
+ }
1089
1132
  if (isFunction(template)) {
1090
1133
  html = template(response, fields, settings.preserveHTML);
1091
1134
  } else {
@@ -1171,7 +1214,9 @@
1171
1214
  });
1172
1215
  }
1173
1216
  clearTimeout(module.performance.timer);
1174
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
1217
+ module.performance.timer = setTimeout(function () {
1218
+ module.performance.display();
1219
+ }, 500);
1175
1220
  },
1176
1221
  display: function () {
1177
1222
  var
@@ -1312,9 +1357,15 @@
1312
1357
  // search anywhere in value (set to 'exact' to require exact matches
1313
1358
  fullTextSearch: 'exact',
1314
1359
 
1360
+ // Whether search result should highlight matching strings
1361
+ highlightMatches: false,
1362
+
1315
1363
  // match results also if they contain diacritics of the same base character (for example searching for "a" will also match "á" or "â" or "à", etc...)
1316
1364
  ignoreDiacritics: false,
1317
1365
 
1366
+ // whether to consider case sensitivity on local searching
1367
+ ignoreSearchCase: true,
1368
+
1318
1369
  // whether to add events to prompt automatically
1319
1370
  automatic: true,
1320
1371
 
@@ -1393,6 +1444,7 @@
1393
1444
  categoryResults: 'results', // array of results (category view)
1394
1445
  description: 'description', // result description
1395
1446
  image: 'image', // result image
1447
+ alt: 'alt', // result alt text for image
1396
1448
  price: 'price', // result price
1397
1449
  results: 'results', // array of results (standard)
1398
1450
  title: 'title', // result title
@@ -1432,8 +1484,9 @@
1432
1484
  };
1433
1485
  if (shouldEscape.test(string)) {
1434
1486
  string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
1435
-
1436
- return string.replace(badChars, escapedChar);
1487
+ string = string.replace(badChars, escapedChar);
1488
+ // FUI controlled HTML is still allowed
1489
+ string = string.replace(/&lt;(\/)*mark&gt;/g, '<$1mark>');
1437
1490
  }
1438
1491
 
1439
1492
  return string;
@@ -1479,7 +1532,7 @@
1479
1532
  if (result[fields.image] !== undefined) {
1480
1533
  html += ''
1481
1534
  + '<div class="image">'
1482
- + ' <img src="' + result[fields.image].replace(/"/g, '') + '">'
1535
+ + ' <img src="' + result[fields.image].replace(/"/g, '') + (result[fields.alt] ? '" alt="' + result[fields.alt].replace(/"/g, '') : '') + '">'
1483
1536
  + '</div>';
1484
1537
  }
1485
1538
  html += '<div class="content">';
@@ -1532,7 +1585,7 @@
1532
1585
  if (result[fields.image] !== undefined) {
1533
1586
  html += ''
1534
1587
  + '<div class="image">'
1535
- + ' <img src="' + result[fields.image].replace(/"/g, '') + '">'
1588
+ + ' <img src="' + result[fields.image].replace(/"/g, '') + (result[fields.alt] ? '" alt="' + result[fields.alt].replace(/"/g, '') : '') + '">'
1536
1589
  + '</div>';
1537
1590
  }
1538
1591
  html += '<div class="content">';
@@ -565,8 +565,8 @@
565
565
  .ui.search {
566
566
  font-size: @relativeMedium;
567
567
  }
568
- & when not (@variationFeedSizes = false) {
569
- each(@variationFeedSizes, {
568
+ & when not (@variationSearchSizes = false) {
569
+ each(@variationSearchSizes, {
570
570
  @s: @{value}SearchSize;
571
571
  .ui.@{value}.search {
572
572
  font-size: @@s;
@@ -574,6 +574,13 @@
574
574
  });
575
575
  }
576
576
 
577
+ & when (@variationSearchHighlightMatches) {
578
+ .ui.search > .results mark {
579
+ background: @highlightMatchesBackground;
580
+ color: @highlightMatchesColor;
581
+ }
582
+ }
583
+
577
584
  /* --------------
578
585
  Mobile
579
586
  --------------- */
@@ -623,7 +623,9 @@
623
623
  });
624
624
  }
625
625
  clearTimeout(module.performance.timer);
626
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
626
+ module.performance.timer = setTimeout(function () {
627
+ module.performance.display();
628
+ }, 500);
627
629
  },
628
630
  display: function () {
629
631
  var
@@ -871,7 +871,9 @@
871
871
  });
872
872
  }
873
873
  clearTimeout(module.performance.timer);
874
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
874
+ module.performance.timer = setTimeout(function () {
875
+ module.performance.display();
876
+ }, 500);
875
877
  },
876
878
  display: function () {
877
879
  var
@@ -1267,7 +1267,9 @@
1267
1267
  });
1268
1268
  }
1269
1269
  clearTimeout(module.performance.timer);
1270
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
1270
+ module.performance.timer = setTimeout(function () {
1271
+ module.performance.display();
1272
+ }, 500);
1271
1273
  },
1272
1274
  display: function () {
1273
1275
  var
@@ -746,7 +746,9 @@
746
746
  });
747
747
  }
748
748
  clearTimeout(module.performance.timer);
749
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 0);
749
+ module.performance.timer = setTimeout(function () {
750
+ module.performance.display();
751
+ }, 0);
750
752
  },
751
753
  display: function () {
752
754
  var
@@ -788,7 +788,9 @@
788
788
  });
789
789
  }
790
790
  clearTimeout(module.performance.timer);
791
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
791
+ module.performance.timer = setTimeout(function () {
792
+ module.performance.display();
793
+ }, 500);
792
794
  },
793
795
  display: function () {
794
796
  var
@@ -183,6 +183,7 @@
183
183
  $toast.append($('<img>', {
184
184
  class: className.image + ' ' + settings.classImage,
185
185
  src: settings.showImage,
186
+ alt: settings.alt || '',
186
187
  }));
187
188
  }
188
189
  if (settings.title !== '') {
@@ -228,7 +229,7 @@
228
229
  $toast.find(selector.icon).attr('class', iconClass + ' ' + className.icon);
229
230
  }
230
231
  if (settings.showImage) {
231
- $toast.find(selector.image).attr('src', settings.showImage);
232
+ $toast.find(selector.image).attr('src', settings.showImage).attr('alt', settings.alt || '');
232
233
  }
233
234
  if (settings.title !== '') {
234
235
  $toast.find(selector.title).html(module.helpers.escape(settings.title, settings.preserveHTML));
@@ -702,7 +703,9 @@
702
703
  });
703
704
  }
704
705
  clearTimeout(module.performance.timer);
705
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
706
+ module.performance.timer = setTimeout(function () {
707
+ module.performance.display();
708
+ }, 500);
706
709
  },
707
710
  display: function () {
708
711
  var
@@ -839,6 +842,7 @@
839
842
  actions: false,
840
843
  preserveHTML: true,
841
844
  showImage: false,
845
+ alt: false,
842
846
 
843
847
  // transition settings
844
848
  transition: {
@@ -142,7 +142,9 @@
142
142
  ? ($allModules.length - index) * interval
143
143
  : index * interval;
144
144
  module.debug('Delaying animation by', delay);
145
- setTimeout(function () { module.animate(); }, delay);
145
+ setTimeout(function () {
146
+ module.animate();
147
+ }, delay);
146
148
  },
147
149
 
148
150
  animate: function (overrideSettings) {
@@ -849,7 +851,9 @@
849
851
  });
850
852
  }
851
853
  clearTimeout(module.performance.timer);
852
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
854
+ module.performance.timer = setTimeout(function () {
855
+ module.performance.display();
856
+ }, 500);
853
857
  },
854
858
  display: function () {
855
859
  var
@@ -459,6 +459,17 @@
459
459
  color: @invertedLikeActiveColor;
460
460
  }
461
461
  }
462
+
463
+ /* Action */
464
+ .ui.inverted.feed > .event > .content .meta a,
465
+ .ui.inverted.feed > .event > .content .meta > i.icon {
466
+ color: @invertedMetadataActionColor;
467
+ }
468
+ .ui.inverted.feed > .event > .content .meta a:hover,
469
+ .ui.inverted.feed > .event > .content .meta a:hover i.icon,
470
+ .ui.inverted.feed > .event > .content .meta > i.icon:hover {
471
+ color: @invertedMetadataActionHoverColor;
472
+ }
462
473
  }
463
474
 
464
475
  /* --------------
@@ -0,0 +1,91 @@
1
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
2
+ This license is copied below, and is also available with a FAQ at:
3
+ http://scripts.sil.org/OFL
4
+
5
+
6
+ -----------------------------------------------------------
7
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
8
+ -----------------------------------------------------------
9
+
10
+ PREAMBLE
11
+ The goals of the Open Font License (OFL) are to stimulate worldwide
12
+ development of collaborative font projects, to support the font creation
13
+ efforts of academic and linguistic communities, and to provide a free and
14
+ open framework in which fonts may be shared and improved in partnership
15
+ with others.
16
+
17
+ The OFL allows the licensed fonts to be used, studied, modified and
18
+ redistributed freely as long as they are not sold by themselves. The
19
+ fonts, including any derivative works, can be bundled, embedded,
20
+ redistributed and/or sold with any software provided that any reserved
21
+ names are not used by derivative works. The fonts and derivatives,
22
+ however, cannot be released under any other type of license. The
23
+ requirement for fonts to remain under this license does not apply
24
+ to any document created using the fonts or their derivatives.
25
+
26
+ DEFINITIONS
27
+ "Font Software" refers to the set of files released by the Copyright
28
+ Holder(s) under this license and clearly marked as such. This may
29
+ include source files, build scripts and documentation.
30
+
31
+ "Reserved Font Name" refers to any names specified as such after the
32
+ copyright statement(s).
33
+
34
+ "Original Version" refers to the collection of Font Software components as
35
+ distributed by the Copyright Holder(s).
36
+
37
+ "Modified Version" refers to any derivative made by adding to, deleting,
38
+ or substituting -- in part or in whole -- any of the components of the
39
+ Original Version, by changing formats or by porting the Font Software to a
40
+ new environment.
41
+
42
+ "Author" refers to any designer, engineer, programmer, technical
43
+ writer or other person who contributed to the Font Software.
44
+
45
+ PERMISSION & CONDITIONS
46
+ Permission is hereby granted, free of charge, to any person obtaining
47
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
48
+ redistribute, and sell modified and unmodified copies of the Font
49
+ Software, subject to the following conditions:
50
+
51
+ 1) Neither the Font Software nor any of its individual components,
52
+ in Original or Modified Versions, may be sold by itself.
53
+
54
+ 2) Original or Modified Versions of the Font Software may be bundled,
55
+ redistributed and/or sold with any software, provided that each copy
56
+ contains the above copyright notice and this license. These can be
57
+ included either as stand-alone text files, human-readable headers or
58
+ in the appropriate machine-readable metadata fields within text or
59
+ binary files as long as those fields can be easily viewed by the user.
60
+
61
+ 3) No Modified Version of the Font Software may use the Reserved Font
62
+ Name(s) unless explicit written permission is granted by the corresponding
63
+ Copyright Holder. This restriction only applies to the primary font name as
64
+ presented to the users.
65
+
66
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
67
+ Software shall not be used to promote, endorse or advertise any
68
+ Modified Version, except to acknowledge the contribution(s) of the
69
+ Copyright Holder(s) and the Author(s) or with their explicit written
70
+ permission.
71
+
72
+ 5) The Font Software, modified or unmodified, in part or in whole,
73
+ must be distributed entirely under this license, and must not be
74
+ distributed under any other license. The requirement for fonts to
75
+ remain under this license does not apply to any document created
76
+ using the Font Software.
77
+
78
+ TERMINATION
79
+ This license becomes null and void if any of the above conditions are
80
+ not met.
81
+
82
+ DISCLAIMER
83
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
84
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
85
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
86
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
87
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
88
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
89
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
90
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
91
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,94 @@
1
+ Copyright (c) 2010-2015, Łukasz Dziedzic (dziedzic@typoland.com),
2
+ with Reserved Font Name Lato.
3
+
4
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
5
+ This license is copied below, and is also available with a FAQ at:
6
+ http://scripts.sil.org/OFL
7
+
8
+
9
+ -----------------------------------------------------------
10
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11
+ -----------------------------------------------------------
12
+
13
+ PREAMBLE
14
+ The goals of the Open Font License (OFL) are to stimulate worldwide
15
+ development of collaborative font projects, to support the font creation
16
+ efforts of academic and linguistic communities, and to provide a free and
17
+ open framework in which fonts may be shared and improved in partnership
18
+ with others.
19
+
20
+ The OFL allows the licensed fonts to be used, studied, modified and
21
+ redistributed freely as long as they are not sold by themselves. The
22
+ fonts, including any derivative works, can be bundled, embedded,
23
+ redistributed and/or sold with any software provided that any reserved
24
+ names are not used by derivative works. The fonts and derivatives,
25
+ however, cannot be released under any other type of license. The
26
+ requirement for fonts to remain under this license does not apply
27
+ to any document created using the fonts or their derivatives.
28
+
29
+ DEFINITIONS
30
+ "Font Software" refers to the set of files released by the Copyright
31
+ Holder(s) under this license and clearly marked as such. This may
32
+ include source files, build scripts and documentation.
33
+
34
+ "Reserved Font Name" refers to any names specified as such after the
35
+ copyright statement(s).
36
+
37
+ "Original Version" refers to the collection of Font Software components as
38
+ distributed by the Copyright Holder(s).
39
+
40
+ "Modified Version" refers to any derivative made by adding to, deleting,
41
+ or substituting -- in part or in whole -- any of the components of the
42
+ Original Version, by changing formats or by porting the Font Software to a
43
+ new environment.
44
+
45
+ "Author" refers to any designer, engineer, programmer, technical
46
+ writer or other person who contributed to the Font Software.
47
+
48
+ PERMISSION & CONDITIONS
49
+ Permission is hereby granted, free of charge, to any person obtaining
50
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
51
+ redistribute, and sell modified and unmodified copies of the Font
52
+ Software, subject to the following conditions:
53
+
54
+ 1) Neither the Font Software nor any of its individual components,
55
+ in Original or Modified Versions, may be sold by itself.
56
+
57
+ 2) Original or Modified Versions of the Font Software may be bundled,
58
+ redistributed and/or sold with any software, provided that each copy
59
+ contains the above copyright notice and this license. These can be
60
+ included either as stand-alone text files, human-readable headers or
61
+ in the appropriate machine-readable metadata fields within text or
62
+ binary files as long as those fields can be easily viewed by the user.
63
+
64
+ 3) No Modified Version of the Font Software may use the Reserved Font
65
+ Name(s) unless explicit written permission is granted by the corresponding
66
+ Copyright Holder. This restriction only applies to the primary font name as
67
+ presented to the users.
68
+
69
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70
+ Software shall not be used to promote, endorse or advertise any
71
+ Modified Version, except to acknowledge the contribution(s) of the
72
+ Copyright Holder(s) and the Author(s) or with their explicit written
73
+ permission.
74
+
75
+ 5) The Font Software, modified or unmodified, in part or in whole,
76
+ must be distributed entirely under this license, and must not be
77
+ distributed under any other license. The requirement for fonts to
78
+ remain under this license does not apply to any document created
79
+ using the Font Software.
80
+
81
+ TERMINATION
82
+ This license becomes null and void if any of the above conditions are
83
+ not met.
84
+
85
+ DISCLAIMER
86
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94
+ OTHER DEALINGS IN THE FONT SOFTWARE.