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
@@ -37,7 +37,7 @@ declare namespace FomanticUI {
37
37
  * Pass false to updateInput to disable updating the input.
38
38
  * Pass false to fireChange to disable the onBeforeChange and onChange callbacks for this change
39
39
  */
40
- (behavior: 'set date', date: string, updateInput: boolean, fireChange: boolean): JQuery;
40
+ (behavior: 'set date', date: Date | string | null, updateInput?: boolean, fireChange?: boolean): JQuery;
41
41
 
42
42
  /**
43
43
  * Get the current selection mode (year, month, day, hour, minute)
@@ -82,12 +82,12 @@ declare namespace FomanticUI {
82
82
  /**
83
83
  * Set the minimal selectable date
84
84
  */
85
- (behavior: 'set minDate', date: Date | string): JQuery;
85
+ (behavior: 'set minDate', date: Date | string | null): JQuery;
86
86
 
87
87
  /**
88
88
  * Set the maximal selectable date
89
89
  */
90
- (behavior: 'set maxDate', date: Date | string): JQuery;
90
+ (behavior: 'set maxDate', date: Date | string | null): JQuery;
91
91
 
92
92
  (behavior: 'destroy'): JQuery;
93
93
 
@@ -214,7 +214,7 @@ declare namespace FomanticUI {
214
214
  *
215
215
  * @default null
216
216
  */
217
- initialDate: null | Date;
217
+ initialDate: Date | string | null;
218
218
 
219
219
  /**
220
220
  * Display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day').
@@ -319,12 +319,14 @@ declare namespace FomanticUI {
319
319
  *
320
320
  * @default false
321
321
  */
322
- selectAdjacentDays: 5 | 10 | 15 | 20 | 30;
322
+ selectAdjacentDays: boolean;
323
323
 
324
324
  popupOptions: Calendar.PopupSettings;
325
325
 
326
326
  text: Calendar.TextSettings;
327
327
 
328
+ formatter: Calendar.FormatterSettings;
329
+
328
330
  // endregion
329
331
 
330
332
  // region Callbacks
@@ -333,12 +335,12 @@ declare namespace FomanticUI {
333
335
  * Is called before a calendar date changes. 'return false;' will cancel the change.
334
336
  * @since 2.8.0
335
337
  */
336
- onBeforeChange(this: JQuery): void;
338
+ onBeforeChange(this: JQuery, date?: Date, text?: string, mode?: string): void;
337
339
 
338
340
  /**
339
341
  * Is called after a calendar date has changed.
340
342
  */
341
- onChange(this: JQuery): void;
343
+ onChange(this: JQuery, date?: Date): void;
342
344
 
343
345
  /**
344
346
  * Is called before a calendar is shown. 'return false;' will prevent the calendar to be shown.
@@ -364,7 +366,7 @@ declare namespace FomanticUI {
364
366
  * Is called when a cell of the calendar is selected providing its value and current mode.
365
367
  * 'return false;' will prevent the selection.
366
368
  */
367
- onSelect(this: JQuery, date: Date, mode: string): void;
369
+ onSelect(this: JQuery, date?: Date, mode?: string): void;
368
370
 
369
371
  // endregion
370
372
 
@@ -436,6 +438,7 @@ declare namespace FomanticUI {
436
438
  namespace Calendar {
437
439
  type PopupSettings = Partial<Pick<Settings.Popup, keyof Settings.Popup>>;
438
440
  type TextSettings = Partial<Pick<Settings.Texts, keyof Settings.Texts>>;
441
+ type FormatterSettings = Partial<Pick<Settings.Formatters, keyof Settings.Formatters>>;
439
442
  type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
440
443
  type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
441
444
  type RegExpSettings = Partial<Pick<Settings.RegExps, keyof Settings.RegExps>>;
@@ -471,6 +474,16 @@ declare namespace FomanticUI {
471
474
  */
472
475
  days: string[];
473
476
 
477
+ /**
478
+ * @default ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
479
+ */
480
+ dayNamesShort: string[];
481
+
482
+ /**
483
+ * @default ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
484
+ */
485
+ dayNames: string[];
486
+
474
487
  /**
475
488
  * @default ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
476
489
  */
@@ -507,6 +520,78 @@ declare namespace FomanticUI {
507
520
  weekNo: string;
508
521
  }
509
522
 
523
+ interface Formatters {
524
+ /**
525
+ *
526
+ */
527
+ yearHeader(date: Date, settings?: CalendarSettings): string;
528
+
529
+ /**
530
+ * @default 'YYYY'
531
+ */
532
+ monthHeader: string;
533
+
534
+ /**
535
+ * @default 'MMMM YYYY'
536
+ */
537
+ dayHeader: string;
538
+
539
+ /**
540
+ * @default 'MMMM D, YYYY'
541
+ */
542
+ hourHeader: string;
543
+
544
+ /**
545
+ * @default 'MMMM D, YYYY'
546
+ */
547
+ minuteHeader: string;
548
+
549
+ /**
550
+ * @default 'MMMM D, YYYY'
551
+ */
552
+ dayColumnHeader(day: number, settings: CalendarSettings): string;
553
+
554
+ /**
555
+ * @default 'MMMM D, YYYY h:mm A'
556
+ */
557
+ datetime: string;
558
+
559
+ /**
560
+ * @default 'MMMM D, YYYY'
561
+ */
562
+ date: string;
563
+
564
+ /**
565
+ * @default 'h:mm A'
566
+ */
567
+ time: string;
568
+
569
+ /**
570
+ * @default 'h:mm A'
571
+ */
572
+ cellTime: string;
573
+
574
+ /**
575
+ * @default 'MMMM YYYY'
576
+ */
577
+ month: string;
578
+
579
+ /**
580
+ * @default 'YYYY'
581
+ */
582
+ year: string;
583
+
584
+ /**
585
+ *
586
+ */
587
+ today(settings: CalendarSettings): string;
588
+
589
+ /**
590
+ *
591
+ */
592
+ cell(cell: string, date: Date, cellOptions: any): any
593
+ }
594
+
510
595
  interface Selectors {
511
596
  /**
512
597
  * @default '.ui.popup'
@@ -32,6 +32,11 @@ declare namespace FomanticUI {
32
32
  */
33
33
  (behavior: 'enable'): JQuery;
34
34
 
35
+ /**
36
+ * Disable interaction with a checkbox.
37
+ */
38
+ (behavior: 'disable'): JQuery;
39
+
35
40
  /**
36
41
  * Set a checkbox state to checked without callbacks.
37
42
  */
@@ -82,6 +87,11 @@ declare namespace FomanticUI {
82
87
  */
83
88
  (behavior: 'is unchecked'): boolean;
84
89
 
90
+ /**
91
+ * Returns whether element is not determinate.
92
+ */
93
+ (behavior: 'is indeterminate'): boolean;
94
+
85
95
  /**
86
96
  * Returns whether element is able to be changed.
87
97
  */
@@ -175,22 +185,22 @@ declare namespace FomanticUI {
175
185
  /**
176
186
  * Callback before a checkbox is checked. Can cancel change by returning 'false'.
177
187
  */
178
- beforeChecked(this: JQuery): void | false;
188
+ beforeChecked(this: JQuery): void | Promise<void> | boolean;
179
189
 
180
190
  /**
181
191
  * Callback before a checkbox is set to indeterminate. Can cancel change by returning 'false'.
182
192
  */
183
- beforeIndeterminate(this: JQuery): void | false;
193
+ beforeIndeterminate(this: JQuery): void | Promise<void> | false;
184
194
 
185
195
  /**
186
196
  * Callback before a checkbox is set to determinate. Can cancel change by returning 'false'.
187
197
  */
188
- beforeDeterminate(this: JQuery): void | false;
198
+ beforeDeterminate(this: JQuery): void | Promise<void> | false;
189
199
 
190
200
  /**
191
201
  * Callback before a checkbox is unchecked. Can cancel change by returning 'false'.
192
202
  */
193
- beforeUnchecked(this: JQuery): void | false;
203
+ beforeUnchecked(this: JQuery): void | Promise<void> | false;
194
204
 
195
205
  /**
196
206
  * Callback after a checkbox is enabled.
@@ -113,7 +113,7 @@ declare namespace FomanticUI {
113
113
  (behavior: 'set disabled'): JQuery;
114
114
 
115
115
  (behavior: 'destroy'): JQuery;
116
- <K extends keyof DimmerSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<DimmerSettings, keyof DimmerSettings>>;
116
+ <K extends keyof DimmerSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<DimmerSettings, keyof DimmerSettings>>;
117
117
  <K extends keyof DimmerSettings>(behavior: 'setting', name: K, value: DimmerSettings[K]): JQuery;
118
118
  (behavior: 'setting', value: Partial<Pick<DimmerSettings, keyof DimmerSettings>>): JQuery;
119
119
  (settings?: Partial<Pick<DimmerSettings, keyof DimmerSettings>>): JQuery;
@@ -6,7 +6,7 @@ declare namespace FomanticUI {
6
6
  * Recreates dropdown menu from passed values.
7
7
  * values should be an object with the following structure: { values: [ {value, text, name} ] }.
8
8
  */
9
- (behavior: 'setup menu', values: object): void;
9
+ (behavior: 'setup menu', values: object): JQuery;
10
10
 
11
11
  /**
12
12
  * Changes dropdown to use new values.
@@ -17,7 +17,7 @@ declare namespace FomanticUI {
17
17
  /**
18
18
  * Refreshes all cached selectors and data
19
19
  */
20
- (behavior: 'refresh'): void;
20
+ (behavior: 'refresh'): JQuery;
21
21
 
22
22
  /**
23
23
  * Toggles current visibility of dropdown
@@ -29,20 +29,20 @@ declare namespace FomanticUI {
29
29
  * If a function is provided to callback, it's called after the dropdown-menu is shown.
30
30
  * Set preventFocus to true if you don't want the dropdown field to focus after the menu is shown
31
31
  */
32
- (behavior: 'show', callback: Function, preventFocus: boolean): void;
32
+ (behavior: 'show', callback?: Function, preventFocus?: boolean): void;
33
33
 
34
34
  /**
35
35
  * Hides dropdown.
36
36
  * If a function is provided to callback, it's called after the dropdown-menu is hidden.
37
37
  * Set preventBlur to true if you don't want the dropdown field to blur after the menu is hidden
38
38
  */
39
- (behavior: 'hide', callback:Function, preventBlur: boolean): void;
39
+ (behavior: 'hide', callback?: Function, preventBlur?: boolean): void;
40
40
 
41
41
  /**
42
42
  * Clears dropdown of selection.
43
43
  * Set preventChangeTrigger to true to omit the change event (default: false).
44
44
  */
45
- (behavior: 'clear', preventChangeTrigger: boolean): void;
45
+ (behavior: 'clear', preventChangeTrigger?: boolean): JQuery;
46
46
 
47
47
  /**
48
48
  * Hides all other dropdowns that is not current dropdown
@@ -53,7 +53,7 @@ declare namespace FomanticUI {
53
53
  * Restores dropdown text and value to its value on page load.
54
54
  * Set preventChangeTrigger to true to omit the change event (default: false).
55
55
  */
56
- (behavior: 'restore defaults', preventChangeTrigger: boolean): void;
56
+ (behavior: 'restore defaults', preventChangeTrigger?: boolean): void;
57
57
 
58
58
  /**
59
59
  * Restores dropdown text to its value on page load
@@ -79,33 +79,28 @@ declare namespace FomanticUI {
79
79
  * Sets value as selected.
80
80
  * Set preventChangeTrigger to true to omit the change event (default: false).
81
81
  */
82
- (behavior: 'set selected', value: string, preventChangeTrigger: boolean): void;
82
+ (behavior: 'set selected', value: string | string[], preventChangeTrigger?: boolean, keepSearchTerm?: boolean): JQuery;
83
83
 
84
84
  /**
85
85
  * Remove value from selected
86
86
  */
87
87
  (behavior: 'remove selected', value: string): void;
88
88
 
89
- /**
90
- * Adds a group of values as selected
91
- */
92
- (behavior: 'set selected', values: string[]): void;
93
-
94
89
  /**
95
90
  * Sets selected values to exactly specified values, removing current selection
96
91
  */
97
- (behavior: 'set exactly', values: string[]): void;
92
+ (behavior: 'set exactly', values: string[]): JQuery;
98
93
 
99
94
  /**
100
95
  * Sets dropdown text to a value
101
96
  */
102
- (behavior: 'text', text: string): void;
97
+ (behavior: 'set text', text: string): JQuery;
103
98
 
104
99
  /**
105
100
  * Sets dropdown input to value (does not update display state).
106
101
  * Set preventChangeTrigger to true to omit the change event (default: false).
107
102
  */
108
- (behavior: 'set value', value: string, preventChangeTrigger: boolean): void;
103
+ (behavior: 'set value', value: string, preventChangeTrigger?: boolean): JQuery;
109
104
 
110
105
  /**
111
106
  * Returns current dropdown text
@@ -215,7 +210,7 @@ declare namespace FomanticUI {
215
210
  (behavior: 'get placeholder text'): string;
216
211
 
217
212
  (behavior: 'destroy'): JQuery;
218
- <K extends keyof DropdownSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<DropdownSettings, keyof DropdownSettings>>;
213
+ <K extends keyof DropdownSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<DropdownSettings, keyof DropdownSettings>>;
219
214
  <K extends keyof DropdownSettings>(behavior: 'setting', name: K, value: DropdownSettings[K]): JQuery;
220
215
  (behavior: 'setting', value: Partial<Pick<DropdownSettings, keyof DropdownSettings>>): JQuery;
221
216
  (settings?: Partial<Pick<DropdownSettings, keyof DropdownSettings>>): JQuery;
@@ -265,7 +260,7 @@ declare namespace FomanticUI {
265
260
  * @see {@link https://fomantic-ui.com/behaviors/api.html#/settings}
266
261
  * @default false
267
262
  */
268
- apiSettings: false | APISettings | JQueryAjaxSettings;
263
+ apiSettings: false | Partial<Pick<APISettings, keyof APISettings>> | Partial<Pick<JQueryAjaxSettings, keyof JQueryAjaxSettings>>;
269
264
 
270
265
  /**
271
266
  * Whether dropdown should select new option when using keyboard shortcuts.
@@ -350,7 +345,7 @@ declare namespace FomanticUI {
350
345
  *
351
346
  * @default 'auto'
352
347
  */
353
- placeholder: 'auto' | String | false;
348
+ placeholder: 'auto' | string | false;
354
349
 
355
350
  /**
356
351
  * Whether HTML included in dropdown values should be preserved.
@@ -390,6 +385,12 @@ declare namespace FomanticUI {
390
385
  */
391
386
  ignoreSearchCase: boolean;
392
387
 
388
+ /**
389
+ * Whether search result should highlight matching strings
390
+ * @default false
391
+ */
392
+ highlightMatches: boolean;
393
+
393
394
  /**
394
395
  * If disabled user additions will appear in the dropdown's menu using a specially formatted selection item formatted by 'templates.addition'.
395
396
  * @default true
@@ -506,7 +507,7 @@ declare namespace FomanticUI {
506
507
  * Is called after a dropdown value changes.
507
508
  * Receives the name and value of selection and the active menu element.
508
509
  */
509
- onChange(value: string, text: string, $choice: JQuery): void;
510
+ onChange(value?: string, text?: string, $choice?: JQuery): void;
510
511
 
511
512
  /**
512
513
  * Is called after a dropdown selection is added using a multiple select dropdown, only receives the added value.
@@ -582,22 +583,22 @@ declare namespace FomanticUI {
582
583
  message: Dropdown.MessageSettings;
583
584
 
584
585
  /**
585
- *
586
+ *
586
587
  */
587
588
  regExp: Dropdown.RegExpSettings;
588
589
 
589
590
  /**
590
- *
591
+ *
591
592
  */
592
593
  metadata: Dropdown.MetadataSettings;
593
594
 
594
595
  /**
595
- *
596
+ *
596
597
  */
597
598
  fields: Dropdown.FieldsSettings;
598
599
 
599
600
  /**
600
- *
601
+ *
601
602
  */
602
603
  keys: Dropdown.KeysSettings;
603
604
 
@@ -743,7 +744,7 @@ declare namespace FomanticUI {
743
744
  */
744
745
  clearIcon: string;
745
746
  }
746
-
747
+
747
748
  interface ClassNames {
748
749
  /**
749
750
  * @default 'active'
@@ -920,7 +921,7 @@ declare namespace FomanticUI {
920
921
  */
921
922
  actionable: string;
922
923
  }
923
-
924
+
924
925
  interface Messages {
925
926
  /**
926
927
  * @default 'Add <b>{term}</b>'
@@ -952,9 +953,9 @@ declare namespace FomanticUI {
952
953
  /**
953
954
  * @default '/[-[\]{}()*+?.,\\^$|#\s]/g'
954
955
  */
955
- escape: string;
956
+ escape: string;
956
957
  }
957
-
958
+
958
959
  interface Metadatas {
959
960
  /**
960
961
  * @default 'defaultText'
@@ -964,24 +965,24 @@ declare namespace FomanticUI {
964
965
  /**
965
966
  * @default 'defaultValue'
966
967
  */
967
- defaultValue: string;
968
+ defaultValue: string;
968
969
 
969
970
  /**
970
971
  * @default 'placeholderText'
971
972
  */
972
- placeholderText: string;
973
+ placeholderText: string;
973
974
 
974
975
  /**
975
976
  * @default 'text'
976
977
  */
977
- text: string;
978
+ text: string;
978
979
 
979
980
  /**
980
981
  * @default 'value'
981
982
  */
982
- value: string;
983
+ value: string;
983
984
  }
984
-
985
+
985
986
  interface Fields {
986
987
  /**
987
988
  * Grouping for api results
@@ -993,13 +994,13 @@ declare namespace FomanticUI {
993
994
  * Grouping for all dropdown values
994
995
  * @default 'values'
995
996
  */
996
- values: string;
997
+ values: string;
997
998
 
998
999
  /**
999
1000
  * Whether value should be disabled
1000
1001
  * @default 'disabled'
1001
1002
  */
1002
- disabled: string;
1003
+ disabled: string;
1003
1004
 
1004
1005
  /**
1005
1006
  * Displayed dropdown text
@@ -1031,6 +1032,12 @@ declare namespace FomanticUI {
1031
1032
  */
1032
1033
  text: string;
1033
1034
 
1035
+ /**
1036
+ * custom data atttributes
1037
+ * @default 'data'
1038
+ */
1039
+ data: string;
1040
+
1034
1041
  /**
1035
1042
  * Type of dropdown element
1036
1043
  * @default 'type'
@@ -1049,6 +1056,12 @@ declare namespace FomanticUI {
1049
1056
  */
1050
1057
  imageClass: string;
1051
1058
 
1059
+ /**
1060
+ * Optional alt text for image
1061
+ * @default 'alt'
1062
+ */
1063
+ alt: string;
1064
+
1052
1065
  /**
1053
1066
  * Optional icon name
1054
1067
  * @default 'icon'
@@ -1079,7 +1092,7 @@ declare namespace FomanticUI {
1079
1092
  */
1080
1093
  actionable: string;
1081
1094
  }
1082
-
1095
+
1083
1096
  interface Keys {
1084
1097
  /**
1085
1098
  * @default 8
@@ -57,7 +57,7 @@ declare namespace FomanticUI {
57
57
  */
58
58
  (behavior: 'destroy'): JQuery;
59
59
 
60
- <K extends keyof EmbedSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<EmbedSettings, keyof EmbedSettings>>;
60
+ <K extends keyof EmbedSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<EmbedSettings, keyof EmbedSettings>>;
61
61
  <K extends keyof EmbedSettings>(behavior: 'setting', name: K, value: EmbedSettings[K]): JQuery;
62
62
  (behavior: 'setting', value: Partial<Pick<EmbedSettings, keyof EmbedSettings>>): JQuery;
63
63
  (settings?: Partial<Pick<EmbedSettings, keyof EmbedSettings>>): JQuery;
@@ -93,6 +93,18 @@ declare namespace FomanticUI {
93
93
  */
94
94
  id: false | string;
95
95
 
96
+ /**
97
+ * Specifies a path for a placeholder image.
98
+ * @default false
99
+ */
100
+ placeholder: false | string;
101
+
102
+ /**
103
+ * Specifies an alt text for a given placeholder image.
104
+ * @default false
105
+ */
106
+ alt: false | string;
107
+
96
108
  /**
97
109
  * Specify an object containing key/value pairs to add to the iframes GET parameters.
98
110
  * @default false
@@ -270,6 +282,11 @@ declare namespace FomanticUI {
270
282
  */
271
283
  placeholder: string;
272
284
 
285
+ /**
286
+ * @default 'alt'
287
+ */
288
+ alt: string;
289
+
273
290
  /**
274
291
  * @default 'source'
275
292
  */
@@ -307,7 +324,7 @@ declare namespace FomanticUI {
307
324
  /**
308
325
  * @default function
309
326
  */
310
- placeholder(image: string, icon: string): string;
327
+ placeholder(image: string, icon: string, alt: string | false | undefined): string;
311
328
  }
312
329
 
313
330
  interface Errors {
@@ -48,8 +48,13 @@ declare namespace FomanticUI {
48
48
  */
49
49
  (behavior: 'get settings'): FlyoutSettings;
50
50
 
51
+ /**
52
+ * Templates handling
53
+ */
54
+ (behavior: keyof Flyout.TemplatesSettings, ...args: any): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
55
+
51
56
  (behavior: 'destroy'): JQuery;
52
- <K extends keyof FlyoutSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
57
+ <K extends keyof FlyoutSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
53
58
  <K extends keyof FlyoutSettings>(behavior: 'setting', name: K, value: FlyoutSettings[K]): JQuery;
54
59
  (behavior: 'setting', value: Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>): JQuery;
55
60
  (settings?: Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>): JQuery;
@@ -145,43 +150,43 @@ declare namespace FomanticUI {
145
150
  * Content of the flyout header.
146
151
  * @default ''
147
152
  */
148
- title: boolean;
153
+ title: string;
149
154
 
150
155
  /**
151
156
  * Content of the flyout content.
152
157
  * @default ''
153
158
  */
154
- content: boolean;
159
+ content: string;
155
160
 
156
161
  /**
157
162
  * Can hold a string to be added to the flyout class to control its appearance.
158
163
  * @default ''
159
164
  */
160
- class: boolean;
165
+ class: string;
161
166
 
162
167
  /**
163
168
  * Can hold a string to be added to the title class to control its appearance.
164
169
  * @default ''
165
170
  */
166
- classTitle: boolean;
171
+ classTitle: string;
167
172
 
168
173
  /**
169
174
  * Can hold a string to be added to the content class to control its appearance.
170
175
  * @default ''
171
176
  */
172
- classContent: boolean;
177
+ classContent: string;
173
178
 
174
179
  /**
175
180
  * Can hold a string to be added to the actions class to control its appearance.
176
181
  * @default ''
177
182
  */
178
- classActions: boolean;
183
+ classActions: string;
179
184
 
180
185
  /**
181
186
  * Can hold a string to be added to the actions class to control its appearance.
182
187
  * @default false
183
188
  */
184
- closeIcon: boolean;
189
+ closeIcon: boolean | string;
185
190
 
186
191
  /**
187
192
  * An array of objects. Each object defines an action with properties `text`, `class`, `icon` and `click`.
@@ -261,6 +266,8 @@ declare namespace FomanticUI {
261
266
 
262
267
  // region Config Template Settings
263
268
 
269
+ templates: Flyout.TemplatesSettings;
270
+
264
271
  // endregion
265
272
 
266
273
  // region Debug Settings
@@ -311,6 +318,7 @@ declare namespace FomanticUI {
311
318
  type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
312
319
  type RegExpSettings = Partial<Pick<Settings.RegExps, keyof Settings.RegExps>>;
313
320
  type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
321
+ type TemplatesSettings = Partial<Pick<Settings.Templates, keyof Settings.Templates>> & {[key: string]: (...args: any) => Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>};
314
322
 
315
323
  namespace Settings {
316
324
  interface Selectors {
@@ -364,7 +372,7 @@ declare namespace FomanticUI {
364
372
  */
365
373
  deny: string;
366
374
  }
367
-
375
+
368
376
  interface ClassNames {
369
377
  /**
370
378
  * @default 'ui flyout'
@@ -481,7 +489,7 @@ declare namespace FomanticUI {
481
489
  */
482
490
  prompt: string;
483
491
  }
484
-
492
+
485
493
  interface RegExps {
486
494
  /**
487
495
  * @default /(iPad|iPhone|iPod)/g
@@ -520,6 +528,12 @@ declare namespace FomanticUI {
520
528
  */
521
529
  notFound: string;
522
530
  }
531
+
532
+ interface Templates {
533
+ alert(): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
534
+ confirm(): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
535
+ prompt(): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
536
+ }
523
537
  }
524
538
  }
525
539
  }