@trafilea/afrodita-components 7.24.2 → 7.24.4

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{__assign as o}from"tslib";import{jsxs as i,jsx as e}from"@emotion/react/jsx-runtime";import"react/jsx-runtime";import"../../core/theme/Theme.js";import"react";import"../../types/enums.js";import"../pricing/clubOffer/ClubOfferTag.js";import"../pricing/discount/styled.js";import"../pricing/styles.js";import{Tooltip as t}from"../tooltip/Tooltip.js";import"../atoms/PriceLabel/PriceLabel.js";import"../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../atoms/HorizontalDivider/HorizontalDivider.js";import{Icon as r}from"../atoms/Icon/Icon.js";import"../atoms/Image/styled.js";import"../atoms/PriceLabelV2/PriceLabelV2.js";import"../atoms/Toggle/toggle.styled.js";import l from"./ColorRadioGroup.js";import{renderOptions as s}from"./SingleColorPicker.js";import{ColorPickerWrapper as n,NumericTooltip as a}from"./styles/ColorPickerwithTootip.styled.js";var m=function(m){var c=m.options,d=void 0===c?[]:c,p=m.selectedValue,v=m.label,u=m.onChange,h=m.inline,g=void 0!==h&&h,j=m.maxVisibleOptions,b=void 0===j?5:j,f=m.showCross,C=m.className,w=m.tooltipOptions,y=d.slice(0,b),L=d.slice(b),P=(null!=w?w:{}).showCloseIcon,I=(null==w?void 0:w.numeric)?null==L?void 0:L.length:0;return i(n,o({className:C,value:p,onChange:u,css:{flexDirection:g?"row":"column",alignItems:g?"center":"start"}},{children:[e(l.Label,{label:v,values:p&&!g?p.label:void 0},void 0),i(l.OptionsContainer,o({css:{marginTop:g?"0":"0.63rem",marginLeft:g?"1.5rem":"0"},"data-testid":"radio-group-options-container"},{children:[s(y,f),!!L.length&&e("div",o({style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:e(t,o({showCloseIcon:P,position:1,elementContent:e("div",o({className:"tooltip-content"},{children:s(L,f)}),void 0),withArrow:!0},{children:(null==w?void 0:w.numeric)?i(a,o({"data-testid":"numeric-tooltip"},{children:["+",I]}),void 0):e("div",o({className:"arrow","data-testid":"tooltip-arrow"},{children:e(r,{name:"arrows/chevron_down",width:1,height:1},void 0)}),void 0)}),void 0)}),void 0)]}),void 0)]}),void 0)};export{m as default};
1
+ import{__assign as o}from"tslib";import{jsxs as i,jsx as e}from"@emotion/react/jsx-runtime";import"react/jsx-runtime";import"../../core/theme/Theme.js";import"react";import"../../types/enums.js";import"../pricing/clubOffer/ClubOfferTag.js";import"../pricing/discount/styled.js";import"../pricing/styles.js";import{Tooltip as t}from"../tooltip/Tooltip.js";import"../atoms/PriceLabel/PriceLabel.js";import"../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../atoms/HorizontalDivider/HorizontalDivider.js";import{Icon as r}from"../atoms/Icon/Icon.js";import"../atoms/Image/styled.js";import"../atoms/PriceLabelV2/PriceLabelV2.js";import"../atoms/Toggle/toggle.styled.js";import l from"./ColorRadioGroup.js";import{renderOptions as s}from"./SingleColorPicker.js";import{ColorPickerWrapper as n,NumericTooltip as a}from"./styles/ColorPickerwithTootip.styled.js";var m=function(m){var d,c=m.options,p=void 0===c?[]:c,v=m.selectedValue,u=m.label,h=m.onChange,b=m.inline,g=void 0!==b&&b,j=m.maxVisibleOptions,f=void 0===j?5:j,C=m.showCross,w=m.className,y=m.tooltipOptions,L=m.translatedLabels,P=p.slice(0,f),I=p.slice(f),x=(null!=y?y:{}).showCloseIcon,T=(null==y?void 0:y.numeric)?null==I?void 0:I.length:0,O=v?null!==(d=null==L?void 0:L[v.label])&&void 0!==d?d:v.label:void 0;return i(n,o({className:w,value:v,onChange:h,css:{flexDirection:g?"row":"column",alignItems:g?"center":"start"}},{children:[e(l.Label,{label:u,values:O&&!g?O:void 0},void 0),i(l.OptionsContainer,o({css:{marginTop:g?"0":"0.63rem",marginLeft:g?"1.5rem":"0"},"data-testid":"radio-group-options-container"},{children:[s(P,C,void 0,L),!!I.length&&e("div",o({style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:e(t,o({showCloseIcon:x,position:1,elementContent:e("div",o({className:"tooltip-content"},{children:s(I,C,void 0,L)}),void 0),withArrow:!0},{children:(null==y?void 0:y.numeric)?i(a,o({"data-testid":"numeric-tooltip"},{children:["+",T]}),void 0):e("div",o({className:"arrow","data-testid":"tooltip-arrow"},{children:e(r,{name:"arrows/chevron_down",width:1,height:1},void 0)}),void 0)}),void 0)}),void 0)]}),void 0)]}),void 0)};export{m as default};
2
2
  //# sourceMappingURL=ColorPickerWithTooltip.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i}from"tslib";import{jsxs as n,jsx as e}from"react/jsx-runtime";import{useState as o}from"react";import{DropdownContainer as r,DropdownLabel as t,SizeLabel as d,DetailLabel as l,DropdownOptions as c,DropdownOption as s}from"./Styled.js";import{Icon as a}from"../../icons/index.js";var u=function(u){var f=u.options,h=u.defaultLabel,p=u.onOptionSelect,m=o(!1),v=m[0],z=m[1],b=o({size:h,detail:""}),w=b[0],x=b[1],k=function(i){x(i),z(!1),p(i.size)};return n(r,{children:[n(t,i({role:"button",tabIndex:0,onClick:function(){return z((function(i){return!i}))}},{children:[e(d,{children:w.size},void 0),e(l,{children:w.detail},void 0),e(v?a.Arrows.ChevronUp:a.Arrows.ChevronDown,{width:.563,height:.875,fill:"#292929"},void 0)]}),void 0),v&&e(c,{children:f.map((function(o){return n(s,i({role:"option","aria-selected":w.size===o.size,tabIndex:0,onClick:function(){return k(o)},onKeyDown:function(i){return function(i,n){"Enter"!==i.key&&" "!==i.key||k(n)}(i,o)}},{children:[e("span",{children:o.size},void 0),e("span",{children:o.detail},void 0)]}),o.size)}))},void 0)]},void 0)};export{u as default};
1
+ import{__assign as e}from"tslib";import{jsxs as n,jsx as r}from"react/jsx-runtime";import{useState as t,useRef as i,useEffect as o}from"react";import{Icon as l}from"../../icons/index.js";import{DropdownContainer as u,DropdownLabel as a,SizeLabel as c,DetailLabel as d,DropdownOptions as f,DropdownOption as s}from"./Styled.js";var v=0,p=function(p){var h,m=p.options,y=p.defaultLabel,k=p.onOptionSelect,w=t(!1),D=w[0],b=w[1],x=t(0),z=x[0],g=x[1],A=t({size:y,detail:""}),C=A[0],E=A[1],j=i(null),q=i([]),F=i(null),I=i(null);null!==(h=j.current)&&void 0!==h||(j.current="afrodita-size-dropdown-".concat(++v));var U="".concat(j.current,"-label"),K="".concat(j.current,"-listbox"),M=function(e){E(e),b(!1),k(e.size),requestAnimationFrame((function(){var e;null===(e=F.current)||void 0===e||e.focus()}))},S=function(e){g(e),requestAnimationFrame((function(){var n;null===(n=q.current[e])||void 0===n||n.focus()}))},T=Math.max(0,m.findIndex((function(e){return e.size===C.size})));o((function(){if(D&&0!==m.length){var e=m.length-1,n=Math.min(T,e);S(n)}}),[D,T,m.length]);return n(u,{children:[n(a,e({id:U,role:"button",tabIndex:0,onClick:function(){return b((function(e){return!e}))},onKeyDown:function(e){if("Enter"===e.key||" "===e.key)return e.preventDefault(),void b((function(e){return!e}));"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),b(!0))},"aria-haspopup":"listbox","aria-expanded":D,"aria-controls":K,ref:F},{children:[r(c,{children:C.size},void 0),r(d,{children:C.detail},void 0),r(D?l.Arrows.ChevronUp:l.Arrows.ChevronDown,{width:.563,height:.875,fill:"#292929"},void 0)]}),void 0),D&&r(f,e({role:"listbox",id:K,"aria-labelledby":U,ref:I,onBlur:function(e){var n,r,t=e.relatedTarget;t&&(null===(n=I.current)||void 0===n?void 0:n.contains(t))||t&&(null===(r=F.current)||void 0===r?void 0:r.contains(t))||b(!1)}},{children:m.map((function(t,i){return n(s,e({role:"option","aria-selected":C.size===t.size,tabIndex:i===z?0:-1,onClick:function(){return M(t)},onKeyDown:function(e){return function(e,n){if("Enter"===e.key||" "===e.key)return e.preventDefault(),void M(n);if("Tab"!==e.key){if("Escape"===e.key)return e.preventDefault(),b(!1),void requestAnimationFrame((function(){var e;null===(e=F.current)||void 0===e||e.focus()}));if("ArrowDown"!==e.key)if("ArrowUp"!==e.key){if("Home"===e.key)return e.preventDefault(),void S(0);"End"===e.key&&(e.preventDefault(),S(m.length-1))}else e.preventDefault(),r=(z-1+m.length)%m.length,S(r);else{e.preventDefault();var r=(z+1)%m.length;S(r)}}else b(!1)}(e,t)},ref:function(e){q.current[i]=e}},{children:[r("span",{children:t.size},void 0),r("span",{children:t.detail},void 0)]}),t.size)}))}),void 0)]},void 0)};export{p as default};
2
2
  //# sourceMappingURL=SizeDropdown.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as o,__assign as t}from"tslib";import{useRef as r,useState as n,useEffect as e,createElement as i}from"react";import{jsxs as a,jsx as u}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 s}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,P=h.thumbnail,b=h.height,L=h.className,C=h.withProgressBar,A=void 0===C||C,k=h.hasAudioControl,I=h.muted,T=h.onLoadedData,D=h.autoPlay,N=h.isActive,w=void 0===N||N,z=h.lazyLoad,B=void 0!==z&&z,x=o(h,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData","autoPlay","isActive","lazyLoad"]),E=r(null),H=n(!0),M=H[0],O=H[1],V=n(!1),_=V[0],q=V[1],F=n(!!D||I),S=F[0],U=F[1],G=n(0),J=G[0],K=G[1],Q=n(!1),R=Q[0],W=Q[1],X=n(!1),Y=X[0],Z=X[1],$=n(!1),oo=$[0],to=$[1],ro=n(!B||w),no=ro[0],eo=ro[1],io=J>0,ao=(null===(y=E.current)||void 0===y?void 0:y.duration)?J/E.current.duration:0,uo=J===(null===(g=null==E?void 0:E.current)||void 0===g?void 0:g.duration)||0===J,co=!B||no,so=D&&co?void 0:P;e((function(){to(!1)}),[j]),e((function(){w&&!no&&eo(!0)}),[w,no]),e((function(){var o=E.current;o&&o.load()}),[j,so]),e((function(){var o=E.current;if(o)if(w&&D&&oo){o.muted=!0,U(!0);var t=o.play();void 0!==t&&t.then((function(){q(!0)})).catch((function(o){"NotAllowedError"===o.name&&Z(!0)}))}else w||(o.pause(),q(!1))}),[w,D,oo]);return a(d,t({className:L},{children:[!M&&A&&u(s,{progress:ao,hide:uo},void 0),_?u(f,{"data-testid":"pause",onClick:function(){E.current&&_&&(E.current.pause(),q(!1))}},void 0):u(l,t({"data-testid":"play",onClick:function(){E.current&&!R&&(W(!0),E.current.play().then((function(){q(!0)})).catch((function(o){"NotAllowedError"===o.name&&Z(!0)})).finally((function(){return W(!1)})))}},{children:io&&u(m,{},void 0)}),void 0),k&&a(p,t({onClick:function(){E.current&&U((function(o){return!o}))}},{children:[S&&u(c,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!S&&u(c,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),i(v,t({},x,{key:"".concat(j,"-").concat(so||"no-poster"),autoPlay:D&&w,muted:S,"data-testid":"video",poster:so,playsInline:!0,controls:Y,ref:E,onTimeUpdate:function(){if(E.current){var o=E.current.currentTime;requestAnimationFrame((function(){return K(o)}))}},onCanPlay:function(){return O(!1)},onCanPlayThrough:function(){return to(!0)},onLoadedData:function(o){T&&T(o),O(!1)},onPause:function(){return q(!1)},onPlaying:function(){return q(!0)},height:b||"auto",preload:co?"metadata":"none"}),u("track",{kind:"captions"},void 0),co&&u("source",{src:j},void 0))]}),void 0)};export{h as Video};
1
+ import{__rest as o,__assign as t}from"tslib";import{useRef as r,useState as n,useEffect as e,createElement as i}from"react";import{jsxs as a,jsx as u}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 s}from"./components/ProgressBar.js";import{Container as d,PauseContainer as l,PlayContainer as m,PlayIcon as f,MuteButton as p,HTMLVideo as v}from"./styled.js";var h=function(h){var y,g,j=h.source,P=h.thumbnail,b=h.height,L=h.className,C=h.withProgressBar,A=void 0===C||C,k=h.hasAudioControl,I=h.muted,T=h.onLoadedData,D=h.autoPlay,N=h.isActive,w=void 0===N||N,z=h.lazyLoad,B=void 0!==z&&z,x=o(h,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData","autoPlay","isActive","lazyLoad"]),E=r(null),H=n(!0),M=H[0],O=H[1],V=n(!1),_=V[0],q=V[1],F=n(!!D||I),S=F[0],U=F[1],G=n(0),J=G[0],K=G[1],Q=n(!1),R=Q[0],W=Q[1],X=n(!1),Y=X[0],Z=X[1],$=n(!1),oo=$[0],to=$[1],ro=n(!B||w),no=ro[0],eo=ro[1],io=r(null),ao=J>0,uo=(null===(y=E.current)||void 0===y?void 0:y.duration)?J/E.current.duration:0,co=J===(null===(g=null==E?void 0:E.current)||void 0===g?void 0:g.duration)||0===J,so=!B||no,lo=!D||!so?P:void 0;e((function(){w&&!no&&eo(!0)}),[w,no]),e((function(){var o=E.current;o&&so&&io.current!==j&&(io.current=j,to(!1),O(!0),o.load())}),[j,so]),e((function(){var o=E.current;if(o)if(w&&D&&oo){o.muted=!0,U(!0);var t=o.play();void 0!==t&&t.then((function(){q(!0)})).catch((function(o){"NotAllowedError"===o.name&&Z(!0)}))}else w||(o.pause(),q(!1))}),[w,D,oo]);return a(d,t({className:L},{children:[!M&&A&&u(s,{progress:uo,hide:co},void 0),_?u(l,{"data-testid":"pause",onClick:function(){E.current&&_&&(E.current.pause(),q(!1))}},void 0):u(m,t({"data-testid":"play",onClick:function(){E.current&&!R&&(W(!0),E.current.play().then((function(){q(!0)})).catch((function(o){"NotAllowedError"===o.name&&Z(!0)})).finally((function(){return W(!1)})))}},{children:ao&&u(f,{},void 0)}),void 0),k&&a(p,t({onClick:function(){E.current&&U((function(o){return!o}))}},{children:[S&&u(c,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!S&&u(c,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),i(v,t({},x,{key:j,autoPlay:D&&w&&so,muted:!!D||S,"data-testid":"video",poster:lo,playsInline:!0,controls:Y,ref:E,onTimeUpdate:function(){if(E.current){var o=E.current.currentTime;requestAnimationFrame((function(){return K(o)}))}},onCanPlay:function(){return O(!1)},onCanPlayThrough:function(){return to(!0)},onLoadedData:function(o){T&&T(o),O(!1)},onPause:function(){return q(!1)},onPlaying:function(){return q(!0)},height:b||"auto",preload:so?D?"auto":"metadata":"none"}),u("track",{kind:"captions"},void 0),so&&u("source",{src:j},void 0))]}),void 0)};export{h as Video};
2
2
  //# sourceMappingURL=Video.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i}from"tslib";import{jsxs as e,jsx as l}from"@emotion/react/jsx-runtime";import{useRef as r}from"react";import{Icon as t}from"../../icons/index.js";import{ComponentSize as o}from"../../../types/enums.js";import n from"../../selector/simple/SelectorSecondary.js";import{Text as a}from"../../text/Text.js";import d from"../guide/SizeFitGuide.js";import{Row as s,ButtonsContainer as c,BottomSizeTipRow as m}from"./styled.js";var u=0,v=function(v){var p,h,b=v.label,f=v.sizes,g=v.selectedValue,z=v.onChange,w=v.onClickSizeTip,S=v.inline,y=void 0!==S&&S,x=v.width,j=v.hasSizeGuide,k=void 0!==j&&j,C=v.sizeTipReferences,T=v.hasSizeTipBelowSelector,I=void 0!==T&&T,A=r(null);null!==(p=A.current)&&void 0!==p||(A.current="afrodita-size-selector-".concat(++u));var G="".concat(A.current,"-label"),F=k?null==C?void 0:C.find((function(i){return(null==i?void 0:i.size)===(null==g?void 0:g.label)})):null;return e("div",i({css:{display:"flex",flexDirection:y?"row":"column",alignItems:y?"center":"start"}},{children:[e(a,i({variant:"body",weight:"regular",size:"small",css:{alignSelf:y?"start":"inherit",padding:y?"0.75rem 0":"0"},id:G},{children:[b,!y&&l(a,i({variant:"label",weight:"demi",size:"regular"},{children:null==g?void 0:g.description}),void 0)]}),void 0),k&&!I&&e(s,i({"data-testid":"sizing-tip"},{children:[l(t.Actions.CircleInfo,{width:1.2},void 0),l(a,i({variant:"body",weight:"demi",size:"small",css:{display:"flex"}},{children:"Sizing Tip:"}),void 0),l(a,i({variant:"body",weight:"regular",size:"small"},{children:null==F?void 0:F.tip}),void 0),w&&l(d,{hideIcon:!0,onClick:w,title:null!==(h=null==F?void 0:F.cta)&&void 0!==h?h:"Size and Fit Guide"},void 0)]}),void 0),l(c,i({inline:y,role:"radiogroup","aria-labelledby":G},{children:null==f?void 0:f.map((function(i){var e,r=i.label===g.label,t=!i.disabled&&r,a=(e=i.label,"".concat(A.current,"-option-").concat(e.replaceAll(/\s+/g,"-").replaceAll("/","-").toLowerCase())),d=i.description?"".concat(i.label,", ").concat(i.description):i.label;return l(n,{css:{padding:"0.75rem 1rem 0.625rem",margin:"0 0.5rem 0.625rem 0",minWidth:"4rem"},size:o.Medium,text:i.label,active:t,disabled:i.disabled,onClick:function(){return z(i)},testId:"size-variant-".concat(i.label.split("/")[0]),width:x,showNoStockStyles:i.noStock,id:a,role:"radio","aria-checked":r,"aria-label":d},i.label)}))}),void 0),k&&I&&l(m,i({"data-testid":"sizing-tip-below-selector"},{children:l(a,i({variant:"body",weight:"regular",size:"small"},{children:null==F?void 0:F.tip}),void 0)}),void 0)]}),void 0)};export{v as default};
1
+ import{__assign as e}from"tslib";import{jsxs as i,jsx as l}from"@emotion/react/jsx-runtime";import{useRef as r}from"react";import{Icon as n}from"../../icons/index.js";import{ComponentSize as t}from"../../../types/enums.js";import o from"../../selector/simple/SelectorSecondary.js";import{Text as a}from"../../text/Text.js";import d from"../guide/SizeFitGuide.js";import{Row as c,ButtonsContainer as s,BottomSizeTipRow as u}from"./styled.js";var m=0,v=function(v){var p,f,h=v.label,b=v.sizes,g=v.selectedValue,w=v.onChange,y=v.onClickSizeTip,z=v.inline,k=void 0!==z&&z,A=v.width,S=v.hasSizeGuide,x=void 0!==S&&S,j=v.sizeTipReferences,C=v.hasSizeTipBelowSelector,I=void 0!==C&&C,D=r(null);null!==(p=D.current)&&void 0!==p||(D.current="afrodita-size-selector-".concat(++m));var T="".concat(D.current,"-label"),L=x?null==j?void 0:j.find((function(e){return(null==e?void 0:e.size)===(null==g?void 0:g.label)})):null,E=function(e){return"".concat(D.current,"-option-").concat(e.replaceAll(/\s+/g,"-").replaceAll("/","-").toLowerCase())};return i("div",e({css:{display:"flex",flexDirection:k?"row":"column",alignItems:k?"center":"start"}},{children:[i(a,e({variant:"body",weight:"regular",size:"small",css:{alignSelf:k?"start":"inherit",padding:k?"0.75rem 0":"0"},id:T},{children:[h,!k&&l(a,e({variant:"label",weight:"demi",size:"regular"},{children:null==g?void 0:g.description}),void 0)]}),void 0),x&&!I&&i(c,e({"data-testid":"sizing-tip"},{children:[l(n.Actions.CircleInfo,{width:1.2},void 0),l(a,e({variant:"body",weight:"demi",size:"small",css:{display:"flex"}},{children:"Sizing Tip:"}),void 0),l(a,e({variant:"body",weight:"regular",size:"small"},{children:null==L?void 0:L.tip}),void 0),y&&l(d,{hideIcon:!0,onClick:y,title:null!==(f=null==L?void 0:L.cta)&&void 0!==f?f:"Size and Fit Guide"},void 0)]}),void 0),l(s,e({inline:k,role:"radiogroup","aria-labelledby":T,onKeyDown:function(e){var i;if(["ArrowRight","ArrowLeft","ArrowDown","ArrowUp","Home","End"].includes(e.key)){e.preventDefault();var l=null!==(i=null==b?void 0:b.filter((function(e){return!e.disabled})))&&void 0!==i?i:[];if(l.length){var r=l.findIndex((function(e){return e.label===(null==g?void 0:g.label)})),n=r;"Home"===e.key?n=0:"End"===e.key?n=l.length-1:-1===r?n="ArrowUp"===e.key||"ArrowLeft"===e.key?l.length-1:0:"ArrowRight"===e.key||"ArrowDown"===e.key?n=(n+1)%l.length:"ArrowLeft"!==e.key&&"ArrowUp"!==e.key||(n=(n-1+l.length)%l.length);var t=l[n];t&&t.label!==(null==g?void 0:g.label)&&(w(t),requestAnimationFrame((function(){var e;null===(e=document.getElementById(E(t.label)))||void 0===e||e.focus()})))}}}},{children:null==b?void 0:b.map((function(e){var i=e.label===g.label,r=!e.disabled&&i,n=E(e.label),a=e.description?"".concat(e.label,", ").concat(e.description):e.label;return l(o,{css:{padding:"0.75rem 1rem 0.625rem",margin:"0 0.5rem 0.625rem 0",minWidth:"4rem"},size:t.Medium,text:e.label,active:r,disabled:e.disabled,onClick:function(){return w(e)},testId:"size-variant-".concat(e.label.split("/")[0]),width:A,showNoStockStyles:e.noStock,id:n,role:"radio","aria-checked":i,"aria-label":a},e.label)}))}),void 0),x&&I&&l(u,e({"data-testid":"sizing-tip-below-selector"},{children:l(a,e({variant:"body",weight:"regular",size:"small"},{children:null==L?void 0:L.tip}),void 0)}),void 0)]}),void 0)};export{v as default};
2
2
  //# sourceMappingURL=SizeSelector.js.map
package/build/index.d.ts CHANGED
@@ -3170,6 +3170,7 @@ interface ColorPickerWithTooltipProps {
3170
3170
  showCloseIcon?: boolean;
3171
3171
  numeric?: boolean;
3172
3172
  };
3173
+ translatedLabels?: Record<string, string>;
3173
3174
  }
3174
3175
  declare const ColorPickerWithTooltip: FC<ColorPickerWithTooltipProps>;
3175
3176
 
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),i=require("@emotion/react/jsx-runtime");require("react/jsx-runtime"),require("../../core/theme/Theme.js"),require("react"),require("../../types/enums.js"),require("../pricing/clubOffer/ClubOfferTag.js"),require("../pricing/discount/styled.js"),require("../pricing/styles.js");var r=require("../tooltip/Tooltip.js");require("../atoms/PriceLabel/PriceLabel.js"),require("../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../atoms/HorizontalDivider/HorizontalDivider.js");var s=require("../atoms/Icon/Icon.js");require("../atoms/Image/styled.js"),require("../atoms/PriceLabelV2/PriceLabelV2.js"),require("../atoms/Toggle/toggle.styled.js");var o=require("./ColorRadioGroup.js"),t=require("./SingleColorPicker.js"),l=require("./styles/ColorPickerwithTootip.styled.js");module.exports=function(n){var a=n.options,c=void 0===a?[]:a,d=n.selectedValue,u=n.label,m=n.onChange,v=n.inline,j=void 0!==v&&v,p=n.maxVisibleOptions,g=void 0===p?5:p,h=n.showCross,q=n.className,b=n.tooltipOptions,x=c.slice(0,g),C=c.slice(g),_=(null!=b?b:{}).showCloseIcon,w=(null==b?void 0:b.numeric)?null==C?void 0:C.length:0;return i.jsxs(l.ColorPickerWrapper,e.__assign({className:q,value:d,onChange:m,css:{flexDirection:j?"row":"column",alignItems:j?"center":"start"}},{children:[i.jsx(o.Label,{label:u,values:d&&!j?d.label:void 0},void 0),i.jsxs(o.OptionsContainer,e.__assign({css:{marginTop:j?"0":"0.63rem",marginLeft:j?"1.5rem":"0"},"data-testid":"radio-group-options-container"},{children:[t.renderOptions(x,h),!!C.length&&i.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:i.jsx(r.Tooltip,e.__assign({showCloseIcon:_,position:1,elementContent:i.jsx("div",e.__assign({className:"tooltip-content"},{children:t.renderOptions(C,h)}),void 0),withArrow:!0},{children:(null==b?void 0:b.numeric)?i.jsxs(l.NumericTooltip,e.__assign({"data-testid":"numeric-tooltip"},{children:["+",w]}),void 0):i.jsx("div",e.__assign({className:"arrow","data-testid":"tooltip-arrow"},{children:i.jsx(s.Icon,{name:"arrows/chevron_down",width:1,height:1},void 0)}),void 0)}),void 0)}),void 0)]}),void 0)]}),void 0)};
1
+ "use strict";var e=require("tslib"),i=require("@emotion/react/jsx-runtime");require("react/jsx-runtime"),require("../../core/theme/Theme.js"),require("react"),require("../../types/enums.js"),require("../pricing/clubOffer/ClubOfferTag.js"),require("../pricing/discount/styled.js"),require("../pricing/styles.js");var r=require("../tooltip/Tooltip.js");require("../atoms/PriceLabel/PriceLabel.js"),require("../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../atoms/HorizontalDivider/HorizontalDivider.js");var s=require("../atoms/Icon/Icon.js");require("../atoms/Image/styled.js"),require("../atoms/PriceLabelV2/PriceLabelV2.js"),require("../atoms/Toggle/toggle.styled.js");var o=require("./ColorRadioGroup.js"),t=require("./SingleColorPicker.js"),l=require("./styles/ColorPickerwithTootip.styled.js");module.exports=function(n){var a,d=n.options,c=void 0===d?[]:d,u=n.selectedValue,m=n.label,v=n.onChange,j=n.inline,p=void 0!==j&&j,g=n.maxVisibleOptions,h=void 0===g?5:g,b=n.showCross,q=n.className,x=n.tooltipOptions,C=n.translatedLabels,_=c.slice(0,h),w=c.slice(h),y=(null!=x?x:{}).showCloseIcon,f=(null==x?void 0:x.numeric)?null==w?void 0:w.length:0,L=u?null!==(a=null==C?void 0:C[u.label])&&void 0!==a?a:u.label:void 0;return i.jsxs(l.ColorPickerWrapper,e.__assign({className:q,value:u,onChange:v,css:{flexDirection:p?"row":"column",alignItems:p?"center":"start"}},{children:[i.jsx(o.Label,{label:m,values:L&&!p?L:void 0},void 0),i.jsxs(o.OptionsContainer,e.__assign({css:{marginTop:p?"0":"0.63rem",marginLeft:p?"1.5rem":"0"},"data-testid":"radio-group-options-container"},{children:[t.renderOptions(_,b,void 0,C),!!w.length&&i.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:i.jsx(r.Tooltip,e.__assign({showCloseIcon:y,position:1,elementContent:i.jsx("div",e.__assign({className:"tooltip-content"},{children:t.renderOptions(w,b,void 0,C)}),void 0),withArrow:!0},{children:(null==x?void 0:x.numeric)?i.jsxs(l.NumericTooltip,e.__assign({"data-testid":"numeric-tooltip"},{children:["+",f]}),void 0):i.jsx("div",e.__assign({className:"arrow","data-testid":"tooltip-arrow"},{children:i.jsx(s.Icon,{name:"arrows/chevron_down",width:1,height:1},void 0)}),void 0)}),void 0)}),void 0)]}),void 0)]}),void 0)};
2
2
  //# sourceMappingURL=ColorPickerWithTooltip.js.map
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),r=require("./Styled.js"),o=require("../../icons/index.js");module.exports=function(t){var s=t.options,d=t.defaultLabel,l=t.onOptionSelect,c=n.useState(!1),u=c[0],a=c[1],h=n.useState({size:d,detail:""}),x=h[0],p=h[1],j=function(e){p(e),a(!1),l(e.size)};return i.jsxs(r.DropdownContainer,{children:[i.jsxs(r.DropdownLabel,e.__assign({role:"button",tabIndex:0,onClick:function(){return a((function(e){return!e}))}},{children:[i.jsx(r.SizeLabel,{children:x.size},void 0),i.jsx(r.DetailLabel,{children:x.detail},void 0),u?i.jsx(o.Icon.Arrows.ChevronUp,{width:.563,height:.875,fill:"#292929"},void 0):i.jsx(o.Icon.Arrows.ChevronDown,{width:.563,height:.875,fill:"#292929"},void 0)]}),void 0),u&&i.jsx(r.DropdownOptions,{children:s.map((function(n){return i.jsxs(r.DropdownOption,e.__assign({role:"option","aria-selected":x.size===n.size,tabIndex:0,onClick:function(){return j(n)},onKeyDown:function(e){return function(e,i){"Enter"!==e.key&&" "!==e.key||j(i)}(e,n)}},{children:[i.jsx("span",{children:n.size},void 0),i.jsx("span",{children:n.detail},void 0)]}),n.size)}))},void 0)]},void 0)};
1
+ "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),r=require("react"),t=require("../../icons/index.js"),i=require("./Styled.js"),o=0;module.exports=function(u){var l,a=u.options,s=u.defaultLabel,c=u.onOptionSelect,d=r.useState(!1),f=d[0],v=d[1],p=r.useState(0),h=p[0],x=p[1],w=r.useState({size:s,detail:""}),D=w[0],y=w[1],b=r.useRef(null),k=r.useRef([]),g=r.useRef(null),j=r.useRef(null);null!==(l=b.current)&&void 0!==l||(b.current="afrodita-size-dropdown-".concat(++o));var m="".concat(b.current,"-label"),z="".concat(b.current,"-listbox"),A=function(e){y(e),v(!1),c(e.size),requestAnimationFrame((function(){var e;null===(e=g.current)||void 0===e||e.focus()}))},q=function(e){x(e),requestAnimationFrame((function(){var n;null===(n=k.current[e])||void 0===n||n.focus()}))},S=Math.max(0,a.findIndex((function(e){return e.size===D.size})));r.useEffect((function(){if(f&&0!==a.length){var e=a.length-1,n=Math.min(S,e);q(n)}}),[f,S,a.length]);return n.jsxs(i.DropdownContainer,{children:[n.jsxs(i.DropdownLabel,e.__assign({id:m,role:"button",tabIndex:0,onClick:function(){return v((function(e){return!e}))},onKeyDown:function(e){if("Enter"===e.key||" "===e.key)return e.preventDefault(),void v((function(e){return!e}));"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),v(!0))},"aria-haspopup":"listbox","aria-expanded":f,"aria-controls":z,ref:g},{children:[n.jsx(i.SizeLabel,{children:D.size},void 0),n.jsx(i.DetailLabel,{children:D.detail},void 0),f?n.jsx(t.Icon.Arrows.ChevronUp,{width:.563,height:.875,fill:"#292929"},void 0):n.jsx(t.Icon.Arrows.ChevronDown,{width:.563,height:.875,fill:"#292929"},void 0)]}),void 0),f&&n.jsx(i.DropdownOptions,e.__assign({role:"listbox",id:z,"aria-labelledby":m,ref:j,onBlur:function(e){var n,r,t=e.relatedTarget;t&&(null===(n=j.current)||void 0===n?void 0:n.contains(t))||t&&(null===(r=g.current)||void 0===r?void 0:r.contains(t))||v(!1)}},{children:a.map((function(r,t){return n.jsxs(i.DropdownOption,e.__assign({role:"option","aria-selected":D.size===r.size,tabIndex:t===h?0:-1,onClick:function(){return A(r)},onKeyDown:function(e){return function(e,n){if("Enter"===e.key||" "===e.key)return e.preventDefault(),void A(n);if("Tab"!==e.key){if("Escape"===e.key)return e.preventDefault(),v(!1),void requestAnimationFrame((function(){var e;null===(e=g.current)||void 0===e||e.focus()}));if("ArrowDown"!==e.key)if("ArrowUp"!==e.key){if("Home"===e.key)return e.preventDefault(),void q(0);"End"===e.key&&(e.preventDefault(),q(a.length-1))}else e.preventDefault(),r=(h-1+a.length)%a.length,q(r);else{e.preventDefault();var r=(h+1)%a.length;q(r)}}else v(!1)}(e,r)},ref:function(e){k.current[t]=e}},{children:[n.jsx("span",{children:r.size},void 0),n.jsx("span",{children:r.detail},void 0)]}),r.size)}))}),void 0)]},void 0)};
2
2
  //# sourceMappingURL=SizeDropdown.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react"),r=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(a){var s,u,c=a.source,d=a.thumbnail,l=a.height,f=a.className,m=a.withProgressBar,v=void 0===m||m,j=a.hasAudioControl,y=a.muted,h=a.onLoadedData,g=a.autoPlay,p=a.isActive,P=void 0===p||p,q=a.lazyLoad,b=void 0!==q&&q,_=e.__rest(a,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData","autoPlay","isActive","lazyLoad"]),x=t.useRef(null),C=t.useState(!0),L=C[0],I=C[1],S=t.useState(!1),A=S[0],E=S[1],T=t.useState(!!g||y),k=T[0],B=T[1],D=t.useState(0),M=D[0],N=D[1],w=t.useState(!1),z=w[0],V=w[1],H=t.useState(!1),O=H[0],F=H[1],R=t.useState(!1),U=R[0],G=R[1],J=t.useState(!b||P),K=J[0],Q=J[1],W=M>0,X=(null===(s=x.current)||void 0===s?void 0:s.duration)?M/x.current.duration:0,Y=M===(null===(u=null==x?void 0:x.current)||void 0===u?void 0:u.duration)||0===M,Z=!b||K,$=g&&Z?void 0:d;t.useEffect((function(){G(!1)}),[c]),t.useEffect((function(){P&&!K&&Q(!0)}),[P,K]),t.useEffect((function(){var e=x.current;e&&e.load()}),[c,$]),t.useEffect((function(){var e=x.current;if(e)if(P&&g&&U){e.muted=!0,B(!0);var t=e.play();void 0!==t&&t.then((function(){E(!0)})).catch((function(e){"NotAllowedError"===e.name&&F(!0)}))}else P||(e.pause(),E(!1))}),[P,g,U]);return r.jsxs(i.Container,e.__assign({className:f},{children:[!L&&v&&r.jsx(o.ProgressBar,{progress:X,hide:Y},void 0),A?r.jsx(i.PauseContainer,{"data-testid":"pause",onClick:function(){x.current&&A&&(x.current.pause(),E(!1))}},void 0):r.jsx(i.PlayContainer,e.__assign({"data-testid":"play",onClick:function(){x.current&&!z&&(V(!0),x.current.play().then((function(){E(!0)})).catch((function(e){"NotAllowedError"===e.name&&F(!0)})).finally((function(){return V(!1)})))}},{children:W&&r.jsx(i.PlayIcon,{},void 0)}),void 0),j&&r.jsxs(i.MuteButton,e.__assign({onClick:function(){x.current&&B((function(e){return!e}))}},{children:[k&&r.jsx(n.Icon,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!k&&r.jsx(n.Icon,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),t.createElement(i.HTMLVideo,e.__assign({},_,{key:"".concat(c,"-").concat($||"no-poster"),autoPlay:g&&P,muted:k,"data-testid":"video",poster:$,playsInline:!0,controls:O,ref:x,onTimeUpdate:function(){if(x.current){var e=x.current.currentTime;requestAnimationFrame((function(){return N(e)}))}},onCanPlay:function(){return I(!1)},onCanPlayThrough:function(){return G(!0)},onLoadedData:function(e){h&&h(e),I(!1)},onPause:function(){return E(!1)},onPlaying:function(){return E(!0)},height:l||"auto",preload:Z?"metadata":"none"}),r.jsx("track",{kind:"captions"},void 0),Z&&r.jsx("source",{src:c},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(u){var a,s,c=u.source,d=u.thumbnail,l=u.height,f=u.className,m=u.withProgressBar,v=void 0===m||m,j=u.hasAudioControl,y=u.muted,h=u.onLoadedData,g=u.autoPlay,p=u.isActive,P=void 0===p||p,q=u.lazyLoad,b=void 0!==q&&q,_=e.__rest(u,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData","autoPlay","isActive","lazyLoad"]),x=r.useRef(null),C=r.useState(!0),L=C[0],I=C[1],S=r.useState(!1),A=S[0],T=S[1],k=r.useState(!!g||y),E=k[0],B=k[1],D=r.useState(0),M=D[0],N=D[1],w=r.useState(!1),z=w[0],V=w[1],H=r.useState(!1),O=H[0],R=H[1],F=r.useState(!1),U=F[0],G=F[1],J=r.useState(!b||P),K=J[0],Q=J[1],W=r.useRef(null),X=M>0,Y=(null===(a=x.current)||void 0===a?void 0:a.duration)?M/x.current.duration:0,Z=M===(null===(s=null==x?void 0:x.current)||void 0===s?void 0:s.duration)||0===M,$=!b||K,ee=!g||!$?d:void 0;r.useEffect((function(){P&&!K&&Q(!0)}),[P,K]),r.useEffect((function(){var e=x.current;e&&$&&W.current!==c&&(W.current=c,G(!1),I(!0),e.load())}),[c,$]),r.useEffect((function(){var e=x.current;if(e)if(P&&g&&U){e.muted=!0,B(!0);var r=e.play();void 0!==r&&r.then((function(){T(!0)})).catch((function(e){"NotAllowedError"===e.name&&R(!0)}))}else P||(e.pause(),T(!1))}),[P,g,U]);return t.jsxs(i.Container,e.__assign({className:f},{children:[!L&&v&&t.jsx(o.ProgressBar,{progress:Y,hide:Z},void 0),A?t.jsx(i.PauseContainer,{"data-testid":"pause",onClick:function(){x.current&&A&&(x.current.pause(),T(!1))}},void 0):t.jsx(i.PlayContainer,e.__assign({"data-testid":"play",onClick:function(){x.current&&!z&&(V(!0),x.current.play().then((function(){T(!0)})).catch((function(e){"NotAllowedError"===e.name&&R(!0)})).finally((function(){return V(!1)})))}},{children:X&&t.jsx(i.PlayIcon,{},void 0)}),void 0),j&&t.jsxs(i.MuteButton,e.__assign({onClick:function(){x.current&&B((function(e){return!e}))}},{children:[E&&t.jsx(n.Icon,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!E&&t.jsx(n.Icon,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),r.createElement(i.HTMLVideo,e.__assign({},_,{key:c,autoPlay:g&&P&&$,muted:!!g||E,"data-testid":"video",poster:ee,playsInline:!0,controls:O,ref:x,onTimeUpdate:function(){if(x.current){var e=x.current.currentTime;requestAnimationFrame((function(){return N(e)}))}},onCanPlay:function(){return I(!1)},onCanPlayThrough:function(){return G(!0)},onLoadedData:function(e){h&&h(e),I(!1)},onPause:function(){return T(!1)},onPlaying:function(){return T(!0)},height:l||"auto",preload:$?g?"auto":"metadata":"none"}),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 e=require("tslib"),i=require("@emotion/react/jsx-runtime"),l=require("react"),n=require("../../icons/index.js"),r=require("../../../types/enums.js"),s=require("../../selector/simple/SelectorSecondary.js"),t=require("../../text/Text.js"),a=require("../guide/SizeFitGuide.js"),o=require("./styled.js"),d=0;module.exports=function(c){var u,v,g=c.label,m=c.sizes,p=c.selectedValue,x=c.onChange,h=c.onClickSizeTip,b=c.inline,z=void 0!==b&&b,j=c.width,_=c.hasSizeGuide,w=void 0!==_&&_,S=c.sizeTipReferences,f=c.hasSizeTipBelowSelector,y=void 0!==f&&f,T=l.useRef(null);null!==(u=T.current)&&void 0!==u||(T.current="afrodita-size-selector-".concat(++d));var q="".concat(T.current,"-label"),C=w?null==S?void 0:S.find((function(e){return(null==e?void 0:e.size)===(null==p?void 0:p.label)})):null;return i.jsxs("div",e.__assign({css:{display:"flex",flexDirection:z?"row":"column",alignItems:z?"center":"start"}},{children:[i.jsxs(t.Text,e.__assign({variant:"body",weight:"regular",size:"small",css:{alignSelf:z?"start":"inherit",padding:z?"0.75rem 0":"0"},id:q},{children:[g,!z&&i.jsx(t.Text,e.__assign({variant:"label",weight:"demi",size:"regular"},{children:null==p?void 0:p.description}),void 0)]}),void 0),w&&!y&&i.jsxs(o.Row,e.__assign({"data-testid":"sizing-tip"},{children:[i.jsx(n.Icon.Actions.CircleInfo,{width:1.2},void 0),i.jsx(t.Text,e.__assign({variant:"body",weight:"demi",size:"small",css:{display:"flex"}},{children:"Sizing Tip:"}),void 0),i.jsx(t.Text,e.__assign({variant:"body",weight:"regular",size:"small"},{children:null==C?void 0:C.tip}),void 0),h&&i.jsx(a,{hideIcon:!0,onClick:h,title:null!==(v=null==C?void 0:C.cta)&&void 0!==v?v:"Size and Fit Guide"},void 0)]}),void 0),i.jsx(o.ButtonsContainer,e.__assign({inline:z,role:"radiogroup","aria-labelledby":q},{children:null==m?void 0:m.map((function(e){var l,n=e.label===p.label,t=!e.disabled&&n,a=(l=e.label,"".concat(T.current,"-option-").concat(l.replaceAll(/\s+/g,"-").replaceAll("/","-").toLowerCase())),o=e.description?"".concat(e.label,", ").concat(e.description):e.label;return i.jsx(s,{css:{padding:"0.75rem 1rem 0.625rem",margin:"0 0.5rem 0.625rem 0",minWidth:"4rem"},size:r.ComponentSize.Medium,text:e.label,active:t,disabled:e.disabled,onClick:function(){return x(e)},testId:"size-variant-".concat(e.label.split("/")[0]),width:j,showNoStockStyles:e.noStock,id:a,role:"radio","aria-checked":n,"aria-label":o},e.label)}))}),void 0),w&&y&&i.jsx(o.BottomSizeTipRow,e.__assign({"data-testid":"sizing-tip-below-selector"},{children:i.jsx(t.Text,e.__assign({variant:"body",weight:"regular",size:"small"},{children:null==C?void 0:C.tip}),void 0)}),void 0)]}),void 0)};
1
+ "use strict";var e=require("tslib"),i=require("@emotion/react/jsx-runtime"),l=require("react"),n=require("../../icons/index.js"),r=require("../../../types/enums.js"),t=require("../../selector/simple/SelectorSecondary.js"),o=require("../../text/Text.js"),a=require("../guide/SizeFitGuide.js"),s=require("./styled.js"),d=0;module.exports=function(c){var u,v,g=c.label,h=c.sizes,m=c.selectedValue,b=c.onChange,p=c.onClickSizeTip,w=c.inline,f=void 0!==w&&w,x=c.width,y=c.hasSizeGuide,z=void 0!==y&&y,j=c.sizeTipReferences,_=c.hasSizeTipBelowSelector,k=void 0!==_&&_,S=l.useRef(null);null!==(u=S.current)&&void 0!==u||(S.current="afrodita-size-selector-".concat(++d));var A="".concat(S.current,"-label"),T=z?null==j?void 0:j.find((function(e){return(null==e?void 0:e.size)===(null==m?void 0:m.label)})):null,q=function(e){return"".concat(S.current,"-option-").concat(e.replaceAll(/\s+/g,"-").replaceAll("/","-").toLowerCase())};return i.jsxs("div",e.__assign({css:{display:"flex",flexDirection:f?"row":"column",alignItems:f?"center":"start"}},{children:[i.jsxs(o.Text,e.__assign({variant:"body",weight:"regular",size:"small",css:{alignSelf:f?"start":"inherit",padding:f?"0.75rem 0":"0"},id:A},{children:[g,!f&&i.jsx(o.Text,e.__assign({variant:"label",weight:"demi",size:"regular"},{children:null==m?void 0:m.description}),void 0)]}),void 0),z&&!k&&i.jsxs(s.Row,e.__assign({"data-testid":"sizing-tip"},{children:[i.jsx(n.Icon.Actions.CircleInfo,{width:1.2},void 0),i.jsx(o.Text,e.__assign({variant:"body",weight:"demi",size:"small",css:{display:"flex"}},{children:"Sizing Tip:"}),void 0),i.jsx(o.Text,e.__assign({variant:"body",weight:"regular",size:"small"},{children:null==T?void 0:T.tip}),void 0),p&&i.jsx(a,{hideIcon:!0,onClick:p,title:null!==(v=null==T?void 0:T.cta)&&void 0!==v?v:"Size and Fit Guide"},void 0)]}),void 0),i.jsx(s.ButtonsContainer,e.__assign({inline:f,role:"radiogroup","aria-labelledby":A,onKeyDown:function(e){var i;if(["ArrowRight","ArrowLeft","ArrowDown","ArrowUp","Home","End"].includes(e.key)){e.preventDefault();var l=null!==(i=null==h?void 0:h.filter((function(e){return!e.disabled})))&&void 0!==i?i:[];if(l.length){var n=l.findIndex((function(e){return e.label===(null==m?void 0:m.label)})),r=n;"Home"===e.key?r=0:"End"===e.key?r=l.length-1:-1===n?r="ArrowUp"===e.key||"ArrowLeft"===e.key?l.length-1:0:"ArrowRight"===e.key||"ArrowDown"===e.key?r=(r+1)%l.length:"ArrowLeft"!==e.key&&"ArrowUp"!==e.key||(r=(r-1+l.length)%l.length);var t=l[r];t&&t.label!==(null==m?void 0:m.label)&&(b(t),requestAnimationFrame((function(){var e;null===(e=document.getElementById(q(t.label)))||void 0===e||e.focus()})))}}}},{children:null==h?void 0:h.map((function(e){var l=e.label===m.label,n=!e.disabled&&l,o=q(e.label),a=e.description?"".concat(e.label,", ").concat(e.description):e.label;return i.jsx(t,{css:{padding:"0.75rem 1rem 0.625rem",margin:"0 0.5rem 0.625rem 0",minWidth:"4rem"},size:r.ComponentSize.Medium,text:e.label,active:n,disabled:e.disabled,onClick:function(){return b(e)},testId:"size-variant-".concat(e.label.split("/")[0]),width:x,showNoStockStyles:e.noStock,id:o,role:"radio","aria-checked":l,"aria-label":a},e.label)}))}),void 0),z&&k&&i.jsx(s.BottomSizeTipRow,e.__assign({"data-testid":"sizing-tip-below-selector"},{children:i.jsx(o.Text,e.__assign({variant:"body",weight:"regular",size:"small"},{children:null==T?void 0:T.tip}),void 0)}),void 0)]}),void 0)};
2
2
  //# sourceMappingURL=SizeSelector.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.24.2",
6
+ "version": "7.24.4",
7
7
  "private": false,
8
8
  "main": "build/lib/index.js",
9
9
  "style": "build/es/index.css",