';
@@ -1532,7 +1585,7 @@
if (result[fields.image] !== undefined) {
html += ''
+ '
';
diff --git a/src/definitions/modules/search.less b/src/definitions/modules/search.less
index 54cdf5b35e..9d4f675359 100755
--- a/src/definitions/modules/search.less
+++ b/src/definitions/modules/search.less
@@ -565,8 +565,8 @@
.ui.search {
font-size: @relativeMedium;
}
-& when not (@variationFeedSizes = false) {
- each(@variationFeedSizes, {
+& when not (@variationSearchSizes = false) {
+ each(@variationSearchSizes, {
@s: @{value}SearchSize;
.ui.@{value}.search {
font-size: @@s;
@@ -574,6 +574,13 @@
});
}
+& when (@variationSearchHighlightMatches) {
+ .ui.search > .results mark {
+ background: @highlightMatchesBackground;
+ color: @highlightMatchesColor;
+ }
+}
+
/* --------------
Mobile
--------------- */
diff --git a/src/definitions/modules/shape.js b/src/definitions/modules/shape.js
index 8a93d70d38..0bca06cc82 100644
--- a/src/definitions/modules/shape.js
+++ b/src/definitions/modules/shape.js
@@ -623,7 +623,9 @@
});
}
clearTimeout(module.performance.timer);
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
+ module.performance.timer = setTimeout(function () {
+ module.performance.display();
+ }, 500);
},
display: function () {
var
diff --git a/src/definitions/modules/sidebar.js b/src/definitions/modules/sidebar.js
index dd74a08e93..909b34a3b3 100644
--- a/src/definitions/modules/sidebar.js
+++ b/src/definitions/modules/sidebar.js
@@ -871,7 +871,9 @@
});
}
clearTimeout(module.performance.timer);
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
+ module.performance.timer = setTimeout(function () {
+ module.performance.display();
+ }, 500);
},
display: function () {
var
diff --git a/src/definitions/modules/slider.js b/src/definitions/modules/slider.js
index 114a83f490..fda915221e 100644
--- a/src/definitions/modules/slider.js
+++ b/src/definitions/modules/slider.js
@@ -1267,7 +1267,9 @@
});
}
clearTimeout(module.performance.timer);
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
+ module.performance.timer = setTimeout(function () {
+ module.performance.display();
+ }, 500);
},
display: function () {
var
diff --git a/src/definitions/modules/sticky.js b/src/definitions/modules/sticky.js
index bb2378b037..1318e82b93 100755
--- a/src/definitions/modules/sticky.js
+++ b/src/definitions/modules/sticky.js
@@ -746,7 +746,9 @@
});
}
clearTimeout(module.performance.timer);
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 0);
+ module.performance.timer = setTimeout(function () {
+ module.performance.display();
+ }, 0);
},
display: function () {
var
diff --git a/src/definitions/modules/tab.js b/src/definitions/modules/tab.js
index 13fe416d6f..b2d14966a3 100644
--- a/src/definitions/modules/tab.js
+++ b/src/definitions/modules/tab.js
@@ -788,7 +788,9 @@
});
}
clearTimeout(module.performance.timer);
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
+ module.performance.timer = setTimeout(function () {
+ module.performance.display();
+ }, 500);
},
display: function () {
var
diff --git a/src/definitions/modules/toast.js b/src/definitions/modules/toast.js
index 6577dbdd1e..7dde9bcf6f 100644
--- a/src/definitions/modules/toast.js
+++ b/src/definitions/modules/toast.js
@@ -183,6 +183,7 @@
$toast.append($('
', {
class: className.image + ' ' + settings.classImage,
src: settings.showImage,
+ alt: settings.alt || '',
}));
}
if (settings.title !== '') {
@@ -228,7 +229,7 @@
$toast.find(selector.icon).attr('class', iconClass + ' ' + className.icon);
}
if (settings.showImage) {
- $toast.find(selector.image).attr('src', settings.showImage);
+ $toast.find(selector.image).attr('src', settings.showImage).attr('alt', settings.alt || '');
}
if (settings.title !== '') {
$toast.find(selector.title).html(module.helpers.escape(settings.title, settings.preserveHTML));
@@ -702,7 +703,9 @@
});
}
clearTimeout(module.performance.timer);
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
+ module.performance.timer = setTimeout(function () {
+ module.performance.display();
+ }, 500);
},
display: function () {
var
@@ -839,6 +842,7 @@
actions: false,
preserveHTML: true,
showImage: false,
+ alt: false,
// transition settings
transition: {
diff --git a/src/definitions/modules/transition.js b/src/definitions/modules/transition.js
index 50e9b4cacd..0554e2319a 100644
--- a/src/definitions/modules/transition.js
+++ b/src/definitions/modules/transition.js
@@ -142,7 +142,9 @@
? ($allModules.length - index) * interval
: index * interval;
module.debug('Delaying animation by', delay);
- setTimeout(function () { module.animate(); }, delay);
+ setTimeout(function () {
+ module.animate();
+ }, delay);
},
animate: function (overrideSettings) {
@@ -849,7 +851,9 @@
});
}
clearTimeout(module.performance.timer);
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
+ module.performance.timer = setTimeout(function () {
+ module.performance.display();
+ }, 500);
},
display: function () {
var
diff --git a/src/definitions/views/feed.less b/src/definitions/views/feed.less
index 17f7e4cb6a..38e042b265 100755
--- a/src/definitions/views/feed.less
+++ b/src/definitions/views/feed.less
@@ -459,6 +459,17 @@
color: @invertedLikeActiveColor;
}
}
+
+ /* Action */
+ .ui.inverted.feed > .event > .content .meta a,
+ .ui.inverted.feed > .event > .content .meta > i.icon {
+ color: @invertedMetadataActionColor;
+ }
+ .ui.inverted.feed > .event > .content .meta a:hover,
+ .ui.inverted.feed > .event > .content .meta a:hover i.icon,
+ .ui.inverted.feed > .event > .content .meta > i.icon:hover {
+ color: @invertedMetadataActionHoverColor;
+ }
}
/* --------------
diff --git a/src/themes/basic/assets/fonts/LICENSE.txt b/src/themes/basic/assets/fonts/LICENSE.txt
new file mode 100644
index 0000000000..de3c0b85b4
--- /dev/null
+++ b/src/themes/basic/assets/fonts/LICENSE.txt
@@ -0,0 +1,91 @@
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/src/themes/default/assets/fonts/LICENSE_Lato.txt b/src/themes/default/assets/fonts/LICENSE_Lato.txt
new file mode 100644
index 0000000000..8a7280ecca
--- /dev/null
+++ b/src/themes/default/assets/fonts/LICENSE_Lato.txt
@@ -0,0 +1,94 @@
+Copyright (c) 2010-2015, Łukasz Dziedzic (dziedzic@typoland.com),
+with Reserved Font Name Lato.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/src/themes/default/assets/fonts/LICENSE_icons.txt b/src/themes/default/assets/fonts/LICENSE_icons.txt
new file mode 100644
index 0000000000..39e18e3d30
--- /dev/null
+++ b/src/themes/default/assets/fonts/LICENSE_icons.txt
@@ -0,0 +1,165 @@
+Fonticons, Inc. (https://fontawesome.com)
+
+--------------------------------------------------------------------------------
+
+Font Awesome Free License
+
+Font Awesome Free is free, open source, and GPL friendly. You can use it for
+commercial projects, open source projects, or really almost whatever you want.
+Full Font Awesome Free license: https://fontawesome.com/license/free.
+
+--------------------------------------------------------------------------------
+
+# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
+
+The Font Awesome Free download is licensed under a Creative Commons
+Attribution 4.0 International License and applies to all icons packaged
+as SVG and JS file types.
+
+--------------------------------------------------------------------------------
+
+# Fonts: SIL OFL 1.1 License
+
+In the Font Awesome Free download, the SIL OFL license applies to all icons
+packaged as web and desktop font files.
+
+Copyright (c) 2023 Fonticons, Inc. (https://fontawesome.com)
+with Reserved Font Name: "Font Awesome".
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+SIL OPEN FONT LICENSE
+Version 1.1 - 26 February 2007
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting — in part or in whole — any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
+
+--------------------------------------------------------------------------------
+
+# Code: MIT License (https://opensource.org/licenses/MIT)
+
+In the Font Awesome Free download, the MIT license applies to all non-font and
+non-icon files.
+
+Copyright 2023 Fonticons, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in the
+Software without restriction, including without limitation the rights to use, copy,
+modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+--------------------------------------------------------------------------------
+
+# Attribution
+
+Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
+Awesome Free files already contain embedded comments with sufficient
+attribution, so you shouldn't need to do anything additional when using these
+files normally.
+
+We've kept attribution comments terse, so we ask that you do not actively work
+to remove them from files, especially code. They're a great way for folks to
+learn about Font Awesome.
+
+--------------------------------------------------------------------------------
+
+# Brand Icons
+
+All brand icons are trademarks of their respective owners. The use of these
+trademarks does not indicate endorsement of the trademark holder by Font
+Awesome, nor vice versa. **Please do not use brand logos for any purpose except
+to represent the company, product, or service to which they refer.**
diff --git a/src/themes/default/collections/form.variables b/src/themes/default/collections/form.variables
index 70907c8765..2de6db7d99 100644
--- a/src/themes/default/collections/form.variables
+++ b/src/themes/default/collections/form.variables
@@ -60,6 +60,7 @@
@textAreaBorder: @inputBorder;
@textAreaFontSize: @inputFontSize;
@textAreaTransition: @inputTransition;
+@actionTextareaMinHeight: (@inputVerticalPadding * 2) + @lineHeight;
/* Checkbox */
@checkboxVerticalAlign: top;
diff --git a/src/themes/default/elements/button.variables b/src/themes/default/elements/button.variables
index 6b6377d376..a9a4414abd 100644
--- a/src/themes/default/elements/button.variables
+++ b/src/themes/default/elements/button.variables
@@ -394,6 +394,8 @@
/* Circular */
@circularBorderRadius: 10em;
@circularIconWidth: 1em;
+@circularGroupMargin: 0.25em;
+@circularVerticalGroupMargin: @circularGroupMargin;
/* Spaced */
@spacedMargin: 1em;
diff --git a/src/themes/default/globals/site.variables b/src/themes/default/globals/site.variables
index e017be88fd..c6f4bef107 100755
--- a/src/themes/default/globals/site.variables
+++ b/src/themes/default/globals/site.variables
@@ -1538,3 +1538,6 @@
@inputWarningPlaceholderColor: if(iscolor(@formWarningColor), lighten(@formWarningColor, 40), @formWarningColor);
@inputWarningPlaceholderFocusColor: if(iscolor(@formWarningColor), lighten(@formWarningColor, 30), @formWarningColor);
+
+@defaultHighlightMatchesBackground: revert;
+@defaultHighlightMatchesColor: revert;
diff --git a/src/themes/default/globals/variation.variables b/src/themes/default/globals/variation.variables
index fbc0abe375..6c2da02ddb 100644
--- a/src/themes/default/globals/variation.variables
+++ b/src/themes/default/globals/variation.variables
@@ -82,6 +82,7 @@
@variationHeaderDividing: true;
@variationHeaderBlock: true;
@variationHeaderAttached: true;
+@variationHeaderSeamless: true;
@variationHeaderTags: h1, h2, h3, h4, h5, h6;
@variationHeaderSizes: @variationAllSizes;
@variationHeaderColors: @variationAllColors;
@@ -572,6 +573,7 @@
@variationDropdownPointing: true;
@variationDropdownColumnar: true;
@variationDropdownScrollhint: true;
+@variationDropdownHighlightMatches: false;
@variationDropdownSizes: @variationAllSizes;
/* Embed */
@@ -678,6 +680,7 @@
@variationSearchVeryLong: true;
@variationSearchResizable: true;
@variationSearchScrolling: true;
+@variationSearchHighlightMatches: false;
@variationSearchSizes: @variationAllSizes;
/* Shape */
diff --git a/src/themes/default/modules/dropdown.variables b/src/themes/default/modules/dropdown.variables
index 139d6d645a..c48e12f4df 100755
--- a/src/themes/default/modules/dropdown.variables
+++ b/src/themes/default/modules/dropdown.variables
@@ -480,3 +480,6 @@
/* Resizable */
@resizableDirection: vertical;
+
+@highlightMatchesBackground: @defaultHighlightMatchesBackground;
+@highlightMatchesColor: @defaultHighlightMatchesColor;
diff --git a/src/themes/default/modules/search.variables b/src/themes/default/modules/search.variables
index 7e35550134..f471d659c5 100644
--- a/src/themes/default/modules/search.variables
+++ b/src/themes/default/modules/search.variables
@@ -177,3 +177,6 @@
/* Resizable */
@resizableDirection: vertical;
+
+@highlightMatchesBackground: @defaultHighlightMatchesBackground;
+@highlightMatchesColor: @defaultHighlightMatchesColor;
diff --git a/src/themes/default/views/feed.variables b/src/themes/default/views/feed.variables
index c316a5ec46..bb3613061d 100644
--- a/src/themes/default/views/feed.variables
+++ b/src/themes/default/views/feed.variables
@@ -190,6 +190,9 @@
@invertedLikeHoverColor: @invertedSelectedTextColor;
@invertedLikeActiveColor: @invertedLikeColor;
+@invertedMetadataActionColor: @invertedLightTextColor;
+@invertedMetadataActionHoverColor: @invertedSelectedTextColor;
+
@invertedConnectedBorderColor: @whiteBorderColor;
@invertedDividedBorderColor: @whiteBorderColor;
@invertedTextLabelColor: @white;
diff --git a/src/themes/github/assets/fonts/LICENSE.txt b/src/themes/github/assets/fonts/LICENSE.txt
new file mode 100644
index 0000000000..79350f0e46
--- /dev/null
+++ b/src/themes/github/assets/fonts/LICENSE.txt
@@ -0,0 +1,94 @@
+(c) 2012-2015 GitHub
+with Reserved Font Name Opticons.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/src/themes/material/assets/fonts/LICENSE.txt b/src/themes/material/assets/fonts/LICENSE.txt
new file mode 100644
index 0000000000..d645695673
--- /dev/null
+++ b/src/themes/material/assets/fonts/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
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 0e223f7832..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;
@@ -125,6 +125,12 @@ declare namespace FomanticUI {
*/
on: string;
+ /**
+ * Object containing all templates endpoints
+ * @default {}
+ */
+ api: {[key: string]: string};
+
/**
* Can be set to 'local' to cache successful returned AJAX responses when using a JSON API.
* This helps avoid server roundtrips when API endpoints will return the same results when accessed repeatedly.
@@ -137,7 +143,7 @@ declare namespace FomanticUI {
* UI state will be applied to this element, defaults to triggering element.
* @default false
*/
- stateContext: false | JQuery;
+ stateContext: false | string | JQuery;
/**
* Whether to encode parameters with 'encodeURIComponent' before adding into url string.
@@ -259,7 +265,7 @@ declare namespace FomanticUI {
* Method for transmitting request to server.
* @default 'get'
*/
- method: 'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch';
+ method: Uppercase<'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'> | Lowercase<'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'>;
/**
* Expected data type of response.
diff --git a/types/fomantic-ui-calendar.d.ts b/types/fomantic-ui-calendar.d.ts
index 3f7ff1ae39..e486026c36 100644
--- a/types/fomantic-ui-calendar.d.ts
+++ b/types/fomantic-ui-calendar.d.ts
@@ -37,7 +37,7 @@ declare namespace FomanticUI {
* Pass false to updateInput to disable updating the input.
* Pass false to fireChange to disable the onBeforeChange and onChange callbacks for this change
*/
- (behavior: 'set date', date: string, updateInput: boolean, fireChange: boolean): JQuery;
+ (behavior: 'set date', date: Date | string | null, updateInput?: boolean, fireChange?: boolean): JQuery;
/**
* Get the current selection mode (year, month, day, hour, minute)
@@ -82,12 +82,12 @@ declare namespace FomanticUI {
/**
* Set the minimal selectable date
*/
- (behavior: 'set minDate', date: Date | string): JQuery;
+ (behavior: 'set minDate', date: Date | string | null): JQuery;
/**
* Set the maximal selectable date
*/
- (behavior: 'set maxDate', date: Date | string): JQuery;
+ (behavior: 'set maxDate', date: Date | string | null): JQuery;
(behavior: 'destroy'): JQuery;
@@ -214,7 +214,7 @@ declare namespace FomanticUI {
*
* @default null
*/
- initialDate: null | Date;
+ initialDate: Date | string | null;
/**
* Display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day').
@@ -319,12 +319,14 @@ declare namespace FomanticUI {
*
* @default false
*/
- selectAdjacentDays: 5 | 10 | 15 | 20 | 30;
+ selectAdjacentDays: boolean;
popupOptions: Calendar.PopupSettings;
text: Calendar.TextSettings;
+ formatter: Calendar.FormatterSettings;
+
// endregion
// region Callbacks
@@ -333,12 +335,12 @@ declare namespace FomanticUI {
* Is called before a calendar date changes. 'return false;' will cancel the change.
* @since 2.8.0
*/
- onBeforeChange(this: JQuery): void;
+ onBeforeChange(this: JQuery, date?: Date, text?: string, mode?: string): void;
/**
* Is called after a calendar date has changed.
*/
- onChange(this: JQuery): void;
+ onChange(this: JQuery, date?: Date): void;
/**
* Is called before a calendar is shown. 'return false;' will prevent the calendar to be shown.
@@ -364,7 +366,7 @@ declare namespace FomanticUI {
* Is called when a cell of the calendar is selected providing its value and current mode.
* 'return false;' will prevent the selection.
*/
- onSelect(this: JQuery, date: Date, mode: string): void;
+ onSelect(this: JQuery, date?: Date, mode?: string): void;
// endregion
@@ -436,6 +438,7 @@ declare namespace FomanticUI {
namespace Calendar {
type PopupSettings = Partial>;
type TextSettings = Partial>;
+ type FormatterSettings = Partial>;
type SelectorSettings = Partial>;
type ClassNameSettings = Partial>;
type RegExpSettings = Partial>;
@@ -471,6 +474,16 @@ declare namespace FomanticUI {
*/
days: string[];
+ /**
+ * @default ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
+ */
+ dayNamesShort: string[];
+
+ /**
+ * @default ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
+ */
+ dayNames: string[];
+
/**
* @default ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
*/
@@ -507,6 +520,78 @@ declare namespace FomanticUI {
weekNo: string;
}
+ interface Formatters {
+ /**
+ *
+ */
+ yearHeader(date: Date, settings?: CalendarSettings): string;
+
+ /**
+ * @default 'YYYY'
+ */
+ monthHeader: string;
+
+ /**
+ * @default 'MMMM YYYY'
+ */
+ dayHeader: string;
+
+ /**
+ * @default 'MMMM D, YYYY'
+ */
+ hourHeader: string;
+
+ /**
+ * @default 'MMMM D, YYYY'
+ */
+ minuteHeader: string;
+
+ /**
+ * @default 'MMMM D, YYYY'
+ */
+ dayColumnHeader(day: number, settings: CalendarSettings): string;
+
+ /**
+ * @default 'MMMM D, YYYY h:mm A'
+ */
+ datetime: string;
+
+ /**
+ * @default 'MMMM D, YYYY'
+ */
+ date: string;
+
+ /**
+ * @default 'h:mm A'
+ */
+ time: string;
+
+ /**
+ * @default 'h:mm A'
+ */
+ cellTime: string;
+
+ /**
+ * @default 'MMMM YYYY'
+ */
+ month: string;
+
+ /**
+ * @default 'YYYY'
+ */
+ year: string;
+
+ /**
+ *
+ */
+ today(settings: CalendarSettings): string;
+
+ /**
+ *
+ */
+ cell(cell: string, date: Date, cellOptions: any): any
+ }
+
interface Selectors {
/**
* @default '.ui.popup'
diff --git a/types/fomantic-ui-checkbox.d.ts b/types/fomantic-ui-checkbox.d.ts
index 2bd2f7665e..6eac6a3618 100644
--- a/types/fomantic-ui-checkbox.d.ts
+++ b/types/fomantic-ui-checkbox.d.ts
@@ -32,6 +32,11 @@ declare namespace FomanticUI {
*/
(behavior: 'enable'): JQuery;
+ /**
+ * Disable interaction with a checkbox.
+ */
+ (behavior: 'disable'): JQuery;
+
/**
* Set a checkbox state to checked without callbacks.
*/
@@ -82,6 +87,11 @@ declare namespace FomanticUI {
*/
(behavior: 'is unchecked'): boolean;
+ /**
+ * Returns whether element is not determinate.
+ */
+ (behavior: 'is indeterminate'): boolean;
+
/**
* Returns whether element is able to be changed.
*/
@@ -175,22 +185,22 @@ declare namespace FomanticUI {
/**
* Callback before a checkbox is checked. Can cancel change by returning 'false'.
*/
- beforeChecked(this: JQuery): void | false;
+ beforeChecked(this: JQuery): void | Promise | boolean;
/**
* Callback before a checkbox is set to indeterminate. Can cancel change by returning 'false'.
*/
- beforeIndeterminate(this: JQuery): void | false;
+ beforeIndeterminate(this: JQuery): void | Promise | false;
/**
* Callback before a checkbox is set to determinate. Can cancel change by returning 'false'.
*/
- beforeDeterminate(this: JQuery): void | false;
+ beforeDeterminate(this: JQuery): void | Promise | false;
/**
* Callback before a checkbox is unchecked. Can cancel change by returning 'false'.
*/
- beforeUnchecked(this: JQuery): void | false;
+ beforeUnchecked(this: JQuery): void | Promise | false;
/**
* Callback after a checkbox is enabled.
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 9fad69e068..11826ff5db 100644
--- a/types/fomantic-ui-dropdown.d.ts
+++ b/types/fomantic-ui-dropdown.d.ts
@@ -6,7 +6,7 @@ declare namespace FomanticUI {
* Recreates dropdown menu from passed values.
* values should be an object with the following structure: { values: [ {value, text, name} ] }.
*/
- (behavior: 'setup menu', values: object): void;
+ (behavior: 'setup menu', values: object): JQuery;
/**
* Changes dropdown to use new values.
@@ -17,7 +17,7 @@ declare namespace FomanticUI {
/**
* Refreshes all cached selectors and data
*/
- (behavior: 'refresh'): void;
+ (behavior: 'refresh'): JQuery;
/**
* Toggles current visibility of dropdown
@@ -29,20 +29,20 @@ declare namespace FomanticUI {
* If a function is provided to callback, it's called after the dropdown-menu is shown.
* Set preventFocus to true if you don't want the dropdown field to focus after the menu is shown
*/
- (behavior: 'show', callback: Function, preventFocus: boolean): void;
+ (behavior: 'show', callback?: Function, preventFocus?: boolean): void;
/**
* Hides dropdown.
* If a function is provided to callback, it's called after the dropdown-menu is hidden.
* Set preventBlur to true if you don't want the dropdown field to blur after the menu is hidden
*/
- (behavior: 'hide', callback:Function, preventBlur: boolean): void;
+ (behavior: 'hide', callback?: Function, preventBlur?: boolean): void;
/**
* Clears dropdown of selection.
* Set preventChangeTrigger to true to omit the change event (default: false).
*/
- (behavior: 'clear', preventChangeTrigger: boolean): void;
+ (behavior: 'clear', preventChangeTrigger?: boolean): JQuery;
/**
* Hides all other dropdowns that is not current dropdown
@@ -53,7 +53,7 @@ declare namespace FomanticUI {
* Restores dropdown text and value to its value on page load.
* Set preventChangeTrigger to true to omit the change event (default: false).
*/
- (behavior: 'restore defaults', preventChangeTrigger: boolean): void;
+ (behavior: 'restore defaults', preventChangeTrigger?: boolean): void;
/**
* Restores dropdown text to its value on page load
@@ -79,33 +79,28 @@ declare namespace FomanticUI {
* Sets value as selected.
* Set preventChangeTrigger to true to omit the change event (default: false).
*/
- (behavior: 'set selected', value: string, preventChangeTrigger: boolean): void;
+ (behavior: 'set selected', value: string | string[], preventChangeTrigger?: boolean, keepSearchTerm?: boolean): JQuery;
/**
* Remove value from selected
*/
(behavior: 'remove selected', value: string): void;
- /**
- * Adds a group of values as selected
- */
- (behavior: 'set selected', values: string[]): void;
-
/**
* Sets selected values to exactly specified values, removing current selection
*/
- (behavior: 'set exactly', values: string[]): void;
+ (behavior: 'set exactly', values: string[]): JQuery;
/**
* Sets dropdown text to a value
*/
- (behavior: 'text', text: string): void;
+ (behavior: 'set text', text: string): JQuery;
/**
* Sets dropdown input to value (does not update display state).
* Set preventChangeTrigger to true to omit the change event (default: false).
*/
- (behavior: 'set value', value: string, preventChangeTrigger: boolean): void;
+ (behavior: 'set value', value: string, preventChangeTrigger?: boolean): JQuery;
/**
* Returns current dropdown text
@@ -215,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;
@@ -265,7 +260,7 @@ declare namespace FomanticUI {
* @see {@link https://fomantic-ui.com/behaviors/api.html#/settings}
* @default false
*/
- apiSettings: false | APISettings | JQueryAjaxSettings;
+ apiSettings: false | Partial> | Partial>;
/**
* Whether dropdown should select new option when using keyboard shortcuts.
@@ -350,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.
@@ -390,6 +385,12 @@ declare namespace FomanticUI {
*/
ignoreSearchCase: boolean;
+ /**
+ * Whether search result should highlight matching strings
+ * @default false
+ */
+ highlightMatches: boolean;
+
/**
* If disabled user additions will appear in the dropdown's menu using a specially formatted selection item formatted by 'templates.addition'.
* @default true
@@ -506,7 +507,7 @@ declare namespace FomanticUI {
* Is called after a dropdown value changes.
* Receives the name and value of selection and the active menu element.
*/
- onChange(value: string, text: string, $choice: JQuery): void;
+ onChange(value?: string, text?: string, $choice?: JQuery): void;
/**
* Is called after a dropdown selection is added using a multiple select dropdown, only receives the added value.
@@ -582,22 +583,22 @@ declare namespace FomanticUI {
message: Dropdown.MessageSettings;
/**
- *
+ *
*/
regExp: Dropdown.RegExpSettings;
/**
- *
+ *
*/
metadata: Dropdown.MetadataSettings;
/**
- *
+ *
*/
fields: Dropdown.FieldsSettings;
/**
- *
+ *
*/
keys: Dropdown.KeysSettings;
@@ -743,7 +744,7 @@ declare namespace FomanticUI {
*/
clearIcon: string;
}
-
+
interface ClassNames {
/**
* @default 'active'
@@ -920,7 +921,7 @@ declare namespace FomanticUI {
*/
actionable: string;
}
-
+
interface Messages {
/**
* @default 'Add {term}'
@@ -952,9 +953,9 @@ declare namespace FomanticUI {
/**
* @default '/[-[\]{}()*+?.,\\^$|#\s]/g'
*/
- escape: string;
+ escape: string;
}
-
+
interface Metadatas {
/**
* @default 'defaultText'
@@ -964,24 +965,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
@@ -993,13 +994,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
@@ -1031,6 +1032,12 @@ declare namespace FomanticUI {
*/
text: string;
+ /**
+ * custom data atttributes
+ * @default 'data'
+ */
+ data: string;
+
/**
* Type of dropdown element
* @default 'type'
@@ -1049,6 +1056,12 @@ declare namespace FomanticUI {
*/
imageClass: string;
+ /**
+ * Optional alt text for image
+ * @default 'alt'
+ */
+ alt: string;
+
/**
* Optional icon name
* @default 'icon'
@@ -1079,7 +1092,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..642ccae4e5 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;
@@ -93,6 +93,18 @@ declare namespace FomanticUI {
*/
id: false | string;
+ /**
+ * Specifies a path for a placeholder image.
+ * @default false
+ */
+ placeholder: false | string;
+
+ /**
+ * Specifies an alt text for a given placeholder image.
+ * @default false
+ */
+ alt: false | string;
+
/**
* Specify an object containing key/value pairs to add to the iframes GET parameters.
* @default false
@@ -270,6 +282,11 @@ declare namespace FomanticUI {
*/
placeholder: string;
+ /**
+ * @default 'alt'
+ */
+ alt: string;
+
/**
* @default 'source'
*/
@@ -307,7 +324,7 @@ declare namespace FomanticUI {
/**
* @default function
*/
- placeholder(image: string, icon: string): string;
+ placeholder(image: string, icon: string, alt: string | false | undefined): string;
}
interface Errors {
diff --git a/types/fomantic-ui-flyout.d.ts b/types/fomantic-ui-flyout.d.ts
index fae2110b74..30f5ebc568 100644
--- a/types/fomantic-ui-flyout.d.ts
+++ b/types/fomantic-ui-flyout.d.ts
@@ -48,8 +48,13 @@ declare namespace FomanticUI {
*/
(behavior: 'get settings'): FlyoutSettings;
+ /**
+ * Templates handling
+ */
+ (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;
@@ -145,43 +150,43 @@ declare namespace FomanticUI {
* Content of the flyout header.
* @default ''
*/
- title: boolean;
+ title: string;
/**
* Content of the flyout content.
* @default ''
*/
- content: boolean;
+ content: string;
/**
* Can hold a string to be added to the flyout class to control its appearance.
* @default ''
*/
- class: boolean;
+ class: string;
/**
* Can hold a string to be added to the title class to control its appearance.
* @default ''
*/
- classTitle: boolean;
+ classTitle: string;
/**
* Can hold a string to be added to the content class to control its appearance.
* @default ''
*/
- classContent: boolean;
+ classContent: string;
/**
* Can hold a string to be added to the actions class to control its appearance.
* @default ''
*/
- classActions: boolean;
+ classActions: string;
/**
* Can hold a string to be added to the actions class to control its appearance.
* @default false
*/
- closeIcon: boolean;
+ closeIcon: boolean | string;
/**
* An array of objects. Each object defines an action with properties `text`, `class`, `icon` and `click`.
@@ -261,6 +266,8 @@ declare namespace FomanticUI {
// region Config Template Settings
+ templates: Flyout.TemplatesSettings;
+
// endregion
// region Debug Settings
@@ -311,6 +318,7 @@ declare namespace FomanticUI {
type ClassNameSettings = Partial>;
type RegExpSettings = Partial>;
type ErrorSettings = Partial>;
+ type TemplatesSettings = Partial> & {[key: string]: (...args: any) => Partial>};
namespace Settings {
interface Selectors {
@@ -364,7 +372,7 @@ declare namespace FomanticUI {
*/
deny: string;
}
-
+
interface ClassNames {
/**
* @default 'ui flyout'
@@ -481,7 +489,7 @@ declare namespace FomanticUI {
*/
prompt: string;
}
-
+
interface RegExps {
/**
* @default /(iPad|iPhone|iPod)/g
@@ -520,6 +528,12 @@ declare namespace FomanticUI {
*/
notFound: string;
}
+
+ interface Templates {
+ alert(): Partial>;
+ confirm(): Partial>;
+ prompt(): Partial>;
+ }
}
}
}
diff --git a/types/fomantic-ui-form.d.ts b/types/fomantic-ui-form.d.ts
index 6d2048fcca..ffb4425fe0 100644
--- a/types/fomantic-ui-form.d.ts
+++ b/types/fomantic-ui-form.d.ts
@@ -15,7 +15,12 @@ declare namespace FomanticUI {
/**
* Adds rule to existing rules for field, also aliased as 'add field'.
*/
- (behavior: 'add rule', field: string, rules: object[]): void;
+ (behavior: 'add rule', field: string, rules: string | string[] | FormField[]): void;
+
+ /**
+ * Adds field object to existing fields.
+ */
+ (behavior: 'add field', name: string, rules: string | string[] | FormRule[]): void;
/**
* Adds fields object to existing fields.
@@ -25,13 +30,18 @@ declare namespace FomanticUI {
/**
* Removes specific rule from field leaving other rules.
*/
- (behavior: 'remove rule', field: string, rules: object[]): void;
+ (behavior: 'remove rule', field: string, rules?: object[]): void;
/**
* Remove all validation for a field.
*/
(behavior: 'remove field', field: string): void;
+ /**
+ * Remove all validation for an array of fields.
+ */
+ (behavior: 'remove fields', field: string[]): void;
+
/**
* Returns 'true'/'false' whether a field passes its validation rules.
* If you add 'true' as the second parameter, any failed rule will update the UI.
@@ -41,7 +51,7 @@ declare namespace FomanticUI {
/**
* Validates form, updates UI, and calls 'onSuccess' or 'onFailure'.
*/
- (behavior: 'validate form'): void;
+ (behavior: 'validate form'): boolean;
/**
* Validates field, updates UI, and calls 'onSuccess' or 'onFailure'.
@@ -51,7 +61,7 @@ declare namespace FomanticUI {
/**
* Returns element with matching name, id, or data-validate metadata to identifier.
*/
- (behavior: 'get field', identifier: string): string;
+ (behavior: 'get field', identifier: string, strict?: boolean, ignoreMissing?: boolean): string;
/**
* Returns value of element with id.
@@ -62,7 +72,7 @@ declare namespace FomanticUI {
* Returns object of element values that match array of identifiers.
* If no IDS are passed will return all fields.
*/
- (behavior: 'get values', identifiers?: string[]): object;
+ (behavior: 'get values', identifiers?: string[]): Record;
/**
* Sets value of element with id.
@@ -82,7 +92,7 @@ declare namespace FomanticUI {
/**
* Returns whether a field exists.
*/
- (behavior: 'has field', identifier: string): boolean;
+ (behavior: 'has field', identifier: string, ignoreMissing?: boolean): boolean;
/**
* Manually add errors to form, given an array errors.
@@ -97,23 +107,33 @@ declare namespace FomanticUI {
/**
* Adds a custom user prompt for a given element with identifier.
*/
- (behavior: 'add prompt', identifier: string, errors: object[]): void;
+ (behavior: 'add prompt', identifier: string, errors: string | object[]): void;
/**
* Empty all fields and remove possible errors.
*/
- (behavior: 'clear'): void;
+ (behavior: 'clear'): JQuery;
/**
* Set all fields to their initial value and remove possible errors.
*/
- (behavior: 'reset'): void;
+ (behavior: 'reset'): JQuery;
/**
* Set fields actual values as default values.
*/
(behavior: 'set defaults'): void;
+ /**
+ * Returns 'true'/'false' whether a form is dirty.
+ */
+ (behavior: 'is dirty'): boolean;
+
+ /**
+ * Returns 'true'/'false' whether a form is clean.
+ */
+ (behavior: 'is clean'): boolean;
+
/**
* Return elements which have been modified since form state was changed to 'dirty'.
*/
@@ -122,10 +142,10 @@ declare namespace FomanticUI {
/**
* Set the state of the form to 'clean' and set new values as default.
*/
- (behavior: 'set as clean'): void;
+ (behavior: 'set as clean'): JQuery;
/**
- * Automatically adds the "empty" rule or automatically checks a checkbox for all fields with classname or attribute 'required'.
+ * Automatically adds the "notEmpty" rule or automatically checks a checkbox for all fields with classname or attribute 'required'.
*/
(behavior: 'set auto check'): void;
@@ -138,18 +158,39 @@ 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;
}
+ type FormFields = Record;
+
+ interface FormRule {
+ type: string;
+ prompt?: string | ((value: string) => void);
+ value?: string | RegExp;
+ }
+
+ interface FormField {
+ identifier?: string;
+ depends?: string;
+ optional?: boolean;
+ rules: FormRule[];
+ }
+
/**
* @see {@link https://fomantic-ui.com/behaviors/form.html#/settings}
*/
interface FormSettings {
// region Form Settings
+ /**
+ * Adds keyboard shortcuts for enter and escape keys to submit form and blur fields respectively.
+ * @default false
+ */
+ fields: false | FormFields;
+
/**
* Adds keyboard shortcuts for enter and escape keys to submit form and blur fields respectively.
* @default true
@@ -215,7 +256,7 @@ declare namespace FomanticUI {
preventLeaving: boolean;
/**
- * Whether fields with classname or attribute 'required' should automatically add the "empty" rule or automatically checks checkbox fields.
+ * Whether fields with classname or attribute 'required' should automatically add the "notEmpty" rule or automatically checks checkbox fields.
* @default false
*/
autoCheckRequired: boolean;
@@ -227,11 +268,17 @@ declare namespace FomanticUI {
errorFocus: boolean | string;
/**
- *
+ *
* @default 0
*/
errorLimit: number;
+ /**
+ *
+ * @default false
+ */
+ noNativeValidation: boolean;
+
// endregion
// region Form Prompts
@@ -248,6 +295,12 @@ declare namespace FomanticUI {
// endregion
+ // region Formatters
+
+ rules: Form.RulesSettings;
+
+ // endregion
+
// region Callbacks
/**
@@ -258,17 +311,17 @@ declare namespace FomanticUI {
/**
* Callback on each invalid field.
*/
- onInvalid(this: JQuery): void;
+ onInvalid(this: JQuery, fieldErrors: string | string[]): void;
/**
* Callback if a form is all valid.
*/
- onSuccess(this: JQuery, event: Event, fields: object[]): void;
+ onSuccess(this: JQuery, event: Event, fields: {[key: string]: any}): void;
/**
* Callback if any form field is invalid.
*/
- onFailure(this: JQuery, formErrors: object[], fields: object[]): void;
+ onFailure(this: JQuery, formErrors: {[key: string]: any}, fields: {[key: string]: any}): void;
/**
* Callback if form state is modified to 'dirty'.
@@ -349,8 +402,9 @@ declare namespace FomanticUI {
namespace Form {
type TextSettings = Partial>;
- type PromptSettings = Partial>;
+ type PromptSettings = Partial> & {[key: string]: string | undefined};
type FormatterSettings = Partial>;
+ type RulesSettings = Partial> & {[key: string]: (value?: any, identifier?: string, module?: any) => boolean};
type SelectorSettings = Partial>;
type MetadataSettings = Partial>;
type ClassNameSettings = Partial>;
@@ -373,13 +427,34 @@ declare namespace FomanticUI {
*/
leavingMessage: string;
}
-
+
interface Prompts {
+ /**
+ * @default '{name} must be in a range from {min} to {max}'
+ */
+ range: string;
+
+ /**
+ * @default '{name} must have a maximum value of {ruleValue}'
+ */
+ maxValue: string;
+
+ /**
+ * @default '{name} must have a minimum value of {ruleValue}'
+ */
+ minValue: string;
+
/**
* @default '{name} must have a value'
+ * @deprecated Use notEmpty instead
*/
empty: string;
+ /**
+ * @default '{name} must have a value'
+ */
+ notEmpty: string;
+
/**
* @default '{name} must be checked'
*/
@@ -500,7 +575,7 @@ declare namespace FomanticUI {
*/
maxCount: string;
}
-
+
interface Formatters {
date(date: string): string;
datetime(date: string): string;
@@ -509,6 +584,39 @@ declare namespace FomanticUI {
year(date: string): string;
}
+ interface Rules {
+ empty(value: unknown): boolean;
+ notEmpty(value: unknown): boolean;
+ checked(): boolean;
+ email(value: unknown): boolean;
+ url(value: unknown): boolean;
+ regExp(value: unknown, regExp: RegExp): boolean;
+ minValue(value: unknown, range: string): boolean;
+ maxValue(value: unknown, range: string): boolean;
+ integer(value: unknown, range: string): boolean;
+ range(value: unknown, range: string, regExp: RegExp, testLength: boolean): boolean;
+ decimal(value: unknown, range: string): boolean;
+ number(value: unknown, range: string): boolean;
+ is(value: unknown, text: string): boolean;
+ isExactly(value: unknown, text: string): boolean;
+ not(value: unknown, notValue: unknown): boolean;
+ notExactly(value: unknown, notValue: unknown): boolean;
+ contains(value: unknown, text: string): boolean;
+ containsExactly(value: unknown, text: string): boolean;
+ doesntContain(value: unknown, text: string): boolean;
+ doesntContainExactly(value: unknown, text: string): boolean;
+ minLength(value: unknown, minLength: number): boolean;
+ exactLength(value: unknown, requiredLength: number): boolean;
+ maxLength(value: unknown, maxLength: number): boolean;
+ size(value: unknown, range: string): boolean;
+ match(value: unknown, identifier: string, module: unknown): boolean;
+ different(value: unknown, identifier: string, module: unknown): boolean;
+ creditCard(cardNumber: unknown, cardTypes: string): boolean;
+ minCount(value: unknown, minCount: number): boolean;
+ exactCount(value: unknown, exactCount: number): boolean;
+ maxCount(value: unknown, maxCount: number): boolean;
+ }
+
interface Selectors {
/**
* @default 'input[type="checkbox"], input[type="radio"]'
diff --git a/types/fomantic-ui-modal.d.ts b/types/fomantic-ui-modal.d.ts
index 9f900234db..545a23730d 100644
--- a/types/fomantic-ui-modal.d.ts
+++ b/types/fomantic-ui-modal.d.ts
@@ -5,12 +5,12 @@ declare namespace FomanticUI {
/**
* Shows the modal.
*/
- (behavior: 'show'): JQuery;
+ (behavior: 'show', callback?: Function): JQuery;
/**
* Hides the modal.
*/
- (behavior: 'hide'): JQuery;
+ (behavior: 'hide', callback?: Function): JQuery;
/**
* Toggles the modal.
@@ -62,8 +62,13 @@ declare namespace FomanticUI {
*/
(behavior: 'set active'): JQuery;
+ /**
+ * Templates handling
+ */
+ (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;
@@ -166,13 +171,13 @@ declare namespace FomanticUI {
/**
* Custom settings to extend UI dimmer.
*/
- dimmerSettings: DimmerSettings;
+ dimmerSettings: Partial>;
/**
* Custom settings to extend UI dimmer.
* @default 'scale'
*/
- transition: string | TransitionSettings;
+ transition: string | Partial>;
/**
* Duration of animation.
@@ -194,6 +199,62 @@ declare namespace FomanticUI {
*/
scrollbarWidth: number;
+ // dynamic content
+
+ /**
+ * Title of dynamicly created modal.
+ * @default ''
+ */
+ title: string;
+
+ /**
+ * HTML content of dynamicly created modal.
+ * @default ''
+ */
+ content: string;
+
+ /**
+ * CSS classname(s) of dynamicly created modal.
+ * @default ''
+ */
+ class: string;
+
+ /**
+ * CSS classname(s) of dynamicly created modal's title.
+ * @default ''
+ */
+ classTitle: string;
+
+ /**
+ * CSS classname(s) of dynamicly created modal's content.
+ * @default ''
+ */
+ classContent: string;
+
+ /**
+ * CSS classname(s) of dynamicly created modal's actions.
+ * @default ''
+ */
+ classActions: string;
+
+ /**
+ * Determine if a close icon shoud be displayed on dynamicly created modal.
+ * @default false
+ */
+ closeIcon: boolean;
+
+ /**
+ *
+ * @default false
+ */
+ actions: any;
+
+ /**
+ *
+ * @default true
+ */
+ preserveHTML: boolean;
+
// endregion
// region Callbacks
@@ -250,6 +311,8 @@ declare namespace FomanticUI {
// region Config Template Settings
+ templates: Modal.TemplatesSettings;
+
// endregion
// region Debug Settings
@@ -299,6 +362,7 @@ declare namespace FomanticUI {
type SelectorSettings = Partial>;
type ClassNameSettings = Partial>;
type ErrorSettings = Partial>;
+ type TemplatesSettings = Partial> & {[key: string]: (...args: any) => Partial>};
namespace Settings {
interface Selectors {
@@ -466,6 +530,12 @@ declare namespace FomanticUI {
*/
notFound: string;
}
+
+ interface Templates {
+ alert(): Partial>;
+ confirm(): Partial>;
+ prompt(): Partial>;
+ }
}
}
}
diff --git a/types/fomantic-ui-nag.d.ts b/types/fomantic-ui-nag.d.ts
index 0f10437e39..d7fffdbd08 100644
--- a/types/fomantic-ui-nag.d.ts
+++ b/types/fomantic-ui-nag.d.ts
@@ -23,10 +23,10 @@ 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?: NagSettings): Partial>;
+ (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 62a040479c..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;
@@ -84,7 +84,7 @@ declare namespace FomanticUI {
* This is useful for including a pre-formatted popup.
* @default false
*/
- popup: false | string;
+ popup: false | string | JQuery;
/**
* Whether all other popups should be hidden when this popup is opened.
@@ -266,39 +266,39 @@ declare namespace FomanticUI {
/**
* Callback on popup element creation, with created popup.
*/
- onCreate(this: JQuery): void;
+ onCreate(this: JQuery, element?: JQuery): void;
/**
* Callback immediately before Popup is removed from DOM.
*/
- onRemove(this: JQuery): void;
+ onRemove(this: JQuery, element?: JQuery): void;
/**
* Callback before popup is shown.
* Returning 'false' from this callback will cancel the popup from showing.
*/
- onShow(this: JQuery): boolean;
+ onShow(this: JQuery, element?: JQuery): any;
/**
* Callback after popup is shown.
*/
- onVisible(this: JQuery): void;
+ onVisible(this: JQuery, element?: JQuery): void;
/**
* Callback before popup is hidden.
* Returning 'false' from this callback will cancel the popup from hiding.
*/
- onHide(this: JQuery): boolean;
+ onHide(this: JQuery, element?: JQuery): any;
/**
* Callback after popup is hidden.
*/
- onHidden(this: JQuery): void;
+ onHidden(this: JQuery, element?: JQuery): void;
/**
* Callback after popup cannot be placed on screen.
*/
- onUnplaceable(this: JQuery): void;
+ onUnplaceable(this: JQuery, element?: JQuery): void;
// endregion
@@ -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 a98614b9c6..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;
@@ -208,6 +208,12 @@ declare namespace FomanticUI {
*/
precision: number;
+ /**
+ * Sets current overall percent.
+ * @default false
+ */
+ percent: false | number;
+
/**
* Setting a total value will make each call to increment get closer to this total (i.e. 1/20, 2/20 etc).
* @default false
@@ -349,7 +355,7 @@ declare namespace FomanticUI {
*/
progress: string;
}
-
+
interface ClassNames {
/**
* @default 'active'
@@ -371,7 +377,7 @@ declare namespace FomanticUI {
*/
warning: string;
}
-
+
interface Texts {
/**
* @default false
@@ -408,14 +414,14 @@ declare namespace FomanticUI {
*/
bars: string[];
}
-
+
interface RegExps {
/**
* @default /\{\$*[A-z0-9]+\}/g
*/
variable: RegExp;
}
-
+
interface Metadatas {
/**
* @default 'percent'
@@ -432,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 d3832a51a0..4d844603b7 100644
--- a/types/fomantic-ui-search.d.ts
+++ b/types/fomantic-ui-search.d.ts
@@ -10,7 +10,7 @@ declare namespace FomanticUI {
/**
* Displays message in search results with text, using template matching type.
*/
- (behavior: 'display message', text: string, type: string): JQuery;
+ (behavior: 'display message', text: string, type?: string): JQuery;
/**
* Cancels current remote search query.
@@ -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;
@@ -124,7 +124,7 @@ declare namespace FomanticUI {
* @see {@link https://fomantic-ui.com/behaviors/api.html#/settings}
* @default {}
*/
- apiSettings: APISettings | JQueryAjaxSettings;
+ apiSettings: Partial> | JQueryAjaxSettings;
/**
* Minimum characters to query for results.
@@ -192,7 +192,7 @@ declare namespace FomanticUI {
* List mapping display content to JSON property, either with API or 'source'.
* @default {}
*/
- fields: object;
+ fields: Search.FieldsSettings;
/**
* Specify object properties inside local source object which will be searched.
@@ -228,6 +228,36 @@ declare namespace FomanticUI {
*/
ignoreDiacritics: boolean;
+ /**
+ * Whether to consider case sensitivity on local searching
+ * @default true
+ */
+ ignoreSearchCase: boolean;
+
+ /**
+ * Whether search result should highlight matching strings
+ * @default false
+ */
+ highlightMatches: boolean;
+
+ /**
+ * Template to use (specified in settings.templates)
+ * @default 'standard'
+ */
+ type: 'escape' | 'message' | 'category' | 'standard';
+
+ /**
+ * Field to display in standard results template
+ * @default ''
+ */
+ displayField: string;
+
+ /**
+ * Whether to add events to prompt automatically
+ * @default true
+ */
+ automatic: boolean;
+
// endregion
// region Callbacks
@@ -237,13 +267,13 @@ declare namespace FomanticUI {
* The first parameter includes the filtered response results for that element.
* The function should return 'false' to prevent default action (closing search results and selecting value).
*/
- onSelect(this: JQuery, result: object, response: object): boolean;
+ onSelect(this: JQuery, result: object, response: object): any;
/**
* Callback after processing element template to add HTML to results.
* Function should return 'false' to prevent default actions.
*/
- onResultsAdd(this: JQuery, html: string): boolean;
+ onResultsAdd(this: JQuery, html: string): void | boolean;
/**
* Callback on search query.
@@ -347,29 +377,30 @@ declare namespace FomanticUI {
type RegExpSettings = Partial>;
type ClassNameSettings = Partial>;
type MetadataSettings = Partial>;
+ type FieldsSettings = Partial>;
type ErrorSettings = Partial>;
namespace Settings {
interface Templates {
/**
- * @default function(string)
+ * @default function(string, preserveHTML)
*/
- escape: Function;
+ escape: (string: string, preserveHTML?: boolean) => string;
/**
- * @default function(message, type)
+ * @default function(message, type, header)
*/
- message: Function;
+ message: (message: string, type?: string, header?: string) => string;
/**
- * @default function(response)
+ * @default function(response, fields, preserveHTML)
*/
- category: Function;
+ category: (response: unknown, fields: {[key: string]: string}, preserveHTML?: boolean) => string;
/**
- * @default function(response)
+ * @default function(response, fields, preserveHTML)
*/
- standard: Function;
+ standard: (response: unknown, fields: {[key: string]: string}, preserveHTML?: boolean) => string;
}
interface Selectors {
@@ -450,6 +481,86 @@ declare namespace FomanticUI {
results: string;
}
+ interface Fields {
+ /**
+ * Array of categories (category view)
+ * @default 'results'
+ */
+ categories: string;
+
+ /**
+ * Name of category (category view)
+ * @default 'name'
+ */
+ categoryName: string;
+
+ /**
+ * Array of results (category view)
+ * @default 'results'
+ */
+ categoryResults: string;
+
+ /**
+ * Sesult description
+ * @default ' description'
+ */
+ description: string;
+
+ /**
+ * Result image
+ * @default 'image'
+ */
+ image: string;
+
+ /**
+ * Result alt text for image
+ * @default 'alt'
+ */
+ alt: string;
+
+ /**
+ * Result price
+ * @default 'price'
+ */
+ price: string;
+
+ /**
+ * Array of results (standard)
+ * @default 'results'
+ */
+ results: string;
+
+ /**
+ * Result title
+ * @default 'title'
+ */
+ title: string;
+
+ /**
+ * Result url
+ * @default 'url'
+ */
+ url: string;
+
+ /**
+ * "view more" object name
+ * @default 'action'
+ */
+ action: string;
+
+ /**
+ * "view more" text
+ * @default 'text'
+ */
+ actionText: string;
+
+ /**
+ * "view more" url
+ * @default 'url'
+ */
+ actionURL: string;
+ }
+
interface Errors {
/**
* @default 'Cannot search. No source used, and Fomantic API module was not included'
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 0f42e89a2d..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;
@@ -149,7 +149,7 @@ declare namespace FomanticUI {
* Tabs are limited to those found inside this context.
* @default false
*/
- context: false | string;
+ context: JQuery | string | false;
/**
* If enabled limits tabs to children of passed context.
@@ -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
deleted file mode 100644
index af828e44ab..0000000000
--- a/types/fomantic-ui-tests.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-///
-
-$().accordion(); // $ExpectType JQuery
-$().api();// $ExpectType JQuery
-$().calendar(); // $ExpectType JQuery
-$().checkbox(); // $ExpectType JQuery
-$('body').dimmer(); // $ExpectType JQuery
-$().dropdown(); // $ExpectType JQuery
-$().embed(); // $ExpectType JQuery
-$().flyout(); // $ExpectType JQuery
-$().form(); // $ExpectType JQuery
-$().modal(); // $ExpectType JQuery
-$().nag(); // $ExpectType JQuery
-$().popup(); // $ExpectType JQuery
-$().progress(); // $ExpectType JQuery
-$().rating(); // $ExpectType JQuery
-$().search(); // $ExpectType JQuery
-$().shape(); // $ExpectType JQuery
-$().sidebar(); // $ExpectType JQuery
-$().slider(); // $ExpectType JQuery
-$().sticky(); // $ExpectType JQuery
-$().tab(); // $ExpectType JQuery
-$('body').toast(); // $ExpectType JQuery
-$().transition(); // $ExpectType JQuery
-$().visibility(); // $ExpectType JQuery
diff --git a/types/fomantic-ui-toast.d.ts b/types/fomantic-ui-toast.d.ts
index 481403bbc3..daf3da0a78 100644
--- a/types/fomantic-ui-toast.d.ts
+++ b/types/fomantic-ui-toast.d.ts
@@ -12,6 +12,11 @@ declare namespace FomanticUI {
*/
(behavior: 'animate continue'): JQuery;
+ /**
+ * Show the toast
+ */
+ (behavior: 'show'): JQuery;
+
/**
* Closes the toast
*/
@@ -28,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;
@@ -120,6 +125,13 @@ declare namespace FomanticUI {
*/
showImage: false | string;
+ /**
+ * Alt text for a given showImage.
+ *
+ * @default false
+ */
+ alt: false | string;
+
/**
* Define if the toast should display an icon which matches to a given class.
* If a string is given, this will be used as icon classname.
@@ -273,7 +285,7 @@ declare namespace FomanticUI {
/**
* An array of objects. Each object defines an action with 'properties' 'text', 'class', 'icon' and 'click'.
*/
- actions: Toast.ActionsSettings;
+ actions: Toast.ActionsSettings[];
// endregion
diff --git a/types/fomantic-ui-transition.d.ts b/types/fomantic-ui-transition.d.ts
index 8a0edab45d..014d056519 100644
--- a/types/fomantic-ui-transition.d.ts
+++ b/types/fomantic-ui-transition.d.ts
@@ -112,11 +112,39 @@ declare namespace FomanticUI {
*/
(behavior: 'is supported'): boolean;
+ (behavior: 'scale', duration?: any, onComplete?: () => any): JQuery;
+
+ (behavior: 'zoom', duration?: any, onComplete?: () => any): JQuery;
+
+ (behavior: 'fade' | 'fade up' | 'fade down' | 'fade left' | 'fade right', duration?: any, onComplete?: () => any): JQuery;
+
+ (behavior: 'horizontal flip' | 'vertical flip', duration?: any, onComplete?: () => any): JQuery;
+
+ (behavior: 'drop', duration?: any, onComplete?: () => any): JQuery;
+
+ (behavior: 'fly up' | 'fly down' | 'fly left' | 'fly right', duration?: any, onComplete?: () => any): JQuery;
+
+ (behavior: 'swing up' | 'swing down' | 'swing left' | 'swing right', duration?: any, onComplete?: () => any): JQuery;
+
+ (behavior: 'browse' | 'browse up' | 'browse down' | 'browse left' | 'browse right', duration?: any, onComplete?: () => any): JQuery;
+
+ (behavior: 'slide up' | 'slide down' | 'slide left' | 'slide right', duration?: any, onComplete?: () => any): JQuery;
+
+ // Static animations
+ (behavior: 'pulsating', duration?: any, onComplete?: () => any): JQuery;
+ (behavior: 'jiggle', duration?: any, onComplete?: () => any): JQuery;
+ (behavior: 'flash', duration?: any, onComplete?: () => any): JQuery;
+ (behavior: 'shake', duration?: any, onComplete?: () => any): JQuery;
+ (behavior: 'pulse', duration?: any, onComplete?: () => any): JQuery;
+ (behavior: 'tada', duration?: any, onComplete?: () => any): JQuery;
+ (behavior: 'bounce', duration?: any, onComplete?: () => any): JQuery;
+ (behavior: 'glow', duration?: any, onComplete?: () => any): JQuery;
+
/**
* 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 7580edeb8d..42259ffa87 100644
--- a/types/fomantic-ui-visibility.d.ts
+++ b/types/fomantic-ui-visibility.d.ts
@@ -44,10 +44,10 @@ 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: VisibilitySettings): JQuery;
- (settings?: VisibilitySettings): 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;
}
diff --git a/types/tests.ts b/types/tests.ts
new file mode 100644
index 0000000000..bae2db2667
--- /dev/null
+++ b/types/tests.ts
@@ -0,0 +1,188 @@
+///
+
+$().accordion(); // $ExpectType JQuery
+$().api();// $ExpectType JQuery
+$().calendar(); // $ExpectType JQuery
+$().checkbox(); // $ExpectType JQuery
+$('body').dimmer(); // $ExpectType JQuery
+$().dropdown(); // $ExpectType JQuery
+$().embed(); // $ExpectType JQuery
+$().flyout(); // $ExpectType JQuery
+$().form(); // $ExpectType JQuery
+$().modal(); // $ExpectType JQuery
+$().nag(); // $ExpectType JQuery
+$().popup(); // $ExpectType JQuery
+$().progress(); // $ExpectType JQuery
+$().rating(); // $ExpectType JQuery
+$().search(); // $ExpectType JQuery
+$().shape(); // $ExpectType JQuery
+$().sidebar(); // $ExpectType JQuery
+$().slider(); // $ExpectType JQuery
+$().sticky(); // $ExpectType JQuery
+$().tab(); // $ExpectType JQuery
+$('body').toast(); // $ExpectType JQuery
+$().transition(); // $ExpectType JQuery
+$().visibility(); // $ExpectType JQuery