@brandocms/jupiter 3.54.4 → 4.0.0-beta.1
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/README.md +318 -52
- package/package.json +26 -16
- package/src/index.js +5 -0
- package/src/modules/Application/index.js +37 -5
- package/src/modules/Breakpoints/index.js +116 -36
- package/src/modules/Cookies/index.js +67 -15
- package/src/modules/CoverOverlay/index.js +2 -2
- package/src/modules/Dom/index.js +6 -0
- package/src/modules/Dropdown/index.js +15 -6
- package/src/modules/EqualHeightElements/index.js +8 -6
- package/src/modules/EqualHeightImages/index.js +9 -6
- package/src/modules/FixedHeader/index.js +57 -1
- package/src/modules/FooterReveal/index.js +3 -3
- package/src/modules/HeroSlider/index.js +39 -30
- package/src/modules/HeroVideo/index.js +64 -24
- package/src/modules/Lazyload/index.js +27 -0
- package/src/modules/Lightbox/index.js +90 -31
- package/src/modules/Links/index.js +23 -2
- package/src/modules/MobileMenu/index.js +50 -21
- package/src/modules/Moonwalk/index.js +131 -4
- package/src/modules/Parallax/index.js +280 -57
- package/src/modules/Popover/index.js +28 -16
- package/src/modules/Popup/index.js +155 -29
- package/src/modules/ScrollSpy/index.js +21 -0
- package/src/modules/StackedBoxes/index.js +6 -4
- package/src/modules/StickyHeader/index.js +45 -24
- package/src/modules/Toggler/index.js +44 -5
- package/src/modules/Typography/index.js +33 -20
- package/types/README.md +159 -0
- package/types/events/index.d.ts +20 -0
- package/types/index.d.ts +35 -0
- package/types/modules/Application/index.d.ts +168 -0
- package/types/modules/Breakpoints/index.d.ts +38 -0
- package/types/modules/Cookies/index.d.ts +81 -0
- package/types/modules/CoverOverlay/index.d.ts +6 -0
- package/types/modules/Dataloader/index.d.ts +35 -0
- package/types/modules/Dom/index.d.ts +40 -0
- package/types/modules/Dropdown/index.d.ts +38 -0
- package/types/modules/EqualHeightElements/index.d.ts +8 -0
- package/types/modules/EqualHeightImages/index.d.ts +11 -0
- package/types/modules/FeatureTests/index.d.ts +27 -0
- package/types/modules/FixedHeader/index.d.ts +219 -0
- package/types/modules/Fontloader/index.d.ts +5 -0
- package/types/modules/FooterReveal/index.d.ts +5 -0
- package/types/modules/HeroSlider/index.d.ts +28 -0
- package/types/modules/HeroVideo/index.d.ts +83 -0
- package/types/modules/Lazyload/index.d.ts +80 -0
- package/types/modules/Lightbox/index.d.ts +128 -0
- package/types/modules/Links/index.d.ts +55 -0
- package/types/modules/Marquee/index.d.ts +23 -0
- package/types/modules/MobileMenu/index.d.ts +63 -0
- package/types/modules/Moonwalk/index.d.ts +331 -0
- package/types/modules/Parallax/index.d.ts +93 -0
- package/types/modules/Popover/index.d.ts +17 -0
- package/types/modules/Popup/index.d.ts +89 -0
- package/types/modules/ScrollSpy/index.d.ts +29 -0
- package/types/modules/StackedBoxes/index.d.ts +9 -0
- package/types/modules/StickyHeader/index.d.ts +63 -0
- package/types/modules/Toggler/index.d.ts +26 -0
- package/types/modules/Typography/index.d.ts +77 -0
- package/types/utils/dispatchElementEvent.d.ts +1 -0
- package/types/utils/imageIsLoaded.d.ts +1 -0
- package/types/utils/imagesAreLoaded.d.ts +1 -0
- package/types/utils/loadScript.d.ts +2 -0
- package/types/utils/prefersReducedMotion.d.ts +4 -0
- package/types/utils/rafCallback.d.ts +2 -0
- package/types/utils/zoom.d.ts +4 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default class Marquee {
|
|
2
|
+
constructor(app: any, el: any, opts: any);
|
|
3
|
+
opts: any;
|
|
4
|
+
app: any;
|
|
5
|
+
elements: {};
|
|
6
|
+
timeline: any;
|
|
7
|
+
observer: IntersectionObserver;
|
|
8
|
+
initialize(): void;
|
|
9
|
+
revealMarquee(e: any): void;
|
|
10
|
+
updateMarquee(e: any): void;
|
|
11
|
+
duration: number;
|
|
12
|
+
clearHolders(): void;
|
|
13
|
+
killTweens(): void;
|
|
14
|
+
initializeTween(): void;
|
|
15
|
+
play(rampUp?: boolean): void;
|
|
16
|
+
playing: boolean;
|
|
17
|
+
pause(): void;
|
|
18
|
+
slowDown(): void;
|
|
19
|
+
speedUp(): void;
|
|
20
|
+
setupObserver(): void;
|
|
21
|
+
fillText(): void;
|
|
22
|
+
setHeight(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MobileMenu component for mobile navigation menu
|
|
3
|
+
*/
|
|
4
|
+
export default class MobileMenu {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new MobileMenu instance
|
|
7
|
+
* @param {Object} app - Application instance
|
|
8
|
+
* @param {MobileMenuOptions} [opts={}] - MobileMenu options
|
|
9
|
+
*/
|
|
10
|
+
constructor(app: any, opts?: MobileMenuOptions);
|
|
11
|
+
app: any;
|
|
12
|
+
opts: any;
|
|
13
|
+
open: boolean;
|
|
14
|
+
header: HTMLElement;
|
|
15
|
+
bg: Element;
|
|
16
|
+
logo: Element;
|
|
17
|
+
logoPath: NodeListOf<any>;
|
|
18
|
+
menuButton: Element;
|
|
19
|
+
hamburger: Element;
|
|
20
|
+
hamburgerInner: Element;
|
|
21
|
+
content: NodeListOf<any>;
|
|
22
|
+
lis: NodeListOf<any>;
|
|
23
|
+
nav: HTMLElement;
|
|
24
|
+
toggleMenu(): void;
|
|
25
|
+
toggleMenuClosed(): void;
|
|
26
|
+
toggleMenuOpen(): void;
|
|
27
|
+
_emitMobileMenuOpenEvent(): void;
|
|
28
|
+
_emitMobileMenuClosedEvent(): void;
|
|
29
|
+
}
|
|
30
|
+
export type MobileMenuOptions = {
|
|
31
|
+
/**
|
|
32
|
+
* - Color for logo when menu is open
|
|
33
|
+
*/
|
|
34
|
+
logoColor?: string;
|
|
35
|
+
/**
|
|
36
|
+
* - Selector for logo SVG paths
|
|
37
|
+
*/
|
|
38
|
+
logoPathSelector?: string;
|
|
39
|
+
/**
|
|
40
|
+
* - Selector for menu content
|
|
41
|
+
*/
|
|
42
|
+
contentSelector?: string;
|
|
43
|
+
/**
|
|
44
|
+
* - Selector for menu items
|
|
45
|
+
*/
|
|
46
|
+
liSelector?: string;
|
|
47
|
+
/**
|
|
48
|
+
* - Color for hamburger icon
|
|
49
|
+
*/
|
|
50
|
+
hamburgerColor?: string;
|
|
51
|
+
/**
|
|
52
|
+
* - Called when window is resized
|
|
53
|
+
*/
|
|
54
|
+
onResize?: Function | null;
|
|
55
|
+
/**
|
|
56
|
+
* - Animation for opening menu
|
|
57
|
+
*/
|
|
58
|
+
openTween?: Function;
|
|
59
|
+
/**
|
|
60
|
+
* - Animation for closing menu
|
|
61
|
+
*/
|
|
62
|
+
closeTween?: Function;
|
|
63
|
+
};
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Moonwalk animation system for scroll-based reveal animations
|
|
3
|
+
*/
|
|
4
|
+
export default class Moonwalk {
|
|
5
|
+
/**
|
|
6
|
+
* @param {Object} app - The application instance
|
|
7
|
+
* @param {MoonwalkOptions} [opts={}] - Configuration options
|
|
8
|
+
* @param {HTMLElement} [container=document.body] - Container element
|
|
9
|
+
*/
|
|
10
|
+
constructor(app: any, opts?: MoonwalkOptions, container?: HTMLElement);
|
|
11
|
+
app: any;
|
|
12
|
+
opts: any;
|
|
13
|
+
initialize(container?: HTMLElement): void;
|
|
14
|
+
sections: {
|
|
15
|
+
id: string;
|
|
16
|
+
el: any;
|
|
17
|
+
name: any;
|
|
18
|
+
timeline: any;
|
|
19
|
+
observer: any;
|
|
20
|
+
stage: {
|
|
21
|
+
name: any;
|
|
22
|
+
running: boolean;
|
|
23
|
+
firstTween: boolean;
|
|
24
|
+
};
|
|
25
|
+
elements: any[];
|
|
26
|
+
}[];
|
|
27
|
+
runs: {
|
|
28
|
+
el: Element;
|
|
29
|
+
threshold: any;
|
|
30
|
+
initialize: any;
|
|
31
|
+
callback: any;
|
|
32
|
+
onExit: any;
|
|
33
|
+
repeated: any;
|
|
34
|
+
rootMargin: any;
|
|
35
|
+
}[];
|
|
36
|
+
/**
|
|
37
|
+
* Add `moonwalk` class to html element to identify ourselves.
|
|
38
|
+
*/
|
|
39
|
+
addClass(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Matching moonwalk elements before the element matching the hash should be set to visible
|
|
42
|
+
* by setting the `data-moonwalked` attribute on `data-moonwalk` elements and
|
|
43
|
+
* `data-moonwalk-section-ready` on `data-moonwalk-section` elements.
|
|
44
|
+
*/
|
|
45
|
+
walkToThisPoint(hash: any): void;
|
|
46
|
+
/**
|
|
47
|
+
* Remove all moonwalks. Useful for clients who prefer reduced motion
|
|
48
|
+
*/
|
|
49
|
+
removeAllWalks(container?: HTMLElement): void;
|
|
50
|
+
removeFor(container: HTMLElement, selector: any): void;
|
|
51
|
+
/**
|
|
52
|
+
* Remove run matching name
|
|
53
|
+
*/
|
|
54
|
+
removeRun(container: HTMLElement, name: any): void;
|
|
55
|
+
/**
|
|
56
|
+
* Remove all runs
|
|
57
|
+
*/
|
|
58
|
+
removeRuns(container?: HTMLElement): void;
|
|
59
|
+
/**
|
|
60
|
+
* Add a random ID to each moonwalk element
|
|
61
|
+
*
|
|
62
|
+
* @param {*} section
|
|
63
|
+
*/
|
|
64
|
+
addIds(section: any): void;
|
|
65
|
+
/**
|
|
66
|
+
* Add index to each moonwalk element in `section`
|
|
67
|
+
*
|
|
68
|
+
* @param {*} section
|
|
69
|
+
*/
|
|
70
|
+
addIndexes(section: any): void;
|
|
71
|
+
/**
|
|
72
|
+
* Go through each `data-moonwalk-run`, parse children, add IDs/indexes
|
|
73
|
+
* (if wanted), initialize a new object for each.
|
|
74
|
+
*/
|
|
75
|
+
initializeRuns(container?: HTMLElement): {
|
|
76
|
+
el: Element;
|
|
77
|
+
threshold: any;
|
|
78
|
+
initialize: any;
|
|
79
|
+
callback: any;
|
|
80
|
+
onExit: any;
|
|
81
|
+
repeated: any;
|
|
82
|
+
rootMargin: any;
|
|
83
|
+
}[];
|
|
84
|
+
/**
|
|
85
|
+
* Go through each `data-moonwalk-section`, parse children, add IDs/indexes
|
|
86
|
+
* (if wanted), initialize a new object for each.
|
|
87
|
+
*/
|
|
88
|
+
initializeSections(container?: HTMLElement): {
|
|
89
|
+
id: string;
|
|
90
|
+
el: any;
|
|
91
|
+
name: any;
|
|
92
|
+
timeline: any;
|
|
93
|
+
observer: any;
|
|
94
|
+
stage: {
|
|
95
|
+
name: any;
|
|
96
|
+
running: boolean;
|
|
97
|
+
firstTween: boolean;
|
|
98
|
+
};
|
|
99
|
+
elements: any[];
|
|
100
|
+
}[];
|
|
101
|
+
initializeSection(section: any): {
|
|
102
|
+
id: string;
|
|
103
|
+
el: any;
|
|
104
|
+
name: any;
|
|
105
|
+
timeline: any;
|
|
106
|
+
observer: any;
|
|
107
|
+
stage: {
|
|
108
|
+
name: any;
|
|
109
|
+
running: boolean;
|
|
110
|
+
firstTween: boolean;
|
|
111
|
+
};
|
|
112
|
+
elements: any[];
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Removes `data-moonwalk` from all elements who already have `data-ll-srcset´
|
|
116
|
+
* Can be used if Moonwalking interferes with custom lazyloading animations
|
|
117
|
+
*/
|
|
118
|
+
clearLazyloads(container?: HTMLElement): void;
|
|
119
|
+
/**
|
|
120
|
+
* Look through section for `data-moonwalk-children` or
|
|
121
|
+
* `data-moonwalk-children="{walkName}"`, then convert all children to
|
|
122
|
+
* `data-moonwalk` or `data-moonwalk-{walkName}`
|
|
123
|
+
*
|
|
124
|
+
* @param {*} section
|
|
125
|
+
*/
|
|
126
|
+
parseChildren(section: any): void;
|
|
127
|
+
/**
|
|
128
|
+
* Sets all `element`s childrens `data-moonwalk` to `val`
|
|
129
|
+
*
|
|
130
|
+
* @param {*} element
|
|
131
|
+
* @param {*} val
|
|
132
|
+
*/
|
|
133
|
+
setAttrs(element: any, val: any): any[];
|
|
134
|
+
/**
|
|
135
|
+
* If we have advanced sections, either named sections or section stages.
|
|
136
|
+
* Resets the entry's `from` state, then creates an observer that will
|
|
137
|
+
* watch this section.
|
|
138
|
+
*
|
|
139
|
+
* @param {*} section
|
|
140
|
+
*/
|
|
141
|
+
setupNamesAndStages(section: any): void;
|
|
142
|
+
/**
|
|
143
|
+
* Create and return an observer for `section`
|
|
144
|
+
*
|
|
145
|
+
* @param {*} section
|
|
146
|
+
*/
|
|
147
|
+
sectionObserver(section: any): IntersectionObserver;
|
|
148
|
+
/**
|
|
149
|
+
* Order `children` by `data-moonwalk-order`.
|
|
150
|
+
*
|
|
151
|
+
* @param {*} children
|
|
152
|
+
*/
|
|
153
|
+
orderChildren(children: any): any[];
|
|
154
|
+
onReady(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Called on `APPLICATION_READY` event, if `config.fireOnReady`.
|
|
157
|
+
* Otherwise must be triggered manually
|
|
158
|
+
*/
|
|
159
|
+
ready(): void;
|
|
160
|
+
/**
|
|
161
|
+
* Creates and returns the RUN observer for data-moonwalk-run elements
|
|
162
|
+
*
|
|
163
|
+
* @param {*} run
|
|
164
|
+
* @param {*} rootMargin
|
|
165
|
+
*/
|
|
166
|
+
runObserver(run: any, rootMargin: any): IntersectionObserver;
|
|
167
|
+
/**
|
|
168
|
+
* Creates and returns the standard observer for all moonwalk elements
|
|
169
|
+
* inside a section.
|
|
170
|
+
*
|
|
171
|
+
* @param {*} section
|
|
172
|
+
* @param {*} rootMargin
|
|
173
|
+
*/
|
|
174
|
+
observer(section: any, rootMargin: any): IntersectionObserver;
|
|
175
|
+
/**
|
|
176
|
+
* The main tween function
|
|
177
|
+
*
|
|
178
|
+
* @param {*} section
|
|
179
|
+
* @param {*} target
|
|
180
|
+
* @param {*} tweenDuration
|
|
181
|
+
* @param {*} tweenTransition
|
|
182
|
+
* @param {*} tweenOverlap
|
|
183
|
+
* @param {*} alphaTween
|
|
184
|
+
*/
|
|
185
|
+
tweenJS(section: any, target: any, tweenDuration: any, tweenInterval: any, tweenTransition: any, tweenOverlap: any, alphaTween: any): void;
|
|
186
|
+
/**
|
|
187
|
+
* CSS version. Not quite ready yet.
|
|
188
|
+
*
|
|
189
|
+
* @param {*} section
|
|
190
|
+
* @param {*} target
|
|
191
|
+
* @param {*} duration
|
|
192
|
+
* @param {*} transition
|
|
193
|
+
* @param {*} overlap
|
|
194
|
+
*/
|
|
195
|
+
tweenCSS(section: any, target: any, tweenDuration: any, tweenInterval: any, tweenTransition: any, tweenOverlap: any): void;
|
|
196
|
+
}
|
|
197
|
+
export type MoonwalkTransition = {
|
|
198
|
+
/**
|
|
199
|
+
* - Starting properties for the transition
|
|
200
|
+
*/
|
|
201
|
+
from: any;
|
|
202
|
+
/**
|
|
203
|
+
* - Ending properties for the transition
|
|
204
|
+
*/
|
|
205
|
+
to: any;
|
|
206
|
+
};
|
|
207
|
+
export type MoonwalkWalk = {
|
|
208
|
+
/**
|
|
209
|
+
* - Delay before the animation starts
|
|
210
|
+
*/
|
|
211
|
+
startDelay?: number;
|
|
212
|
+
/**
|
|
213
|
+
* - Time between animations in a sequence
|
|
214
|
+
*/
|
|
215
|
+
interval?: number;
|
|
216
|
+
/**
|
|
217
|
+
* - Duration of the animation
|
|
218
|
+
*/
|
|
219
|
+
duration?: number;
|
|
220
|
+
/**
|
|
221
|
+
* - Whether to add a separate opacity tween
|
|
222
|
+
*/
|
|
223
|
+
alphaTween?: boolean | any;
|
|
224
|
+
/**
|
|
225
|
+
* - The transition configuration
|
|
226
|
+
*/
|
|
227
|
+
transition: MoonwalkTransition;
|
|
228
|
+
/**
|
|
229
|
+
* - CSS selector for targeting elements in named sections
|
|
230
|
+
*/
|
|
231
|
+
sectionTargets?: string;
|
|
232
|
+
};
|
|
233
|
+
export type MoonwalkRunMeta = {
|
|
234
|
+
/**
|
|
235
|
+
* - Direction of viewport crossing ('top', 'bottom', 'left', 'right', or null)
|
|
236
|
+
* - For entry callbacks: indicates which side the element entered from
|
|
237
|
+
* - For exit callbacks: indicates which side the element exited to
|
|
238
|
+
*/
|
|
239
|
+
direction: string | null;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export type MoonwalkRun = {
|
|
243
|
+
/**
|
|
244
|
+
* - IntersectionObserver threshold
|
|
245
|
+
*/
|
|
246
|
+
threshold?: number;
|
|
247
|
+
/**
|
|
248
|
+
* - Function called when element enters viewport
|
|
249
|
+
* - @param {HTMLElement} element - The element that triggered the callback
|
|
250
|
+
* - @param {boolean} repeated - Whether this is a repeated trigger
|
|
251
|
+
* - @param {MoonwalkRunMeta} meta - Information about how the element entered the viewport
|
|
252
|
+
*/
|
|
253
|
+
callback: Function;
|
|
254
|
+
/**
|
|
255
|
+
* - Function called when element exits viewport
|
|
256
|
+
* - @param {HTMLElement} element - The element that triggered the callback
|
|
257
|
+
* - @param {boolean} repeated - Whether this is a repeated exit
|
|
258
|
+
* - @param {MoonwalkRunMeta} meta - Information about how the element exited the viewport
|
|
259
|
+
*/
|
|
260
|
+
onExit?: Function;
|
|
261
|
+
/**
|
|
262
|
+
* - Whether the run should repeat
|
|
263
|
+
*/
|
|
264
|
+
repeated?: boolean;
|
|
265
|
+
/**
|
|
266
|
+
* - IntersectionObserver rootMargin
|
|
267
|
+
*/
|
|
268
|
+
rootMargin?: string;
|
|
269
|
+
/**
|
|
270
|
+
* - Function called during initialization
|
|
271
|
+
*/
|
|
272
|
+
initialize?: Function;
|
|
273
|
+
};
|
|
274
|
+
export type MoonwalkOptions = {
|
|
275
|
+
/**
|
|
276
|
+
* - Event to trigger animations
|
|
277
|
+
*/
|
|
278
|
+
on?: string | Function;
|
|
279
|
+
/**
|
|
280
|
+
* - Delay before starting animations
|
|
281
|
+
*/
|
|
282
|
+
initialDelay?: number;
|
|
283
|
+
/**
|
|
284
|
+
* - Clear data-ll-srcset attributes
|
|
285
|
+
*/
|
|
286
|
+
clearLazyload?: boolean;
|
|
287
|
+
/**
|
|
288
|
+
* - Remove nested data-moonwalk-section attributes
|
|
289
|
+
*/
|
|
290
|
+
clearNestedSections?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* - Remove nested data-moonwalk attributes
|
|
293
|
+
*/
|
|
294
|
+
clearNestedWalks?: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* - Disable animations when page loaded via anchor
|
|
297
|
+
*/
|
|
298
|
+
clearMoonwalkOnAnchors?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* - Warn when run and section on same element
|
|
301
|
+
*/
|
|
302
|
+
warnRunWithSection?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* - Default IntersectionObserver rootMargin
|
|
305
|
+
*/
|
|
306
|
+
rootMargin?: string;
|
|
307
|
+
/**
|
|
308
|
+
* - Default IntersectionObserver threshold
|
|
309
|
+
*/
|
|
310
|
+
threshold?: number;
|
|
311
|
+
/**
|
|
312
|
+
* - Generate unique IDs for moonwalk elements
|
|
313
|
+
*/
|
|
314
|
+
uniqueIds?: boolean;
|
|
315
|
+
/**
|
|
316
|
+
* - Add index attributes to elements
|
|
317
|
+
*/
|
|
318
|
+
addIndexes?: boolean;
|
|
319
|
+
/**
|
|
320
|
+
* - Run configurations
|
|
321
|
+
*/
|
|
322
|
+
runs?: {
|
|
323
|
+
[x: string]: MoonwalkRun;
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* - Walk configurations
|
|
327
|
+
*/
|
|
328
|
+
walks: {
|
|
329
|
+
[x: string]: MoonwalkWalk;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parallax scrolling effect for background images
|
|
3
|
+
*/
|
|
4
|
+
export default class Parallax {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new Parallax instance
|
|
7
|
+
* @param {Object} app - Application instance
|
|
8
|
+
* @param {ParallaxOptions} [opts={}] - Parallax options
|
|
9
|
+
*/
|
|
10
|
+
constructor(app: any, opts?: ParallaxOptions);
|
|
11
|
+
app: any;
|
|
12
|
+
opts: any;
|
|
13
|
+
elements: Record<string, HTMLElement>;
|
|
14
|
+
parallaxElements: Array<{
|
|
15
|
+
element: HTMLElement;
|
|
16
|
+
factor: number;
|
|
17
|
+
fadeContent: boolean;
|
|
18
|
+
orientation: string;
|
|
19
|
+
content: HTMLElement | null;
|
|
20
|
+
figure: HTMLElement | null;
|
|
21
|
+
elementHeight: number;
|
|
22
|
+
elementWidth: number;
|
|
23
|
+
lastPosition: number;
|
|
24
|
+
}>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Set up a parallax element with its properties
|
|
28
|
+
* @param {HTMLElement} el - Element to set up
|
|
29
|
+
*/
|
|
30
|
+
setupParallaxElement(el: HTMLElement): void;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Calculate the transform value based on scroll position
|
|
34
|
+
* @param {Object} item - Parallax element data
|
|
35
|
+
* @param {number} scrollPosition - Current scroll position
|
|
36
|
+
* @returns {Object} Transform and opacity values
|
|
37
|
+
*/
|
|
38
|
+
calculateTransform(item: any, scrollPosition: number): { transform: string, opacity: number };
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Apply a smooth transition between current and target position
|
|
42
|
+
* @param {Object} item - Parallax element data
|
|
43
|
+
* @param {Object} target - Target transform and opacity values
|
|
44
|
+
*/
|
|
45
|
+
applyTransform(item: any, target: { transform: string, opacity: number }): void;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Handle scroll event to update parallax effect
|
|
49
|
+
*/
|
|
50
|
+
onScroll(): void;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Destroy the parallax instance and clean up
|
|
54
|
+
*/
|
|
55
|
+
destroy(): void;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type ParallaxOptions = {
|
|
59
|
+
/**
|
|
60
|
+
* - Target element selector or element
|
|
61
|
+
*/
|
|
62
|
+
el?: string | HTMLElement;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* - Default parallax movement factor
|
|
66
|
+
*/
|
|
67
|
+
factor?: number;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* - Whether to fade content while scrolling
|
|
71
|
+
*/
|
|
72
|
+
fadeContent?: boolean;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* - Scale factor to apply to parallax images
|
|
76
|
+
*/
|
|
77
|
+
scale?: number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* - Delay factor to smooth the effect
|
|
81
|
+
*/
|
|
82
|
+
delay?: number;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* - Direction of parallax effect ('up', 'down', 'left', 'right')
|
|
86
|
+
*/
|
|
87
|
+
orientation?: 'up' | 'down' | 'left' | 'right';
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* - Whether to show element overflow
|
|
91
|
+
*/
|
|
92
|
+
overflow?: boolean;
|
|
93
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default class Popover {
|
|
2
|
+
constructor(app: any, trigger: any, opts?: {});
|
|
3
|
+
app: any;
|
|
4
|
+
opts: any;
|
|
5
|
+
trigger: any;
|
|
6
|
+
position: any;
|
|
7
|
+
className: string;
|
|
8
|
+
orderedPositions: string[];
|
|
9
|
+
popover: HTMLDivElement;
|
|
10
|
+
handleMouseEnter(e: any): void;
|
|
11
|
+
handleMouseLeave(e: any): void;
|
|
12
|
+
handleTouchStart(e: any): void;
|
|
13
|
+
get isVisible(): boolean;
|
|
14
|
+
show(): void;
|
|
15
|
+
hide(): void;
|
|
16
|
+
toggle(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Popup component for modal dialogs and popups
|
|
3
|
+
*/
|
|
4
|
+
export default class Popup {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new Popup instance
|
|
7
|
+
* @param {Object} app - Application instance
|
|
8
|
+
* @param {string} [selector] - CSS selector to find popup elements
|
|
9
|
+
* @param {PopupOptions} [opts={}] - Popup options
|
|
10
|
+
*/
|
|
11
|
+
constructor(app: any, selector?: string, opts?: PopupOptions);
|
|
12
|
+
app: any;
|
|
13
|
+
opts: any;
|
|
14
|
+
backdrop: HTMLDivElement | null;
|
|
15
|
+
currentPopup: HTMLElement | null;
|
|
16
|
+
popupKey: string | null;
|
|
17
|
+
keyUpListener: any;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Bind click handlers to popup triggers and close buttons
|
|
21
|
+
*/
|
|
22
|
+
bindTriggers(): void;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Extract key from target selector or element
|
|
26
|
+
* @param {HTMLElement|string} target - Target element or selector
|
|
27
|
+
* @returns {string|null} - The popup key or null
|
|
28
|
+
*/
|
|
29
|
+
getKeyFromTarget(target: HTMLElement | string): string | null;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Create backdrop element for popup
|
|
33
|
+
* @param {string|null} key - Optional popup key to associate with backdrop
|
|
34
|
+
* @returns {HTMLElement} The created backdrop element
|
|
35
|
+
*/
|
|
36
|
+
createBackdrop(key?: string | null): HTMLElement;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Open a popup
|
|
40
|
+
* @param {HTMLElement} trigger - Element that triggered the popup
|
|
41
|
+
* @param {HTMLElement|string} target - Popup element or selector
|
|
42
|
+
* @param {string|null} key - Optional popup key
|
|
43
|
+
*/
|
|
44
|
+
open(trigger: HTMLElement, target: HTMLElement | string, key?: string | null): void;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Close the popup
|
|
48
|
+
*/
|
|
49
|
+
close(): void;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Handle keyup event for Escape key to close popup
|
|
53
|
+
* @param {KeyboardEvent} e - Keyboard event
|
|
54
|
+
*/
|
|
55
|
+
onKeyup(e: KeyboardEvent): void;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type PopupOptions = {
|
|
59
|
+
/**
|
|
60
|
+
* - CSS selector to find popup elements
|
|
61
|
+
* Default: '[data-popup]'
|
|
62
|
+
*/
|
|
63
|
+
selector?: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* - Function that determines if popup should be shown on current breakpoint
|
|
67
|
+
*/
|
|
68
|
+
responsive?: Function;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* - Called when popup opens
|
|
72
|
+
*/
|
|
73
|
+
onOpen?: Function;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* - Called when popup closes
|
|
77
|
+
*/
|
|
78
|
+
onClose?: Function;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* - Animation function for opening popup
|
|
82
|
+
*/
|
|
83
|
+
tweenIn?: Function;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* - Animation function for closing popup
|
|
87
|
+
*/
|
|
88
|
+
tweenOut?: Function;
|
|
89
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ScrollSpy component for highlighting active sections during scrolling
|
|
3
|
+
*/
|
|
4
|
+
export default class ScrollSpy {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new ScrollSpy instance
|
|
7
|
+
* @param {Object} app - Application instance
|
|
8
|
+
* @param {ScrollSpyOptions} [opts={}] - ScrollSpy options
|
|
9
|
+
*/
|
|
10
|
+
constructor(app: any, opts?: ScrollSpyOptions);
|
|
11
|
+
app: any;
|
|
12
|
+
opts: any;
|
|
13
|
+
/**
|
|
14
|
+
* Initialize ScrollSpy
|
|
15
|
+
*/
|
|
16
|
+
initialize(): void;
|
|
17
|
+
triggers: any[];
|
|
18
|
+
/**
|
|
19
|
+
* Handle intersection with viewport
|
|
20
|
+
* @param {IntersectionObserverEntry} entry - Intersection observer entry
|
|
21
|
+
*/
|
|
22
|
+
intersectionHandler(entry: IntersectionObserverEntry): void;
|
|
23
|
+
}
|
|
24
|
+
export type ScrollSpyOptions = {
|
|
25
|
+
/**
|
|
26
|
+
* - Called when a target intersects with the viewport
|
|
27
|
+
*/
|
|
28
|
+
onIntersect?: Function;
|
|
29
|
+
};
|