@trafilea/afrodita-components 7.18.1 → 7.18.3

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.
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as e,__assign as o}from"tslib";import{jsxs as n,jsx as t}from"react/jsx-runtime";import i from"@emotion/styled";import{useTheme as r}from"../../core/theme/Theme.js";import{ComponentSize as c}from"../../types/enums.js";import{Icon as a}from"../icons/index.js";import d from"../shared/label/label.js";import{CustomCheckboxStyles as s}from"./styles.js";var l,h,m=i.div(l||(l=e(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"]))),u=i.div(s.baseStyles,(function(e){return[s[e.size](e.theme),s[e.variant](e.theme,e.isChecked,e.disabled),"\n ".concat(e.backgroundImage?"\n background-image: url(".concat(e.backgroundImage,");\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n "):"","\n ").concat(e.backgroundColor?"background-color: ".concat(e.backgroundColor,";"):"","\n ").concat("White"===e.text||"Beige"===e.text||"Latte"===e.text||"Sand"===e.text?"\n svg {\n path {\n fill: var(--colors-shades-black-color);\n }\n }":"","\n ").concat("White"===e.text?"border: 0.27px var(--colors-shades-300-color) solid;":"")]})),b=i.input(h||(h=e(["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ",";\n"],["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ",";\n"])),(function(e){return e.disabled?"not-allowed":"pointer"})),g=function(e){var i=e.disabled,s=void 0!==i&&i,l=e.onChange,h=e.size,g=void 0===h?c.Medium:h,k=e.sizeLabel,p=void 0===k?c.Medium:k,v=e.colorLabel,f=e.text,x=e.checked,y=void 0!==x&&x,C=e.id,j=e.variant,w=e.blockUncheck,z=e.backgroundColor,I=e.backgroundImage,L=r();return n(m,{children:[t(b,{type:"checkbox",checked:y,disabled:s,onChange:function(e){s||!1===e.target.checked&&w?e.preventDefault():l(e.target.checked)},id:C},void 0),t(u,o({theme:L,size:g,disabled:s,isChecked:y,"data-testid":"checkbox",variant:j,backgroundColor:z,backgroundImage:I,text:f},{children:y&&t(a.Actions.Check,{fill:"White"===f?L.colors.shades.black.color:L.colors.shades.white.color},void 0)}),void 0),t(d,o({"data-testid":"checkbox-text",size:p,style:{color:v||L.colors.shades[700].color},variant:y?"demi":"regular",htmlFor:C,disabled:s},{children:f}),void 0)]},void 0)};export{g as Checkbox};
1
+ import{__makeTemplateObject as e,__assign as o}from"tslib";import{jsxs as n,jsx as t}from"react/jsx-runtime";import i from"@emotion/styled";import{useTheme as r}from"../../core/theme/Theme.js";import{ComponentSize as a}from"../../types/enums.js";import{Icon as c}from"../icons/index.js";import d from"../shared/label/label.js";import{CustomCheckboxStyles as s}from"./styles.js";var l,h,u=i.div(l||(l=e(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"]))),g=function(e,o){if(!e&&!o)return!1;var n=(null==e?void 0:e.toLowerCase().trim())||"",t=(null==o?void 0:o.toLowerCase().trim())||"";return n.includes("white")||"#fff"===n||"#ffffff"===n||"white"===n||"#daa070"===n||"#f1cb75"===n||n.includes("beige")||n.includes("latte")||n.includes("sand")||("white"===t||"beige"===t||"latte"===t||"sand"===t)},m=i.div(s.baseStyles,(function(e){var o,n=e.backgroundImage?"\n background-image: url(".concat(e.backgroundImage,");\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n "):"",t=e.backgroundColor?"background-color: ".concat(e.backgroundColor,";"):"",i=g(null===(o=e.backgroundColor)||void 0===o?void 0:o.toString(),e.text)?"\n svg {\n path {\n fill: var(--colors-shades-black-color);\n }\n }":"",r=e.hasHightligthBorder?"border: 0.27px var(--colors-shades-300-color) solid;":"";return[s[e.size](e.theme),s[e.variant](e.theme,e.isChecked,e.disabled),"\n ".concat(n,"\n ").concat(t,"\n ").concat(i,"\n ").concat(r)]})),b=i.input(h||(h=e(["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ",";\n"],["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ",";\n"])),(function(e){return e.disabled?"not-allowed":"pointer"})),f=function(e){var i=e.disabled,s=void 0!==i&&i,l=e.onChange,h=e.size,f=void 0===h?a.Medium:h,v=e.sizeLabel,k=void 0===v?a.Medium:v,p=e.colorLabel,x=e.text,y=e.checked,C=void 0!==y&&y,w=e.id,j=e.variant,z=e.blockUncheck,I=e.backgroundColor,L=e.backgroundImage,B=e.hasHightligthBorder,H=void 0!==B&&B,M=r();return n(u,{children:[t(b,{type:"checkbox",checked:C,disabled:s,onChange:function(e){s||!1===e.target.checked&&z?e.preventDefault():l(e.target.checked)},id:w},void 0),t(m,o({theme:M,size:f,disabled:s,isChecked:C,"data-testid":"checkbox",variant:j,backgroundColor:I,backgroundImage:L,text:x,hasHightligthBorder:H},{children:C&&t(c.Actions.Check,{fill:g(I,x)?M.colors.shades.black.color:M.colors.shades.white.color},void 0)}),void 0),t(d,o({"data-testid":"checkbox-text",size:k,style:{color:p||M.colors.shades[700].color},variant:C?"demi":"regular",htmlFor:w,disabled:s},{children:x}),void 0)]},void 0)};export{f as Checkbox};
2
2
  //# sourceMappingURL=Checkbox.js.map
@@ -1,2 +1,2 @@
1
- import{__spreadArray as e,__assign as t}from"tslib";import{jsxs as n,Fragment as o,jsx as i}from"react/jsx-runtime";import{useState as c,useEffect as l,useCallback as r}from"react";import{useTheme as a}from"../../core/theme/Theme.js";import{ComponentSize as d}from"../../types/enums.js";import"../../utils/constants/offerAtCart.js";import"../../utils/media.js";import"../../utils/mock-content/CancellationFlowAccordion.js";import{simulateMouseClick as s}from"../../utils/simulateClick/simulateClick.js";import{Checkbox as u}from"../checkbox/Checkbox.js";import"@emotion/react/jsx-runtime";import"../cta/styled.js";import m from"../cta/secondary/ButtonSecondary.js";import{Icon as h}from"../icons/index.js";import f from"../selector/simple/SelectorSecondary.js";import{Accordion as k}from"./Accordion.js";import{Header as b,H4 as x,ClearAll as v,MobileHeader as p,MobileIconsContainer as I,OptionContainer as g,FilterLink as C,SectionContent as j,MobileFooter as y,MobileClearContainer as T}from"./FiltersStyled.js";import{Tags as w}from"./Tags/Tags.js";var A=function(u){var A=u.values,U=u.onChange,B=u.tagsColor,S=void 0===B?"#fff6ef":B,O=u.filterByText,z=u.clearAllText,E=u.isMobile,$=u.filtersSelectText,D=u.showSelectedNumberInSection,F=void 0!==D&&D,H=u.applyText,R=u.mobileApplyButtonClick,V=u.mobileBackArrowClick,N=u.onResetValues,q=a(),G=c(A),J=G[0],K=G[1],P=c(function(){var e=[];return A.forEach((function(t,n){t.items.forEach((function(t,o){t.checked&&!t.blockUncheck&&e.push({sectionIndex:n,sectionTitle:t.label,itemIndex:o,label:t.label,translatedLabel:t.translatedLabel})}))})),e}()),Q=P[0],W=P[1],X=c(),Y=X[0],Z=X[1];l((function(){J.length&&Y&&U(J,Y)}),[Y,J,U]);var _=r((function(e){e.forEach((function(e){var t=e.sectionIndex,n=e.itemIndex;te({sectionIndex:t,itemIndex:n})}))}),[]),ee=r((function(n){var o=n.sectionIndex,i=n.itemIndex,c=n.checked;Z({sectionIndex:o,itemIndex:i,checked:c});var l=J[o],r=null==l?void 0:l.items[i];(null==r?void 0:r.isLinkItem)&&(null==r?void 0:r.link)?c&&window.location.assign(r.link):(W((function(t){return l.isMultiselect||t.length>0&&_([]),c?e(e([],l.isMultiselect?t:t.filter((function(e){return e.sectionIndex!==o})),!0),[{sectionIndex:o,itemIndex:i,label:J[o].items[i].label,translatedLabel:J[o].items[i].translatedLabel,sectionTitle:J[o].title}],!1):t.filter((function(e){return e.sectionIndex!==o||e.itemIndex!==i}))})),K((function(e){return e.map((function(e,n){return o!==n?e:t(t({},e),{items:e.items.map((function(n,o){return t(t({},n),{label:n.label,checked:i===o?c:!!e.isMultiselect&&n.checked})}))})}))})))}),[J,_]),te=function(e){var t=e.sectionIndex,n=e.itemIndex,o=document.getElementById("filter[".concat(t,",").concat(n,"]"));s(o)},ne=function(){_(Q),W([]),K((function(e){return e.map((function(e){return t(t({},e),{items:e.items.map((function(e){return t(t({},e),{checked:!!e.blockUncheck&&e.checked})}))})}))})),N()};return n(o,{children:[E?n(p,t({"data-testid":"MobileHeader"},{children:[i(I,t({onClick:V,"data-testid":"mobileBackArrow"},{children:i(h.Arrows.ChevronRightVariant,{fill:q.colors.shades[700].color},void 0)}),void 0),!!Q.length&&n(x,t({color:q.colors.shades[700].color},{children:[$," (",Q.length,")"]}),void 0)]}),void 0):i("div",t({"data-testid":"DesktopHeader"},{children:!!Q.length&&n(o,{children:[n(b,{children:[n(x,t({color:q.colors.shades[700].color},{children:[O," (",Q.length,")"]}),void 0),i(v,t({onClick:ne,color:q.colors.shades[700].color,"data-testid":"desktop-clear-all"},{children:z}),void 0)]},void 0),i(w,{color:S,items:Q.map((function(e){var t=e.translatedLabel||e.label;return"$75 And Above"===t?"+$75":t})),onCloseClick:function(e){return te(Q[e])}},void 0)]},void 0)}),void 0),J.filter((function(e){return e.isLinkOption})).map((function(e,n){return i(g,t({showInMobile:e.showInMobile,showInTablet:e.showInTablet,"data-testid":"linkOption"},{children:i(C,t({color:e.color||q.colors.shades[550].color,href:e.link},{children:e.translatedTitle||e.title}),void 0)}),"option-container-".concat(n))})),J.filter((function(e){return!e.isLinkOption})).map((function(e){var o=function(e){var t=0,n="";return F&&(n=(t=Q.filter((function(t){return t.sectionTitle==e.title})).length)>0&&F?"(".concat(t,")"):""),n}(e);return i(k,t({title:"".concat(e.translatedTitle||e.title," ").concat(o),isOpenByDefault:e.isOpenByDefault,showInMobile:e.showInMobile},{children:n(j,t({cols:e.columns},{children:["size"===e.type&&e.items.map((function(t,n){var o=J.findIndex((function(t){return t.title===e.title}));return i(f,{size:d.Medium,text:t.translatedLabel||t.label,active:t.checked,disabled:t.blockUncheck,onClick:function(){return ee({sectionIndex:o,itemIndex:n,checked:!t.checked})},width:"50px",id:"filter[".concat(o,",").concat(n,"]")},t.label)})),"color"===e.type&&e.items.map((function(t,n){var o;return i(L,{onChange:ee,text:t.translatedLabel||t.label,checked:t.checked,itemIndex:n,sectionIndex:J.findIndex((function(t){return t.title===e.title})),blockUncheck:t.blockUncheck,color:null!==(o=t.value)&&void 0!==o?o:"",backgroundImage:t.backgroundImage},"".concat(t.checked,"-").concat(t.label))})),!e.type&&e.items.map((function(t,n){return i(M,{onChange:ee,text:t.translatedLabel||("$75 And Above"===t.label?"+$75":t.label),checked:t.checked,itemIndex:n,sectionIndex:J.findIndex((function(t){return t.title===e.title})),blockUncheck:t.blockUncheck},"".concat(t.checked,"-").concat(t.label))}))]}),void 0)}),J.findIndex((function(t){return t.title===e.title})))})),E&&n(y,t({"data-testid":"MobileFooter"},{children:[n(T,t({onClick:ne},{children:[i(I,{children:i(h.Actions.Trash,{fill:q.colors.shades[700].color},void 0)},void 0),i(v,t({color:q.colors.shades[700].color},{children:z}),void 0)]}),void 0),i(m,{text:H,onClick:R},void 0)]}),void 0)]},void 0)},M=function(e){var t=e.sectionIndex,n=e.text,o=e.itemIndex,c=e.onChange,l=e.checked,a=e.blockUncheck,s=r((function(e){c({sectionIndex:t,itemIndex:o,checked:e})}),[c,t,o]);return i(u,{onChange:s,checked:l,text:n,id:"filter[".concat(t,",").concat(o,"]"),size:d.Small,variant:"secondary",blockUncheck:a},o)},L=function(e){var t=e.sectionIndex,n=e.text,o=e.itemIndex,c=e.onChange,l=e.checked,a=e.blockUncheck,s=e.color,m=e.backgroundImage,h=r((function(e){c({sectionIndex:t,itemIndex:o,checked:e})}),[c,t,o]);return i(u,{onChange:h,checked:l,text:n,id:"filter[".concat(t,",").concat(o,"]"),size:d.Medium,variant:"color",blockUncheck:a,backgroundColor:s,backgroundImage:m},o)};export{A as Filters};
1
+ import{__spreadArray as e,__assign as t}from"tslib";import{jsxs as n,Fragment as o,jsx as i}from"react/jsx-runtime";import{useState as c,useEffect as l,useCallback as r}from"react";import{useTheme as a}from"../../core/theme/Theme.js";import{ComponentSize as d}from"../../types/enums.js";import"../../utils/constants/offerAtCart.js";import"../../utils/media.js";import"../../utils/mock-content/CancellationFlowAccordion.js";import{simulateMouseClick as s}from"../../utils/simulateClick/simulateClick.js";import{Checkbox as u}from"../checkbox/Checkbox.js";import"@emotion/react/jsx-runtime";import"../cta/styled.js";import h from"../cta/secondary/ButtonSecondary.js";import{Icon as m}from"../icons/index.js";import f from"../selector/simple/SelectorSecondary.js";import{Accordion as k}from"./Accordion.js";import{Header as b,H4 as x,ClearAll as v,MobileHeader as p,MobileIconsContainer as I,OptionContainer as g,FilterLink as C,SectionContent as w,MobileFooter as j,MobileClearContainer as y}from"./FiltersStyled.js";import{Tags as T}from"./Tags/Tags.js";var A=function(u){var A=u.values,U=u.onChange,B=u.tagsColor,S=void 0===B?"#fff6ef":B,O=u.filterByText,z=u.clearAllText,E=u.isMobile,$=u.filtersSelectText,D=u.showSelectedNumberInSection,F=void 0!==D&&D,H=u.applyText,R=u.mobileApplyButtonClick,V=u.mobileBackArrowClick,N=u.onResetValues,q=a(),G=c(A),J=G[0],K=G[1],P=c(function(){var e=[];return A.forEach((function(t,n){t.items.forEach((function(t,o){t.checked&&!t.blockUncheck&&e.push({sectionIndex:n,sectionTitle:t.label,itemIndex:o,label:t.label,translatedLabel:t.translatedLabel})}))})),e}()),Q=P[0],W=P[1],X=c(),Y=X[0],Z=X[1];l((function(){J.length&&Y&&U(J,Y)}),[Y,J,U]);var _=r((function(e){e.forEach((function(e){var t=e.sectionIndex,n=e.itemIndex;te({sectionIndex:t,itemIndex:n})}))}),[]),ee=r((function(n){var o=n.sectionIndex,i=n.itemIndex,c=n.checked;Z({sectionIndex:o,itemIndex:i,checked:c});var l=J[o],r=null==l?void 0:l.items[i];(null==r?void 0:r.isLinkItem)&&(null==r?void 0:r.link)?c&&window.location.assign(r.link):(W((function(t){return l.isMultiselect||t.length>0&&_([]),c?e(e([],l.isMultiselect?t:t.filter((function(e){return e.sectionIndex!==o})),!0),[{sectionIndex:o,itemIndex:i,label:J[o].items[i].label,translatedLabel:J[o].items[i].translatedLabel,sectionTitle:J[o].title}],!1):t.filter((function(e){return e.sectionIndex!==o||e.itemIndex!==i}))})),K((function(e){return e.map((function(e,n){return o!==n?e:t(t({},e),{items:e.items.map((function(n,o){return t(t({},n),{label:n.label,checked:i===o?c:!!e.isMultiselect&&n.checked})}))})}))})))}),[J,_]),te=function(e){var t=e.sectionIndex,n=e.itemIndex,o=document.getElementById("filter[".concat(t,",").concat(n,"]"));s(o)},ne=function(){_(Q),W([]),K((function(e){return e.map((function(e){return t(t({},e),{items:e.items.map((function(e){return t(t({},e),{checked:!!e.blockUncheck&&e.checked})}))})}))})),N()};return n(o,{children:[E?n(p,t({"data-testid":"MobileHeader"},{children:[i(I,t({onClick:V,"data-testid":"mobileBackArrow"},{children:i(m.Arrows.ChevronRightVariant,{fill:q.colors.shades[700].color},void 0)}),void 0),!!Q.length&&n(x,t({color:q.colors.shades[700].color},{children:[$," (",Q.length,")"]}),void 0)]}),void 0):i("div",t({"data-testid":"DesktopHeader"},{children:!!Q.length&&n(o,{children:[n(b,{children:[n(x,t({color:q.colors.shades[700].color},{children:[O," (",Q.length,")"]}),void 0),i(v,t({onClick:ne,color:q.colors.shades[700].color,"data-testid":"desktop-clear-all"},{children:z}),void 0)]},void 0),i(T,{color:S,items:Q.map((function(e){var t=e.translatedLabel||e.label;return"$75 And Above"===t?"+$75":t})),onCloseClick:function(e){return te(Q[e])}},void 0)]},void 0)}),void 0),J.filter((function(e){return e.isLinkOption})).map((function(e,n){return i(g,t({showInMobile:e.showInMobile,showInTablet:e.showInTablet,"data-testid":"linkOption"},{children:i(C,t({color:e.color||q.colors.shades[550].color,href:e.link},{children:e.translatedTitle||e.title}),void 0)}),"option-container-".concat(n))})),J.filter((function(e){return!e.isLinkOption})).map((function(e){var o=function(e){var t=0,n="";return F&&(n=(t=Q.filter((function(t){return t.sectionTitle==e.title})).length)>0&&F?"(".concat(t,")"):""),n}(e);return i(k,t({title:"".concat(e.translatedTitle||e.title," ").concat(o),isOpenByDefault:e.isOpenByDefault,showInMobile:e.showInMobile},{children:n(w,t({cols:e.columns},{children:["size"===e.type&&e.items.map((function(t,n){var o=J.findIndex((function(t){return t.title===e.title}));return i(f,{size:d.Medium,text:t.translatedLabel||t.label,active:t.checked,disabled:t.blockUncheck,onClick:function(){return ee({sectionIndex:o,itemIndex:n,checked:!t.checked})},width:"50px",id:"filter[".concat(o,",").concat(n,"]")},t.label)})),"color"===e.type&&e.items.map((function(t,n){var o;return i(M,{onChange:ee,text:t.translatedLabel||t.label,checked:t.checked,itemIndex:n,sectionIndex:J.findIndex((function(t){return t.title===e.title})),blockUncheck:t.blockUncheck,color:null!==(o=t.value)&&void 0!==o?o:"",backgroundImage:t.backgroundImage},"".concat(t.checked,"-").concat(t.label))})),!e.type&&e.items.map((function(t,n){return i(L,{onChange:ee,text:t.translatedLabel||("$75 And Above"===t.label?"+$75":t.label),checked:t.checked,itemIndex:n,sectionIndex:J.findIndex((function(t){return t.title===e.title})),blockUncheck:t.blockUncheck},"".concat(t.checked,"-").concat(t.label))}))]}),void 0)}),J.findIndex((function(t){return t.title===e.title})))})),E&&n(j,t({"data-testid":"MobileFooter"},{children:[n(y,t({onClick:ne},{children:[i(I,{children:i(m.Actions.Trash,{fill:q.colors.shades[700].color},void 0)},void 0),i(v,t({color:q.colors.shades[700].color},{children:z}),void 0)]}),void 0),i(h,{text:H,onClick:R},void 0)]}),void 0)]},void 0)},L=function(e){var t=e.sectionIndex,n=e.text,o=e.itemIndex,c=e.onChange,l=e.checked,a=e.blockUncheck,s=r((function(e){c({sectionIndex:t,itemIndex:o,checked:e})}),[c,t,o]);return i(u,{onChange:s,checked:l,text:n,id:"filter[".concat(t,",").concat(o,"]"),size:d.Small,variant:"secondary",blockUncheck:a},o)},M=function(e){var t=e.sectionIndex,n=e.text,o=e.itemIndex,c=e.onChange,l=e.checked,a=e.blockUncheck,s=e.color,h=e.backgroundImage,m=r((function(e){c({sectionIndex:t,itemIndex:o,checked:e})}),[c,t,o]),f=function(e){if(!e)return!1;var t=e.toLowerCase().trim();return t.includes("white")||"#fff"===t||"#ffffff"===t||"white"===t}(s);return i(u,{onChange:m,checked:l,text:n,id:"filter[".concat(t,",").concat(o,"]"),size:d.Medium,variant:"color",blockUncheck:a,backgroundColor:s,backgroundImage:h,hasHightligthBorder:f},o)};export{A as Filters};
2
2
  //# sourceMappingURL=Filters.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as o,__assign as t}from"tslib";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useRef as e,useState as n,useEffect as a}from"react";import"../../../core/theme/Theme.js";import"../../../types/enums.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import"../../pricing/styles.js";import"../../tooltip/Styled.js";import"../../atoms/PriceLabel/PriceLabel.js";import"../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../atoms/HorizontalDivider/HorizontalDivider.js";import{Icon as s}from"../../atoms/Icon/Icon.js";import"../../atoms/Image/styled.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import{ProgressBar as u}from"./components/ProgressBar.js";import{Container as c,PlayContainer as d,PlayIcon as l,PauseContainer as m,MuteButton as f,HTMLVideo as p}from"./styled.js";var v=function(v){var h,g,y=v.source,j=v.thumbnail,b=v.height,P=v.className,C=v.withProgressBar,L=void 0===C||C,A=v.hasAudioControl,I=v.muted,k=v.onLoadedData,D=v.autoPlay,N=v.isActive,T=void 0===N||N,w=o(v,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData","autoPlay","isActive"]),B=e(null),x=n(!0),z=x[0],E=x[1],H=n(!1),M=H[0],O=H[1],V=n(I),_=V[0],q=V[1],F=n(0),S=F[0],U=F[1],G=n(!1),J=G[0],K=G[1],Q=n(!1),R=Q[0],W=Q[1],X=S>0,Y=(null===(h=B.current)||void 0===h?void 0:h.duration)?S/B.current.duration:0,Z=S===(null===(g=null==B?void 0:B.current)||void 0===g?void 0:g.duration)||0===S,$=D?void 0:j;a((function(){var o=B.current;if(o)if(T&&D){o.muted=!0,q(!0);var t=o.play();void 0!==t&&t.then((function(){O(!0)})).catch((function(o){"NotAllowedError"===o.name&&W(!0)}))}else o.pause(),O(!1)}),[T,D]);return r(c,t({className:P},{children:[!z&&L&&i(u,{progress:Y,hide:Z},void 0),M?i(m,{"data-testid":"pause",onClick:function(){B.current&&M&&(B.current.pause(),O(!1))}},void 0):i(d,t({"data-testid":"play",onClick:function(){B.current&&!J&&(K(!0),B.current.play().then((function(){O(!0)})).catch((function(o){"NotAllowedError"===o.name&&W(!0)})).finally((function(){return K(!1)})))}},{children:X&&i(l,{},void 0)}),void 0),A&&r(f,t({onClick:function(){B.current&&q((function(o){return!o}))}},{children:[_&&i(s,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!_&&i(s,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),r(p,t({},w,{muted:_,"data-testid":"video",poster:$,playsInline:!0,controls:R,ref:B,onTimeUpdate:function(){if(B.current){var o=B.current.currentTime;requestAnimationFrame((function(){return U(o)}))}},onCanPlay:function(){return E(!1)},onLoadedData:function(o){k&&k(o),E(!1)},onPause:function(){return O(!1)},onPlaying:function(){return O(!0)},height:b||"auto"},{children:[i("track",{kind:"captions"},void 0),i("source",{src:y},void 0)]}),void 0)]}),void 0)};export{v as Video};
1
+ import{__rest as o,__assign as t}from"tslib";import{useRef as r,useState as e,useEffect as n,createElement as i}from"react";import{jsxs as a,jsx as s}from"react/jsx-runtime";import"../../../core/theme/Theme.js";import"../../../types/enums.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import"../../pricing/styles.js";import"../../tooltip/Styled.js";import"../../atoms/PriceLabel/PriceLabel.js";import"../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../atoms/HorizontalDivider/HorizontalDivider.js";import{Icon as c}from"../../atoms/Icon/Icon.js";import"../../atoms/Image/styled.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import{ProgressBar as u}from"./components/ProgressBar.js";import{Container as d,PlayContainer as l,PlayIcon as m,PauseContainer as f,MuteButton as p,HTMLVideo as v}from"./styled.js";var h=function(h){var y,g,j=h.source,b=h.thumbnail,P=h.height,C=h.className,L=h.withProgressBar,A=void 0===L||L,k=h.hasAudioControl,I=h.muted,D=h.onLoadedData,N=h.autoPlay,T=h.isActive,w=void 0===T||T,B=o(h,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData","autoPlay","isActive"]),x=r(null),z=e(!0),E=z[0],H=z[1],M=e(!1),O=M[0],V=M[1],_=e(I),q=_[0],F=_[1],S=e(0),U=S[0],G=S[1],J=e(!1),K=J[0],Q=J[1],R=e(!1),W=R[0],X=R[1],Y=U>0,Z=(null===(y=x.current)||void 0===y?void 0:y.duration)?U/x.current.duration:0,$=U===(null===(g=null==x?void 0:x.current)||void 0===g?void 0:g.duration)||0===U,oo=N?void 0:b;n((function(){var o=x.current;o&&o.load()}),[j,oo]),n((function(){var o=x.current;if(o)if(w&&N){o.muted=!0,F(!0);var t=o.play();void 0!==t&&t.then((function(){V(!0)})).catch((function(o){"NotAllowedError"===o.name&&X(!0)}))}else o.pause(),V(!1)}),[w,N]);return a(d,t({className:C},{children:[!E&&A&&s(u,{progress:Z,hide:$},void 0),O?s(f,{"data-testid":"pause",onClick:function(){x.current&&O&&(x.current.pause(),V(!1))}},void 0):s(l,t({"data-testid":"play",onClick:function(){x.current&&!K&&(Q(!0),x.current.play().then((function(){V(!0)})).catch((function(o){"NotAllowedError"===o.name&&X(!0)})).finally((function(){return Q(!1)})))}},{children:Y&&s(m,{},void 0)}),void 0),k&&a(p,t({onClick:function(){x.current&&F((function(o){return!o}))}},{children:[q&&s(c,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!q&&s(c,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),i(v,t({},B,{key:"".concat(j,"-").concat(oo||"no-poster"),muted:q,"data-testid":"video",poster:oo,playsInline:!0,controls:W,ref:x,onTimeUpdate:function(){if(x.current){var o=x.current.currentTime;requestAnimationFrame((function(){return G(o)}))}},onCanPlay:function(){return H(!1)},onLoadedData:function(o){D&&D(o),H(!1)},onPause:function(){return V(!1)},onPlaying:function(){return V(!0)},height:P||"auto"}),s("track",{kind:"captions"},void 0),s("source",{src:j},void 0))]}),void 0)};export{h as Video};
2
2
  //# sourceMappingURL=Video.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n,__assign as i}from"tslib";import{jsxs as e,jsx as t}from"react/jsx-runtime";import o from"@emotion/styled";import{useState as r,useEffect as l}from"react";import{ComponentSize as a}from"../../types/enums.js";import{DateFormat as d,formatDate as p}from"../../utils/dateFormatter/dateFormatter.js";import{Image as h}from"../atoms/Image/Image.js";import"@emotion/react/jsx-runtime";import"../../core/theme/Theme.js";import"../cta/styled.js";import s from"../cta/secondary/ButtonSecondary.js";import{StarList as m}from"../rating/starList/StarList.js";var c,x,f,g,w,u,v,y,z,b,j,k,S,M,C,I,L,T,D,E=o.div(c||(c=n(["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"],["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"]))),_=o.div(x||(x=n(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n font-size: 14px;\n line-height: 22px;\n text-align: right;\n margin-bottom: 10px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n font-size: 14px;\n line-height: 22px;\n text-align: right;\n margin-bottom: 10px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),A=o.div(f||(f=n(["\n display: flex;\n justify-content: space-between;\n"],["\n display: flex;\n justify-content: space-between;\n"]))),F=o.div(g||(g=n(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"]))),H=o.span(w||(w=n(["\n font-weight: 400;\n font-size: 12px;\n line-height: 16px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-weight: 400;\n font-size: 12px;\n line-height: 16px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),N=o.div(u||(u=n(["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),Y=o.h2(v||(v=n(["\n font-weight: 600;\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n line-height: 28px;\n }\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n line-height: 28px;\n }\n"]))),q=o.h3(y||(y=n(["\n font-size: 14px;\n line-height: 22px;\n margin: 10px 0 8px;\n font-weight: 600;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-size: 14px;\n line-height: 22px;\n margin: 10px 0 8px;\n font-weight: 600;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),B=o.div(z||(z=n(["\n display: none;\n\n @media (min-width: 768px) {\n display: block;\n font-weight: normal;\n font-size: 16px;\n line-height: 24px;\n margin: 0;\n white-space: pre-wrap;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n }\n"],["\n display: none;\n\n @media (min-width: 768px) {\n display: block;\n font-weight: normal;\n font-size: 16px;\n line-height: 24px;\n margin: 0;\n white-space: pre-wrap;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n }\n"]))),V=o.div(b||(b=n(["\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n margin: 0;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n\n @media (min-width: 768px) {\n display: none;\n }\n"],["\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n margin: 0;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n\n @media (min-width: 768px) {\n display: none;\n }\n"]))),W=o.div(j||(j=n(["\n margin-left: 10px;\n text-align: right;\n"],["\n margin-left: 10px;\n text-align: right;\n"]))),G=o.div(k||(k=n(["\n display: flex;\n justify-content: end;\n"],["\n display: flex;\n justify-content: end;\n"]))),J=o.div(S||(S=n(["\n width: 7.5rem;\n height: 4.125rem;\n"],["\n width: 7.5rem;\n height: 4.125rem;\n"]))),K=o.div(M||(M=n(["\n cursor: zoom-in;\n display: none;\n margin-right: 4px;\n\n &:first-child {\n display: inline-block;\n }\n\n & img {\n object-fit: cover;\n }\n\n @media (min-width: 1024px) {\n display: inline-block;\n }\n"],["\n cursor: zoom-in;\n display: none;\n margin-right: 4px;\n\n &:first-child {\n display: inline-block;\n }\n\n & img {\n object-fit: cover;\n }\n\n @media (min-width: 1024px) {\n display: inline-block;\n }\n"]))),O=o.div(C||(C=n(["\n display: flex;\n margin-top: ",";\n\n @media (max-width: 768px) {\n display: none;\n }\n"],["\n display: flex;\n margin-top: ",";\n\n @media (max-width: 768px) {\n display: none;\n }\n"])),(function(n){return n.showMoreDesktop?"12px":"50px"})),P=o.div(I||(I=n(["\n display: none;\n\n @media (max-width: 768px) {\n margin-top: 10px;\n display: flex;\n }\n"],["\n display: none;\n\n @media (max-width: 768px) {\n margin-top: 10px;\n display: flex;\n }\n"]))),Q=o.div(L||(L=n(["\n font-size: 14px;\n line-height: 34px;\n font-weight: 600;\n color: #d4605b;\n"],["\n font-size: 14px;\n line-height: 34px;\n font-weight: 600;\n color: #d4605b;\n"]))),R=o.i(T||(T=n(["\n content: '\f164';\n"],["\n content: '\\f164';\n"]))),U=o(s)(D||(D=n(["\n margin-right: 15px;\n"],["\n margin-right: 15px;\n"]))),X=function(n){var o=n.reviewId,s=n.reviewerName,c=n.date,x=n.dateFormat,f=void 0===x?d.DDMMYY:x,g=n.rating,w=n.stars,u=n.title,v=n.description,y=n.images,z=n.reviewVariant,b=n.onClickImage,j=n.helpfulActionText,k=n.helpfulAction,S=n.helpfulCount,M=n.hasTextWhenHelpfulCount0,C=void 0!==M&&M,I=Math.random().toString(36).substring(7),L=r(v.length>168),T=L[0],D=L[1],X=r(v.length>500),Z=X[0],$=X[1];return l((function(){var n=document.querySelectorAll("#see-more-".concat(I)),i=function(){D(!1),$(!1)};return n.forEach((function(n){n.addEventListener("click",i)})),function(){n.forEach((function(n){n.removeEventListener("click",i)}))}}),[I]),e(E,{children:[e(_,{children:[t(Y,{children:s},void 0),t(H,{children:p(c,f)},void 0)]},void 0),t(m,{starsNumber:5,rating:g,fill:w.color,size:w.size},void 0),e(A,i({"data-testid":"review-content"},{children:[e(F,{children:[t(q,{children:u},void 0),t(V,{dangerouslySetInnerHTML:{__html:T?"".concat(v.slice(0,168),'... <a id="see-more-').concat(I,'" class="see-more">See more</a>'):v}},void 0),t(B,{dangerouslySetInnerHTML:{__html:Z?"".concat(v.slice(0,500),'... <a id="see-more-').concat(I,'" class="see-more">See more</a>'):v}},void 0),e(O,i({showMoreDesktop:v.length>500},{children:[j&&k&&t(U,{onClick:function(){return k(o)},text:j,size:a.Small},void 0),(S||C&&0===S)&&e(Q,{children:[S," people found this helpful"]},void 0)]}),void 0)]},void 0),e(W,{children:[e(G,{children:[null==y?void 0:y.map((function(n){return t(K,i({onClick:function(){return null==b?void 0:b(n.src)}},{children:t(h,{src:n.src,alt:n.alt,height:"10rem",width:"7.5rem"},void 0)}),n.src)})),!y||0===y.length&&t(J,{},void 0)]},void 0),t(N,{children:z},void 0)]},void 0)]}),void 0),t(R,{},void 0),e(P,{children:[j&&k&&t(U,{onClick:function(){return k(o)},text:j,size:a.Small},void 0),(S||C&&0===S)&&e(Q,{children:[S," people found this helpful"]},void 0)]},void 0)]},void 0)};export{X as default};
1
+ import{__makeTemplateObject as n,__assign as i}from"tslib";import{jsxs as e,jsx as t}from"react/jsx-runtime";import o from"@emotion/styled";import{useState as r,useEffect as l}from"react";import{ComponentSize as a}from"../../types/enums.js";import{DateFormat as d,formatDate as p}from"../../utils/dateFormatter/dateFormatter.js";import{Image as h}from"../atoms/Image/Image.js";import"@emotion/react/jsx-runtime";import"../../core/theme/Theme.js";import"../cta/styled.js";import s from"../cta/secondary/ButtonSecondary.js";import{StarList as c}from"../rating/starList/StarList.js";var m,x,f,g,w,u,v,y,z,b,j,k,S,M,T,C,I,L,D,E=o.div(m||(m=n(["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"],["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"]))),_=o.div(x||(x=n(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n font-size: 14px;\n line-height: 22px;\n text-align: right;\n margin-bottom: 10px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n font-size: 14px;\n line-height: 22px;\n text-align: right;\n margin-bottom: 10px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),A=o.div(f||(f=n(["\n display: flex;\n justify-content: space-between;\n"],["\n display: flex;\n justify-content: space-between;\n"]))),F=o.div(g||(g=n(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"]))),H=o.span(w||(w=n(["\n font-weight: 400;\n font-size: 12px;\n line-height: 16px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-weight: 400;\n font-size: 12px;\n line-height: 16px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),N=o.div(u||(u=n(["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),Y=o.h2(v||(v=n(["\n font-weight: 600;\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n line-height: 28px;\n }\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n line-height: 28px;\n }\n"]))),q=o.h3(y||(y=n(["\n font-size: 14px;\n line-height: 22px;\n margin: 10px 0 8px;\n font-weight: 600;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-size: 14px;\n line-height: 22px;\n margin: 10px 0 8px;\n font-weight: 600;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),B=o.div(z||(z=n(["\n display: none;\n\n @media (min-width: 768px) {\n display: block;\n font-weight: normal;\n font-size: 16px;\n line-height: 24px;\n margin: 0;\n white-space: pre-wrap;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n }\n"],["\n display: none;\n\n @media (min-width: 768px) {\n display: block;\n font-weight: normal;\n font-size: 16px;\n line-height: 24px;\n margin: 0;\n white-space: pre-wrap;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n }\n"]))),V=o.div(b||(b=n(["\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n margin: 0;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n\n @media (min-width: 768px) {\n display: none;\n }\n"],["\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n margin: 0;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n\n @media (min-width: 768px) {\n display: none;\n }\n"]))),W=o.div(j||(j=n(["\n margin-left: 10px;\n text-align: right;\n"],["\n margin-left: 10px;\n text-align: right;\n"]))),G=o.div(k||(k=n(["\n display: flex;\n justify-content: end;\n"],["\n display: flex;\n justify-content: end;\n"]))),J=o.div(S||(S=n(["\n width: 7.5rem;\n height: 4.125rem;\n"],["\n width: 7.5rem;\n height: 4.125rem;\n"]))),K=o.div(M||(M=n(["\n cursor: zoom-in;\n display: none;\n margin-right: 4px;\n\n &:first-child {\n display: inline-block;\n }\n\n & img {\n object-fit: cover;\n }\n\n @media (min-width: 1024px) {\n display: inline-block;\n }\n"],["\n cursor: zoom-in;\n display: none;\n margin-right: 4px;\n\n &:first-child {\n display: inline-block;\n }\n\n & img {\n object-fit: cover;\n }\n\n @media (min-width: 1024px) {\n display: inline-block;\n }\n"]))),O=o.div(T||(T=n(["\n display: flex;\n margin-top: ",";\n\n @media (max-width: 768px) {\n display: none;\n }\n"],["\n display: flex;\n margin-top: ",";\n\n @media (max-width: 768px) {\n display: none;\n }\n"])),(function(n){return n.showMoreDesktop?"12px":"50px"})),P=o.div(C||(C=n(["\n display: none;\n\n @media (max-width: 768px) {\n margin-top: 10px;\n display: flex;\n }\n"],["\n display: none;\n\n @media (max-width: 768px) {\n margin-top: 10px;\n display: flex;\n }\n"]))),Q=o.div(I||(I=n(["\n font-size: 14px;\n line-height: 34px;\n font-weight: 600;\n color: #d4605b;\n"],["\n font-size: 14px;\n line-height: 34px;\n font-weight: 600;\n color: #d4605b;\n"]))),R=o.i(L||(L=n(["\n content: '\f164';\n"],["\n content: '\\f164';\n"]))),U=o(s)(D||(D=n(["\n margin-right: 15px;\n"],["\n margin-right: 15px;\n"]))),X=function(n){var o=n.reviewId,s=n.reviewerName,m=n.date,x=n.dateFormat,f=void 0===x?d.DDMMYY:x,g=n.rating,w=n.stars,u=n.title,v=n.description,y=n.images,z=n.reviewVariant,b=n.onClickImage,j=n.helpfulActionText,k=n.helpfulAction,S=n.helpfulCount,M=n.hasTextWhenHelpfulCount0,T=void 0!==M&&M,C=n.seeMoreText,I=void 0===C?"See more":C,L=n.helpfulSuffixText,D=void 0===L?" people found this helpful":L,X=n.locale,Z=Math.random().toString(36).substring(7),$=r(v.length>168),nn=$[0],en=$[1],tn=r(v.length>500),on=tn[0],rn=tn[1];return l((function(){var n=document.querySelectorAll("#see-more-".concat(Z)),i=function(){en(!1),rn(!1)};return n.forEach((function(n){n.addEventListener("click",i)})),function(){n.forEach((function(n){n.removeEventListener("click",i)}))}}),[Z]),e(E,{children:[e(_,{children:[t(Y,{children:s},void 0),t(H,{children:p(m,f,X)},void 0)]},void 0),t(c,{starsNumber:5,rating:g,fill:w.color,size:w.size},void 0),e(A,i({"data-testid":"review-content"},{children:[e(F,{children:[t(q,{children:u},void 0),t(V,{dangerouslySetInnerHTML:{__html:nn?"".concat(v.slice(0,168),'... <a id="see-more-').concat(Z,'" class="see-more">').concat(I,"</a>"):v}},void 0),t(B,{dangerouslySetInnerHTML:{__html:on?"".concat(v.slice(0,500),'... <a id="see-more-').concat(Z,'" class="see-more">').concat(I,"</a>"):v}},void 0),e(O,i({showMoreDesktop:v.length>500},{children:[j&&k&&t(U,{onClick:function(){return k(o)},text:j,size:a.Small},void 0),(S||T&&0===S)&&e(Q,{children:[S,D]},void 0)]}),void 0)]},void 0),e(W,{children:[e(G,{children:[null==y?void 0:y.map((function(n){return t(K,i({onClick:function(){return null==b?void 0:b(n.src)}},{children:t(h,{src:n.src,alt:n.alt,height:"10rem",width:"7.5rem"},void 0)}),n.src)})),!y||0===y.length&&t(J,{},void 0)]},void 0),t(N,{children:z},void 0)]},void 0)]}),void 0),t(R,{},void 0),e(P,{children:[j&&k&&t(U,{onClick:function(){return k(o)},text:j,size:a.Small},void 0),(S||T&&0===S)&&e(Q,{children:[S,D]},void 0)]},void 0)]},void 0)};export{X as default};
2
2
  //# sourceMappingURL=Review.js.map
@@ -1,2 +1,2 @@
1
- var c=["January","February","March","April","May","June","July","August","September","October","November","December"],M={DDMMYY:"DDMMYY",MMDDYY:"MMDDYY",YYMMDD:"YYMMDD",MMMMDDYY:"MMMMDDYY"},t=function(c){return c<10?"0".concat(c):String(c)};function n(n,a){var e=n.getDate(),D=n.getMonth()+1,Y=n.getFullYear(),r=t(e),o=t(D);switch(null!=a?a:M.DDMMYY){case M.MMMMDDYY:return"".concat(c[D-1]," ").concat(e,", ").concat(Y);case M.MMDDYY:return"".concat(o,"/").concat(r,"/").concat(Y);case M.YYMMDD:return"".concat(Y,"/").concat(o,"/").concat(r);default:return"".concat(r,"/").concat(o,"/").concat(Y)}}export{M as DateFormat,n as formatDate};
1
+ var c=["January","February","March","April","May","June","July","August","September","October","November","December"],t={DDMMYY:"DDMMYY",MMDDYY:"MMDDYY",YYMMDD:"YYMMDD",MMMMDDYY:"MMMMDDYY"},M=function(c){return c<10?"0".concat(c):String(c)};function n(n,e,a){var r=n.getDate(),D=n.getMonth()+1,Y=n.getFullYear(),o=M(r),u=M(D);switch(null!=e?e:t.DDMMYY){case t.MMMMDDYY:return a?n.toLocaleDateString(a,{year:"numeric",month:"long",day:"numeric"}):"".concat(c[D-1]," ").concat(r,", ").concat(Y);case t.MMDDYY:return"".concat(u,"/").concat(o,"/").concat(Y);case t.YYMMDD:return"".concat(Y,"/").concat(u,"/").concat(o);default:return"".concat(o,"/").concat(u,"/").concat(Y)}}export{t as DateFormat,n as formatDate};
2
2
  //# sourceMappingURL=dateFormatter.js.map
package/build/index.d.ts CHANGED
@@ -2675,6 +2675,7 @@ interface CheckboxProps {
2675
2675
  backgroundColor?: string;
2676
2676
  backgroundImage?: string;
2677
2677
  variant: 'primary' | 'secondary' | 'color';
2678
+ hasHightligthBorder?: boolean;
2678
2679
  }
2679
2680
  declare const Checkbox: react__default.FC<CheckboxProps>;
2680
2681
 
@@ -3812,7 +3813,7 @@ declare const DateFormat: {
3812
3813
  readonly MMMMDDYY: "MMMMDDYY";
3813
3814
  };
3814
3815
  declare type DateFormatType = typeof DateFormat[keyof typeof DateFormat];
3815
- declare function formatDate(date: Date, format?: DateFormatType): string;
3816
+ declare function formatDate(date: Date, format?: DateFormatType, locale?: string): string;
3816
3817
 
3817
3818
  interface ReviewProps$1 {
3818
3819
  reviewId: string;
@@ -3865,8 +3866,11 @@ interface ReviewProps {
3865
3866
  helpfulAction?: (id: string) => void;
3866
3867
  helpfulCount?: number;
3867
3868
  hasTextWhenHelpfulCount0?: boolean;
3869
+ seeMoreText?: string;
3870
+ helpfulSuffixText?: string;
3871
+ locale?: string;
3868
3872
  }
3869
- declare const Review: ({ reviewId, reviewerName, date, dateFormat, rating, stars, title, description, images, reviewVariant, onClickImage, helpfulActionText, helpfulAction, helpfulCount, hasTextWhenHelpfulCount0, }: ReviewProps) => JSX.Element;
3873
+ declare const Review: ({ reviewId, reviewerName, date, dateFormat, rating, stars, title, description, images, reviewVariant, onClickImage, helpfulActionText, helpfulAction, helpfulCount, hasTextWhenHelpfulCount0, seeMoreText, helpfulSuffixText, locale, }: ReviewProps) => JSX.Element;
3870
3874
 
3871
3875
  interface ReviewsHeaderProps {
3872
3876
  title?: string;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("@emotion/styled"),o=require("../../core/theme/Theme.js"),i=require("../../types/enums.js"),r=require("../icons/index.js"),c=require("../shared/label/label.js"),a=require("./styles.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d,l,u=s(n),h=u.default.div(d||(d=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"]))),b=u.default.div(a.CustomCheckboxStyles.baseStyles,(function(e){return[a.CustomCheckboxStyles[e.size](e.theme),a.CustomCheckboxStyles[e.variant](e.theme,e.isChecked,e.disabled),"\n ".concat(e.backgroundImage?"\n background-image: url(".concat(e.backgroundImage,");\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n "):"","\n ").concat(e.backgroundColor?"background-color: ".concat(e.backgroundColor,";"):"","\n ").concat("White"===e.text||"Beige"===e.text||"Latte"===e.text||"Sand"===e.text?"\n svg {\n path {\n fill: var(--colors-shades-black-color);\n }\n }":"","\n ").concat("White"===e.text?"border: 0.27px var(--colors-shades-300-color) solid;":"")]})),g=u.default.input(l||(l=e.__makeTemplateObject(["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ",";\n"],["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ",";\n"])),(function(e){return e.disabled?"not-allowed":"pointer"}));exports.Checkbox=function(n){var a=n.disabled,s=void 0!==a&&a,d=n.onChange,l=n.size,u=void 0===l?i.ComponentSize.Medium:l,k=n.sizeLabel,m=void 0===k?i.ComponentSize.Medium:k,x=n.colorLabel,p=n.text,v=n.checked,f=void 0!==v&&v,C=n.id,j=n.variant,y=n.blockUncheck,_=n.backgroundColor,q=n.backgroundImage,z=o.useTheme();return t.jsxs(h,{children:[t.jsx(g,{type:"checkbox",checked:f,disabled:s,onChange:function(e){s||!1===e.target.checked&&y?e.preventDefault():d(e.target.checked)},id:C},void 0),t.jsx(b,e.__assign({theme:z,size:u,disabled:s,isChecked:f,"data-testid":"checkbox",variant:j,backgroundColor:_,backgroundImage:q,text:p},{children:f&&t.jsx(r.Icon.Actions.Check,{fill:"White"===p?z.colors.shades.black.color:z.colors.shades.white.color},void 0)}),void 0),t.jsx(c,e.__assign({"data-testid":"checkbox-text",size:m,style:{color:x||z.colors.shades[700].color},variant:f?"demi":"regular",htmlFor:C,disabled:s},{children:p}),void 0)]},void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("@emotion/styled"),o=require("../../core/theme/Theme.js"),i=require("../../types/enums.js"),r=require("../icons/index.js"),a=require("../shared/label/label.js"),c=require("./styles.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d,l,u=s(t),h=u.default.div(d||(d=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"]))),b=function(e,n){if(!e&&!n)return!1;var t=(null==e?void 0:e.toLowerCase().trim())||"",o=(null==n?void 0:n.toLowerCase().trim())||"";return t.includes("white")||"#fff"===t||"#ffffff"===t||"white"===t||"#daa070"===t||"#f1cb75"===t||t.includes("beige")||t.includes("latte")||t.includes("sand")||("white"===o||"beige"===o||"latte"===o||"sand"===o)},g=u.default.div(c.CustomCheckboxStyles.baseStyles,(function(e){var n,t=e.backgroundImage?"\n background-image: url(".concat(e.backgroundImage,");\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n "):"",o=e.backgroundColor?"background-color: ".concat(e.backgroundColor,";"):"",i=b(null===(n=e.backgroundColor)||void 0===n?void 0:n.toString(),e.text)?"\n svg {\n path {\n fill: var(--colors-shades-black-color);\n }\n }":"",r=e.hasHightligthBorder?"border: 0.27px var(--colors-shades-300-color) solid;":"";return[c.CustomCheckboxStyles[e.size](e.theme),c.CustomCheckboxStyles[e.variant](e.theme,e.isChecked,e.disabled),"\n ".concat(t,"\n ").concat(o,"\n ").concat(i,"\n ").concat(r)]})),k=u.default.input(l||(l=e.__makeTemplateObject(["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ",";\n"],["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ",";\n"])),(function(e){return e.disabled?"not-allowed":"pointer"}));exports.Checkbox=function(t){var c=t.disabled,s=void 0!==c&&c,d=t.onChange,l=t.size,u=void 0===l?i.ComponentSize.Medium:l,f=t.sizeLabel,m=void 0===f?i.ComponentSize.Medium:f,v=t.colorLabel,p=t.text,x=t.checked,C=void 0!==x&&x,j=t.id,y=t.variant,w=t.blockUncheck,_=t.backgroundColor,q=t.backgroundImage,z=t.hasHightligthBorder,S=void 0!==z&&z,I=o.useTheme();return n.jsxs(h,{children:[n.jsx(k,{type:"checkbox",checked:C,disabled:s,onChange:function(e){s||!1===e.target.checked&&w?e.preventDefault():d(e.target.checked)},id:j},void 0),n.jsx(g,e.__assign({theme:I,size:u,disabled:s,isChecked:C,"data-testid":"checkbox",variant:y,backgroundColor:_,backgroundImage:q,text:p,hasHightligthBorder:S},{children:C&&n.jsx(r.Icon.Actions.Check,{fill:b(_,p)?I.colors.shades.black.color:I.colors.shades.white.color},void 0)}),void 0),n.jsx(a,e.__assign({"data-testid":"checkbox-text",size:m,style:{color:v||I.colors.shades[700].color},variant:C?"demi":"regular",htmlFor:j,disabled:s},{children:p}),void 0)]},void 0)};
2
2
  //# sourceMappingURL=Checkbox.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("../../core/theme/Theme.js"),c=require("../../types/enums.js");require("../../utils/constants/offerAtCart.js"),require("../../utils/media.js"),require("../../utils/mock-content/CancellationFlowAccordion.js");var o=require("../../utils/simulateClick/simulateClick.js"),l=require("../checkbox/Checkbox.js");require("@emotion/react/jsx-runtime"),require("../cta/styled.js");var r=require("../cta/secondary/ButtonSecondary.js"),s=require("../icons/index.js"),a=require("../selector/simple/SelectorSecondary.js"),d=require("./Accordion.js"),u=require("./FiltersStyled.js"),h=require("./Tags/Tags.js"),x=function(e){var i=e.sectionIndex,o=e.text,r=e.itemIndex,s=e.onChange,a=e.checked,d=e.blockUncheck,u=t.useCallback((function(e){s({sectionIndex:i,itemIndex:r,checked:e})}),[s,i,r]);return n.jsx(l.Checkbox,{onChange:u,checked:a,text:o,id:"filter[".concat(i,",").concat(r,"]"),size:c.ComponentSize.Small,variant:"secondary",blockUncheck:d},r)},k=function(e){var i=e.sectionIndex,o=e.text,r=e.itemIndex,s=e.onChange,a=e.checked,d=e.blockUncheck,u=e.color,h=e.backgroundImage,x=t.useCallback((function(e){s({sectionIndex:i,itemIndex:r,checked:e})}),[s,i,r]);return n.jsx(l.Checkbox,{onChange:x,checked:a,text:o,id:"filter[".concat(i,",").concat(r,"]"),size:c.ComponentSize.Medium,variant:"color",blockUncheck:d,backgroundColor:u,backgroundImage:h},r)};exports.Filters=function(l){var f=l.values,b=l.onChange,m=l.tagsColor,g=void 0===m?"#fff6ef":m,v=l.filterByText,I=l.clearAllText,_=l.isMobile,j=l.filtersSelectText,C=l.showSelectedNumberInSection,p=void 0!==C&&C,y=l.applyText,M=l.mobileApplyButtonClick,q=l.mobileBackArrowClick,A=l.onResetValues,T=i.useTheme(),S=t.useState(f),w=S[0],L=S[1],U=t.useState(function(){var e=[];return f.forEach((function(n,t){n.items.forEach((function(n,i){n.checked&&!n.blockUncheck&&e.push({sectionIndex:t,sectionTitle:n.label,itemIndex:i,label:n.label,translatedLabel:n.translatedLabel})}))})),e}()),B=U[0],F=U[1],z=t.useState(),O=z[0],H=z[1];t.useEffect((function(){w.length&&O&&b(w,O)}),[O,w,b]);var E=t.useCallback((function(e){e.forEach((function(e){var n=e.sectionIndex,t=e.itemIndex;D({sectionIndex:n,itemIndex:t})}))}),[]),$=t.useCallback((function(n){var t=n.sectionIndex,i=n.itemIndex,c=n.checked;H({sectionIndex:t,itemIndex:i,checked:c});var o=w[t],l=null==o?void 0:o.items[i];(null==l?void 0:l.isLinkItem)&&(null==l?void 0:l.link)?c&&window.location.assign(l.link):(F((function(n){return o.isMultiselect||n.length>0&&E([]),c?e.__spreadArray(e.__spreadArray([],o.isMultiselect?n:n.filter((function(e){return e.sectionIndex!==t})),!0),[{sectionIndex:t,itemIndex:i,label:w[t].items[i].label,translatedLabel:w[t].items[i].translatedLabel,sectionTitle:w[t].title}],!1):n.filter((function(e){return e.sectionIndex!==t||e.itemIndex!==i}))})),L((function(n){return n.map((function(n,o){return t!==o?n:e.__assign(e.__assign({},n),{items:n.items.map((function(t,o){return e.__assign(e.__assign({},t),{label:t.label,checked:i===o?c:!!n.isMultiselect&&t.checked})}))})}))})))}),[w,E]),D=function(e){var n=e.sectionIndex,t=e.itemIndex,i=document.getElementById("filter[".concat(n,",").concat(t,"]"));o.simulateMouseClick(i)},R=function(){E(B),F([]),L((function(n){return n.map((function(n){return e.__assign(e.__assign({},n),{items:n.items.map((function(n){return e.__assign(e.__assign({},n),{checked:!!n.blockUncheck&&n.checked})}))})}))})),A()};return n.jsxs(n.Fragment,{children:[_?n.jsxs(u.MobileHeader,e.__assign({"data-testid":"MobileHeader"},{children:[n.jsx(u.MobileIconsContainer,e.__assign({onClick:q,"data-testid":"mobileBackArrow"},{children:n.jsx(s.Icon.Arrows.ChevronRightVariant,{fill:T.colors.shades[700].color},void 0)}),void 0),!!B.length&&n.jsxs(u.H4,e.__assign({color:T.colors.shades[700].color},{children:[j," (",B.length,")"]}),void 0)]}),void 0):n.jsx("div",e.__assign({"data-testid":"DesktopHeader"},{children:!!B.length&&n.jsxs(n.Fragment,{children:[n.jsxs(u.Header,{children:[n.jsxs(u.H4,e.__assign({color:T.colors.shades[700].color},{children:[v," (",B.length,")"]}),void 0),n.jsx(u.ClearAll,e.__assign({onClick:R,color:T.colors.shades[700].color,"data-testid":"desktop-clear-all"},{children:I}),void 0)]},void 0),n.jsx(h.Tags,{color:g,items:B.map((function(e){var n=e.translatedLabel||e.label;return"$75 And Above"===n?"+$75":n})),onCloseClick:function(e){return D(B[e])}},void 0)]},void 0)}),void 0),w.filter((function(e){return e.isLinkOption})).map((function(t,i){return n.jsx(u.OptionContainer,e.__assign({showInMobile:t.showInMobile,showInTablet:t.showInTablet,"data-testid":"linkOption"},{children:n.jsx(u.FilterLink,e.__assign({color:t.color||T.colors.shades[550].color,href:t.link},{children:t.translatedTitle||t.title}),void 0)}),"option-container-".concat(i))})),w.filter((function(e){return!e.isLinkOption})).map((function(t){var i=function(e){var n=0,t="";return p&&(t=(n=B.filter((function(n){return n.sectionTitle==e.title})).length)>0&&p?"(".concat(n,")"):""),t}(t);return n.jsx(d.Accordion,e.__assign({title:"".concat(t.translatedTitle||t.title," ").concat(i),isOpenByDefault:t.isOpenByDefault,showInMobile:t.showInMobile},{children:n.jsxs(u.SectionContent,e.__assign({cols:t.columns},{children:["size"===t.type&&t.items.map((function(e,i){var o=w.findIndex((function(e){return e.title===t.title}));return n.jsx(a,{size:c.ComponentSize.Medium,text:e.translatedLabel||e.label,active:e.checked,disabled:e.blockUncheck,onClick:function(){return $({sectionIndex:o,itemIndex:i,checked:!e.checked})},width:"50px",id:"filter[".concat(o,",").concat(i,"]")},e.label)})),"color"===t.type&&t.items.map((function(e,i){var c;return n.jsx(k,{onChange:$,text:e.translatedLabel||e.label,checked:e.checked,itemIndex:i,sectionIndex:w.findIndex((function(e){return e.title===t.title})),blockUncheck:e.blockUncheck,color:null!==(c=e.value)&&void 0!==c?c:"",backgroundImage:e.backgroundImage},"".concat(e.checked,"-").concat(e.label))})),!t.type&&t.items.map((function(e,i){return n.jsx(x,{onChange:$,text:e.translatedLabel||("$75 And Above"===e.label?"+$75":e.label),checked:e.checked,itemIndex:i,sectionIndex:w.findIndex((function(e){return e.title===t.title})),blockUncheck:e.blockUncheck},"".concat(e.checked,"-").concat(e.label))}))]}),void 0)}),w.findIndex((function(e){return e.title===t.title})))})),_&&n.jsxs(u.MobileFooter,e.__assign({"data-testid":"MobileFooter"},{children:[n.jsxs(u.MobileClearContainer,e.__assign({onClick:R},{children:[n.jsx(u.MobileIconsContainer,{children:n.jsx(s.Icon.Actions.Trash,{fill:T.colors.shades[700].color},void 0)},void 0),n.jsx(u.ClearAll,e.__assign({color:T.colors.shades[700].color},{children:I}),void 0)]}),void 0),n.jsx(r,{text:y,onClick:M},void 0)]}),void 0)]},void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("../../core/theme/Theme.js"),o=require("../../types/enums.js");require("../../utils/constants/offerAtCart.js"),require("../../utils/media.js"),require("../../utils/mock-content/CancellationFlowAccordion.js");var c=require("../../utils/simulateClick/simulateClick.js"),r=require("../checkbox/Checkbox.js");require("@emotion/react/jsx-runtime"),require("../cta/styled.js");var l=require("../cta/secondary/ButtonSecondary.js"),s=require("../icons/index.js"),a=require("../selector/simple/SelectorSecondary.js"),d=require("./Accordion.js"),u=require("./FiltersStyled.js"),h=require("./Tags/Tags.js"),x=function(e){var i=e.sectionIndex,c=e.text,l=e.itemIndex,s=e.onChange,a=e.checked,d=e.blockUncheck,u=t.useCallback((function(e){s({sectionIndex:i,itemIndex:l,checked:e})}),[s,i,l]);return n.jsx(r.Checkbox,{onChange:u,checked:a,text:c,id:"filter[".concat(i,",").concat(l,"]"),size:o.ComponentSize.Small,variant:"secondary",blockUncheck:d},l)},f=function(e){var i=e.sectionIndex,c=e.text,l=e.itemIndex,s=e.onChange,a=e.checked,d=e.blockUncheck,u=e.color,h=e.backgroundImage,x=t.useCallback((function(e){s({sectionIndex:i,itemIndex:l,checked:e})}),[s,i,l]),f=function(e){if(!e)return!1;var n=e.toLowerCase().trim();return n.includes("white")||"#fff"===n||"#ffffff"===n||"white"===n}(u);return n.jsx(r.Checkbox,{onChange:x,checked:a,text:c,id:"filter[".concat(i,",").concat(l,"]"),size:o.ComponentSize.Medium,variant:"color",blockUncheck:d,backgroundColor:u,backgroundImage:h,hasHightligthBorder:f},l)};exports.Filters=function(r){var k=r.values,m=r.onChange,b=r.tagsColor,g=void 0===b?"#fff6ef":b,v=r.filterByText,I=r.clearAllText,_=r.isMobile,j=r.filtersSelectText,C=r.showSelectedNumberInSection,p=void 0!==C&&C,y=r.applyText,M=r.mobileApplyButtonClick,q=r.mobileBackArrowClick,A=r.onResetValues,w=i.useTheme(),T=t.useState(k),S=T[0],L=T[1],U=t.useState(function(){var e=[];return k.forEach((function(n,t){n.items.forEach((function(n,i){n.checked&&!n.blockUncheck&&e.push({sectionIndex:t,sectionTitle:n.label,itemIndex:i,label:n.label,translatedLabel:n.translatedLabel})}))})),e}()),B=U[0],F=U[1],z=t.useState(),H=z[0],O=z[1];t.useEffect((function(){S.length&&H&&m(S,H)}),[H,S,m]);var E=t.useCallback((function(e){e.forEach((function(e){var n=e.sectionIndex,t=e.itemIndex;D({sectionIndex:n,itemIndex:t})}))}),[]),$=t.useCallback((function(n){var t=n.sectionIndex,i=n.itemIndex,o=n.checked;O({sectionIndex:t,itemIndex:i,checked:o});var c=S[t],r=null==c?void 0:c.items[i];(null==r?void 0:r.isLinkItem)&&(null==r?void 0:r.link)?o&&window.location.assign(r.link):(F((function(n){return c.isMultiselect||n.length>0&&E([]),o?e.__spreadArray(e.__spreadArray([],c.isMultiselect?n:n.filter((function(e){return e.sectionIndex!==t})),!0),[{sectionIndex:t,itemIndex:i,label:S[t].items[i].label,translatedLabel:S[t].items[i].translatedLabel,sectionTitle:S[t].title}],!1):n.filter((function(e){return e.sectionIndex!==t||e.itemIndex!==i}))})),L((function(n){return n.map((function(n,c){return t!==c?n:e.__assign(e.__assign({},n),{items:n.items.map((function(t,c){return e.__assign(e.__assign({},t),{label:t.label,checked:i===c?o:!!n.isMultiselect&&t.checked})}))})}))})))}),[S,E]),D=function(e){var n=e.sectionIndex,t=e.itemIndex,i=document.getElementById("filter[".concat(n,",").concat(t,"]"));c.simulateMouseClick(i)},R=function(){E(B),F([]),L((function(n){return n.map((function(n){return e.__assign(e.__assign({},n),{items:n.items.map((function(n){return e.__assign(e.__assign({},n),{checked:!!n.blockUncheck&&n.checked})}))})}))})),A()};return n.jsxs(n.Fragment,{children:[_?n.jsxs(u.MobileHeader,e.__assign({"data-testid":"MobileHeader"},{children:[n.jsx(u.MobileIconsContainer,e.__assign({onClick:q,"data-testid":"mobileBackArrow"},{children:n.jsx(s.Icon.Arrows.ChevronRightVariant,{fill:w.colors.shades[700].color},void 0)}),void 0),!!B.length&&n.jsxs(u.H4,e.__assign({color:w.colors.shades[700].color},{children:[j," (",B.length,")"]}),void 0)]}),void 0):n.jsx("div",e.__assign({"data-testid":"DesktopHeader"},{children:!!B.length&&n.jsxs(n.Fragment,{children:[n.jsxs(u.Header,{children:[n.jsxs(u.H4,e.__assign({color:w.colors.shades[700].color},{children:[v," (",B.length,")"]}),void 0),n.jsx(u.ClearAll,e.__assign({onClick:R,color:w.colors.shades[700].color,"data-testid":"desktop-clear-all"},{children:I}),void 0)]},void 0),n.jsx(h.Tags,{color:g,items:B.map((function(e){var n=e.translatedLabel||e.label;return"$75 And Above"===n?"+$75":n})),onCloseClick:function(e){return D(B[e])}},void 0)]},void 0)}),void 0),S.filter((function(e){return e.isLinkOption})).map((function(t,i){return n.jsx(u.OptionContainer,e.__assign({showInMobile:t.showInMobile,showInTablet:t.showInTablet,"data-testid":"linkOption"},{children:n.jsx(u.FilterLink,e.__assign({color:t.color||w.colors.shades[550].color,href:t.link},{children:t.translatedTitle||t.title}),void 0)}),"option-container-".concat(i))})),S.filter((function(e){return!e.isLinkOption})).map((function(t){var i=function(e){var n=0,t="";return p&&(t=(n=B.filter((function(n){return n.sectionTitle==e.title})).length)>0&&p?"(".concat(n,")"):""),t}(t);return n.jsx(d.Accordion,e.__assign({title:"".concat(t.translatedTitle||t.title," ").concat(i),isOpenByDefault:t.isOpenByDefault,showInMobile:t.showInMobile},{children:n.jsxs(u.SectionContent,e.__assign({cols:t.columns},{children:["size"===t.type&&t.items.map((function(e,i){var c=S.findIndex((function(e){return e.title===t.title}));return n.jsx(a,{size:o.ComponentSize.Medium,text:e.translatedLabel||e.label,active:e.checked,disabled:e.blockUncheck,onClick:function(){return $({sectionIndex:c,itemIndex:i,checked:!e.checked})},width:"50px",id:"filter[".concat(c,",").concat(i,"]")},e.label)})),"color"===t.type&&t.items.map((function(e,i){var o;return n.jsx(f,{onChange:$,text:e.translatedLabel||e.label,checked:e.checked,itemIndex:i,sectionIndex:S.findIndex((function(e){return e.title===t.title})),blockUncheck:e.blockUncheck,color:null!==(o=e.value)&&void 0!==o?o:"",backgroundImage:e.backgroundImage},"".concat(e.checked,"-").concat(e.label))})),!t.type&&t.items.map((function(e,i){return n.jsx(x,{onChange:$,text:e.translatedLabel||("$75 And Above"===e.label?"+$75":e.label),checked:e.checked,itemIndex:i,sectionIndex:S.findIndex((function(e){return e.title===t.title})),blockUncheck:e.blockUncheck},"".concat(e.checked,"-").concat(e.label))}))]}),void 0)}),S.findIndex((function(e){return e.title===t.title})))})),_&&n.jsxs(u.MobileFooter,e.__assign({"data-testid":"MobileFooter"},{children:[n.jsxs(u.MobileClearContainer,e.__assign({onClick:R},{children:[n.jsx(u.MobileIconsContainer,{children:n.jsx(s.Icon.Actions.Trash,{fill:w.colors.shades[700].color},void 0)},void 0),n.jsx(u.ClearAll,e.__assign({color:w.colors.shades[700].color},{children:I}),void 0)]}),void 0),n.jsx(l,{text:y,onClick:M},void 0)]}),void 0)]},void 0)};
2
2
  //# sourceMappingURL=Filters.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react");require("../../../core/theme/Theme.js"),require("../../../types/enums.js"),require("../../pricing/clubOffer/ClubOfferTag.js"),require("../../pricing/discount/styled.js"),require("../../pricing/styles.js"),require("../../tooltip/Styled.js"),require("../../atoms/PriceLabel/PriceLabel.js"),require("../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../../atoms/HorizontalDivider/HorizontalDivider.js");var i=require("../../atoms/Icon/Icon.js");require("../../atoms/Image/styled.js"),require("../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../atoms/Toggle/toggle.styled.js");var n=require("./components/ProgressBar.js"),o=require("./styled.js");exports.Video=function(s){var u,a,c=s.source,d=s.thumbnail,l=s.height,f=s.className,m=s.withProgressBar,v=void 0===m||m,j=s.hasAudioControl,h=s.muted,g=s.onLoadedData,p=s.autoPlay,y=s.isActive,q=void 0===y||y,P=e.__rest(s,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData","autoPlay","isActive"]),b=t.useRef(null),x=t.useState(!0),_=x[0],C=x[1],L=t.useState(!1),I=L[0],A=L[1],S=t.useState(h),T=S[0],k=S[1],B=t.useState(0),D=B[0],M=B[1],N=t.useState(!1),w=N[0],V=N[1],E=t.useState(!1),H=E[0],O=E[1],z=D>0,F=(null===(u=b.current)||void 0===u?void 0:u.duration)?D/b.current.duration:0,R=D===(null===(a=null==b?void 0:b.current)||void 0===a?void 0:a.duration)||0===D,U=p?void 0:d;t.useEffect((function(){var e=b.current;if(e)if(q&&p){e.muted=!0,k(!0);var r=e.play();void 0!==r&&r.then((function(){A(!0)})).catch((function(e){"NotAllowedError"===e.name&&O(!0)}))}else e.pause(),A(!1)}),[q,p]);return r.jsxs(o.Container,e.__assign({className:f},{children:[!_&&v&&r.jsx(n.ProgressBar,{progress:F,hide:R},void 0),I?r.jsx(o.PauseContainer,{"data-testid":"pause",onClick:function(){b.current&&I&&(b.current.pause(),A(!1))}},void 0):r.jsx(o.PlayContainer,e.__assign({"data-testid":"play",onClick:function(){b.current&&!w&&(V(!0),b.current.play().then((function(){A(!0)})).catch((function(e){"NotAllowedError"===e.name&&O(!0)})).finally((function(){return V(!1)})))}},{children:z&&r.jsx(o.PlayIcon,{},void 0)}),void 0),j&&r.jsxs(o.MuteButton,e.__assign({onClick:function(){b.current&&k((function(e){return!e}))}},{children:[T&&r.jsx(i.Icon,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!T&&r.jsx(i.Icon,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),r.jsxs(o.HTMLVideo,e.__assign({},P,{muted:T,"data-testid":"video",poster:U,playsInline:!0,controls:H,ref:b,onTimeUpdate:function(){if(b.current){var e=b.current.currentTime;requestAnimationFrame((function(){return M(e)}))}},onCanPlay:function(){return C(!1)},onLoadedData:function(e){g&&g(e),C(!1)},onPause:function(){return A(!1)},onPlaying:function(){return A(!0)},height:l||"auto"},{children:[r.jsx("track",{kind:"captions"},void 0),r.jsx("source",{src:c},void 0)]}),void 0)]}),void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react"),t=require("react/jsx-runtime");require("../../../core/theme/Theme.js"),require("../../../types/enums.js"),require("../../pricing/clubOffer/ClubOfferTag.js"),require("../../pricing/discount/styled.js"),require("../../pricing/styles.js"),require("../../tooltip/Styled.js"),require("../../atoms/PriceLabel/PriceLabel.js"),require("../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../../atoms/HorizontalDivider/HorizontalDivider.js");var n=require("../../atoms/Icon/Icon.js");require("../../atoms/Image/styled.js"),require("../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../atoms/Toggle/toggle.styled.js");var o=require("./components/ProgressBar.js"),i=require("./styled.js");exports.Video=function(s){var u,a,c=s.source,d=s.thumbnail,l=s.height,f=s.className,m=s.withProgressBar,v=void 0===m||m,j=s.hasAudioControl,g=s.muted,h=s.onLoadedData,p=s.autoPlay,y=s.isActive,q=void 0===y||y,P=e.__rest(s,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData","autoPlay","isActive"]),b=r.useRef(null),_=r.useState(!0),x=_[0],C=_[1],L=r.useState(!1),I=L[0],A=L[1],S=r.useState(g),k=S[0],T=S[1],B=r.useState(0),D=B[0],E=B[1],M=r.useState(!1),N=M[0],w=M[1],V=r.useState(!1),H=V[0],O=V[1],z=D>0,F=(null===(u=b.current)||void 0===u?void 0:u.duration)?D/b.current.duration:0,R=D===(null===(a=null==b?void 0:b.current)||void 0===a?void 0:a.duration)||0===D,U=p?void 0:d;r.useEffect((function(){var e=b.current;e&&e.load()}),[c,U]),r.useEffect((function(){var e=b.current;if(e)if(q&&p){e.muted=!0,T(!0);var r=e.play();void 0!==r&&r.then((function(){A(!0)})).catch((function(e){"NotAllowedError"===e.name&&O(!0)}))}else e.pause(),A(!1)}),[q,p]);return t.jsxs(i.Container,e.__assign({className:f},{children:[!x&&v&&t.jsx(o.ProgressBar,{progress:F,hide:R},void 0),I?t.jsx(i.PauseContainer,{"data-testid":"pause",onClick:function(){b.current&&I&&(b.current.pause(),A(!1))}},void 0):t.jsx(i.PlayContainer,e.__assign({"data-testid":"play",onClick:function(){b.current&&!N&&(w(!0),b.current.play().then((function(){A(!0)})).catch((function(e){"NotAllowedError"===e.name&&O(!0)})).finally((function(){return w(!1)})))}},{children:z&&t.jsx(i.PlayIcon,{},void 0)}),void 0),j&&t.jsxs(i.MuteButton,e.__assign({onClick:function(){b.current&&T((function(e){return!e}))}},{children:[k&&t.jsx(n.Icon,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!k&&t.jsx(n.Icon,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),r.createElement(i.HTMLVideo,e.__assign({},P,{key:"".concat(c,"-").concat(U||"no-poster"),muted:k,"data-testid":"video",poster:U,playsInline:!0,controls:H,ref:b,onTimeUpdate:function(){if(b.current){var e=b.current.currentTime;requestAnimationFrame((function(){return E(e)}))}},onCanPlay:function(){return C(!1)},onLoadedData:function(e){h&&h(e),C(!1)},onPause:function(){return A(!1)},onPlaying:function(){return A(!0)},height:l||"auto"}),t.jsx("track",{kind:"captions"},void 0),t.jsx("source",{src:c},void 0))]}),void 0)};
2
2
  //# sourceMappingURL=Video.js.map
@@ -1,2 +1,2 @@
1
- "use strict";var n=require("tslib"),e=require("react/jsx-runtime"),i=require("@emotion/styled"),t=require("react"),o=require("../../types/enums.js"),a=require("../../utils/dateFormatter/dateFormatter.js"),l=require("../atoms/Image/Image.js");require("@emotion/react/jsx-runtime"),require("../../core/theme/Theme.js"),require("../cta/styled.js");var r=require("../cta/secondary/ButtonSecondary.js"),s=require("../rating/starList/StarList.js");function d(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var p,m,c,h,x,f,u,g,w,v,j,_,y,b,z,k,T,O,S,q=d(i),C=q.default.div(p||(p=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"],["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"]))),I=q.default.div(m||(m=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n font-size: 14px;\n line-height: 22px;\n text-align: right;\n margin-bottom: 10px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n font-size: 14px;\n line-height: 22px;\n text-align: right;\n margin-bottom: 10px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),L=q.default.div(c||(c=n.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n"],["\n display: flex;\n justify-content: space-between;\n"]))),M=q.default.div(h||(h=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"]))),D=q.default.span(x||(x=n.__makeTemplateObject(["\n font-weight: 400;\n font-size: 12px;\n line-height: 16px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-weight: 400;\n font-size: 12px;\n line-height: 16px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),E=q.default.div(f||(f=n.__makeTemplateObject(["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),F=q.default.h2(u||(u=n.__makeTemplateObject(["\n font-weight: 600;\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n line-height: 28px;\n }\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n line-height: 28px;\n }\n"]))),A=q.default.h3(g||(g=n.__makeTemplateObject(["\n font-size: 14px;\n line-height: 22px;\n margin: 10px 0 8px;\n font-weight: 600;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-size: 14px;\n line-height: 22px;\n margin: 10px 0 8px;\n font-weight: 600;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),H=q.default.div(w||(w=n.__makeTemplateObject(["\n display: none;\n\n @media (min-width: 768px) {\n display: block;\n font-weight: normal;\n font-size: 16px;\n line-height: 24px;\n margin: 0;\n white-space: pre-wrap;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n }\n"],["\n display: none;\n\n @media (min-width: 768px) {\n display: block;\n font-weight: normal;\n font-size: 16px;\n line-height: 24px;\n margin: 0;\n white-space: pre-wrap;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n }\n"]))),N=q.default.div(v||(v=n.__makeTemplateObject(["\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n margin: 0;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n\n @media (min-width: 768px) {\n display: none;\n }\n"],["\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n margin: 0;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n\n @media (min-width: 768px) {\n display: none;\n }\n"]))),Y=q.default.div(j||(j=n.__makeTemplateObject(["\n margin-left: 10px;\n text-align: right;\n"],["\n margin-left: 10px;\n text-align: right;\n"]))),B=q.default.div(_||(_=n.__makeTemplateObject(["\n display: flex;\n justify-content: end;\n"],["\n display: flex;\n justify-content: end;\n"]))),V=q.default.div(y||(y=n.__makeTemplateObject(["\n width: 7.5rem;\n height: 4.125rem;\n"],["\n width: 7.5rem;\n height: 4.125rem;\n"]))),W=q.default.div(b||(b=n.__makeTemplateObject(["\n cursor: zoom-in;\n display: none;\n margin-right: 4px;\n\n &:first-child {\n display: inline-block;\n }\n\n & img {\n object-fit: cover;\n }\n\n @media (min-width: 1024px) {\n display: inline-block;\n }\n"],["\n cursor: zoom-in;\n display: none;\n margin-right: 4px;\n\n &:first-child {\n display: inline-block;\n }\n\n & img {\n object-fit: cover;\n }\n\n @media (min-width: 1024px) {\n display: inline-block;\n }\n"]))),G=q.default.div(z||(z=n.__makeTemplateObject(["\n display: flex;\n margin-top: ",";\n\n @media (max-width: 768px) {\n display: none;\n }\n"],["\n display: flex;\n margin-top: ",";\n\n @media (max-width: 768px) {\n display: none;\n }\n"])),(function(n){return n.showMoreDesktop?"12px":"50px"})),J=q.default.div(k||(k=n.__makeTemplateObject(["\n display: none;\n\n @media (max-width: 768px) {\n margin-top: 10px;\n display: flex;\n }\n"],["\n display: none;\n\n @media (max-width: 768px) {\n margin-top: 10px;\n display: flex;\n }\n"]))),K=q.default.div(T||(T=n.__makeTemplateObject(["\n font-size: 14px;\n line-height: 34px;\n font-weight: 600;\n color: #d4605b;\n"],["\n font-size: 14px;\n line-height: 34px;\n font-weight: 600;\n color: #d4605b;\n"]))),P=q.default.i(O||(O=n.__makeTemplateObject(["\n content: '\f164';\n"],["\n content: '\\f164';\n"]))),Q=q.default(r)(S||(S=n.__makeTemplateObject(["\n margin-right: 15px;\n"],["\n margin-right: 15px;\n"])));module.exports=function(i){var r=i.reviewId,d=i.reviewerName,p=i.date,m=i.dateFormat,c=void 0===m?a.DateFormat.DDMMYY:m,h=i.rating,x=i.stars,f=i.title,u=i.description,g=i.images,w=i.reviewVariant,v=i.onClickImage,j=i.helpfulActionText,_=i.helpfulAction,y=i.helpfulCount,b=i.hasTextWhenHelpfulCount0,z=void 0!==b&&b,k=Math.random().toString(36).substring(7),T=t.useState(u.length>168),O=T[0],S=T[1],q=t.useState(u.length>500),R=q[0],U=q[1];return t.useEffect((function(){var n=document.querySelectorAll("#see-more-".concat(k)),e=function(){S(!1),U(!1)};return n.forEach((function(n){n.addEventListener("click",e)})),function(){n.forEach((function(n){n.removeEventListener("click",e)}))}}),[k]),e.jsxs(C,{children:[e.jsxs(I,{children:[e.jsx(F,{children:d},void 0),e.jsx(D,{children:a.formatDate(p,c)},void 0)]},void 0),e.jsx(s.StarList,{starsNumber:5,rating:h,fill:x.color,size:x.size},void 0),e.jsxs(L,n.__assign({"data-testid":"review-content"},{children:[e.jsxs(M,{children:[e.jsx(A,{children:f},void 0),e.jsx(N,{dangerouslySetInnerHTML:{__html:O?"".concat(u.slice(0,168),'... <a id="see-more-').concat(k,'" class="see-more">See more</a>'):u}},void 0),e.jsx(H,{dangerouslySetInnerHTML:{__html:R?"".concat(u.slice(0,500),'... <a id="see-more-').concat(k,'" class="see-more">See more</a>'):u}},void 0),e.jsxs(G,n.__assign({showMoreDesktop:u.length>500},{children:[j&&_&&e.jsx(Q,{onClick:function(){return _(r)},text:j,size:o.ComponentSize.Small},void 0),(y||z&&0===y)&&e.jsxs(K,{children:[y," people found this helpful"]},void 0)]}),void 0)]},void 0),e.jsxs(Y,{children:[e.jsxs(B,{children:[null==g?void 0:g.map((function(i){return e.jsx(W,n.__assign({onClick:function(){return null==v?void 0:v(i.src)}},{children:e.jsx(l.Image,{src:i.src,alt:i.alt,height:"10rem",width:"7.5rem"},void 0)}),i.src)})),!g||0===g.length&&e.jsx(V,{},void 0)]},void 0),e.jsx(E,{children:w},void 0)]},void 0)]}),void 0),e.jsx(P,{},void 0),e.jsxs(J,{children:[j&&_&&e.jsx(Q,{onClick:function(){return _(r)},text:j,size:o.ComponentSize.Small},void 0),(y||z&&0===y)&&e.jsxs(K,{children:[y," people found this helpful"]},void 0)]},void 0)]},void 0)};
1
+ "use strict";var n=require("tslib"),e=require("react/jsx-runtime"),i=require("@emotion/styled"),t=require("react"),o=require("../../types/enums.js"),a=require("../../utils/dateFormatter/dateFormatter.js"),l=require("../atoms/Image/Image.js");require("@emotion/react/jsx-runtime"),require("../../core/theme/Theme.js"),require("../cta/styled.js");var r=require("../cta/secondary/ButtonSecondary.js"),s=require("../rating/starList/StarList.js");function d(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var p,c,m,h,x,f,u,g,w,v,j,_,y,b,z,k,T,O,S,q=d(i),C=q.default.div(p||(p=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"],["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"]))),M=q.default.div(c||(c=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n font-size: 14px;\n line-height: 22px;\n text-align: right;\n margin-bottom: 10px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n font-size: 14px;\n line-height: 22px;\n text-align: right;\n margin-bottom: 10px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),I=q.default.div(m||(m=n.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n"],["\n display: flex;\n justify-content: space-between;\n"]))),L=q.default.div(h||(h=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"]))),D=q.default.span(x||(x=n.__makeTemplateObject(["\n font-weight: 400;\n font-size: 12px;\n line-height: 16px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-weight: 400;\n font-size: 12px;\n line-height: 16px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),E=q.default.div(f||(f=n.__makeTemplateObject(["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),F=q.default.h2(u||(u=n.__makeTemplateObject(["\n font-weight: 600;\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n line-height: 28px;\n }\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n line-height: 28px;\n }\n"]))),A=q.default.h3(g||(g=n.__makeTemplateObject(["\n font-size: 14px;\n line-height: 22px;\n margin: 10px 0 8px;\n font-weight: 600;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"],["\n font-size: 14px;\n line-height: 22px;\n margin: 10px 0 8px;\n font-weight: 600;\n\n @media (min-width: 768px) {\n font-size: 16px;\n line-height: 24px;\n }\n"]))),H=q.default.div(w||(w=n.__makeTemplateObject(["\n display: none;\n\n @media (min-width: 768px) {\n display: block;\n font-weight: normal;\n font-size: 16px;\n line-height: 24px;\n margin: 0;\n white-space: pre-wrap;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n }\n"],["\n display: none;\n\n @media (min-width: 768px) {\n display: block;\n font-weight: normal;\n font-size: 16px;\n line-height: 24px;\n margin: 0;\n white-space: pre-wrap;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n }\n"]))),N=q.default.div(v||(v=n.__makeTemplateObject(["\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n margin: 0;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n\n @media (min-width: 768px) {\n display: none;\n }\n"],["\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n margin: 0;\n\n a.see-more {\n color: var(--colors-semantic-informative-color);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 600;\n white-space: nowrap;\n }\n\n @media (min-width: 768px) {\n display: none;\n }\n"]))),Y=q.default.div(j||(j=n.__makeTemplateObject(["\n margin-left: 10px;\n text-align: right;\n"],["\n margin-left: 10px;\n text-align: right;\n"]))),B=q.default.div(_||(_=n.__makeTemplateObject(["\n display: flex;\n justify-content: end;\n"],["\n display: flex;\n justify-content: end;\n"]))),V=q.default.div(y||(y=n.__makeTemplateObject(["\n width: 7.5rem;\n height: 4.125rem;\n"],["\n width: 7.5rem;\n height: 4.125rem;\n"]))),W=q.default.div(b||(b=n.__makeTemplateObject(["\n cursor: zoom-in;\n display: none;\n margin-right: 4px;\n\n &:first-child {\n display: inline-block;\n }\n\n & img {\n object-fit: cover;\n }\n\n @media (min-width: 1024px) {\n display: inline-block;\n }\n"],["\n cursor: zoom-in;\n display: none;\n margin-right: 4px;\n\n &:first-child {\n display: inline-block;\n }\n\n & img {\n object-fit: cover;\n }\n\n @media (min-width: 1024px) {\n display: inline-block;\n }\n"]))),G=q.default.div(z||(z=n.__makeTemplateObject(["\n display: flex;\n margin-top: ",";\n\n @media (max-width: 768px) {\n display: none;\n }\n"],["\n display: flex;\n margin-top: ",";\n\n @media (max-width: 768px) {\n display: none;\n }\n"])),(function(n){return n.showMoreDesktop?"12px":"50px"})),J=q.default.div(k||(k=n.__makeTemplateObject(["\n display: none;\n\n @media (max-width: 768px) {\n margin-top: 10px;\n display: flex;\n }\n"],["\n display: none;\n\n @media (max-width: 768px) {\n margin-top: 10px;\n display: flex;\n }\n"]))),K=q.default.div(T||(T=n.__makeTemplateObject(["\n font-size: 14px;\n line-height: 34px;\n font-weight: 600;\n color: #d4605b;\n"],["\n font-size: 14px;\n line-height: 34px;\n font-weight: 600;\n color: #d4605b;\n"]))),P=q.default.i(O||(O=n.__makeTemplateObject(["\n content: '\f164';\n"],["\n content: '\\f164';\n"]))),Q=q.default(r)(S||(S=n.__makeTemplateObject(["\n margin-right: 15px;\n"],["\n margin-right: 15px;\n"])));module.exports=function(i){var r=i.reviewId,d=i.reviewerName,p=i.date,c=i.dateFormat,m=void 0===c?a.DateFormat.DDMMYY:c,h=i.rating,x=i.stars,f=i.title,u=i.description,g=i.images,w=i.reviewVariant,v=i.onClickImage,j=i.helpfulActionText,_=i.helpfulAction,y=i.helpfulCount,b=i.hasTextWhenHelpfulCount0,z=void 0!==b&&b,k=i.seeMoreText,T=void 0===k?"See more":k,O=i.helpfulSuffixText,S=void 0===O?" people found this helpful":O,q=i.locale,R=Math.random().toString(36).substring(7),U=t.useState(u.length>168),X=U[0],Z=U[1],$=t.useState(u.length>500),nn=$[0],en=$[1];return t.useEffect((function(){var n=document.querySelectorAll("#see-more-".concat(R)),e=function(){Z(!1),en(!1)};return n.forEach((function(n){n.addEventListener("click",e)})),function(){n.forEach((function(n){n.removeEventListener("click",e)}))}}),[R]),e.jsxs(C,{children:[e.jsxs(M,{children:[e.jsx(F,{children:d},void 0),e.jsx(D,{children:a.formatDate(p,m,q)},void 0)]},void 0),e.jsx(s.StarList,{starsNumber:5,rating:h,fill:x.color,size:x.size},void 0),e.jsxs(I,n.__assign({"data-testid":"review-content"},{children:[e.jsxs(L,{children:[e.jsx(A,{children:f},void 0),e.jsx(N,{dangerouslySetInnerHTML:{__html:X?"".concat(u.slice(0,168),'... <a id="see-more-').concat(R,'" class="see-more">').concat(T,"</a>"):u}},void 0),e.jsx(H,{dangerouslySetInnerHTML:{__html:nn?"".concat(u.slice(0,500),'... <a id="see-more-').concat(R,'" class="see-more">').concat(T,"</a>"):u}},void 0),e.jsxs(G,n.__assign({showMoreDesktop:u.length>500},{children:[j&&_&&e.jsx(Q,{onClick:function(){return _(r)},text:j,size:o.ComponentSize.Small},void 0),(y||z&&0===y)&&e.jsxs(K,{children:[y,S]},void 0)]}),void 0)]},void 0),e.jsxs(Y,{children:[e.jsxs(B,{children:[null==g?void 0:g.map((function(i){return e.jsx(W,n.__assign({onClick:function(){return null==v?void 0:v(i.src)}},{children:e.jsx(l.Image,{src:i.src,alt:i.alt,height:"10rem",width:"7.5rem"},void 0)}),i.src)})),!g||0===g.length&&e.jsx(V,{},void 0)]},void 0),e.jsx(E,{children:w},void 0)]},void 0)]}),void 0),e.jsx(P,{},void 0),e.jsxs(J,{children:[j&&_&&e.jsx(Q,{onClick:function(){return _(r)},text:j,size:o.ComponentSize.Small},void 0),(y||z&&0===y)&&e.jsxs(K,{children:[y,S]},void 0)]},void 0)]},void 0)};
2
2
  //# sourceMappingURL=Review.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=["January","February","March","April","May","June","July","August","September","October","November","December"],e={DDMMYY:"DDMMYY",MMDDYY:"MMDDYY",YYMMDD:"YYMMDD",MMMMDDYY:"MMMMDDYY"},c=function(t){return t<10?"0".concat(t):String(t)};exports.DateFormat=e,exports.formatDate=function(M,a){var r=M.getDate(),n=M.getMonth()+1,D=M.getFullYear(),o=c(r),Y=c(n);switch(null!=a?a:e.DDMMYY){case e.MMMMDDYY:return"".concat(t[n-1]," ").concat(r,", ").concat(D);case e.MMDDYY:return"".concat(Y,"/").concat(o,"/").concat(D);case e.YYMMDD:return"".concat(D,"/").concat(Y,"/").concat(o);default:return"".concat(o,"/").concat(Y,"/").concat(D)}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=["January","February","March","April","May","June","July","August","September","October","November","December"],e={DDMMYY:"DDMMYY",MMDDYY:"MMDDYY",YYMMDD:"YYMMDD",MMMMDDYY:"MMMMDDYY"},c=function(t){return t<10?"0".concat(t):String(t)};exports.DateFormat=e,exports.formatDate=function(a,r,M){var n=a.getDate(),o=a.getMonth()+1,D=a.getFullYear(),Y=c(n),u=c(o);switch(null!=r?r:e.DDMMYY){case e.MMMMDDYY:return M?a.toLocaleDateString(M,{year:"numeric",month:"long",day:"numeric"}):"".concat(t[o-1]," ").concat(n,", ").concat(D);case e.MMDDYY:return"".concat(u,"/").concat(Y,"/").concat(D);case e.YYMMDD:return"".concat(D,"/").concat(u,"/").concat(Y);default:return"".concat(Y,"/").concat(u,"/").concat(D)}};
2
2
  //# sourceMappingURL=dateFormatter.js.map
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Trafilea's Design System",
4
4
  "author": "Trafilea",
5
5
  "repository": "https://github.com/trafilea/afrodita-components",
6
- "version": "7.18.1",
6
+ "version": "7.18.3",
7
7
  "private": false,
8
8
  "main": "build/lib/index.js",
9
9
  "style": "build/es/index.css",