@fynd-design-engineering/fynd-one-v2 1.0.2 → 1.0.4

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.
@@ -0,0 +1 @@
1
+ "use strict";(()=>{function e(o){console.log("Logged message:",o)}})();
@@ -0,0 +1 @@
1
+ "use strict";(()=>{var u={NESTED_MENU_DELAY:10,NESTED_MENU_CLOSE_DELAY:500},n={NESTED_MENU:'[data-mobile-nav="nested-menu"]',MAIN_MENU:'[data-mobile-nav="main-menu"]',TOGGLE_MAIN_MENU:'[data-nav-toggle="main-menu"]',TOGGLE_NESTED_MENU:'[data-nav-toggle="nested-menu"]',MAIN_MENU_LINKS:"[data-mobile-link]",NAV_OVERLAY:'[data-nav-element="overlay"]',OPEN_ICON:'[data-menu-icon="open"]',CLOSE_ICON:'[data-menu-icon="close"]',MOBILE_MENU:"[data-mobile-menu]"},o=class{constructor(){this.state={isMainMenuOpen:!1,isNestedMenuOpen:!1};this.elements=this.getElements(),this.init()}getElements(){let e=document.querySelector(n.NESTED_MENU),t=document.querySelector(n.MAIN_MENU),s=document.querySelector(n.NAV_OVERLAY),i=document.querySelector(n.OPEN_ICON),a=document.querySelector(n.CLOSE_ICON);if(!e||!t||!s||!i||!a)throw new Error("Required navigation elements not found");return{nestedMenu:e,mainMenu:t,toggleMainMenuButtons:document.querySelectorAll(n.TOGGLE_MAIN_MENU),toggleNestedMenuButtons:document.querySelectorAll(n.TOGGLE_NESTED_MENU),mainMenuLinks:document.querySelectorAll(n.MAIN_MENU_LINKS),navOverlay:s,openIcon:i,closeIcon:a}}init(){this.setupInitialStyles(),this.bindEventListeners()}setupInitialStyles(){this.elements.nestedMenu.style.display="none",this.elements.nestedMenu.style.transform="translateX(100%)",this.elements.nestedMenu.style.transition="transform 0.5s ease",this.elements.mainMenu.style.display="block",this.elements.mainMenu.style.height="0dvh",this.elements.mainMenu.style.transition="height 0.3s ease-in-out"}bindEventListeners(){this.elements.toggleMainMenuButtons.forEach(e=>{e.addEventListener("click",()=>{console.log("Main menu button clicked"),this.toggleMainMenu()})}),this.elements.toggleNestedMenuButtons.forEach(e=>{e.addEventListener("click",()=>{console.log("Nested menu button clicked"),this.toggleNestedMenu()})}),this.elements.mainMenuLinks.forEach(e=>{e.addEventListener("click",t=>{let i=t.currentTarget.getAttribute("data-mobile-link");i&&(console.log(`Menu link clicked: ${i}`),this.replaceContent(i),this.toggleNestedMenu())})})}openMainMenu(){if(this.state.isMainMenuOpen)return;let{mainMenu:e}=this.elements;e.style.overflow="hidden",e.style.display="block",e.style.height="0dvh",requestAnimationFrame(()=>{e.style.height="100dvh"}),this.state.isMainMenuOpen=!0,this.updateMenuIcons(!0),console.log("\u{1F354} Main menu OPENED")}closeMainMenu(){if(!this.state.isMainMenuOpen)return;let{mainMenu:e}=this.elements;e.style.height="0dvh";let t=()=>{e.style.display="none",console.log("\u{1F354} Main menu CLOSED (animation complete)"),this.updateMenuIcons(!1)};e.addEventListener("transitionend",t,{once:!0}),this.state.isMainMenuOpen=!1,console.log("\u{1F354} Main menu closing...")}toggleMainMenu(){this.state.isMainMenuOpen?(this.closeMainMenu(),this.state.isNestedMenuOpen&&this.closeNestedMenu()):this.openMainMenu()}openNestedMenu(){let{nestedMenu:e,navOverlay:t}=this.elements;e.style.display="block",t.style.opacity="1",setTimeout(()=>{e.style.transform="translateX(0%)"},u.NESTED_MENU_DELAY),this.state.isNestedMenuOpen=!0,console.log("\u{1F4C2} Nested menu OPENED")}closeNestedMenu(){let{nestedMenu:e,navOverlay:t}=this.elements;e.style.transform="translateX(100%)",setTimeout(()=>{e.style.display="none",console.log("\u{1F4C2} Nested menu CLOSED (animation complete)")},u.NESTED_MENU_CLOSE_DELAY),t.style.opacity="0",this.state.isNestedMenuOpen=!1,console.log("\u{1F4C2} Nested menu closing...")}toggleNestedMenu(){this.state.isNestedMenuOpen?this.closeNestedMenu():this.openNestedMenu()}updateMenuIcons(e){let{openIcon:t,closeIcon:s}=this.elements;e?(t.style.opacity="0",s.style.opacity="1"):(t.style.opacity="1",s.style.opacity="0")}replaceContent(e){document.querySelectorAll(n.MOBILE_MENU).forEach(s=>{s.style.display="none"});let t=document.querySelector(`[data-mobile-menu="${e}"]`);t?(t.style.display="block",console.log(`\u{1F4C4} Content switched to: ${e}`)):console.warn(`Content element with data-mobile-menu="${e}" not found`)}getState(){return{...this.state}}closeAllMenus(){this.state.isMainMenuOpen&&this.closeMainMenu(),this.state.isNestedMenuOpen&&this.closeNestedMenu()}};document.addEventListener("DOMContentLoaded",()=>{try{new o}catch(l){console.error("Failed to initialize mobile navigation:",l)}});})();
@@ -1 +1 @@
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=mover]{border-radius:0 0 12px 12px;box-shadow:13px 118px 33px #29292900,8px 76px 30px #29292903,5px 42px 26px #29292905,2px 19px 19px #2929290a,1px 5px 10px #2929290d}[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}}
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=mover]{border-radius:0 0 12px 12px;box-shadow:13px 118px 33px #29292900,8px 76px 30px #29292903,5px 42px 26px #29292905,2px 19px 19px #2929290a,1px 5px 10px #2929290d}[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}}
@@ -0,0 +1 @@
1
+ "use strict";(()=>{function e(o){console.log("Logged message:",o)}})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fynd-design-engineering/fynd-one-v2",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Updated CDN for fynd.com",
5
5
  "homepage": "https://github.com/Fynd-Design-Engineering/Fynd-Utils/blob/main/README.md",
6
6
  "license": "ISC",
File without changes