fomantic-ui 2.9.4-beta.8 → 2.9.4-beta.80
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 +20 -1
- package/.eslintrc.js +17 -0
- package/.github/FUNDING.yml +1 -1
- package/.github/workflows/ci.yml +6 -6
- package/.github/workflows/depsreview.yml +14 -0
- package/.github/workflows/nightly.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/CONTRIBUTORS.md +2 -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 +15 -3
- 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 -38
- package/dist/components/dropdown.js +104 -33
- 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 +1 -1
- 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 +15 -3
- package/dist/components/form.js +66 -23
- 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 +1 -1
- package/dist/components/header.min.css +1 -1
- 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 +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +7 -1
- 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 -1
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +2 -1
- package/dist/components/message.min.css +2 -2
- package/dist/components/modal.css +1 -1
- 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 -1
- package/dist/components/popup.js +10 -4
- package/dist/components/popup.min.css +1 -1
- 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 +1 -1
- package/dist/components/search.js +67 -14
- package/dist/components/search.min.css +1 -1
- 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 +1 -1
- package/dist/components/slider.js +4 -2
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- 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 +1 -1
- package/dist/components/step.min.css +1 -1
- 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 +4713 -3857
- package/dist/semantic.js +385 -136
- 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/src/definitions/behaviors/api.js +6 -2
- package/src/definitions/behaviors/form.js +65 -22
- package/src/definitions/behaviors/state.js +3 -1
- package/src/definitions/behaviors/visibility.js +3 -1
- package/src/definitions/collections/form.less +9 -2
- package/src/definitions/collections/grid.less +4 -4
- package/src/definitions/collections/message.less +1 -0
- package/src/definitions/collections/table.less +69 -54
- package/src/definitions/elements/button.less +27 -3
- package/src/definitions/elements/label.less +5 -0
- 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/calendar.js +14 -2
- package/src/definitions/modules/checkbox.js +9 -3
- package/src/definitions/modules/dimmer.js +3 -1
- package/src/definitions/modules/dimmer.less +8 -5
- package/src/definitions/modules/dropdown.js +103 -32
- package/src/definitions/modules/dropdown.less +43 -29
- package/src/definitions/modules/embed.js +16 -6
- package/src/definitions/modules/flyout.js +3 -1
- package/src/definitions/modules/modal.js +6 -2
- package/src/definitions/modules/nag.js +10 -4
- package/src/definitions/modules/popup.js +9 -3
- package/src/definitions/modules/progress.js +3 -1
- package/src/definitions/modules/progress.less +17 -5
- package/src/definitions/modules/rating.js +3 -1
- package/src/definitions/modules/search.js +66 -13
- package/src/definitions/modules/search.less +9 -2
- package/src/definitions/modules/shape.js +6 -4
- package/src/definitions/modules/sidebar.js +3 -1
- package/src/definitions/modules/slider.js +3 -1
- 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/transition.js +6 -2
- package/src/definitions/views/feed.less +11 -0
- 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/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/globals/site.variables +3 -0
- package/src/themes/default/globals/variation.variables +3 -0
- 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 +3 -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 +2 -0
- package/tasks/config/tasks.js +1 -1
- 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 +110 -9
- 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 +76 -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 +123 -15
- 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 +2 -2
- 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
@@ -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
|
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:
|
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,13 +319,31 @@ declare namespace FomanticUI {
|
|
319
319
|
*
|
320
320
|
* @default false
|
321
321
|
*/
|
322
|
-
selectAdjacentDays:
|
322
|
+
selectAdjacentDays: boolean;
|
323
323
|
|
324
324
|
popupOptions: Calendar.PopupSettings;
|
325
325
|
|
326
326
|
text: Calendar.TextSettings;
|
327
327
|
|
328
|
-
|
328
|
+
formatter: Calendar.FormatterSettings;
|
329
|
+
|
330
|
+
/**
|
331
|
+
* Customizable methods to parse a given date
|
332
|
+
* Has to return a date object
|
333
|
+
*/
|
334
|
+
parser: {
|
335
|
+
date: (text: string, settings: CalendarSettings) => Date;
|
336
|
+
}
|
337
|
+
|
338
|
+
/**
|
339
|
+
* DOM selector where the calendar popup should be attached to. By default (false) the calendar popup
|
340
|
+
* is attached as direct child of the triggering element.
|
341
|
+
*
|
342
|
+
* @default false
|
343
|
+
*/
|
344
|
+
context: string | JQuery | false
|
345
|
+
|
346
|
+
// end region
|
329
347
|
|
330
348
|
// region Callbacks
|
331
349
|
|
@@ -333,12 +351,12 @@ declare namespace FomanticUI {
|
|
333
351
|
* Is called before a calendar date changes. 'return false;' will cancel the change.
|
334
352
|
* @since 2.8.0
|
335
353
|
*/
|
336
|
-
onBeforeChange(this: JQuery): void;
|
354
|
+
onBeforeChange(this: JQuery, date?: Date, text?: string, mode?: string): void;
|
337
355
|
|
338
356
|
/**
|
339
357
|
* Is called after a calendar date has changed.
|
340
358
|
*/
|
341
|
-
onChange(this: JQuery): void;
|
359
|
+
onChange(this: JQuery, date?: Date): void;
|
342
360
|
|
343
361
|
/**
|
344
362
|
* Is called before a calendar is shown. 'return false;' will prevent the calendar to be shown.
|
@@ -364,7 +382,7 @@ declare namespace FomanticUI {
|
|
364
382
|
* Is called when a cell of the calendar is selected providing its value and current mode.
|
365
383
|
* 'return false;' will prevent the selection.
|
366
384
|
*/
|
367
|
-
onSelect(this: JQuery, date
|
385
|
+
onSelect(this: JQuery, date?: Date, mode?: string): void;
|
368
386
|
|
369
387
|
// endregion
|
370
388
|
|
@@ -436,6 +454,7 @@ declare namespace FomanticUI {
|
|
436
454
|
namespace Calendar {
|
437
455
|
type PopupSettings = Partial<Pick<Settings.Popup, keyof Settings.Popup>>;
|
438
456
|
type TextSettings = Partial<Pick<Settings.Texts, keyof Settings.Texts>>;
|
457
|
+
type FormatterSettings = Partial<Pick<Settings.Formatters, keyof Settings.Formatters>>;
|
439
458
|
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
440
459
|
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
441
460
|
type RegExpSettings = Partial<Pick<Settings.RegExps, keyof Settings.RegExps>>;
|
@@ -471,6 +490,16 @@ declare namespace FomanticUI {
|
|
471
490
|
*/
|
472
491
|
days: string[];
|
473
492
|
|
493
|
+
/**
|
494
|
+
* @default ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
495
|
+
*/
|
496
|
+
dayNamesShort: string[];
|
497
|
+
|
498
|
+
/**
|
499
|
+
* @default ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
500
|
+
*/
|
501
|
+
dayNames: string[];
|
502
|
+
|
474
503
|
/**
|
475
504
|
* @default ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
476
505
|
*/
|
@@ -507,6 +536,78 @@ declare namespace FomanticUI {
|
|
507
536
|
weekNo: string;
|
508
537
|
}
|
509
538
|
|
539
|
+
interface Formatters {
|
540
|
+
/**
|
541
|
+
*
|
542
|
+
*/
|
543
|
+
yearHeader(date: Date, settings?: CalendarSettings): string;
|
544
|
+
|
545
|
+
/**
|
546
|
+
* @default 'YYYY'
|
547
|
+
*/
|
548
|
+
monthHeader: string;
|
549
|
+
|
550
|
+
/**
|
551
|
+
* @default 'MMMM YYYY'
|
552
|
+
*/
|
553
|
+
dayHeader: string;
|
554
|
+
|
555
|
+
/**
|
556
|
+
* @default 'MMMM D, YYYY'
|
557
|
+
*/
|
558
|
+
hourHeader: string;
|
559
|
+
|
560
|
+
/**
|
561
|
+
* @default 'MMMM D, YYYY'
|
562
|
+
*/
|
563
|
+
minuteHeader: string;
|
564
|
+
|
565
|
+
/**
|
566
|
+
* @default 'MMMM D, YYYY'
|
567
|
+
*/
|
568
|
+
dayColumnHeader(day: number, settings: CalendarSettings): string;
|
569
|
+
|
570
|
+
/**
|
571
|
+
* @default 'MMMM D, YYYY h:mm A'
|
572
|
+
*/
|
573
|
+
datetime: string;
|
574
|
+
|
575
|
+
/**
|
576
|
+
* @default 'MMMM D, YYYY'
|
577
|
+
*/
|
578
|
+
date: string;
|
579
|
+
|
580
|
+
/**
|
581
|
+
* @default 'h:mm A'
|
582
|
+
*/
|
583
|
+
time: string;
|
584
|
+
|
585
|
+
/**
|
586
|
+
* @default 'h:mm A'
|
587
|
+
*/
|
588
|
+
cellTime: string;
|
589
|
+
|
590
|
+
/**
|
591
|
+
* @default 'MMMM YYYY'
|
592
|
+
*/
|
593
|
+
month: string;
|
594
|
+
|
595
|
+
/**
|
596
|
+
* @default 'YYYY'
|
597
|
+
*/
|
598
|
+
year: string;
|
599
|
+
|
600
|
+
/**
|
601
|
+
*
|
602
|
+
*/
|
603
|
+
today(settings: CalendarSettings): string;
|
604
|
+
|
605
|
+
/**
|
606
|
+
*
|
607
|
+
*/
|
608
|
+
cell(cell: string, date: Date, cellOptions: any): any
|
609
|
+
}
|
610
|
+
|
510
611
|
interface Selectors {
|
511
612
|
/**
|
512
613
|
* @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 |
|
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,
|
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):
|
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'):
|
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
|
32
|
+
(behavior: 'show', callback?: () => void, 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
|
39
|
+
(behavior: 'hide', callback?: () => void, 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
|
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
|
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
|
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[]):
|
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):
|
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
|
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,
|
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' |
|
348
|
+
placeholder: 'auto' | string | false;
|
354
349
|
|
355
350
|
/**
|
356
351
|
* Whether HTML included in dropdown values should be preserved.
|
@@ -363,7 +358,7 @@ declare namespace FomanticUI {
|
|
363
358
|
* Whether to sort values when creating a dropdown automatically from a select element.
|
364
359
|
* @default false
|
365
360
|
*/
|
366
|
-
sortSelect: boolean | 'natural' |
|
361
|
+
sortSelect: boolean | 'natural' | ((a: any, b: any) => number);
|
367
362
|
|
368
363
|
/**
|
369
364
|
* Whether search selection will force currently selected choice when element is blurred.
|
@@ -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
|
@@ -452,7 +453,7 @@ declare namespace FomanticUI {
|
|
452
453
|
* Alternatively you can provide an 'object' to set individual values for hide/show transitions as well as hide/show duration.
|
453
454
|
* @default 'auto'
|
454
455
|
*/
|
455
|
-
transition:
|
456
|
+
transition: string | Dropdown.TransitionSettings;
|
456
457
|
|
457
458
|
/**
|
458
459
|
* Duration of animation events.
|
@@ -467,13 +468,6 @@ declare namespace FomanticUI {
|
|
467
468
|
*/
|
468
469
|
displayType: false | string;
|
469
470
|
|
470
|
-
/**
|
471
|
-
* Maximum glyph width, used to calculate search size.
|
472
|
-
* This is usually size of a "W" in your font in 'em'.
|
473
|
-
* @default 1.037
|
474
|
-
*/
|
475
|
-
glyphWidth: number;
|
476
|
-
|
477
471
|
/**
|
478
472
|
* Whether option headers should have an additional divider line underneath when converted from '<select><optgroup>'.
|
479
473
|
* @default true
|
@@ -506,7 +500,7 @@ declare namespace FomanticUI {
|
|
506
500
|
* Is called after a dropdown value changes.
|
507
501
|
* Receives the name and value of selection and the active menu element.
|
508
502
|
*/
|
509
|
-
onChange(value
|
503
|
+
onChange(value?: string, text?: string, $choice?: JQuery): void;
|
510
504
|
|
511
505
|
/**
|
512
506
|
* Is called after a dropdown selection is added using a multiple select dropdown, only receives the added value.
|
@@ -582,22 +576,22 @@ declare namespace FomanticUI {
|
|
582
576
|
message: Dropdown.MessageSettings;
|
583
577
|
|
584
578
|
/**
|
585
|
-
*
|
579
|
+
*
|
586
580
|
*/
|
587
581
|
regExp: Dropdown.RegExpSettings;
|
588
582
|
|
589
583
|
/**
|
590
|
-
*
|
584
|
+
*
|
591
585
|
*/
|
592
586
|
metadata: Dropdown.MetadataSettings;
|
593
587
|
|
594
588
|
/**
|
595
|
-
*
|
589
|
+
*
|
596
590
|
*/
|
597
591
|
fields: Dropdown.FieldsSettings;
|
598
592
|
|
599
593
|
/**
|
600
|
-
*
|
594
|
+
*
|
601
595
|
*/
|
602
596
|
keys: Dropdown.KeysSettings;
|
603
597
|
|
@@ -647,6 +641,7 @@ declare namespace FomanticUI {
|
|
647
641
|
}
|
648
642
|
|
649
643
|
namespace Dropdown {
|
644
|
+
type TransitionSettings = Partial<Pick<Settings.Transition, keyof Settings.Transition>>;
|
650
645
|
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
651
646
|
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
652
647
|
type MessageSettings = Partial<Pick<Settings.Messages, keyof Settings.Messages>>;
|
@@ -657,6 +652,31 @@ declare namespace FomanticUI {
|
|
657
652
|
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
658
653
|
|
659
654
|
namespace Settings {
|
655
|
+
interface Transition {
|
656
|
+
|
657
|
+
/**
|
658
|
+
* Named animation show event to used.
|
659
|
+
* Must be defined in CSS.
|
660
|
+
*/
|
661
|
+
showMethod: string;
|
662
|
+
|
663
|
+
/**
|
664
|
+
* Duration of the CSS show transition animation
|
665
|
+
*/
|
666
|
+
showDuration: number;
|
667
|
+
|
668
|
+
/**
|
669
|
+
* Named animation hide event to used.
|
670
|
+
* Must be defined in CSS.
|
671
|
+
*/
|
672
|
+
hideMethod: string;
|
673
|
+
|
674
|
+
/**
|
675
|
+
* Duration of the CSS hide transition animation
|
676
|
+
*/
|
677
|
+
hideDuration: number;
|
678
|
+
}
|
679
|
+
|
660
680
|
interface Selectors {
|
661
681
|
/**
|
662
682
|
* @default '.addition'
|
@@ -743,7 +763,7 @@ declare namespace FomanticUI {
|
|
743
763
|
*/
|
744
764
|
clearIcon: string;
|
745
765
|
}
|
746
|
-
|
766
|
+
|
747
767
|
interface ClassNames {
|
748
768
|
/**
|
749
769
|
* @default 'active'
|
@@ -920,7 +940,7 @@ declare namespace FomanticUI {
|
|
920
940
|
*/
|
921
941
|
actionable: string;
|
922
942
|
}
|
923
|
-
|
943
|
+
|
924
944
|
interface Messages {
|
925
945
|
/**
|
926
946
|
* @default 'Add <b>{term}</b>'
|
@@ -952,9 +972,9 @@ declare namespace FomanticUI {
|
|
952
972
|
/**
|
953
973
|
* @default '/[-[\]{}()*+?.,\\^$|#\s]/g'
|
954
974
|
*/
|
955
|
-
escape: string;
|
975
|
+
escape: string;
|
956
976
|
}
|
957
|
-
|
977
|
+
|
958
978
|
interface Metadatas {
|
959
979
|
/**
|
960
980
|
* @default 'defaultText'
|
@@ -964,24 +984,24 @@ declare namespace FomanticUI {
|
|
964
984
|
/**
|
965
985
|
* @default 'defaultValue'
|
966
986
|
*/
|
967
|
-
defaultValue: string;
|
987
|
+
defaultValue: string;
|
968
988
|
|
969
989
|
/**
|
970
990
|
* @default 'placeholderText'
|
971
991
|
*/
|
972
|
-
placeholderText: string;
|
992
|
+
placeholderText: string;
|
973
993
|
|
974
994
|
/**
|
975
995
|
* @default 'text'
|
976
996
|
*/
|
977
|
-
text: string;
|
997
|
+
text: string;
|
978
998
|
|
979
999
|
/**
|
980
1000
|
* @default 'value'
|
981
1001
|
*/
|
982
|
-
value: string;
|
1002
|
+
value: string;
|
983
1003
|
}
|
984
|
-
|
1004
|
+
|
985
1005
|
interface Fields {
|
986
1006
|
/**
|
987
1007
|
* Grouping for api results
|
@@ -993,13 +1013,13 @@ declare namespace FomanticUI {
|
|
993
1013
|
* Grouping for all dropdown values
|
994
1014
|
* @default 'values'
|
995
1015
|
*/
|
996
|
-
values: string;
|
1016
|
+
values: string;
|
997
1017
|
|
998
1018
|
/**
|
999
1019
|
* Whether value should be disabled
|
1000
1020
|
* @default 'disabled'
|
1001
1021
|
*/
|
1002
|
-
disabled: string;
|
1022
|
+
disabled: string;
|
1003
1023
|
|
1004
1024
|
/**
|
1005
1025
|
* Displayed dropdown text
|
@@ -1031,6 +1051,12 @@ declare namespace FomanticUI {
|
|
1031
1051
|
*/
|
1032
1052
|
text: string;
|
1033
1053
|
|
1054
|
+
/**
|
1055
|
+
* custom data atttributes
|
1056
|
+
* @default 'data'
|
1057
|
+
*/
|
1058
|
+
data: string;
|
1059
|
+
|
1034
1060
|
/**
|
1035
1061
|
* Type of dropdown element
|
1036
1062
|
* @default 'type'
|
@@ -1049,6 +1075,12 @@ declare namespace FomanticUI {
|
|
1049
1075
|
*/
|
1050
1076
|
imageClass: string;
|
1051
1077
|
|
1078
|
+
/**
|
1079
|
+
* Optional alt text for image
|
1080
|
+
* @default 'alt'
|
1081
|
+
*/
|
1082
|
+
alt: string;
|
1083
|
+
|
1052
1084
|
/**
|
1053
1085
|
* Optional icon name
|
1054
1086
|
* @default 'icon'
|
@@ -1079,7 +1111,7 @@ declare namespace FomanticUI {
|
|
1079
1111
|
*/
|
1080
1112
|
actionable: string;
|
1081
1113
|
}
|
1082
|
-
|
1114
|
+
|
1083
1115
|
interface Keys {
|
1084
1116
|
/**
|
1085
1117
|
* @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,
|
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 {
|