@brandocms/jupiter 3.55.0 → 4.0.0-beta.2

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.
Files changed (76) hide show
  1. package/README.md +509 -54
  2. package/package.json +30 -18
  3. package/src/index.js +15 -10
  4. package/src/modules/Application/index.js +236 -158
  5. package/src/modules/Breakpoints/index.js +116 -36
  6. package/src/modules/Cookies/index.js +95 -64
  7. package/src/modules/CoverOverlay/index.js +21 -14
  8. package/src/modules/Dataloader/index.js +71 -24
  9. package/src/modules/Dataloader/url-sync.js +238 -0
  10. package/src/modules/Dom/index.js +24 -0
  11. package/src/modules/DoubleHeader/index.js +571 -0
  12. package/src/modules/Dropdown/index.js +108 -73
  13. package/src/modules/EqualHeightElements/index.js +8 -8
  14. package/src/modules/EqualHeightImages/index.js +15 -7
  15. package/src/modules/FixedHeader/index.js +116 -30
  16. package/src/modules/FooterReveal/index.js +5 -5
  17. package/src/modules/HeroSlider/index.js +231 -106
  18. package/src/modules/HeroVideo/index.js +72 -44
  19. package/src/modules/Lazyload/index.js +128 -80
  20. package/src/modules/Lightbox/index.js +101 -80
  21. package/src/modules/Links/index.js +77 -51
  22. package/src/modules/Looper/index.js +1737 -0
  23. package/src/modules/Marquee/index.js +106 -37
  24. package/src/modules/MobileMenu/index.js +105 -130
  25. package/src/modules/Moonwalk/index.js +479 -153
  26. package/src/modules/Parallax/index.js +280 -57
  27. package/src/modules/Popover/index.js +187 -17
  28. package/src/modules/Popup/index.js +172 -53
  29. package/src/modules/ScrollSpy/index.js +21 -0
  30. package/src/modules/StackedBoxes/index.js +8 -6
  31. package/src/modules/StickyHeader/index.js +394 -164
  32. package/src/modules/Toggler/index.js +207 -11
  33. package/src/modules/Typography/index.js +33 -20
  34. package/src/utils/motion-helpers.js +330 -0
  35. package/types/README.md +159 -0
  36. package/types/events/index.d.ts +20 -0
  37. package/types/index.d.ts +6 -0
  38. package/types/modules/Application/index.d.ts +168 -0
  39. package/types/modules/Breakpoints/index.d.ts +40 -0
  40. package/types/modules/Cookies/index.d.ts +81 -0
  41. package/types/modules/CoverOverlay/index.d.ts +6 -0
  42. package/types/modules/Dataloader/index.d.ts +38 -0
  43. package/types/modules/Dataloader/url-sync.d.ts +36 -0
  44. package/types/modules/Dom/index.d.ts +47 -0
  45. package/types/modules/DoubleHeader/index.d.ts +63 -0
  46. package/types/modules/Dropdown/index.d.ts +15 -0
  47. package/types/modules/EqualHeightElements/index.d.ts +8 -0
  48. package/types/modules/EqualHeightImages/index.d.ts +11 -0
  49. package/types/modules/FeatureTests/index.d.ts +27 -0
  50. package/types/modules/FixedHeader/index.d.ts +219 -0
  51. package/types/modules/Fontloader/index.d.ts +5 -0
  52. package/types/modules/FooterReveal/index.d.ts +5 -0
  53. package/types/modules/HeroSlider/index.d.ts +28 -0
  54. package/types/modules/HeroVideo/index.d.ts +83 -0
  55. package/types/modules/Lazyload/index.d.ts +80 -0
  56. package/types/modules/Lightbox/index.d.ts +123 -0
  57. package/types/modules/Links/index.d.ts +55 -0
  58. package/types/modules/Looper/index.d.ts +127 -0
  59. package/types/modules/Marquee/index.d.ts +23 -0
  60. package/types/modules/MobileMenu/index.d.ts +63 -0
  61. package/types/modules/Moonwalk/index.d.ts +322 -0
  62. package/types/modules/Parallax/index.d.ts +71 -0
  63. package/types/modules/Popover/index.d.ts +29 -0
  64. package/types/modules/Popup/index.d.ts +76 -0
  65. package/types/modules/ScrollSpy/index.d.ts +29 -0
  66. package/types/modules/StackedBoxes/index.d.ts +9 -0
  67. package/types/modules/StickyHeader/index.d.ts +220 -0
  68. package/types/modules/Toggler/index.d.ts +48 -0
  69. package/types/modules/Typography/index.d.ts +77 -0
  70. package/types/utils/dispatchElementEvent.d.ts +1 -0
  71. package/types/utils/imageIsLoaded.d.ts +1 -0
  72. package/types/utils/imagesAreLoaded.d.ts +1 -0
  73. package/types/utils/loadScript.d.ts +2 -0
  74. package/types/utils/prefersReducedMotion.d.ts +4 -0
  75. package/types/utils/rafCallback.d.ts +2 -0
  76. package/types/utils/zoom.d.ts +4 -0
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Options for configuring the Looper module
3
+ */
4
+ export interface LooperOptions {
5
+ /** Center the loop container. Can be true, false, or a selector string */
6
+ center?: boolean | string;
7
+ /** Enable snap-to-item behavior. Can be true, false, or a number for custom snap distance */
8
+ snap?: boolean | number;
9
+ /** Enable continuous auto-scrolling */
10
+ crawl?: boolean;
11
+ /** Enable infinite looping. If false, creates linear scrolling */
12
+ loop?: boolean;
13
+ /** Enable drag interaction with mouse/touch */
14
+ draggable?: boolean;
15
+ /** Speed multipliers for different breakpoints */
16
+ speed?: {
17
+ sm?: number;
18
+ lg?: number;
19
+ };
20
+ /** Easing configuration for hover interactions */
21
+ ease?: {
22
+ mouseOver?: {
23
+ speed?: number;
24
+ duration?: number;
25
+ };
26
+ mouseOut?: {
27
+ speed?: number;
28
+ duration?: number;
29
+ };
30
+ };
31
+ /** CSS selector for looper elements */
32
+ selector?: string;
33
+ /** Extra padding on the right side in pixels */
34
+ paddingRight?: number | string;
35
+ /** Start in reversed direction */
36
+ reversed?: boolean;
37
+ }
38
+
39
+ /**
40
+ * Loop controller returned by horizontalLoop function
41
+ */
42
+ export interface LoopController {
43
+ /** Motion value tracking the current position */
44
+ position: any;
45
+ /** Main animation instance */
46
+ animation: any;
47
+ /** Array of item elements */
48
+ items: HTMLElement[];
49
+ /** Array of snap time positions */
50
+ times: number[];
51
+ /** Whether the loop is reversed */
52
+ isReversed: boolean;
53
+ /** Whether the loop is in looping mode */
54
+ isLooping: boolean;
55
+
56
+ /** Start/resume the loop animation */
57
+ play(): void;
58
+
59
+ /** Pause the loop animation */
60
+ pause(): void;
61
+
62
+ /** Get the current active item index */
63
+ current(): number;
64
+
65
+ /** Find the closest item index to current position */
66
+ closestIndex(setCurrent?: boolean): number;
67
+
68
+ /** Navigate to the next item */
69
+ next(vars?: { duration?: number; easing?: string }): any;
70
+
71
+ /** Navigate to the previous item */
72
+ previous(vars?: { duration?: number; easing?: string }): any;
73
+
74
+ /** Navigate to a specific item index */
75
+ toIndex(index: number, vars?: { duration?: number; easing?: string }): any;
76
+
77
+ /** Refresh measurements and recalculate (useful after resize) */
78
+ refresh(deep?: boolean): void;
79
+
80
+ /** Clean up and destroy the loop */
81
+ destroy(): void;
82
+ }
83
+
84
+ /**
85
+ * Looper Module
86
+ * Creates seamless horizontal infinite scrolling carousels with drag interaction,
87
+ * momentum/inertia, auto-crawl, snap-to-item, and responsive resize handling
88
+ */
89
+ export default class Looper {
90
+ /**
91
+ * Create a new Looper instance
92
+ * @param app - Jupiter application instance
93
+ * @param opts - Configuration options
94
+ */
95
+ constructor(app: any, opts?: Partial<LooperOptions>);
96
+
97
+ /** Configuration options */
98
+ opts: LooperOptions;
99
+
100
+ /** Jupiter application instance */
101
+ app: any;
102
+
103
+ /** Array of active loop controllers */
104
+ loopers: LoopController[];
105
+
106
+ /** Array of pending loopers waiting for initialization */
107
+ pendingLoopers: any[];
108
+
109
+ /** DOM elements matching the selector */
110
+ looperElements: HTMLElement[];
111
+
112
+ /**
113
+ * Initialize the module and find all looper elements
114
+ */
115
+ init(): void;
116
+
117
+ /**
118
+ * Finalize loopers after APPLICATION:REVEALED event
119
+ * This is when actual measurements and animations are set up
120
+ */
121
+ finalizeLoopers(): void;
122
+
123
+ /**
124
+ * Destroy all loopers and clean up
125
+ */
126
+ destroy(): void;
127
+ }
@@ -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,322 @@
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
+ onReady: any;
32
+ callback: any;
33
+ onExit: any;
34
+ repeated: any;
35
+ rootMargin: any;
36
+ }[];
37
+ /**
38
+ * Add `moonwalk` class to html element to identify ourselves.
39
+ */
40
+ addClass(): void;
41
+ /**
42
+ * Matching moonwalk elements before the element matching the hash should be set to visible
43
+ * by setting the `data-moonwalked` attribute on `data-moonwalk` elements and
44
+ * `data-moonwalk-section-ready` on `data-moonwalk-section` elements.
45
+ */
46
+ walkToThisPoint(hash: any): void;
47
+ /**
48
+ * Remove all moonwalks. Useful for clients who prefer reduced motion
49
+ */
50
+ removeAllWalks(container?: HTMLElement): void;
51
+ removeFor(container: HTMLElement, selector: any): void;
52
+ /**
53
+ * Remove run matching name
54
+ */
55
+ removeRun(container: HTMLElement, name: any): void;
56
+ /**
57
+ * Remove all runs
58
+ */
59
+ removeRuns(container?: HTMLElement): void;
60
+ /**
61
+ * Add a random ID to each moonwalk element
62
+ *
63
+ * @param {*} section
64
+ */
65
+ addIds(section: any): void;
66
+ /**
67
+ * Add index to each moonwalk element in `section`
68
+ *
69
+ * @param {*} section
70
+ */
71
+ addIndexes(section: any): void;
72
+ /**
73
+ * Go through each `data-moonwalk-run`, parse children, add IDs/indexes
74
+ * (if wanted), initialize a new object for each.
75
+ */
76
+ initializeRuns(container?: HTMLElement): {
77
+ el: Element;
78
+ threshold: any;
79
+ initialize: any;
80
+ onReady: any;
81
+ callback: any;
82
+ onExit: any;
83
+ repeated: any;
84
+ rootMargin: any;
85
+ }[];
86
+ /**
87
+ * Go through each `data-moonwalk-section`, parse children, add IDs/indexes
88
+ * (if wanted), initialize a new object for each.
89
+ */
90
+ initializeSections(container?: HTMLElement): {
91
+ id: string;
92
+ el: any;
93
+ name: any;
94
+ timeline: any;
95
+ observer: any;
96
+ stage: {
97
+ name: any;
98
+ running: boolean;
99
+ firstTween: boolean;
100
+ };
101
+ elements: any[];
102
+ }[];
103
+ initializeSection(section: any): {
104
+ id: string;
105
+ el: any;
106
+ name: any;
107
+ timeline: any;
108
+ observer: any;
109
+ stage: {
110
+ name: any;
111
+ running: boolean;
112
+ firstTween: boolean;
113
+ };
114
+ elements: any[];
115
+ };
116
+ /**
117
+ * Removes `data-moonwalk` from all elements who already have `data-ll-srcset´
118
+ * Can be used if Moonwalking interferes with custom lazyloading animations
119
+ */
120
+ clearLazyloads(container?: HTMLElement): void;
121
+ /**
122
+ * Look through section for `data-moonwalk-children` or
123
+ * `data-moonwalk-children="{walkName}"`, then convert all children to
124
+ * `data-moonwalk` or `data-moonwalk-{walkName}`
125
+ *
126
+ * @param {*} section
127
+ */
128
+ parseChildren(section: any): void;
129
+ /**
130
+ * Sets all `element`s childrens `data-moonwalk` to `val`
131
+ *
132
+ * @param {*} element
133
+ * @param {*} val
134
+ */
135
+ setAttrs(element: any, val: any): any[];
136
+ /**
137
+ * If we have advanced sections, either named sections or section stages.
138
+ * Resets the entry's `from` state, then creates an observer that will
139
+ * watch this section.
140
+ *
141
+ * @param {*} section
142
+ */
143
+ setupNamesAndStages(section: any): void;
144
+ /**
145
+ * Create and return an observer for `section`
146
+ *
147
+ * @param {*} section
148
+ */
149
+ sectionObserver(section: any): IntersectionObserver;
150
+ /**
151
+ * Order `children` by `data-moonwalk-order`.
152
+ *
153
+ * @param {*} children
154
+ */
155
+ orderChildren(children: any): any[];
156
+ onReady(): void;
157
+ /**
158
+ * Called on `APPLICATION_READY` event, if `config.fireOnReady`.
159
+ * Otherwise must be triggered manually
160
+ */
161
+ ready(): void;
162
+ /**
163
+ * Creates and returns the RUN observer for data-moonwalk-run elements
164
+ *
165
+ * @param {*} run
166
+ * @param {*} rootMargin
167
+ */
168
+ runObserver(run: any, rootMargin: any): IntersectionObserver;
169
+ /**
170
+ * Creates and returns the standard observer for all moonwalk elements
171
+ * inside a section.
172
+ *
173
+ * @param {*} section
174
+ * @param {*} rootMargin
175
+ */
176
+ observer(section: any, rootMargin: any): IntersectionObserver;
177
+ /**
178
+ * The main tween function
179
+ *
180
+ * @param {*} section
181
+ * @param {*} target
182
+ * @param {*} tweenDuration
183
+ * @param {*} tweenTransition
184
+ * @param {*} tweenOverlap
185
+ * @param {*} alphaTween
186
+ */
187
+ tweenJS(section: any, target: any, tweenDuration: any, tweenInterval: any, tweenTransition: any, tweenOverlap: any, alphaTween: any): void;
188
+ /**
189
+ * CSS version. Not quite ready yet.
190
+ *
191
+ * @param {*} section
192
+ * @param {*} target
193
+ * @param {*} duration
194
+ * @param {*} transition
195
+ * @param {*} overlap
196
+ */
197
+ tweenCSS(section: any, target: any, tweenDuration: any, tweenInterval: any, tweenTransition: any, tweenOverlap: any): void;
198
+ }
199
+ export type MoonwalkTransition = {
200
+ /**
201
+ * - Starting properties for the transition
202
+ */
203
+ from: any;
204
+ /**
205
+ * - Ending properties for the transition
206
+ */
207
+ to: any;
208
+ };
209
+ export type MoonwalkWalk = {
210
+ /**
211
+ * - Delay before the animation starts
212
+ */
213
+ startDelay?: number;
214
+ /**
215
+ * - Time between animations in a sequence
216
+ */
217
+ interval?: number;
218
+ /**
219
+ * - Duration of the animation
220
+ */
221
+ duration?: number;
222
+ /**
223
+ * - Whether to add a separate opacity tween
224
+ */
225
+ alphaTween?: boolean | any;
226
+ /**
227
+ * - The transition configuration
228
+ */
229
+ transition: MoonwalkTransition;
230
+ /**
231
+ * - CSS selector for targeting elements in named sections
232
+ */
233
+ sectionTargets?: string;
234
+ };
235
+ export type MoonwalkRun = {
236
+ /**
237
+ * - IntersectionObserver threshold
238
+ */
239
+ threshold?: number;
240
+ /**
241
+ * - Function called when element enters viewport
242
+ */
243
+ callback: Function;
244
+ /**
245
+ * - Function called when element exits viewport
246
+ */
247
+ onExit?: Function;
248
+ /**
249
+ * - Whether the run should repeat
250
+ */
251
+ repeated?: boolean;
252
+ /**
253
+ * - IntersectionObserver rootMargin
254
+ */
255
+ rootMargin?: string;
256
+ /**
257
+ * - Function called during initialization
258
+ */
259
+ initialize?: Function;
260
+ /**
261
+ * - Function called when APPLICATION_REVEALED fires, before viewport observers start
262
+ */
263
+ onReady?: Function;
264
+ };
265
+ export type MoonwalkOptions = {
266
+ /**
267
+ * - Event to trigger animations
268
+ */
269
+ on?: string | Function;
270
+ /**
271
+ * - Delay before starting animations
272
+ */
273
+ initialDelay?: number;
274
+ /**
275
+ * - Clear data-ll-srcset attributes
276
+ */
277
+ clearLazyload?: boolean;
278
+ /**
279
+ * - Remove nested data-moonwalk-section attributes
280
+ */
281
+ clearNestedSections?: boolean;
282
+ /**
283
+ * - Remove nested data-moonwalk attributes
284
+ */
285
+ clearNestedWalks?: boolean;
286
+ /**
287
+ * - Disable animations when page loaded via anchor
288
+ */
289
+ clearMoonwalkOnAnchors?: boolean;
290
+ /**
291
+ * - Warn when run and section on same element
292
+ */
293
+ warnRunWithSection?: boolean;
294
+ /**
295
+ * - Default IntersectionObserver rootMargin
296
+ */
297
+ rootMargin?: string;
298
+ /**
299
+ * - Default IntersectionObserver threshold
300
+ */
301
+ threshold?: number;
302
+ /**
303
+ * - Generate unique IDs for moonwalk elements
304
+ */
305
+ uniqueIds?: boolean;
306
+ /**
307
+ * - Add index attributes to elements
308
+ */
309
+ addIndexes?: boolean;
310
+ /**
311
+ * - Run configurations
312
+ */
313
+ runs?: {
314
+ [x: string]: MoonwalkRun;
315
+ };
316
+ /**
317
+ * - Walk configurations
318
+ */
319
+ walks: {
320
+ [x: string]: MoonwalkWalk;
321
+ };
322
+ };
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Parallax scrolling effect inspired by SimpleParallax.js
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: {};
14
+ parallaxElements: any[];
15
+ /**
16
+ * Handle scroll event to update parallax effect
17
+ */
18
+ onScroll(): void;
19
+ /**
20
+ * Set up a parallax element with its properties
21
+ * @param {HTMLElement} el - Element to set up
22
+ */
23
+ setupParallaxElement(el: HTMLElement): void;
24
+ /**
25
+ * Calculate the transform value based on scroll position
26
+ * @param {Object} item - Parallax element data
27
+ * @param {number} scrollPosition - Current scroll position
28
+ * @returns {Object} Transform and opacity values
29
+ */
30
+ calculateTransform(item: any, scrollPosition: number): any;
31
+ /**
32
+ * Apply a smooth transition between current and target position
33
+ * @param {Object} item - Parallax element data
34
+ * @param {Object} target - Target transform and opacity values
35
+ */
36
+ applyTransform(item: any, target: any): void;
37
+ /**
38
+ * Destroy the parallax instance and clean up
39
+ */
40
+ destroy(): void;
41
+ }
42
+ export type ParallaxOptions = {
43
+ /**
44
+ * - Target element selector or element
45
+ */
46
+ el?: string | HTMLElement;
47
+ /**
48
+ * - Default parallax movement factor
49
+ */
50
+ factor?: number;
51
+ /**
52
+ * - Whether to fade content while scrolling
53
+ */
54
+ fadeContent?: boolean;
55
+ /**
56
+ * - Scale factor to apply to parallax images
57
+ */
58
+ scale?: number;
59
+ /**
60
+ * - Delay factor to smooth the effect
61
+ */
62
+ delay?: number;
63
+ /**
64
+ * - Direction of parallax effect ('up', 'down', 'left', 'right')
65
+ */
66
+ orientation?: string;
67
+ /**
68
+ * - Whether to show element overflow
69
+ */
70
+ overflow?: boolean;
71
+ };
@@ -0,0 +1,29 @@
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
+ currentPosition: any;
10
+ popover: HTMLDivElement;
11
+ boundHandleDocumentClick: any;
12
+ boundHandleScroll: any;
13
+ handleMouseEnter(e: any): void;
14
+ handleMouseLeave(e: any): void;
15
+ handleTouchStart(e: any): void;
16
+ handleClick(e: any): void;
17
+ get isVisible(): boolean;
18
+ show(): void;
19
+ updatePosition(animate?: boolean): void;
20
+ hide(): void;
21
+ toggle(): void;
22
+ addDocumentClickHandler(): void;
23
+ removeDocumentClickHandler(): void;
24
+ handleDocumentClick(e: any): void;
25
+ closeAllExcept(exceptPopover: any): void;
26
+ handleScroll(): void;
27
+ addScrollListener(): void;
28
+ removeScrollListener(): void;
29
+ }
@@ -0,0 +1,76 @@
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: HTMLElement;
15
+ currentPopup: string | HTMLElement;
16
+ popupKey: string;
17
+ /**
18
+ * Bind click handlers to popup triggers and close buttons
19
+ */
20
+ bindTriggers(): void;
21
+ /**
22
+ * Extract key from target selector or element
23
+ * @param {HTMLElement|string} target - Target element or selector
24
+ * @returns {string|null} - The popup key or null
25
+ */
26
+ getKeyFromTarget(target: HTMLElement | string): string | null;
27
+ /**
28
+ * Create backdrop element for popup
29
+ * @param {string|null} key - Optional popup key to associate with backdrop
30
+ * @returns {HTMLElement} The created backdrop element
31
+ */
32
+ createBackdrop(key: string | null): HTMLElement;
33
+ /**
34
+ * Open a popup
35
+ * @param {HTMLElement} trigger - Element that triggered the popup
36
+ * @param {HTMLElement|string} target - Popup element or selector
37
+ * @param {string|null} key - Optional popup key
38
+ */
39
+ open(trigger: HTMLElement, target: HTMLElement | string, key?: string | null): void;
40
+ keyUpListener: any;
41
+ /**
42
+ * Close the popup
43
+ */
44
+ close(): void;
45
+ /**
46
+ * Handle keyup event for Escape key to close popup
47
+ * @param {KeyboardEvent} e - Keyboard event
48
+ */
49
+ onKeyup(e: KeyboardEvent): void;
50
+ }
51
+ export type PopupOptions = {
52
+ /**
53
+ * - CSS selector to find popup elements
54
+ */
55
+ selector?: string;
56
+ /**
57
+ * - Function that determines if popup should be shown on current breakpoint
58
+ */
59
+ responsive?: Function;
60
+ /**
61
+ * - Called when popup opens
62
+ */
63
+ onOpen?: Function;
64
+ /**
65
+ * - Called when popup closes
66
+ */
67
+ onClose?: Function;
68
+ /**
69
+ * - Animation function for opening popup
70
+ */
71
+ tweenIn?: Function;
72
+ /**
73
+ * - Animation function for closing popup
74
+ */
75
+ tweenOut?: Function;
76
+ };