@fynd-design-engineering/fynd-one-v2 3.4.63 → 3.4.64

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 (79) hide show
  1. package/dist/accordians/dropdown.js +1 -95
  2. package/dist/accordians/index.js +1 -391
  3. package/dist/cms-listing/index.js +1 -24
  4. package/dist/filters/clear-search.js +1 -32
  5. package/dist/filters/konnect.js +1 -165
  6. package/dist/filters/show-count.js +1 -66
  7. package/dist/form/country-dropdown.css +1 -160
  8. package/dist/form/cs-gated-redirection.js +1 -40
  9. package/dist/form/download-file.js +1 -70
  10. package/dist/form/validation.css +1 -1019
  11. package/dist/form/validation.js +7 -10611
  12. package/dist/global/anchor-scroll.js +1 -174
  13. package/dist/global/auth.js +1 -87
  14. package/dist/global/chat.js +1 -185
  15. package/dist/global/console-links.js +1 -89
  16. package/dist/global/contact-popup.js +2 -83
  17. package/dist/global/css/in-page-embed.css +1 -1043
  18. package/dist/global/css/in-project-settings.css +1 -173
  19. package/dist/global/css/temp.css +1 -89
  20. package/dist/global/custom-bg-video.js +1 -40
  21. package/dist/global/footer-accordion.js +1 -44
  22. package/dist/global/lazy-loader.js +1 -135
  23. package/dist/global/loader.js +2 -166
  24. package/dist/global/media-card.js +1 -166
  25. package/dist/global/miscellaneous.js +1 -136
  26. package/dist/global/number-count.js +1 -82
  27. package/dist/global/popup-video.js +1 -276
  28. package/dist/global/progressive-scroll.js +1 -222
  29. package/dist/global/responsive-video.js +1 -321
  30. package/dist/global/style.css +1 -1065
  31. package/dist/global/video-card.js +1 -50
  32. package/dist/hacktimus/2025.js +1 -177
  33. package/dist/hacktimus/styles.css +1 -91
  34. package/dist/home/index.js +1 -17
  35. package/dist/marquee/index.js +1 -3104
  36. package/dist/marquee/marquee-swiper.js +1 -36
  37. package/dist/navigation/announcement/index.js +1 -5169
  38. package/dist/navigation/context-menu/index.js +1 -31
  39. package/dist/navigation/desktop/index.js +1 -4603
  40. package/dist/navigation/initialization.js +1 -602
  41. package/dist/navigation/main.js +1 -4911
  42. package/dist/navigation/mobile/index.js +1 -286
  43. package/dist/navigation/scroll/index.js +1 -62
  44. package/dist/navigation/secondary-navigation/index.js +1 -437
  45. package/dist/navigation/style.css +1 -154
  46. package/dist/navigation/temp.css +0 -2
  47. package/dist/navigation/theme.css +1 -69
  48. package/dist/navigation-v2/index.js +1 -4990
  49. package/dist/navigation-v2/styles.css +1 -233
  50. package/dist/others/feature-detail.js +1 -75
  51. package/dist/others/geolocation.js +1 -50
  52. package/dist/others/hero-aniamtion.js +1 -53
  53. package/dist/others/hero-india-animation-2.js +1 -70
  54. package/dist/others/hero-india-animation.js +1 -93
  55. package/dist/others/home-solution-tab.js +1 -115
  56. package/dist/others/storefront-chat/index.js +1 -487
  57. package/dist/others/storefront-chat/styles.css +1 -107
  58. package/dist/playbook-2026/hero-reveal.js +1 -47
  59. package/dist/playbook-2026/index.js +1 -536
  60. package/dist/playbook-2026/styles.css +1 -110
  61. package/dist/posthog-and-ga/attributes.js +1 -190
  62. package/dist/posthog-and-ga/main.js +1 -528
  63. package/dist/progressive-scroll/index.js +1 -147
  64. package/dist/quick-fix/reload.js +1 -22
  65. package/dist/seo/schema.js +1 -465
  66. package/dist/slider/freescroll.js +1 -34
  67. package/dist/test/sample.js +1 -15
  68. package/dist/testimonials/index.js +1 -2654
  69. package/dist/timeline/index.js +1 -160
  70. package/dist/timeline/style.css +1 -42
  71. package/dist/tracking/custom-id.js +1 -75
  72. package/dist/tracking/fill-form-fields.js +1 -238
  73. package/dist/tracking/form-tracker.js +1 -146
  74. package/dist/tracking/page-categories.js +1 -20
  75. package/dist/tracking/user-journey.js +1 -839
  76. package/dist/tracking/utm-links.js +1 -194
  77. package/dist/utils/sample.js +1 -17
  78. package/dist/validations/localhost.js +1 -221
  79. package/package.json +1 -1
@@ -1,437 +1 @@
1
- "use strict";
2
- (() => {
3
- // bin/live-reload.js
4
- if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
5
- new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
6
- "change",
7
- () => location.reload()
8
- );
9
- } else {
10
- }
11
-
12
- // src/navigation/secondary-navigation/index.ts
13
- var cachedSecondaryNavItems = null;
14
- var isInitialLoad = true;
15
- var scrollTrackingInitialized = false;
16
- var isSecondaryNavigationVisible = false;
17
- var isAnimating = false;
18
- var SecondaryNavUtils = class {
19
- static hasAnyActiveNavLink() {
20
- const activeNavLinks = document.querySelectorAll('[fynd-secondary-navlink-active="true"]');
21
- return activeNavLinks.length > 0;
22
- }
23
- static checkIfAnySectionVisible() {
24
- const navSections = document.querySelectorAll("[fynd-secondary-nav-id]");
25
- const viewportHeight = window.innerHeight;
26
- for (const section of navSections) {
27
- const rect = section.getBoundingClientRect();
28
- const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);
29
- const sectionHeight = rect.height;
30
- const visibilityPercentage = visibleHeight > 0 ? visibleHeight / sectionHeight * 100 : 0;
31
- if (visibilityPercentage > 50) {
32
- return true;
33
- }
34
- }
35
- return false;
36
- }
37
- static findMostVisibleSection() {
38
- const navSections = document.querySelectorAll("[fynd-secondary-nav-id]");
39
- const viewportHeight = window.innerHeight;
40
- let mostVisibleSection = null;
41
- let highestVisibility = 0;
42
- navSections.forEach((section) => {
43
- const sectionId = section.getAttribute("fynd-secondary-nav-id");
44
- if (!sectionId) return;
45
- const rect = section.getBoundingClientRect();
46
- const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);
47
- const sectionHeight = rect.height;
48
- const visibilityPercentage = visibleHeight > 0 ? visibleHeight / sectionHeight * 100 : 0;
49
- if (visibilityPercentage > 50 && visibilityPercentage > highestVisibility) {
50
- highestVisibility = visibilityPercentage;
51
- mostVisibleSection = sectionId;
52
- }
53
- });
54
- return mostVisibleSection;
55
- }
56
- static getCurrentSectionGroup(sectionId) {
57
- const secondaryNavItems2 = cachedSecondaryNavItems || SecondaryNavData.getSecondaryNavItems();
58
- for (const group of secondaryNavItems2) {
59
- const found = group.Links.find((link) => link.id === sectionId);
60
- if (found) {
61
- return group.groupName;
62
- }
63
- }
64
- return null;
65
- }
66
- static getAdjacentSections(currentSectionId) {
67
- const allSections = Array.from(document.querySelectorAll("[fynd-secondary-nav-id]"));
68
- const currentIndex = allSections.findIndex(
69
- (section) => section.getAttribute("fynd-secondary-nav-id") === currentSectionId
70
- );
71
- const adjacent = [];
72
- if (currentIndex > 0) {
73
- const prevId = allSections[currentIndex - 1].getAttribute("fynd-secondary-nav-id");
74
- if (prevId) adjacent.push({ id: prevId, position: "previous" });
75
- }
76
- if (currentIndex < allSections.length - 1) {
77
- const nextId = allSections[currentIndex + 1].getAttribute("fynd-secondary-nav-id");
78
- if (nextId) adjacent.push({ id: nextId, position: "next" });
79
- }
80
- return adjacent;
81
- }
82
- static getGroupSections(groupName) {
83
- const secondaryNavItems2 = cachedSecondaryNavItems || SecondaryNavData.getSecondaryNavItems();
84
- const group = secondaryNavItems2.find((g) => g.groupName === groupName);
85
- return group ? group.Links : [];
86
- }
87
- };
88
- var SecondaryNavData = class {
89
- static getSecondaryNavItems() {
90
- if (cachedSecondaryNavItems) {
91
- return cachedSecondaryNavItems;
92
- }
93
- const secondaryNavDivs = document.querySelectorAll('[fynd-secondary-nav="true"]');
94
- const groupedNavs = {};
95
- secondaryNavDivs.forEach((div, index) => {
96
- const navText = div.getAttribute("fynd-secondary-nav-text");
97
- const navGroup = div.getAttribute("fynd-secondary-nav-group");
98
- let uniqueId = div.getAttribute("fynd-secondary-nav-id");
99
- if (!uniqueId) {
100
- uniqueId = `secondary-nav-${navGroup}-${index}-${Date.now()}`;
101
- div.setAttribute("fynd-secondary-nav-id", uniqueId);
102
- }
103
- const scrollTargetElement = div.querySelector("[fynd-scroll-target]");
104
- const scrollTargetValue = scrollTargetElement?.getAttribute("fynd-scroll-target");
105
- if (navText && navGroup && scrollTargetValue) {
106
- if (!groupedNavs[navGroup]) {
107
- groupedNavs[navGroup] = [];
108
- }
109
- groupedNavs[navGroup].push({
110
- id: uniqueId,
111
- Text: navText,
112
- link: scrollTargetValue
113
- });
114
- }
115
- });
116
- const navGroupsArray = Object.keys(groupedNavs).map((groupName) => ({
117
- groupName,
118
- Links: groupedNavs[groupName]
119
- }));
120
- cachedSecondaryNavItems = navGroupsArray;
121
- return navGroupsArray;
122
- }
123
- static getSecondaryNavJSON() {
124
- const navGroups = this.getSecondaryNavItems();
125
- return JSON.stringify(navGroups, null, 2);
126
- }
127
- static getCurrentlyVisibleGroup() {
128
- const navSections = document.querySelectorAll("[fynd-secondary-nav-id]");
129
- const groupVisibility = {};
130
- navSections.forEach((section) => {
131
- const sectionId = section.getAttribute("fynd-secondary-nav-id");
132
- if (!sectionId) return;
133
- const groupName = SecondaryNavUtils.getCurrentSectionGroup(sectionId);
134
- if (!groupName) return;
135
- const rect = section.getBoundingClientRect();
136
- const viewportHeight = window.innerHeight;
137
- const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);
138
- const sectionHeight = rect.height;
139
- const visibilityPercentage = visibleHeight > 0 ? visibleHeight / sectionHeight * 100 : 0;
140
- if (visibilityPercentage > 0) {
141
- if (!groupVisibility[groupName]) {
142
- groupVisibility[groupName] = 0;
143
- }
144
- groupVisibility[groupName] += visibilityPercentage;
145
- }
146
- });
147
- let mostVisibleGroup = null;
148
- let highestVisibility = 25;
149
- Object.entries(groupVisibility).forEach(([groupName, totalVisibility]) => {
150
- if (totalVisibility > highestVisibility) {
151
- highestVisibility = totalVisibility;
152
- mostVisibleGroup = groupName;
153
- }
154
- });
155
- return mostVisibleGroup;
156
- }
157
- };
158
- var NavLinkManager = class {
159
- static setAllNavLinksInactive() {
160
- if (!SecondaryNavUtils.checkIfAnySectionVisible()) {
161
- const allNavLinks = document.querySelectorAll("[fynd-secondary-navlink-active]");
162
- allNavLinks.forEach((navLink) => {
163
- navLink.setAttribute("fynd-secondary-navlink-active", "false");
164
- });
165
- }
166
- }
167
- static activateNavLink(sectionId) {
168
- const allNavLinks = document.querySelectorAll("[fynd-secondary-navlink-active]");
169
- allNavLinks.forEach((navLink) => {
170
- const linkId = navLink.getAttribute("fynd-secondary-navlink-id");
171
- if (linkId !== sectionId) {
172
- navLink.setAttribute("fynd-secondary-navlink-active", "false");
173
- }
174
- });
175
- const matchingNavLink = document.querySelector(`[fynd-secondary-navlink-active][fynd-secondary-navlink-id="${sectionId}"]`);
176
- if (matchingNavLink) {
177
- matchingNavLink.setAttribute("fynd-secondary-navlink-active", "true");
178
- } else {
179
- console.warn(`\u274C No matching nav link found for section: ${sectionId}`);
180
- }
181
- }
182
- static setActiveTab() {
183
- const navLinkDivs = document.querySelectorAll("[fynd-secondary-navlink-active]");
184
- navLinkDivs.forEach((div) => {
185
- const isAnchorActive = div.getAttribute("fynd-anchor-active") === "true";
186
- if (isAnchorActive) {
187
- div.setAttribute("fynd-secondary-navlink-active", "true");
188
- } else {
189
- div.setAttribute("fynd-secondary-navlink-active", "false");
190
- }
191
- });
192
- }
193
- };
194
- var AnimationController = class {
195
- static toggleSecondaryNav(shouldShow) {
196
- if (isAnimating || isSecondaryNavigationVisible === shouldShow) return;
197
- const wrapper = document.querySelector('[fynd-secondary-nav="wrapper"]');
198
- if (!wrapper) {
199
- console.warn("Secondary nav wrapper not found");
200
- return;
201
- }
202
- isAnimating = true;
203
- isSecondaryNavigationVisible = shouldShow;
204
- if (shouldShow) {
205
- this.showSecondaryNav(wrapper);
206
- } else {
207
- this.hideSecondaryNav(wrapper);
208
- }
209
- }
210
- static showSecondaryNav(wrapper) {
211
- wrapper.style.transform = "translateY(-100px)";
212
- wrapper.style.display = "block";
213
- wrapper.offsetHeight;
214
- wrapper.style.transition = "transform 300ms ease";
215
- wrapper.style.transform = "translateY(0px)";
216
- this.updateNavigationScrolledStyle(true);
217
- setTimeout(() => {
218
- wrapper.style.transition = "";
219
- isAnimating = false;
220
- }, 300);
221
- }
222
- static hideSecondaryNav(wrapper) {
223
- wrapper.style.transition = "transform 300ms ease";
224
- wrapper.style.transform = "translateY(-100px)";
225
- this.updateNavigationScrolledStyle(false);
226
- setTimeout(() => {
227
- wrapper.style.display = "none";
228
- wrapper.style.transition = "";
229
- isAnimating = false;
230
- }, 300);
231
- }
232
- static updateNavigationScrolledStyle(isSecondaryNavVisible) {
233
- const navigationScrolledElement = document.querySelector("[navigation-scrolled]");
234
- if (!navigationScrolledElement) {
235
- console.warn("Element with [navigation-scrolled] attribute not found");
236
- return;
237
- }
238
- if (isSecondaryNavVisible) {
239
- navigationScrolledElement.style.boxShadow = "none";
240
- } else {
241
- navigationScrolledElement.style.removeProperty("box-shadow");
242
- }
243
- }
244
- };
245
- var GroupVisibilityManager = class {
246
- static updateGroupVisibility(activeGroupName) {
247
- this.updateNavLinkVisibility(activeGroupName);
248
- this.updateWrapperVisibility(activeGroupName);
249
- }
250
- static updateNavLinkVisibility(activeGroupName) {
251
- const allNavLinks = document.querySelectorAll('[fynd-secondary-nav="link"]');
252
- allNavLinks.forEach((navLink) => {
253
- const linkGroupName = navLink.getAttribute("fynd-secondary-navgroup");
254
- if (activeGroupName && linkGroupName === activeGroupName) {
255
- navLink.style.display = "";
256
- navLink.setAttribute("fynd-group-visible", "true");
257
- } else {
258
- navLink.style.display = "none";
259
- navLink.setAttribute("fynd-group-visible", "false");
260
- }
261
- });
262
- }
263
- static updateWrapperVisibility(activeGroupName) {
264
- const hasActiveLinks = SecondaryNavUtils.hasAnyActiveNavLink();
265
- const shouldShowNav = activeGroupName !== null && hasActiveLinks;
266
- AnimationController.toggleSecondaryNav(shouldShowNav);
267
- }
268
- };
269
- var NavigationController = class {
270
- static handleNavigation(currentSectionId) {
271
- const currentSectionElement = document.querySelector(`[fynd-secondary-nav-id="${currentSectionId}"]`);
272
- if (!currentSectionElement) return;
273
- const currentGroupName = SecondaryNavUtils.getCurrentSectionGroup(currentSectionId);
274
- if (!currentGroupName) {
275
- GroupVisibilityManager.updateGroupVisibility(null);
276
- return;
277
- }
278
- GroupVisibilityManager.updateGroupVisibility(currentGroupName);
279
- const adjacentSections = SecondaryNavUtils.getAdjacentSections(currentSectionId);
280
- const hasAdjacentSameGroup = adjacentSections.some((adjSection) => {
281
- const adjGroupName = SecondaryNavUtils.getCurrentSectionGroup(adjSection.id);
282
- return adjGroupName === currentGroupName;
283
- });
284
- if (hasAdjacentSameGroup) {
285
- this.handleGroupSequentialNavigation(currentSectionId, currentGroupName);
286
- } else {
287
- NavLinkManager.activateNavLink(currentSectionId);
288
- }
289
- }
290
- static handleGroupSequentialNavigation(currentSectionId, groupName) {
291
- const groupSections = SecondaryNavUtils.getGroupSections(groupName);
292
- const currentIndex = groupSections.findIndex((section) => section.id === currentSectionId);
293
- if (currentIndex === -1) return;
294
- groupSections.forEach((section) => {
295
- const navLink = document.querySelector(`[fynd-secondary-navlink-id="${section.id}"]`);
296
- if (navLink) {
297
- navLink.setAttribute("fynd-secondary-navlink-active", "false");
298
- }
299
- });
300
- NavLinkManager.activateNavLink(currentSectionId);
301
- }
302
- static checkInitialGroupVisibility() {
303
- const visibleGroup = SecondaryNavData.getCurrentlyVisibleGroup();
304
- if (visibleGroup) {
305
- const mostVisible = SecondaryNavUtils.findMostVisibleSection();
306
- if (mostVisible) {
307
- const mostVisibleGroup = SecondaryNavUtils.getCurrentSectionGroup(mostVisible);
308
- if (mostVisibleGroup === visibleGroup) {
309
- NavLinkManager.activateNavLink(mostVisible);
310
- }
311
- }
312
- GroupVisibilityManager.updateGroupVisibility(visibleGroup);
313
- } else {
314
- GroupVisibilityManager.updateGroupVisibility(null);
315
- }
316
- }
317
- };
318
- var SecondaryNavInitializer = class {
319
- static initSecondarynav() {
320
- const secondaryNavItems2 = SecondaryNavData.getSecondaryNavItems();
321
- if (secondaryNavItems2.length === 0) {
322
- return;
323
- }
324
- const slotDiv = document.querySelector('[fynd-secondary-nav="slot"]');
325
- if (!slotDiv) {
326
- console.warn("Secondary nav slot not found");
327
- return;
328
- }
329
- this.buildNavLinks(slotDiv, secondaryNavItems2);
330
- this.initializeScrollNavigation();
331
- }
332
- static buildNavLinks(slotDiv, secondaryNavItems2) {
333
- slotDiv.innerHTML = "";
334
- secondaryNavItems2.forEach((group) => {
335
- group.Links.forEach((navLink) => {
336
- const linkDiv = this.createNavLinkElement(navLink, group.groupName);
337
- slotDiv.appendChild(linkDiv);
338
- });
339
- });
340
- }
341
- static createNavLinkElement(navLink, groupName) {
342
- const linkDiv = document.createElement("div");
343
- linkDiv.setAttribute("fynd-secondary-nav", "link");
344
- linkDiv.setAttribute("fynd-secondary-navgroup", groupName);
345
- linkDiv.setAttribute("fynd-secondary-navlink-id", navLink.id);
346
- linkDiv.setAttribute("fynd-scroll-trigger", navLink.link);
347
- linkDiv.setAttribute("data-text-style", "body-m-regular");
348
- linkDiv.setAttribute("fynd-secondary-navlink-active", "false");
349
- linkDiv.textContent = navLink.Text;
350
- linkDiv.addEventListener("click", () => {
351
- setTimeout(() => {
352
- NavLinkManager.setActiveTab();
353
- }, 50);
354
- });
355
- return linkDiv;
356
- }
357
- static initializeScrollNavigation() {
358
- window.scrollNavigation?.fullReinitialize();
359
- }
360
- static initSecondarynavScroll() {
361
- const navSections = document.querySelectorAll("[fynd-secondary-nav-id]");
362
- if (navSections.length === 0) {
363
- return;
364
- }
365
- this.setupScrollTriggers(navSections);
366
- this.finalizeInitialization(navSections.length);
367
- }
368
- static setupScrollTriggers(navSections) {
369
- const secondaryNavItems2 = cachedSecondaryNavItems || SecondaryNavData.getSecondaryNavItems();
370
- navSections.forEach((section) => {
371
- const sectionId = section.getAttribute("fynd-secondary-nav-id");
372
- if (!sectionId) return;
373
- const correspondingData = this.findCorrespondingData(sectionId, secondaryNavItems2);
374
- if (!correspondingData) return;
375
- this.createScrollTrigger(section, sectionId, correspondingData);
376
- });
377
- }
378
- static findCorrespondingData(sectionId, secondaryNavItems2) {
379
- for (const group of secondaryNavItems2) {
380
- const found = group.Links.find((link) => link.id === sectionId);
381
- if (found) return found;
382
- }
383
- return null;
384
- }
385
- static createScrollTrigger(section, sectionId, correspondingData) {
386
- window.gsap.registerPlugin(window.ScrollTrigger);
387
- window.ScrollTrigger.create({
388
- trigger: section,
389
- start: "top bottom",
390
- end: "bottom top",
391
- onUpdate: (self) => {
392
- if (isInitialLoad) return;
393
- const rect = section.getBoundingClientRect();
394
- const viewportHeight = window.innerHeight;
395
- const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);
396
- const sectionHeight = rect.height;
397
- const visibilityPercentage = visibleHeight > 0 ? visibleHeight / sectionHeight * 100 : 0;
398
- const mostVisible = SecondaryNavUtils.findMostVisibleSection();
399
- if (mostVisible && mostVisible === sectionId && visibilityPercentage > 50) {
400
- NavigationController.handleNavigation(sectionId);
401
- } else if (!mostVisible) {
402
- const visibleGroup = SecondaryNavData.getCurrentlyVisibleGroup();
403
- if (visibleGroup) {
404
- GroupVisibilityManager.updateGroupVisibility(visibleGroup);
405
- } else {
406
- setTimeout(() => {
407
- if (!SecondaryNavUtils.checkIfAnySectionVisible()) {
408
- NavLinkManager.setAllNavLinksInactive();
409
- GroupVisibilityManager.updateGroupVisibility(null);
410
- }
411
- }, 10);
412
- }
413
- }
414
- }
415
- });
416
- }
417
- static finalizeInitialization(sectionCount) {
418
- scrollTrackingInitialized = true;
419
- setTimeout(() => {
420
- isInitialLoad = false;
421
- NavigationController.checkInitialGroupVisibility();
422
- }, 500);
423
- }
424
- };
425
- var secondaryNavItems = SecondaryNavData.getSecondaryNavItems();
426
- document.addEventListener("DOMContentLoaded", () => {
427
- setTimeout(() => {
428
- cachedSecondaryNavItems = null;
429
- isInitialLoad = true;
430
- SecondaryNavInitializer.initSecondarynav();
431
- setTimeout(() => {
432
- SecondaryNavInitializer.initSecondarynavScroll();
433
- }, 300);
434
- }, 200);
435
- });
436
- })();
437
- //# sourceMappingURL=index.js.map
1
+ "use strict";(()=>{var v=null,N=!0,A=!1,k=!1,p=!1,l=class{static hasAnyActiveNavLink(){return document.querySelectorAll('[fynd-secondary-navlink-active="true"]').length>0}static checkIfAnySectionVisible(){let t=document.querySelectorAll("[fynd-secondary-nav-id]"),e=window.innerHeight;for(let n of t){let i=n.getBoundingClientRect(),s=Math.min(i.bottom,e)-Math.max(i.top,0),o=i.height;if((s>0?s/o*100:0)>50)return!0}return!1}static findMostVisibleSection(){let t=document.querySelectorAll("[fynd-secondary-nav-id]"),e=window.innerHeight,n=null,i=0;return t.forEach(s=>{let o=s.getAttribute("fynd-secondary-nav-id");if(!o)return;let a=s.getBoundingClientRect(),r=Math.min(a.bottom,e)-Math.max(a.top,0),g=a.height,c=r>0?r/g*100:0;c>50&&c>i&&(i=c,n=o)}),n}static getCurrentSectionGroup(t){let e=v||d.getSecondaryNavItems();for(let n of e)if(n.Links.find(s=>s.id===t))return n.groupName;return null}static getAdjacentSections(t){let e=Array.from(document.querySelectorAll("[fynd-secondary-nav-id]")),n=e.findIndex(s=>s.getAttribute("fynd-secondary-nav-id")===t),i=[];if(n>0){let s=e[n-1].getAttribute("fynd-secondary-nav-id");s&&i.push({id:s,position:"previous"})}if(n<e.length-1){let s=e[n+1].getAttribute("fynd-secondary-nav-id");s&&i.push({id:s,position:"next"})}return i}static getGroupSections(t){let n=(v||d.getSecondaryNavItems()).find(i=>i.groupName===t);return n?n.Links:[]}},d=class{static getSecondaryNavItems(){if(v)return v;let t=document.querySelectorAll('[fynd-secondary-nav="true"]'),e={};t.forEach((i,s)=>{let o=i.getAttribute("fynd-secondary-nav-text"),a=i.getAttribute("fynd-secondary-nav-group"),r=i.getAttribute("fynd-secondary-nav-id");r||(r=`secondary-nav-${a}-${s}-${Date.now()}`,i.setAttribute("fynd-secondary-nav-id",r));let c=i.querySelector("[fynd-scroll-target]")?.getAttribute("fynd-scroll-target");o&&a&&c&&(e[a]||(e[a]=[]),e[a].push({id:r,Text:o,link:c}))});let n=Object.keys(e).map(i=>({groupName:i,Links:e[i]}));return v=n,n}static getSecondaryNavJSON(){let t=this.getSecondaryNavItems();return JSON.stringify(t,null,2)}static getCurrentlyVisibleGroup(){let t=document.querySelectorAll("[fynd-secondary-nav-id]"),e={};t.forEach(s=>{let o=s.getAttribute("fynd-secondary-nav-id");if(!o)return;let a=l.getCurrentSectionGroup(o);if(!a)return;let r=s.getBoundingClientRect(),g=window.innerHeight,c=Math.min(r.bottom,g)-Math.max(r.top,0),m=r.height,L=c>0?c/m*100:0;L>0&&(e[a]||(e[a]=0),e[a]+=L)});let n=null,i=25;return Object.entries(e).forEach(([s,o])=>{o>i&&(i=o,n=s)}),n}},y=class{static setAllNavLinksInactive(){l.checkIfAnySectionVisible()||document.querySelectorAll("[fynd-secondary-navlink-active]").forEach(e=>{e.setAttribute("fynd-secondary-navlink-active","false")})}static activateNavLink(t){document.querySelectorAll("[fynd-secondary-navlink-active]").forEach(i=>{i.getAttribute("fynd-secondary-navlink-id")!==t&&i.setAttribute("fynd-secondary-navlink-active","false")});let n=document.querySelector(`[fynd-secondary-navlink-active][fynd-secondary-navlink-id="${t}"]`);n?n.setAttribute("fynd-secondary-navlink-active","true"):console.warn(`\u274C No matching nav link found for section: ${t}`)}static setActiveTab(){document.querySelectorAll("[fynd-secondary-navlink-active]").forEach(e=>{e.getAttribute("fynd-anchor-active")==="true"?e.setAttribute("fynd-secondary-navlink-active","true"):e.setAttribute("fynd-secondary-navlink-active","false")})}},S=class{static toggleSecondaryNav(t){if(p||k===t)return;let e=document.querySelector('[fynd-secondary-nav="wrapper"]');if(!e){console.warn("Secondary nav wrapper not found");return}p=!0,k=t,t?this.showSecondaryNav(e):this.hideSecondaryNav(e)}static showSecondaryNav(t){t.style.transform="translateY(-100px)",t.style.display="block",t.offsetHeight,t.style.transition="transform 300ms ease",t.style.transform="translateY(0px)",this.updateNavigationScrolledStyle(!0),setTimeout(()=>{t.style.transition="",p=!1},300)}static hideSecondaryNav(t){t.style.transition="transform 300ms ease",t.style.transform="translateY(-100px)",this.updateNavigationScrolledStyle(!1),setTimeout(()=>{t.style.display="none",t.style.transition="",p=!1},300)}static updateNavigationScrolledStyle(t){let e=document.querySelector("[navigation-scrolled]");if(!e){console.warn("Element with [navigation-scrolled] attribute not found");return}t?e.style.boxShadow="none":e.style.removeProperty("box-shadow")}},u=class{static updateGroupVisibility(t){this.updateNavLinkVisibility(t),this.updateWrapperVisibility(t)}static updateNavLinkVisibility(t){document.querySelectorAll('[fynd-secondary-nav="link"]').forEach(n=>{let i=n.getAttribute("fynd-secondary-navgroup");t&&i===t?(n.style.display="",n.setAttribute("fynd-group-visible","true")):(n.style.display="none",n.setAttribute("fynd-group-visible","false"))})}static updateWrapperVisibility(t){let e=l.hasAnyActiveNavLink(),n=t!==null&&e;S.toggleSecondaryNav(n)}},h=class{static handleNavigation(t){if(!document.querySelector(`[fynd-secondary-nav-id="${t}"]`))return;let n=l.getCurrentSectionGroup(t);if(!n){u.updateGroupVisibility(null);return}u.updateGroupVisibility(n),l.getAdjacentSections(t).some(o=>l.getCurrentSectionGroup(o.id)===n)?this.handleGroupSequentialNavigation(t,n):y.activateNavLink(t)}static handleGroupSequentialNavigation(t,e){let n=l.getGroupSections(e);n.findIndex(s=>s.id===t)!==-1&&(n.forEach(s=>{let o=document.querySelector(`[fynd-secondary-navlink-id="${s.id}"]`);o&&o.setAttribute("fynd-secondary-navlink-active","false")}),y.activateNavLink(t))}static checkInitialGroupVisibility(){let t=d.getCurrentlyVisibleGroup();if(t){let e=l.findMostVisibleSection();e&&l.getCurrentSectionGroup(e)===t&&y.activateNavLink(e),u.updateGroupVisibility(t)}else u.updateGroupVisibility(null)}},b=class{static initSecondarynav(){let t=d.getSecondaryNavItems();if(t.length===0)return;let e=document.querySelector('[fynd-secondary-nav="slot"]');if(!e){console.warn("Secondary nav slot not found");return}this.buildNavLinks(e,t),this.initializeScrollNavigation()}static buildNavLinks(t,e){t.innerHTML="",e.forEach(n=>{n.Links.forEach(i=>{let s=this.createNavLinkElement(i,n.groupName);t.appendChild(s)})})}static createNavLinkElement(t,e){let n=document.createElement("div");return n.setAttribute("fynd-secondary-nav","link"),n.setAttribute("fynd-secondary-navgroup",e),n.setAttribute("fynd-secondary-navlink-id",t.id),n.setAttribute("fynd-scroll-trigger",t.link),n.setAttribute("data-text-style","body-m-regular"),n.setAttribute("fynd-secondary-navlink-active","false"),n.textContent=t.Text,n.addEventListener("click",()=>{setTimeout(()=>{y.setActiveTab()},50)}),n}static initializeScrollNavigation(){window.scrollNavigation?.fullReinitialize()}static initSecondarynavScroll(){let t=document.querySelectorAll("[fynd-secondary-nav-id]");t.length!==0&&(this.setupScrollTriggers(t),this.finalizeInitialization(t.length))}static setupScrollTriggers(t){let e=v||d.getSecondaryNavItems();t.forEach(n=>{let i=n.getAttribute("fynd-secondary-nav-id");if(!i)return;let s=this.findCorrespondingData(i,e);s&&this.createScrollTrigger(n,i,s)})}static findCorrespondingData(t,e){for(let n of e){let i=n.Links.find(s=>s.id===t);if(i)return i}return null}static createScrollTrigger(t,e,n){window.gsap.registerPlugin(window.ScrollTrigger),window.ScrollTrigger.create({trigger:t,start:"top bottom",end:"bottom top",onUpdate:i=>{if(N)return;let s=t.getBoundingClientRect(),o=window.innerHeight,a=Math.min(s.bottom,o)-Math.max(s.top,0),r=s.height,g=a>0?a/r*100:0,c=l.findMostVisibleSection();if(c&&c===e&&g>50)h.handleNavigation(e);else if(!c){let m=d.getCurrentlyVisibleGroup();m?u.updateGroupVisibility(m):setTimeout(()=>{l.checkIfAnySectionVisible()||(y.setAllNavLinksInactive(),u.updateGroupVisibility(null))},10)}}})}static finalizeInitialization(t){A=!0,setTimeout(()=>{N=!1,h.checkInitialGroupVisibility()},500)}},T=d.getSecondaryNavItems();document.addEventListener("DOMContentLoaded",()=>{setTimeout(()=>{v=null,N=!0,b.initSecondarynav(),setTimeout(()=>{b.initSecondarynavScroll()},300)},200)});})();
@@ -1,154 +1 @@
1
- /* src/navigation/style.css */
2
- [data-tab-link-active=true] {
3
- border-right-color: #404040;
4
- background-color: #f8f8f9;
5
- opacity: 1;
6
- }
7
- [data-tab-content-active] {
8
- display: none;
9
- }
10
- [data-tab-content-active=true] {
11
- display: block;
12
- }
13
- [data-tab-content-active=false] {
14
- display: none;
15
- }
16
- [data-nav-element=mover] {
17
- height: 0;
18
- overflow: hidden;
19
- }
20
- [data-nav-element=overlay] {
21
- opacity: 0;
22
- display: none;
23
- }
24
- [data-nav-element=wrapper] {
25
- top: 44px;
26
- }
27
- [data-nav-toggle=main-menu] {
28
- z-index: 10 !important;
29
- }
30
- [data-mobile-nav=main-menu] {
31
- z-index: 999;
32
- }
33
- [data-nav-element=mover] {
34
- border-radius: 0px 0px 12px 12px;
35
- box-shadow: rgba(0, 0, 0, 0.03) 0px 12px 16px 6px;
36
- }
37
- [data-dropdown-item] {
38
- width: 100%;
39
- }
40
- [data-dropdown-item=resources] {
41
- width: 100%;
42
- }
43
- [data-dropdown-item=company] {
44
- width: 100%;
45
- }
46
- [data-desktop-content] {
47
- display: none;
48
- }
49
- @media (max-width: 992px) {
50
- [data-desktop-content] {
51
- display: block;
52
- }
53
- }
54
- .announcement-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal {
55
- display: none;
56
- flex-direction: column;
57
- height: 100%;
58
- bottom: 0px;
59
- justify-content: center;
60
- gap: 4px;
61
- padding-left: 20px;
62
- padding-right: 20px;
63
- }
64
- span.swiper-pagination-bullet {
65
- width: 6px;
66
- height: 6px;
67
- background: rgba(255, 255, 255, 0.80);
68
- pointer-events: auto;
69
- }
70
- span.swiper-pagination-bullet.swiper-pagination-bullet-active {
71
- background: white;
72
- }
73
- @media screen and (max-width: 1024px) {
74
- .announcement-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal {
75
- left: -16px;
76
- }
77
- }
78
- [navigation-scrolled=true] {
79
- transform: translateY(-40px);
80
- box-shadow: rgba(0, 0, 0, 0.03) 0px 12px 16px 10px;
81
- }
82
- [announcementbar=false] {
83
- transform: translateY(-40px) !important;
84
- }
85
- [navigation-scrolled-menu=false] {
86
- top: 0px;
87
- }
88
- [navigation-scrolled=false] {
89
- transform: translateY(0);
90
- }
91
- @media screen and (max-width: 991px) {
92
- [navigation-scrolled=true] {
93
- transform: translateY(-50px);
94
- }
95
- [navigation-scrolled-menu=true] {
96
- top: 0px;
97
- }
98
- [announcementbar=false] {
99
- transform: translateY(-46px) !important;
100
- }
101
- }
102
- [navigation-scrolled-dependent=true].click-loader {
103
- top: 40px;
104
- }
105
- [navigation-scrolled-dependent=false].click-loader {
106
- top: 40px;
107
- }
108
- [fynd-secondary-nav=link] {
109
- border-bottom: 1px solid #0000;
110
- border-top-left-radius: 6px;
111
- border-top-right-radius: 6px;
112
- padding-left: 1.5rem;
113
- padding-right: 1.5rem;
114
- padding-top: 0.65rem;
115
- padding-bottom: 0.65rem;
116
- transition-property: all;
117
- transition-duration: 300ms;
118
- transition-timing-function: ease;
119
- cursor: pointer;
120
- user-select: none;
121
- white-space: nowrap;
122
- }
123
- [fynd-secondary-navlink-active=true] {
124
- background-color: #f2f2f2;
125
- border-bottom-color: #000;
126
- }
127
- [fynd-secondary-nav=wrapper] {
128
- display: none;
129
- }
130
- .test__class {
131
- color: aliceblue;
132
- }
133
- [fynd-navigation=dropdown-container] {
134
- top: 0 !important;
135
- padding-top: 0px !important;
136
- }
137
- [fynd-navigation=announcement-bar] {
138
- }
139
- [fynd-navigation=ip-banner] {
140
- height: 0px;
141
- overflow: hidden;
142
- }
143
- #geoswitch-select::-ms-expand {
144
- display: none;
145
- }
146
- #geoswitch-select {
147
- appearance: none;
148
- -webkit-appearance: none;
149
- -moz-appearance: none;
150
- }
151
- [data-mobile-nav=main-menu] {
152
- z-index: 8999999999999;
153
- }
154
- /*# sourceMappingURL=style.css.map */
1
+ [data-tab-link-active=true]{border-right-color:#404040;background-color:#f8f8f9;opacity:1}[data-tab-content-active]{display:none}[data-tab-content-active=true]{display:block}[data-tab-content-active=false]{display:none}[data-nav-element=mover]{height:0;overflow:hidden}[data-nav-element=overlay]{opacity:0;display:none}[data-nav-element=wrapper]{top:44px}[data-nav-toggle=main-menu]{z-index:10!important}[data-mobile-nav=main-menu]{z-index:999}[data-nav-element=mover]{border-radius:0 0 12px 12px;box-shadow:#00000008 0 12px 16px 6px}[data-dropdown-item],[data-dropdown-item=resources],[data-dropdown-item=company]{width:100%}[data-desktop-content]{display:none}@media (max-width: 992px){[data-desktop-content]{display:block}}.announcement-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal{display:none;flex-direction:column;height:100%;bottom:0;justify-content:center;gap:4px;padding-left:20px;padding-right:20px}span.swiper-pagination-bullet{width:6px;height:6px;background:#fffc;pointer-events:auto}span.swiper-pagination-bullet.swiper-pagination-bullet-active{background:#fff}@media screen and (max-width: 1024px){.announcement-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal{left:-16px}}[navigation-scrolled=true]{transform:translateY(-40px);box-shadow:#00000008 0 12px 16px 10px}[announcementbar=false]{transform:translateY(-40px)!important}[navigation-scrolled-menu=false]{top:0}[navigation-scrolled=false]{transform:translateY(0)}@media screen and (max-width: 991px){[navigation-scrolled=true]{transform:translateY(-50px)}[navigation-scrolled-menu=true]{top:0}[announcementbar=false]{transform:translateY(-46px)!important}}[navigation-scrolled-dependent=true].click-loader,[navigation-scrolled-dependent=false].click-loader{top:40px}[fynd-secondary-nav=link]{border-bottom:1px solid #0000;border-top-left-radius:6px;border-top-right-radius:6px;padding:.65rem 1.5rem;transition-property:all;transition-duration:.3s;transition-timing-function:ease;cursor:pointer;user-select:none;white-space:nowrap}[fynd-secondary-navlink-active=true]{background-color:#f2f2f2;border-bottom-color:#000}[fynd-secondary-nav=wrapper]{display:none}.test__class{color:#f0f8ff}[fynd-navigation=dropdown-container]{top:0!important;padding-top:0!important}[fynd-navigation=ip-banner]{height:0px;overflow:hidden}#geoswitch-select::-ms-expand{display:none}#geoswitch-select{appearance:none;-webkit-appearance:none;-moz-appearance:none}[data-mobile-nav=main-menu]{z-index:8999999999999}
@@ -1,2 +0,0 @@
1
- /* src/navigation/temp.css */
2
- /*# sourceMappingURL=temp.css.map */
@@ -1,69 +1 @@
1
- /* src/navigation/theme.css */
2
- [style-nav-bg=transparent] {
3
- background-color: transparent;
4
- }
5
- [style-nav-bg=white] {
6
- background-color: #fff;
7
- backdrop-filter: blur(50px);
8
- }
9
- [style-nav-bg=white-blur] {
10
- background-color: rgba(255, 255, 255, 0.8);
11
- backdrop-filter: blur(50px);
12
- }
13
- [style-nav-logo=black] {
14
- color: black;
15
- }
16
- [style-nav-logo=white] {
17
- color: white;
18
- }
19
- [style-nav-link=black] {
20
- color: black;
21
- }
22
- [style-nav-link=white] {
23
- color: #A0A1A2;
24
- }
25
- [style-nav-link=white]:hover {
26
- color: white !important;
27
- }
28
- [style-nav-tertiary-button=black] {
29
- color: black;
30
- }
31
- [style-nav-tertiary-button=white] {
32
- color: white !important;
33
- }
34
- [style-nav-tertiary-button=white]:hover {
35
- opacity: 0.8;
36
- }
37
- [style-nav-secondary-button=black] {
38
- color: black;
39
- border-color: #0000001f !important;
40
- }
41
- [style-nav-secondary-button=white] {
42
- color: white !important;
43
- border-color: #ffffff38 !important;
44
- }
45
- [style-nav-primary-button=black] {
46
- background-color: #141414;
47
- color: #ffffff !important;
48
- }
49
- [style-nav-primary-button=white] {
50
- background-color: #ffffff;
51
- color: #141414 !important;
52
- }
53
- [style-nav-primary-button=white]:hover {
54
- background-color: #fff;
55
- opacity: 0.8;
56
- }
57
- [style-nav-toggle=black] {
58
- color: black;
59
- }
60
- [style-nav-toggle=white] {
61
- color: white;
62
- }
63
- [style-body-bg=white] {
64
- background-color: white;
65
- }
66
- [style-body-bg=black] {
67
- background-color: #0e0e0e;
68
- }
69
- /*# sourceMappingURL=theme.css.map */
1
+ [style-nav-bg=transparent]{background-color:transparent}[style-nav-bg=white]{background-color:#fff;backdrop-filter:blur(50px)}[style-nav-bg=white-blur]{background-color:#fffc;backdrop-filter:blur(50px)}[style-nav-logo=black]{color:#000}[style-nav-logo=white]{color:#fff}[style-nav-link=black]{color:#000}[style-nav-link=white]{color:#a0a1a2}[style-nav-link=white]:hover{color:#fff!important}[style-nav-tertiary-button=black]{color:#000}[style-nav-tertiary-button=white]{color:#fff!important}[style-nav-tertiary-button=white]:hover{opacity:.8}[style-nav-secondary-button=black]{color:#000;border-color:#0000001f!important}[style-nav-secondary-button=white]{color:#fff!important;border-color:#ffffff38!important}[style-nav-primary-button=black]{background-color:#141414;color:#fff!important}[style-nav-primary-button=white]{background-color:#fff;color:#141414!important}[style-nav-primary-button=white]:hover{background-color:#fff;opacity:.8}[style-nav-toggle=black]{color:#000}[style-nav-toggle=white]{color:#fff}[style-body-bg=white]{background-color:#fff}[style-body-bg=black]{background-color:#0e0e0e}