@gem-sdk/components 19.1.0-staging.16 → 19.1.0-staging.19
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/dist/cjs/grid/components/ChildrenDroppable.js +1 -2
- package/dist/cjs/header/components/SalePageHeaderWarning.js +1 -1
- package/dist/cjs/ignoreHashClasses.js +1 -1
- package/dist/cjs/image-detection/components/ImageDetection.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -2
- package/dist/cjs/product/components/product-price/ProductPrice.js +1 -1
- package/dist/cjs/product/components/product-properties/property-select/common/styles.js +1 -1
- package/dist/cjs/product/components/product-variants/components/rectangle-list/RectangleList.js +1 -1
- package/dist/esm/grid/components/ChildrenDroppable.js +1 -2
- package/dist/esm/header/components/SalePageHeaderWarning.js +1 -1
- package/dist/esm/ignoreHashClasses.js +1 -1
- package/dist/esm/image-detection/components/ImageDetection.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -2
- package/dist/esm/product/components/product-price/ProductPrice.js +1 -1
- package/dist/esm/product/components/product-properties/property-select/common/styles.js +1 -1
- package/dist/esm/product/components/product-variants/components/rectangle-list/RectangleList.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),t=require("react");exports.default=({className:s,styles:g})=>{let{t:p}=r.useI18nStore(),[n,l]=t.useState(!1),[o,i]=t.useState(!1),d=t.useRef(null),u=r.useEditorMode();return(t.useEffect(()=>{let e=new ResizeObserver(()=>{let e=d.current?d.current?.offsetWidth:0;e<160?i(!0):i(!1)});return d.current&&e.observe(d.current),()=>{e?.disconnect()}},[]),"edit"!==u)?null:e.jsxs(e.Fragment,{children:[g&&e.jsx("style",{children:g}),e.jsx("div",{ref:d,"data-slot":"children",className:r.cls(s,"gp-flex gp-h-full gp-w-full gp-items-center gp-rounded-[3px] gp-border gp-border-dashed gp-border-[#9e9e9e] after:!gp-content-none",n?"gp-cursor-pointer":""),onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},children:e.jsxs("div",{className:`gp-border-box gp-bg-gray gp-flex gp-max-h-8 gp-items-center gp-justify-center gp-gap-2 gp-overflow-hidden gp-whitespace-nowrap gp-rounded-lg gp-px-4 gp-py-2 gp-text-xs gp-font-medium
|
|
3
|
-
${n?"gp-cursor-pointer gp-bg-[#E2E2E2] gp-text-[#212121]":"gp-text-[#9E9E9E]"}`,style:{flexFlow:"gp-row gp-wrap"},children:[e.jsx("div",{className:"gp-flex gp-h-4 gp-w-4 gp-items-center gp-justify-center",dangerouslySetInnerHTML:{__html:(()=>{let e=`<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),t=require("react");exports.default=({className:s,styles:g})=>{let{t:p}=r.useI18nStore(),[n,l]=t.useState(!1),[o,i]=t.useState(!1),d=t.useRef(null),u=r.useEditorMode();return(t.useEffect(()=>{let e=new ResizeObserver(()=>{let e=d.current?d.current?.offsetWidth:0;e<160?i(!0):i(!1)});return d.current&&e.observe(d.current),()=>{e?.disconnect()}},[]),"edit"!==u)?null:e.jsxs(e.Fragment,{children:[g&&e.jsx("style",{children:g}),e.jsx("div",{ref:d,"data-slot":"children",className:r.cls(s,"gp-flex gp-h-full gp-w-full gp-items-center gp-rounded-[3px] gp-border gp-border-dashed gp-border-[#9e9e9e] after:!gp-content-none",n?"gp-cursor-pointer":""),onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},children:e.jsxs("div",{className:`gp-border-box gp-bg-gray gp-flex gp-max-h-8 gp-items-center gp-justify-center gp-gap-2 gp-overflow-hidden gp-whitespace-nowrap gp-rounded-lg gp-px-4 gp-py-2 gp-text-xs gp-font-medium ${n?"gp-cursor-pointer gp-bg-[#E2E2E2] gp-text-[#212121]":"gp-text-[#9E9E9E]"}`,style:{flexFlow:"gp-row gp-wrap"},children:[e.jsx("div",{className:"gp-flex gp-h-4 gp-w-4 gp-items-center gp-justify-center",dangerouslySetInnerHTML:{__html:(()=>{let e=`<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
3
|
<path d="M7.83301 7.83331V3.83331H9.16634V7.83331H13.1663V9.16665H9.16634V13.1666H7.83301V9.16665H3.83301V7.83331H7.83301Z" fill="#9E9E9E"/>
|
|
5
4
|
</svg>
|
|
6
5
|
`;return n&&(e=`<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react"),exports.default=({builderAttrs:p})=>e.jsx("div",{...p,className:"editor-content gp-absolute gp-left-0 gp-top-0 gp-z-[999]
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react"),exports.default=({builderAttrs:p})=>e.jsx("div",{...p,className:"editor-content gp-absolute gp-left-0 gp-top-0 gp-z-[999] gp-h-[calc(100%_+_2px)] gp-w-[calc(100%_+_2px)] gp-justify-center gp-rounded gp-border gp-border-[#F44336] gp-bg-white/80 gp-p-[8px]",children:e.jsxs("div",{className:"gp-inline-flex gp-h-auto gp-min-h-[40px] gp-w-full gp-items-center gp-gap-[6px] gp-rounded-lg gp-bg-red-100 gp-p-[8px] mobile:gp-items-start",children:[e.jsx("span",{className:"gp-h-5 gp-min-w-[20px]",children:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M11 13.5C11 14.0523 10.5523 14.5 10 14.5C9.44772 14.5 9 14.0523 9 13.5C9 12.9477 9.44772 12.5 10 12.5C10.5523 12.5 11 12.9477 11 13.5Z",fill:"#C3362B"}),e.jsx("path",{d:"M10.75 6.25001C10.75 5.8358 10.4142 5.50001 10 5.5C9.5858 5.49999 9.25001 5.83578 9.25 6.24999L9.24994 10.75C9.24993 11.1642 9.58572 11.5 9.99993 11.5C10.4141 11.5 10.7499 11.1642 10.7499 10.75L10.75 6.25001Z",fill:"#C3362B"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17ZM10 15.5C13.0376 15.5 15.5 13.0376 15.5 10C15.5 6.96243 13.0376 4.5 10 4.5C6.96243 4.5 4.5 6.96243 4.5 10C4.5 13.0376 6.96243 15.5 10 15.5Z",fill:"#C3362B"})]})}),e.jsxs("span",{className:"gp-text-xs gp-leading-5 gp-text-[#C3362B]",children:[e.jsx("span",{className:"gp-font-semibold",children:"Header"})," is not available for"," ",e.jsx("span",{className:"gp-font-semibold",children:"Sales Page"}),". You should delete this element."]})]})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),p=require("next/image"),r=require("@gem-sdk/core");exports.default=({setting:l,builderProps:i})=>{let[s,g]=t.useState(!1),[a,n]=t.useState(0),d=t.useRef(null),{t:o}=r.useI18nStore();t.useEffect(()=>(l?.loading?(g(!1),x()):g(!0),()=>{d.current&&clearInterval(d.current)}),[l?.loading]);let x=()=>{n(0),d.current=setInterval(()=>{n(e=>{let t=function(e,t){return Math.random()*(6-e)+e}(0,0);return e>=580?e:e+t})},100)};return e.jsxs("div",{"data-toolbar-hide":"true",className:"gps-base-font-family gps-image-detection-section gp-relative gp-mb-[6px] gp-w-full gp-border gp-border-[#F4F4F4]",children:[e.jsxs("div",{className:"gps-generating-actions gp-absolute gp-right-0 gp-top-0 gp-z-4 gp-hidden gp-h-[32px] gp-items-center gp-border gp-border-[#F4F4F4] gp-bg-white gp-px-[4px]",children:[e.jsxs("svg",{className:"gp-ml-[16px]",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M12.1455 2.78916C12.0859 2.60446 11.8246 2.60446 11.7649 2.78916L11.6155 3.25182C11.5178 3.554 11.2825 3.79186 10.9814 3.89269L10.5216 4.04667C10.3396 4.10761 10.3396 4.36503 10.5216 4.42597L10.9814 4.57995C11.2825 4.68078 11.5178 4.91864 11.6155 5.22082L11.7649 5.68348C11.8246 5.86818 12.0859 5.86818 12.1455 5.68348L12.295 5.22082C12.3926 4.91864 12.6279 4.68078 12.929 4.57995L13.3889 4.42597C13.5708 4.36503 13.5708 4.10761 13.3889 4.04667L12.929 3.89269C12.6279 3.79186 12.3926 3.554 12.295 3.25182L12.1455 2.78916Z",fill:`url(#paint0_linear_4588_15357_${i?.uid})`}),e.jsx("path",{d:"M8.14069 3.48376C8.0512 3.20671 7.65922 3.20671 7.56973 3.48376L6.95968 5.37244C6.66685 6.27898 5.96086 6.99256 5.0575 7.29506L3.20474 7.91548C2.93175 8.0069 2.93175 8.39302 3.20474 8.48443L5.0575 9.10485C5.96086 9.40735 6.66685 10.1209 6.95968 11.0275L7.56973 12.9162C7.65922 13.1932 8.0512 13.1932 8.14069 12.9162L8.75074 11.0275C9.04357 10.1209 9.74956 9.40735 10.6529 9.10485L12.5057 8.48443C12.7787 8.39302 12.7787 8.0069 12.5057 7.91548L10.6529 7.29506C9.74956 6.99256 9.04357 6.27898 8.75074 5.37243L8.14069 3.48376Z",fill:`url(#paint1_linear_4588_15357_${i?.uid})`}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:`paint0_linear_4588_15357_${i?.uid}`,x1:"13.5254",y1:"10.6471",x2:"2.99977",y2:"10.6351",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#874CFD"}),e.jsx("stop",{offset:"1",stopColor:"#3C38E1"})]}),e.jsxs("linearGradient",{id:`paint1_linear_4588_15357_${i?.uid}`,x1:"13.5254",y1:"10.6471",x2:"2.99977",y2:"10.6351",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#874CFD"}),e.jsx("stop",{offset:"1",stopColor:"#3C38E1"})]})]})]}),e.jsx("span",{className:"gps-generating-section-text gp-ml-[4px] gp-mr-[16px] gp-text-[12px] gp-font-medium",children:o("Generating section")}),e.jsx("div",{className:"gp-mx-[4px] gp-h-[28px] gp-w-[1px] gp-bg-[#5B5B5B] gp-opacity-10"}),e.jsx("div",{"data-url":l?.imagePreviewUrl||"","data-uid":i?.uid,className:"gp-image-detection-generating-delete gp-relative gp-flex gp-h-[24px] gp-w-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded-[3px] gp-text-[#212121] hover:gp-bg-[#F44336] hover:gp-text-white",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M6.5 6C6.77614 6 7 6.22386 7 6.5V11.5C7 11.7761 6.77614 12 6.5 12C6.22386 12 6 11.7761 6 11.5V6.5C6 6.22386 6.22386 6 6.5 6Z",fill:"currentColor"}),e.jsx("path",{d:"M9.5 6C9.77614 6 10 6.22386 10 6.5V11.5C10 11.7761 9.77614 12 9.5 12C9.22386 12 9 11.7761 9 11.5V6.5C9 6.22386 9.22386 6 9.5 6Z",fill:"currentColor"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.5V3H14C14.2761 3 14.5 3.22386 14.5 3.5C14.5 3.77614 14.2761 4 14 4H13V12.5C13 13.8807 11.8807 15 10.5 15H5.5C4.11929 15 3 13.8807 3 12.5V4H2C1.72386 4 1.5 3.77614 1.5 3.5C1.5 3.22386 1.72386 3 2 3H5V2.5C5 1.67157 5.67157 1 6.5 1H9.5C10.3284 1 11 1.67157 11 2.5ZM4 4V12.5C4 13.3284 4.67157 14 5.5 14H10.5C11.3284 14 12 13.3284 12 12.5V4H4ZM6 3V2.5C6 2.22386 6.22386 2 6.5 2H9.5C9.77614 2 10 2.22386 10 2.5V3H6Z",fill:"currentColor"})]})})]}),!!l?.imagePreviewUrl&&e.jsx(p,{className:"gp-h-auto gp-w-full gp-opacity-50",src:l?.imagePreviewUrl||"",alt:"",width:100,height:100}),e.jsx("div",{className:`gp-absolute gp-left-0 gp-top-0 gp-z-2 gp-flex gp-h-full gp-w-full
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),p=require("next/image"),r=require("@gem-sdk/core");exports.default=({setting:l,builderProps:i})=>{let[s,g]=t.useState(!1),[a,n]=t.useState(0),d=t.useRef(null),{t:o}=r.useI18nStore();t.useEffect(()=>(l?.loading?(g(!1),x()):g(!0),()=>{d.current&&clearInterval(d.current)}),[l?.loading]);let x=()=>{n(0),d.current=setInterval(()=>{n(e=>{let t=function(e,t){return Math.random()*(6-e)+e}(0,0);return e>=580?e:e+t})},100)};return e.jsxs("div",{"data-toolbar-hide":"true",className:"gps-base-font-family gps-image-detection-section gp-relative gp-mb-[6px] gp-w-full gp-border gp-border-[#F4F4F4]",children:[e.jsxs("div",{className:"gps-generating-actions gp-absolute gp-right-0 gp-top-0 gp-z-4 gp-hidden gp-h-[32px] gp-items-center gp-border gp-border-[#F4F4F4] gp-bg-white gp-px-[4px]",children:[e.jsxs("svg",{className:"gp-ml-[16px]",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M12.1455 2.78916C12.0859 2.60446 11.8246 2.60446 11.7649 2.78916L11.6155 3.25182C11.5178 3.554 11.2825 3.79186 10.9814 3.89269L10.5216 4.04667C10.3396 4.10761 10.3396 4.36503 10.5216 4.42597L10.9814 4.57995C11.2825 4.68078 11.5178 4.91864 11.6155 5.22082L11.7649 5.68348C11.8246 5.86818 12.0859 5.86818 12.1455 5.68348L12.295 5.22082C12.3926 4.91864 12.6279 4.68078 12.929 4.57995L13.3889 4.42597C13.5708 4.36503 13.5708 4.10761 13.3889 4.04667L12.929 3.89269C12.6279 3.79186 12.3926 3.554 12.295 3.25182L12.1455 2.78916Z",fill:`url(#paint0_linear_4588_15357_${i?.uid})`}),e.jsx("path",{d:"M8.14069 3.48376C8.0512 3.20671 7.65922 3.20671 7.56973 3.48376L6.95968 5.37244C6.66685 6.27898 5.96086 6.99256 5.0575 7.29506L3.20474 7.91548C2.93175 8.0069 2.93175 8.39302 3.20474 8.48443L5.0575 9.10485C5.96086 9.40735 6.66685 10.1209 6.95968 11.0275L7.56973 12.9162C7.65922 13.1932 8.0512 13.1932 8.14069 12.9162L8.75074 11.0275C9.04357 10.1209 9.74956 9.40735 10.6529 9.10485L12.5057 8.48443C12.7787 8.39302 12.7787 8.0069 12.5057 7.91548L10.6529 7.29506C9.74956 6.99256 9.04357 6.27898 8.75074 5.37243L8.14069 3.48376Z",fill:`url(#paint1_linear_4588_15357_${i?.uid})`}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:`paint0_linear_4588_15357_${i?.uid}`,x1:"13.5254",y1:"10.6471",x2:"2.99977",y2:"10.6351",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#874CFD"}),e.jsx("stop",{offset:"1",stopColor:"#3C38E1"})]}),e.jsxs("linearGradient",{id:`paint1_linear_4588_15357_${i?.uid}`,x1:"13.5254",y1:"10.6471",x2:"2.99977",y2:"10.6351",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#874CFD"}),e.jsx("stop",{offset:"1",stopColor:"#3C38E1"})]})]})]}),e.jsx("span",{className:"gps-generating-section-text gp-ml-[4px] gp-mr-[16px] gp-text-[12px] gp-font-medium",children:o("Generating section")}),e.jsx("div",{className:"gp-mx-[4px] gp-h-[28px] gp-w-[1px] gp-bg-[#5B5B5B] gp-opacity-10"}),e.jsx("div",{"data-url":l?.imagePreviewUrl||"","data-uid":i?.uid,className:"gp-image-detection-generating-delete gp-relative gp-flex gp-h-[24px] gp-w-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded-[3px] gp-text-[#212121] hover:gp-bg-[#F44336] hover:gp-text-white",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M6.5 6C6.77614 6 7 6.22386 7 6.5V11.5C7 11.7761 6.77614 12 6.5 12C6.22386 12 6 11.7761 6 11.5V6.5C6 6.22386 6.22386 6 6.5 6Z",fill:"currentColor"}),e.jsx("path",{d:"M9.5 6C9.77614 6 10 6.22386 10 6.5V11.5C10 11.7761 9.77614 12 9.5 12C9.22386 12 9 11.7761 9 11.5V6.5C9 6.22386 9.22386 6 9.5 6Z",fill:"currentColor"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.5V3H14C14.2761 3 14.5 3.22386 14.5 3.5C14.5 3.77614 14.2761 4 14 4H13V12.5C13 13.8807 11.8807 15 10.5 15H5.5C4.11929 15 3 13.8807 3 12.5V4H2C1.72386 4 1.5 3.77614 1.5 3.5C1.5 3.22386 1.72386 3 2 3H5V2.5C5 1.67157 5.67157 1 6.5 1H9.5C10.3284 1 11 1.67157 11 2.5ZM4 4V12.5C4 13.3284 4.67157 14 5.5 14H10.5C11.3284 14 12 13.3284 12 12.5V4H4ZM6 3V2.5C6 2.22386 6.22386 2 6.5 2H9.5C9.77614 2 10 2.22386 10 2.5V3H6Z",fill:"currentColor"})]})})]}),!!l?.imagePreviewUrl&&e.jsx(p,{className:"gp-h-auto gp-w-full gp-opacity-50",src:l?.imagePreviewUrl||"",alt:"",width:100,height:100}),e.jsx("div",{className:`gp-absolute gp-left-0 gp-top-0 gp-z-2 gp-flex gp-h-full gp-w-full ${s?"gp-hidden":""}`,children:e.jsxs("div",{className:"gp-relative gp-h-[2px] gp-w-full gp-overflow-hidden gp-rounded-md",children:[e.jsx("div",{className:"gp-absolute gp-h-full gp-w-full gp-rounded-md gp-bg-[#F4F4F4]"}),e.jsx("div",{className:"gps-image-to-layout-progress-bar gp-absolute gp-h-full gp-rounded-md gp-transition-all",style:{width:`${a/600*100}%`}})]})}),e.jsxs("div",{className:`gp-absolute gp-left-[8px] gp-top-[8px] gp-z-[99] gp-flex gp-w-[calc(100%_-_16px)] gp-items-center gp-justify-between gp-rounded-[3px] gp-bg-[#FEE4E3] gp-pl-[4px] gp-pr-[16px] gp-h-[48px] ${s?"":"gp-hidden"}`,children:[e.jsxs("div",{className:"gp-flex gp-items-center",children:[e.jsx("div",{className:"gp-flex gp-h-[24px] gp-w-[24px] gp-items-center gp-justify-center",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8 10.5C7.58579 10.5 7.25 10.8358 7.25 11.25C7.25 11.6642 7.58579 12 8 12C8.41421 12 8.75 11.6642 8.75 11.25C8.75 10.8358 8.41421 10.5 8 10.5ZM8.5 4C8.5 3.72386 8.27614 3.5 8 3.5C7.72386 3.5 7.5 3.72386 7.5 4V9C7.5 9.27614 7.72386 9.5 8 9.5C8.27614 9.5 8.5 9.27614 8.5 9V4Z",fill:"#C3362B"})})}),e.jsx("span",{className:"gps-base-font-family gp-ml-[4px] gp-text-sm gp-font-medium gp-text-[#212121]",children:l?.error||o("Sorry, we have trouble generate layout from this section. Try again or delete it to publish.")})]}),e.jsxs("div",{className:"gp-flex gp-items-center",children:[!l?.error&&e.jsx("div",{"data-url":l?.imagePreviewUrl||"","data-uid":i?.uid,className:"gp-image-detection-retry gp-cursor-pointer gp-text-sm gp-font-medium gp-text-[#3C67FF]",children:o("Try again")}),e.jsx("div",{"data-url":l?.imagePreviewUrl||"","data-uid":i?.uid,className:"gp-image-detection-delete gp-relative gp-ml-[16px] gp-flex gp-h-[32px] gp-w-[32px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded-[3px] gp-text-[#F44336] hover:gp-bg-red-400 hover:gp-text-white",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M6.5 6C6.77614 6 7 6.22386 7 6.5V11.5C7 11.7761 6.77614 12 6.5 12C6.22386 12 6 11.7761 6 11.5V6.5C6 6.22386 6.22386 6 6.5 6Z",fill:"currentColor"}),e.jsx("path",{d:"M9.5 6C9.77614 6 10 6.22386 10 6.5V11.5C10 11.7761 9.77614 12 9.5 12C9.22386 12 9 11.7761 9 11.5V6.5C9 6.22386 9.22386 6 9.5 6Z",fill:"currentColor"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.5V3H14C14.2761 3 14.5 3.22386 14.5 3.5C14.5 3.77614 14.2761 4 14 4H13V12.5C13 13.8807 11.8807 15 10.5 15H5.5C4.11929 15 3 13.8807 3 12.5V4H2C1.72386 4 1.5 3.77614 1.5 3.5C1.5 3.22386 1.72386 3 2 3H5V2.5C5 1.67157 5.67157 1 6.5 1H9.5C10.3284 1 11 1.67157 11 2.5ZM4 4V12.5C4 13.3284 4.67157 14 5.5 14H10.5C11.3284 14 12 13.3284 12 12.5V4H4ZM6 3V2.5C6 2.22386 6.22386 2 6.5 2H9.5C9.77614 2 10 2.22386 10 2.5V3H6Z",fill:"currentColor"})]})})]})]})]})};
|
package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("react"),s=require("../../common/common.js"),r=require("../../../../../image/components/NextImage.js"),a=require("../lightbox/ButtonOpenLightBox.js"),i=require("./MediaIcon.js"),l=require("../../common/productFeaturedImage.js"),c=require("../../common/hoverAction.js"),d=require("../../composables/getProductImagesClassName.js"),n=require("../../composables/getProductImagesStyles.js"),u=require("../../hooks/useProductGalleryGrid.js"),m=o.memo(o=>{let{builderPropUID:m,productImages:g,onHandleClick:h,activeIndexFormFeatureImage:y,children:p,isHiddenInteraction:v,...j}=o,{isDisplay:x,shapeByLayout:f,imageActiveIndex:q,enableOpenLightBox:M,isEnableBorderActive:I,filteredProductImages:w}=u.useProductGalleryGrid(o),T=t.useCurrentDevice(),{galleryGridWrapperClasses:b,galleryItemClasses:N}=d.getProductImagesClassName(j),{galleryGridStyles:P,galleryGridItemStyles:C}=n.getProductImagesStyles(j);return e.jsx(e.Fragment,{children:x&&e.jsxs("div",{"data-slot":"children","data-id":m,className:b,style:P,"gp-data-hidden":`${v}`,children:[w?.map((o,d)=>{let n=d===q,u=l.isFeatureMedia(o.contentType)?o.previewImage:o.src;return e.jsxs("div",{"aria-hidden":!0,className:N(`gem-slider-item-${m}
|
|
2
|
-
${n&&I?"gem-slider-item-active":""}`),onClick:()=>h(o?.id||"",M),style:C,onMouseMove:e=>c.handleMouseMove(e,{hoverEffect:j.galleryHoverEffect,zoom:j.galleryZoom,zoomType:j.galleryZoomType}),onMouseOut:e=>c.handleMouseOut(e),"data-border":n&&j?.borderActive?"active":"deactive",children:[e.jsx(r.default,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s.getAspectRatio(f),layout:j?.layout},style:{width:"100%",height:"100%"}},o?.id),e.jsx(i.default,{contentType:o?.contentType||""}),j?.galleryHoverEffect!=="none"&&!l.isFeatureMedia(o?.contentType)&&e.jsx(r.default,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{layout:j.layout,aspectRatio:s.getAspectRatio(f)},className:t.cls("hover-image !gp-max-w-none",l.getZoomImageClass())}),j?.galleryHoverEffect=="zoom"&&j?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(t.getResponsiveValueByScreen(j.position,T)||"")&&!l.isFeatureMedia(o?.contentType)&&e.jsx("div",{className:t.cls(l.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${o?.src}")`})}}),t.getResponsiveValueByScreen(j?.clickOpenLightBox,T)&&e.jsx(a.default,{})]},o?.id)}),p]})})});exports.default=m;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("react"),s=require("../../common/common.js"),r=require("../../../../../image/components/NextImage.js"),a=require("../lightbox/ButtonOpenLightBox.js"),i=require("./MediaIcon.js"),l=require("../../common/productFeaturedImage.js"),c=require("../../common/hoverAction.js"),d=require("../../composables/getProductImagesClassName.js"),n=require("../../composables/getProductImagesStyles.js"),u=require("../../hooks/useProductGalleryGrid.js"),m=o.memo(o=>{let{builderPropUID:m,productImages:g,onHandleClick:h,activeIndexFormFeatureImage:y,children:p,isHiddenInteraction:v,...j}=o,{isDisplay:x,shapeByLayout:f,imageActiveIndex:q,enableOpenLightBox:M,isEnableBorderActive:I,filteredProductImages:w}=u.useProductGalleryGrid(o),T=t.useCurrentDevice(),{galleryGridWrapperClasses:b,galleryItemClasses:N}=d.getProductImagesClassName(j),{galleryGridStyles:P,galleryGridItemStyles:C}=n.getProductImagesStyles(j);return e.jsx(e.Fragment,{children:x&&e.jsxs("div",{"data-slot":"children","data-id":m,className:b,style:P,"gp-data-hidden":`${v}`,children:[w?.map((o,d)=>{let n=d===q,u=l.isFeatureMedia(o.contentType)?o.previewImage:o.src;return e.jsxs("div",{"aria-hidden":!0,className:N(`gem-slider-item-${m} ${n&&I?"gem-slider-item-active":""}`),onClick:()=>h(o?.id||"",M),style:C,onMouseMove:e=>c.handleMouseMove(e,{hoverEffect:j.galleryHoverEffect,zoom:j.galleryZoom,zoomType:j.galleryZoomType}),onMouseOut:e=>c.handleMouseOut(e),"data-border":n&&j?.borderActive?"active":"deactive",children:[e.jsx(r.default,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s.getAspectRatio(f),layout:j?.layout},style:{width:"100%",height:"100%"}},o?.id),e.jsx(i.default,{contentType:o?.contentType||""}),j?.galleryHoverEffect!=="none"&&!l.isFeatureMedia(o?.contentType)&&e.jsx(r.default,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{layout:j.layout,aspectRatio:s.getAspectRatio(f)},className:t.cls("hover-image !gp-max-w-none",l.getZoomImageClass())}),j?.galleryHoverEffect=="zoom"&&j?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(t.getResponsiveValueByScreen(j.position,T)||"")&&!l.isFeatureMedia(o?.contentType)&&e.jsx("div",{className:t.cls(l.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${o?.src}")`})}}),t.getResponsiveValueByScreen(j?.clickOpenLightBox,T)&&e.jsx(a.default,{})]},o?.id)}),p]})})});exports.default=m;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../../text/components/Text.js"),s=require("@gem-sdk/system"),t=require("./common/classes.js"),i=require("./common/attrs.js"),a=require("./common/helpers.js"),o=require("./hooks/useGpPrice.js"),c=require("@gem-sdk/core");exports.default=d=>{let{style:l,children:p}=d,u=c.useEditorMode(),{t:n}=c.useI18nStore(),m="edit"===u,{elementRef:x,moneyFormatted:g,currentProductId:j,isNoComparePrice:h,isNoComparePriceILP:f,shouldHiddenComparePrice:q,emitNoDataSignal:P}=o.useGpPrice(d),v=s.createClass(t.getWrapperClasses(d)),y=s.createAttr(i.getAttrs(d,{isILP:!m,productId:j,shouldHiddenComparePrice:q})),b=a.getTextProps(d,g);return e.jsxs("div",{ref:x,...y,className:v,style:f?{visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0}:l,"aria-hidden":"true",onClick:P,children:[h&&m?e.jsx(e.Fragment,{children:e.jsx("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:e.jsx("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../../text/components/Text.js"),s=require("@gem-sdk/system"),t=require("./common/classes.js"),i=require("./common/attrs.js"),a=require("./common/helpers.js"),o=require("./hooks/useGpPrice.js"),c=require("@gem-sdk/core");exports.default=d=>{let{style:l,children:p}=d,u=c.useEditorMode(),{t:n}=c.useI18nStore(),m="edit"===u,{elementRef:x,moneyFormatted:g,currentProductId:j,isNoComparePrice:h,isNoComparePriceILP:f,shouldHiddenComparePrice:q,emitNoDataSignal:P}=o.useGpPrice(d),v=s.createClass(t.getWrapperClasses(d)),y=s.createAttr(i.getAttrs(d,{isILP:!m,productId:j,shouldHiddenComparePrice:q})),b=a.getTextProps(d,g);return e.jsxs("div",{ref:x,...y,className:v,style:f?{visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0}:l,"aria-hidden":"true",onClick:P,children:[h&&m?e.jsx(e.Fragment,{children:e.jsx("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:e.jsx("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3",children:n("No compare price")})})}):e.jsxs(e.Fragment,{children:[e.jsx(r.default,{...b}),p]}),c.filterToolbarPreview(p,!0)]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core"),t=require("../../../../../helpers.js");exports.getOptionStyles=o=>{let{valueBgColor:l,valueTextColor:r}=o??{},
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core"),t=require("../../../../../helpers.js");exports.getOptionStyles=o=>{let{valueBgColor:l,valueTextColor:r}=o??{},s=e.getGlobalColorStateResponsiveStyle("bg",l),b=e.getGlobalColorStateStyle("c",r),a={"--c":b["--focus-c"]?b["--focus-c"]:b["--c"],"--bg":s["--focus-bg"]?s["--focus-bg"]:s["--bg"],"--bg-tablet":s["--focus-bg-tablet"]?s["--focus-bg-tablet"]:s["--bg-tablet"],"--bg-mobile":s["--focus-bg-mobile"]?s["--focus-bg-mobile"]:s["--bg-mobile"]};return t.filterTruthyObject(a)},exports.getSelectStyles=t=>{let{fullWidth:o,width:l,height:r,borderInput:s,borderRadius:b,hasShadowInput:a,shadowInput:g,valueBgColor:c,valueTextColor:S,valueTypo:i,valueTypography:u}=t??{},y=e.makeStyleResponsive("w",e.makeWidth(l,o)),n=r?e.makeStyleResponsive("h",r):{},d=e.composeTypographyStyle(i,u);return{...y,...n,...e.handleConvertBorderStyle(s),...e.handleConvertBorderWidth(s),...e.handleConvertBorderColor(s),...e.composeRadius(b),...e.getStyleShadowState(g,"box-shadow",a),...e.getGlobalColorStateResponsiveStyle("bg",c),...e.getGlobalColorStateStyle("c",S),...d}};
|
package/dist/cjs/product/components/product-variants/components/rectangle-list/RectangleList.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),l=require("react");exports.default=({value:a,isVariantOutStock:o,checked:r,swatchAutoWidth:s,swatchWidth:i,swatchHeight:c,optionTransform:g,optionTypography:n,optionBgColor:p,optionTextColor:d,optionBorder:b,optionRounded:v,optionHasShadow:S,optionShadow:y,optionTypo:C})=>{let m=t.makeStyleResponsive("w",t.makeWidth(i,s)),u=l.useMemo(()=>({...v,active:{...v?.active||{},radiusType:"custom"}}),[v]),h=t.composeTypographyClassName(C,n),x=t.composeTypographyStyle(C,n);return e.jsx("div",{className:t.cls(r?t.getGlobalColorClass("bg",p?.active):t.getGlobalColorStateClass("bg",p),t.handleConvertClassColor(b),h,"gp-box-border gp-inline-flex gp-cursor-pointer gp-items-center gp-justify-center gp-text-center",{"gp-pointer-events-none
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),l=require("react");exports.default=({value:a,isVariantOutStock:o,checked:r,swatchAutoWidth:s,swatchWidth:i,swatchHeight:c,optionTransform:g,optionTypography:n,optionBgColor:p,optionTextColor:d,optionBorder:b,optionRounded:v,optionHasShadow:S,optionShadow:y,optionTypo:C})=>{let m=t.makeStyleResponsive("w",t.makeWidth(i,s)),u=l.useMemo(()=>({...v,active:{...v?.active||{},radiusType:"custom"}}),[v]),h=t.composeTypographyClassName(C,n),x=t.composeTypographyStyle(C,n);return e.jsx("div",{className:t.cls(r?t.getGlobalColorClass("bg",p?.active):t.getGlobalColorStateClass("bg",p),t.handleConvertClassColor(b),h,"gp-box-border gp-inline-flex gp-cursor-pointer gp-items-center gp-justify-center gp-text-center",{"gp-pointer-events-none !gp-cursor-not-allowed":o}),style:{...r?{}:t.getGlobalColorStateStyle("bg",p),...r?t.makeStyle({bg:t.getSingleColorVariable(p?.active),bs:b?.active?.border,bw:b?.active?.width,bc:t.getSingleColorVariable(b?.active?.color)}):{},...t.makeStyle({tt:g}),...x,...t.makeStyleResponsive("h",c),...m,...r?t.getRadiusStyleActiveState(u):t.composeRadius(v),...r?t.getStyleShadow({value:y?.active,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:S?.active},!0):t.getStyleShadowState(y,"box-shadow",S),...r?{}:t.handleConvertBorderStyle(b),...r?{}:t.handleConvertBorderWidth(b),...r?{}:t.handleConvertBorderColor(b)},children:e.jsx("span",{className:t.cls("gp-flex gp-items-center gp-px-[16px]",r?t.getGlobalColorClass("text",d?.active):t.getGlobalColorStateClass("text",d)),style:{...r?t.makeStyle({c:t.getSingleColorVariable(d?.active)}):t.getGlobalColorStateStyle("c",d)},children:a?.label})})};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useI18nStore as p,useEditorMode as g,cls as n}from"@gem-sdk/core";import{useState as l,useRef as o,useEffect as i}from"react";let s=({className:s,styles:d})=>{let{t:c}=p(),[h,a]=l(!1),[u,f]=l(!1),m=o(null),w=g();return(i(()=>{let e=new ResizeObserver(()=>{let e=m.current?m.current?.offsetWidth:0;e<160?f(!0):f(!1)});return m.current&&e.observe(m.current),()=>{e?.disconnect()}},[]),"edit"!==w)?null:e(r,{children:[d&&t("style",{children:d}),t("div",{ref:m,"data-slot":"children",className:n(s,"gp-flex gp-h-full gp-w-full gp-items-center gp-rounded-[3px] gp-border gp-border-dashed gp-border-[#9e9e9e] after:!gp-content-none",h?"gp-cursor-pointer":""),onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},children:e("div",{className:`gp-border-box gp-bg-gray gp-flex gp-max-h-8 gp-items-center gp-justify-center gp-gap-2 gp-overflow-hidden gp-whitespace-nowrap gp-rounded-lg gp-px-4 gp-py-2 gp-text-xs gp-font-medium
|
|
3
|
-
${h?"gp-cursor-pointer gp-bg-[#E2E2E2] gp-text-[#212121]":"gp-text-[#9E9E9E]"}`,style:{flexFlow:"gp-row gp-wrap"},children:[t("div",{className:"gp-flex gp-h-4 gp-w-4 gp-items-center gp-justify-center",dangerouslySetInnerHTML:{__html:(()=>{let e=`<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useI18nStore as p,useEditorMode as g,cls as n}from"@gem-sdk/core";import{useState as l,useRef as o,useEffect as i}from"react";let s=({className:s,styles:d})=>{let{t:c}=p(),[h,a]=l(!1),[u,f]=l(!1),m=o(null),w=g();return(i(()=>{let e=new ResizeObserver(()=>{let e=m.current?m.current?.offsetWidth:0;e<160?f(!0):f(!1)});return m.current&&e.observe(m.current),()=>{e?.disconnect()}},[]),"edit"!==w)?null:e(r,{children:[d&&t("style",{children:d}),t("div",{ref:m,"data-slot":"children",className:n(s,"gp-flex gp-h-full gp-w-full gp-items-center gp-rounded-[3px] gp-border gp-border-dashed gp-border-[#9e9e9e] after:!gp-content-none",h?"gp-cursor-pointer":""),onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},children:e("div",{className:`gp-border-box gp-bg-gray gp-flex gp-max-h-8 gp-items-center gp-justify-center gp-gap-2 gp-overflow-hidden gp-whitespace-nowrap gp-rounded-lg gp-px-4 gp-py-2 gp-text-xs gp-font-medium ${h?"gp-cursor-pointer gp-bg-[#E2E2E2] gp-text-[#212121]":"gp-text-[#9E9E9E]"}`,style:{flexFlow:"gp-row gp-wrap"},children:[t("div",{className:"gp-flex gp-h-4 gp-w-4 gp-items-center gp-justify-center",dangerouslySetInnerHTML:{__html:(()=>{let e=`<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
3
|
<path d="M7.83301 7.83331V3.83331H9.16634V7.83331H13.1663V9.16665H9.16634V13.1666H7.83301V9.16665H3.83301V7.83331H7.83301Z" fill="#9E9E9E"/>
|
|
5
4
|
</svg>
|
|
6
5
|
`;return h&&(e=`<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as p}from"react/jsx-runtime";import"react";let l=({builderAttrs:l})=>e("div",{...l,className:"editor-content gp-absolute gp-left-0 gp-top-0 gp-z-[999]
|
|
2
|
+
import{jsx as e,jsxs as p}from"react/jsx-runtime";import"react";let l=({builderAttrs:l})=>e("div",{...l,className:"editor-content gp-absolute gp-left-0 gp-top-0 gp-z-[999] gp-h-[calc(100%_+_2px)] gp-w-[calc(100%_+_2px)] gp-justify-center gp-rounded gp-border gp-border-[#F44336] gp-bg-white/80 gp-p-[8px]",children:p("div",{className:"gp-inline-flex gp-h-auto gp-min-h-[40px] gp-w-full gp-items-center gp-gap-[6px] gp-rounded-lg gp-bg-red-100 gp-p-[8px] mobile:gp-items-start",children:[e("span",{className:"gp-h-5 gp-min-w-[20px]",children:p("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M11 13.5C11 14.0523 10.5523 14.5 10 14.5C9.44772 14.5 9 14.0523 9 13.5C9 12.9477 9.44772 12.5 10 12.5C10.5523 12.5 11 12.9477 11 13.5Z",fill:"#C3362B"}),e("path",{d:"M10.75 6.25001C10.75 5.8358 10.4142 5.50001 10 5.5C9.5858 5.49999 9.25001 5.83578 9.25 6.24999L9.24994 10.75C9.24993 11.1642 9.58572 11.5 9.99993 11.5C10.4141 11.5 10.7499 11.1642 10.7499 10.75L10.75 6.25001Z",fill:"#C3362B"}),e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17ZM10 15.5C13.0376 15.5 15.5 13.0376 15.5 10C15.5 6.96243 13.0376 4.5 10 4.5C6.96243 4.5 4.5 6.96243 4.5 10C4.5 13.0376 6.96243 15.5 10 15.5Z",fill:"#C3362B"})]})}),p("span",{className:"gp-text-xs gp-leading-5 gp-text-[#C3362B]",children:[e("span",{className:"gp-font-semibold",children:"Header"})," is not available for"," ",e("span",{className:"gp-font-semibold",children:"Sales Page"}),". You should delete this element."]})]})});export{l as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as p,useRef as l,useEffect as i}from"react";import r from"next/image";import{useI18nStore as g}from"@gem-sdk/core";let a=({setting:a,builderProps:n})=>{let[d,o]=p(!1),[s,c]=p(0),C=l(null),{t:h}=g();i(()=>(a?.loading?(o(!1),u()):o(!0),()=>{C.current&&clearInterval(C.current)}),[a?.loading]);let u=()=>{c(0),C.current=setInterval(()=>{c(e=>{let t=function(e,t){return Math.random()*(6-e)+e}(0,0);return e>=580?e:e+t})},100)};return e("div",{"data-toolbar-hide":"true",className:"gps-base-font-family gps-image-detection-section gp-relative gp-mb-[6px] gp-w-full gp-border gp-border-[#F4F4F4]",children:[e("div",{className:"gps-generating-actions gp-absolute gp-right-0 gp-top-0 gp-z-4 gp-hidden gp-h-[32px] gp-items-center gp-border gp-border-[#F4F4F4] gp-bg-white gp-px-[4px]",children:[e("svg",{className:"gp-ml-[16px]",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M12.1455 2.78916C12.0859 2.60446 11.8246 2.60446 11.7649 2.78916L11.6155 3.25182C11.5178 3.554 11.2825 3.79186 10.9814 3.89269L10.5216 4.04667C10.3396 4.10761 10.3396 4.36503 10.5216 4.42597L10.9814 4.57995C11.2825 4.68078 11.5178 4.91864 11.6155 5.22082L11.7649 5.68348C11.8246 5.86818 12.0859 5.86818 12.1455 5.68348L12.295 5.22082C12.3926 4.91864 12.6279 4.68078 12.929 4.57995L13.3889 4.42597C13.5708 4.36503 13.5708 4.10761 13.3889 4.04667L12.929 3.89269C12.6279 3.79186 12.3926 3.554 12.295 3.25182L12.1455 2.78916Z",fill:`url(#paint0_linear_4588_15357_${n?.uid})`}),t("path",{d:"M8.14069 3.48376C8.0512 3.20671 7.65922 3.20671 7.56973 3.48376L6.95968 5.37244C6.66685 6.27898 5.96086 6.99256 5.0575 7.29506L3.20474 7.91548C2.93175 8.0069 2.93175 8.39302 3.20474 8.48443L5.0575 9.10485C5.96086 9.40735 6.66685 10.1209 6.95968 11.0275L7.56973 12.9162C7.65922 13.1932 8.0512 13.1932 8.14069 12.9162L8.75074 11.0275C9.04357 10.1209 9.74956 9.40735 10.6529 9.10485L12.5057 8.48443C12.7787 8.39302 12.7787 8.0069 12.5057 7.91548L10.6529 7.29506C9.74956 6.99256 9.04357 6.27898 8.75074 5.37243L8.14069 3.48376Z",fill:`url(#paint1_linear_4588_15357_${n?.uid})`}),e("defs",{children:[e("linearGradient",{id:`paint0_linear_4588_15357_${n?.uid}`,x1:"13.5254",y1:"10.6471",x2:"2.99977",y2:"10.6351",gradientUnits:"userSpaceOnUse",children:[t("stop",{stopColor:"#874CFD"}),t("stop",{offset:"1",stopColor:"#3C38E1"})]}),e("linearGradient",{id:`paint1_linear_4588_15357_${n?.uid}`,x1:"13.5254",y1:"10.6471",x2:"2.99977",y2:"10.6351",gradientUnits:"userSpaceOnUse",children:[t("stop",{stopColor:"#874CFD"}),t("stop",{offset:"1",stopColor:"#3C38E1"})]})]})]}),t("span",{className:"gps-generating-section-text gp-ml-[4px] gp-mr-[16px] gp-text-[12px] gp-font-medium",children:h("Generating section")}),t("div",{className:"gp-mx-[4px] gp-h-[28px] gp-w-[1px] gp-bg-[#5B5B5B] gp-opacity-10"}),t("div",{"data-url":a?.imagePreviewUrl||"","data-uid":n?.uid,className:"gp-image-detection-generating-delete gp-relative gp-flex gp-h-[24px] gp-w-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded-[3px] gp-text-[#212121] hover:gp-bg-[#F44336] hover:gp-text-white",children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M6.5 6C6.77614 6 7 6.22386 7 6.5V11.5C7 11.7761 6.77614 12 6.5 12C6.22386 12 6 11.7761 6 11.5V6.5C6 6.22386 6.22386 6 6.5 6Z",fill:"currentColor"}),t("path",{d:"M9.5 6C9.77614 6 10 6.22386 10 6.5V11.5C10 11.7761 9.77614 12 9.5 12C9.22386 12 9 11.7761 9 11.5V6.5C9 6.22386 9.22386 6 9.5 6Z",fill:"currentColor"}),t("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.5V3H14C14.2761 3 14.5 3.22386 14.5 3.5C14.5 3.77614 14.2761 4 14 4H13V12.5C13 13.8807 11.8807 15 10.5 15H5.5C4.11929 15 3 13.8807 3 12.5V4H2C1.72386 4 1.5 3.77614 1.5 3.5C1.5 3.22386 1.72386 3 2 3H5V2.5C5 1.67157 5.67157 1 6.5 1H9.5C10.3284 1 11 1.67157 11 2.5ZM4 4V12.5C4 13.3284 4.67157 14 5.5 14H10.5C11.3284 14 12 13.3284 12 12.5V4H4ZM6 3V2.5C6 2.22386 6.22386 2 6.5 2H9.5C9.77614 2 10 2.22386 10 2.5V3H6Z",fill:"currentColor"})]})})]}),!!a?.imagePreviewUrl&&t(r,{className:"gp-h-auto gp-w-full gp-opacity-50",src:a?.imagePreviewUrl||"",alt:"",width:100,height:100}),t("div",{className:`gp-absolute gp-left-0 gp-top-0 gp-z-2 gp-flex gp-h-full gp-w-full
|
|
2
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as p,useRef as l,useEffect as i}from"react";import r from"next/image";import{useI18nStore as g}from"@gem-sdk/core";let a=({setting:a,builderProps:n})=>{let[d,o]=p(!1),[s,c]=p(0),C=l(null),{t:h}=g();i(()=>(a?.loading?(o(!1),u()):o(!0),()=>{C.current&&clearInterval(C.current)}),[a?.loading]);let u=()=>{c(0),C.current=setInterval(()=>{c(e=>{let t=function(e,t){return Math.random()*(6-e)+e}(0,0);return e>=580?e:e+t})},100)};return e("div",{"data-toolbar-hide":"true",className:"gps-base-font-family gps-image-detection-section gp-relative gp-mb-[6px] gp-w-full gp-border gp-border-[#F4F4F4]",children:[e("div",{className:"gps-generating-actions gp-absolute gp-right-0 gp-top-0 gp-z-4 gp-hidden gp-h-[32px] gp-items-center gp-border gp-border-[#F4F4F4] gp-bg-white gp-px-[4px]",children:[e("svg",{className:"gp-ml-[16px]",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M12.1455 2.78916C12.0859 2.60446 11.8246 2.60446 11.7649 2.78916L11.6155 3.25182C11.5178 3.554 11.2825 3.79186 10.9814 3.89269L10.5216 4.04667C10.3396 4.10761 10.3396 4.36503 10.5216 4.42597L10.9814 4.57995C11.2825 4.68078 11.5178 4.91864 11.6155 5.22082L11.7649 5.68348C11.8246 5.86818 12.0859 5.86818 12.1455 5.68348L12.295 5.22082C12.3926 4.91864 12.6279 4.68078 12.929 4.57995L13.3889 4.42597C13.5708 4.36503 13.5708 4.10761 13.3889 4.04667L12.929 3.89269C12.6279 3.79186 12.3926 3.554 12.295 3.25182L12.1455 2.78916Z",fill:`url(#paint0_linear_4588_15357_${n?.uid})`}),t("path",{d:"M8.14069 3.48376C8.0512 3.20671 7.65922 3.20671 7.56973 3.48376L6.95968 5.37244C6.66685 6.27898 5.96086 6.99256 5.0575 7.29506L3.20474 7.91548C2.93175 8.0069 2.93175 8.39302 3.20474 8.48443L5.0575 9.10485C5.96086 9.40735 6.66685 10.1209 6.95968 11.0275L7.56973 12.9162C7.65922 13.1932 8.0512 13.1932 8.14069 12.9162L8.75074 11.0275C9.04357 10.1209 9.74956 9.40735 10.6529 9.10485L12.5057 8.48443C12.7787 8.39302 12.7787 8.0069 12.5057 7.91548L10.6529 7.29506C9.74956 6.99256 9.04357 6.27898 8.75074 5.37243L8.14069 3.48376Z",fill:`url(#paint1_linear_4588_15357_${n?.uid})`}),e("defs",{children:[e("linearGradient",{id:`paint0_linear_4588_15357_${n?.uid}`,x1:"13.5254",y1:"10.6471",x2:"2.99977",y2:"10.6351",gradientUnits:"userSpaceOnUse",children:[t("stop",{stopColor:"#874CFD"}),t("stop",{offset:"1",stopColor:"#3C38E1"})]}),e("linearGradient",{id:`paint1_linear_4588_15357_${n?.uid}`,x1:"13.5254",y1:"10.6471",x2:"2.99977",y2:"10.6351",gradientUnits:"userSpaceOnUse",children:[t("stop",{stopColor:"#874CFD"}),t("stop",{offset:"1",stopColor:"#3C38E1"})]})]})]}),t("span",{className:"gps-generating-section-text gp-ml-[4px] gp-mr-[16px] gp-text-[12px] gp-font-medium",children:h("Generating section")}),t("div",{className:"gp-mx-[4px] gp-h-[28px] gp-w-[1px] gp-bg-[#5B5B5B] gp-opacity-10"}),t("div",{"data-url":a?.imagePreviewUrl||"","data-uid":n?.uid,className:"gp-image-detection-generating-delete gp-relative gp-flex gp-h-[24px] gp-w-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded-[3px] gp-text-[#212121] hover:gp-bg-[#F44336] hover:gp-text-white",children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M6.5 6C6.77614 6 7 6.22386 7 6.5V11.5C7 11.7761 6.77614 12 6.5 12C6.22386 12 6 11.7761 6 11.5V6.5C6 6.22386 6.22386 6 6.5 6Z",fill:"currentColor"}),t("path",{d:"M9.5 6C9.77614 6 10 6.22386 10 6.5V11.5C10 11.7761 9.77614 12 9.5 12C9.22386 12 9 11.7761 9 11.5V6.5C9 6.22386 9.22386 6 9.5 6Z",fill:"currentColor"}),t("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.5V3H14C14.2761 3 14.5 3.22386 14.5 3.5C14.5 3.77614 14.2761 4 14 4H13V12.5C13 13.8807 11.8807 15 10.5 15H5.5C4.11929 15 3 13.8807 3 12.5V4H2C1.72386 4 1.5 3.77614 1.5 3.5C1.5 3.22386 1.72386 3 2 3H5V2.5C5 1.67157 5.67157 1 6.5 1H9.5C10.3284 1 11 1.67157 11 2.5ZM4 4V12.5C4 13.3284 4.67157 14 5.5 14H10.5C11.3284 14 12 13.3284 12 12.5V4H4ZM6 3V2.5C6 2.22386 6.22386 2 6.5 2H9.5C9.77614 2 10 2.22386 10 2.5V3H6Z",fill:"currentColor"})]})})]}),!!a?.imagePreviewUrl&&t(r,{className:"gp-h-auto gp-w-full gp-opacity-50",src:a?.imagePreviewUrl||"",alt:"",width:100,height:100}),t("div",{className:`gp-absolute gp-left-0 gp-top-0 gp-z-2 gp-flex gp-h-full gp-w-full ${d?"gp-hidden":""}`,children:e("div",{className:"gp-relative gp-h-[2px] gp-w-full gp-overflow-hidden gp-rounded-md",children:[t("div",{className:"gp-absolute gp-h-full gp-w-full gp-rounded-md gp-bg-[#F4F4F4]"}),t("div",{className:"gps-image-to-layout-progress-bar gp-absolute gp-h-full gp-rounded-md gp-transition-all",style:{width:`${s/600*100}%`}})]})}),e("div",{className:`gp-absolute gp-left-[8px] gp-top-[8px] gp-z-[99] gp-flex gp-w-[calc(100%_-_16px)] gp-items-center gp-justify-between gp-rounded-[3px] gp-bg-[#FEE4E3] gp-pl-[4px] gp-pr-[16px] gp-h-[48px] ${d?"":"gp-hidden"}`,children:[e("div",{className:"gp-flex gp-items-center",children:[t("div",{className:"gp-flex gp-h-[24px] gp-w-[24px] gp-items-center gp-justify-center",children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8 10.5C7.58579 10.5 7.25 10.8358 7.25 11.25C7.25 11.6642 7.58579 12 8 12C8.41421 12 8.75 11.6642 8.75 11.25C8.75 10.8358 8.41421 10.5 8 10.5ZM8.5 4C8.5 3.72386 8.27614 3.5 8 3.5C7.72386 3.5 7.5 3.72386 7.5 4V9C7.5 9.27614 7.72386 9.5 8 9.5C8.27614 9.5 8.5 9.27614 8.5 9V4Z",fill:"#C3362B"})})}),t("span",{className:"gps-base-font-family gp-ml-[4px] gp-text-sm gp-font-medium gp-text-[#212121]",children:a?.error||h("Sorry, we have trouble generate layout from this section. Try again or delete it to publish.")})]}),e("div",{className:"gp-flex gp-items-center",children:[!a?.error&&t("div",{"data-url":a?.imagePreviewUrl||"","data-uid":n?.uid,className:"gp-image-detection-retry gp-cursor-pointer gp-text-sm gp-font-medium gp-text-[#3C67FF]",children:h("Try again")}),t("div",{"data-url":a?.imagePreviewUrl||"","data-uid":n?.uid,className:"gp-image-detection-delete gp-relative gp-ml-[16px] gp-flex gp-h-[32px] gp-w-[32px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded-[3px] gp-text-[#F44336] hover:gp-bg-red-400 hover:gp-text-white",children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M6.5 6C6.77614 6 7 6.22386 7 6.5V11.5C7 11.7761 6.77614 12 6.5 12C6.22386 12 6 11.7761 6 11.5V6.5C6 6.22386 6.22386 6 6.5 6Z",fill:"currentColor"}),t("path",{d:"M9.5 6C9.77614 6 10 6.22386 10 6.5V11.5C10 11.7761 9.77614 12 9.5 12C9.22386 12 9 11.7761 9 11.5V6.5C9 6.22386 9.22386 6 9.5 6Z",fill:"currentColor"}),t("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.5V3H14C14.2761 3 14.5 3.22386 14.5 3.5C14.5 3.77614 14.2761 4 14 4H13V12.5C13 13.8807 11.8807 15 10.5 15H5.5C4.11929 15 3 13.8807 3 12.5V4H2C1.72386 4 1.5 3.77614 1.5 3.5C1.5 3.22386 1.72386 3 2 3H5V2.5C5 1.67157 5.67157 1 6.5 1H9.5C10.3284 1 11 1.67157 11 2.5ZM4 4V12.5C4 13.3284 4.67157 14 5.5 14H10.5C11.3284 14 12 13.3284 12 12.5V4H4ZM6 3V2.5C6 2.22386 6.22386 2 6.5 2H9.5C9.77614 2 10 2.22386 10 2.5V3H6Z",fill:"currentColor"})]})})]})]})]})};export{a as default};
|
package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useCurrentDevice as r,cls as i,getResponsiveValueByScreen as a,makeStyle as m}from"@gem-sdk/core";import{memo as l}from"react";import{getAspectRatio as s}from"../../common/common.js";import c from"../../../../../image/components/NextImage.js";import n from"../lightbox/ButtonOpenLightBox.js";import d from"./MediaIcon.js";import{isFeatureMedia as p,getZoomImageClass as g,getZoomLenClass as h}from"../../common/productFeaturedImage.js";import{handleMouseOut as y,handleMouseMove as f}from"../../common/hoverAction.js";import{getProductImagesClassName as u}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as v}from"../../composables/getProductImagesStyles.js";import{useProductGalleryGrid as j}from"../../hooks/useProductGalleryGrid.js";var w=l(l=>{let{builderPropUID:w,productImages:T,onHandleClick:x,activeIndexFormFeatureImage:b,children:I,isHiddenInteraction:N,...k}=l,{isDisplay:E,shapeByLayout:G,imageActiveIndex:M,enableOpenLightBox:P,isEnableBorderActive:$,filteredProductImages:z}=j(l),B=r(),{galleryGridWrapperClasses:H,galleryItemClasses:O}=u(k),{galleryGridStyles:Z,galleryGridItemStyles:A}=v(k);return e(o,{children:E&&t("div",{"data-slot":"children","data-id":w,className:H,style:Z,"gp-data-hidden":`${N}`,children:[z?.map((o,r)=>{let l=r===M,u=p(o.contentType)?o.previewImage:o.src;return t("div",{"aria-hidden":!0,className:O(`gem-slider-item-${w}
|
|
2
|
-
${l&&$?"gem-slider-item-active":""}`),onClick:()=>x(o?.id||"",P),style:A,onMouseMove:e=>f(e,{hoverEffect:k.galleryHoverEffect,zoom:k.galleryZoom,zoomType:k.galleryZoomType}),onMouseOut:e=>y(e),"data-border":l&&k?.borderActive?"active":"deactive",children:[e(c,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s(G),layout:k?.layout},style:{width:"100%",height:"100%"}},o?.id),e(d,{contentType:o?.contentType||""}),k?.galleryHoverEffect!=="none"&&!p(o?.contentType)&&e(c,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{layout:k.layout,aspectRatio:s(G)},className:i("hover-image !gp-max-w-none",g())}),k?.galleryHoverEffect=="zoom"&&k?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(a(k.position,B)||"")&&!p(o?.contentType)&&e("div",{className:i(h(),"room-len"),style:{...m({bgi:`url("${o?.src}")`})}}),a(k?.clickOpenLightBox,B)&&e(n,{})]},o?.id)}),I]})})});export{w as default};
|
|
1
|
+
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useCurrentDevice as r,cls as i,getResponsiveValueByScreen as a,makeStyle as m}from"@gem-sdk/core";import{memo as l}from"react";import{getAspectRatio as s}from"../../common/common.js";import c from"../../../../../image/components/NextImage.js";import n from"../lightbox/ButtonOpenLightBox.js";import d from"./MediaIcon.js";import{isFeatureMedia as p,getZoomImageClass as g,getZoomLenClass as h}from"../../common/productFeaturedImage.js";import{handleMouseOut as y,handleMouseMove as f}from"../../common/hoverAction.js";import{getProductImagesClassName as u}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as v}from"../../composables/getProductImagesStyles.js";import{useProductGalleryGrid as j}from"../../hooks/useProductGalleryGrid.js";var w=l(l=>{let{builderPropUID:w,productImages:T,onHandleClick:x,activeIndexFormFeatureImage:b,children:I,isHiddenInteraction:N,...k}=l,{isDisplay:E,shapeByLayout:G,imageActiveIndex:M,enableOpenLightBox:P,isEnableBorderActive:$,filteredProductImages:z}=j(l),B=r(),{galleryGridWrapperClasses:H,galleryItemClasses:O}=u(k),{galleryGridStyles:Z,galleryGridItemStyles:A}=v(k);return e(o,{children:E&&t("div",{"data-slot":"children","data-id":w,className:H,style:Z,"gp-data-hidden":`${N}`,children:[z?.map((o,r)=>{let l=r===M,u=p(o.contentType)?o.previewImage:o.src;return t("div",{"aria-hidden":!0,className:O(`gem-slider-item-${w} ${l&&$?"gem-slider-item-active":""}`),onClick:()=>x(o?.id||"",P),style:A,onMouseMove:e=>f(e,{hoverEffect:k.galleryHoverEffect,zoom:k.galleryZoom,zoomType:k.galleryZoomType}),onMouseOut:e=>y(e),"data-border":l&&k?.borderActive?"active":"deactive",children:[e(c,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s(G),layout:k?.layout},style:{width:"100%",height:"100%"}},o?.id),e(d,{contentType:o?.contentType||""}),k?.galleryHoverEffect!=="none"&&!p(o?.contentType)&&e(c,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{layout:k.layout,aspectRatio:s(G)},className:i("hover-image !gp-max-w-none",g())}),k?.galleryHoverEffect=="zoom"&&k?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(a(k.position,B)||"")&&!p(o?.contentType)&&e("div",{className:i(h(),"room-len"),style:{...m({bgi:`url("${o?.src}")`})}}),a(k?.clickOpenLightBox,B)&&e(n,{})]},o?.id)}),I]})})});export{w as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"../../../text/components/Text.js";import{createClass as i,createAttr as m}from"@gem-sdk/system";import{getWrapperClasses as s}from"./common/classes.js";import{getAttrs as p}from"./common/attrs.js";import{getTextProps as c}from"./common/helpers.js";import{useGpPrice as d}from"./hooks/useGpPrice.js";import{useEditorMode as l,useI18nStore as a,filterToolbarPreview as n}from"@gem-sdk/core";let f=f=>{let{style:h,children:g}=f,x=l(),{t:u}=a(),j="edit"===x,{elementRef:y,moneyFormatted:P,currentProductId:k,isNoComparePrice:N,isNoComparePriceILP:v,shouldHiddenComparePrice:b,emitNoDataSignal:C}=d(f),H=i(s(f)),I=m(p(f,{isILP:!j,productId:k,shouldHiddenComparePrice:b})),w=c(f,P);return e("div",{ref:y,...I,className:H,style:v?{visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0}:h,"aria-hidden":"true",onClick:C,children:[N&&j?r(o,{children:r("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:r("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3
|
|
2
|
+
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"../../../text/components/Text.js";import{createClass as i,createAttr as m}from"@gem-sdk/system";import{getWrapperClasses as s}from"./common/classes.js";import{getAttrs as p}from"./common/attrs.js";import{getTextProps as c}from"./common/helpers.js";import{useGpPrice as d}from"./hooks/useGpPrice.js";import{useEditorMode as l,useI18nStore as a,filterToolbarPreview as n}from"@gem-sdk/core";let f=f=>{let{style:h,children:g}=f,x=l(),{t:u}=a(),j="edit"===x,{elementRef:y,moneyFormatted:P,currentProductId:k,isNoComparePrice:N,isNoComparePriceILP:v,shouldHiddenComparePrice:b,emitNoDataSignal:C}=d(f),H=i(s(f)),I=m(p(f,{isILP:!j,productId:k,shouldHiddenComparePrice:b})),w=c(f,P);return e("div",{ref:y,...I,className:H,style:v?{visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0}:h,"aria-hidden":"true",onClick:C,children:[N&&j?r(o,{children:r("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:r("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3",children:u("No compare price")})})}):e(o,{children:[r(t,{...w}),g]}),n(g,!0)]})};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeWidth as b,
|
|
1
|
+
import{makeStyleResponsive as e,makeWidth as b,composeTypographyStyle as t,getGlobalColorStateStyle as o,getGlobalColorStateResponsiveStyle as g,getStyleShadowState as c,composeRadius as l,handleConvertBorderColor as s,handleConvertBorderWidth as r,handleConvertBorderStyle as f}from"@gem-sdk/core";import{filterTruthyObject as u}from"../../../../../helpers.js";let m=u=>{let{fullWidth:m,width:i,height:a,borderInput:p,borderRadius:h,hasShadowInput:n,shadowInput:S,valueBgColor:d,valueTextColor:w,valueTypo:x,valueTypography:y}=u??{},j=e("w",b(i,m)),k=a?e("h",a):{},O=t(x,y);return{...j,...k,...f(p),...r(p),...s(p),...l(h),...c(S,"box-shadow",n),...g("bg",d),...o("c",w),...O}},i=e=>{let{valueBgColor:b,valueTextColor:t}=e??{},c=g("bg",b),l=o("c",t),s={"--c":l["--focus-c"]?l["--focus-c"]:l["--c"],"--bg":c["--focus-bg"]?c["--focus-bg"]:c["--bg"],"--bg-tablet":c["--focus-bg-tablet"]?c["--focus-bg-tablet"]:c["--bg-tablet"],"--bg-mobile":c["--focus-bg-mobile"]?c["--focus-bg-mobile"]:c["--bg-mobile"]};return u(s)};export{i as getOptionStyles,m as getSelectStyles};
|
package/dist/esm/product/components/product-variants/components/rectangle-list/RectangleList.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{makeStyleResponsive as t,makeWidth as a,composeTypographyClassName as r,composeTypographyStyle as i,getGlobalColorStateStyle as c,makeStyle as o,getSingleColorVariable as s,cls as p,getGlobalColorStateClass as l,getGlobalColorClass as n,handleConvertBorderColor as g,handleConvertBorderWidth as v,handleConvertBorderStyle as b,getStyleShadowState as d,getStyleShadow as m,composeRadius as x,getRadiusStyleActiveState as u,handleConvertClassColor as f}from"@gem-sdk/core";import{useMemo as h}from"react";let w=({value:w,isVariantOutStock:y,checked:j,swatchAutoWidth:N,swatchWidth:k,swatchHeight:A,optionTransform:E,optionTypography:F,optionBgColor:L,optionTextColor:R,optionBorder:S,optionRounded:T,optionHasShadow:V,optionShadow:q,optionTypo:z})=>{let B=t("w",a(k,N)),C=h(()=>({...T,active:{...T?.active||{},radiusType:"custom"}}),[T]),D=r(z,F),G=i(z,F);return e("div",{className:p(j?n("bg",L?.active):l("bg",L),f(S),D,"gp-box-border gp-inline-flex gp-cursor-pointer gp-items-center gp-justify-center gp-text-center",{"gp-pointer-events-none
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{makeStyleResponsive as t,makeWidth as a,composeTypographyClassName as r,composeTypographyStyle as i,getGlobalColorStateStyle as c,makeStyle as o,getSingleColorVariable as s,cls as p,getGlobalColorStateClass as l,getGlobalColorClass as n,handleConvertBorderColor as g,handleConvertBorderWidth as v,handleConvertBorderStyle as b,getStyleShadowState as d,getStyleShadow as m,composeRadius as x,getRadiusStyleActiveState as u,handleConvertClassColor as f}from"@gem-sdk/core";import{useMemo as h}from"react";let w=({value:w,isVariantOutStock:y,checked:j,swatchAutoWidth:N,swatchWidth:k,swatchHeight:A,optionTransform:E,optionTypography:F,optionBgColor:L,optionTextColor:R,optionBorder:S,optionRounded:T,optionHasShadow:V,optionShadow:q,optionTypo:z})=>{let B=t("w",a(k,N)),C=h(()=>({...T,active:{...T?.active||{},radiusType:"custom"}}),[T]),D=r(z,F),G=i(z,F);return e("div",{className:p(j?n("bg",L?.active):l("bg",L),f(S),D,"gp-box-border gp-inline-flex gp-cursor-pointer gp-items-center gp-justify-center gp-text-center",{"gp-pointer-events-none !gp-cursor-not-allowed":y}),style:{...j?{}:c("bg",L),...j?o({bg:s(L?.active),bs:S?.active?.border,bw:S?.active?.width,bc:s(S?.active?.color)}):{},...o({tt:E}),...G,...t("h",A),...B,...j?u(C):x(T),...j?m({value:q?.active,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:V?.active},!0):d(q,"box-shadow",V),...j?{}:b(S),...j?{}:v(S),...j?{}:g(S)},children:e("span",{className:p("gp-flex gp-items-center gp-px-[16px]",j?n("text",R?.active):l("text",R)),style:{...j?o({c:s(R?.active)}):c("c",R)},children:w?.label})})};export{w as default};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8262,7 +8262,7 @@ declare const isTransparentRGBA: (rgbStr: string) => boolean;
|
|
|
8262
8262
|
declare const isHexTransparent: (hex: string) => boolean;
|
|
8263
8263
|
declare const youtubeShortsRegex: RegExp;
|
|
8264
8264
|
declare const createTranslateKey: (uid?: string, settingId?: string) => string;
|
|
8265
|
-
declare const createSettingId: ({ id, index, suffix }: {
|
|
8265
|
+
declare const createSettingId: ({ id, index, suffix, }: {
|
|
8266
8266
|
id?: string;
|
|
8267
8267
|
index?: number;
|
|
8268
8268
|
suffix?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "19.1.0-staging.
|
|
3
|
+
"version": "19.1.0-staging.19",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"i18n:extract": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/translate/extract-texts-to-locales.js && node ./scripts/translate/en-keys-usage.js"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "19.1.0-staging.
|
|
30
|
-
"@gem-sdk/styles": "19.1.0-staging.
|
|
31
|
-
"@gem-sdk/system": "19.1.0-staging.
|
|
29
|
+
"@gem-sdk/core": "19.1.0-staging.19",
|
|
30
|
+
"@gem-sdk/styles": "19.1.0-staging.19",
|
|
31
|
+
"@gem-sdk/system": "19.1.0-staging.19",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|
|
33
33
|
"postcss-import": "16.1.1",
|
|
34
34
|
"@thedutchcoder/postcss-rem-to-px": "0.0.2",
|