fomantic-ui 2.9.4-beta.10 → 2.9.4-beta.100

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 (295) hide show
  1. package/.all-contributorsrc +29 -1
  2. package/.eslintrc.js +17 -0
  3. package/.github/FUNDING.yml +1 -1
  4. package/.github/workflows/ci.yml +8 -8
  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 +5 -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 +21 -3
  21. package/dist/components/button.min.css +2 -2
  22. package/dist/components/calendar.css +1 -1
  23. package/dist/components/calendar.js +47 -12
  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 +46 -38
  43. package/dist/components/dropdown.js +109 -34
  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 +4309 -3713
  51. package/dist/components/emoji.min.css +2 -2
  52. package/dist/components/feed.css +12 -1
  53. package/dist/components/feed.min.css +2 -2
  54. package/dist/components/flag.css +3 -1
  55. package/dist/components/flag.min.css +2 -2
  56. package/dist/components/flyout.css +3 -3
  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 -3
  61. package/dist/components/form.js +66 -23
  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 +1 -1
  67. package/dist/components/header.min.css +1 -1
  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 +1 -1
  73. package/dist/components/input.min.css +1 -1
  74. package/dist/components/item.css +1 -1
  75. package/dist/components/item.min.css +1 -1
  76. package/dist/components/label.css +7 -1
  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 -1
  83. package/dist/components/menu.min.css +1 -1
  84. package/dist/components/message.css +2 -1
  85. package/dist/components/message.min.css +2 -2
  86. package/dist/components/modal.css +3 -3
  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 -1
  97. package/dist/components/popup.js +10 -4
  98. package/dist/components/popup.min.css +1 -1
  99. package/dist/components/popup.min.js +2 -2
  100. package/dist/components/progress.css +15 -6
  101. package/dist/components/progress.js +4 -2
  102. package/dist/components/progress.min.css +2 -2
  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 +34 -23
  115. package/dist/components/search.js +78 -14
  116. package/dist/components/search.min.css +2 -2
  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 +7 -5
  122. package/dist/components/shape.min.css +1 -1
  123. package/dist/components/shape.min.js +3 -3
  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 +152 -2
  133. package/dist/components/slider.js +142 -44
  134. package/dist/components/slider.min.css +2 -2
  135. package/dist/components/slider.min.js +3 -3
  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 +992 -86
  141. package/dist/components/step.min.css +2 -2
  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 +6179 -3968
  165. package/dist/semantic.js +571 -188
  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 +14 -14
  174. package/semantic.json.example +1 -1
  175. package/src/definitions/behaviors/api.js +6 -2
  176. package/src/definitions/behaviors/form.js +65 -22
  177. package/src/definitions/behaviors/state.js +3 -1
  178. package/src/definitions/behaviors/visibility.js +3 -1
  179. package/src/definitions/collections/form.less +43 -23
  180. package/src/definitions/collections/grid.less +85 -70
  181. package/src/definitions/collections/menu.less +38 -27
  182. package/src/definitions/collections/message.less +1 -0
  183. package/src/definitions/collections/table.less +183 -157
  184. package/src/definitions/elements/button.less +61 -25
  185. package/src/definitions/elements/container.less +6 -4
  186. package/src/definitions/elements/divider.less +4 -1
  187. package/src/definitions/elements/emoji.less +3 -1
  188. package/src/definitions/elements/header.less +7 -4
  189. package/src/definitions/elements/icon.less +35 -28
  190. package/src/definitions/elements/input.less +21 -13
  191. package/src/definitions/elements/label.less +19 -8
  192. package/src/definitions/elements/list.less +28 -21
  193. package/src/definitions/elements/loader.less +17 -12
  194. package/src/definitions/elements/segment.less +12 -7
  195. package/src/definitions/elements/step.less +405 -87
  196. package/src/definitions/globals/site.js +3 -1
  197. package/src/definitions/globals/site.less +17 -12
  198. package/src/definitions/modules/accordion.js +3 -1
  199. package/src/definitions/modules/accordion.less +15 -13
  200. package/src/definitions/modules/calendar.js +46 -11
  201. package/src/definitions/modules/calendar.less +6 -4
  202. package/src/definitions/modules/checkbox.js +9 -3
  203. package/src/definitions/modules/checkbox.less +12 -6
  204. package/src/definitions/modules/dimmer.js +3 -1
  205. package/src/definitions/modules/dimmer.less +16 -10
  206. package/src/definitions/modules/dropdown.js +108 -33
  207. package/src/definitions/modules/dropdown.less +109 -78
  208. package/src/definitions/modules/embed.js +16 -6
  209. package/src/definitions/modules/flyout.js +3 -1
  210. package/src/definitions/modules/flyout.less +51 -45
  211. package/src/definitions/modules/modal.js +6 -2
  212. package/src/definitions/modules/modal.less +109 -82
  213. package/src/definitions/modules/nag.js +10 -4
  214. package/src/definitions/modules/nag.less +8 -4
  215. package/src/definitions/modules/popup.js +9 -3
  216. package/src/definitions/modules/popup.less +3 -1
  217. package/src/definitions/modules/progress.js +3 -1
  218. package/src/definitions/modules/progress.less +24 -6
  219. package/src/definitions/modules/rating.js +3 -1
  220. package/src/definitions/modules/search.js +77 -13
  221. package/src/definitions/modules/search.less +41 -25
  222. package/src/definitions/modules/shape.js +6 -4
  223. package/src/definitions/modules/sidebar.js +3 -1
  224. package/src/definitions/modules/slider.js +141 -43
  225. package/src/definitions/modules/slider.less +129 -27
  226. package/src/definitions/modules/sticky.js +3 -1
  227. package/src/definitions/modules/tab.js +3 -1
  228. package/src/definitions/modules/toast.js +6 -2
  229. package/src/definitions/modules/toast.less +35 -24
  230. package/src/definitions/modules/transition.js +6 -2
  231. package/src/definitions/views/card.less +7 -5
  232. package/src/definitions/views/feed.less +14 -1
  233. package/src/definitions/views/item.less +7 -5
  234. package/src/themes/basic/assets/fonts/LICENSE.txt +91 -0
  235. package/src/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
  236. package/src/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
  237. package/src/themes/default/elements/button.variables +3 -0
  238. package/src/themes/default/elements/emoji.variables +172 -23
  239. package/src/themes/default/elements/flag.variables +3 -3
  240. package/src/themes/default/elements/step.variables +33 -0
  241. package/src/themes/default/globals/site.variables +3 -0
  242. package/src/themes/default/globals/variation.variables +23 -2
  243. package/src/themes/default/modules/dropdown.variables +3 -0
  244. package/src/themes/default/modules/progress.variables +1 -1
  245. package/src/themes/default/modules/search.variables +15 -12
  246. package/src/themes/default/modules/slider.variables +10 -0
  247. package/src/themes/default/views/feed.variables +3 -0
  248. package/src/themes/github/assets/fonts/LICENSE.txt +94 -0
  249. package/src/themes/joypixels/elements/emoji.variables +183 -22
  250. package/src/themes/material/assets/fonts/LICENSE.txt +202 -0
  251. package/tasks/admin/components/create.js +4 -4
  252. package/tasks/admin/components/init.js +2 -2
  253. package/tasks/admin/components/update.js +3 -3
  254. package/tasks/admin/distributions/create.js +3 -3
  255. package/tasks/admin/distributions/init.js +2 -2
  256. package/tasks/admin/distributions/update.js +4 -4
  257. package/tasks/build/assets.js +1 -1
  258. package/tasks/build/css.js +19 -10
  259. package/tasks/build/javascript.js +12 -5
  260. package/tasks/check-install.js +1 -1
  261. package/tasks/config/defaults.js +4 -0
  262. package/tasks/config/project/release.js +19 -1
  263. package/tasks/config/tasks.js +7 -7
  264. package/tasks/docs/build.js +3 -3
  265. package/tasks/docs/metadata.js +1 -1
  266. package/tasks/docs/serve.js +3 -1
  267. package/tasks/install.js +2 -2
  268. package/tasks/watch.js +1 -1
  269. package/types/fomantic-ui-accordion.d.ts +1 -1
  270. package/types/fomantic-ui-api.d.ts +9 -3
  271. package/types/fomantic-ui-calendar.d.ts +114 -13
  272. package/types/fomantic-ui-checkbox.d.ts +14 -4
  273. package/types/fomantic-ui-dimmer.d.ts +1 -1
  274. package/types/fomantic-ui-dropdown.d.ts +82 -44
  275. package/types/fomantic-ui-embed.d.ts +19 -2
  276. package/types/fomantic-ui-flyout.d.ts +25 -11
  277. package/types/fomantic-ui-form.d.ts +123 -15
  278. package/types/fomantic-ui-modal.d.ts +101 -5
  279. package/types/fomantic-ui-nag.d.ts +4 -4
  280. package/types/fomantic-ui-popup.d.ts +38 -12
  281. package/types/fomantic-ui-progress.d.ts +12 -6
  282. package/types/fomantic-ui-rating.d.ts +1 -1
  283. package/types/fomantic-ui-search.d.ts +138 -22
  284. package/types/fomantic-ui-shape.d.ts +2 -2
  285. package/types/fomantic-ui-sidebar.d.ts +4 -4
  286. package/types/fomantic-ui-slider.d.ts +56 -4
  287. package/types/fomantic-ui-sticky.d.ts +1 -1
  288. package/types/fomantic-ui-tab.d.ts +6 -6
  289. package/types/fomantic-ui-toast.d.ts +14 -2
  290. package/types/fomantic-ui-transition.d.ts +41 -7
  291. package/types/fomantic-ui-visibility.d.ts +3 -3
  292. package/types/index.d.ts +25 -25
  293. package/types/tests.ts +188 -0
  294. package/types/tsconfig.json +1 -1
  295. package/types/fomantic-ui-tests.ts +0 -25
@@ -292,7 +292,9 @@
292
292
  });
293
293
  }
294
294
  clearTimeout(module.performance.timer);
295
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
295
+ module.performance.timer = setTimeout(function () {
296
+ module.performance.display();
297
+ }, 500);
296
298
  },
297
299
  display: function () {
298
300
  var
@@ -148,18 +148,21 @@ a:hover {
148
148
  body ::-webkit-scrollbar-thumb:hover {
149
149
  background: @thumbHoverBackground;
150
150
  }
151
- body .ui {
152
- & when (@supportIE) {
151
+ & when (@supportIE) {
152
+ body .ui {
153
153
  /* IE11 */
154
154
  scrollbar-face-color: @thumbBackgroundHex;
155
155
  scrollbar-shadow-color: @thumbBackgroundHex;
156
156
  scrollbar-track-color: @trackBackgroundHex;
157
157
  scrollbar-arrow-color: @trackBackgroundHex;
158
158
  }
159
-
160
- /* firefox: first color thumb, second track */
161
- scrollbar-color: @thumbBackground @trackBackground;
162
- scrollbar-width: thin;
159
+ }
160
+ @supports (-moz-appearance: none) {
161
+ body .ui {
162
+ /* firefox: first color thumb, second track */
163
+ scrollbar-color: @thumbBackground @trackBackground;
164
+ scrollbar-width: thin;
165
+ }
163
166
  }
164
167
 
165
168
  /* Inverted UI */
@@ -175,18 +178,20 @@ a:hover {
175
178
  body .ui.inverted:not(.dimmer)::-webkit-scrollbar-thumb:hover {
176
179
  background: @thumbInvertedHoverBackground;
177
180
  }
178
-
179
- body .ui.inverted:not(.dimmer) {
180
- & when (@supportIE) {
181
+ & when (@supportIE) {
182
+ body .ui.inverted:not(.dimmer) {
181
183
  /* IE11 */
182
184
  scrollbar-face-color: @thumbInvertedBackgroundHex;
183
185
  scrollbar-shadow-color: @thumbInvertedBackgroundHex;
184
186
  scrollbar-track-color: @trackInvertedBackgroundHex;
185
187
  scrollbar-arrow-color: @trackInvertedBackgroundHex;
186
188
  }
187
-
188
- /* firefox: first color thumb, second track */
189
- scrollbar-color: @thumbInvertedBackground @trackInvertedBackground;
189
+ }
190
+ @supports (-moz-appearance: none) {
191
+ body .ui.inverted:not(.dimmer) {
192
+ /* firefox: first color thumb, second track */
193
+ scrollbar-color: @thumbInvertedBackground @trackInvertedBackground;
194
+ }
190
195
  }
191
196
  }
192
197
 
@@ -438,7 +438,9 @@
438
438
  });
439
439
  }
440
440
  clearTimeout(module.performance.timer);
441
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
441
+ module.performance.timer = setTimeout(function () {
442
+ module.performance.display();
443
+ }, 500);
442
444
  },
443
445
  display: function () {
444
446
  var
@@ -17,6 +17,8 @@
17
17
 
18
18
  @import (multiple) "../../theme.config";
19
19
 
20
+ @notStyled: if(@variationAccordionStyled, e(":not(.styled)"));
21
+
20
22
  /*******************************
21
23
  Accordion
22
24
  *******************************/
@@ -44,12 +46,12 @@
44
46
  }
45
47
 
46
48
  /* Default Styling */
47
- .ui.accordion:not(.styled) .title ~ .content,
48
- .ui.accordion:not(.styled) .accordion .title ~ .content {
49
+ .ui.accordion@{notStyled} .title ~ .content,
50
+ .ui.accordion@{notStyled} .accordion .title ~ .content {
49
51
  margin: @contentMargin;
50
52
  padding: @contentPadding;
51
53
  }
52
- .ui.accordion:not(.styled) .title ~ .content:last-child {
54
+ .ui.accordion@{notStyled} .title ~ .content:last-child {
53
55
  padding-bottom: 0;
54
56
  }
55
57
 
@@ -183,13 +185,13 @@
183
185
 
184
186
  /* Default Styling */
185
187
 
186
- .ui.compact.accordion:not(.styled) > .title,
187
- .ui.compact.accordion:not(.styled) .accordion > .title {
188
+ .ui.compact.accordion@{notStyled} > .title,
189
+ .ui.compact.accordion@{notStyled} .accordion > .title {
188
190
  padding: @titlePaddingCompact;
189
191
  }
190
192
 
191
- .ui.compact.accordion:not(.styled) .title ~ .content,
192
- .ui.compact.accordion:not(.styled) .accordion .title ~ .content {
193
+ .ui.compact.accordion@{notStyled} .title ~ .content,
194
+ .ui.compact.accordion@{notStyled} .accordion .title ~ .content {
193
195
  padding: @contentPaddingCompact;
194
196
  }
195
197
 
@@ -211,13 +213,13 @@
211
213
  --------------- */
212
214
 
213
215
  & when (@variationAccordionVeryCompact) {
214
- .ui[class*="very compact"].accordion:not(.styled) > .title,
215
- .ui[class*="very compact"].accordion:not(.styled) .accordion > .title {
216
+ .ui[class*="very compact"].accordion@{notStyled} > .title,
217
+ .ui[class*="very compact"].accordion@{notStyled} .accordion > .title {
216
218
  padding: @titlePaddingVeryCompact;
217
219
  }
218
220
 
219
- .ui[class*="very compact"].accordion:not(.styled) .title ~ .content,
220
- .ui[class*="very compact"].accordion:not(.styled) .accordion .title ~ .content {
221
+ .ui[class*="very compact"].accordion@{notStyled} .title ~ .content,
222
+ .ui[class*="very compact"].accordion@{notStyled} .accordion .title ~ .content {
221
223
  padding: @contentPaddingVeryCompact;
222
224
  }
223
225
 
@@ -351,8 +353,8 @@
351
353
  }
352
354
 
353
355
  & when (@variationAccordionTree) {
354
- .ui.tree.accordion:not(.styled) .title ~ .content,
355
- .ui.tree.accordion:not(.styled) .accordion .title ~ .content {
356
+ .ui.tree.accordion@{notStyled} .title ~ .content,
357
+ .ui.tree.accordion@{notStyled} .accordion .title ~ .content {
356
358
  padding: @treeContentPadding;
357
359
  }
358
360
  .ui.tree.accordion > .content,
@@ -102,7 +102,17 @@
102
102
 
103
103
  destroy: function () {
104
104
  module.verbose('Destroying previous calendar for', element);
105
- $module.removeData(moduleNamespace);
105
+ $module.removeData([
106
+ metadata.date,
107
+ metadata.focusDate,
108
+ metadata.startDate,
109
+ metadata.endDate,
110
+ metadata.minDate,
111
+ metadata.maxDate,
112
+ metadata.mode,
113
+ metadata.monthOffset,
114
+ moduleNamespace,
115
+ ]);
106
116
  module.unbind.events();
107
117
  module.disconnect.classObserver();
108
118
  },
@@ -792,24 +802,32 @@
792
802
  formattedDate: function (format, date) {
793
803
  return module.helper.dateFormat(format || formatter[settings.type], date || module.get.date());
794
804
  },
795
- date: function () {
796
- return module.helper.sanitiseDate($module.data(metadata.date)) || null;
805
+ date: function (format) {
806
+ return module.helper.dateObjectOrFormatted(format, $module.data(metadata.date));
797
807
  },
798
808
  inputDate: function () {
799
809
  return $input.val();
800
810
  },
801
- focusDate: function () {
802
- return $module.data(metadata.focusDate) || null;
811
+ focusDate: function (format) {
812
+ return module.helper.dateObjectOrFormatted(format, $module.data(metadata.focusDate));
803
813
  },
804
- startDate: function () {
814
+ startDate: function (format) {
805
815
  var startModule = module.get.calendarModule(settings.startCalendar);
806
816
 
807
- return (startModule ? startModule.get.date() : $module.data(metadata.startDate)) || null;
817
+ if (startModule) {
818
+ return startModule.get.date(format);
819
+ }
820
+
821
+ return module.helper.dateObjectOrFormatted(format, $module.data(metadata.startDate));
808
822
  },
809
- endDate: function () {
823
+ endDate: function (format) {
810
824
  var endModule = module.get.calendarModule(settings.endCalendar);
811
825
 
812
- return (endModule ? endModule.get.date() : $module.data(metadata.endDate)) || null;
826
+ if (endModule) {
827
+ return endModule.get.date(format);
828
+ }
829
+
830
+ return module.helper.dateObjectOrFormatted(format, $module.data(metadata.endDate));
813
831
  },
814
832
  minDate: function () {
815
833
  return $module.data(metadata.minDate) || null;
@@ -1125,6 +1143,20 @@
1125
1143
  return match.slice(1, -1);
1126
1144
  });
1127
1145
  },
1146
+ dateObjectOrFormatted: function (format, date) {
1147
+ format = format || '';
1148
+ date = module.helper.sanitiseDate(date) || null;
1149
+
1150
+ if (!date) {
1151
+ return null;
1152
+ }
1153
+
1154
+ if (format === '') {
1155
+ return date;
1156
+ }
1157
+
1158
+ return module.helper.dateFormat(format, date);
1159
+ },
1128
1160
  isDisabled: function (date, mode) {
1129
1161
  return (mode === 'day' || mode === 'month' || mode === 'year' || mode === 'hour') && (((mode === 'day' && settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function (d) {
1130
1162
  var blocked = false;
@@ -1479,7 +1511,9 @@
1479
1511
  });
1480
1512
  }
1481
1513
  clearTimeout(module.performance.timer);
1482
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
1514
+ module.performance.timer = setTimeout(function () {
1515
+ module.performance.display();
1516
+ }, 500);
1483
1517
  },
1484
1518
  display: function () {
1485
1519
  var
@@ -1687,7 +1721,8 @@
1687
1721
  text = settings.monthFirst || !/^\d{1,2}[./-]/.test(text) ? text : text.replace(/[./-]/g, '/').replace(/(\d+)\/(\d+)/, '$2/$1');
1688
1722
  var textDate = new Date(text);
1689
1723
  var numberOnly = text.match(/^\d+$/) !== null;
1690
- if (!numberOnly && !isNaN(textDate.getDate())) {
1724
+ var isShortYear = text.match(/^(?:\d{1,2}[./-]){2}\d{1,2}$/) !== null;
1725
+ if (!isShortYear && !numberOnly && !isNaN(textDate.getDate())) {
1691
1726
  return textDate;
1692
1727
  }
1693
1728
  text = text.toLowerCase();
@@ -17,6 +17,8 @@
17
17
 
18
18
  @import (multiple) "../../theme.config";
19
19
 
20
+ @notDisabled: if(@variationCalendarDisabled, e(":not(.disabled)"));
21
+
20
22
  /*******************************
21
23
  Popup
22
24
  *******************************/
@@ -150,8 +152,8 @@
150
152
  box-shadow: @rangeBoxShadow;
151
153
  }
152
154
 
153
- .ui.calendar:not(.disabled):focus .ui.table tbody tr td.focus,
154
- .ui.calendar:not(.disabled).popup.active .ui.table tbody tr td.focus {
155
+ .ui.calendar@{notDisabled}:focus .ui.table tbody tr td.focus,
156
+ .ui.calendar@{notDisabled}.popup.active .ui.table tbody tr td.focus {
155
157
  box-shadow: @focusBoxShadow;
156
158
  }
157
159
 
@@ -162,8 +164,8 @@
162
164
  box-shadow: @rangeInvertedBoxShadow;
163
165
  }
164
166
 
165
- .ui.inverted.calendar:not(.disabled) .calendar:focus .ui.table.inverted tbody tr td.focus,
166
- .ui.inverted.calendar:not(.disabled).popup.active .ui.table.inverted tbody tr td.focus {
167
+ .ui.inverted.calendar@{notDisabled} .calendar:focus .ui.table.inverted tbody tr td.focus,
168
+ .ui.inverted.calendar@{notDisabled}.popup.active .ui.table.inverted tbody tr td.focus {
167
169
  box-shadow: @focusInvertedBoxShadow;
168
170
  }
169
171
  .ui.inverted.calendar .ui.ui.ui.inverted.table tr .disabled {
@@ -210,7 +210,7 @@
210
210
  ;
211
211
 
212
212
  var
213
- r = module.get.radios(),
213
+ r = module.get.radios().not(selector.disabled),
214
214
  rIndex = r.index($module),
215
215
  rLen = r.length,
216
216
  checkIndex = false
@@ -228,7 +228,10 @@
228
228
 
229
229
  return false;
230
230
  }
231
- if (settings.beforeChecked.apply($(r[checkIndex]).children(selector.input)[0]) === false) {
231
+ var nextOption = $(r[checkIndex]),
232
+ nextInput = nextOption.children(selector.input),
233
+ disallowOption = nextOption.hasClass(className.readOnly) || nextInput.prop('readonly');
234
+ if (disallowOption || settings.beforeChecked.apply(nextInput[0]) === false) {
232
235
  module.verbose('Next option should not allow check, cancelling key navigation');
233
236
 
234
237
  return false;
@@ -725,7 +728,9 @@
725
728
  });
726
729
  }
727
730
  clearTimeout(module.performance.timer);
728
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
731
+ module.performance.timer = setTimeout(function () {
732
+ module.performance.display();
733
+ }, 500);
729
734
  },
730
735
  display: function () {
731
736
  var
@@ -873,6 +878,7 @@
873
878
 
874
879
  selector: {
875
880
  checkbox: '.ui.checkbox',
881
+ disabled: '.disabled, :has(input[disabled])',
876
882
  label: 'label',
877
883
  input: 'input[type="checkbox"], input[type="radio"]',
878
884
  link: 'a[href]',
@@ -17,6 +17,12 @@
17
17
 
18
18
  @import (multiple) "../../theme.config";
19
19
 
20
+ @notToggle: if(@variationCheckboxToggle, e(":not(.toggle)"));
21
+ @notSlider: if(@variationCheckboxSlider, e(":not(.slider)"));
22
+ @notRadio: if(@variationCheckboxRadio, e(":not(.radio)"));
23
+ @notInvisible: if(@variationCheckboxInvisible, e(":not(.invisible)"));
24
+ @notCompact: if(@variationCheckboxCompact, e(":not(.compact)"));
25
+
20
26
  /*******************************
21
27
  Checkbox
22
28
  *******************************/
@@ -60,7 +66,7 @@
60
66
  font-size: @labelFontSize;
61
67
  }
62
68
 
63
- .ui.checkbox:not(.invisible) label {
69
+ .ui.checkbox@{notInvisible} label {
64
70
  padding-left: @labelDistance;
65
71
  }
66
72
 
@@ -133,8 +139,8 @@
133
139
  background: @checkboxHoverBackground;
134
140
  border-color: @checkboxHoverBorderColor;
135
141
  }
136
- .ui.checkbox:not(.invisible) label:hover,
137
- .ui.checkbox:not(.invisible) + label:hover {
142
+ .ui.checkbox@{notInvisible} label:hover,
143
+ .ui.checkbox@{notInvisible} + label:hover {
138
144
  color: @labelHoverColor;
139
145
  }
140
146
 
@@ -149,7 +155,7 @@
149
155
  .ui.checkbox label:active::after {
150
156
  color: @checkboxPressedColor;
151
157
  }
152
- .ui.checkbox:not(.invisible) input:active ~ label {
158
+ .ui.checkbox@{notInvisible} input:active ~ label {
153
159
  color: @labelPressedColor;
154
160
  }
155
161
 
@@ -164,7 +170,7 @@
164
170
  .ui.checkbox input:focus ~ label::after {
165
171
  color: @checkboxFocusCheckColor;
166
172
  }
167
- .ui.checkbox:not(.invisible) input:focus ~ label {
173
+ .ui.checkbox@{notInvisible} input:focus ~ label {
168
174
  color: @labelFocusColor;
169
175
  }
170
176
 
@@ -726,7 +732,7 @@
726
732
  & when (@@raw > 1) {
727
733
  .ui.@{value}.form .checkbox,
728
734
  .ui.@{value}.checkbox {
729
- &:not(.slider):not(.toggle):not(.radio) {
735
+ &@{notSlider}@{notToggle}@{notRadio} {
730
736
  &
731
737
  label::after,
732
738
  label::before {
@@ -528,7 +528,9 @@
528
528
  });
529
529
  }
530
530
  clearTimeout(module.performance.timer);
531
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
531
+ module.performance.timer = setTimeout(function () {
532
+ module.performance.display();
533
+ }, 500);
532
534
  },
533
535
  display: function () {
534
536
  var
@@ -17,6 +17,9 @@
17
17
 
18
18
  @import (multiple) "../../theme.config";
19
19
 
20
+ @notInverted: if(@variationDimmerInverted, e(":not(.inverted)"));
21
+ @notPage: if(@variationDimmerPage, e(":not(.page)"));
22
+
20
23
  /*******************************
21
24
  Dimmer
22
25
  *******************************/
@@ -56,35 +59,38 @@
56
59
  }
57
60
 
58
61
  /* Loose Coupling */
59
- .ui.segment > .ui.dimmer:not(.page) {
62
+ .ui.segment > .ui.dimmer@{notPage} {
60
63
  border-radius: inherit;
61
64
  }
62
65
 
63
66
  /* Scrollbars */
64
67
  & when (@useCustomScrollbars) {
65
- .ui.dimmer:not(.inverted)::-webkit-scrollbar-track {
68
+ .ui.dimmer@{notInverted}::-webkit-scrollbar-track {
66
69
  background: @trackInvertedBackground;
67
70
  }
68
- .ui.dimmer:not(.inverted)::-webkit-scrollbar-thumb {
71
+ .ui.dimmer@{notInverted}::-webkit-scrollbar-thumb {
69
72
  background: @thumbInvertedBackground;
70
73
  }
71
- .ui.dimmer:not(.inverted)::-webkit-scrollbar-thumb:window-inactive {
74
+ .ui.dimmer@{notInverted}::-webkit-scrollbar-thumb:window-inactive {
72
75
  background: @thumbInvertedInactiveBackground;
73
76
  }
74
- .ui.dimmer:not(.inverted)::-webkit-scrollbar-thumb:hover {
77
+ .ui.dimmer@{notInverted}::-webkit-scrollbar-thumb:hover {
75
78
  background: @thumbInvertedHoverBackground;
76
79
  }
77
- .ui.dimmer:not(.inverted) {
78
- & when (@supportIE) {
80
+ & when (@supportIE) {
81
+ .ui.dimmer@{notInverted} {
79
82
  /* IE11 */
80
83
  scrollbar-face-color: @thumbInvertedBackgroundHex;
81
84
  scrollbar-shadow-color: @thumbInvertedBackgroundHex;
82
85
  scrollbar-track-color: @trackInvertedBackgroundHex;
83
86
  scrollbar-arrow-color: @trackInvertedBackgroundHex;
84
87
  }
85
-
86
- /* firefox: first color thumb, second track */
87
- scrollbar-color: @thumbInvertedBackground @trackInvertedBackground;
88
+ }
89
+ @supports (-moz-appearance: none) {
90
+ .ui.dimmer@{notInverted} {
91
+ /* firefox: first color thumb, second track */
92
+ scrollbar-color: @thumbInvertedBackground @trackInvertedBackground;
93
+ }
88
94
  }
89
95
  }
90
96