fomantic-ui 2.9.4-beta.1 → 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.
- package/.all-contributorsrc +29 -1
- package/.eslintrc.js +17 -0
- package/.github/FUNDING.yml +1 -1
- package/.github/workflows/ci.yml +8 -8
- package/.github/workflows/depsreview.yml +14 -0
- package/.github/workflows/nightly.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/CONTRIBUTORS.md +5 -0
- package/README.md +2 -12
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +4 -2
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +7 -3
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +21 -3
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +47 -12
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +3 -3
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +10 -4
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +3 -3
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +7 -3
- package/dist/components/dimmer.js +4 -2
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +46 -40
- package/dist/components/dropdown.js +110 -35
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +3 -3
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +17 -7
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +3 -3
- package/dist/components/emoji.css +4309 -3713
- package/dist/components/emoji.min.css +2 -2
- package/dist/components/feed.css +12 -1
- package/dist/components/feed.min.css +2 -2
- package/dist/components/flag.css +3 -1
- package/dist/components/flag.min.css +2 -2
- package/dist/components/flyout.css +3 -3
- package/dist/components/flyout.js +4 -2
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +28 -7
- package/dist/components/form.js +74 -29
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +3 -3
- package/dist/components/grid.css +5 -5
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +4 -1
- package/dist/components/header.min.css +2 -2
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +30 -10
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +7 -2
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -2
- package/dist/components/menu.min.css +2 -2
- package/dist/components/message.css +2 -1
- package/dist/components/message.min.css +2 -2
- package/dist/components/modal.css +3 -3
- package/dist/components/modal.js +7 -3
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +11 -5
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +3 -3
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -2
- package/dist/components/popup.js +10 -4
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +15 -6
- package/dist/components/progress.js +4 -2
- package/dist/components/progress.min.css +2 -2
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +4 -2
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +34 -23
- package/dist/components/search.js +78 -14
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +3 -3
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +7 -5
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +3 -3
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +4 -2
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +14 -6
- package/dist/components/site.js +4 -2
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +152 -2
- package/dist/components/slider.js +142 -44
- package/dist/components/slider.min.css +2 -2
- package/dist/components/slider.min.js +3 -3
- package/dist/components/state.js +4 -2
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +992 -86
- package/dist/components/step.min.css +2 -2
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +4 -2
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +4 -2
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +32 -21
- package/dist/components/table.min.css +2 -2
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +7 -3
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +3 -3
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +7 -3
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +4 -2
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +6226 -3986
- package/dist/semantic.js +580 -195
- package/dist/semantic.min.css +3 -3
- package/dist/semantic.min.js +3 -3
- package/dist/themes/basic/assets/fonts/LICENSE.txt +91 -0
- package/dist/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
- package/dist/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
- package/dist/themes/github/assets/fonts/LICENSE.txt +94 -0
- package/dist/themes/material/assets/fonts/LICENSE.txt +202 -0
- package/package.json +14 -14
- package/semantic.json.example +1 -1
- package/src/definitions/behaviors/api.js +6 -2
- package/src/definitions/behaviors/form.js +73 -28
- package/src/definitions/behaviors/state.js +3 -1
- package/src/definitions/behaviors/visibility.js +3 -1
- package/src/definitions/collections/form.less +56 -27
- package/src/definitions/collections/grid.less +85 -70
- package/src/definitions/collections/menu.less +38 -27
- package/src/definitions/collections/message.less +1 -0
- package/src/definitions/collections/table.less +183 -157
- package/src/definitions/elements/button.less +61 -25
- package/src/definitions/elements/container.less +6 -4
- package/src/definitions/elements/divider.less +4 -1
- package/src/definitions/elements/emoji.less +3 -1
- package/src/definitions/elements/header.less +12 -4
- package/src/definitions/elements/icon.less +35 -28
- package/src/definitions/elements/input.less +35 -19
- package/src/definitions/elements/label.less +19 -8
- package/src/definitions/elements/list.less +28 -21
- package/src/definitions/elements/loader.less +17 -12
- package/src/definitions/elements/segment.less +12 -7
- package/src/definitions/elements/step.less +405 -87
- package/src/definitions/globals/site.js +3 -1
- package/src/definitions/globals/site.less +17 -12
- package/src/definitions/modules/accordion.js +3 -1
- package/src/definitions/modules/accordion.less +15 -13
- package/src/definitions/modules/calendar.js +46 -11
- package/src/definitions/modules/calendar.less +6 -4
- package/src/definitions/modules/checkbox.js +9 -3
- package/src/definitions/modules/checkbox.less +12 -6
- package/src/definitions/modules/dimmer.js +3 -1
- package/src/definitions/modules/dimmer.less +16 -10
- package/src/definitions/modules/dropdown.js +109 -34
- package/src/definitions/modules/dropdown.less +109 -78
- package/src/definitions/modules/embed.js +16 -6
- package/src/definitions/modules/flyout.js +3 -1
- package/src/definitions/modules/flyout.less +51 -45
- package/src/definitions/modules/modal.js +6 -2
- package/src/definitions/modules/modal.less +109 -82
- package/src/definitions/modules/nag.js +10 -4
- package/src/definitions/modules/nag.less +8 -4
- package/src/definitions/modules/popup.js +9 -3
- package/src/definitions/modules/popup.less +3 -1
- package/src/definitions/modules/progress.js +3 -1
- package/src/definitions/modules/progress.less +24 -6
- package/src/definitions/modules/rating.js +3 -1
- package/src/definitions/modules/search.js +77 -13
- package/src/definitions/modules/search.less +41 -25
- package/src/definitions/modules/shape.js +6 -4
- package/src/definitions/modules/sidebar.js +3 -1
- package/src/definitions/modules/slider.js +141 -43
- package/src/definitions/modules/slider.less +129 -27
- package/src/definitions/modules/sticky.js +3 -1
- package/src/definitions/modules/tab.js +3 -1
- package/src/definitions/modules/toast.js +6 -2
- package/src/definitions/modules/toast.less +35 -24
- package/src/definitions/modules/transition.js +6 -2
- package/src/definitions/views/card.less +7 -5
- package/src/definitions/views/feed.less +14 -1
- package/src/definitions/views/item.less +7 -5
- package/src/themes/basic/assets/fonts/LICENSE.txt +91 -0
- package/src/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
- package/src/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
- package/src/themes/default/collections/form.variables +1 -0
- package/src/themes/default/elements/button.variables +3 -0
- package/src/themes/default/elements/emoji.variables +172 -23
- package/src/themes/default/elements/flag.variables +3 -3
- package/src/themes/default/elements/step.variables +33 -0
- package/src/themes/default/globals/site.variables +3 -0
- package/src/themes/default/globals/variation.variables +24 -2
- package/src/themes/default/modules/dropdown.variables +3 -0
- package/src/themes/default/modules/progress.variables +1 -1
- package/src/themes/default/modules/search.variables +15 -12
- package/src/themes/default/modules/slider.variables +10 -0
- package/src/themes/default/views/feed.variables +3 -0
- package/src/themes/github/assets/fonts/LICENSE.txt +94 -0
- package/src/themes/joypixels/elements/emoji.variables +183 -22
- package/src/themes/material/assets/fonts/LICENSE.txt +202 -0
- package/tasks/admin/components/create.js +4 -4
- package/tasks/admin/components/init.js +2 -2
- package/tasks/admin/components/update.js +3 -3
- package/tasks/admin/distributions/create.js +3 -3
- package/tasks/admin/distributions/init.js +2 -2
- package/tasks/admin/distributions/update.js +4 -4
- package/tasks/build/assets.js +1 -1
- package/tasks/build/css.js +19 -10
- package/tasks/build/javascript.js +12 -5
- package/tasks/check-install.js +1 -1
- package/tasks/config/defaults.js +4 -0
- package/tasks/config/project/release.js +19 -1
- package/tasks/config/tasks.js +7 -7
- package/tasks/docs/build.js +3 -3
- package/tasks/docs/metadata.js +1 -1
- package/tasks/docs/serve.js +3 -1
- package/tasks/install.js +2 -2
- package/tasks/watch.js +1 -1
- package/types/fomantic-ui-accordion.d.ts +1 -1
- package/types/fomantic-ui-api.d.ts +9 -3
- package/types/fomantic-ui-calendar.d.ts +114 -13
- package/types/fomantic-ui-checkbox.d.ts +14 -4
- package/types/fomantic-ui-dimmer.d.ts +1 -1
- package/types/fomantic-ui-dropdown.d.ts +82 -44
- package/types/fomantic-ui-embed.d.ts +19 -2
- package/types/fomantic-ui-flyout.d.ts +25 -11
- package/types/fomantic-ui-form.d.ts +128 -20
- package/types/fomantic-ui-modal.d.ts +101 -5
- package/types/fomantic-ui-nag.d.ts +4 -4
- package/types/fomantic-ui-popup.d.ts +38 -12
- package/types/fomantic-ui-progress.d.ts +12 -6
- package/types/fomantic-ui-rating.d.ts +1 -1
- package/types/fomantic-ui-search.d.ts +138 -22
- package/types/fomantic-ui-shape.d.ts +2 -2
- package/types/fomantic-ui-sidebar.d.ts +4 -4
- package/types/fomantic-ui-slider.d.ts +56 -4
- package/types/fomantic-ui-sticky.d.ts +1 -1
- package/types/fomantic-ui-tab.d.ts +6 -6
- package/types/fomantic-ui-toast.d.ts +14 -2
- package/types/fomantic-ui-transition.d.ts +41 -7
- package/types/fomantic-ui-visibility.d.ts +3 -3
- package/types/index.d.ts +25 -25
- package/types/tests.ts +188 -0
- package/types/tsconfig.json +1 -1
- package/types/fomantic-ui-tests.ts +0 -25
@@ -67,7 +67,7 @@ declare namespace FomanticUI {
|
|
67
67
|
*/
|
68
68
|
(behavior: 'destroy'): JQuery;
|
69
69
|
|
70
|
-
<K extends keyof PopupSettings>(behavior: 'setting', name: K, value?: undefined,
|
70
|
+
<K extends keyof PopupSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<PopupSettings, keyof PopupSettings>>;
|
71
71
|
<K extends keyof PopupSettings>(behavior: 'setting', name: K, value: PopupSettings[K]): JQuery;
|
72
72
|
(behavior: 'setting', value: Partial<Pick<PopupSettings, keyof PopupSettings>>): JQuery;
|
73
73
|
(settings?: Partial<Pick<PopupSettings, keyof PopupSettings>>): JQuery;
|
@@ -84,7 +84,7 @@ declare namespace FomanticUI {
|
|
84
84
|
* This is useful for including a pre-formatted popup.
|
85
85
|
* @default false
|
86
86
|
*/
|
87
|
-
popup: false | string;
|
87
|
+
popup: false | string | JQuery;
|
88
88
|
|
89
89
|
/**
|
90
90
|
* Whether all other popups should be hidden when this popup is opened.
|
@@ -189,7 +189,7 @@ declare namespace FomanticUI {
|
|
189
189
|
* Alternatively you can provide an object to set individual values for hide/show transitions as well as hide/show duration.
|
190
190
|
* @default 'scale'
|
191
191
|
*/
|
192
|
-
transition: string |
|
192
|
+
transition: string | Popup.TransitionSettings;
|
193
193
|
|
194
194
|
/**
|
195
195
|
* Duration of animation events.
|
@@ -266,39 +266,39 @@ declare namespace FomanticUI {
|
|
266
266
|
/**
|
267
267
|
* Callback on popup element creation, with created popup.
|
268
268
|
*/
|
269
|
-
onCreate(this: JQuery): void;
|
269
|
+
onCreate(this: JQuery, element?: JQuery<HTMLElement>): void;
|
270
270
|
|
271
271
|
/**
|
272
272
|
* Callback immediately before Popup is removed from DOM.
|
273
273
|
*/
|
274
|
-
onRemove(this: JQuery): void;
|
274
|
+
onRemove(this: JQuery, element?: JQuery<HTMLElement>): void;
|
275
275
|
|
276
276
|
/**
|
277
277
|
* Callback before popup is shown.
|
278
278
|
* Returning 'false' from this callback will cancel the popup from showing.
|
279
279
|
*/
|
280
|
-
onShow(this: JQuery):
|
280
|
+
onShow(this: JQuery, element?: JQuery<HTMLElement>): any;
|
281
281
|
|
282
282
|
/**
|
283
283
|
* Callback after popup is shown.
|
284
284
|
*/
|
285
|
-
onVisible(this: JQuery): void;
|
285
|
+
onVisible(this: JQuery, element?: JQuery<HTMLElement>): void;
|
286
286
|
|
287
287
|
/**
|
288
288
|
* Callback before popup is hidden.
|
289
289
|
* Returning 'false' from this callback will cancel the popup from hiding.
|
290
290
|
*/
|
291
|
-
onHide(this: JQuery):
|
291
|
+
onHide(this: JQuery, element?: JQuery<HTMLElement>): any;
|
292
292
|
|
293
293
|
/**
|
294
294
|
* Callback after popup is hidden.
|
295
295
|
*/
|
296
|
-
onHidden(this: JQuery): void;
|
296
|
+
onHidden(this: JQuery, element?: JQuery<HTMLElement>): void;
|
297
297
|
|
298
298
|
/**
|
299
299
|
* Callback after popup cannot be placed on screen.
|
300
300
|
*/
|
301
|
-
onUnplaceable(this: JQuery): void;
|
301
|
+
onUnplaceable(this: JQuery, element?: JQuery<HTMLElement>): void;
|
302
302
|
|
303
303
|
// endregion
|
304
304
|
|
@@ -390,19 +390,45 @@ declare namespace FomanticUI {
|
|
390
390
|
}
|
391
391
|
|
392
392
|
namespace Popup {
|
393
|
+
type TransitionSettings = Partial<Pick<Settings.Transition, keyof Settings.Transition>>;
|
393
394
|
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
394
395
|
type MetadataSettings = Partial<Pick<Settings.Metadatas, keyof Settings.Metadatas>>;
|
395
396
|
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
396
397
|
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
397
398
|
|
398
399
|
namespace Settings {
|
400
|
+
interface Transition {
|
401
|
+
|
402
|
+
/**
|
403
|
+
* Named animation show event to used.
|
404
|
+
* Must be defined in CSS.
|
405
|
+
*/
|
406
|
+
showMethod: string;
|
407
|
+
|
408
|
+
/**
|
409
|
+
* Duration of the CSS show transition animation
|
410
|
+
*/
|
411
|
+
showDuration: number;
|
412
|
+
|
413
|
+
/**
|
414
|
+
* Named animation hide event to used.
|
415
|
+
* Must be defined in CSS.
|
416
|
+
*/
|
417
|
+
hideMethod: string;
|
418
|
+
|
419
|
+
/**
|
420
|
+
* Duration of the CSS hide transition animation
|
421
|
+
*/
|
422
|
+
hideDuration: number;
|
423
|
+
}
|
424
|
+
|
399
425
|
interface Selectors {
|
400
426
|
/**
|
401
427
|
* @default '.ui.popup'
|
402
428
|
*/
|
403
429
|
popup: string;
|
404
430
|
}
|
405
|
-
|
431
|
+
|
406
432
|
interface Metadatas {
|
407
433
|
/**
|
408
434
|
* @default 'activator'
|
@@ -439,7 +465,7 @@ declare namespace FomanticUI {
|
|
439
465
|
*/
|
440
466
|
variation: string;
|
441
467
|
}
|
442
|
-
|
468
|
+
|
443
469
|
interface ClassNames {
|
444
470
|
/**
|
445
471
|
* @default 'active'
|
@@ -158,7 +158,7 @@ declare namespace FomanticUI {
|
|
158
158
|
*/
|
159
159
|
(behavior: 'destroy'): JQuery;
|
160
160
|
|
161
|
-
<K extends keyof ProgressSettings>(behavior: 'setting', name: K, value?: undefined,
|
161
|
+
<K extends keyof ProgressSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<ProgressSettings, keyof ProgressSettings>>;
|
162
162
|
<K extends keyof ProgressSettings>(behavior: 'setting', name: K, value: ProgressSettings[K]): JQuery;
|
163
163
|
(behavior: 'setting', value: Partial<Pick<ProgressSettings, keyof ProgressSettings>>): JQuery;
|
164
164
|
(settings?: Partial<Pick<ProgressSettings, keyof ProgressSettings>>): JQuery;
|
@@ -208,6 +208,12 @@ declare namespace FomanticUI {
|
|
208
208
|
*/
|
209
209
|
precision: number;
|
210
210
|
|
211
|
+
/**
|
212
|
+
* Sets current overall percent.
|
213
|
+
* @default false
|
214
|
+
*/
|
215
|
+
percent: false | number;
|
216
|
+
|
211
217
|
/**
|
212
218
|
* Setting a total value will make each call to increment get closer to this total (i.e. 1/20, 2/20 etc).
|
213
219
|
* @default false
|
@@ -349,7 +355,7 @@ declare namespace FomanticUI {
|
|
349
355
|
*/
|
350
356
|
progress: string;
|
351
357
|
}
|
352
|
-
|
358
|
+
|
353
359
|
interface ClassNames {
|
354
360
|
/**
|
355
361
|
* @default 'active'
|
@@ -371,7 +377,7 @@ declare namespace FomanticUI {
|
|
371
377
|
*/
|
372
378
|
warning: string;
|
373
379
|
}
|
374
|
-
|
380
|
+
|
375
381
|
interface Texts {
|
376
382
|
/**
|
377
383
|
* @default false
|
@@ -408,14 +414,14 @@ declare namespace FomanticUI {
|
|
408
414
|
*/
|
409
415
|
bars: string[];
|
410
416
|
}
|
411
|
-
|
417
|
+
|
412
418
|
interface RegExps {
|
413
419
|
/**
|
414
420
|
* @default /\{\$*[A-z0-9]+\}/g
|
415
421
|
*/
|
416
422
|
variable: RegExp;
|
417
423
|
}
|
418
|
-
|
424
|
+
|
419
425
|
interface Metadatas {
|
420
426
|
/**
|
421
427
|
* @default 'percent'
|
@@ -432,7 +438,7 @@ declare namespace FomanticUI {
|
|
432
438
|
*/
|
433
439
|
value: string;
|
434
440
|
}
|
435
|
-
|
441
|
+
|
436
442
|
interface Errors {
|
437
443
|
/**
|
438
444
|
* @default 'The method you called is not defined.'
|
@@ -28,7 +28,7 @@ declare namespace FomanticUI {
|
|
28
28
|
(behavior: 'clear rating'): JQuery;
|
29
29
|
|
30
30
|
(behavior: 'destroy'): JQuery;
|
31
|
-
<K extends keyof RatingSettings>(behavior: 'setting', name: K, value?: undefined,
|
31
|
+
<K extends keyof RatingSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<RatingSettings, keyof RatingSettings>>;
|
32
32
|
<K extends keyof RatingSettings>(behavior: 'setting', name: K, value: RatingSettings[K]): JQuery;
|
33
33
|
(behavior: 'setting', value: Partial<Pick<RatingSettings, keyof RatingSettings>>): JQuery;
|
34
34
|
(settings?: Partial<Pick<RatingSettings, keyof RatingSettings>>): JQuery;
|
@@ -5,12 +5,12 @@ declare namespace FomanticUI {
|
|
5
5
|
/**
|
6
6
|
* Search for value currently set in search input.
|
7
7
|
*/
|
8
|
-
(behavior: 'query', callback
|
8
|
+
(behavior: 'query', callback?: () => void): JQuery;
|
9
9
|
|
10
10
|
/**
|
11
11
|
* Displays message in search results with text, using template matching type.
|
12
12
|
*/
|
13
|
-
(behavior: 'display message', text: string, type
|
13
|
+
(behavior: 'display message', text: string, type?: string): JQuery;
|
14
14
|
|
15
15
|
/**
|
16
16
|
* Cancels current remote search query.
|
@@ -30,7 +30,7 @@ declare namespace FomanticUI {
|
|
30
30
|
/**
|
31
31
|
* Search remote endpoint for specified query and display results.
|
32
32
|
*/
|
33
|
-
(behavior: 'search remote', query: string, callback
|
33
|
+
(behavior: 'search remote', query: string, callback?: () => void): JQuery;
|
34
34
|
|
35
35
|
/**
|
36
36
|
* Search object for specified query and return results.
|
@@ -75,7 +75,7 @@ declare namespace FomanticUI {
|
|
75
75
|
/**
|
76
76
|
* Clears value from cache, if no parameter passed clears all cache.
|
77
77
|
*/
|
78
|
-
(behavior: 'clear cache', query
|
78
|
+
(behavior: 'clear cache', query?: string): JQuery;
|
79
79
|
|
80
80
|
/**
|
81
81
|
* Writes cached results for query.
|
@@ -90,24 +90,24 @@ declare namespace FomanticUI {
|
|
90
90
|
/**
|
91
91
|
* Shows results container.
|
92
92
|
*/
|
93
|
-
(behavior: 'show results', callback
|
93
|
+
(behavior: 'show results', callback?: () => void): JQuery;
|
94
94
|
|
95
95
|
/**
|
96
96
|
* Hide results container.
|
97
97
|
*/
|
98
|
-
(behavior: 'hide results', callback
|
98
|
+
(behavior: 'hide results', callback?: () => void): JQuery;
|
99
99
|
|
100
100
|
/**
|
101
101
|
* Generates results using parser specified by 'settings.template'.
|
102
102
|
*/
|
103
|
-
(behavior: 'generate results', response:
|
103
|
+
(behavior: 'generate results', response: object): JQuery;
|
104
104
|
|
105
105
|
/**
|
106
106
|
* Removes all events.
|
107
107
|
*/
|
108
108
|
(behavior: 'destroy'): JQuery;
|
109
109
|
|
110
|
-
<K extends keyof SearchSettings>(behavior: 'setting', name: K, value?: undefined,
|
110
|
+
<K extends keyof SearchSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<SearchSettings, keyof SearchSettings>>;
|
111
111
|
<K extends keyof SearchSettings>(behavior: 'setting', name: K, value: SearchSettings[K]): JQuery;
|
112
112
|
(behavior: 'setting', value: Partial<Pick<SearchSettings, keyof SearchSettings>>): JQuery;
|
113
113
|
(settings?: Partial<Pick<SearchSettings, keyof SearchSettings>>): JQuery;
|
@@ -124,7 +124,7 @@ declare namespace FomanticUI {
|
|
124
124
|
* @see {@link https://fomantic-ui.com/behaviors/api.html#/settings}
|
125
125
|
* @default {}
|
126
126
|
*/
|
127
|
-
apiSettings: APISettings | JQueryAjaxSettings;
|
127
|
+
apiSettings: Partial<Pick<APISettings, keyof APISettings>> | JQueryAjaxSettings;
|
128
128
|
|
129
129
|
/**
|
130
130
|
* Minimum characters to query for results.
|
@@ -183,16 +183,21 @@ declare namespace FomanticUI {
|
|
183
183
|
showNoResults: boolean;
|
184
184
|
|
185
185
|
/**
|
186
|
-
*
|
186
|
+
* Possible values
|
187
|
+
* * `exact` will force the exact search to be matched somewhere in the string.
|
188
|
+
* * `some` Will do the same as exact but supports multiple search values separated by whitespace. At least one word must match. (New in v2.9.1)
|
189
|
+
* * `all` is same as some but all words have to match in all given search fields of each record altogether. (New in v2.9.1)
|
190
|
+
* * `true` will use a fuzzy full text search.
|
191
|
+
* * `false` will only match to start of string.
|
187
192
|
* @default 'exact'
|
188
193
|
*/
|
189
|
-
fullTextSearch: 'exact' | boolean;
|
194
|
+
fullTextSearch: 'exact' | 'some' | 'all' | boolean;
|
190
195
|
|
191
196
|
/**
|
192
197
|
* List mapping display content to JSON property, either with API or 'source'.
|
193
198
|
* @default {}
|
194
199
|
*/
|
195
|
-
fields:
|
200
|
+
fields: Search.FieldsSettings;
|
196
201
|
|
197
202
|
/**
|
198
203
|
* Specify object properties inside local source object which will be searched.
|
@@ -228,6 +233,36 @@ declare namespace FomanticUI {
|
|
228
233
|
*/
|
229
234
|
ignoreDiacritics: boolean;
|
230
235
|
|
236
|
+
/**
|
237
|
+
* Whether to consider case sensitivity on local searching
|
238
|
+
* @default true
|
239
|
+
*/
|
240
|
+
ignoreSearchCase: boolean;
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Whether search result should highlight matching strings
|
244
|
+
* @default false
|
245
|
+
*/
|
246
|
+
highlightMatches: boolean;
|
247
|
+
|
248
|
+
/**
|
249
|
+
* Template to use (specified in settings.templates)
|
250
|
+
* @default 'standard'
|
251
|
+
*/
|
252
|
+
type: 'escape' | 'message' | 'category' | 'standard';
|
253
|
+
|
254
|
+
/**
|
255
|
+
* Field to display in standard results template
|
256
|
+
* @default ''
|
257
|
+
*/
|
258
|
+
displayField: string;
|
259
|
+
|
260
|
+
/**
|
261
|
+
* Whether to add events to prompt automatically
|
262
|
+
* @default true
|
263
|
+
*/
|
264
|
+
automatic: boolean;
|
265
|
+
|
231
266
|
// endregion
|
232
267
|
|
233
268
|
// region Callbacks
|
@@ -237,13 +272,13 @@ declare namespace FomanticUI {
|
|
237
272
|
* The first parameter includes the filtered response results for that element.
|
238
273
|
* The function should return 'false' to prevent default action (closing search results and selecting value).
|
239
274
|
*/
|
240
|
-
onSelect(this: JQuery, result: object, response: object):
|
275
|
+
onSelect(this: JQuery, result: object, response: object): any;
|
241
276
|
|
242
277
|
/**
|
243
278
|
* Callback after processing element template to add HTML to results.
|
244
279
|
* Function should return 'false' to prevent default actions.
|
245
280
|
*/
|
246
|
-
onResultsAdd(this: JQuery, html: string): boolean;
|
281
|
+
onResultsAdd(this: JQuery, html: string): void | boolean;
|
247
282
|
|
248
283
|
/**
|
249
284
|
* Callback on search query.
|
@@ -347,29 +382,30 @@ declare namespace FomanticUI {
|
|
347
382
|
type RegExpSettings = Partial<Pick<Settings.RegExps, keyof Settings.RegExps>>;
|
348
383
|
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
349
384
|
type MetadataSettings = Partial<Pick<Settings.Metadatas, keyof Settings.Metadatas>>;
|
385
|
+
type FieldsSettings = Partial<Pick<Settings.Fields, keyof Settings.Fields>>;
|
350
386
|
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
351
387
|
|
352
388
|
namespace Settings {
|
353
389
|
interface Templates {
|
354
390
|
/**
|
355
|
-
* @default function(string)
|
391
|
+
* @default function(string, preserveHTML)
|
356
392
|
*/
|
357
|
-
escape:
|
393
|
+
escape: (string: string, preserveHTML?: boolean) => string;
|
358
394
|
|
359
395
|
/**
|
360
|
-
* @default function(message, type)
|
396
|
+
* @default function(message, type, header)
|
361
397
|
*/
|
362
|
-
message:
|
398
|
+
message: (message: string, type?: string, header?: string) => string;
|
363
399
|
|
364
400
|
/**
|
365
|
-
* @default function(response)
|
401
|
+
* @default function(response, fields, preserveHTML)
|
366
402
|
*/
|
367
|
-
category:
|
403
|
+
category: (response: unknown, fields: {[key: string]: string}, preserveHTML?: boolean) => string;
|
368
404
|
|
369
405
|
/**
|
370
|
-
* @default function(response)
|
406
|
+
* @default function(response, fields, preserveHTML)
|
371
407
|
*/
|
372
|
-
standard:
|
408
|
+
standard: (response: unknown, fields: {[key: string]: string}, preserveHTML?: boolean) => string;
|
373
409
|
}
|
374
410
|
|
375
411
|
interface Selectors {
|
@@ -450,6 +486,86 @@ declare namespace FomanticUI {
|
|
450
486
|
results: string;
|
451
487
|
}
|
452
488
|
|
489
|
+
interface Fields {
|
490
|
+
/**
|
491
|
+
* Array of categories (category view)
|
492
|
+
* @default 'results'
|
493
|
+
*/
|
494
|
+
categories: string;
|
495
|
+
|
496
|
+
/**
|
497
|
+
* Name of category (category view)
|
498
|
+
* @default 'name'
|
499
|
+
*/
|
500
|
+
categoryName: string;
|
501
|
+
|
502
|
+
/**
|
503
|
+
* Array of results (category view)
|
504
|
+
* @default 'results'
|
505
|
+
*/
|
506
|
+
categoryResults: string;
|
507
|
+
|
508
|
+
/**
|
509
|
+
* Sesult description
|
510
|
+
* @default ' description'
|
511
|
+
*/
|
512
|
+
description: string;
|
513
|
+
|
514
|
+
/**
|
515
|
+
* Result image
|
516
|
+
* @default 'image'
|
517
|
+
*/
|
518
|
+
image: string;
|
519
|
+
|
520
|
+
/**
|
521
|
+
* Result alt text for image
|
522
|
+
* @default 'alt'
|
523
|
+
*/
|
524
|
+
alt: string;
|
525
|
+
|
526
|
+
/**
|
527
|
+
* Result price
|
528
|
+
* @default 'price'
|
529
|
+
*/
|
530
|
+
price: string;
|
531
|
+
|
532
|
+
/**
|
533
|
+
* Array of results (standard)
|
534
|
+
* @default 'results'
|
535
|
+
*/
|
536
|
+
results: string;
|
537
|
+
|
538
|
+
/**
|
539
|
+
* Result title
|
540
|
+
* @default 'title'
|
541
|
+
*/
|
542
|
+
title: string;
|
543
|
+
|
544
|
+
/**
|
545
|
+
* Result url
|
546
|
+
* @default 'url'
|
547
|
+
*/
|
548
|
+
url: string;
|
549
|
+
|
550
|
+
/**
|
551
|
+
* "view more" object name
|
552
|
+
* @default 'action'
|
553
|
+
*/
|
554
|
+
action: string;
|
555
|
+
|
556
|
+
/**
|
557
|
+
* "view more" text
|
558
|
+
* @default 'text'
|
559
|
+
*/
|
560
|
+
actionText: string;
|
561
|
+
|
562
|
+
/**
|
563
|
+
* "view more" url
|
564
|
+
* @default 'url'
|
565
|
+
*/
|
566
|
+
actionURL: string;
|
567
|
+
}
|
568
|
+
|
453
569
|
interface Errors {
|
454
570
|
/**
|
455
571
|
* @default 'Cannot search. No source used, and Fomantic API module was not included'
|
@@ -102,7 +102,7 @@ declare namespace FomanticUI {
|
|
102
102
|
*/
|
103
103
|
(behavior: 'destroy'): JQuery;
|
104
104
|
|
105
|
-
<K extends keyof ShapeSettings>(behavior: 'setting', name: K, value?: undefined,
|
105
|
+
<K extends keyof ShapeSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<ShapeSettings, keyof ShapeSettings>>;
|
106
106
|
<K extends keyof ShapeSettings>(behavior: 'setting', name: K, value: ShapeSettings[K]): JQuery;
|
107
107
|
(behavior: 'setting', value: Partial<Pick<ShapeSettings, keyof ShapeSettings>>): JQuery;
|
108
108
|
(settings?: Partial<Pick<ShapeSettings, keyof ShapeSettings>>): JQuery;
|
@@ -257,7 +257,7 @@ declare namespace FomanticUI {
|
|
257
257
|
*/
|
258
258
|
active: string;
|
259
259
|
}
|
260
|
-
|
260
|
+
|
261
261
|
interface Errors {
|
262
262
|
/**
|
263
263
|
* @default 'You tried to switch to a side that does not exist.'
|
@@ -68,7 +68,7 @@ declare namespace FomanticUI {
|
|
68
68
|
*/
|
69
69
|
(behavior: 'destroy'): JQuery;
|
70
70
|
|
71
|
-
<K extends keyof SidebarSettings>(behavior: 'setting', name: K, value?: undefined,
|
71
|
+
<K extends keyof SidebarSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<SidebarSettings, keyof SidebarSettings>>;
|
72
72
|
<K extends keyof SidebarSettings>(behavior: 'setting', name: K, value: SidebarSettings[K]): JQuery;
|
73
73
|
(behavior: 'setting', value: Partial<Pick<SidebarSettings, keyof SidebarSettings>>): JQuery;
|
74
74
|
(settings?: Partial<Pick<SidebarSettings, keyof SidebarSettings>>): JQuery;
|
@@ -281,7 +281,7 @@ declare namespace FomanticUI {
|
|
281
281
|
*/
|
282
282
|
sidebar: string;
|
283
283
|
}
|
284
|
-
|
284
|
+
|
285
285
|
interface RegExps {
|
286
286
|
/**
|
287
287
|
* @default /(iPad|iPhone|iPod)/g
|
@@ -298,7 +298,7 @@ declare namespace FomanticUI {
|
|
298
298
|
*/
|
299
299
|
mobile: RegExp;
|
300
300
|
}
|
301
|
-
|
301
|
+
|
302
302
|
interface ClassNames {
|
303
303
|
/**
|
304
304
|
* @default 'active'
|
@@ -370,7 +370,7 @@ declare namespace FomanticUI {
|
|
370
370
|
*/
|
371
371
|
visible: string;
|
372
372
|
}
|
373
|
-
|
373
|
+
|
374
374
|
interface Errors {
|
375
375
|
/**
|
376
376
|
* @default 'The method you called is not defined.'
|
@@ -35,7 +35,7 @@ declare namespace FomanticUI {
|
|
35
35
|
*/
|
36
36
|
(behavior: 'destroy'): JQuery;
|
37
37
|
|
38
|
-
<K extends keyof SliderSettings>(behavior: 'setting', name: K, value?: undefined,
|
38
|
+
<K extends keyof SliderSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<SliderSettings, keyof SliderSettings>>;
|
39
39
|
<K extends keyof SliderSettings>(behavior: 'setting', name: K, value: SliderSettings[K]): JQuery;
|
40
40
|
(behavior: 'setting', value: Partial<Pick<SliderSettings, keyof SliderSettings>>): JQuery;
|
41
41
|
(settings?: Partial<Pick<SliderSettings, keyof SliderSettings>>): JQuery;
|
@@ -78,6 +78,18 @@ declare namespace FomanticUI {
|
|
78
78
|
*/
|
79
79
|
end: number;
|
80
80
|
|
81
|
+
/**
|
82
|
+
* Makes sure that the two thumbs of a range slider always need to have a difference of the given value.
|
83
|
+
* @default false
|
84
|
+
*/
|
85
|
+
minRange: false | number;
|
86
|
+
|
87
|
+
/**
|
88
|
+
* Makes sure that the two thumbs of a range slider don't exceed a difference of the given value.
|
89
|
+
* @default false
|
90
|
+
*/
|
91
|
+
maxRange: false | number;
|
92
|
+
|
81
93
|
/**
|
82
94
|
* The type of label to display for a labeled slider.
|
83
95
|
* Can be 'number' or 'letter'.
|
@@ -89,13 +101,43 @@ declare namespace FomanticUI {
|
|
89
101
|
* You can specify a function here which consumes the current label value as parameter and should return a custom label text according to the given value.
|
90
102
|
* @default false
|
91
103
|
*/
|
92
|
-
interpretLabel: false |
|
104
|
+
interpretLabel: false | ((value: any) => string);
|
105
|
+
|
106
|
+
/**
|
107
|
+
* String or array of strings to be used for labelType 'letter'
|
108
|
+
* @default 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
109
|
+
*/
|
110
|
+
letters: string | string[],
|
111
|
+
|
112
|
+
/**
|
113
|
+
* An array of label values which restrict the displayed labels to only those which are defined
|
114
|
+
* @default []
|
115
|
+
*/
|
116
|
+
restrictedLabels: number[];
|
117
|
+
|
118
|
+
/**
|
119
|
+
* If the selected range labels should be highlighted
|
120
|
+
* @default false
|
121
|
+
*/
|
122
|
+
highlightRange: boolean;
|
123
|
+
|
124
|
+
/**
|
125
|
+
* Whether a tooltip should be shown to the thumb(s) on hover. Will contain the current slider value.
|
126
|
+
* @default false
|
127
|
+
*/
|
128
|
+
showThumbTooltip: boolean;
|
129
|
+
|
130
|
+
/**
|
131
|
+
* Tooltip configuration used when showThumbTooltip is true
|
132
|
+
* @default false
|
133
|
+
*/
|
134
|
+
tooltipConfig: object;
|
93
135
|
|
94
136
|
/**
|
95
137
|
* Show ticks on a labeled slider.
|
96
138
|
* @default false
|
97
139
|
*/
|
98
|
-
showLabelTicks: boolean;
|
140
|
+
showLabelTicks: boolean | 'always';
|
99
141
|
|
100
142
|
/**
|
101
143
|
* Define smoothness when the slider is moving.
|
@@ -107,7 +149,7 @@ declare namespace FomanticUI {
|
|
107
149
|
* Whether labels should auto adjust on window resize.
|
108
150
|
* @default true
|
109
151
|
*/
|
110
|
-
autoAdjustLabels: boolean;
|
152
|
+
autoAdjustLabels: boolean | 'fixed';
|
111
153
|
|
112
154
|
/**
|
113
155
|
* The distance between labels.
|
@@ -254,6 +296,16 @@ declare namespace FomanticUI {
|
|
254
296
|
* @default 'smooth'
|
255
297
|
*/
|
256
298
|
smooth: string;
|
299
|
+
|
300
|
+
/**
|
301
|
+
* @default 'label'
|
302
|
+
*/
|
303
|
+
label: string;
|
304
|
+
|
305
|
+
/**
|
306
|
+
* @default 'active'
|
307
|
+
*/
|
308
|
+
active: string;
|
257
309
|
}
|
258
310
|
|
259
311
|
interface Metadatas {
|
@@ -3,7 +3,7 @@ declare namespace FomanticUI {
|
|
3
3
|
settings: StickySettings;
|
4
4
|
|
5
5
|
(behavior: 'destroy'): JQuery;
|
6
|
-
<K extends keyof StickySettings>(behavior: 'setting', name: K, value?: undefined,
|
6
|
+
<K extends keyof StickySettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<StickySettings, keyof StickySettings>>;
|
7
7
|
<K extends keyof StickySettings>(behavior: 'setting', name: K, value: StickySettings[K]): JQuery;
|
8
8
|
(behavior: 'setting', value: Partial<Pick<StickySettings, keyof StickySettings>>): JQuery;
|
9
9
|
(settings?: Partial<Pick<StickySettings, keyof StickySettings>>): JQuery;
|