fomantic-ui 2.9.3-beta.9 → 2.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.all-contributorsrc +2 -2
- package/.github/FUNDING.yml +1 -1
- package/.github/auto_assign.yml +1 -1
- package/.github/workflows/ci.yml +5 -5
- package/.github/workflows/nightly.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/CHANGELOG.md +131 -0
- package/CONTRIBUTORS.md +1 -1
- package/README.md +5 -2
- package/SECURITY.md +2 -1
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +2 -2
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +10 -9
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +2 -2
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +140 -3
- package/dist/components/calendar.js +2 -2
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +50 -6
- package/dist/components/checkbox.js +5 -3
- package/dist/components/checkbox.min.css +2 -2
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +6 -1
- package/dist/components/comment.min.css +2 -2
- package/dist/components/container.css +62 -1
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +3 -3
- package/dist/components/dimmer.js +2 -2
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +101 -25
- package/dist/components/dropdown.js +29 -21
- 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 +2 -2
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +697 -249
- package/dist/components/emoji.min.css +2 -2
- package/dist/components/feed.css +486 -5
- package/dist/components/feed.min.css +2 -2
- package/dist/components/flag.css +3 -2
- package/dist/components/flag.min.css +2 -2
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +2 -33
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +34 -32
- package/dist/components/form.js +72 -31
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +107 -107
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +62 -62
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +3 -27
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +6 -1
- package/dist/components/item.min.css +2 -2
- package/dist/components/label.css +21 -2
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +13 -13
- package/dist/components/list.min.css +2 -2
- package/dist/components/loader.css +282 -282
- package/dist/components/loader.min.css +2 -2
- package/dist/components/menu.css +13 -7
- 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 +5 -1
- package/dist/components/modal.js +3 -3
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +3 -3
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +3 -3
- package/dist/components/popup.js +11 -9
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +2 -2
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +2 -2
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +26 -1
- package/dist/components/search.js +5 -4
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +159 -33
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +2 -2
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +2 -32
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +2 -2
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +126 -26
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +2 -2
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +2 -2
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +6 -4
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +65 -1
- package/dist/components/table.min.css +2 -2
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +6 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toast.min.css +2 -2
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +3 -3
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +2 -2
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +2822 -954
- package/dist/semantic.js +302 -206
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +5 -4
- package/scripts/nightly-version.js +2 -2
- package/src/definitions/behaviors/api.js +9 -8
- package/src/definitions/behaviors/form.js +71 -30
- package/src/definitions/behaviors/state.js +1 -1
- package/src/definitions/behaviors/visibility.js +1 -1
- package/src/definitions/collections/form.less +9 -14
- package/src/definitions/collections/grid.less +106 -106
- package/src/definitions/collections/menu.less +29 -22
- package/src/definitions/collections/table.less +66 -0
- package/src/definitions/elements/button.less +1 -1
- package/src/definitions/elements/container.less +63 -0
- package/src/definitions/elements/icon.less +5 -5
- package/src/definitions/elements/input.less +2 -2
- package/src/definitions/elements/label.less +21 -1
- package/src/definitions/elements/list.less +13 -13
- package/src/definitions/elements/loader.less +71 -71
- package/src/definitions/elements/segment.less +110 -13
- package/src/definitions/globals/site.js +1 -1
- package/src/definitions/modules/accordion.js +1 -1
- package/src/definitions/modules/calendar.js +1 -1
- package/src/definitions/modules/calendar.less +40 -11
- package/src/definitions/modules/checkbox.js +4 -2
- package/src/definitions/modules/checkbox.less +61 -5
- package/src/definitions/modules/dimmer.js +1 -1
- package/src/definitions/modules/dimmer.less +2 -2
- package/src/definitions/modules/dropdown.js +28 -20
- package/src/definitions/modules/dropdown.less +124 -21
- package/src/definitions/modules/embed.js +1 -1
- package/src/definitions/modules/flyout.js +1 -32
- package/src/definitions/modules/modal.js +2 -2
- package/src/definitions/modules/modal.less +6 -0
- package/src/definitions/modules/nag.js +2 -2
- package/src/definitions/modules/popup.js +10 -8
- package/src/definitions/modules/popup.less +4 -4
- package/src/definitions/modules/progress.js +1 -1
- package/src/definitions/modules/rating.js +1 -1
- package/src/definitions/modules/search.js +4 -3
- package/src/definitions/modules/search.less +31 -0
- package/src/definitions/modules/shape.js +1 -1
- package/src/definitions/modules/sidebar.js +1 -31
- package/src/definitions/modules/slider.js +125 -25
- package/src/definitions/modules/sticky.js +1 -1
- package/src/definitions/modules/tab.js +5 -3
- package/src/definitions/modules/toast.js +1 -1
- package/src/definitions/modules/toast.less +7 -0
- package/src/definitions/modules/transition.js +2 -2
- package/src/definitions/views/comment.less +7 -0
- package/src/definitions/views/feed.less +238 -32
- package/src/definitions/views/item.less +7 -0
- package/src/theme.less +1 -1
- package/src/themes/amazon/elements/button.variables +5 -1
- package/src/themes/bootstrap3/elements/button.variables +5 -1
- package/src/themes/chubby/elements/header.variables +6 -1
- package/src/themes/default/collections/message.variables +3 -9
- package/src/themes/default/collections/table.variables +11 -8
- package/src/themes/default/elements/button.variables +8 -10
- package/src/themes/default/elements/container.variables +3 -0
- package/src/themes/default/elements/emoji.variables +179 -67
- package/src/themes/default/elements/flag.variables +1 -1
- package/src/themes/default/elements/label.variables +6 -1
- package/src/themes/default/elements/segment.variables +8 -0
- package/src/themes/default/globals/site.variables +362 -341
- package/src/themes/default/globals/variation.variables +24 -1
- package/src/themes/default/modules/calendar.variables +11 -0
- package/src/themes/default/modules/checkbox.variables +12 -0
- package/src/themes/default/modules/dropdown.variables +10 -4
- package/src/themes/default/modules/modal.variables +3 -0
- package/src/themes/default/modules/popup.variables +1 -1
- package/src/themes/default/modules/search.variables +3 -0
- package/src/themes/default/modules/toast.variables +6 -5
- package/src/themes/default/views/card.variables +4 -12
- package/src/themes/default/views/feed.variables +55 -1
- package/src/themes/default/views/item.variables +5 -5
- package/src/themes/flat/collections/form.variables +4 -4
- package/src/themes/flat/globals/site.variables +1 -1
- package/src/themes/github/elements/button.variables +5 -1
- package/src/themes/joypixels/elements/emoji.variables +182 -70
- package/src/themes/material/globals/site.variables +1 -1
- package/src/themes/twitter/elements/button.variables +5 -1
- package/src/themes/twitter/elements/emoji.variables +178 -66
- package/tasks/admin/components/create.js +1 -2
- package/tasks/admin/components/init.js +3 -4
- package/tasks/admin/components/update.js +2 -3
- package/tasks/admin/distributions/create.js +9 -5
- package/tasks/admin/distributions/init.js +3 -4
- package/tasks/admin/distributions/update.js +2 -3
- package/tasks/config/project/install.js +3 -0
- package/tasks/config/tasks.js +1 -8
- package/tasks/config/user.js +1 -1
- package/tasks/docs/build.js +2 -2
- package/tasks/docs/metadata.js +1 -1
- package/tasks/docs/serve.js +1 -1
- package/tasks/install.js +19 -10
- package/tasks/watch.js +1 -2
- package/types/fomantic-ui-accordion.d.ts +244 -0
- package/types/fomantic-ui-api.d.ts +555 -0
- package/types/fomantic-ui-calendar.d.ts +766 -0
- package/types/fomantic-ui-checkbox.d.ts +332 -0
- package/types/fomantic-ui-dimmer.d.ts +408 -0
- package/types/fomantic-ui-dropdown.d.ts +1183 -0
- package/types/fomantic-ui-embed.d.ts +326 -0
- package/types/fomantic-ui-flyout.d.ts +525 -0
- package/types/fomantic-ui-form.d.ts +651 -0
- package/types/fomantic-ui-modal.d.ts +471 -0
- package/types/fomantic-ui-nag.d.ts +270 -0
- package/types/fomantic-ui-popup.d.ts +523 -0
- package/types/fomantic-ui-progress.d.ts +459 -0
- package/types/fomantic-ui-rating.d.ts +187 -0
- package/types/fomantic-ui-search.d.ts +496 -0
- package/types/fomantic-ui-shape.d.ts +274 -0
- package/types/fomantic-ui-sidebar.d.ts +402 -0
- package/types/fomantic-ui-slider.d.ts +316 -0
- package/types/fomantic-ui-sticky.d.ts +215 -0
- package/types/fomantic-ui-tab.d.ts +361 -0
- package/types/fomantic-ui-tests.ts +25 -0
- package/types/fomantic-ui-toast.d.ts +514 -0
- package/types/fomantic-ui-transition.d.ts +355 -0
- package/types/fomantic-ui-visibility.d.ts +355 -0
- package/types/index.d.ts +63 -0
- package/types/tsconfig.json +23 -0
- package/types/tslint.json +1 -0
@@ -0,0 +1,274 @@
|
|
1
|
+
declare namespace FomanticUI {
|
2
|
+
interface Shape {
|
3
|
+
settings: ShapeSettings;
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Flips the shape upward.
|
7
|
+
*/
|
8
|
+
(behavior: 'flip up'): JQuery;
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Flips the shape downward.
|
12
|
+
*/
|
13
|
+
(behavior: 'flip down'): JQuery;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Flips the shape right.
|
17
|
+
*/
|
18
|
+
(behavior: 'flip right'): JQuery;
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Flips the shape left.
|
22
|
+
*/
|
23
|
+
(behavior: 'flip left'): JQuery;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Flips the shape over clock-wise.
|
27
|
+
*/
|
28
|
+
(behavior: 'flip over'): JQuery;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Flips the shape over counter-clockwise.
|
32
|
+
*/
|
33
|
+
(behavior: 'flip back'): JQuery;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Set the next side to a specific selector.
|
37
|
+
*/
|
38
|
+
(behavior: 'set next side', selector: string): JQuery;
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Returns whether shape is currently animating.
|
42
|
+
*/
|
43
|
+
(behavior: 'is animating'): boolean;
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Removes all inline styles.
|
47
|
+
*/
|
48
|
+
(behavior: 'reset'): JQuery;
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Queues an animation after current animation.
|
52
|
+
*/
|
53
|
+
(behavior: 'queue', animation: string): JQuery;
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Forces a reflow on element.
|
57
|
+
*/
|
58
|
+
(behavior: 'repaint', animation: string): JQuery;
|
59
|
+
|
60
|
+
/**
|
61
|
+
* Set the next side to next sibling to active element.
|
62
|
+
*/
|
63
|
+
(behavior: 'set default side'): JQuery;
|
64
|
+
|
65
|
+
/**
|
66
|
+
* Sets shape to the content size of the next side.
|
67
|
+
*/
|
68
|
+
(behavior: 'set stage size'): JQuery;
|
69
|
+
|
70
|
+
/**
|
71
|
+
* Refreshes the selector cache for element sides.
|
72
|
+
*/
|
73
|
+
(behavior: 'refresh'): JQuery;
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Returns translation for next side staged below.
|
77
|
+
*/
|
78
|
+
(behavior: 'get transform down'): object;
|
79
|
+
|
80
|
+
/**
|
81
|
+
* Returns translation for next side staged left.
|
82
|
+
*/
|
83
|
+
(behavior: 'get transform left'): object;
|
84
|
+
|
85
|
+
/**
|
86
|
+
* Returns translation for next side staged right.
|
87
|
+
*/
|
88
|
+
(behavior: 'get transform right'): object;
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Returns translation for next side staged up.
|
92
|
+
*/
|
93
|
+
(behavior: 'get transform up'): object;
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Returns translation for next side staged down.
|
97
|
+
*/
|
98
|
+
(behavior: 'get transform down'): object;
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Destroys instance and removes all events.
|
102
|
+
*/
|
103
|
+
(behavior: 'destroy'): JQuery;
|
104
|
+
|
105
|
+
<K extends keyof ShapeSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<ShapeSettings, keyof ShapeSettings>>;
|
106
|
+
<K extends keyof ShapeSettings>(behavior: 'setting', name: K, value: ShapeSettings[K]): JQuery;
|
107
|
+
(behavior: 'setting', value: Partial<Pick<ShapeSettings, keyof ShapeSettings>>): JQuery;
|
108
|
+
(settings?: Partial<Pick<ShapeSettings, keyof ShapeSettings>>): JQuery;
|
109
|
+
}
|
110
|
+
|
111
|
+
/**
|
112
|
+
* @see {@link https://fomantic-ui.com/modules/shape.html#/settings}
|
113
|
+
*/
|
114
|
+
interface ShapeSettings {
|
115
|
+
// region Shape Settings
|
116
|
+
|
117
|
+
/**
|
118
|
+
* Duration of side change animation.
|
119
|
+
* @default false
|
120
|
+
*/
|
121
|
+
duration: false | string;
|
122
|
+
|
123
|
+
/**
|
124
|
+
* Width during animation, can be set to 'auto', 'initial', 'next' or pixel amount.
|
125
|
+
* @default 'initial'
|
126
|
+
*/
|
127
|
+
width: 'auto' | 'initial' | 'next' | number;
|
128
|
+
|
129
|
+
/**
|
130
|
+
* Height during animation, can be set to 'auto', 'initial', 'next' or pixel amount.
|
131
|
+
* @default 'initial'
|
132
|
+
*/
|
133
|
+
height: 'auto' | 'initial' | 'next' | number;
|
134
|
+
|
135
|
+
/**
|
136
|
+
* Fudge factor in pixels when swapping from 2d to 3d (can be useful to correct rounding errors).
|
137
|
+
* @default 0
|
138
|
+
*/
|
139
|
+
jitter: number;
|
140
|
+
|
141
|
+
/**
|
142
|
+
* Allow animation to same side.
|
143
|
+
* @default false
|
144
|
+
*/
|
145
|
+
allowRepeats: boolean;
|
146
|
+
|
147
|
+
// endregion
|
148
|
+
|
149
|
+
// region Callbacks
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Is called before side change.
|
153
|
+
*/
|
154
|
+
onBeforeChange(this: JQuery): void;
|
155
|
+
|
156
|
+
/**
|
157
|
+
* Is called after visible side change.
|
158
|
+
*/
|
159
|
+
onChange(this: JQuery): void;
|
160
|
+
|
161
|
+
// endregion
|
162
|
+
|
163
|
+
// region DOM Settings
|
164
|
+
|
165
|
+
/**
|
166
|
+
* DOM Selectors used internally.
|
167
|
+
* Selectors used to find parts of a module.
|
168
|
+
*/
|
169
|
+
selector: Shape.SelectorSettings;
|
170
|
+
|
171
|
+
/**
|
172
|
+
* Class names used to determine element state.
|
173
|
+
*/
|
174
|
+
className: Shape.ClassNameSettings;
|
175
|
+
|
176
|
+
// endregion
|
177
|
+
|
178
|
+
// region Debug Settings
|
179
|
+
|
180
|
+
/**
|
181
|
+
* Name used in log statements
|
182
|
+
* @default 'Shape'
|
183
|
+
*/
|
184
|
+
name: string;
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Event namespace. Makes sure module teardown does not effect other events attached to an element.
|
188
|
+
* @default 'shape'
|
189
|
+
*/
|
190
|
+
namespace: string;
|
191
|
+
|
192
|
+
/**
|
193
|
+
* Silences all console output including error messages, regardless of other debug settings.
|
194
|
+
* @default false
|
195
|
+
*/
|
196
|
+
silent: boolean;
|
197
|
+
|
198
|
+
/**
|
199
|
+
* Debug output to console
|
200
|
+
* @default false
|
201
|
+
*/
|
202
|
+
debug: boolean;
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Show console.table output with performance metrics
|
206
|
+
* @default true
|
207
|
+
*/
|
208
|
+
performance: boolean;
|
209
|
+
|
210
|
+
/**
|
211
|
+
* Debug output includes all internal behaviors
|
212
|
+
* @default false
|
213
|
+
*/
|
214
|
+
verbose: boolean;
|
215
|
+
|
216
|
+
error: Shape.ErrorSettings;
|
217
|
+
|
218
|
+
// endregion
|
219
|
+
}
|
220
|
+
|
221
|
+
namespace Shape {
|
222
|
+
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
223
|
+
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
224
|
+
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
225
|
+
|
226
|
+
namespace Settings {
|
227
|
+
interface Selectors {
|
228
|
+
/**
|
229
|
+
* @default '.sides'
|
230
|
+
*/
|
231
|
+
sides: string;
|
232
|
+
|
233
|
+
/**
|
234
|
+
* @default '.side'
|
235
|
+
*/
|
236
|
+
side: string;
|
237
|
+
}
|
238
|
+
|
239
|
+
interface ClassNames {
|
240
|
+
/**
|
241
|
+
* @default 'animating'
|
242
|
+
*/
|
243
|
+
animating: string;
|
244
|
+
|
245
|
+
/**
|
246
|
+
* @default 'hidden'
|
247
|
+
*/
|
248
|
+
hidden: string;
|
249
|
+
|
250
|
+
/**
|
251
|
+
* @default 'loading'
|
252
|
+
*/
|
253
|
+
loading: string;
|
254
|
+
|
255
|
+
/**
|
256
|
+
* @default 'active'
|
257
|
+
*/
|
258
|
+
active: string;
|
259
|
+
}
|
260
|
+
|
261
|
+
interface Errors {
|
262
|
+
/**
|
263
|
+
* @default 'You tried to switch to a side that does not exist.'
|
264
|
+
*/
|
265
|
+
side: string;
|
266
|
+
|
267
|
+
/**
|
268
|
+
* @default 'The method you called is not defined'
|
269
|
+
*/
|
270
|
+
method: string;
|
271
|
+
}
|
272
|
+
}
|
273
|
+
}
|
274
|
+
}
|
@@ -0,0 +1,402 @@
|
|
1
|
+
declare namespace FomanticUI {
|
2
|
+
interface Sidebar {
|
3
|
+
settings: SidebarSettings;
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Attaches sidebar action to given selector.
|
7
|
+
* Default event if none specified is 'toggle'.
|
8
|
+
*/
|
9
|
+
(behavior: 'attach events', selector: string, event: string): JQuery;
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Shows sidebar.
|
13
|
+
*/
|
14
|
+
(behavior: 'show'): JQuery;
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Hides sidebar.
|
18
|
+
*/
|
19
|
+
(behavior: 'hide'): JQuery;
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Toggles visibility of sidebar.
|
23
|
+
*/
|
24
|
+
(behavior: 'toggle'): JQuery;
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Returns whether sidebar is visible.
|
28
|
+
*/
|
29
|
+
(behavior: 'is visible'): boolean;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Returns whether sidebar is hidden.
|
33
|
+
*/
|
34
|
+
(behavior: 'is hidden'): boolean;
|
35
|
+
|
36
|
+
/**
|
37
|
+
* Pushes page content to be visible alongside sidebar.
|
38
|
+
*/
|
39
|
+
(behavior: 'push page'): JQuery;
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Returns direction of current sidebar.
|
43
|
+
*/
|
44
|
+
(behavior: 'get direction'): string;
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Returns page content to original position.
|
48
|
+
*/
|
49
|
+
(behavior: 'pull page'): JQuery;
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Adds stylesheet to page head to trigger sidebar animations.
|
53
|
+
*/
|
54
|
+
(behavior: 'add body CSS'): JQuery;
|
55
|
+
|
56
|
+
/**
|
57
|
+
* Removes any inline stylesheets for sidebar animation.
|
58
|
+
*/
|
59
|
+
(behavior: 'remove body CSS'): JQuery;
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Returns vendor prefixed transition end event.
|
63
|
+
*/
|
64
|
+
(behavior: 'get transition event'): string;
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Destroys instance and removes all events.
|
68
|
+
*/
|
69
|
+
(behavior: 'destroy'): JQuery;
|
70
|
+
|
71
|
+
<K extends keyof SidebarSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<SidebarSettings, keyof SidebarSettings>>;
|
72
|
+
<K extends keyof SidebarSettings>(behavior: 'setting', name: K, value: SidebarSettings[K]): JQuery;
|
73
|
+
(behavior: 'setting', value: Partial<Pick<SidebarSettings, keyof SidebarSettings>>): JQuery;
|
74
|
+
(settings?: Partial<Pick<SidebarSettings, keyof SidebarSettings>>): JQuery;
|
75
|
+
}
|
76
|
+
|
77
|
+
/**
|
78
|
+
* @see {@link https://fomantic-ui.com/modules/sidebar.html#/settings}
|
79
|
+
*/
|
80
|
+
interface SidebarSettings {
|
81
|
+
// region Sidebar Settings
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Context which sidebar will appear inside.
|
85
|
+
* @default 'body'
|
86
|
+
*/
|
87
|
+
context: string | JQuery;
|
88
|
+
|
89
|
+
/**
|
90
|
+
* Whether multiple sidebars can be open at once.
|
91
|
+
* @default false
|
92
|
+
*/
|
93
|
+
exclusive: boolean;
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Whether sidebar can be closed by clicking on page.
|
97
|
+
* @default true
|
98
|
+
*/
|
99
|
+
closable: boolean;
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Whether to dim page contents when sidebar is visible.
|
103
|
+
* @default true
|
104
|
+
*/
|
105
|
+
dimPage: boolean;
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Whether dimmer should blur background.
|
109
|
+
* @default false
|
110
|
+
*/
|
111
|
+
blurring: boolean;
|
112
|
+
|
113
|
+
/**
|
114
|
+
* Whether to lock page scroll when sidebar is visible.
|
115
|
+
* @default false
|
116
|
+
*/
|
117
|
+
scrollLock: boolean;
|
118
|
+
|
119
|
+
/**
|
120
|
+
* Whether to return to original scroll position when sidebar is hidden, automatically occurs with 'transition: scale'.
|
121
|
+
* @default false
|
122
|
+
*/
|
123
|
+
returnScroll: boolean;
|
124
|
+
|
125
|
+
/**
|
126
|
+
* When sidebar is initialized without the proper HTML, using this option will defer creation of DOM to use 'requestAnimationFrame'.
|
127
|
+
* @default false
|
128
|
+
*/
|
129
|
+
delaySetup: boolean;
|
130
|
+
|
131
|
+
// endregion
|
132
|
+
|
133
|
+
// region Animation Settings
|
134
|
+
|
135
|
+
/**
|
136
|
+
* Named transition to use when animating sidebar.
|
137
|
+
* Defaults to 'auto' which selects transition from 'defaultTransition' based on direction.
|
138
|
+
* @default 'auto'
|
139
|
+
*/
|
140
|
+
transition: string;
|
141
|
+
|
142
|
+
/**
|
143
|
+
* Named transition to use when animating when detecting mobile device.
|
144
|
+
* Defaults to 'auto' which selects transition from 'defaultTransition' based on direction.
|
145
|
+
* @default 'auto'
|
146
|
+
*/
|
147
|
+
mobileTransition: string;
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Default transitions for each direction and screen size, used with 'transition: auto'.
|
151
|
+
* @default {}
|
152
|
+
*/
|
153
|
+
defaultTransition: object;
|
154
|
+
|
155
|
+
// endregion
|
156
|
+
|
157
|
+
// region Callbacks
|
158
|
+
|
159
|
+
/**
|
160
|
+
* Is called when a sidebar has finished animating in.
|
161
|
+
*/
|
162
|
+
onVisible(this: JQuery): void;
|
163
|
+
|
164
|
+
/**
|
165
|
+
* Is called when a sidebar begins animating in.
|
166
|
+
* Returning 'false' from this callback will cancel the sidebar from showing.
|
167
|
+
*/
|
168
|
+
onShow(this: JQuery): boolean;
|
169
|
+
|
170
|
+
/**
|
171
|
+
* Is called when a sidebar begins to hide or show.
|
172
|
+
*/
|
173
|
+
onChange(this: JQuery): void;
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Is called before a sidebar begins to animate out.
|
177
|
+
* Returning 'false' from this callback will cancel the sidebar from hiding.
|
178
|
+
*/
|
179
|
+
onHide(this: JQuery): boolean;
|
180
|
+
|
181
|
+
/**
|
182
|
+
* Is called after a sidebar has finished animating out.
|
183
|
+
*/
|
184
|
+
onHidden(this: JQuery): void;
|
185
|
+
|
186
|
+
// endregion
|
187
|
+
|
188
|
+
// region DOM Settings
|
189
|
+
|
190
|
+
/**
|
191
|
+
* DOM Selectors used internally.
|
192
|
+
* Selectors used to find parts of a module.
|
193
|
+
*/
|
194
|
+
selector: Sidebar.SelectorSettings;
|
195
|
+
|
196
|
+
/**
|
197
|
+
* Regular expressions used in the module.
|
198
|
+
*/
|
199
|
+
regExp: Sidebar.RegExpSettings;
|
200
|
+
|
201
|
+
/**
|
202
|
+
* Class names used to determine element state.
|
203
|
+
*/
|
204
|
+
className: Sidebar.ClassNameSettings;
|
205
|
+
|
206
|
+
// endregion
|
207
|
+
|
208
|
+
// region Debug Settings
|
209
|
+
|
210
|
+
/**
|
211
|
+
* Name used in log statements
|
212
|
+
* @default 'Sidebar'
|
213
|
+
*/
|
214
|
+
name: string;
|
215
|
+
|
216
|
+
/**
|
217
|
+
* Event namespace. Makes sure module teardown does not effect other events attached to an element.
|
218
|
+
* @default 'sidebar'
|
219
|
+
*/
|
220
|
+
namespace: string;
|
221
|
+
|
222
|
+
/**
|
223
|
+
* Silences all console output including error messages, regardless of other debug settings.
|
224
|
+
* @default false
|
225
|
+
*/
|
226
|
+
silent: boolean;
|
227
|
+
|
228
|
+
/**
|
229
|
+
* Debug output to console
|
230
|
+
* @default false
|
231
|
+
*/
|
232
|
+
debug: boolean;
|
233
|
+
|
234
|
+
/**
|
235
|
+
* Show console.table output with performance metrics
|
236
|
+
* @default true
|
237
|
+
*/
|
238
|
+
performance: boolean;
|
239
|
+
|
240
|
+
/**
|
241
|
+
* Debug output includes all internal behaviors
|
242
|
+
* @default false
|
243
|
+
*/
|
244
|
+
verbose: boolean;
|
245
|
+
|
246
|
+
error: Sidebar.ErrorSettings;
|
247
|
+
|
248
|
+
// endregion
|
249
|
+
}
|
250
|
+
|
251
|
+
namespace Sidebar {
|
252
|
+
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
253
|
+
type RegExpSettings = Partial<Pick<Settings.RegExps, keyof Settings.RegExps>>;
|
254
|
+
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
255
|
+
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
256
|
+
|
257
|
+
namespace Settings {
|
258
|
+
interface Selectors {
|
259
|
+
/**
|
260
|
+
* @default '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close'
|
261
|
+
*/
|
262
|
+
bodyFixed: string;
|
263
|
+
|
264
|
+
/**
|
265
|
+
* @default '.fixed'
|
266
|
+
*/
|
267
|
+
fixed: string;
|
268
|
+
|
269
|
+
/**
|
270
|
+
* @default 'script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed'
|
271
|
+
*/
|
272
|
+
omitted: string;
|
273
|
+
|
274
|
+
/**
|
275
|
+
* @default '.pusher'
|
276
|
+
*/
|
277
|
+
pusher: string;
|
278
|
+
|
279
|
+
/**
|
280
|
+
* @default '.ui.sidebar'
|
281
|
+
*/
|
282
|
+
sidebar: string;
|
283
|
+
}
|
284
|
+
|
285
|
+
interface RegExps {
|
286
|
+
/**
|
287
|
+
* @default /(iPad|iPhone|iPod)/g
|
288
|
+
*/
|
289
|
+
ios: RegExp;
|
290
|
+
|
291
|
+
/**
|
292
|
+
* @default /(CriOS)/g
|
293
|
+
*/
|
294
|
+
mobileChrome: RegExp;
|
295
|
+
|
296
|
+
/**
|
297
|
+
* @default /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g
|
298
|
+
*/
|
299
|
+
mobile: RegExp;
|
300
|
+
}
|
301
|
+
|
302
|
+
interface ClassNames {
|
303
|
+
/**
|
304
|
+
* @default 'active'
|
305
|
+
*/
|
306
|
+
active: string;
|
307
|
+
|
308
|
+
/**
|
309
|
+
* @default 'animating'
|
310
|
+
*/
|
311
|
+
animating: string;
|
312
|
+
|
313
|
+
/**
|
314
|
+
* @default 'blurring'
|
315
|
+
*/
|
316
|
+
blurring: string;
|
317
|
+
|
318
|
+
/**
|
319
|
+
* @default 'closing'
|
320
|
+
*/
|
321
|
+
closing: string;
|
322
|
+
|
323
|
+
/**
|
324
|
+
* @default 'dimmed'
|
325
|
+
*/
|
326
|
+
dimmed: string;
|
327
|
+
|
328
|
+
/**
|
329
|
+
* @default 'ios'
|
330
|
+
*/
|
331
|
+
ios: string;
|
332
|
+
|
333
|
+
/**
|
334
|
+
* @default 'locked'
|
335
|
+
*/
|
336
|
+
locked: string;
|
337
|
+
|
338
|
+
/**
|
339
|
+
* @default 'pushable'
|
340
|
+
*/
|
341
|
+
pushable: string;
|
342
|
+
|
343
|
+
/**
|
344
|
+
* @default 'pushed'
|
345
|
+
*/
|
346
|
+
pushed: string;
|
347
|
+
|
348
|
+
/**
|
349
|
+
* @default 'right'
|
350
|
+
*/
|
351
|
+
right: string;
|
352
|
+
|
353
|
+
/**
|
354
|
+
* @default 'top'
|
355
|
+
*/
|
356
|
+
top: string;
|
357
|
+
|
358
|
+
/**
|
359
|
+
* @default 'left'
|
360
|
+
*/
|
361
|
+
left: string;
|
362
|
+
|
363
|
+
/**
|
364
|
+
* @default 'bottom'
|
365
|
+
*/
|
366
|
+
bottom: string;
|
367
|
+
|
368
|
+
/**
|
369
|
+
* @default 'visible'
|
370
|
+
*/
|
371
|
+
visible: string;
|
372
|
+
}
|
373
|
+
|
374
|
+
interface Errors {
|
375
|
+
/**
|
376
|
+
* @default 'The method you called is not defined.'
|
377
|
+
*/
|
378
|
+
method: string;
|
379
|
+
|
380
|
+
/**
|
381
|
+
* @default 'Had to add pusher element. For optimal performance make sure body content is inside a pusher element'
|
382
|
+
*/
|
383
|
+
pusher: string;
|
384
|
+
|
385
|
+
/**
|
386
|
+
* @default 'Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag'
|
387
|
+
*/
|
388
|
+
movedSidebar: string;
|
389
|
+
|
390
|
+
/**
|
391
|
+
* @default 'The overlay setting is no longer supported, use animation: overlay'
|
392
|
+
*/
|
393
|
+
overlay: string;
|
394
|
+
|
395
|
+
/**
|
396
|
+
* @default 'There were no elements that matched the specified selector'
|
397
|
+
*/
|
398
|
+
notFound: string;
|
399
|
+
}
|
400
|
+
}
|
401
|
+
}
|
402
|
+
}
|