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 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
- ${e=>e.$showBorder?"\n border-radius: 5px !important;\n border-width: 2px !important;\n border-color: lightgray !important;\n border-style: solid !important;\n ":"\n border: none !important;\n box-shadow: none !important;\n "}
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:a,errorText:i,customText:d,showGiftIcon:s,addCartItem:p,removeCartItem:u}){const[m,f]=Kt(Rs),[g,h]=c(null),[x,y]=c(!1),[b,v]=c(null),w=o(null),[C,k]=c(!0),{setLoading:E}=dn();l((()=>{a?.availableForSale&&y(!0),a?.variants?.nodes&&a?.variants?.nodes.length>0&&h(a?.variants?.nodes[0])}),[a]),l((()=>{if(w.current){const e=w.current.previousElementSibling;k(!!e)}}),[]);const T=g?.price?.amount;return x?t.createElement(Ls,{ref:w},t.createElement(js,{$showBorder:C},t.createElement(Vs,null,s?t.createElement(pt,{size:24,color:e,style:{height:"24px",width:"24px"}}):null,d||"+ Gift-Wrap",r?t.createElement("span",{style:{color:e}},"₹",Number(T).toFixed(0)):""),t.createElement(Ws,{type:"checkbox",checked:m,onChange:async()=>{try{E(!0,!0),v(null),f(!m),!m&&p&&g?await p(qs(g?.id),1):m&&u&&g&&await u(qs(g?.id),"giftWrap"),E(!1,!1)}catch(e){E(!1,!1),v("Failed to add to cart"),f(m),console.error("Error updating gift wrap:",e)}},$themeColor:e,disabled:!x})),b&&t.createElement(Hs,null,b)):null}const Qs=x.div`
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-uikit",
3
- "version": "0.8.5",
3
+ "version": "0.8.6",
4
4
  "description": "YourToken UI Kit",
5
5
  "scripts": {
6
6
  "rollup": "tsc && rollup -c",