@gem-sdk/components 2.0.0-dev.883 → 2.0.0-dev.886
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/product/components/ProductImagesV2/common/product-badge-setting.js +1 -1
- package/dist/cjs/product/components/ProductProperties/ProductPropertyInput.js +1 -1
- package/dist/cjs/product/setting/ProductBadge.js +1 -1
- package/dist/cjs/safelist.js +6 -0
- package/dist/esm/product/components/ProductImagesV2/common/product-badge-setting.js +1 -1
- package/dist/esm/product/components/ProductProperties/ProductPropertyInput.js +1 -1
- package/dist/esm/product/setting/ProductBadge.js +1 -1
- package/dist/esm/safelist.js +6 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getFullSize=t=>({width:{[t]:"100%"},height:{[t]:"100%"}}),getContainerStyles=(t,e,
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getFullSize=t=>({width:{[t]:"100%"},height:{[t]:"100%"}}),getContainerStyles=(t,e,r)=>{let{ratioLayout:o,spacing:l}=e,g=core.getResponsiveValueByScreen(o,t);if(!g)return{width:{[t]:"100%"}};let i=g.reduce((t,e)=>t+e,0),a=core.getResponsiveValueByScreen(l,t);if(!g[0]||!g[1])return{width:{[t]:"100%"}};let s=r?g[1]/i*100:g[0]/i*100;return{width:{[t]:`calc(${s}% - ${a})`},left:r?{[t]:`calc(${g[0]/i*100}% + ${a})`}:void 0}},getProductBadgeContainerStyles=(t,e,r)=>{if(!r)return getFullSize("desktop");let o={},l={},g={};return["desktop","tablet","mobile"].forEach(r=>{let i=t?.[r]==="left"?e?.layoutRatioLeft:e?.layoutRatioRight;switch(t?.[r]){case"left":{let t=getContainerStyles(r,{ratioLayout:i,spacing:e?.spacing},!0);o={...o,...t.width},l={...l,...getFullSize(r).height},t.left&&(g={...g,...t.left});break}case"right":{let t=getContainerStyles(r,{ratioLayout:i,spacing:e?.spacing});o={...o,...t.width},l={...l,...getFullSize(r).height};break}default:o={...o,...getFullSize(r).width},l={...l,...getFullSize(r).height}}}),{width:o,height:l,left:g}},convertPositionToClass=t=>{switch(t){case"left":return"gp-absolute gp-top-[50%] gp-translate-y-[-50%] gp-left-0";case"right":return"gp-absolute gp-top-[50%] gp-translate-y-[-50%] gp-right-0";case"bottom":return"gp-absolute gp-bottom-0 gp-left-[50%] gp-translate-x-[-50%]";case"top":return"gp-absolute gp-top-0 gp-left-[50%] gp-translate-x-[-50%]";case"top-left":default:return"gp-top-0 gp-left-0";case"top-right":return"gp-top-0 gp-right-0";case"bottom-right":return"gp-bottom-0 gp-right-0";case"bottom-left":return"gp-bottom-0 gp-left-0"}};exports.convertPositionToClass=convertPositionToClass,exports.getProductBadgeContainerStyles=getProductBadgeContainerStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react");const ProductPropertyInput=({setting:e,styles:t})=>{let
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react");const ProductPropertyInput=({setting:e,styles:t})=>{let r=core.useUniqProductID(),{name:o,type:a,valueHidden:l,placeholder:c,required:d,minChar:s,maxChar:n,handleChange:i,validationData:u,label:p}=e??{},{valueBgColor:h,valueTextColor:m,valueTypography:y,valueTypo:g,fullWidth:x,width:C,height:S,borderInput:v,borderRadius:b,hasShadowInput:R,shadowInput:P}=t??{},f=React.useMemo(()=>{switch(a){case"textarea":case"hidden":return"textarea";default:return"input"}},[a]),j=React.useMemo(()=>"hidden"===a,[a]),k=core.makeStyleResponsive("w",core.makeWidth(C,x)),q=core.composeTypographyClassName(g,y),w=core.composeTypographyStyle(g,y),G=`${c}${c&&d&&!p?" *":""}`;return jsxRuntime.jsx(f,{id:`${r}-${o}`,type:"hidden"===a?"textarea":a,value:"hidden"===a?l:void 0,placeholder:G,name:o,readOnly:j,className:core.cls("gemx-border-focus gp-px-4 gp-py-2 gp-outline-none",core.getGlobalColorStateClass("text",m),core.getGlobalColorStateClass("bg",h),q,core.handleConvertClassColor(v),"hidden"===a?"gp-cursor-default":null),style:{...k,...core.handleConvertBorderStyle(v),...core.handleConvertBorderWidth(v),...core.handleConvertBorderColor(v),...core.getGlobalColorStateStyle("bg",h),...core.getGlobalColorStateStyle("c",m),...core.getStyleShadowState(P,"box-shadow",R),...core.makeStyleResponsive("h",S),...core.composeRadius(b),...w,...u?.isValid||"hidden"===a?{}:core.makeStyle({bc:"#F44336"})},required:d,minLength:["text","textarea"].includes(a)?s:void 0,maxLength:["text","textarea"].includes(a)?n:void 0,onChange:i})};exports.default=ProductPropertyInput;
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
<path d="M13 15C13 13.3431 14.3431 12 16 12H80C81.6569 12 83 13.3431 83 15V33C83 34.6569 81.6569 36 80 36H16C14.3431 36 13 34.6569 13 33V15Z" fill="#424242"/>
|
|
4
4
|
<g id="svgGroup" stroke-linecap="round" fill-rule="evenodd" font-size="9pt" stroke="#aaaaaa" stroke-width="0.25mm" fill="#aaaaaa" style="stroke:#aaaaaa;stroke-width:0.25mm;fill:#aaaaaa"><path d="M 67.852 24.19 L 67.852 24.627 L 61.886 24.627 L 61.886 23.847 L 66.947 23.847 A 3.156 3.156 0 0 0 66.854 23.065 A 2.683 2.683 0 0 0 66.652 22.522 Q 66.356 21.933 65.831 21.59 A 2.107 2.107 0 0 0 64.831 21.255 A 2.603 2.603 0 0 0 64.621 21.246 A 2.298 2.298 0 0 0 63.84 21.376 A 2.083 2.083 0 0 0 63.343 21.634 A 2.644 2.644 0 0 0 62.48 22.658 Q 62.17 23.295 62.165 24.05 L 62.165 24.518 A 4.429 4.429 0 0 0 62.232 25.307 A 3.266 3.266 0 0 0 62.48 26.106 Q 62.796 26.785 63.378 27.158 A 2.344 2.344 0 0 0 64.324 27.501 A 3.048 3.048 0 0 0 64.755 27.531 A 2.943 2.943 0 0 0 65.234 27.494 A 2.161 2.161 0 0 0 65.707 27.362 A 2.178 2.178 0 0 0 66.169 27.105 A 1.886 1.886 0 0 0 66.398 26.907 A 2.057 2.057 0 0 0 66.743 26.446 A 1.877 1.877 0 0 0 66.823 26.278 L 67.663 26.551 A 2.403 2.403 0 0 1 67.256 27.259 A 2.894 2.894 0 0 1 67.094 27.441 Q 66.699 27.849 66.11 28.095 A 3.122 3.122 0 0 1 65.353 28.3 A 4.153 4.153 0 0 1 64.755 28.341 Q 63.686 28.341 62.906 27.841 A 3.279 3.279 0 0 1 61.734 26.523 A 3.922 3.922 0 0 1 61.7 26.454 A 4.27 4.27 0 0 1 61.335 25.239 A 5.567 5.567 0 0 1 61.275 24.408 A 5.36 5.36 0 0 1 61.381 23.319 A 4.253 4.253 0 0 1 61.7 22.358 A 3.645 3.645 0 0 1 62.32 21.429 A 3.229 3.229 0 0 1 62.878 20.951 A 2.976 2.976 0 0 1 64.377 20.449 A 3.679 3.679 0 0 1 64.621 20.441 Q 65.242 20.441 65.819 20.667 Q 66.396 20.894 66.855 21.358 A 3.089 3.089 0 0 1 67.387 22.091 A 3.9 3.9 0 0 1 67.584 22.527 A 3.886 3.886 0 0 1 67.785 23.294 Q 67.844 23.658 67.851 24.071 A 6.689 6.689 0 0 1 67.852 24.19 Z M 53.186 29.673 L 53.912 29.196 A 2.449 2.449 0 0 0 54.132 29.517 A 3.158 3.158 0 0 0 54.352 29.763 A 1.882 1.882 0 0 0 54.704 30.039 A 2.588 2.588 0 0 0 55.073 30.225 A 2.227 2.227 0 0 0 55.502 30.351 Q 55.709 30.391 55.946 30.403 A 4.241 4.241 0 0 0 56.169 30.409 A 3.303 3.303 0 0 0 56.868 30.339 Q 57.415 30.221 57.807 29.902 A 1.595 1.595 0 0 0 58.328 29.102 Q 58.409 28.835 58.426 28.512 A 3.415 3.415 0 0 0 58.431 28.326 L 58.431 26.606 L 58.352 26.606 A 2.656 2.656 0 0 1 58.136 26.997 A 3.431 3.431 0 0 1 57.909 27.299 A 2.112 2.112 0 0 1 57.442 27.711 A 2.665 2.665 0 0 1 57.156 27.874 A 2.076 2.076 0 0 1 56.671 28.038 Q 56.445 28.086 56.183 28.098 A 3.861 3.861 0 0 1 56.005 28.102 A 3.147 3.147 0 0 1 55.016 27.951 A 2.798 2.798 0 0 1 54.382 27.65 Q 53.673 27.197 53.268 26.355 Q 52.863 25.512 52.863 24.344 A 5.775 5.775 0 0 1 52.95 23.319 A 4.345 4.345 0 0 1 53.258 22.305 A 3.536 3.536 0 0 1 53.776 21.469 A 3 3 0 0 1 54.364 20.933 A 2.775 2.775 0 0 1 55.773 20.45 A 3.457 3.457 0 0 1 56.02 20.441 A 3.302 3.302 0 0 1 56.512 20.476 Q 56.775 20.515 56.994 20.6 A 1.767 1.767 0 0 1 57.183 20.687 A 2.504 2.504 0 0 1 57.635 20.991 A 2.053 2.053 0 0 1 57.926 21.296 A 4.318 4.318 0 0 1 58.177 21.654 A 3.224 3.224 0 0 1 58.366 22.002 L 58.456 22.002 L 58.456 20.546 L 59.321 20.546 L 59.321 28.381 Q 59.321 29.35 58.908 29.977 A 2.461 2.461 0 0 1 57.785 30.904 A 3.76 3.76 0 0 1 56.82 31.162 A 4.848 4.848 0 0 1 56.169 31.205 A 5.146 5.146 0 0 1 55.523 31.166 Q 55.132 31.117 54.802 31.003 A 3.328 3.328 0 0 1 54.232 30.749 A 2.638 2.638 0 0 1 53.812 30.454 A 2.744 2.744 0 0 1 53.348 29.942 A 2.432 2.432 0 0 1 53.186 29.673 Z M 49.766 22.002 L 49.845 22.002 L 49.845 18 L 50.735 18 L 50.735 28.182 L 49.87 28.182 L 49.87 26.765 L 49.766 26.765 A 3.024 3.024 0 0 1 49.565 27.14 A 4.059 4.059 0 0 1 49.328 27.478 A 2.164 2.164 0 0 1 48.853 27.926 A 2.695 2.695 0 0 1 48.58 28.092 A 1.971 1.971 0 0 1 48.075 28.275 Q 47.778 28.341 47.419 28.341 A 2.998 2.998 0 0 1 46.461 28.192 A 2.65 2.65 0 0 1 45.773 27.844 A 3.12 3.12 0 0 1 44.889 26.877 A 3.928 3.928 0 0 1 44.672 26.457 A 4.462 4.462 0 0 1 44.353 25.363 A 6.053 6.053 0 0 1 44.277 24.384 A 5.944 5.944 0 0 1 44.364 23.343 A 4.405 4.405 0 0 1 44.672 22.318 A 3.57 3.57 0 0 1 45.179 21.488 A 2.998 2.998 0 0 1 45.778 20.936 A 2.769 2.769 0 0 1 47.201 20.449 A 3.449 3.449 0 0 1 47.434 20.441 A 3.265 3.265 0 0 1 47.923 20.476 Q 48.19 20.516 48.413 20.604 A 1.77 1.77 0 0 1 48.592 20.687 A 2.49 2.49 0 0 1 49.032 20.982 A 2.027 2.027 0 0 1 49.333 21.296 A 4.163 4.163 0 0 1 49.58 21.654 A 3.098 3.098 0 0 1 49.766 22.002 Z M 41.433 23.096 L 41.433 22.917 A 2.115 2.115 0 0 0 41.373 22.399 A 1.469 1.469 0 0 0 40.968 21.686 A 1.502 1.502 0 0 0 40.341 21.33 Q 40.107 21.26 39.826 21.242 A 3.109 3.109 0 0 0 39.634 21.237 A 3.07 3.07 0 0 0 39.063 21.287 Q 38.729 21.35 38.462 21.493 A 1.738 1.738 0 0 0 38.289 21.599 A 2.366 2.366 0 0 0 37.885 21.952 A 1.794 1.794 0 0 0 37.56 22.455 L 36.72 22.151 A 2.794 2.794 0 0 1 37.04 21.572 A 2.267 2.267 0 0 1 37.436 21.15 Q 37.893 20.774 38.46 20.608 Q 39.027 20.441 39.609 20.441 A 3.717 3.717 0 0 1 40.257 20.5 A 4.414 4.414 0 0 1 40.521 20.555 A 2.628 2.628 0 0 1 41.403 20.951 A 1.949 1.949 0 0 1 41.924 21.488 A 2.446 2.446 0 0 1 42.065 21.731 Q 42.275 22.145 42.311 22.743 A 4.23 4.23 0 0 1 42.318 22.996 L 42.318 28.182 L 41.433 28.182 L 41.433 26.974 L 41.379 26.974 A 2.147 2.147 0 0 1 41.143 27.358 A 2.828 2.828 0 0 1 40.906 27.63 A 2.273 2.273 0 0 1 40.427 27.998 A 2.858 2.858 0 0 1 40.121 28.152 Q 39.648 28.356 39.012 28.356 A 3.06 3.06 0 0 1 38.166 28.242 A 2.719 2.719 0 0 1 37.749 28.085 A 2.185 2.185 0 0 1 36.839 27.299 A 2.019 2.019 0 0 1 36.545 26.549 A 2.746 2.746 0 0 1 36.501 26.049 Q 36.501 25.482 36.715 25.095 A 1.741 1.741 0 0 1 37.322 24.458 Q 37.714 24.21 38.251 24.065 Q 38.788 23.921 39.435 23.842 Q 40.076 23.762 40.521 23.702 A 3.357 3.357 0 0 0 40.775 23.659 Q 41.015 23.608 41.17 23.529 A 0.92 0.92 0 0 0 41.2 23.514 A 0.442 0.442 0 0 0 41.364 23.362 Q 41.417 23.278 41.429 23.167 A 0.642 0.642 0 0 0 41.433 23.096 Z M 31.624 28.182 L 28 28.182 L 28 18 L 31.435 18 A 4.721 4.721 0 0 1 32.135 18.049 Q 32.517 18.106 32.836 18.231 A 2.567 2.567 0 0 1 33.093 18.348 A 2.522 2.522 0 0 1 33.735 18.82 A 2.231 2.231 0 0 1 34.09 19.298 Q 34.423 19.899 34.423 20.665 A 3.166 3.166 0 0 1 34.385 21.169 Q 34.34 21.447 34.243 21.679 A 1.878 1.878 0 0 1 34.21 21.754 Q 33.996 22.206 33.628 22.484 A 2.4 2.4 0 0 1 32.808 22.887 L 32.808 22.967 A 1.851 1.851 0 0 1 33.529 23.174 A 2.326 2.326 0 0 1 33.762 23.312 A 2.237 2.237 0 0 1 34.342 23.886 A 2.801 2.801 0 0 1 34.523 24.18 A 2.436 2.436 0 0 1 34.764 24.875 A 3.377 3.377 0 0 1 34.821 25.512 A 2.958 2.958 0 0 1 34.712 26.326 A 2.541 2.541 0 0 1 34.478 26.887 A 2.237 2.237 0 0 1 33.74 27.659 A 2.888 2.888 0 0 1 33.426 27.836 A 3.115 3.115 0 0 1 32.733 28.073 Q 32.398 28.147 32.006 28.171 A 6.294 6.294 0 0 1 31.624 28.182 Z M 47.523 27.531 Q 48.264 27.531 48.786 27.125 A 2.359 2.359 0 0 0 49.388 26.423 A 3.06 3.06 0 0 0 49.584 26.007 Q 49.86 25.293 49.86 24.369 A 5.227 5.227 0 0 0 49.8 23.557 A 3.887 3.887 0 0 0 49.587 22.75 A 2.813 2.813 0 0 0 49.257 22.131 A 2.264 2.264 0 0 0 48.791 21.647 A 1.929 1.929 0 0 0 47.839 21.266 A 2.53 2.53 0 0 0 47.523 21.246 A 2.337 2.337 0 0 0 46.889 21.329 A 1.853 1.853 0 0 0 46.233 21.662 Q 45.709 22.077 45.438 22.783 A 4.037 4.037 0 0 0 45.205 23.733 A 5.134 5.134 0 0 0 45.167 24.369 A 4.998 4.998 0 0 0 45.244 25.265 A 3.985 3.985 0 0 0 45.44 25.974 A 2.93 2.93 0 0 0 45.777 26.616 A 2.385 2.385 0 0 0 46.238 27.11 A 1.902 1.902 0 0 0 47.213 27.512 A 2.508 2.508 0 0 0 47.523 27.531 Z M 56.109 27.292 A 2.542 2.542 0 0 0 56.732 27.219 A 1.976 1.976 0 0 0 57.367 26.936 A 2.117 2.117 0 0 0 58.003 26.247 A 2.735 2.735 0 0 0 58.168 25.915 Q 58.446 25.249 58.446 24.329 A 5.002 5.002 0 0 0 58.382 23.509 A 3.778 3.778 0 0 0 58.173 22.74 A 2.801 2.801 0 0 0 57.838 22.12 A 2.291 2.291 0 0 0 57.38 21.647 Q 56.86 21.246 56.109 21.246 A 2.356 2.356 0 0 0 55.475 21.328 A 1.871 1.871 0 0 0 54.817 21.659 Q 54.29 22.072 54.021 22.77 A 4.013 4.013 0 0 0 53.785 23.757 A 5.02 5.02 0 0 0 53.753 24.329 A 4.769 4.769 0 0 0 53.813 25.104 A 3.548 3.548 0 0 0 54.026 25.873 A 2.554 2.554 0 0 0 54.385 26.496 A 2.159 2.159 0 0 0 54.827 26.917 A 2.001 2.001 0 0 0 55.681 27.259 A 2.678 2.678 0 0 0 56.109 27.292 Z M 28.93 23.424 L 28.93 27.347 L 31.624 27.347 A 4.222 4.222 0 0 0 32.262 27.302 Q 32.59 27.252 32.852 27.145 A 1.686 1.686 0 0 0 33.367 26.825 A 1.702 1.702 0 0 0 33.93 25.586 A 2.164 2.164 0 0 0 33.931 25.512 Q 33.931 24.93 33.65 24.456 Q 33.369 23.981 32.86 23.702 Q 32.35 23.424 31.664 23.424 L 28.93 23.424 Z M 28.93 18.835 L 28.93 22.599 L 31.52 22.599 A 2.465 2.465 0 0 0 32.068 22.54 A 1.938 1.938 0 0 0 32.574 22.35 Q 33.026 22.102 33.28 21.664 A 1.888 1.888 0 0 0 33.523 20.888 A 2.334 2.334 0 0 0 33.533 20.665 A 2.028 2.028 0 0 0 33.44 20.036 A 1.662 1.662 0 0 0 33.006 19.345 A 1.656 1.656 0 0 0 32.375 18.971 Q 32.115 18.883 31.797 18.852 A 3.74 3.74 0 0 0 31.435 18.835 L 28.93 18.835 Z M 41.433 25.254 L 41.433 24.15 A 0.476 0.476 0 0 1 41.358 24.207 Q 41.275 24.259 41.146 24.304 A 1.849 1.849 0 0 1 41.103 24.319 A 3.718 3.718 0 0 1 40.862 24.387 Q 40.726 24.421 40.571 24.451 Q 40.27 24.508 39.972 24.548 A 79.075 79.075 0 0 1 39.697 24.584 Q 39.566 24.601 39.45 24.615 A 45.369 45.369 0 0 1 39.435 24.617 A 6.405 6.405 0 0 0 38.941 24.697 Q 38.603 24.765 38.331 24.866 A 2.041 2.041 0 0 0 37.998 25.022 Q 37.81 25.133 37.677 25.277 A 1.214 1.214 0 0 0 37.63 25.331 A 1.045 1.045 0 0 0 37.414 25.797 A 1.477 1.477 0 0 0 37.386 26.089 A 1.555 1.555 0 0 0 37.453 26.557 A 1.206 1.206 0 0 0 37.884 27.165 A 1.813 1.813 0 0 0 38.656 27.503 A 2.522 2.522 0 0 0 39.131 27.546 Q 39.837 27.546 40.354 27.232 A 2.162 2.162 0 0 0 41.152 26.4 A 2.359 2.359 0 0 0 41.433 25.302 A 2.768 2.768 0 0 0 41.433 25.254 Z" vector-effect="non-scaling-stroke"/></g>
|
|
5
5
|
</svg
|
|
6
|
-
`},components:[{tag:"ProductBadge"}]}],editorConfigs:{placeholder:{flowTag:["ProductImagesV2","Product"]}}};exports.default=config;
|
|
6
|
+
`},components:[{tag:"ProductBadge"}]}],advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},editorConfigs:{placeholder:{flowTag:["ProductImagesV2","Product"]}}};exports.default=config;
|
package/dist/cjs/safelist.js
CHANGED
|
@@ -174,6 +174,12 @@ const safelist = [
|
|
|
174
174
|
'gp-font-g-body',
|
|
175
175
|
'gp-font-g-heading',
|
|
176
176
|
'mobile:gp-hidden',
|
|
177
|
+
'gp-px-4',
|
|
178
|
+
'gp-py-2',
|
|
179
|
+
'gp-rounded-lg',
|
|
180
|
+
'gp-text-white',
|
|
181
|
+
'gp-font-semibold',
|
|
182
|
+
'gp-text-lg',
|
|
177
183
|
];
|
|
178
184
|
|
|
179
185
|
module.exports = safelist;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as t}from"@gem-sdk/core";let getFullSize=t=>({width:{[t]:"100%"},height:{[t]:"100%"}}),getContainerStyles=(e,l,
|
|
1
|
+
import{getResponsiveValueByScreen as t}from"@gem-sdk/core";let getFullSize=t=>({width:{[t]:"100%"},height:{[t]:"100%"}}),getContainerStyles=(e,l,g)=>{let{ratioLayout:r,spacing:o}=l,i=t(r,e);if(!i)return{width:{[e]:"100%"}};let a=i.reduce((t,e)=>t+e,0),p=t(o,e);if(!i[0]||!i[1])return{width:{[e]:"100%"}};let s=g?i[1]/a*100:i[0]/a*100;return{width:{[e]:`calc(${s}% - ${p})`},left:g?{[e]:`calc(${i[0]/a*100}% + ${p})`}:void 0}},getProductBadgeContainerStyles=(t,e,l)=>{if(!l)return getFullSize("desktop");let g={},r={},o={};return["desktop","tablet","mobile"].forEach(l=>{let i=t?.[l]==="left"?e?.layoutRatioLeft:e?.layoutRatioRight;switch(t?.[l]){case"left":{let t=getContainerStyles(l,{ratioLayout:i,spacing:e?.spacing},!0);g={...g,...t.width},r={...r,...getFullSize(l).height},t.left&&(o={...o,...t.left});break}case"right":{let t=getContainerStyles(l,{ratioLayout:i,spacing:e?.spacing});g={...g,...t.width},r={...r,...getFullSize(l).height};break}default:g={...g,...getFullSize(l).width},r={...r,...getFullSize(l).height}}}),{width:g,height:r,left:o}},convertPositionToClass=t=>{switch(t){case"left":return"gp-absolute gp-top-[50%] gp-translate-y-[-50%] gp-left-0";case"right":return"gp-absolute gp-top-[50%] gp-translate-y-[-50%] gp-right-0";case"bottom":return"gp-absolute gp-bottom-0 gp-left-[50%] gp-translate-x-[-50%]";case"top":return"gp-absolute gp-top-0 gp-left-[50%] gp-translate-x-[-50%]";case"top-left":default:return"gp-top-0 gp-left-0";case"top-right":return"gp-top-0 gp-right-0";case"bottom-right":return"gp-bottom-0 gp-right-0";case"bottom-left":return"gp-bottom-0 gp-left-0"}};export{convertPositionToClass,getProductBadgeContainerStyles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useUniqProductID as t,makeStyleResponsive as r,makeWidth as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useUniqProductID as t,makeStyleResponsive as r,makeWidth as d,composeTypographyClassName as a,composeTypographyStyle as n,cls as o,getGlobalColorStateClass as i,handleConvertClassColor as u,handleConvertBorderStyle as l,handleConvertBorderWidth as p,handleConvertBorderColor as c,getGlobalColorStateStyle as s,getStyleShadowState as x,composeRadius as h,makeStyle as m}from"@gem-sdk/core";import{useMemo as g}from"react";let ProductPropertyInput=({setting:f,styles:y})=>{let b=t(),{name:v,type:P,valueHidden:$,placeholder:w,required:I,minChar:L,maxChar:j,handleChange:k,validationData:q,label:C}=f??{},{valueBgColor:F,valueTextColor:N,valueTypography:O,valueTypo:V,fullWidth:z,width:A,height:B,borderInput:D,borderRadius:E,hasShadowInput:G,shadowInput:H}=y??{},J=g(()=>{switch(P){case"textarea":case"hidden":return"textarea";default:return"input"}},[P]),K=g(()=>"hidden"===P,[P]),M=r("w",d(A,z)),Q=a(V,O),R=n(V,O),S=`${w}${w&&I&&!C?" *":""}`;return e(J,{id:`${b}-${v}`,type:"hidden"===P?"textarea":P,value:"hidden"===P?$:void 0,placeholder:S,name:v,readOnly:K,className:o("gemx-border-focus gp-px-4 gp-py-2 gp-outline-none",i("text",N),i("bg",F),Q,u(D),"hidden"===P?"gp-cursor-default":null),style:{...M,...l(D),...p(D),...c(D),...s("bg",F),...s("c",N),...x(H,"box-shadow",G),...r("h",B),...h(E),...R,...q?.isValid||"hidden"===P?{}:m({bc:"#F44336"})},required:I,minLength:["text","textarea"].includes(P)?L:void 0,maxLength:["text","textarea"].includes(P)?j:void 0,onChange:k})};export{ProductPropertyInput as default};
|
|
@@ -3,4 +3,4 @@ let config={tag:"ProductBadge",label:"Product Badge",icon:'<svg fill="currentCol
|
|
|
3
3
|
<path d="M13 15C13 13.3431 14.3431 12 16 12H80C81.6569 12 83 13.3431 83 15V33C83 34.6569 81.6569 36 80 36H16C14.3431 36 13 34.6569 13 33V15Z" fill="#424242"/>
|
|
4
4
|
<g id="svgGroup" stroke-linecap="round" fill-rule="evenodd" font-size="9pt" stroke="#aaaaaa" stroke-width="0.25mm" fill="#aaaaaa" style="stroke:#aaaaaa;stroke-width:0.25mm;fill:#aaaaaa"><path d="M 67.852 24.19 L 67.852 24.627 L 61.886 24.627 L 61.886 23.847 L 66.947 23.847 A 3.156 3.156 0 0 0 66.854 23.065 A 2.683 2.683 0 0 0 66.652 22.522 Q 66.356 21.933 65.831 21.59 A 2.107 2.107 0 0 0 64.831 21.255 A 2.603 2.603 0 0 0 64.621 21.246 A 2.298 2.298 0 0 0 63.84 21.376 A 2.083 2.083 0 0 0 63.343 21.634 A 2.644 2.644 0 0 0 62.48 22.658 Q 62.17 23.295 62.165 24.05 L 62.165 24.518 A 4.429 4.429 0 0 0 62.232 25.307 A 3.266 3.266 0 0 0 62.48 26.106 Q 62.796 26.785 63.378 27.158 A 2.344 2.344 0 0 0 64.324 27.501 A 3.048 3.048 0 0 0 64.755 27.531 A 2.943 2.943 0 0 0 65.234 27.494 A 2.161 2.161 0 0 0 65.707 27.362 A 2.178 2.178 0 0 0 66.169 27.105 A 1.886 1.886 0 0 0 66.398 26.907 A 2.057 2.057 0 0 0 66.743 26.446 A 1.877 1.877 0 0 0 66.823 26.278 L 67.663 26.551 A 2.403 2.403 0 0 1 67.256 27.259 A 2.894 2.894 0 0 1 67.094 27.441 Q 66.699 27.849 66.11 28.095 A 3.122 3.122 0 0 1 65.353 28.3 A 4.153 4.153 0 0 1 64.755 28.341 Q 63.686 28.341 62.906 27.841 A 3.279 3.279 0 0 1 61.734 26.523 A 3.922 3.922 0 0 1 61.7 26.454 A 4.27 4.27 0 0 1 61.335 25.239 A 5.567 5.567 0 0 1 61.275 24.408 A 5.36 5.36 0 0 1 61.381 23.319 A 4.253 4.253 0 0 1 61.7 22.358 A 3.645 3.645 0 0 1 62.32 21.429 A 3.229 3.229 0 0 1 62.878 20.951 A 2.976 2.976 0 0 1 64.377 20.449 A 3.679 3.679 0 0 1 64.621 20.441 Q 65.242 20.441 65.819 20.667 Q 66.396 20.894 66.855 21.358 A 3.089 3.089 0 0 1 67.387 22.091 A 3.9 3.9 0 0 1 67.584 22.527 A 3.886 3.886 0 0 1 67.785 23.294 Q 67.844 23.658 67.851 24.071 A 6.689 6.689 0 0 1 67.852 24.19 Z M 53.186 29.673 L 53.912 29.196 A 2.449 2.449 0 0 0 54.132 29.517 A 3.158 3.158 0 0 0 54.352 29.763 A 1.882 1.882 0 0 0 54.704 30.039 A 2.588 2.588 0 0 0 55.073 30.225 A 2.227 2.227 0 0 0 55.502 30.351 Q 55.709 30.391 55.946 30.403 A 4.241 4.241 0 0 0 56.169 30.409 A 3.303 3.303 0 0 0 56.868 30.339 Q 57.415 30.221 57.807 29.902 A 1.595 1.595 0 0 0 58.328 29.102 Q 58.409 28.835 58.426 28.512 A 3.415 3.415 0 0 0 58.431 28.326 L 58.431 26.606 L 58.352 26.606 A 2.656 2.656 0 0 1 58.136 26.997 A 3.431 3.431 0 0 1 57.909 27.299 A 2.112 2.112 0 0 1 57.442 27.711 A 2.665 2.665 0 0 1 57.156 27.874 A 2.076 2.076 0 0 1 56.671 28.038 Q 56.445 28.086 56.183 28.098 A 3.861 3.861 0 0 1 56.005 28.102 A 3.147 3.147 0 0 1 55.016 27.951 A 2.798 2.798 0 0 1 54.382 27.65 Q 53.673 27.197 53.268 26.355 Q 52.863 25.512 52.863 24.344 A 5.775 5.775 0 0 1 52.95 23.319 A 4.345 4.345 0 0 1 53.258 22.305 A 3.536 3.536 0 0 1 53.776 21.469 A 3 3 0 0 1 54.364 20.933 A 2.775 2.775 0 0 1 55.773 20.45 A 3.457 3.457 0 0 1 56.02 20.441 A 3.302 3.302 0 0 1 56.512 20.476 Q 56.775 20.515 56.994 20.6 A 1.767 1.767 0 0 1 57.183 20.687 A 2.504 2.504 0 0 1 57.635 20.991 A 2.053 2.053 0 0 1 57.926 21.296 A 4.318 4.318 0 0 1 58.177 21.654 A 3.224 3.224 0 0 1 58.366 22.002 L 58.456 22.002 L 58.456 20.546 L 59.321 20.546 L 59.321 28.381 Q 59.321 29.35 58.908 29.977 A 2.461 2.461 0 0 1 57.785 30.904 A 3.76 3.76 0 0 1 56.82 31.162 A 4.848 4.848 0 0 1 56.169 31.205 A 5.146 5.146 0 0 1 55.523 31.166 Q 55.132 31.117 54.802 31.003 A 3.328 3.328 0 0 1 54.232 30.749 A 2.638 2.638 0 0 1 53.812 30.454 A 2.744 2.744 0 0 1 53.348 29.942 A 2.432 2.432 0 0 1 53.186 29.673 Z M 49.766 22.002 L 49.845 22.002 L 49.845 18 L 50.735 18 L 50.735 28.182 L 49.87 28.182 L 49.87 26.765 L 49.766 26.765 A 3.024 3.024 0 0 1 49.565 27.14 A 4.059 4.059 0 0 1 49.328 27.478 A 2.164 2.164 0 0 1 48.853 27.926 A 2.695 2.695 0 0 1 48.58 28.092 A 1.971 1.971 0 0 1 48.075 28.275 Q 47.778 28.341 47.419 28.341 A 2.998 2.998 0 0 1 46.461 28.192 A 2.65 2.65 0 0 1 45.773 27.844 A 3.12 3.12 0 0 1 44.889 26.877 A 3.928 3.928 0 0 1 44.672 26.457 A 4.462 4.462 0 0 1 44.353 25.363 A 6.053 6.053 0 0 1 44.277 24.384 A 5.944 5.944 0 0 1 44.364 23.343 A 4.405 4.405 0 0 1 44.672 22.318 A 3.57 3.57 0 0 1 45.179 21.488 A 2.998 2.998 0 0 1 45.778 20.936 A 2.769 2.769 0 0 1 47.201 20.449 A 3.449 3.449 0 0 1 47.434 20.441 A 3.265 3.265 0 0 1 47.923 20.476 Q 48.19 20.516 48.413 20.604 A 1.77 1.77 0 0 1 48.592 20.687 A 2.49 2.49 0 0 1 49.032 20.982 A 2.027 2.027 0 0 1 49.333 21.296 A 4.163 4.163 0 0 1 49.58 21.654 A 3.098 3.098 0 0 1 49.766 22.002 Z M 41.433 23.096 L 41.433 22.917 A 2.115 2.115 0 0 0 41.373 22.399 A 1.469 1.469 0 0 0 40.968 21.686 A 1.502 1.502 0 0 0 40.341 21.33 Q 40.107 21.26 39.826 21.242 A 3.109 3.109 0 0 0 39.634 21.237 A 3.07 3.07 0 0 0 39.063 21.287 Q 38.729 21.35 38.462 21.493 A 1.738 1.738 0 0 0 38.289 21.599 A 2.366 2.366 0 0 0 37.885 21.952 A 1.794 1.794 0 0 0 37.56 22.455 L 36.72 22.151 A 2.794 2.794 0 0 1 37.04 21.572 A 2.267 2.267 0 0 1 37.436 21.15 Q 37.893 20.774 38.46 20.608 Q 39.027 20.441 39.609 20.441 A 3.717 3.717 0 0 1 40.257 20.5 A 4.414 4.414 0 0 1 40.521 20.555 A 2.628 2.628 0 0 1 41.403 20.951 A 1.949 1.949 0 0 1 41.924 21.488 A 2.446 2.446 0 0 1 42.065 21.731 Q 42.275 22.145 42.311 22.743 A 4.23 4.23 0 0 1 42.318 22.996 L 42.318 28.182 L 41.433 28.182 L 41.433 26.974 L 41.379 26.974 A 2.147 2.147 0 0 1 41.143 27.358 A 2.828 2.828 0 0 1 40.906 27.63 A 2.273 2.273 0 0 1 40.427 27.998 A 2.858 2.858 0 0 1 40.121 28.152 Q 39.648 28.356 39.012 28.356 A 3.06 3.06 0 0 1 38.166 28.242 A 2.719 2.719 0 0 1 37.749 28.085 A 2.185 2.185 0 0 1 36.839 27.299 A 2.019 2.019 0 0 1 36.545 26.549 A 2.746 2.746 0 0 1 36.501 26.049 Q 36.501 25.482 36.715 25.095 A 1.741 1.741 0 0 1 37.322 24.458 Q 37.714 24.21 38.251 24.065 Q 38.788 23.921 39.435 23.842 Q 40.076 23.762 40.521 23.702 A 3.357 3.357 0 0 0 40.775 23.659 Q 41.015 23.608 41.17 23.529 A 0.92 0.92 0 0 0 41.2 23.514 A 0.442 0.442 0 0 0 41.364 23.362 Q 41.417 23.278 41.429 23.167 A 0.642 0.642 0 0 0 41.433 23.096 Z M 31.624 28.182 L 28 28.182 L 28 18 L 31.435 18 A 4.721 4.721 0 0 1 32.135 18.049 Q 32.517 18.106 32.836 18.231 A 2.567 2.567 0 0 1 33.093 18.348 A 2.522 2.522 0 0 1 33.735 18.82 A 2.231 2.231 0 0 1 34.09 19.298 Q 34.423 19.899 34.423 20.665 A 3.166 3.166 0 0 1 34.385 21.169 Q 34.34 21.447 34.243 21.679 A 1.878 1.878 0 0 1 34.21 21.754 Q 33.996 22.206 33.628 22.484 A 2.4 2.4 0 0 1 32.808 22.887 L 32.808 22.967 A 1.851 1.851 0 0 1 33.529 23.174 A 2.326 2.326 0 0 1 33.762 23.312 A 2.237 2.237 0 0 1 34.342 23.886 A 2.801 2.801 0 0 1 34.523 24.18 A 2.436 2.436 0 0 1 34.764 24.875 A 3.377 3.377 0 0 1 34.821 25.512 A 2.958 2.958 0 0 1 34.712 26.326 A 2.541 2.541 0 0 1 34.478 26.887 A 2.237 2.237 0 0 1 33.74 27.659 A 2.888 2.888 0 0 1 33.426 27.836 A 3.115 3.115 0 0 1 32.733 28.073 Q 32.398 28.147 32.006 28.171 A 6.294 6.294 0 0 1 31.624 28.182 Z M 47.523 27.531 Q 48.264 27.531 48.786 27.125 A 2.359 2.359 0 0 0 49.388 26.423 A 3.06 3.06 0 0 0 49.584 26.007 Q 49.86 25.293 49.86 24.369 A 5.227 5.227 0 0 0 49.8 23.557 A 3.887 3.887 0 0 0 49.587 22.75 A 2.813 2.813 0 0 0 49.257 22.131 A 2.264 2.264 0 0 0 48.791 21.647 A 1.929 1.929 0 0 0 47.839 21.266 A 2.53 2.53 0 0 0 47.523 21.246 A 2.337 2.337 0 0 0 46.889 21.329 A 1.853 1.853 0 0 0 46.233 21.662 Q 45.709 22.077 45.438 22.783 A 4.037 4.037 0 0 0 45.205 23.733 A 5.134 5.134 0 0 0 45.167 24.369 A 4.998 4.998 0 0 0 45.244 25.265 A 3.985 3.985 0 0 0 45.44 25.974 A 2.93 2.93 0 0 0 45.777 26.616 A 2.385 2.385 0 0 0 46.238 27.11 A 1.902 1.902 0 0 0 47.213 27.512 A 2.508 2.508 0 0 0 47.523 27.531 Z M 56.109 27.292 A 2.542 2.542 0 0 0 56.732 27.219 A 1.976 1.976 0 0 0 57.367 26.936 A 2.117 2.117 0 0 0 58.003 26.247 A 2.735 2.735 0 0 0 58.168 25.915 Q 58.446 25.249 58.446 24.329 A 5.002 5.002 0 0 0 58.382 23.509 A 3.778 3.778 0 0 0 58.173 22.74 A 2.801 2.801 0 0 0 57.838 22.12 A 2.291 2.291 0 0 0 57.38 21.647 Q 56.86 21.246 56.109 21.246 A 2.356 2.356 0 0 0 55.475 21.328 A 1.871 1.871 0 0 0 54.817 21.659 Q 54.29 22.072 54.021 22.77 A 4.013 4.013 0 0 0 53.785 23.757 A 5.02 5.02 0 0 0 53.753 24.329 A 4.769 4.769 0 0 0 53.813 25.104 A 3.548 3.548 0 0 0 54.026 25.873 A 2.554 2.554 0 0 0 54.385 26.496 A 2.159 2.159 0 0 0 54.827 26.917 A 2.001 2.001 0 0 0 55.681 27.259 A 2.678 2.678 0 0 0 56.109 27.292 Z M 28.93 23.424 L 28.93 27.347 L 31.624 27.347 A 4.222 4.222 0 0 0 32.262 27.302 Q 32.59 27.252 32.852 27.145 A 1.686 1.686 0 0 0 33.367 26.825 A 1.702 1.702 0 0 0 33.93 25.586 A 2.164 2.164 0 0 0 33.931 25.512 Q 33.931 24.93 33.65 24.456 Q 33.369 23.981 32.86 23.702 Q 32.35 23.424 31.664 23.424 L 28.93 23.424 Z M 28.93 18.835 L 28.93 22.599 L 31.52 22.599 A 2.465 2.465 0 0 0 32.068 22.54 A 1.938 1.938 0 0 0 32.574 22.35 Q 33.026 22.102 33.28 21.664 A 1.888 1.888 0 0 0 33.523 20.888 A 2.334 2.334 0 0 0 33.533 20.665 A 2.028 2.028 0 0 0 33.44 20.036 A 1.662 1.662 0 0 0 33.006 19.345 A 1.656 1.656 0 0 0 32.375 18.971 Q 32.115 18.883 31.797 18.852 A 3.74 3.74 0 0 0 31.435 18.835 L 28.93 18.835 Z M 41.433 25.254 L 41.433 24.15 A 0.476 0.476 0 0 1 41.358 24.207 Q 41.275 24.259 41.146 24.304 A 1.849 1.849 0 0 1 41.103 24.319 A 3.718 3.718 0 0 1 40.862 24.387 Q 40.726 24.421 40.571 24.451 Q 40.27 24.508 39.972 24.548 A 79.075 79.075 0 0 1 39.697 24.584 Q 39.566 24.601 39.45 24.615 A 45.369 45.369 0 0 1 39.435 24.617 A 6.405 6.405 0 0 0 38.941 24.697 Q 38.603 24.765 38.331 24.866 A 2.041 2.041 0 0 0 37.998 25.022 Q 37.81 25.133 37.677 25.277 A 1.214 1.214 0 0 0 37.63 25.331 A 1.045 1.045 0 0 0 37.414 25.797 A 1.477 1.477 0 0 0 37.386 26.089 A 1.555 1.555 0 0 0 37.453 26.557 A 1.206 1.206 0 0 0 37.884 27.165 A 1.813 1.813 0 0 0 38.656 27.503 A 2.522 2.522 0 0 0 39.131 27.546 Q 39.837 27.546 40.354 27.232 A 2.162 2.162 0 0 0 41.152 26.4 A 2.359 2.359 0 0 0 41.433 25.302 A 2.768 2.768 0 0 0 41.433 25.254 Z" vector-effect="non-scaling-stroke"/></g>
|
|
5
5
|
</svg
|
|
6
|
-
`},components:[{tag:"ProductBadge"}]}],editorConfigs:{placeholder:{flowTag:["ProductImagesV2","Product"]}}};export{config as default};
|
|
6
|
+
`},components:[{tag:"ProductBadge"}]}],advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},editorConfigs:{placeholder:{flowTag:["ProductImagesV2","Product"]}}};export{config as default};
|
package/dist/esm/safelist.js
CHANGED
|
@@ -172,6 +172,12 @@ const safelist = [
|
|
|
172
172
|
'gp-font-g-body',
|
|
173
173
|
'gp-font-g-heading',
|
|
174
174
|
'mobile:gp-hidden',
|
|
175
|
+
'gp-px-4',
|
|
176
|
+
'gp-py-2',
|
|
177
|
+
'gp-rounded-lg',
|
|
178
|
+
'gp-text-white',
|
|
179
|
+
'gp-font-semibold',
|
|
180
|
+
'gp-text-lg',
|
|
175
181
|
];
|
|
176
182
|
|
|
177
183
|
module.exports = safelist;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.886",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"format": "prettier --write \"./src/**/*.{ts,tsx}\""
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
24
|
+
"@gem-sdk/core": "2.0.0-dev.885",
|
|
25
25
|
"@gem-sdk/styles": "2.0.0-dev.878",
|
|
26
26
|
"@types/react-transition-group": "^4.4.5"
|
|
27
27
|
},
|