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,523 @@
|
|
1
|
+
declare namespace FomanticUI {
|
2
|
+
interface Popup {
|
3
|
+
settings: PopupSettings;
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Shows popup.
|
7
|
+
*/
|
8
|
+
(behavior: 'show'): JQuery;
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Hides popup.
|
12
|
+
*/
|
13
|
+
(behavior: 'hide'): JQuery;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Hides all visible pop ups on the page.
|
17
|
+
*/
|
18
|
+
(behavior: 'hide all'): JQuery;
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Returns current popup dom element.
|
22
|
+
*/
|
23
|
+
(behavior: 'get popup'): JQuery;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Changes current popup content.
|
27
|
+
*/
|
28
|
+
(behavior: 'change content', html: string): JQuery;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Toggles visibility of popup.
|
32
|
+
*/
|
33
|
+
(behavior: 'toggle'): JQuery;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Returns whether popup is visible.
|
37
|
+
*/
|
38
|
+
(behavior: 'is visible'): boolean;
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Returns whether popup is hidden.
|
42
|
+
*/
|
43
|
+
(behavior: 'is hidden'): boolean;
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Returns whether popup is created and inserted into the page.
|
47
|
+
*/
|
48
|
+
(behavior: 'exists'): boolean;
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Adjusts popup when content size changes (only necessary for centered popups).
|
52
|
+
*/
|
53
|
+
(behavior: 'reposition'): JQuery;
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Repositions a popup.
|
57
|
+
*/
|
58
|
+
(behavior: 'set position', position: number): JQuery;
|
59
|
+
|
60
|
+
/**
|
61
|
+
* Removes popup from the page.
|
62
|
+
*/
|
63
|
+
(behavior: 'remove popup'): JQuery;
|
64
|
+
|
65
|
+
/**
|
66
|
+
* Removes popup from the page and removes all events.
|
67
|
+
*/
|
68
|
+
(behavior: 'destroy'): JQuery;
|
69
|
+
|
70
|
+
<K extends keyof PopupSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<PopupSettings, keyof PopupSettings>>;
|
71
|
+
<K extends keyof PopupSettings>(behavior: 'setting', name: K, value: PopupSettings[K]): JQuery;
|
72
|
+
(behavior: 'setting', value: Partial<Pick<PopupSettings, keyof PopupSettings>>): JQuery;
|
73
|
+
(settings?: Partial<Pick<PopupSettings, keyof PopupSettings>>): JQuery;
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* @see {@link https://fomantic-ui.com/modules/popup.html#/settings}
|
78
|
+
*/
|
79
|
+
interface PopupSettings {
|
80
|
+
// region Popup Settings
|
81
|
+
|
82
|
+
/**
|
83
|
+
* Can specify a DOM element that should be used as the popup.
|
84
|
+
* This is useful for including a pre-formatted popup.
|
85
|
+
* @default false
|
86
|
+
*/
|
87
|
+
popup: false | string;
|
88
|
+
|
89
|
+
/**
|
90
|
+
* Whether all other popups should be hidden when this popup is opened.
|
91
|
+
* @default false
|
92
|
+
*/
|
93
|
+
exclusive: boolean;
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Whether to move popup to same offset container as target element when popup already exists on the page.
|
97
|
+
* Using a popup inside of an element without 'overflow:visible', like a sidebar, may require you to set this to 'false'.
|
98
|
+
* @default true
|
99
|
+
*/
|
100
|
+
movePopup: boolean;
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Whether popup should attach 'mutationObservers' to automatically run destroy when the element is removed from the page's DOM.
|
104
|
+
* @default true
|
105
|
+
*/
|
106
|
+
observeChanges: boolean;
|
107
|
+
|
108
|
+
/**
|
109
|
+
* When the popup surpasses the boundary of this element, it will attempt to find another display position.
|
110
|
+
* @default window
|
111
|
+
*/
|
112
|
+
boundary: Window | string;
|
113
|
+
|
114
|
+
/**
|
115
|
+
* Selector or jquery object specifying where the popup should be created.
|
116
|
+
* @default 'body'
|
117
|
+
*/
|
118
|
+
context: string | JQuery;
|
119
|
+
|
120
|
+
/**
|
121
|
+
* Will automatically hide a popup on scroll event in this context.
|
122
|
+
* @default window
|
123
|
+
*/
|
124
|
+
scrollContext: Window | string;
|
125
|
+
|
126
|
+
/**
|
127
|
+
* Number of pixels that a popup is allowed to appear outside the boundaries of its context.
|
128
|
+
* This allows for permissible rounding errors when an element is against the edge of its 'context'.
|
129
|
+
* @default 2
|
130
|
+
*/
|
131
|
+
jitter: number;
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Position that the popup should appear.
|
135
|
+
* @default 'top left'
|
136
|
+
*/
|
137
|
+
position: string;
|
138
|
+
|
139
|
+
/**
|
140
|
+
* If given position should be used, regardless if popup fits.
|
141
|
+
* @default false
|
142
|
+
*/
|
143
|
+
forcePosition: boolean;
|
144
|
+
|
145
|
+
/**
|
146
|
+
* If a popup is inline it will be created next to current element, allowing for local css rules to apply.
|
147
|
+
* It will not be removed from the DOM after being hidden.
|
148
|
+
* Otherwise popups will appended to body and removed after being hidden.
|
149
|
+
* @default false
|
150
|
+
*/
|
151
|
+
inline: boolean;
|
152
|
+
|
153
|
+
/**
|
154
|
+
* Whether popup contents should be preserved in the page after being hidden, allowing it to re-appear slightly faster on subsequent loads.
|
155
|
+
* @default false
|
156
|
+
*/
|
157
|
+
preserve: boolean;
|
158
|
+
|
159
|
+
/**
|
160
|
+
* Can be set to 'adjacent' or 'opposite' to prefer adjacent or opposite position if popup cannot fit on screen.
|
161
|
+
* @default 'opposite'
|
162
|
+
*/
|
163
|
+
prefer: 'opposite' | 'adjacent';
|
164
|
+
|
165
|
+
/**
|
166
|
+
* When set to 'false', a popup will not appear and produce an error message if it cannot entirely fit on page.
|
167
|
+
* Setting this to a position like, 'right center' forces the popup to use this position as a last resort even if it is partially offstage.
|
168
|
+
* Setting this to 'true' will use the last attempted position.
|
169
|
+
* @default false
|
170
|
+
*/
|
171
|
+
lastResort: boolean | string;
|
172
|
+
|
173
|
+
/**
|
174
|
+
* Event used to trigger popup.
|
175
|
+
* Can be either 'focus', 'click', 'hover', or 'manual'.
|
176
|
+
* Manual popups must be triggered with '$('.element').popup('show');'.
|
177
|
+
* @default 'hover'
|
178
|
+
*/
|
179
|
+
on: 'hover' | 'focus' | 'click' | 'manual';
|
180
|
+
|
181
|
+
/**
|
182
|
+
* Delay in milliseconds before showing or hiding a popup on hover or focus.
|
183
|
+
* @default {}
|
184
|
+
*/
|
185
|
+
delay: object; // TODO
|
186
|
+
|
187
|
+
/**
|
188
|
+
* Named transition to use when animating menu in and out.
|
189
|
+
* Alternatively you can provide an object to set individual values for hide/show transitions as well as hide/show duration.
|
190
|
+
* @default 'scale'
|
191
|
+
*/
|
192
|
+
transition: string | object;
|
193
|
+
|
194
|
+
/**
|
195
|
+
* Duration of animation events.
|
196
|
+
* The value will be ignored when individual hide/show duration values are provided via the 'transition' setting.
|
197
|
+
* @default 200
|
198
|
+
*/
|
199
|
+
duration: number;
|
200
|
+
|
201
|
+
/**
|
202
|
+
* When a target element is less than 2x this amount, the popup will appear with the arrow centered on the target element, instead of with the popup edge matching the target's edge.
|
203
|
+
* @default 20
|
204
|
+
*/
|
205
|
+
arrowPixelsFromEdge: number;
|
206
|
+
|
207
|
+
/**
|
208
|
+
* Whether popup should set fluid popup variation width on load to avoid 'width: 100%' including padding.
|
209
|
+
* @default true
|
210
|
+
*/
|
211
|
+
setFluidWidth: boolean;
|
212
|
+
|
213
|
+
/**
|
214
|
+
* Whether popup should not close on hover (useful for popup navigation menus).
|
215
|
+
* @default false
|
216
|
+
*/
|
217
|
+
hoverable: boolean;
|
218
|
+
|
219
|
+
/**
|
220
|
+
* Whether popup should hide when clicking on the page, 'auto' only hides for popups without on: 'hover'.
|
221
|
+
* @default true
|
222
|
+
*/
|
223
|
+
closable: boolean | 'auto';
|
224
|
+
|
225
|
+
/**
|
226
|
+
* When using on: 'hover' whether 'touchstart' events should be added to allow the popup to be triggered.
|
227
|
+
* @default true
|
228
|
+
*/
|
229
|
+
addTouchEvents: boolean;
|
230
|
+
|
231
|
+
/**
|
232
|
+
* Whether popup should hide on scroll or touchmove, 'auto' only hides for popups without on: 'click'.
|
233
|
+
* Set this to 'false' to prevent mobile browsers from closing popups when you tap inside input fields.
|
234
|
+
* @default 'auto'
|
235
|
+
*/
|
236
|
+
hideOnScroll: 'auto' | boolean;
|
237
|
+
|
238
|
+
/**
|
239
|
+
* If a selector or jQuery object is specified this allows the popup to be positioned relative to that element.
|
240
|
+
* @default false
|
241
|
+
*/
|
242
|
+
target: false | string | JQuery;
|
243
|
+
|
244
|
+
/**
|
245
|
+
* Offset for distance of popup from element.
|
246
|
+
* @default 0
|
247
|
+
*/
|
248
|
+
distanceAway: number;
|
249
|
+
|
250
|
+
/**
|
251
|
+
* Offset in pixels from calculated position.
|
252
|
+
* @default 0
|
253
|
+
*/
|
254
|
+
offset: number;
|
255
|
+
|
256
|
+
/**
|
257
|
+
* Number of iterations before giving up search for popup position when a popup cannot fit on screen.
|
258
|
+
* @default 15
|
259
|
+
*/
|
260
|
+
maxSearchDepth: number;
|
261
|
+
|
262
|
+
// endregion
|
263
|
+
|
264
|
+
// region Callbacks
|
265
|
+
|
266
|
+
/**
|
267
|
+
* Callback on popup element creation, with created popup.
|
268
|
+
*/
|
269
|
+
onCreate(this: JQuery): void;
|
270
|
+
|
271
|
+
/**
|
272
|
+
* Callback immediately before Popup is removed from DOM.
|
273
|
+
*/
|
274
|
+
onRemove(this: JQuery): void;
|
275
|
+
|
276
|
+
/**
|
277
|
+
* Callback before popup is shown.
|
278
|
+
* Returning 'false' from this callback will cancel the popup from showing.
|
279
|
+
*/
|
280
|
+
onShow(this: JQuery): boolean;
|
281
|
+
|
282
|
+
/**
|
283
|
+
* Callback after popup is shown.
|
284
|
+
*/
|
285
|
+
onVisible(this: JQuery): void;
|
286
|
+
|
287
|
+
/**
|
288
|
+
* Callback before popup is hidden.
|
289
|
+
* Returning 'false' from this callback will cancel the popup from hiding.
|
290
|
+
*/
|
291
|
+
onHide(this: JQuery): boolean;
|
292
|
+
|
293
|
+
/**
|
294
|
+
* Callback after popup is hidden.
|
295
|
+
*/
|
296
|
+
onHidden(this: JQuery): void;
|
297
|
+
|
298
|
+
/**
|
299
|
+
* Callback after popup cannot be placed on screen.
|
300
|
+
*/
|
301
|
+
onUnplaceable(this: JQuery): void;
|
302
|
+
|
303
|
+
// endregion
|
304
|
+
|
305
|
+
// region Content Settings
|
306
|
+
|
307
|
+
/**
|
308
|
+
* Popup variation to use, can use multiple variations with a space delimiter.
|
309
|
+
*/
|
310
|
+
variation: string;
|
311
|
+
|
312
|
+
/**
|
313
|
+
* Content to display.
|
314
|
+
*/
|
315
|
+
content: string;
|
316
|
+
|
317
|
+
/**
|
318
|
+
* Title to display alongside content.
|
319
|
+
*/
|
320
|
+
title: string;
|
321
|
+
|
322
|
+
/**
|
323
|
+
* HTML content to display instead of preformatted title and content.
|
324
|
+
*/
|
325
|
+
html: string;
|
326
|
+
|
327
|
+
// endregion
|
328
|
+
|
329
|
+
// region DOM Settings
|
330
|
+
|
331
|
+
/**
|
332
|
+
* DOM Selectors used internally.
|
333
|
+
* Selectors used to find parts of a module.
|
334
|
+
*/
|
335
|
+
selector: Popup.SelectorSettings;
|
336
|
+
|
337
|
+
/**
|
338
|
+
* Class names used to determine element state.
|
339
|
+
*/
|
340
|
+
metadata: Popup.MetadataSettings;
|
341
|
+
|
342
|
+
/**
|
343
|
+
* Class names used to determine element state.
|
344
|
+
*/
|
345
|
+
className: Popup.ClassNameSettings;
|
346
|
+
|
347
|
+
// endregion
|
348
|
+
|
349
|
+
// region Debug Settings
|
350
|
+
|
351
|
+
/**
|
352
|
+
* Name used in log statements
|
353
|
+
* @default 'Popup'
|
354
|
+
*/
|
355
|
+
name: string;
|
356
|
+
|
357
|
+
/**
|
358
|
+
* Event namespace. Makes sure module teardown does not effect other events attached to an element.
|
359
|
+
* @default 'popup'
|
360
|
+
*/
|
361
|
+
namespace: string;
|
362
|
+
|
363
|
+
/**
|
364
|
+
* Silences all console output including error messages, regardless of other debug settings.
|
365
|
+
* @default false
|
366
|
+
*/
|
367
|
+
silent: boolean;
|
368
|
+
|
369
|
+
/**
|
370
|
+
* Debug output to console
|
371
|
+
* @default false
|
372
|
+
*/
|
373
|
+
debug: boolean;
|
374
|
+
|
375
|
+
/**
|
376
|
+
* Show console.table output with performance metrics
|
377
|
+
* @default true
|
378
|
+
*/
|
379
|
+
performance: boolean;
|
380
|
+
|
381
|
+
/**
|
382
|
+
* Debug output includes all internal behaviors
|
383
|
+
* @default false
|
384
|
+
*/
|
385
|
+
verbose: boolean;
|
386
|
+
|
387
|
+
error: Popup.ErrorSettings;
|
388
|
+
|
389
|
+
// endregion
|
390
|
+
}
|
391
|
+
|
392
|
+
namespace Popup {
|
393
|
+
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
394
|
+
type MetadataSettings = Partial<Pick<Settings.Metadatas, keyof Settings.Metadatas>>;
|
395
|
+
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
396
|
+
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
397
|
+
|
398
|
+
namespace Settings {
|
399
|
+
interface Selectors {
|
400
|
+
/**
|
401
|
+
* @default '.ui.popup'
|
402
|
+
*/
|
403
|
+
popup: string;
|
404
|
+
}
|
405
|
+
|
406
|
+
interface Metadatas {
|
407
|
+
/**
|
408
|
+
* @default 'activator'
|
409
|
+
*/
|
410
|
+
activator: string;
|
411
|
+
|
412
|
+
/**
|
413
|
+
* @default 'content'
|
414
|
+
*/
|
415
|
+
content: string;
|
416
|
+
|
417
|
+
/**
|
418
|
+
* @default 'html'
|
419
|
+
*/
|
420
|
+
html: string;
|
421
|
+
|
422
|
+
/**
|
423
|
+
* @default 'offset'
|
424
|
+
*/
|
425
|
+
offset: string;
|
426
|
+
|
427
|
+
/**
|
428
|
+
* @default 'position'
|
429
|
+
*/
|
430
|
+
position: string;
|
431
|
+
|
432
|
+
/**
|
433
|
+
* @default 'title'
|
434
|
+
*/
|
435
|
+
title: string;
|
436
|
+
|
437
|
+
/**
|
438
|
+
* @default 'variation'
|
439
|
+
*/
|
440
|
+
variation: string;
|
441
|
+
}
|
442
|
+
|
443
|
+
interface ClassNames {
|
444
|
+
/**
|
445
|
+
* @default 'active'
|
446
|
+
*/
|
447
|
+
active: string;
|
448
|
+
|
449
|
+
/**
|
450
|
+
* @default 'basic'
|
451
|
+
*/
|
452
|
+
basic: string;
|
453
|
+
|
454
|
+
/**
|
455
|
+
* @default 'animating'
|
456
|
+
*/
|
457
|
+
animating: string;
|
458
|
+
|
459
|
+
/**
|
460
|
+
* @default 'dropdown'
|
461
|
+
*/
|
462
|
+
dropdown: string;
|
463
|
+
|
464
|
+
/**
|
465
|
+
* @default 'fluid'
|
466
|
+
*/
|
467
|
+
fluid: string;
|
468
|
+
|
469
|
+
/**
|
470
|
+
* @default 'loading'
|
471
|
+
*/
|
472
|
+
loading: string;
|
473
|
+
|
474
|
+
/**
|
475
|
+
* @default 'ui popup'
|
476
|
+
*/
|
477
|
+
popup: string;
|
478
|
+
|
479
|
+
/**
|
480
|
+
* @default 'top left center bottom right'
|
481
|
+
*/
|
482
|
+
position: string;
|
483
|
+
|
484
|
+
/**
|
485
|
+
* @default 'visible'
|
486
|
+
*/
|
487
|
+
visible: string;
|
488
|
+
|
489
|
+
/**
|
490
|
+
* @default 'visible'
|
491
|
+
*/
|
492
|
+
popupVisible: string;
|
493
|
+
}
|
494
|
+
|
495
|
+
interface Errors {
|
496
|
+
/**
|
497
|
+
* @default 'The position you specified is not a valid position'
|
498
|
+
*/
|
499
|
+
invalidPosition: string;
|
500
|
+
|
501
|
+
/**
|
502
|
+
* @default 'Popup does not fit within the boundaries of the viewport'
|
503
|
+
*/
|
504
|
+
cannotPlace: string;
|
505
|
+
|
506
|
+
/**
|
507
|
+
* @default 'The method you called is not defined.'
|
508
|
+
*/
|
509
|
+
method: string;
|
510
|
+
|
511
|
+
/**
|
512
|
+
* @default 'This module requires ui transitions'
|
513
|
+
*/
|
514
|
+
noTransition: string;
|
515
|
+
|
516
|
+
/**
|
517
|
+
* @default 'The target or popup you specified does not exist on the page'
|
518
|
+
*/
|
519
|
+
notFound: string;
|
520
|
+
}
|
521
|
+
}
|
522
|
+
}
|
523
|
+
}
|