yt-uikit 0.7.397-nav-button.0 → 0.7.397-nav-button.1

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
@@ -675,6 +675,10 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
675
675
  color: #000;
676
676
  padding: 0;
677
677
 
678
+ svg path[fill="none"] {
679
+ fill: none !important;
680
+ }
681
+
678
682
  &:disabled {
679
683
  opacity: 0.5;
680
684
  cursor: not-allowed;
@@ -744,7 +748,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
744
748
  margin-bottom: 4px;
745
749
  }
746
750
  }
747
- `,rr=({products:e,addCartItem:n,productRecsCtaButtonText:r,ctaButtonBackgroundColor:a,ctaButtonTextColor:i,productRecsTitleText:d,themeColor:s,primaryTextColor:p,secondaryTextColor:u,showVariantSelectionDropdownInProductRecs:m,variant:f,cardLayout:g,cartComponentsCornerRadius:h,cartComponentsCornerType:x,backgroundSubdued:y,backgroundColor:b,tertiaryColor:v,tertiaryTextColor:w})=>{const C=o(null);l((()=>{const e=()=>{if(C.current){const e=Array.from(C?.current?.children)?.reduce(((e,t)=>e+t?.offsetWidth),0);C.current.style.width=`${e}px`}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[e]);const[E,k]=c(0),T=o(null),S=o(null),$=o(!1),B=()=>{k((e=>{const t=Math.max((D?.length||1)-1,0);return 0===e?t:e-1}))},z=()=>{k((e=>e===Math.max((D?.length||1)-1,0)?0:e+1))},D=e?.filter((e=>e&&e.available&&"8627886358748"!==String(e?.id)&&"8627886358748"!==String(e?.product_id))),I=e=>D.map((o=>t.createElement(Fn,{key:o?.id,addCartItem:n,product:o,productRecsCtaButtonText:r,ctaButtonBackgroundColor:a,ctaButtonTextColor:i,primaryTextColor:p,secondaryTextColor:u,showVariantSelectionDropdownInProductRecs:m,layout:g,cartComponentsCornerRadius:h,cartComponentsCornerType:x,isVerticalList:"vertical"===e,backgroundColor:b,tertiaryColor:v,tertiaryTextColor:w})));return"vertical"===f?t.createElement(er,null,d&&t.createElement(tr,{$primaryTextColor:p,$themeColor:s,$backgroundSubdued:y},d),t.createElement(nr,null,I("vertical"))):t.createElement(Wn,null,t.createElement(Un,{className:"yt-cart-product-recs-title",$primaryTextColor:p??"black",$themeColor:s??"lightgrey",$backgroundSubdued:y},d??"People Also Bought"),"scroll"===f?t.createElement(Gn,null,t.createElement(Qn,{ref:C},I())):t.createElement(qn,null,t.createElement(Yn,{onTouchStart:e=>{const t=e.touches[0];T.current=t.clientX,S.current=t.clientY,$.current=!1},onTouchMove:e=>{if(null===T.current||null===S.current)return;const t=e.touches[0],n=t.clientX-T.current,r=t.clientY-S.current;Math.abs(n)>10&&Math.abs(n)>Math.abs(r)&&($.current=!0,e.preventDefault())},onTouchEnd:e=>{if(null===T.current)return;const t=e.changedTouches[0].clientX-T.current;Math.abs(t)>50&&(t<0?z():B()),T.current=null,S.current=null,$.current=!1}},t.createElement(Xn,{onClick:B},t.createElement(jn,{style:{fill:"none"}})),t.createElement(Zn,{style:{transform:`translateX(-${E*(100/D.length)}%)`}},I()),t.createElement(Jn,{onClick:z},t.createElement(Vn,{style:{fill:"none"}})))))};L('.progress-container {\n --yt-line-border-fill: #3498db;\n --yt-line-border-empty: #e0e0e0;\n display: flex;\n justify-content: space-between;\n position: relative;\n margin-bottom: 30px;\n max-width: 100%;\n width: 350px;\n}\n\n.progress-container::before {\n content: ""; /* Mandatory with ::before */\n background-color: var(--yt-line-border-empty);\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n height: 4px;\n width: 100%;\n z-index: -1;\n}\n\n.progress {\n background-color: var(--yt-line-border-fill);\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n height: 4px;\n width: 0%;\n z-index: -1;\n transition: 0.4s ease;\n}');const or=e=>100/e,ar=e=>{switch(e){case 1:case 2:case 3:case 4:default:return 22;case 5:return 17}},ir=x.div`
751
+ `,rr=({products:e,addCartItem:n,productRecsCtaButtonText:r,ctaButtonBackgroundColor:a,ctaButtonTextColor:i,productRecsTitleText:d,themeColor:s,primaryTextColor:p,secondaryTextColor:u,showVariantSelectionDropdownInProductRecs:m,variant:f,cardLayout:g,cartComponentsCornerRadius:h,cartComponentsCornerType:x,backgroundSubdued:y,backgroundColor:b,tertiaryColor:v,tertiaryTextColor:w})=>{const C=o(null);l((()=>{const e=()=>{if(C.current){const e=Array.from(C?.current?.children)?.reduce(((e,t)=>e+t?.offsetWidth),0);C.current.style.width=`${e}px`}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[e]);const[E,k]=c(0),T=o(null),S=o(null),$=o(!1),B=()=>{k((e=>{const t=Math.max((D?.length||1)-1,0);return 0===e?t:e-1}))},z=()=>{k((e=>e===Math.max((D?.length||1)-1,0)?0:e+1))},D=e?.filter((e=>e&&e.available&&"8627886358748"!==String(e?.id)&&"8627886358748"!==String(e?.product_id))),I=e=>D.map((o=>t.createElement(Fn,{key:o?.id,addCartItem:n,product:o,productRecsCtaButtonText:r,ctaButtonBackgroundColor:a,ctaButtonTextColor:i,primaryTextColor:p,secondaryTextColor:u,showVariantSelectionDropdownInProductRecs:m,layout:g,cartComponentsCornerRadius:h,cartComponentsCornerType:x,isVerticalList:"vertical"===e,backgroundColor:b,tertiaryColor:v,tertiaryTextColor:w})));return"vertical"===f?t.createElement(er,null,d&&t.createElement(tr,{$primaryTextColor:p,$themeColor:s,$backgroundSubdued:y},d),t.createElement(nr,null,I("vertical"))):t.createElement(Wn,null,t.createElement(Un,{className:"yt-cart-product-recs-title",$primaryTextColor:p??"black",$themeColor:s??"lightgrey",$backgroundSubdued:y},d??"People Also Bought"),"scroll"===f?t.createElement(Gn,null,t.createElement(Qn,{ref:C},I())):t.createElement(qn,null,t.createElement(Yn,{onTouchStart:e=>{const t=e.touches[0];T.current=t.clientX,S.current=t.clientY,$.current=!1},onTouchMove:e=>{if(null===T.current||null===S.current)return;const t=e.touches[0],n=t.clientX-T.current,r=t.clientY-S.current;Math.abs(n)>10&&Math.abs(n)>Math.abs(r)&&($.current=!0,e.preventDefault())},onTouchEnd:e=>{if(null===T.current)return;const t=e.changedTouches[0].clientX-T.current;Math.abs(t)>50&&(t<0?z():B()),T.current=null,S.current=null,$.current=!1}},t.createElement(Xn,{onClick:B},t.createElement(jn,null)),t.createElement(Zn,{style:{transform:`translateX(-${E*(100/D.length)}%)`}},I()),t.createElement(Jn,{onClick:z},t.createElement(Vn,null)))))};L('.progress-container {\n --yt-line-border-fill: #3498db;\n --yt-line-border-empty: #e0e0e0;\n display: flex;\n justify-content: space-between;\n position: relative;\n margin-bottom: 30px;\n max-width: 100%;\n width: 350px;\n}\n\n.progress-container::before {\n content: ""; /* Mandatory with ::before */\n background-color: var(--yt-line-border-empty);\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n height: 4px;\n width: 100%;\n z-index: -1;\n}\n\n.progress {\n background-color: var(--yt-line-border-fill);\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n height: 4px;\n width: 0%;\n z-index: -1;\n transition: 0.4s ease;\n}');const or=e=>100/e,ar=e=>{switch(e){case 1:case 2:case 3:case 4:default:return 22;case 5:return 17}},ir=x.div`
748
752
  display: flex;
749
753
  align-items: center;
750
754
  // padding: 0 10px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-uikit",
3
- "version": "0.7.397-nav-button.0",
3
+ "version": "0.7.397-nav-button.1",
4
4
  "description": "YourToken UI Kit",
5
5
  "scripts": {
6
6
  "rollup": "tsc && rollup -c",