yt-uikit 0.8.4 → 0.8.5

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
@@ -1907,11 +1907,9 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
1907
1907
  justify-content: space-between;
1908
1908
  align-items: center;
1909
1909
  height: fit-content;
1910
+ margin-top: 6px;
1910
1911
  padding: 6px 12px;
1911
- border-radius: 5px !important;
1912
- border-width: 2px !important;
1913
- border-color: lightgray !important;
1914
- // box-shadow: 0px 0px 2px 2px rgb(193, 193, 193);
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 "}
1915
1913
  `,Vs=x.span`
1916
1914
  display: flex;
1917
1915
  flex-direction: row;
@@ -1933,7 +1931,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
1933
1931
  font-size: 12px;
1934
1932
  margin-top: 5px;
1935
1933
  padding: 0 20px;
1936
- `,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`
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
1935
  margin-top: 10px;
1938
1936
  margin-bottom: 5px;
1939
1937
  margin-left: 1rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-uikit",
3
- "version": "0.8.4",
3
+ "version": "0.8.5",
4
4
  "description": "YourToken UI Kit",
5
5
  "scripts": {
6
6
  "rollup": "tsc && rollup -c",