@trafilea/afrodita-components 7.25.6 → 7.25.7

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 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};
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,TooltipContent as a,NumericTooltip as m}from"./styles/ColorPickerwithTootip.styled.js";var d=function(d){var c,p=d.options,v=void 0===p?[]:p,u=d.selectedValue,h=d.label,b=d.onChange,g=d.inline,j=void 0!==g&&g,f=d.maxVisibleOptions,C=void 0===f?5:f,w=d.showCross,y=d.className,L=d.tooltipOptions,P=d.translatedLabels,I=v.slice(0,C),x=v.slice(C),T=(null!=L?L:{}).showCloseIcon,O=(null==L?void 0:L.numeric)?null==x?void 0:x.length:0,N=u?null!==(c=null==P?void 0:P[u.label])&&void 0!==c?c:u.label:void 0;return i(n,o({className:y,value:u,onChange:b,css:{flexDirection:j?"row":"column",alignItems:j?"center":"start"}},{children:[e(l.Label,{label:h,values:N&&!j?N:void 0},void 0),i(l.OptionsContainer,o({css:{marginTop:j?"0":"0.63rem",marginLeft:j?"1.5rem":"0"},"data-testid":"radio-group-options-container"},{children:[s(I,w,void 0,P),!!x.length&&e("div",o({style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:e(t,o({showCloseIcon:T,position:1,elementContent:e(a,o({className:"tooltip-content"},{children:s(x,w,void 0,P)}),void 0),withArrow:!0},{children:(null==L?void 0:L.numeric)?i(m,o({"data-testid":"numeric-tooltip"},{children:["+",O]}),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{d as default};
2
2
  //# sourceMappingURL=ColorPickerWithTooltip.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"tslib";import t from"@emotion/styled";import e from"../ColorRadioGroup.js";var i,o,r=t(e)(i||(i=n(["\n position: relative;\n max-width: 300px;\n\n .tooltip-container {\n position: absolute;\n transform: translateX(-30%);\n &::before,\n &::after {\n left: 80%;\n }\n }\n\n .arrow {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-bottom: 10px;\n }\n\n .tooltip-content {\n display: flex;\n max-width: 300px;\n flex-wrap: wrap;\n }\n"],["\n position: relative;\n max-width: 300px;\n\n .tooltip-container {\n position: absolute;\n transform: translateX(-30%);\n &::before,\n &::after {\n left: 80%;\n }\n }\n\n .arrow {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-bottom: 10px;\n }\n\n .tooltip-content {\n display: flex;\n max-width: 300px;\n flex-wrap: wrap;\n }\n"]))),l=t.div(o||(o=n(["\n display: flex;\n flex-direction: column;\n align-items: center;\n\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: center;\n height: 100%;\n"],["\n display: flex;\n flex-direction: column;\n align-items: center;\n\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: center;\n height: 100%;\n"])));export{r as ColorPickerWrapper,l as NumericTooltip};
1
+ import{__makeTemplateObject as n}from"tslib";import e from"@emotion/styled";import t from"../ColorRadioGroup.js";var i,o,r,l=e(t)(i||(i=n(["\n position: relative;\n max-width: 300px;\n\n .tooltip-container {\n position: absolute;\n transform: translateX(-30%);\n &::before,\n &::after {\n left: 80%;\n }\n }\n\n .arrow {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-bottom: 10px;\n }\n"],["\n position: relative;\n max-width: 300px;\n\n .tooltip-container {\n position: absolute;\n transform: translateX(-30%);\n &::before,\n &::after {\n left: 80%;\n }\n }\n\n .arrow {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-bottom: 10px;\n }\n"]))),a=e.div(o||(o=n(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n gap: 8px;\n\n > [role='radio'] {\n display: inline-flex;\n margin: 0;\n }\n"],["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n gap: 8px;\n\n > [role='radio'] {\n display: inline-flex;\n margin: 0;\n }\n"]))),p=e.div(r||(r=n(["\n display: flex;\n flex-direction: column;\n align-items: center;\n\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: center;\n height: 100%;\n"],["\n display: flex;\n flex-direction: column;\n align-items: center;\n\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: center;\n height: 100%;\n"])));export{l as ColorPickerWrapper,p as NumericTooltip,a as TooltipContent};
2
2
  //# sourceMappingURL=ColorPickerwithTootip.styled.js.map
@@ -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,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)};
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 o=require("../atoms/Icon/Icon.js");require("../atoms/Image/styled.js"),require("../atoms/PriceLabelV2/PriceLabelV2.js"),require("../atoms/Toggle/toggle.styled.js");var s=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,p=n.inline,j=void 0!==p&&p,g=n.maxVisibleOptions,h=void 0===g?5:g,b=n.showCross,q=n.className,C=n.tooltipOptions,x=n.translatedLabels,_=c.slice(0,h),w=c.slice(h),y=(null!=C?C:{}).showCloseIcon,f=(null==C?void 0:C.numeric)?null==w?void 0:w.length:0,L=u?null!==(a=null==x?void 0:x[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:j?"row":"column",alignItems:j?"center":"start"}},{children:[i.jsx(s.Label,{label:m,values:L&&!j?L:void 0},void 0),i.jsxs(s.OptionsContainer,e.__assign({css:{marginTop:j?"0":"0.63rem",marginLeft:j?"1.5rem":"0"},"data-testid":"radio-group-options-container"},{children:[t.renderOptions(_,b,void 0,x),!!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(l.TooltipContent,e.__assign({className:"tooltip-content"},{children:t.renderOptions(w,b,void 0,x)}),void 0),withArrow:!0},{children:(null==C?void 0:C.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(o.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";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("@emotion/styled"),t=require("../ColorRadioGroup.js");function i(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var o,r,a=i(e),l=a.default(t)(o||(o=n.__makeTemplateObject(["\n position: relative;\n max-width: 300px;\n\n .tooltip-container {\n position: absolute;\n transform: translateX(-30%);\n &::before,\n &::after {\n left: 80%;\n }\n }\n\n .arrow {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-bottom: 10px;\n }\n\n .tooltip-content {\n display: flex;\n max-width: 300px;\n flex-wrap: wrap;\n }\n"],["\n position: relative;\n max-width: 300px;\n\n .tooltip-container {\n position: absolute;\n transform: translateX(-30%);\n &::before,\n &::after {\n left: 80%;\n }\n }\n\n .arrow {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-bottom: 10px;\n }\n\n .tooltip-content {\n display: flex;\n max-width: 300px;\n flex-wrap: wrap;\n }\n"]))),p=a.default.div(r||(r=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: center;\n height: 100%;\n"],["\n display: flex;\n flex-direction: column;\n align-items: center;\n\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: center;\n height: 100%;\n"])));exports.ColorPickerWrapper=l,exports.NumericTooltip=p;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("@emotion/styled"),t=require("../ColorRadioGroup.js");function i(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var r,o,l,a=i(e),p=a.default(t)(r||(r=n.__makeTemplateObject(["\n position: relative;\n max-width: 300px;\n\n .tooltip-container {\n position: absolute;\n transform: translateX(-30%);\n &::before,\n &::after {\n left: 80%;\n }\n }\n\n .arrow {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-bottom: 10px;\n }\n"],["\n position: relative;\n max-width: 300px;\n\n .tooltip-container {\n position: absolute;\n transform: translateX(-30%);\n &::before,\n &::after {\n left: 80%;\n }\n }\n\n .arrow {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-bottom: 10px;\n }\n"]))),s=a.default.div(o||(o=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n gap: 8px;\n\n > [role='radio'] {\n display: inline-flex;\n margin: 0;\n }\n"],["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n gap: 8px;\n\n > [role='radio'] {\n display: inline-flex;\n margin: 0;\n }\n"]))),f=a.default.div(l||(l=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: center;\n height: 100%;\n"],["\n display: flex;\n flex-direction: column;\n align-items: center;\n\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: center;\n height: 100%;\n"])));exports.ColorPickerWrapper=p,exports.NumericTooltip=f,exports.TooltipContent=s;
2
2
  //# sourceMappingURL=ColorPickerwithTootip.styled.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.25.6",
6
+ "version": "7.25.7",
7
7
  "private": false,
8
8
  "main": "build/lib/index.js",
9
9
  "style": "build/es/index.css",