fomantic-ui 2.9.4-beta.10 → 2.9.4-beta.101
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 +48 -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 +267 -265
- 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 +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 +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 -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 +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 +6445 -4234
- package/dist/semantic.js +572 -189
- 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 +65 -22
- package/src/definitions/behaviors/state.js +3 -1
- package/src/definitions/behaviors/visibility.js +3 -1
- package/src/definitions/collections/form.less +43 -23
- 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 +7 -4
- package/src/definitions/elements/icon.less +35 -28
- package/src/definitions/elements/input.less +21 -13
- 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/elements/button.variables +3 -0
- package/src/themes/default/elements/emoji.variables +172 -23
- package/src/themes/default/elements/flag.variables +4 -4
- 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 +23 -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 +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 +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
@@ -107,7 +107,7 @@ declare namespace FomanticUI {
|
|
107
107
|
*/
|
108
108
|
(behavior: 'destroy'): JQuery;
|
109
109
|
|
110
|
-
<K extends keyof APISettings | JQueryAjaxSettings>(behavior: 'setting', name: K, value?: undefined,
|
110
|
+
<K extends keyof APISettings | JQueryAjaxSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<APISettings, keyof APISettings>> | Partial<Pick<JQueryAjaxSettings, keyof JQueryAjaxSettings>>;
|
111
111
|
<K extends keyof APISettings>(behavior: 'setting', name: K, value: APISettings[K]): JQuery;
|
112
112
|
(behavior: 'setting', value: Partial<Pick<APISettings, keyof APISettings>> | Partial<Pick<JQueryAjaxSettings, keyof JQueryAjaxSettings>>): JQuery;
|
113
113
|
(settings?: Partial<Pick<APISettings, keyof APISettings>> | Partial<Pick<JQueryAjaxSettings, keyof JQueryAjaxSettings>>): JQuery;
|
@@ -125,6 +125,12 @@ declare namespace FomanticUI {
|
|
125
125
|
*/
|
126
126
|
on: string;
|
127
127
|
|
128
|
+
/**
|
129
|
+
* Object containing all templates endpoints
|
130
|
+
* @default {}
|
131
|
+
*/
|
132
|
+
api: {[key: string]: string};
|
133
|
+
|
128
134
|
/**
|
129
135
|
* Can be set to 'local' to cache successful returned AJAX responses when using a JSON API.
|
130
136
|
* This helps avoid server roundtrips when API endpoints will return the same results when accessed repeatedly.
|
@@ -137,7 +143,7 @@ declare namespace FomanticUI {
|
|
137
143
|
* UI state will be applied to this element, defaults to triggering element.
|
138
144
|
* @default false
|
139
145
|
*/
|
140
|
-
stateContext: false | JQuery
|
146
|
+
stateContext: false | string | JQuery<any>;
|
141
147
|
|
142
148
|
/**
|
143
149
|
* Whether to encode parameters with 'encodeURIComponent' before adding into url string.
|
@@ -259,7 +265,7 @@ declare namespace FomanticUI {
|
|
259
265
|
* Method for transmitting request to server.
|
260
266
|
* @default 'get'
|
261
267
|
*/
|
262
|
-
method: 'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'
|
268
|
+
method: Uppercase<'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'> | Lowercase<'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'>;
|
263
269
|
|
264
270
|
/**
|
265
271
|
* Expected data type of response.
|
@@ -30,14 +30,14 @@ declare namespace FomanticUI {
|
|
30
30
|
/**
|
31
31
|
* Get the selected date
|
32
32
|
*/
|
33
|
-
(behavior: 'get date'): Date | string;
|
33
|
+
(behavior: 'get date', format?: string): Date | string;
|
34
34
|
|
35
35
|
/**
|
36
36
|
* Set the selected date.
|
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)
|
@@ -52,7 +52,7 @@ declare namespace FomanticUI {
|
|
52
52
|
/**
|
53
53
|
* Get the start date for range selection
|
54
54
|
*/
|
55
|
-
(behavior: 'get startDate'): Date | string;
|
55
|
+
(behavior: 'get startDate', format?: string): Date | string;
|
56
56
|
|
57
57
|
/**
|
58
58
|
* Set the start date for range selection
|
@@ -62,7 +62,7 @@ declare namespace FomanticUI {
|
|
62
62
|
/**
|
63
63
|
* Get the end date for range selection
|
64
64
|
*/
|
65
|
-
(behavior: 'get endDate'): Date | string;
|
65
|
+
(behavior: 'get endDate', format?: string): Date | string;
|
66
66
|
|
67
67
|
/**
|
68
68
|
* Set the end date for range selection
|
@@ -72,7 +72,7 @@ declare namespace FomanticUI {
|
|
72
72
|
/**
|
73
73
|
* Get the currently focused date
|
74
74
|
*/
|
75
|
-
(behavior: 'get focusDate'): Date | string;
|
75
|
+
(behavior: 'get focusDate', format?: string): Date | string;
|
76
76
|
|
77
77
|
/**
|
78
78
|
* Set the currently focused date
|
@@ -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
|
@@ -486,6 +480,12 @@ declare namespace FomanticUI {
|
|
486
480
|
*/
|
487
481
|
collapseOnActionable: boolean;
|
488
482
|
|
483
|
+
/**
|
484
|
+
* Whether the dropdown should collapse upon clicking the clearable icon.
|
485
|
+
* @default false
|
486
|
+
*/
|
487
|
+
collapseOnClearable: boolean;
|
488
|
+
|
489
489
|
/**
|
490
490
|
* Allows customization of multi-select labels.
|
491
491
|
* @default true
|
@@ -506,7 +506,7 @@ declare namespace FomanticUI {
|
|
506
506
|
* Is called after a dropdown value changes.
|
507
507
|
* Receives the name and value of selection and the active menu element.
|
508
508
|
*/
|
509
|
-
onChange(value
|
509
|
+
onChange(value?: string, text?: string, $choice?: JQuery): void;
|
510
510
|
|
511
511
|
/**
|
512
512
|
* Is called after a dropdown selection is added using a multiple select dropdown, only receives the added value.
|
@@ -582,22 +582,22 @@ declare namespace FomanticUI {
|
|
582
582
|
message: Dropdown.MessageSettings;
|
583
583
|
|
584
584
|
/**
|
585
|
-
*
|
585
|
+
*
|
586
586
|
*/
|
587
587
|
regExp: Dropdown.RegExpSettings;
|
588
588
|
|
589
589
|
/**
|
590
|
-
*
|
590
|
+
*
|
591
591
|
*/
|
592
592
|
metadata: Dropdown.MetadataSettings;
|
593
593
|
|
594
594
|
/**
|
595
|
-
*
|
595
|
+
*
|
596
596
|
*/
|
597
597
|
fields: Dropdown.FieldsSettings;
|
598
598
|
|
599
599
|
/**
|
600
|
-
*
|
600
|
+
*
|
601
601
|
*/
|
602
602
|
keys: Dropdown.KeysSettings;
|
603
603
|
|
@@ -647,6 +647,7 @@ declare namespace FomanticUI {
|
|
647
647
|
}
|
648
648
|
|
649
649
|
namespace Dropdown {
|
650
|
+
type TransitionSettings = Partial<Pick<Settings.Transition, keyof Settings.Transition>>;
|
650
651
|
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
651
652
|
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
652
653
|
type MessageSettings = Partial<Pick<Settings.Messages, keyof Settings.Messages>>;
|
@@ -657,6 +658,31 @@ declare namespace FomanticUI {
|
|
657
658
|
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
658
659
|
|
659
660
|
namespace Settings {
|
661
|
+
interface Transition {
|
662
|
+
|
663
|
+
/**
|
664
|
+
* Named animation show event to used.
|
665
|
+
* Must be defined in CSS.
|
666
|
+
*/
|
667
|
+
showMethod: string;
|
668
|
+
|
669
|
+
/**
|
670
|
+
* Duration of the CSS show transition animation
|
671
|
+
*/
|
672
|
+
showDuration: number;
|
673
|
+
|
674
|
+
/**
|
675
|
+
* Named animation hide event to used.
|
676
|
+
* Must be defined in CSS.
|
677
|
+
*/
|
678
|
+
hideMethod: string;
|
679
|
+
|
680
|
+
/**
|
681
|
+
* Duration of the CSS hide transition animation
|
682
|
+
*/
|
683
|
+
hideDuration: number;
|
684
|
+
}
|
685
|
+
|
660
686
|
interface Selectors {
|
661
687
|
/**
|
662
688
|
* @default '.addition'
|
@@ -743,7 +769,7 @@ declare namespace FomanticUI {
|
|
743
769
|
*/
|
744
770
|
clearIcon: string;
|
745
771
|
}
|
746
|
-
|
772
|
+
|
747
773
|
interface ClassNames {
|
748
774
|
/**
|
749
775
|
* @default 'active'
|
@@ -920,7 +946,7 @@ declare namespace FomanticUI {
|
|
920
946
|
*/
|
921
947
|
actionable: string;
|
922
948
|
}
|
923
|
-
|
949
|
+
|
924
950
|
interface Messages {
|
925
951
|
/**
|
926
952
|
* @default 'Add <b>{term}</b>'
|
@@ -952,9 +978,9 @@ declare namespace FomanticUI {
|
|
952
978
|
/**
|
953
979
|
* @default '/[-[\]{}()*+?.,\\^$|#\s]/g'
|
954
980
|
*/
|
955
|
-
escape: string;
|
981
|
+
escape: string;
|
956
982
|
}
|
957
|
-
|
983
|
+
|
958
984
|
interface Metadatas {
|
959
985
|
/**
|
960
986
|
* @default 'defaultText'
|
@@ -964,24 +990,24 @@ declare namespace FomanticUI {
|
|
964
990
|
/**
|
965
991
|
* @default 'defaultValue'
|
966
992
|
*/
|
967
|
-
defaultValue: string;
|
993
|
+
defaultValue: string;
|
968
994
|
|
969
995
|
/**
|
970
996
|
* @default 'placeholderText'
|
971
997
|
*/
|
972
|
-
placeholderText: string;
|
998
|
+
placeholderText: string;
|
973
999
|
|
974
1000
|
/**
|
975
1001
|
* @default 'text'
|
976
1002
|
*/
|
977
|
-
text: string;
|
1003
|
+
text: string;
|
978
1004
|
|
979
1005
|
/**
|
980
1006
|
* @default 'value'
|
981
1007
|
*/
|
982
|
-
value: string;
|
1008
|
+
value: string;
|
983
1009
|
}
|
984
|
-
|
1010
|
+
|
985
1011
|
interface Fields {
|
986
1012
|
/**
|
987
1013
|
* Grouping for api results
|
@@ -993,13 +1019,13 @@ declare namespace FomanticUI {
|
|
993
1019
|
* Grouping for all dropdown values
|
994
1020
|
* @default 'values'
|
995
1021
|
*/
|
996
|
-
values: string;
|
1022
|
+
values: string;
|
997
1023
|
|
998
1024
|
/**
|
999
1025
|
* Whether value should be disabled
|
1000
1026
|
* @default 'disabled'
|
1001
1027
|
*/
|
1002
|
-
disabled: string;
|
1028
|
+
disabled: string;
|
1003
1029
|
|
1004
1030
|
/**
|
1005
1031
|
* Displayed dropdown text
|
@@ -1031,6 +1057,12 @@ declare namespace FomanticUI {
|
|
1031
1057
|
*/
|
1032
1058
|
text: string;
|
1033
1059
|
|
1060
|
+
/**
|
1061
|
+
* custom data atttributes
|
1062
|
+
* @default 'data'
|
1063
|
+
*/
|
1064
|
+
data: string;
|
1065
|
+
|
1034
1066
|
/**
|
1035
1067
|
* Type of dropdown element
|
1036
1068
|
* @default 'type'
|
@@ -1049,6 +1081,12 @@ declare namespace FomanticUI {
|
|
1049
1081
|
*/
|
1050
1082
|
imageClass: string;
|
1051
1083
|
|
1084
|
+
/**
|
1085
|
+
* Optional alt text for image
|
1086
|
+
* @default 'alt'
|
1087
|
+
*/
|
1088
|
+
alt: string;
|
1089
|
+
|
1052
1090
|
/**
|
1053
1091
|
* Optional icon name
|
1054
1092
|
* @default 'icon'
|
@@ -1079,7 +1117,7 @@ declare namespace FomanticUI {
|
|
1079
1117
|
*/
|
1080
1118
|
actionable: string;
|
1081
1119
|
}
|
1082
|
-
|
1120
|
+
|
1083
1121
|
interface Keys {
|
1084
1122
|
/**
|
1085
1123
|
* @default 8
|