fomantic-ui 2.9.3-beta.45 → 2.9.3-beta.47

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 (186) hide show
  1. package/README.md +5 -2
  2. package/SECURITY.md +2 -1
  3. package/dist/components/accordion.css +1 -1
  4. package/dist/components/accordion.js +1 -1
  5. package/dist/components/accordion.min.css +1 -1
  6. package/dist/components/accordion.min.js +1 -1
  7. package/dist/components/ad.css +1 -1
  8. package/dist/components/ad.min.css +1 -1
  9. package/dist/components/api.js +1 -1
  10. package/dist/components/api.min.js +1 -1
  11. package/dist/components/breadcrumb.css +1 -1
  12. package/dist/components/breadcrumb.min.css +1 -1
  13. package/dist/components/button.css +1 -1
  14. package/dist/components/button.min.css +1 -1
  15. package/dist/components/calendar.css +1 -1
  16. package/dist/components/calendar.js +1 -1
  17. package/dist/components/calendar.min.css +1 -1
  18. package/dist/components/calendar.min.js +1 -1
  19. package/dist/components/card.css +1 -1
  20. package/dist/components/card.min.css +1 -1
  21. package/dist/components/checkbox.css +1 -1
  22. package/dist/components/checkbox.js +1 -1
  23. package/dist/components/checkbox.min.css +1 -1
  24. package/dist/components/checkbox.min.js +1 -1
  25. package/dist/components/comment.css +1 -1
  26. package/dist/components/comment.min.css +1 -1
  27. package/dist/components/container.css +1 -1
  28. package/dist/components/container.min.css +1 -1
  29. package/dist/components/dimmer.css +1 -1
  30. package/dist/components/dimmer.js +1 -1
  31. package/dist/components/dimmer.min.css +1 -1
  32. package/dist/components/dimmer.min.js +1 -1
  33. package/dist/components/divider.css +1 -1
  34. package/dist/components/divider.min.css +1 -1
  35. package/dist/components/dropdown.css +1 -1
  36. package/dist/components/dropdown.js +1 -1
  37. package/dist/components/dropdown.min.css +1 -1
  38. package/dist/components/dropdown.min.js +1 -1
  39. package/dist/components/embed.css +1 -1
  40. package/dist/components/embed.js +1 -1
  41. package/dist/components/embed.min.css +1 -1
  42. package/dist/components/embed.min.js +1 -1
  43. package/dist/components/emoji.css +1 -1
  44. package/dist/components/emoji.min.css +1 -1
  45. package/dist/components/feed.css +1 -1
  46. package/dist/components/feed.min.css +1 -1
  47. package/dist/components/flag.css +1 -1
  48. package/dist/components/flag.min.css +1 -1
  49. package/dist/components/flyout.css +1 -1
  50. package/dist/components/flyout.js +1 -1
  51. package/dist/components/flyout.min.css +1 -1
  52. package/dist/components/flyout.min.js +1 -1
  53. package/dist/components/form.css +1 -1
  54. package/dist/components/form.js +1 -1
  55. package/dist/components/form.min.css +1 -1
  56. package/dist/components/form.min.js +1 -1
  57. package/dist/components/grid.css +1 -1
  58. package/dist/components/grid.min.css +1 -1
  59. package/dist/components/header.css +1 -1
  60. package/dist/components/header.min.css +1 -1
  61. package/dist/components/icon.css +1 -1
  62. package/dist/components/icon.min.css +1 -1
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +1 -1
  66. package/dist/components/input.min.css +1 -1
  67. package/dist/components/item.css +1 -1
  68. package/dist/components/item.min.css +1 -1
  69. package/dist/components/label.css +1 -1
  70. package/dist/components/label.min.css +1 -1
  71. package/dist/components/list.css +1 -1
  72. package/dist/components/list.min.css +1 -1
  73. package/dist/components/loader.css +1 -1
  74. package/dist/components/loader.min.css +1 -1
  75. package/dist/components/menu.css +1 -1
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +1 -1
  78. package/dist/components/message.min.css +1 -1
  79. package/dist/components/modal.css +1 -1
  80. package/dist/components/modal.js +1 -1
  81. package/dist/components/modal.min.css +1 -1
  82. package/dist/components/modal.min.js +1 -1
  83. package/dist/components/nag.css +1 -1
  84. package/dist/components/nag.js +1 -1
  85. package/dist/components/nag.min.css +1 -1
  86. package/dist/components/nag.min.js +1 -1
  87. package/dist/components/placeholder.css +1 -1
  88. package/dist/components/placeholder.min.css +1 -1
  89. package/dist/components/popup.css +1 -1
  90. package/dist/components/popup.js +1 -1
  91. package/dist/components/popup.min.css +1 -1
  92. package/dist/components/popup.min.js +1 -1
  93. package/dist/components/progress.css +1 -1
  94. package/dist/components/progress.js +1 -1
  95. package/dist/components/progress.min.css +1 -1
  96. package/dist/components/progress.min.js +1 -1
  97. package/dist/components/rail.css +1 -1
  98. package/dist/components/rail.min.css +1 -1
  99. package/dist/components/rating.css +1 -1
  100. package/dist/components/rating.js +1 -1
  101. package/dist/components/rating.min.css +1 -1
  102. package/dist/components/rating.min.js +1 -1
  103. package/dist/components/reset.css +1 -1
  104. package/dist/components/reset.min.css +1 -1
  105. package/dist/components/reveal.css +1 -1
  106. package/dist/components/reveal.min.css +1 -1
  107. package/dist/components/search.css +1 -1
  108. package/dist/components/search.js +1 -1
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +1 -1
  111. package/dist/components/segment.css +1 -1
  112. package/dist/components/segment.min.css +1 -1
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +1 -1
  115. package/dist/components/shape.min.css +1 -1
  116. package/dist/components/shape.min.js +1 -1
  117. package/dist/components/sidebar.css +1 -1
  118. package/dist/components/sidebar.js +1 -1
  119. package/dist/components/sidebar.min.css +1 -1
  120. package/dist/components/sidebar.min.js +1 -1
  121. package/dist/components/site.css +1 -1
  122. package/dist/components/site.js +1 -1
  123. package/dist/components/site.min.css +1 -1
  124. package/dist/components/site.min.js +1 -1
  125. package/dist/components/slider.css +1 -1
  126. package/dist/components/slider.js +1 -1
  127. package/dist/components/slider.min.css +1 -1
  128. package/dist/components/slider.min.js +1 -1
  129. package/dist/components/state.js +1 -1
  130. package/dist/components/state.min.js +1 -1
  131. package/dist/components/statistic.css +1 -1
  132. package/dist/components/statistic.min.css +1 -1
  133. package/dist/components/step.css +1 -1
  134. package/dist/components/step.min.css +1 -1
  135. package/dist/components/sticky.css +1 -1
  136. package/dist/components/sticky.js +1 -1
  137. package/dist/components/sticky.min.css +1 -1
  138. package/dist/components/sticky.min.js +1 -1
  139. package/dist/components/tab.css +1 -1
  140. package/dist/components/tab.js +1 -1
  141. package/dist/components/tab.min.css +1 -1
  142. package/dist/components/tab.min.js +1 -1
  143. package/dist/components/table.css +1 -1
  144. package/dist/components/table.min.css +1 -1
  145. package/dist/components/text.css +1 -1
  146. package/dist/components/text.min.css +1 -1
  147. package/dist/components/toast.css +1 -1
  148. package/dist/components/toast.js +1 -1
  149. package/dist/components/toast.min.css +1 -1
  150. package/dist/components/toast.min.js +1 -1
  151. package/dist/components/transition.css +1 -1
  152. package/dist/components/transition.js +1 -1
  153. package/dist/components/transition.min.css +1 -1
  154. package/dist/components/transition.min.js +1 -1
  155. package/dist/components/visibility.js +1 -1
  156. package/dist/components/visibility.min.js +1 -1
  157. package/dist/semantic.css +53 -53
  158. package/dist/semantic.js +26 -26
  159. package/dist/semantic.min.css +1 -1
  160. package/dist/semantic.min.js +1 -1
  161. package/package.json +1 -1
  162. package/types/fomantic-ui-accordion.d.ts +166 -172
  163. package/types/fomantic-ui-api.d.ts +418 -470
  164. package/types/fomantic-ui-calendar.d.ts +425 -479
  165. package/types/fomantic-ui-checkbox.d.ts +148 -194
  166. package/types/fomantic-ui-dimmer.d.ts +188 -265
  167. package/types/fomantic-ui-dropdown.d.ts +447 -666
  168. package/types/fomantic-ui-embed.d.ts +243 -289
  169. package/types/fomantic-ui-flyout.d.ts +259 -292
  170. package/types/fomantic-ui-form.d.ts +478 -607
  171. package/types/fomantic-ui-modal.d.ts +389 -471
  172. package/types/fomantic-ui-nag.d.ts +228 -277
  173. package/types/fomantic-ui-popup.d.ts +438 -534
  174. package/types/fomantic-ui-progress.d.ts +278 -352
  175. package/types/fomantic-ui-rating.d.ts +137 -168
  176. package/types/fomantic-ui-search.d.ts +359 -453
  177. package/types/fomantic-ui-shape.d.ts +152 -194
  178. package/types/fomantic-ui-sidebar.d.ts +315 -391
  179. package/types/fomantic-ui-slider.d.ts +259 -322
  180. package/types/fomantic-ui-sticky.d.ts +198 -244
  181. package/types/fomantic-ui-tab.d.ts +284 -350
  182. package/types/fomantic-ui-tests.ts +4 -2
  183. package/types/fomantic-ui-toast.d.ts +318 -424
  184. package/types/fomantic-ui-transition.d.ts +223 -273
  185. package/types/fomantic-ui-visibility.d.ts +286 -353
  186. package/types/index.d.ts +0 -1
@@ -28,377 +28,327 @@ declare namespace FomanticUI {
28
28
  (behavior: 'get remainingTime'): number;
29
29
 
30
30
  (behavior: 'refresh' | 'destroy'): JQuery;
31
- <K extends keyof ToastSettings>(behavior: 'setting', name: K, value?: undefined): ToastSettings._Impl[K];
32
- <K extends keyof ToastSettings>(behavior: 'setting', name: K, value: ToastSettings._Impl[K]): JQuery;
33
- (behavior: 'setting', value: ToastSettings): JQuery;
34
- (settings?: ToastSettings): JQuery;
31
+ <K extends keyof ToastSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<ToastSettings, keyof ToastSettings>>;
32
+ <K extends keyof ToastSettings>(behavior: 'setting', name: K, value: ToastSettings[K]): JQuery;
33
+ (behavior: 'setting', value: Partial<Pick<ToastSettings, keyof ToastSettings>>): JQuery;
34
+ (settings?: Partial<Pick<ToastSettings, keyof ToastSettings>>): JQuery;
35
35
  }
36
36
 
37
37
  /**
38
38
  * @see {@link https://fomantic-ui.com/modules/toast.html#/settings}
39
39
  */
40
- type ToastSettings = ToastSettings.Param;
41
-
42
- namespace ToastSettings {
43
- type Param = (
44
- | Pick<_Impl, 'position'>
45
- | Pick<_Impl, 'horizontal'>
46
- | Pick<_Impl, 'class'>
47
- | Pick<_Impl, 'classProgress'>
48
- | Pick<_Impl, 'classActions'>
49
- | Pick<_Impl, 'classImage'>
50
- | Pick<_Impl, 'context'>
51
- | Pick<_Impl, 'displayTime'>
52
- | Pick<_Impl, 'minDisplayTime'>
53
- | Pick<_Impl, 'wordsPerMinute'>
54
- | Pick<_Impl, 'showImage'>
55
- | Pick<_Impl, 'showIcon'>
56
- | Pick<_Impl, 'closeIcon'>
57
- | Pick<_Impl, 'closeOnClick'>
58
- | Pick<_Impl, 'cloneModule'>
59
- | Pick<_Impl, 'showProgress'>
60
- | Pick<_Impl, 'progressUp'>
61
- | Pick<_Impl, 'pauseOnHover'>
62
- | Pick<_Impl, 'compact'>
63
- | Pick<_Impl, 'opacity'>
64
- | Pick<_Impl, 'newestOnTop'>
65
- | Pick<_Impl, 'preserveHTML'>
66
- | Pick<_Impl, 'transition'>
67
- | Pick<_Impl, 'onShow'>
68
- | Pick<_Impl, 'onVisible'>
69
- | Pick<_Impl, 'onClick'>
70
- | Pick<_Impl, 'onHide'>
71
- | Pick<_Impl, 'onHidden'>
72
- | Pick<_Impl, 'onRemove'>
73
- | Pick<_Impl, 'onApprove'>
74
- | Pick<_Impl, 'onDeny'>
75
- | Pick<_Impl, 'title'>
76
- | Pick<_Impl, 'message'>
77
- | Pick<_Impl, 'actions'>
78
- | Pick<_Impl, 'namespace'>
79
- | Pick<_Impl, 'selector'>
80
- | Pick<_Impl, 'className'>
81
- | Pick<_Impl, 'icons'>
82
- | Pick<_Impl, 'name'>
83
- | Pick<_Impl, 'silent'>
84
- | Pick<_Impl, 'debug'>
85
- | Pick<_Impl, 'performance'>
86
- | Pick<_Impl, 'verbose'>
87
- | Pick<_Impl, 'error'>
88
- ) &
89
- Partial<Pick<_Impl, keyof _Impl>>;
90
-
91
- interface _Impl {
92
- // region Toast Settings
93
-
94
- /**
95
- * Sets where the toast can be displayed. Can be 'top right', 'top center', 'top left', 'bottom right', 'bottom center' and 'bottom left'.
96
- *
97
- * @default 'top right'
98
- */
99
- position: string;
100
-
101
- /**
102
- * If the toasts should stack horizontal instead of vertical.
103
- *
104
- * @default false
105
- */
106
- horizontal: boolean;
107
-
108
- /**
109
- * Define the class of notification. Can be any existing color definition or 'info', 'success', 'warning' and 'error'.
110
- * If ui message is used in className.toast option (see below), this option can hold any supported class of the message component.
111
- *
112
- * @default 'neutral'
113
- */
114
- class: string;
115
-
116
- /**
117
- * Can hold a string to be added to the progress bar class, for example a separate color
118
- *
119
- * @default false
120
- */
121
- classProgress: false | string;
122
-
123
- /**
124
- * Can hold a string to be added to the actions class to control its appearance.
125
- * Usually a combination of 'basic', 'left', 'top', 'bottom', 'vertical' and 'attached'.
126
- *
127
- * @default false
128
- */
129
- classActions: false | string;
130
-
131
- /**
132
- * Can hold a string to be added to the image class. 'mini', 'tiny', 'small' and 'avatar' are supported out of the box.
133
- *
134
- * @default 'mini'
135
- */
136
- classImage: string;
137
-
138
- /**
139
- * Selector or jquery object specifying the area to attach the toast container to.
140
- *
141
- * @default 'body'
142
- */
143
- context: string | JQuery;
144
-
145
- /**
146
- * Set the time (in ms) of the toast appearance. Set '0' to disable the automatic dismissal.
147
- * Set 'auto' to calculate the time by the given amount of words within the toast.
148
- *
149
- * @default 3000
150
- */
151
- displayTime: number | 'auto';
152
-
153
- /**
154
- * Minimum display time in case displayTime is set to 'auto'.
155
- *
156
- * @default 1000
157
- */
158
- minDisplayTime: number;
159
-
160
- /**
161
- * Base to calculate display time in case displayTime is set to 'auto'.
162
- *
163
- * @default 120
164
- */
165
- wordsPerMinute: number;
166
-
167
- /**
168
- * If an URL to an image is given, that image will be shown to the left of the toast.
169
- *
170
- * @default false
171
- */
172
- showImage: false | string;
173
-
174
- /**
175
- * Define if the toast should display an icon which matches to a given class.
176
- * If a string is given, this will be used as icon classname.
177
- *
178
- * @default true
179
- */
180
- showIcon: boolean | string;
181
-
182
- /**
183
- * This will make the toast closable by the top right corner icon instead of clicking anywhere on the toast when set to 'true'.
184
- * When set to 'left' the closeIcon is shown to the left instead of right.
185
- *
186
- * @default false
187
- */
188
- closeIcon: boolean | 'left';
189
-
190
- /**
191
- * Set to 'false' to avoid closing the toast when it is clicked.
192
- *
193
- * @default true
194
- */
195
- closeOnClick: boolean;
196
-
197
- /**
198
- * If a given DOM-Node should stay reusable by using a clone of it as toast.
199
- * If set to false the original DOM-Node will be detached and removed from the DOM then the toast is closed.
200
- *
201
- * @default true
202
- */
203
- cloneModule: boolean;
204
-
205
- /**
206
- * Displays a progress bar on 'top' or 'bottom' increasing until 'displayTime' is reached.
207
- * 'false' won't display any progress bar. If 'displayTime' option is '0', this option is ignored.
208
- *
209
- * @default false
210
- */
211
- showProgress: boolean | 'top' | 'bottom';
212
-
213
- /**
214
- * 'true' Increases the progress bar from 0% to 100%.
215
- * 'false' Decreases the progress bar from 100% to 0%.
216
- *
217
- * @default false
218
- */
219
- progressUp: boolean;
220
-
221
- /**
222
- * Set to 'false' if the display timer should not pause when the toast is hovered.
223
- *
224
- * @default true
225
- */
226
- pauseOnHover: boolean;
227
-
228
- /**
229
- * 'true' will display the toast in a fixed width, 'false' displays the toast responsively with dynamic width.
230
- *
231
- * @default true
232
- */
233
- compact: boolean;
234
-
235
- /**
236
- * Opacity value of the toast after the show-transition.
237
- *
238
- * @default 1
239
- */
240
- opacity: number;
241
-
242
- /**
243
- * Define if new toasts should be displayed above the others.
244
- *
245
- * @default false
246
- */
247
- newestOnTop: boolean;
248
-
249
- /**
250
- * Whether HTML included in given title, message or actions should be preserved.
251
- * Set to 'false' in case you work with untrusted 3rd party content.
252
- *
253
- * @default true
254
- */
255
- preserveHTML: boolean;
256
-
257
- /**
258
- * Settings to set the transitions and durations during the show or the hide of a toast.
259
- */
260
- transition: Toast.TransitionSettings;
261
-
262
- // endregion
263
-
264
- // region Callbacks
265
-
266
- /**
267
- * Callback before toast is shown. Returning 'false' from this callback will cancel the toast from showing.
268
- */
269
- onShow(this: JQuery): void;
270
-
271
- /**
272
- * Callback before toast is shown. Returning false from this callback will cancel the toast from showing..
273
- */
274
- onVisible(this: JQuery): void;
275
-
276
- /**
277
- * Callback after popup is clicked in
278
- */
279
- onClick(this: JQuery): void;
280
-
281
- /**
282
- * Callback before toast is hidden. Returning 'false' from this callback will cancel the toast from hiding.
283
- */
284
- onHide(this: JQuery): void;
285
-
286
- /**
287
- * Callback after toast is hidden.
288
- */
289
- onHidden(this: JQuery): void;
290
-
291
- /**
292
- * Callback before toast is destroyed.
293
- */
294
- onRemove(this: JQuery): void;
295
-
296
- /**
297
- * Callback when an existing button with class 'positive' or 'ok' or 'approve' is clicked. Return 'false' to avoid closing the toast.
298
- */
299
- onApprove(this: JQuery): void;
300
-
301
- /**
302
- * Callback when an existing button with class 'negative' or 'cancel' or 'deny' is clicked. Return 'false' to avoid closing the toast.
303
- */
304
- onDeny(this: JQuery): void;
305
-
306
- // endregion
307
-
308
- // region Content Settings
309
-
310
- /**
311
- * A title for the toast. Leave empty to not display it.
312
- *
313
- * @default ''
314
- */
315
- title: string;
316
-
317
- /**
318
- * Message to display.
319
- *
320
- * @default ''
321
- */
322
- message: string;
323
-
324
- /**
325
- * An array of objects. Each object defines an action with 'properties' 'text', 'class', 'icon' and 'click'.
326
- */
327
- actions: Toast.ActionsSettings;
328
-
329
- // endregion
330
-
331
- // region DOM Settings
332
-
333
- /**
334
- * Event namespace. Makes sure module teardown does not effect other events attached to an element.
335
- */
336
- namespace: string;
337
-
338
- /**
339
- * DOM Selectors used internally.
340
- */
341
- selector: Toast.SelectorSettings;
342
-
343
- /**
344
- * Class names used to attach style to state.
345
- */
346
- className: Toast.ClassNameSettings;
347
-
348
- /**
349
- * Icon names used internally.
350
- */
351
- icons: Toast.IconSettings;
352
-
353
- // endregion
354
-
355
- // region Debug Settings
356
-
357
- /**
358
- * Name used in log statements
359
- */
360
- name: string;
361
-
362
- /**
363
- * Silences all console output including error messages, regardless of other debug settings.
364
- */
365
- silent: boolean;
366
-
367
- /**
368
- * Debug output to console
369
- */
370
- debug: boolean;
371
-
372
- /**
373
- * Show console.table output with performance metrics
374
- */
375
- performance: boolean;
376
-
377
- /**
378
- * Debug output includes all internal behaviors
379
- */
380
- verbose: boolean;
381
-
382
- error: Toast.ErrorSettings;
383
-
384
- // endregion
385
- }
40
+ interface ToastSettings {
41
+ // region Toast Settings
42
+
43
+ /**
44
+ * Sets where the toast can be displayed. Can be 'top right', 'top center', 'top left', 'bottom right', 'bottom center' and 'bottom left'.
45
+ *
46
+ * @default 'top right'
47
+ */
48
+ position: string;
49
+
50
+ /**
51
+ * If the toasts should stack horizontal instead of vertical.
52
+ *
53
+ * @default false
54
+ */
55
+ horizontal: boolean;
56
+
57
+ /**
58
+ * Define the class of notification. Can be any existing color definition or 'info', 'success', 'warning' and 'error'.
59
+ * If ui message is used in className.toast option (see below), this option can hold any supported class of the message component.
60
+ *
61
+ * @default 'neutral'
62
+ */
63
+ class: string;
64
+
65
+ /**
66
+ * Can hold a string to be added to the progress bar class, for example a separate color
67
+ *
68
+ * @default false
69
+ */
70
+ classProgress: false | string;
71
+
72
+ /**
73
+ * Can hold a string to be added to the actions class to control its appearance.
74
+ * Usually a combination of 'basic', 'left', 'top', 'bottom', 'vertical' and 'attached'.
75
+ *
76
+ * @default false
77
+ */
78
+ classActions: false | string;
79
+
80
+ /**
81
+ * Can hold a string to be added to the image class. 'mini', 'tiny', 'small' and 'avatar' are supported out of the box.
82
+ *
83
+ * @default 'mini'
84
+ */
85
+ classImage: string;
86
+
87
+ /**
88
+ * Selector or jquery object specifying the area to attach the toast container to.
89
+ *
90
+ * @default 'body'
91
+ */
92
+ context: string | JQuery;
93
+
94
+ /**
95
+ * Set the time (in ms) of the toast appearance. Set '0' to disable the automatic dismissal.
96
+ * Set 'auto' to calculate the time by the given amount of words within the toast.
97
+ *
98
+ * @default 3000
99
+ */
100
+ displayTime: number | 'auto';
101
+
102
+ /**
103
+ * Minimum display time in case displayTime is set to 'auto'.
104
+ *
105
+ * @default 1000
106
+ */
107
+ minDisplayTime: number;
108
+
109
+ /**
110
+ * Base to calculate display time in case displayTime is set to 'auto'.
111
+ *
112
+ * @default 120
113
+ */
114
+ wordsPerMinute: number;
115
+
116
+ /**
117
+ * If an URL to an image is given, that image will be shown to the left of the toast.
118
+ *
119
+ * @default false
120
+ */
121
+ showImage: false | string;
122
+
123
+ /**
124
+ * Define if the toast should display an icon which matches to a given class.
125
+ * If a string is given, this will be used as icon classname.
126
+ *
127
+ * @default true
128
+ */
129
+ showIcon: boolean | string;
130
+
131
+ /**
132
+ * This will make the toast closable by the top right corner icon instead of clicking anywhere on the toast when set to 'true'.
133
+ * When set to 'left' the closeIcon is shown to the left instead of right.
134
+ *
135
+ * @default false
136
+ */
137
+ closeIcon: boolean | 'left';
138
+
139
+ /**
140
+ * Set to 'false' to avoid closing the toast when it is clicked.
141
+ *
142
+ * @default true
143
+ */
144
+ closeOnClick: boolean;
145
+
146
+ /**
147
+ * If a given DOM-Node should stay reusable by using a clone of it as toast.
148
+ * If set to false the original DOM-Node will be detached and removed from the DOM then the toast is closed.
149
+ *
150
+ * @default true
151
+ */
152
+ cloneModule: boolean;
153
+
154
+ /**
155
+ * Displays a progress bar on 'top' or 'bottom' increasing until 'displayTime' is reached.
156
+ * 'false' won't display any progress bar. If 'displayTime' option is '0', this option is ignored.
157
+ *
158
+ * @default false
159
+ */
160
+ showProgress: boolean | 'top' | 'bottom';
161
+
162
+ /**
163
+ * 'true' Increases the progress bar from 0% to 100%.
164
+ * 'false' Decreases the progress bar from 100% to 0%.
165
+ *
166
+ * @default false
167
+ */
168
+ progressUp: boolean;
169
+
170
+ /**
171
+ * Set to 'false' if the display timer should not pause when the toast is hovered.
172
+ *
173
+ * @default true
174
+ */
175
+ pauseOnHover: boolean;
176
+
177
+ /**
178
+ * 'true' will display the toast in a fixed width, 'false' displays the toast responsively with dynamic width.
179
+ *
180
+ * @default true
181
+ */
182
+ compact: boolean;
183
+
184
+ /**
185
+ * Opacity value of the toast after the show-transition.
186
+ *
187
+ * @default 1
188
+ */
189
+ opacity: number;
190
+
191
+ /**
192
+ * Define if new toasts should be displayed above the others.
193
+ *
194
+ * @default false
195
+ */
196
+ newestOnTop: boolean;
197
+
198
+ /**
199
+ * Whether HTML included in given title, message or actions should be preserved.
200
+ * Set to 'false' in case you work with untrusted 3rd party content.
201
+ *
202
+ * @default true
203
+ */
204
+ preserveHTML: boolean;
205
+
206
+ /**
207
+ * Settings to set the transitions and durations during the show or the hide of a toast.
208
+ */
209
+ transition: Toast.TransitionSettings;
210
+
211
+ // endregion
212
+
213
+ // region Callbacks
214
+
215
+ /**
216
+ * Callback before toast is shown. Returning 'false' from this callback will cancel the toast from showing.
217
+ */
218
+ onShow(this: JQuery): void;
219
+
220
+ /**
221
+ * Callback before toast is shown. Returning false from this callback will cancel the toast from showing..
222
+ */
223
+ onVisible(this: JQuery): void;
224
+
225
+ /**
226
+ * Callback after popup is clicked in
227
+ */
228
+ onClick(this: JQuery): void;
229
+
230
+ /**
231
+ * Callback before toast is hidden. Returning 'false' from this callback will cancel the toast from hiding.
232
+ */
233
+ onHide(this: JQuery): void;
234
+
235
+ /**
236
+ * Callback after toast is hidden.
237
+ */
238
+ onHidden(this: JQuery): void;
239
+
240
+ /**
241
+ * Callback before toast is destroyed.
242
+ */
243
+ onRemove(this: JQuery): void;
244
+
245
+ /**
246
+ * Callback when an existing button with class 'positive' or 'ok' or 'approve' is clicked. Return 'false' to avoid closing the toast.
247
+ */
248
+ onApprove(this: JQuery): void;
249
+
250
+ /**
251
+ * Callback when an existing button with class 'negative' or 'cancel' or 'deny' is clicked. Return 'false' to avoid closing the toast.
252
+ */
253
+ onDeny(this: JQuery): void;
254
+
255
+ // endregion
256
+
257
+ // region Content Settings
258
+
259
+ /**
260
+ * A title for the toast. Leave empty to not display it.
261
+ *
262
+ * @default ''
263
+ */
264
+ title: string;
265
+
266
+ /**
267
+ * Message to display.
268
+ *
269
+ * @default ''
270
+ */
271
+ message: string;
272
+
273
+ /**
274
+ * An array of objects. Each object defines an action with 'properties' 'text', 'class', 'icon' and 'click'.
275
+ */
276
+ actions: Toast.ActionsSettings;
277
+
278
+ // endregion
279
+
280
+ // region DOM Settings
281
+
282
+ /**
283
+ * Event namespace. Makes sure module teardown does not effect other events attached to an element.
284
+ * @default 'toast'
285
+ */
286
+ namespace: string;
287
+
288
+ /**
289
+ * DOM Selectors used internally.
290
+ */
291
+ selector: Toast.SelectorSettings;
292
+
293
+ /**
294
+ * Class names used to attach style to state.
295
+ */
296
+ className: Toast.ClassNameSettings;
297
+
298
+ /**
299
+ * Icon names used internally.
300
+ */
301
+ icons: Toast.IconSettings;
302
+
303
+ // endregion
304
+
305
+ // region Debug Settings
306
+
307
+ /**
308
+ * Name used in log statements
309
+ * @default 'Toast'
310
+ */
311
+ name: string;
312
+
313
+ /**
314
+ * Silences all console output including error messages, regardless of other debug settings.
315
+ * @default false
316
+ */
317
+ silent: boolean;
318
+
319
+ /**
320
+ * Debug output to console
321
+ * @default false
322
+ */
323
+ debug: boolean;
324
+
325
+ /**
326
+ * Show console.table output with performance metrics
327
+ * @default true
328
+ */
329
+ performance: boolean;
330
+
331
+ /**
332
+ * Debug output includes all internal behaviors
333
+ * @default false
334
+ */
335
+ verbose: boolean;
336
+
337
+ error: Toast.ErrorSettings;
338
+
339
+ // endregion
386
340
  }
387
341
 
388
342
  namespace Toast {
389
- type TransitionSettings = TransitionSettings.Param;
390
-
391
- namespace TransitionSettings {
392
- type Param = (
393
- | Pick<_Impl, 'showMethod'>
394
- | Pick<_Impl, 'showDuration'>
395
- | Pick<_Impl, 'hideMethod'>
396
- | Pick<_Impl, 'hideDuration'>
397
- | Pick<_Impl, 'closeEasing'>
398
- ) &
399
- Partial<Pick<_Impl, keyof _Impl>>;
400
-
401
- interface _Impl {
343
+ type TransitionSettings = Partial<Pick<Settings.Transition, keyof Settings.Transition>>;
344
+ type ActionsSettings = Partial<Pick<Settings.Actions, keyof Settings.Actions>>;
345
+ type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
346
+ type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
347
+ type IconSettings = Partial<Pick<Settings.Icons, keyof Settings.Icons>>;
348
+ type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
349
+
350
+ namespace Settings {
351
+ interface Transition {
402
352
  /**
403
353
  * @default 'scale'
404
354
  */
@@ -424,15 +374,8 @@ declare namespace FomanticUI {
424
374
  */
425
375
  closeEasing: string;
426
376
  }
427
- }
428
-
429
- type ActionsSettings = ActionsSettings.Param;
430
377
 
431
- namespace ActionsSettings {
432
- type Param = (Pick<_Impl, 'text'> | Pick<_Impl, 'class'> | Pick<_Impl, 'icon'> | Pick<_Impl, 'click'>) &
433
- Partial<Pick<_Impl, keyof _Impl>>;
434
-
435
- interface _Impl {
378
+ interface Actions {
436
379
  /**
437
380
  * @default 'Wait'
438
381
  */
@@ -453,22 +396,8 @@ declare namespace FomanticUI {
453
396
  */
454
397
  click: () => void;
455
398
  }
456
- }
457
399
 
458
- type SelectorSettings = SelectorSettings.Param;
459
-
460
- namespace SelectorSettings {
461
- type Param = (
462
- | Pick<_Impl, 'container'>
463
- | Pick<_Impl, 'box'>
464
- | Pick<_Impl, 'toast'>
465
- | Pick<_Impl, 'input'>
466
- | Pick<_Impl, 'approve'>
467
- | Pick<_Impl, 'deny'>
468
- ) &
469
- Partial<Pick<_Impl, keyof _Impl>>;
470
-
471
- interface _Impl {
400
+ interface Selectors {
472
401
  /**
473
402
  * @default '.ui.toast-container'
474
403
  */
@@ -499,24 +428,8 @@ declare namespace FomanticUI {
499
428
  */
500
429
  deny: string;
501
430
  }
502
- }
503
431
 
504
- type ClassNameSettings = ClassNameSettings.Param;
505
-
506
- namespace ClassNameSettings {
507
- type Param = (
508
- | Pick<_Impl, 'container'>
509
- | Pick<_Impl, 'box'>
510
- | Pick<_Impl, 'progress'>
511
- | Pick<_Impl, 'toast'>
512
- | Pick<_Impl, 'icon'>
513
- | Pick<_Impl, 'visible'>
514
- | Pick<_Impl, 'content'>
515
- | Pick<_Impl, 'title'>
516
- ) &
517
- Partial<Pick<_Impl, keyof _Impl>>;
518
-
519
- interface _Impl {
432
+ interface ClassNames {
520
433
  /**
521
434
  * @default 'toast-container'
522
435
  */
@@ -557,20 +470,8 @@ declare namespace FomanticUI {
557
470
  */
558
471
  title: string;
559
472
  }
560
- }
561
-
562
- type IconSettings = IconSettings.Param;
563
473
 
564
- namespace IconSettings {
565
- type Param = (
566
- | Pick<_Impl, 'info'>
567
- | Pick<_Impl, 'success'>
568
- | Pick<_Impl, 'warning'>
569
- | Pick<_Impl, 'error'>
570
- ) &
571
- Partial<Pick<_Impl, keyof _Impl>>;
572
-
573
- interface _Impl {
474
+ interface Icons {
574
475
  /**
575
476
  * @default 'info'
576
477
  */
@@ -591,15 +492,8 @@ declare namespace FomanticUI {
591
492
  */
592
493
  error: string;
593
494
  }
594
- }
595
-
596
- type ErrorSettings = ErrorSettings.Param;
597
-
598
- namespace ErrorSettings {
599
- type Param = (Pick<_Impl, 'method'> | Pick<_Impl, 'noElement'> | Pick<_Impl, 'verticalCard'>) &
600
- Partial<Pick<_Impl, keyof _Impl>>;
601
495
 
602
- interface _Impl {
496
+ interface Errors {
603
497
  /**
604
498
  * @default 'The method you called is not defined.'
605
499
  */