yt-uikit 0.8.5 → 0.8.6
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/esm/index.js +5 -2
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1909,7 +1909,10 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
1909
1909
|
height: fit-content;
|
|
1910
1910
|
margin-top: 6px;
|
|
1911
1911
|
padding: 6px 12px;
|
|
1912
|
-
|
|
1912
|
+
border-radius: 5px !important;
|
|
1913
|
+
border-width: 2px !important;
|
|
1914
|
+
border-color: lightgray !important;
|
|
1915
|
+
// box-shadow: 0px 0px 2px 2px rgb(193, 193, 193);
|
|
1913
1916
|
`,Vs=x.span`
|
|
1914
1917
|
display: flex;
|
|
1915
1918
|
flex-direction: row;
|
|
@@ -1931,7 +1934,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
1931
1934
|
font-size: 12px;
|
|
1932
1935
|
margin-top: 5px;
|
|
1933
1936
|
padding: 0 20px;
|
|
1934
|
-
`,qs=e=>{if("string"!=typeof e)return e;const t=e.match(/^gid:\/\/shopify\/\w+\/(\d+)$/);return t?t[1]:e};function Us({themeColor:e,id:n,showPrice:r,detail:
|
|
1937
|
+
`,qs=e=>{if("string"!=typeof e)return e;const t=e.match(/^gid:\/\/shopify\/\w+\/(\d+)$/);return t?t[1]:e};function Us({themeColor:e,id:n,showPrice:r,detail:o,errorText:a,customText:i,showGiftIcon:d,addCartItem:s,removeCartItem:p}){const[u,m]=Kt(Rs),[f,g]=c(null),[h,x]=c(!1),[y,b]=c(null),{setLoading:v}=dn();l((()=>{o?.availableForSale&&x(!0),o?.variants?.nodes&&o?.variants?.nodes.length>0&&g(o?.variants?.nodes[0])}),[o]);const w=f?.price?.amount;return h?t.createElement(Ls,null,t.createElement(js,null,t.createElement(Vs,null,d?t.createElement(pt,{size:24,color:e,style:{height:"24px",width:"24px"}}):null,i||"+ Gift-Wrap",r?t.createElement("span",{style:{color:e}},"₹",Number(w).toFixed(0)):""),t.createElement(Ws,{type:"checkbox",checked:u,onChange:async()=>{try{v(!0,!0),b(null),m(!u),!u&&s&&f?await s(qs(f?.id),1):u&&p&&f&&await p(qs(f?.id),"giftWrap"),v(!1,!1)}catch(e){v(!1,!1),b("Failed to add to cart"),m(u),console.error("Error updating gift wrap:",e)}},$themeColor:e,disabled:!h})),y&&t.createElement(Hs,null,y)):null}const Qs=x.div`
|
|
1935
1938
|
margin-top: 10px;
|
|
1936
1939
|
margin-bottom: 5px;
|
|
1937
1940
|
margin-left: 1rem;
|