@gem-sdk/components 2.0.0-staging.901 → 2.0.0-staging.902
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Link=require("next/link");const DesktopMenuItem=({id:e,menu:t,arrow:l,textColor:p,menuTextColor:r,depth:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Link=require("next/link");const DesktopMenuItem=({id:e,menu:t,arrow:l,textColor:p,menuTextColor:r,depth:s=0,maxDepth:i=2,menuBg:n,typo:o,typography:g})=>{let a=t?.[e];if(!a||s>i)return null;let c=s===i,u=core.composeTypographyStyle(o,g),m=!!a?.childrens?.length&&!c,x=m&&!!l;return jsxRuntime.jsxs("li",{className:core.cls("gp-group gp-relative gp-inline-flex gp-flex-1 gp-cursor-pointer gp-items-center gp-gap-2 gp-whitespace-nowrap gp-px-4 gp-py-2 gp-transition-colors gp-duration-300 !gp-max-w-fit hover:gp-z-50",{"gp-justify-center":0===s,"gp-min-w-[200px] gp-border-b last:gp-border-b-transparent":s>0}),style:{...core.getGlobalColorStateStyle("c",0===s?p:r),...u},children:[a?.link&&!a.childrens?.length?jsxRuntime.jsx(Link,{href:a.link,title:a.title,children:a.title}):jsxRuntime.jsx("span",{children:a?.title}),x&&jsxRuntime.jsx("span",{dangerouslySetInnerHTML:{__html:l},className:core.cls("gp-ml-auto gp-shrink-0 [&>svg]:gp-h-4 [&>svg]:gp-w-auto",{"-gp-rotate-90":1===s})}),m&&jsxRuntime.jsx("div",{className:core.cls("gp-invisible gp-absolute gp-min-w-max gp-opacity-0 gp-transition-all gp-duration-300 gp-ease-in-out [li:hover>div&]:gp-visible [li:hover>div&]:gp-opacity-100 gp-z-[100]",{"gp-left-0 gp-top-full":0===s,"gp-left-full gp-top-0 gp-translate-y-4 [li:hover>div&]:gp-translate-y-0":1===s}),children:jsxRuntime.jsx("ul",{className:core.cls("gp-flex gp-flex-col gp-shadow-card-2 gp-relative",{"gp-ml-4":1===s}),style:{...core.getGlobalColorResponsiveStyle("bgc",n)},children:a?.childrens?.map(e=>jsxRuntime.jsx(DesktopMenuItem,{id:e,menu:t,depth:s+1,maxDepth:i,arrow:l,menuTextColor:r,menuBg:n,typo:o,typography:g},e))})})]})};exports.default=DesktopMenuItem;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),dynamic=require("next/dynamic"),Cart=require("../../../../cart/components/Cart.js");require("react"),require("next/head"),require("next/image"),require("@gem-sdk/system"),require("next/link"),require("react-youtube");var Image=require("../../../../image/components/Image.js");require("../../../../cart/components/shop-pay-button/ShopPayButton.js");var CheckoutNow=require("../../../../cart/components/CheckoutNow.js");const MobileMenu=dynamic(()=>Promise.resolve().then(function(){return require("./MobileMenu.js")})),DesktopMenu=dynamic(()=>Promise.resolve().then(function(){return require("./DesktopMenu.js")})),BasicHeader=({btnBgColor:e,btnBorder:t,btnRounded:s,btnSpacing:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),dynamic=require("next/dynamic"),Cart=require("../../../../cart/components/Cart.js");require("react"),require("next/head"),require("next/image"),require("@gem-sdk/system"),require("next/link"),require("react-youtube");var Image=require("../../../../image/components/Image.js");require("../../../../cart/components/shop-pay-button/ShopPayButton.js");var CheckoutNow=require("../../../../cart/components/CheckoutNow.js");const MobileMenu=dynamic(()=>Promise.resolve().then(function(){return require("./MobileMenu.js")})),DesktopMenu=dynamic(()=>Promise.resolve().then(function(){return require("./DesktopMenu.js")})),BasicHeader=({btnBgColor:e,btnBorder:t,btnRounded:s,btnSpacing:o,btnTextColor:r,btnTypography:i,btnType:n,btnWidth:l,openMode:a,buyNow:c,breakpoint:u,...p})=>{let m=!!p.menu?.ROOT.childrens?.length;return jsxRuntime.jsxs("div",{className:"gp-relative gp-z-50 gp-flex gp-items-center gp-px-4 gp-justify-between",style:core.makeStyleResponsive("h",p.height),children:[m?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(MobileMenu,{...p,className:core.cls({"gp-flex":"desktop"===u,"gp-hidden tablet:gp-flex":"tablet"===u,"gp-hidden mobile:gp-flex":"mobile"===u})}),jsxRuntime.jsx(DesktopMenu,{...p,className:core.cls({"!gp-hidden":"desktop"===u,"tablet:!gp-hidden":"tablet"===u,"mobile:!gp-hidden":"mobile"===u})})]}):null,!!p.logo&&jsxRuntime.jsx("div",{className:core.cls({"gp-justify-center":"desktop"===u&&m,"tablet:gp-justify-center":"tablet"===u&&m,"mobile:gp-justify-center":"mobile"===u&&m,"gp-flex gp-items-center":"desktop"===u,"tablet:gp-flex tablet:gp-items-center":"tablet"===u,"mobile:gp-flex mobile:gp-items-center":"mobile"===u,"gp-order-first":"desktop"!==u,"mobile:gp-order-[0]":!0,"tablet:gp-order-[0]":"tablet"===u}),children:jsxRuntime.jsx(Image.default,{style:core.makeStyleResponsive("maxh",p.height),setting:{srcSet:p.logo,alt:"Logo",quality:100,isAdaptive:!0},styles:{customAspectRadio:p.customAspectRadio,aspectRatio:p.logoAspectRatio,width:p.logoWidth,objectFit:p.layout,opacity:{normal:0,hover:0}}})}),jsxRuntime.jsxs("div",{className:"gp-flex gp-items-center gp-gap-4",children:[c&&jsxRuntime.jsx(CheckoutNow.default,{className:"mobile:gp-hidden",setting:{label:"Buy Now",openMode:a},styles:{backgroundColor:e,borderBtn:t,roundedBtn:s,btnSpacing:o,textColor:r,typography:i,type:n,width:l}}),jsxRuntime.jsx(Cart.default,{setting:{iconOnly:!0,svgIcon:p.cartIcon},styles:{iconColor:p.cartIconColor}})]})]})};exports.default=BasicHeader;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as p}from"react/jsx-runtime";import{composeTypographyStyle as t,cls as l,getGlobalColorStateStyle as r,getGlobalColorResponsiveStyle as
|
|
2
|
+
import{jsxs as e,jsx as p}from"react/jsx-runtime";import{composeTypographyStyle as t,cls as l,getGlobalColorStateStyle as r,getGlobalColorResponsiveStyle as g}from"@gem-sdk/core";import i from"next/link";let DesktopMenuItem=({id:n,menu:a,arrow:o,textColor:s,menuTextColor:m,depth:c=0,maxDepth:u=2,menuBg:d,typo:h,typography:f})=>{let v=a?.[n];if(!v||c>u)return null;let x=c===u,y=t(h,f),b=!!v?.childrens?.length&&!x,k=b&&!!o;return e("li",{className:l("gp-group gp-relative gp-inline-flex gp-flex-1 gp-cursor-pointer gp-items-center gp-gap-2 gp-whitespace-nowrap gp-px-4 gp-py-2 gp-transition-colors gp-duration-300 !gp-max-w-fit hover:gp-z-50",{"gp-justify-center":0===c,"gp-min-w-[200px] gp-border-b last:gp-border-b-transparent":c>0}),style:{...r("c",0===c?s:m),...y},children:[v?.link&&!v.childrens?.length?p(i,{href:v.link,title:v.title,children:v.title}):p("span",{children:v?.title}),k&&p("span",{dangerouslySetInnerHTML:{__html:o},className:l("gp-ml-auto gp-shrink-0 [&>svg]:gp-h-4 [&>svg]:gp-w-auto",{"-gp-rotate-90":1===c})}),b&&p("div",{className:l("gp-invisible gp-absolute gp-min-w-max gp-opacity-0 gp-transition-all gp-duration-300 gp-ease-in-out [li:hover>div&]:gp-visible [li:hover>div&]:gp-opacity-100 gp-z-[100]",{"gp-left-0 gp-top-full":0===c,"gp-left-full gp-top-0 gp-translate-y-4 [li:hover>div&]:gp-translate-y-0":1===c}),children:p("ul",{className:l("gp-flex gp-flex-col gp-shadow-card-2 gp-relative",{"gp-ml-4":1===c}),style:{...g("bgc",d)},children:v?.childrens?.map(e=>p(DesktopMenuItem,{id:e,menu:a,depth:c+1,maxDepth:u,arrow:o,menuTextColor:m,menuBg:d,typo:h,typography:f},e))})})]})};export{DesktopMenuItem as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{makeStyleResponsive as i,cls as l}from"@gem-sdk/core";import p from"next/dynamic";import
|
|
2
|
+
import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{makeStyleResponsive as i,cls as l}from"@gem-sdk/core";import p from"next/dynamic";import r from"../../../../cart/components/Cart.js";import"react";import"next/head";import"next/image";import"@gem-sdk/system";import"next/link";import"react-youtube";import s from"../../../../image/components/Image.js";import"../../../../cart/components/shop-pay-button/ShopPayButton.js";import a from"../../../../cart/components/CheckoutNow.js";let MobileMenu=p(()=>import("./MobileMenu.js")),DesktopMenu=p(()=>import("./DesktopMenu.js")),BasicHeader=({btnBgColor:p,btnBorder:n,btnRounded:m,btnSpacing:c,btnTextColor:g,btnTypography:d,btnType:b,btnWidth:h,openMode:u,buyNow:y,breakpoint:f,...x})=>{let k=!!x.menu?.ROOT.childrens?.length;return e("div",{className:"gp-relative gp-z-50 gp-flex gp-items-center gp-px-4 gp-justify-between",style:i("h",x.height),children:[k?e(t,{children:[o(MobileMenu,{...x,className:l({"gp-flex":"desktop"===f,"gp-hidden tablet:gp-flex":"tablet"===f,"gp-hidden mobile:gp-flex":"mobile"===f})}),o(DesktopMenu,{...x,className:l({"!gp-hidden":"desktop"===f,"tablet:!gp-hidden":"tablet"===f,"mobile:!gp-hidden":"mobile"===f})})]}):null,!!x.logo&&o("div",{className:l({"gp-justify-center":"desktop"===f&&k,"tablet:gp-justify-center":"tablet"===f&&k,"mobile:gp-justify-center":"mobile"===f&&k,"gp-flex gp-items-center":"desktop"===f,"tablet:gp-flex tablet:gp-items-center":"tablet"===f,"mobile:gp-flex mobile:gp-items-center":"mobile"===f,"gp-order-first":"desktop"!==f,"mobile:gp-order-[0]":!0,"tablet:gp-order-[0]":"tablet"===f}),children:o(s,{style:i("maxh",x.height),setting:{srcSet:x.logo,alt:"Logo",quality:100,isAdaptive:!0},styles:{customAspectRadio:x.customAspectRadio,aspectRatio:x.logoAspectRatio,width:x.logoWidth,objectFit:x.layout,opacity:{normal:0,hover:0}}})}),e("div",{className:"gp-flex gp-items-center gp-gap-4",children:[y&&o(a,{className:"mobile:gp-hidden",setting:{label:"Buy Now",openMode:u},styles:{backgroundColor:p,borderBtn:n,roundedBtn:m,btnSpacing:c,textColor:g,typography:d,type:b,width:h}}),o(r,{setting:{iconOnly:!0,svgIcon:x.cartIcon},styles:{iconColor:x.cartIconColor}})]})]})};export{BasicHeader as default};
|