diff --git a/types/fomantic-ui-accordion.d.ts b/types/fomantic-ui-accordion.d.ts index 5db11c9a62..939e32298a 100644 --- a/types/fomantic-ui-accordion.d.ts +++ b/types/fomantic-ui-accordion.d.ts @@ -28,7 +28,7 @@ declare namespace FomanticUI { (behavior: 'toggle', index: number): JQuery; (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: AccordionSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/fomantic-ui-api.d.ts b/types/fomantic-ui-api.d.ts index 37171236ab..1a8ee6de73 100644 --- a/types/fomantic-ui-api.d.ts +++ b/types/fomantic-ui-api.d.ts @@ -107,7 +107,7 @@ declare namespace FomanticUI { */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial> | Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial> | Partial>; (behavior: 'setting', name: K, value: APISettings[K]): JQuery; (behavior: 'setting', value: Partial> | Partial>): JQuery; (settings?: Partial> | Partial>): JQuery; diff --git a/types/fomantic-ui-calendar.d.ts b/types/fomantic-ui-calendar.d.ts index 9eaa351a6e..e486026c36 100644 --- a/types/fomantic-ui-calendar.d.ts +++ b/types/fomantic-ui-calendar.d.ts @@ -522,7 +522,7 @@ declare namespace FomanticUI { interface Formatters { /** - * + * */ yearHeader(date: Date, settings?: CalendarSettings): string; @@ -580,14 +580,14 @@ declare namespace FomanticUI { * @default 'YYYY' */ year: string; - + /** - * + * */ today(settings: CalendarSettings): string; /** - * + * */ cell(cell: string, date: Date, cellOptions: any): any } diff --git a/types/fomantic-ui-dimmer.d.ts b/types/fomantic-ui-dimmer.d.ts index c42a6a5be2..db4b0cb3eb 100644 --- a/types/fomantic-ui-dimmer.d.ts +++ b/types/fomantic-ui-dimmer.d.ts @@ -113,7 +113,7 @@ declare namespace FomanticUI { (behavior: 'set disabled'): JQuery; (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: DimmerSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/fomantic-ui-dropdown.d.ts b/types/fomantic-ui-dropdown.d.ts index 7df6b05451..08cb813d14 100644 --- a/types/fomantic-ui-dropdown.d.ts +++ b/types/fomantic-ui-dropdown.d.ts @@ -210,7 +210,7 @@ declare namespace FomanticUI { (behavior: 'get placeholder text'): string; (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: DropdownSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; @@ -345,7 +345,7 @@ declare namespace FomanticUI { * * @default 'auto' */ - placeholder: 'auto' | String | false; + placeholder: 'auto' | string | false; /** * Whether HTML included in dropdown values should be preserved. @@ -577,22 +577,22 @@ declare namespace FomanticUI { message: Dropdown.MessageSettings; /** - * + * */ regExp: Dropdown.RegExpSettings; /** - * + * */ metadata: Dropdown.MetadataSettings; /** - * + * */ fields: Dropdown.FieldsSettings; /** - * + * */ keys: Dropdown.KeysSettings; @@ -738,7 +738,7 @@ declare namespace FomanticUI { */ clearIcon: string; } - + interface ClassNames { /** * @default 'active' @@ -915,7 +915,7 @@ declare namespace FomanticUI { */ actionable: string; } - + interface Messages { /** * @default 'Add {term}' @@ -947,9 +947,9 @@ declare namespace FomanticUI { /** * @default '/[-[\]{}()*+?.,\\^$|#\s]/g' */ - escape: string; + escape: string; } - + interface Metadatas { /** * @default 'defaultText' @@ -959,24 +959,24 @@ declare namespace FomanticUI { /** * @default 'defaultValue' */ - defaultValue: string; + defaultValue: string; /** * @default 'placeholderText' */ - placeholderText: string; + placeholderText: string; /** * @default 'text' */ - text: string; + text: string; /** * @default 'value' */ - value: string; + value: string; } - + interface Fields { /** * Grouping for api results @@ -988,13 +988,13 @@ declare namespace FomanticUI { * Grouping for all dropdown values * @default 'values' */ - values: string; + values: string; /** * Whether value should be disabled * @default 'disabled' */ - disabled: string; + disabled: string; /** * Displayed dropdown text @@ -1074,7 +1074,7 @@ declare namespace FomanticUI { */ actionable: string; } - + interface Keys { /** * @default 8 diff --git a/types/fomantic-ui-embed.d.ts b/types/fomantic-ui-embed.d.ts index b45d2da128..b2a6553ad2 100644 --- a/types/fomantic-ui-embed.d.ts +++ b/types/fomantic-ui-embed.d.ts @@ -57,7 +57,7 @@ declare namespace FomanticUI { */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: EmbedSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/fomantic-ui-flyout.d.ts b/types/fomantic-ui-flyout.d.ts index b99f15a180..30f5ebc568 100644 --- a/types/fomantic-ui-flyout.d.ts +++ b/types/fomantic-ui-flyout.d.ts @@ -54,7 +54,7 @@ declare namespace FomanticUI { (behavior: keyof Flyout.TemplatesSettings, ...args: any): Partial>; (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: FlyoutSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; @@ -372,7 +372,7 @@ declare namespace FomanticUI { */ deny: string; } - + interface ClassNames { /** * @default 'ui flyout' @@ -489,7 +489,7 @@ declare namespace FomanticUI { */ prompt: string; } - + interface RegExps { /** * @default /(iPad|iPhone|iPod)/g diff --git a/types/fomantic-ui-form.d.ts b/types/fomantic-ui-form.d.ts index c7451552ea..bee78dbe6a 100644 --- a/types/fomantic-ui-form.d.ts +++ b/types/fomantic-ui-form.d.ts @@ -158,7 +158,7 @@ declare namespace FomanticUI { * Destroys instance and removes all events. */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: FormSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/fomantic-ui-modal.d.ts b/types/fomantic-ui-modal.d.ts index bd23805c71..545a23730d 100644 --- a/types/fomantic-ui-modal.d.ts +++ b/types/fomantic-ui-modal.d.ts @@ -68,7 +68,7 @@ declare namespace FomanticUI { (behavior: keyof Modal.TemplatesSettings, ...args: any): Partial>; (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: ModalSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; @@ -244,13 +244,13 @@ declare namespace FomanticUI { closeIcon: boolean; /** - * + * * @default false */ actions: any; /** - * + * * @default true */ preserveHTML: boolean; diff --git a/types/fomantic-ui-nag.d.ts b/types/fomantic-ui-nag.d.ts index 55123a0fda..d7fffdbd08 100644 --- a/types/fomantic-ui-nag.d.ts +++ b/types/fomantic-ui-nag.d.ts @@ -23,7 +23,7 @@ declare namespace FomanticUI { (behavior: 'clear'): JQuery; (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: NagSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; @@ -231,7 +231,7 @@ declare namespace FomanticUI { */ close: string; } - + interface ClassNames { /** * @default 'bottom' @@ -243,7 +243,7 @@ declare namespace FomanticUI { */ fixed: string; } - + interface Errors { /** * @default 'Unsupported storage method' diff --git a/types/fomantic-ui-popup.d.ts b/types/fomantic-ui-popup.d.ts index 0f924a1690..825d972fab 100644 --- a/types/fomantic-ui-popup.d.ts +++ b/types/fomantic-ui-popup.d.ts @@ -67,7 +67,7 @@ declare namespace FomanticUI { */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: PopupSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; @@ -402,7 +402,7 @@ declare namespace FomanticUI { */ popup: string; } - + interface Metadatas { /** * @default 'activator' @@ -439,7 +439,7 @@ declare namespace FomanticUI { */ variation: string; } - + interface ClassNames { /** * @default 'active' diff --git a/types/fomantic-ui-progress.d.ts b/types/fomantic-ui-progress.d.ts index 567cba5f4f..809a1707eb 100644 --- a/types/fomantic-ui-progress.d.ts +++ b/types/fomantic-ui-progress.d.ts @@ -158,7 +158,7 @@ declare namespace FomanticUI { */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: ProgressSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; @@ -355,7 +355,7 @@ declare namespace FomanticUI { */ progress: string; } - + interface ClassNames { /** * @default 'active' @@ -377,7 +377,7 @@ declare namespace FomanticUI { */ warning: string; } - + interface Texts { /** * @default false @@ -414,14 +414,14 @@ declare namespace FomanticUI { */ bars: string[]; } - + interface RegExps { /** * @default /\{\$*[A-z0-9]+\}/g */ variable: RegExp; } - + interface Metadatas { /** * @default 'percent' @@ -438,7 +438,7 @@ declare namespace FomanticUI { */ value: string; } - + interface Errors { /** * @default 'The method you called is not defined.' diff --git a/types/fomantic-ui-rating.d.ts b/types/fomantic-ui-rating.d.ts index ee458ddb4a..953632caaa 100644 --- a/types/fomantic-ui-rating.d.ts +++ b/types/fomantic-ui-rating.d.ts @@ -28,7 +28,7 @@ declare namespace FomanticUI { (behavior: 'clear rating'): JQuery; (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: RatingSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/fomantic-ui-search.d.ts b/types/fomantic-ui-search.d.ts index 7c44066a97..a5f218fc63 100644 --- a/types/fomantic-ui-search.d.ts +++ b/types/fomantic-ui-search.d.ts @@ -107,7 +107,7 @@ declare namespace FomanticUI { */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: SearchSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/fomantic-ui-shape.d.ts b/types/fomantic-ui-shape.d.ts index 93f44a385a..fe136f9efe 100644 --- a/types/fomantic-ui-shape.d.ts +++ b/types/fomantic-ui-shape.d.ts @@ -102,7 +102,7 @@ declare namespace FomanticUI { */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: ShapeSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; @@ -257,7 +257,7 @@ declare namespace FomanticUI { */ active: string; } - + interface Errors { /** * @default 'You tried to switch to a side that does not exist.' diff --git a/types/fomantic-ui-sidebar.d.ts b/types/fomantic-ui-sidebar.d.ts index fd5b8d2382..67b500f2f3 100644 --- a/types/fomantic-ui-sidebar.d.ts +++ b/types/fomantic-ui-sidebar.d.ts @@ -68,7 +68,7 @@ declare namespace FomanticUI { */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: SidebarSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; @@ -281,7 +281,7 @@ declare namespace FomanticUI { */ sidebar: string; } - + interface RegExps { /** * @default /(iPad|iPhone|iPod)/g @@ -298,7 +298,7 @@ declare namespace FomanticUI { */ mobile: RegExp; } - + interface ClassNames { /** * @default 'active' @@ -370,7 +370,7 @@ declare namespace FomanticUI { */ visible: string; } - + interface Errors { /** * @default 'The method you called is not defined.' diff --git a/types/fomantic-ui-slider.d.ts b/types/fomantic-ui-slider.d.ts index d9ebd98d69..1d272c78a4 100644 --- a/types/fomantic-ui-slider.d.ts +++ b/types/fomantic-ui-slider.d.ts @@ -35,7 +35,7 @@ declare namespace FomanticUI { */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: SliderSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/fomantic-ui-sticky.d.ts b/types/fomantic-ui-sticky.d.ts index 0fd5febb0b..f4d39b8d4c 100644 --- a/types/fomantic-ui-sticky.d.ts +++ b/types/fomantic-ui-sticky.d.ts @@ -3,7 +3,7 @@ declare namespace FomanticUI { settings: StickySettings; (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: StickySettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/fomantic-ui-tab.d.ts b/types/fomantic-ui-tab.d.ts index 01a6d94197..5f93af2199 100644 --- a/types/fomantic-ui-tab.d.ts +++ b/types/fomantic-ui-tab.d.ts @@ -48,7 +48,7 @@ declare namespace FomanticUI { */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: TabSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; @@ -278,7 +278,7 @@ declare namespace FomanticUI { */ determineTitle: Function; } - + interface Selectors { /** * @default '.ui.tab' @@ -290,7 +290,7 @@ declare namespace FomanticUI { */ parent: string; } - + interface Metadatas { /** * @default 'tab' @@ -319,7 +319,7 @@ declare namespace FomanticUI { */ active: string; } - + interface Errors { /** * @default 'You attempted to load content without API module' diff --git a/types/fomantic-ui-tests.ts b/types/fomantic-ui-tests.ts index 750cb88448..f5ce699bff 100644 --- a/types/fomantic-ui-tests.ts +++ b/types/fomantic-ui-tests.ts @@ -26,162 +26,163 @@ $().visibility(); // $ExpectType JQuery /* Define API endpoints once globally */ $.fn.api.settings.api = { - 'get followers' : '/followers/{id}?results={count}', - 'create user' : '/create', - 'add user' : '/add/{id}', - 'follow user' : '/follow/{id}', - 'search' : '/search/?query={value}' + 'get followers': '/followers/{id}?results={count}', + 'create user': '/create', + 'add user': '/add/{id}', + 'follow user': '/follow/{id}', + search: '/search/?query={value}', }; $().calendar({ - today: true, - initialDate: null, - endCalendar: $() + today: true, + initialDate: null, + endCalendar: $(), }); // $ExpectType JQuery -$.flyout('alert','hello'); // $ExpectType JQuery -$.flyout('confirm','Are you sure?',function(){}); // $ExpectType JQuery -$.flyout('prompt','Enter Code', function(){}); // $ExpectType JQuery - -$.fn.flyout.settings.templates.greet = function(username) { - return { - title: 'Greetings to ' + username + '!', - content: ''+ username.toUpperCase() + 'is the best!', - closeIcon: true, - class: 'inverted', - classContent: 'centered' - } -} +$.flyout('alert', 'hello'); // $ExpectType JQuery +$.flyout('confirm', 'Are you sure?', function () {}); // $ExpectType JQuery +$.flyout('prompt', 'Enter Code', function () {}); // $ExpectType JQuery + +$.fn.flyout.settings.templates.greet = function (username) { + return { + title: 'Greetings to ' + username + '!', + content: '' + username.toUpperCase() + 'is the best!', + closeIcon: true, + class: 'inverted', + classContent: 'centered', + }; +}; $().form({ - fields: { - field1: { - rules: [ - { - type : 'empty' - } - ] - }, - field2: { - rules: [ - { - type : 'isExactly[dog]', - prompt : '{name} is set to "{value}" that is totally wrong. It should be {ruleValue}' - } - ] - }, - field3: { - rules: [ - { - type : 'isExactly[cat]', - prompt : function(value) { - if(value == 'dog') { - return 'I told you to put cat, not dog!'; - } - return 'That is not cat'; - } - } - ] - }, - color: { - identifier: 'color', - rules: [{ - type: 'regExp', - value: /rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)/i, - }] - }, - yearsPracticed: { - identifier : 'yearsPracticed', - depends : 'isDoctor', - rules : [ - { - type : 'empty', - prompt : 'Please enter the number of years you have been a doctor' - } - ] + fields: { + field1: { + rules: [ + { + type: 'empty', + }, + ], + }, + field2: { + rules: [ + { + type: 'isExactly[dog]', + prompt: '{name} is set to "{value}" that is totally wrong. It should be {ruleValue}', + }, + ], + }, + field3: { + rules: [ + { + type: 'isExactly[cat]', + prompt: function (value) { + if (value == 'dog') { + return 'I told you to put cat, not dog!'; + } + + return 'That is not cat'; + }, + }, + ], + }, + color: { + identifier: 'color', + rules: [{ + type: 'regExp', + value: /rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)/i, + }], + }, + yearsPracticed: { + identifier: 'yearsPracticed', + depends: 'isDoctor', + rules: [ + { + type: 'empty', + prompt: 'Please enter the number of years you have been a doctor', + }, + ], + }, + ccEmail: { + identifier: 'cc-email', + optional: true, + rules: [ + { + type: 'email', + prompt: 'Please enter a valid second e-mail', + }, + ], + }, }, - ccEmail: { - identifier : 'cc-email', - optional : true, - rules: [ - { - type : 'email', - prompt : 'Please enter a valid second e-mail' - } - ] - } - } }); // $ExpectType JQuery $().form({ - fields: { - gender: 'empty', - name: 'empty', - password : ['minLength[6]', 'empty'] - } + fields: { + gender: 'empty', + name: 'empty', + password: ['minLength[6]', 'empty'], + }, }); // $ExpectType JQuery -$.fn.form.settings.rules.date = function(str_date: string) { - return true; +$.fn.form.settings.rules.date = function (str_date: string) { + return true; }; $.modal('alert', { - title: 'Listen to me', - content: 'I love Fomantic-UI', - handler: function() { - $.toast({message:'Great!'}); - } + title: 'Listen to me', + content: 'I love Fomantic-UI', + handler: function () { + $.toast({ message: 'Great!' }); + }, }); -$.fn.modal.settings.templates.greet = function(username: string) { - // do something according to modals settings and/or given parameters - return { - title: 'Greetings to ' + username + '!', - content: ''+ username.toUpperCase() + 'is the best!', - class: 'inverted', - classContent: 'centered', - dimmerSettings: { - variation: 'inverted' - } - } -} +$.fn.modal.settings.templates.greet = function (username: string) { + // do something according to modals settings and/or given parameters + return { + title: 'Greetings to ' + username + '!', + content: '' + username.toUpperCase() + 'is the best!', + class: 'inverted', + classContent: 'centered', + dimmerSettings: { + variation: 'inverted', + }, + }; +}; $.modal('greet', 'mom'); $().nag({ - persist: true + persist: true, }); // $ExpectType JQuery -$().search("display message", "Hello, world !"); // $ExpectType JQuery +$().search('display message', 'Hello, world !'); // $ExpectType JQuery // To change the defaults for all toast at once override the module as follows $.fn.toast.settings.progressUp = true; $.fn.toast.settings.class = 'info'; $.fn.toast.settings.showIcon = true; -$.fn.toast.settings.className.box = 'toast-box'; //removes shadow -$.fn.toast.settings.className.title = 'header'; // smaller font size -$.fn.toast.settings.className.icon = 'icon'; // top position again +$.fn.toast.settings.className.box = 'toast-box'; // removes shadow +$.fn.toast.settings.className.title = 'header'; // smaller font size +$.fn.toast.settings.className.icon = 'icon'; // top position again $.fn.toast.settings.transition.closeEasing = 'easeOutBounce'; // Or apply the old defaults directly to the toast $.toast({ - title: 'LOOK', - message: 'Turned back time to 2.7.0 defaults', - showProgress: 'bottom', - //make it look like 2.7.0 - showIcon: true, - progressUp: true, - class: 'info', - className: { - box:'toast-box', - title:'header', - icon: 'icon' - }, - transition: { - closeEasing: 'easeOutBounce' - } + title: 'LOOK', + message: 'Turned back time to 2.7.0 defaults', + showProgress: 'bottom', + // make it look like 2.7.0 + showIcon: true, + progressUp: true, + class: 'info', + className: { + box: 'toast-box', + title: 'header', + icon: 'icon', + }, + transition: { + closeEasing: 'easeOutBounce', + }, }); -$().transition("shake", "200ms"); -$().transition("horizontal flip", 500, function() { alert('done!'); }); -$().transition("fade up"); \ No newline at end of file +$().transition('shake', '200ms'); +$().transition('horizontal flip', 500, function () { alert('done!'); }); +$().transition('fade up'); diff --git a/types/fomantic-ui-toast.d.ts b/types/fomantic-ui-toast.d.ts index 3730506435..4992dd1e87 100644 --- a/types/fomantic-ui-toast.d.ts +++ b/types/fomantic-ui-toast.d.ts @@ -33,7 +33,7 @@ declare namespace FomanticUI { (behavior: 'get remainingTime'): number; (behavior: 'refresh' | 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: ToastSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/fomantic-ui-transition.d.ts b/types/fomantic-ui-transition.d.ts index d08a8a4dea..014d056519 100644 --- a/types/fomantic-ui-transition.d.ts +++ b/types/fomantic-ui-transition.d.ts @@ -144,7 +144,7 @@ declare namespace FomanticUI { * Destroys instance and removes all events. */ (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: TransitionSettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/fomantic-ui-visibility.d.ts b/types/fomantic-ui-visibility.d.ts index aa8b9db0d1..42259ffa87 100644 --- a/types/fomantic-ui-visibility.d.ts +++ b/types/fomantic-ui-visibility.d.ts @@ -44,7 +44,7 @@ declare namespace FomanticUI { (behavior: 'get screen size'): object; (behavior: 'destroy'): JQuery; - (behavior: 'setting', name: K, value?: undefined, ): Partial>; + (behavior: 'setting', name: K, value?: undefined,): Partial>; (behavior: 'setting', name: K, value: VisibilitySettings[K]): JQuery; (behavior: 'setting', value: Partial>): JQuery; (settings?: Partial>): JQuery; diff --git a/types/index.d.ts b/types/index.d.ts index ba004a5f68..8b57b9d6c3 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -30,34 +30,34 @@ /// interface JQuery { - accordion: FomanticUI.Accordion; - api: FomanticUI.API; - calendar: FomanticUI.Calendar; - checkbox: FomanticUI.Checkbox; - dimmer: FomanticUI.Dimmer; - dropdown: FomanticUI.Dropdown; - embed: FomanticUI.Embed; - flyout: FomanticUI.Flyout; - form: FomanticUI.Form; - modal: FomanticUI.Modal; - nag: FomanticUI.Nag; - popup: FomanticUI.Popup; - progress: FomanticUI.Progress; - rating: FomanticUI.Rating; - search: FomanticUI.Search; - shape: FomanticUI.Shape; - sidebar: FomanticUI.Sidebar; - slider: FomanticUI.Slider; - sticky: FomanticUI.Sticky; - tab: FomanticUI.Tab; - toast: FomanticUI.Toast; + accordion: FomanticUI.Accordion; + api: FomanticUI.API; + calendar: FomanticUI.Calendar; + checkbox: FomanticUI.Checkbox; + dimmer: FomanticUI.Dimmer; + dropdown: FomanticUI.Dropdown; + embed: FomanticUI.Embed; + flyout: FomanticUI.Flyout; + form: FomanticUI.Form; + modal: FomanticUI.Modal; + nag: FomanticUI.Nag; + popup: FomanticUI.Popup; + progress: FomanticUI.Progress; + rating: FomanticUI.Rating; + search: FomanticUI.Search; + shape: FomanticUI.Shape; + sidebar: FomanticUI.Sidebar; + slider: FomanticUI.Slider; + sticky: FomanticUI.Sticky; + tab: FomanticUI.Tab; + toast: FomanticUI.Toast; transition: FomanticUI.Transition; visibility: FomanticUI.Visibility; } interface JQueryStatic { - api: FomanticUI.API; - flyout: FomanticUI.Flyout; - modal: FomanticUI.Modal; - toast: FomanticUI.Toast; + api: FomanticUI.API; + flyout: FomanticUI.Flyout; + modal: FomanticUI.Modal; + toast: FomanticUI.Toast; }