fomantic-ui 2.9.4-beta.1 → 2.9.4-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +1 -1
- package/dist/components/api.min.js +1 -1
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +1 -1
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +1 -1
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -3
- package/dist/components/dropdown.js +2 -2
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +1 -1
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +1 -1
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +1 -1
- package/dist/components/form.css +14 -5
- package/dist/components/form.js +9 -7
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +4 -1
- package/dist/components/header.min.css +2 -2
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +30 -10
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -2
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -2
- package/dist/components/menu.min.css +2 -2
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +1 -1
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +1 -1
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -2
- package/dist/components/popup.js +1 -1
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +1 -1
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +1 -1
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +1 -1
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +1 -1
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +100 -71
- package/dist/semantic.js +35 -33
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/form.js +8 -6
- package/src/definitions/collections/form.less +13 -4
- package/src/definitions/elements/header.less +5 -0
- package/src/definitions/elements/input.less +14 -6
- package/src/definitions/modules/dropdown.js +1 -1
- package/src/themes/default/collections/form.variables +1 -0
- package/src/themes/default/globals/variation.variables +1 -0
- package/types/fomantic-ui-api.d.ts +8 -2
- package/types/fomantic-ui-calendar.d.ts +93 -8
- package/types/fomantic-ui-checkbox.d.ts +14 -4
- package/types/fomantic-ui-dropdown.d.ts +12 -17
- package/types/fomantic-ui-flyout.d.ts +21 -7
- package/types/fomantic-ui-form.d.ts +112 -17
- package/types/fomantic-ui-modal.d.ts +74 -4
- package/types/fomantic-ui-nag.d.ts +1 -1
- package/types/fomantic-ui-popup.d.ts +8 -8
- package/types/fomantic-ui-progress.d.ts +6 -0
- package/types/fomantic-ui-search.d.ts +30 -12
- package/types/fomantic-ui-tab.d.ts +1 -1
- package/types/fomantic-ui-tests.ts +162 -0
- package/types/fomantic-ui-toast.d.ts +6 -1
- package/types/fomantic-ui-transition.d.ts +28 -0
- package/types/fomantic-ui-visibility.d.ts +2 -2
package/package.json
CHANGED
@@ -619,7 +619,7 @@
|
|
619
619
|
// refresh selector cache
|
620
620
|
(instance || module).refresh();
|
621
621
|
},
|
622
|
-
field: function (identifier, strict) {
|
622
|
+
field: function (identifier, strict, ignoreMissing) {
|
623
623
|
module.verbose('Finding field with identifier', identifier);
|
624
624
|
identifier = module.escape.string(identifier);
|
625
625
|
var t;
|
@@ -639,7 +639,9 @@
|
|
639
639
|
if (t.length > 0) {
|
640
640
|
return t;
|
641
641
|
}
|
642
|
-
|
642
|
+
if (!ignoreMissing) {
|
643
|
+
module.error(error.noField.replace('{identifier}', identifier));
|
644
|
+
}
|
643
645
|
|
644
646
|
return strict ? $() : $('<input/>');
|
645
647
|
},
|
@@ -817,10 +819,10 @@
|
|
817
819
|
|
818
820
|
has: {
|
819
821
|
|
820
|
-
field: function (identifier) {
|
822
|
+
field: function (identifier, ignoreMissing) {
|
821
823
|
module.verbose('Checking for existence of a field with identifier', identifier);
|
822
824
|
|
823
|
-
return module.get.field(identifier, true).length > 0;
|
825
|
+
return module.get.field(identifier, true, ignoreMissing).length > 0;
|
824
826
|
},
|
825
827
|
|
826
828
|
},
|
@@ -1020,7 +1022,7 @@
|
|
1020
1022
|
}
|
1021
1023
|
if (rule === undefined) {
|
1022
1024
|
module.debug('Removed all rules');
|
1023
|
-
if (module.has.field(field)) {
|
1025
|
+
if (module.has.field(field, true)) {
|
1024
1026
|
validation[field].rules = [];
|
1025
1027
|
} else {
|
1026
1028
|
delete validation[field];
|
@@ -1221,7 +1223,7 @@
|
|
1221
1223
|
module.debug('Enabling auto check on required fields');
|
1222
1224
|
if (validation) {
|
1223
1225
|
$.each(validation, function (fieldName) {
|
1224
|
-
if (!module.has.field(fieldName)) {
|
1226
|
+
if (!module.has.field(fieldName, true)) {
|
1225
1227
|
module.verbose('Field not found, removing from validation', fieldName);
|
1226
1228
|
module.remove.field(fieldName);
|
1227
1229
|
}
|
@@ -162,6 +162,11 @@
|
|
162
162
|
font-family: @inputFont;
|
163
163
|
line-height: @textAreaLineHeight;
|
164
164
|
resize: @textAreaResize;
|
165
|
+
min-height: @actionTextareaMinHeight;
|
166
|
+
}
|
167
|
+
.ui.input > textarea {
|
168
|
+
flex: 1 1 auto;
|
169
|
+
max-width: 100%;
|
165
170
|
}
|
166
171
|
.ui.form textarea:not([rows]) {
|
167
172
|
height: @textAreaHeight;
|
@@ -291,8 +296,10 @@
|
|
291
296
|
|
292
297
|
/* Auto Input */
|
293
298
|
.ui.form .fields .field .ui.input input,
|
294
|
-
.ui.form .field .ui.input
|
295
|
-
|
299
|
+
.ui.form .fields .field .ui.input textarea,
|
300
|
+
.ui.form .field .ui.input input,
|
301
|
+
.ui.form .field .ui.input textarea {
|
302
|
+
width: 100%;
|
296
303
|
}
|
297
304
|
|
298
305
|
& when (@variationFormEqualWidth) or (@variationFormWide) {
|
@@ -441,7 +448,8 @@
|
|
441
448
|
input[type="text"]:focus,
|
442
449
|
input[type="file"]:focus,
|
443
450
|
input[type="url"]:focus,
|
444
|
-
input[type="week"]:focus
|
451
|
+
input[type="week"]:focus,
|
452
|
+
textarea:focus {
|
445
453
|
border-top-right-radius: 0;
|
446
454
|
border-bottom-right-radius: 0;
|
447
455
|
}
|
@@ -462,7 +470,8 @@
|
|
462
470
|
input[type="text"],
|
463
471
|
input[type="file"],
|
464
472
|
input[type="url"],
|
465
|
-
input[type="week"]
|
473
|
+
input[type="week"],
|
474
|
+
textarea {
|
466
475
|
border-bottom-left-radius: 0;
|
467
476
|
border-top-left-radius: 0;
|
468
477
|
}
|
@@ -467,6 +467,11 @@
|
|
467
467
|
.ui.bottom.attached.header {
|
468
468
|
border-radius: 0 0 @attachedBorderRadius @attachedBorderRadius;
|
469
469
|
}
|
470
|
+
& when (@variationHeaderSeamless) {
|
471
|
+
.ui.seamless.attached:not(.bottom).header {
|
472
|
+
border-bottom: none;
|
473
|
+
}
|
474
|
+
}
|
470
475
|
|
471
476
|
/* Attached Sizes */
|
472
477
|
.ui.attached.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
|
@@ -35,7 +35,7 @@
|
|
35
35
|
.ui.input > input {
|
36
36
|
margin: 0;
|
37
37
|
max-width: 100%;
|
38
|
-
flex: 1
|
38
|
+
flex: 1 1 auto;
|
39
39
|
outline: none;
|
40
40
|
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
41
41
|
text-align: @textAlign;
|
@@ -524,7 +524,11 @@
|
|
524
524
|
.ui.form .field.@{state} > .ui.action.input:not([class*="left action"]) > input + .ui.button,
|
525
525
|
.ui.form .field.@{state} > .ui.right.labeled.input:not([class*="corner labeled"]) > input + .ui.label,
|
526
526
|
.ui.action.input.@{state}:not([class*="left action"]) > input + .ui.button,
|
527
|
-
.ui.right.labeled.input.@{state}:not([class*="corner labeled"]) > input + .ui.label
|
527
|
+
.ui.right.labeled.input.@{state}:not([class*="corner labeled"]) > input + .ui.label,
|
528
|
+
.ui.form .field.@{state} > .ui.action.input:not([class*="left action"]) > textarea + .ui.button,
|
529
|
+
.ui.form .field.@{state} > .ui.right.labeled.input:not([class*="corner labeled"]) > textarea + .ui.label,
|
530
|
+
.ui.action.input.@{state}:not([class*="left action"]) > textarea + .ui.button,
|
531
|
+
.ui.right.labeled.input.@{state}:not([class*="corner labeled"]) > textarea + .ui.label {
|
528
532
|
border-right: @borderWidth solid @borderColor;
|
529
533
|
}
|
530
534
|
.ui.form .field.@{state} > .ui.right.labeled.input:not([class*="corner labeled"]) > .ui.label:first-child,
|
@@ -553,14 +557,16 @@
|
|
553
557
|
}
|
554
558
|
|
555
559
|
/* Input when ui Left */
|
556
|
-
.ui[class*="left action"].input > input
|
560
|
+
.ui[class*="left action"].input > input,
|
561
|
+
.ui[class*="left action"].input > textarea {
|
557
562
|
border-top-left-radius: 0;
|
558
563
|
border-bottom-left-radius: 0;
|
559
564
|
border-left-color: transparent;
|
560
565
|
}
|
561
566
|
|
562
567
|
/* Input when ui Right */
|
563
|
-
.ui.action.input:not([class*="left action"]) > input
|
568
|
+
.ui.action.input:not([class*="left action"]) > input,
|
569
|
+
.ui.action.input:not([class*="left action"]) > textarea {
|
564
570
|
border-top-right-radius: 0;
|
565
571
|
border-bottom-right-radius: 0;
|
566
572
|
border-right-color: transparent;
|
@@ -584,11 +590,13 @@
|
|
584
590
|
}
|
585
591
|
|
586
592
|
/* Input Focus */
|
587
|
-
.ui.action.input:not([class*="left action"]) > input:focus
|
593
|
+
.ui.action.input:not([class*="left action"]) > input:focus,
|
594
|
+
.ui.action.input:not([class*="left action"]) > textarea:focus {
|
588
595
|
border-right-color: @focusBorderColor;
|
589
596
|
}
|
590
597
|
|
591
|
-
.ui.ui[class*="left action"].input > input:focus
|
598
|
+
.ui.ui[class*="left action"].input > input:focus,
|
599
|
+
.ui.ui[class*="left action"].input > textarea:focus {
|
592
600
|
border-left-color: @focusBorderColor;
|
593
601
|
}
|
594
602
|
}
|
@@ -2806,8 +2806,8 @@
|
|
2806
2806
|
module.save.remoteData(selectedText, selectedValue);
|
2807
2807
|
}
|
2808
2808
|
if (settings.useLabels) {
|
2809
|
-
module.add.value(selectedValue, selectedText, $selected, preventChangeTrigger);
|
2810
2809
|
module.add.label(selectedValue, selectedText, shouldAnimate);
|
2810
|
+
module.add.value(selectedValue, selectedText, $selected, preventChangeTrigger);
|
2811
2811
|
module.set.activeItem($selected);
|
2812
2812
|
module.filterActive();
|
2813
2813
|
module.select.nextAvailable($selectedItem);
|
@@ -82,6 +82,7 @@
|
|
82
82
|
@variationHeaderDividing: true;
|
83
83
|
@variationHeaderBlock: true;
|
84
84
|
@variationHeaderAttached: true;
|
85
|
+
@variationHeaderSeamless: true;
|
85
86
|
@variationHeaderTags: h1, h2, h3, h4, h5, h6;
|
86
87
|
@variationHeaderSizes: @variationAllSizes;
|
87
88
|
@variationHeaderColors: @variationAllColors;
|
@@ -125,6 +125,12 @@ declare namespace FomanticUI {
|
|
125
125
|
*/
|
126
126
|
on: string;
|
127
127
|
|
128
|
+
/**
|
129
|
+
* Object containing all templates endpoints
|
130
|
+
* @default {}
|
131
|
+
*/
|
132
|
+
api: {[key: string]: string};
|
133
|
+
|
128
134
|
/**
|
129
135
|
* Can be set to 'local' to cache successful returned AJAX responses when using a JSON API.
|
130
136
|
* This helps avoid server roundtrips when API endpoints will return the same results when accessed repeatedly.
|
@@ -137,7 +143,7 @@ declare namespace FomanticUI {
|
|
137
143
|
* UI state will be applied to this element, defaults to triggering element.
|
138
144
|
* @default false
|
139
145
|
*/
|
140
|
-
stateContext: false | JQuery
|
146
|
+
stateContext: false | string | JQuery<any>;
|
141
147
|
|
142
148
|
/**
|
143
149
|
* Whether to encode parameters with 'encodeURIComponent' before adding into url string.
|
@@ -259,7 +265,7 @@ declare namespace FomanticUI {
|
|
259
265
|
* Method for transmitting request to server.
|
260
266
|
* @default 'get'
|
261
267
|
*/
|
262
|
-
method: 'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'
|
268
|
+
method: Uppercase<'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'> | Lowercase<'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'>;
|
263
269
|
|
264
270
|
/**
|
265
271
|
* Expected data type of response.
|
@@ -37,7 +37,7 @@ declare namespace FomanticUI {
|
|
37
37
|
* Pass false to updateInput to disable updating the input.
|
38
38
|
* Pass false to fireChange to disable the onBeforeChange and onChange callbacks for this change
|
39
39
|
*/
|
40
|
-
(behavior: 'set date', date: string, updateInput
|
40
|
+
(behavior: 'set date', date: Date | string | null, updateInput?: boolean, fireChange?: boolean): JQuery;
|
41
41
|
|
42
42
|
/**
|
43
43
|
* Get the current selection mode (year, month, day, hour, minute)
|
@@ -82,12 +82,12 @@ declare namespace FomanticUI {
|
|
82
82
|
/**
|
83
83
|
* Set the minimal selectable date
|
84
84
|
*/
|
85
|
-
(behavior: 'set minDate', date: Date | string): JQuery;
|
85
|
+
(behavior: 'set minDate', date: Date | string | null): JQuery;
|
86
86
|
|
87
87
|
/**
|
88
88
|
* Set the maximal selectable date
|
89
89
|
*/
|
90
|
-
(behavior: 'set maxDate', date: Date | string): JQuery;
|
90
|
+
(behavior: 'set maxDate', date: Date | string | null): JQuery;
|
91
91
|
|
92
92
|
(behavior: 'destroy'): JQuery;
|
93
93
|
|
@@ -214,7 +214,7 @@ declare namespace FomanticUI {
|
|
214
214
|
*
|
215
215
|
* @default null
|
216
216
|
*/
|
217
|
-
initialDate:
|
217
|
+
initialDate: Date | string | null;
|
218
218
|
|
219
219
|
/**
|
220
220
|
* Display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day').
|
@@ -319,12 +319,14 @@ declare namespace FomanticUI {
|
|
319
319
|
*
|
320
320
|
* @default false
|
321
321
|
*/
|
322
|
-
selectAdjacentDays:
|
322
|
+
selectAdjacentDays: boolean;
|
323
323
|
|
324
324
|
popupOptions: Calendar.PopupSettings;
|
325
325
|
|
326
326
|
text: Calendar.TextSettings;
|
327
327
|
|
328
|
+
formatter: Calendar.FormatterSettings;
|
329
|
+
|
328
330
|
// endregion
|
329
331
|
|
330
332
|
// region Callbacks
|
@@ -333,12 +335,12 @@ declare namespace FomanticUI {
|
|
333
335
|
* Is called before a calendar date changes. 'return false;' will cancel the change.
|
334
336
|
* @since 2.8.0
|
335
337
|
*/
|
336
|
-
onBeforeChange(this: JQuery): void;
|
338
|
+
onBeforeChange(this: JQuery, date?: Date, text?: string, mode?: string): void;
|
337
339
|
|
338
340
|
/**
|
339
341
|
* Is called after a calendar date has changed.
|
340
342
|
*/
|
341
|
-
onChange(this: JQuery): void;
|
343
|
+
onChange(this: JQuery, date?: Date): void;
|
342
344
|
|
343
345
|
/**
|
344
346
|
* Is called before a calendar is shown. 'return false;' will prevent the calendar to be shown.
|
@@ -364,7 +366,7 @@ declare namespace FomanticUI {
|
|
364
366
|
* Is called when a cell of the calendar is selected providing its value and current mode.
|
365
367
|
* 'return false;' will prevent the selection.
|
366
368
|
*/
|
367
|
-
onSelect(this: JQuery, date
|
369
|
+
onSelect(this: JQuery, date?: Date, mode?: string): void;
|
368
370
|
|
369
371
|
// endregion
|
370
372
|
|
@@ -436,6 +438,7 @@ declare namespace FomanticUI {
|
|
436
438
|
namespace Calendar {
|
437
439
|
type PopupSettings = Partial<Pick<Settings.Popup, keyof Settings.Popup>>;
|
438
440
|
type TextSettings = Partial<Pick<Settings.Texts, keyof Settings.Texts>>;
|
441
|
+
type FormatterSettings = Partial<Pick<Settings.Formatters, keyof Settings.Formatters>>;
|
439
442
|
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
440
443
|
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
441
444
|
type RegExpSettings = Partial<Pick<Settings.RegExps, keyof Settings.RegExps>>;
|
@@ -471,6 +474,16 @@ declare namespace FomanticUI {
|
|
471
474
|
*/
|
472
475
|
days: string[];
|
473
476
|
|
477
|
+
/**
|
478
|
+
* @default ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
479
|
+
*/
|
480
|
+
dayNamesShort: string[];
|
481
|
+
|
482
|
+
/**
|
483
|
+
* @default ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
484
|
+
*/
|
485
|
+
dayNames: string[];
|
486
|
+
|
474
487
|
/**
|
475
488
|
* @default ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
476
489
|
*/
|
@@ -507,6 +520,78 @@ declare namespace FomanticUI {
|
|
507
520
|
weekNo: string;
|
508
521
|
}
|
509
522
|
|
523
|
+
interface Formatters {
|
524
|
+
/**
|
525
|
+
*
|
526
|
+
*/
|
527
|
+
yearHeader(date: Date, settings?: CalendarSettings): string;
|
528
|
+
|
529
|
+
/**
|
530
|
+
* @default 'YYYY'
|
531
|
+
*/
|
532
|
+
monthHeader: string;
|
533
|
+
|
534
|
+
/**
|
535
|
+
* @default 'MMMM YYYY'
|
536
|
+
*/
|
537
|
+
dayHeader: string;
|
538
|
+
|
539
|
+
/**
|
540
|
+
* @default 'MMMM D, YYYY'
|
541
|
+
*/
|
542
|
+
hourHeader: string;
|
543
|
+
|
544
|
+
/**
|
545
|
+
* @default 'MMMM D, YYYY'
|
546
|
+
*/
|
547
|
+
minuteHeader: string;
|
548
|
+
|
549
|
+
/**
|
550
|
+
* @default 'MMMM D, YYYY'
|
551
|
+
*/
|
552
|
+
dayColumnHeader(day: number, settings: CalendarSettings): string;
|
553
|
+
|
554
|
+
/**
|
555
|
+
* @default 'MMMM D, YYYY h:mm A'
|
556
|
+
*/
|
557
|
+
datetime: string;
|
558
|
+
|
559
|
+
/**
|
560
|
+
* @default 'MMMM D, YYYY'
|
561
|
+
*/
|
562
|
+
date: string;
|
563
|
+
|
564
|
+
/**
|
565
|
+
* @default 'h:mm A'
|
566
|
+
*/
|
567
|
+
time: string;
|
568
|
+
|
569
|
+
/**
|
570
|
+
* @default 'h:mm A'
|
571
|
+
*/
|
572
|
+
cellTime: string;
|
573
|
+
|
574
|
+
/**
|
575
|
+
* @default 'MMMM YYYY'
|
576
|
+
*/
|
577
|
+
month: string;
|
578
|
+
|
579
|
+
/**
|
580
|
+
* @default 'YYYY'
|
581
|
+
*/
|
582
|
+
year: string;
|
583
|
+
|
584
|
+
/**
|
585
|
+
*
|
586
|
+
*/
|
587
|
+
today(settings: CalendarSettings): string;
|
588
|
+
|
589
|
+
/**
|
590
|
+
*
|
591
|
+
*/
|
592
|
+
cell(cell: string, date: Date, cellOptions: any): any
|
593
|
+
}
|
594
|
+
|
510
595
|
interface Selectors {
|
511
596
|
/**
|
512
597
|
* @default '.ui.popup'
|
@@ -32,6 +32,11 @@ declare namespace FomanticUI {
|
|
32
32
|
*/
|
33
33
|
(behavior: 'enable'): JQuery;
|
34
34
|
|
35
|
+
/**
|
36
|
+
* Disable interaction with a checkbox.
|
37
|
+
*/
|
38
|
+
(behavior: 'disable'): JQuery;
|
39
|
+
|
35
40
|
/**
|
36
41
|
* Set a checkbox state to checked without callbacks.
|
37
42
|
*/
|
@@ -82,6 +87,11 @@ declare namespace FomanticUI {
|
|
82
87
|
*/
|
83
88
|
(behavior: 'is unchecked'): boolean;
|
84
89
|
|
90
|
+
/**
|
91
|
+
* Returns whether element is not determinate.
|
92
|
+
*/
|
93
|
+
(behavior: 'is indeterminate'): boolean;
|
94
|
+
|
85
95
|
/**
|
86
96
|
* Returns whether element is able to be changed.
|
87
97
|
*/
|
@@ -175,22 +185,22 @@ declare namespace FomanticUI {
|
|
175
185
|
/**
|
176
186
|
* Callback before a checkbox is checked. Can cancel change by returning 'false'.
|
177
187
|
*/
|
178
|
-
beforeChecked(this: JQuery): void |
|
188
|
+
beforeChecked(this: JQuery): void | Promise<void> | boolean;
|
179
189
|
|
180
190
|
/**
|
181
191
|
* Callback before a checkbox is set to indeterminate. Can cancel change by returning 'false'.
|
182
192
|
*/
|
183
|
-
beforeIndeterminate(this: JQuery): void | false;
|
193
|
+
beforeIndeterminate(this: JQuery): void | Promise<void> | false;
|
184
194
|
|
185
195
|
/**
|
186
196
|
* Callback before a checkbox is set to determinate. Can cancel change by returning 'false'.
|
187
197
|
*/
|
188
|
-
beforeDeterminate(this: JQuery): void | false;
|
198
|
+
beforeDeterminate(this: JQuery): void | Promise<void> | false;
|
189
199
|
|
190
200
|
/**
|
191
201
|
* Callback before a checkbox is unchecked. Can cancel change by returning 'false'.
|
192
202
|
*/
|
193
|
-
beforeUnchecked(this: JQuery): void | false;
|
203
|
+
beforeUnchecked(this: JQuery): void | Promise<void> | false;
|
194
204
|
|
195
205
|
/**
|
196
206
|
* Callback after a checkbox is enabled.
|
@@ -6,7 +6,7 @@ declare namespace FomanticUI {
|
|
6
6
|
* Recreates dropdown menu from passed values.
|
7
7
|
* values should be an object with the following structure: { values: [ {value, text, name} ] }.
|
8
8
|
*/
|
9
|
-
(behavior: 'setup menu', values: object):
|
9
|
+
(behavior: 'setup menu', values: object): JQuery;
|
10
10
|
|
11
11
|
/**
|
12
12
|
* Changes dropdown to use new values.
|
@@ -17,7 +17,7 @@ declare namespace FomanticUI {
|
|
17
17
|
/**
|
18
18
|
* Refreshes all cached selectors and data
|
19
19
|
*/
|
20
|
-
(behavior: 'refresh'):
|
20
|
+
(behavior: 'refresh'): JQuery;
|
21
21
|
|
22
22
|
/**
|
23
23
|
* Toggles current visibility of dropdown
|
@@ -29,20 +29,20 @@ declare namespace FomanticUI {
|
|
29
29
|
* If a function is provided to callback, it's called after the dropdown-menu is shown.
|
30
30
|
* Set preventFocus to true if you don't want the dropdown field to focus after the menu is shown
|
31
31
|
*/
|
32
|
-
(behavior: 'show', callback
|
32
|
+
(behavior: 'show', callback?: Function, preventFocus?: boolean): void;
|
33
33
|
|
34
34
|
/**
|
35
35
|
* Hides dropdown.
|
36
36
|
* If a function is provided to callback, it's called after the dropdown-menu is hidden.
|
37
37
|
* Set preventBlur to true if you don't want the dropdown field to blur after the menu is hidden
|
38
38
|
*/
|
39
|
-
(behavior: 'hide', callback
|
39
|
+
(behavior: 'hide', callback?: Function, preventBlur?: boolean): void;
|
40
40
|
|
41
41
|
/**
|
42
42
|
* Clears dropdown of selection.
|
43
43
|
* Set preventChangeTrigger to true to omit the change event (default: false).
|
44
44
|
*/
|
45
|
-
(behavior: 'clear', preventChangeTrigger
|
45
|
+
(behavior: 'clear', preventChangeTrigger?: boolean): JQuery;
|
46
46
|
|
47
47
|
/**
|
48
48
|
* Hides all other dropdowns that is not current dropdown
|
@@ -53,7 +53,7 @@ declare namespace FomanticUI {
|
|
53
53
|
* Restores dropdown text and value to its value on page load.
|
54
54
|
* Set preventChangeTrigger to true to omit the change event (default: false).
|
55
55
|
*/
|
56
|
-
(behavior: 'restore defaults', preventChangeTrigger
|
56
|
+
(behavior: 'restore defaults', preventChangeTrigger?: boolean): void;
|
57
57
|
|
58
58
|
/**
|
59
59
|
* Restores dropdown text to its value on page load
|
@@ -79,33 +79,28 @@ declare namespace FomanticUI {
|
|
79
79
|
* Sets value as selected.
|
80
80
|
* Set preventChangeTrigger to true to omit the change event (default: false).
|
81
81
|
*/
|
82
|
-
(behavior: 'set selected', value: string, preventChangeTrigger
|
82
|
+
(behavior: 'set selected', value: string | string[], preventChangeTrigger?: boolean, keepSearchTerm?: boolean): JQuery;
|
83
83
|
|
84
84
|
/**
|
85
85
|
* Remove value from selected
|
86
86
|
*/
|
87
87
|
(behavior: 'remove selected', value: string): void;
|
88
88
|
|
89
|
-
/**
|
90
|
-
* Adds a group of values as selected
|
91
|
-
*/
|
92
|
-
(behavior: 'set selected', values: string[]): void;
|
93
|
-
|
94
89
|
/**
|
95
90
|
* Sets selected values to exactly specified values, removing current selection
|
96
91
|
*/
|
97
|
-
(behavior: 'set exactly', values: string[]):
|
92
|
+
(behavior: 'set exactly', values: string[]): JQuery;
|
98
93
|
|
99
94
|
/**
|
100
95
|
* Sets dropdown text to a value
|
101
96
|
*/
|
102
|
-
(behavior: 'text', text: string):
|
97
|
+
(behavior: 'set text', text: string): JQuery;
|
103
98
|
|
104
99
|
/**
|
105
100
|
* Sets dropdown input to value (does not update display state).
|
106
101
|
* Set preventChangeTrigger to true to omit the change event (default: false).
|
107
102
|
*/
|
108
|
-
(behavior: 'set value', value: string, preventChangeTrigger
|
103
|
+
(behavior: 'set value', value: string, preventChangeTrigger?: boolean): JQuery;
|
109
104
|
|
110
105
|
/**
|
111
106
|
* Returns current dropdown text
|
@@ -265,7 +260,7 @@ declare namespace FomanticUI {
|
|
265
260
|
* @see {@link https://fomantic-ui.com/behaviors/api.html#/settings}
|
266
261
|
* @default false
|
267
262
|
*/
|
268
|
-
apiSettings: false | APISettings | JQueryAjaxSettings
|
263
|
+
apiSettings: false | Partial<Pick<APISettings, keyof APISettings>> | Partial<Pick<JQueryAjaxSettings, keyof JQueryAjaxSettings>>;
|
269
264
|
|
270
265
|
/**
|
271
266
|
* Whether dropdown should select new option when using keyboard shortcuts.
|
@@ -506,7 +501,7 @@ declare namespace FomanticUI {
|
|
506
501
|
* Is called after a dropdown value changes.
|
507
502
|
* Receives the name and value of selection and the active menu element.
|
508
503
|
*/
|
509
|
-
onChange(value
|
504
|
+
onChange(value?: string, text?: string, $choice?: JQuery): void;
|
510
505
|
|
511
506
|
/**
|
512
507
|
* Is called after a dropdown selection is added using a multiple select dropdown, only receives the added value.
|
@@ -48,6 +48,11 @@ declare namespace FomanticUI {
|
|
48
48
|
*/
|
49
49
|
(behavior: 'get settings'): FlyoutSettings;
|
50
50
|
|
51
|
+
/**
|
52
|
+
* Templates handling
|
53
|
+
*/
|
54
|
+
(behavior: keyof Flyout.TemplatesSettings, ...args: any): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
|
55
|
+
|
51
56
|
(behavior: 'destroy'): JQuery;
|
52
57
|
<K extends keyof FlyoutSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
|
53
58
|
<K extends keyof FlyoutSettings>(behavior: 'setting', name: K, value: FlyoutSettings[K]): JQuery;
|
@@ -145,43 +150,43 @@ declare namespace FomanticUI {
|
|
145
150
|
* Content of the flyout header.
|
146
151
|
* @default ''
|
147
152
|
*/
|
148
|
-
title:
|
153
|
+
title: string;
|
149
154
|
|
150
155
|
/**
|
151
156
|
* Content of the flyout content.
|
152
157
|
* @default ''
|
153
158
|
*/
|
154
|
-
content:
|
159
|
+
content: string;
|
155
160
|
|
156
161
|
/**
|
157
162
|
* Can hold a string to be added to the flyout class to control its appearance.
|
158
163
|
* @default ''
|
159
164
|
*/
|
160
|
-
class:
|
165
|
+
class: string;
|
161
166
|
|
162
167
|
/**
|
163
168
|
* Can hold a string to be added to the title class to control its appearance.
|
164
169
|
* @default ''
|
165
170
|
*/
|
166
|
-
classTitle:
|
171
|
+
classTitle: string;
|
167
172
|
|
168
173
|
/**
|
169
174
|
* Can hold a string to be added to the content class to control its appearance.
|
170
175
|
* @default ''
|
171
176
|
*/
|
172
|
-
classContent:
|
177
|
+
classContent: string;
|
173
178
|
|
174
179
|
/**
|
175
180
|
* Can hold a string to be added to the actions class to control its appearance.
|
176
181
|
* @default ''
|
177
182
|
*/
|
178
|
-
classActions:
|
183
|
+
classActions: string;
|
179
184
|
|
180
185
|
/**
|
181
186
|
* Can hold a string to be added to the actions class to control its appearance.
|
182
187
|
* @default false
|
183
188
|
*/
|
184
|
-
closeIcon: boolean;
|
189
|
+
closeIcon: boolean | string;
|
185
190
|
|
186
191
|
/**
|
187
192
|
* An array of objects. Each object defines an action with properties `text`, `class`, `icon` and `click`.
|
@@ -261,6 +266,8 @@ declare namespace FomanticUI {
|
|
261
266
|
|
262
267
|
// region Config Template Settings
|
263
268
|
|
269
|
+
templates: Flyout.TemplatesSettings;
|
270
|
+
|
264
271
|
// endregion
|
265
272
|
|
266
273
|
// region Debug Settings
|
@@ -311,6 +318,7 @@ declare namespace FomanticUI {
|
|
311
318
|
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
312
319
|
type RegExpSettings = Partial<Pick<Settings.RegExps, keyof Settings.RegExps>>;
|
313
320
|
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
321
|
+
type TemplatesSettings = Partial<Pick<Settings.Templates, keyof Settings.Templates>> & {[key: string]: (...args: any) => Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>};
|
314
322
|
|
315
323
|
namespace Settings {
|
316
324
|
interface Selectors {
|
@@ -520,6 +528,12 @@ declare namespace FomanticUI {
|
|
520
528
|
*/
|
521
529
|
notFound: string;
|
522
530
|
}
|
531
|
+
|
532
|
+
interface Templates {
|
533
|
+
alert(): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
|
534
|
+
confirm(): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
|
535
|
+
prompt(): Partial<Pick<FlyoutSettings, keyof FlyoutSettings>>;
|
536
|
+
}
|
523
537
|
}
|
524
538
|
}
|
525
539
|
}
|