@trafilea/afrodita-components 7.10.4 → 7.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es/components/motivator-progress-bar/MotivatorProgressBar.js +1 -1
- package/build/es/components/size/guide/SizeFitGuide.js +1 -1
- package/build/es/components/text-button/TextButton.js +1 -1
- package/build/index.d.ts +14 -5
- package/build/lib/components/motivator-progress-bar/MotivatorProgressBar.js +1 -1
- package/build/lib/components/size/guide/SizeFitGuide.js +1 -1
- package/build/lib/components/text-button/TextButton.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as n,__assign as
|
|
1
|
+
import{__makeTemplateObject as n,__spreadArray as r,__assign as o}from"tslib";import{jsxs as t,jsx as e}from"react/jsx-runtime";import i from"@emotion/styled";import d from"html-react-parser";import{useTheme as a}from"../../core/theme/Theme.js";var l,c,u=i.div(l||(l=n(["\n @keyframes loading {\n 0% {\n transform: translateX(0);\n }\n to {\n transform: translateX(400%);\n }\n }\n\n height: ",";\n background-color: ",";\n width: ",";\n border-radius: ",";\n left: ",";\n animation: ",";\n"],["\n @keyframes loading {\n 0% {\n transform: translateX(0);\n }\n to {\n transform: translateX(400%);\n }\n }\n\n height: ",";\n background-color: ",";\n width: ",";\n border-radius: ",";\n left: ",";\n animation: ",";\n"])),(function(n){return n.height||"0.5rem"}),(function(n){return n.backgroundColor}),(function(n){var r=n.percent;return r?v(r):"50%"}),(function(n){return n.borderRadius||"0.25rem"}),(function(n){return n.percent?"0":"-50%"}),(function(n){return n.percent?"none":"loading 1s ease-in 0.5s infinite"})),s=i.div((function(n){var r=n.backgroundColor;return{height:n.height||"0.5rem",width:"100%",backgroundColor:r,borderRadius:n.borderRadius||"0.25rem"}})),h=i.div({display:"grid",gridTemplateColumns:"1fr 10fr 1fr",justifyContent:"center",alignItems:"center",width:"416px",gap:"8px",maxWidth:"100%",padding:"0 16px",position:"relative"}),g=i.div((function(n){return{width:"475px",maxWidth:"100%",display:"flex",gap:"13px",padding:"16px 0",flexDirection:"column",alignItems:"center",background:n.backgroundColor}})),f=i.div(c||(c=n(["\n padding: 0 1rem;\n text-align: center;\n"],["\n padding: 0 1rem;\n text-align: center;\n"]))),v=function(n){return n<=100&&n>=0?"".concat(n,"%"):"0%"},m=i.div((function(n){return{fontWeight:n.isBold?600:400}})),p=i.div((function(n){var r=n.position,o=n.backgroundColor;return{position:"absolute",left:"calc(".concat(r,"% - 25.5px)"),top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",width:"27px",height:"27px",borderRadius:"50%",backgroundColor:o||"#FFFFFF",border:"2px solid #FFFFFF",boxShadow:"0 0 0 1px ".concat(o),zIndex:2,overflow:"hidden",flexShrink:0,"& > *":{maxWidth:"100%",maxHeight:"100%",flexShrink:0}}})),b=i.div({position:"relative",width:"100%",overflow:"visible"}),x=function(n,r){var o=n/r;return o>1?100:100*o},C=function(n){var i,l=n.fillColor,c=void 0===l?"#F7A08B":l,v=n.backgroundColor,C=void 0===v?"#F7F7F7":v,k=n.unfilledColor,F=void 0===k?"#EEBFBD":k,B=n.currencyCode,y=void 0===B?"$":B,w=n.endingValue,M=void 0===w?70:w,S=n.currentAmount,A=void 0===S?0:S,I=n.rewardUnlockedMessage,P=n.isClubBarMotivatorTest,D=void 0!==P&&P,T=n.remainingAmountMessage,j=n.hasProgressBar,R=void 0===j||j,W=n.thresholds,X=a(),E=W&&W.length>0?function(n){return r([],n,!0).sort((function(n,r){return n.threshold-r.threshold}))}(W):void 0,H=function(n,r){if(r&&0!==r.length){var o=r.find((function(r){return n<r.threshold}));return null==o?void 0:o.threshold}}(A,E),_=function(n,r){if(r&&0!==r.length)for(var o=r.length-1;o>=0;o--)if(n>=r[o].threshold)return r[o]}(A,E),z=E&&void 0!==H?H:M,L=null===(i=null==E?void 0:E[0])||void 0===i?void 0:i.threshold,U=void 0!==L&&A>=L,V=E?E[E.length-1].threshold:M,Y=A>=z,$=x(A,z);return t(g,o({backgroundColor:C},{children:[R&&t(h,o({"data-testid":"MPBContainer"},{children:[t(m,{children:[y,A]},void 0),t(b,{children:[e(s,o({backgroundColor:F||X.colors.shades[100].color,"data-testid":"MPBBackground"},{children:e(u,{"data-testid":"MPBBar",backgroundColor:c,percent:$},void 0)}),void 0),U&&(null==E?void 0:E.map((function(n,r){var t=x(n.threshold,V),i=function(n,r,o){return r>=n.threshold?n.iconBackgroundColor||o:"#D1D1D1"}(n,A,c);return e(p,o({position:t,backgroundColor:i,"data-testid":"MPBThresholdIcon-".concat(r)},{children:n.icon}),"threshold-".concat(r,"-").concat(n.threshold))})))]},void 0),t(m,o({isBold:!0},{children:[y,z]}),void 0)]}),void 0),Y?e(f,{dangerouslySetInnerHTML:{__html:I}},void 0):function(){var n,r,o=E&&void 0!==H?H:M,i=Math.round(100*(o-A))/100;if(D)return t(f,{children:["Spend ",y,i," more to unlock ",e("strong",{children:"Free Priority Shipping"},void 0)," with Club!"]},void 0);var a=null!==(r=null!==(n=null==_?void 0:_.remainingAmountMessage)&&void 0!==n?n:T)&&void 0!==r?r:"Spend currencyCoderemainingAmount more to get <strong>Free Shipping</strong>";return a=(a=a.replace("currencyCode",y)).replace("remainingAmount",i.toString()),e(f,{children:d(a)},void 0)}()]}),void 0)};export{C as MotivatorProgressBar};
|
|
2
2
|
//# sourceMappingURL=MotivatorProgressBar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as n,__assign as e}from"tslib";import{jsxs as t,jsx as i}from"react/jsx-runtime";import o from"@emotion/styled";import{ComponentSize as r}from"../../../types/enums.js";import{Icon as
|
|
1
|
+
import{__makeTemplateObject as n,__assign as e}from"tslib";import{jsxs as t,jsx as i}from"react/jsx-runtime";import o from"@emotion/styled";import{ComponentSize as r}from"../../../types/enums.js";import{Icon as l}from"../../icons/index.js";import c from"../../text-button/TextButton.js";var s,m,d,a=o.div(s||(s=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 0.88rem;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 0.88rem;\n"]))),p=o.p(m||(m=n(["\n margin: 0 0 0 10px;\n"],["\n margin: 0 0 0 10px;\n"]))),f=o.span(d||(d=n(["\n font-weight: 700;\n text-decoration-line: underline;\n cursor: pointer;\n"],["\n font-weight: 700;\n text-decoration-line: underline;\n cursor: pointer;\n"]))),u=function(n){var o=n.title,s=n.fitPercentage,m=n.onClick,d=n.onClickFitPercentage,u=n.hideIcon,x=void 0!==u&&u,v=n.htmlContent,g=v?void 0:o,h=x?void 0:l.PDP.Rule;return t(a,{children:[i(c,{LeadingIcon:h,size:r.Small,text:g,onClick:m,uppercase:!1,htmlContent:v},void 0),!!s&&t(p,{children:["Fit As Expected:"," ",t(f,e({onClick:d,role:"button"},{children:[s,"%"]}),void 0)]},void 0)]},void 0)};export{u as default};
|
|
2
2
|
//# sourceMappingURL=SizeFitGuide.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__makeTemplateObject as n}from"tslib";import{jsx as t}from"@emotion/react/jsx-runtime";import{css as o}from"@emotion/react";import{useTheme as r}from"../../core/theme/Theme.js";import{ComponentSize as i}from"../../types/enums.js";import s from"../shared/button/BaseButton.js";var a,c=function(n,t){var o=function(e){switch(e){case i.Large:case i.Medium:return{fontSize:"1rem"};case i.Small:default:return{fontSize:"14px"}}}(t);return e(e({border:"none",background:"transparent",padding:0,color:n.colors.shades[550].color,alignItems:"center",fontFamily:n.fonts.config[0].family,lineHeight:n.component.textButton.lineHeight,fontWeight:n.component.textButton.fontWeight,textDecorationLine:"underline"},o),{"&:disabled":{color:n.colors.shades[250].color,textDecorationLine:"none"}})},l=function(r,i,s){return s&&t("span",e({css:o(a||(a=n(["\n display: flex;\n align-items: center;\n ","\n "],["\n display: flex;\n align-items: center;\n ","\n "])),i?"margin-right: 5px":"margin-left: 5px")},{children:t(s,{width:1.25,height:1.25,fill:r},void 0)}),void 0)},d=function(n){var o=n.text,a=n.LeadingIcon,d=n.TrailingIcon,m=n.iconColor,f=n.disabled,u=n.type,p=n.size,g=void 0===p?i.Medium:p,h=n.uppercase,x=void 0===h||h,v=n.onClick,b=n.testId,y=r(),
|
|
1
|
+
import{__assign as e,__makeTemplateObject as n}from"tslib";import{jsx as t}from"@emotion/react/jsx-runtime";import{css as o}from"@emotion/react";import{useTheme as r}from"../../core/theme/Theme.js";import{ComponentSize as i}from"../../types/enums.js";import s from"../shared/button/BaseButton.js";var a,c=function(n,t){var o=function(e){switch(e){case i.Large:case i.Medium:return{fontSize:"1rem"};case i.Small:default:return{fontSize:"14px"}}}(t);return e(e({border:"none",background:"transparent",padding:0,color:n.colors.shades[550].color,alignItems:"center",fontFamily:n.fonts.config[0].family,lineHeight:n.component.textButton.lineHeight,fontWeight:n.component.textButton.fontWeight,textDecorationLine:"underline"},o),{"&:disabled":{color:n.colors.shades[250].color,textDecorationLine:"none"}})},l=function(r,i,s){return s&&t("span",e({css:o(a||(a=n(["\n display: flex;\n align-items: center;\n ","\n "],["\n display: flex;\n align-items: center;\n ","\n "])),i?"margin-right: 5px":"margin-left: 5px")},{children:t(s,{width:1.25,height:1.25,fill:r},void 0)}),void 0)},d=function(n){var o=n.text,a=n.LeadingIcon,d=n.TrailingIcon,m=n.iconColor,f=n.disabled,u=n.type,p=n.size,g=void 0===p?i.Medium:p,h=n.uppercase,x=void 0===h||h,v=n.onClick,b=n.testId,y=n.htmlContent,I=r(),L=function(e,n,t){return n?e.colors.shades[250].color:t||e.colors.shades[550].color}(I,f,m),j=l(L,!0,a),B=l(L,!1,d);return t(s,e({renderLeading:j,renderTrailing:B,disabled:f,type:u,onClick:v,css:c(I,g),uppercase:x,testId:b},{children:y||o}),void 0)};export{d as default};
|
|
2
2
|
//# sourceMappingURL=TextButton.js.map
|
package/build/index.d.ts
CHANGED
|
@@ -3586,6 +3586,12 @@ declare const useModal: (id: string) => {
|
|
|
3586
3586
|
close: () => void;
|
|
3587
3587
|
};
|
|
3588
3588
|
|
|
3589
|
+
interface ProgressThreshold {
|
|
3590
|
+
icon: React.ReactNode;
|
|
3591
|
+
threshold: number;
|
|
3592
|
+
iconBackgroundColor?: string;
|
|
3593
|
+
remainingAmountMessage?: string;
|
|
3594
|
+
}
|
|
3589
3595
|
interface MotivatorProgressBarProps {
|
|
3590
3596
|
fillColor?: string;
|
|
3591
3597
|
currentAmount?: number;
|
|
@@ -3598,8 +3604,9 @@ interface MotivatorProgressBarProps {
|
|
|
3598
3604
|
isClubBarMotivatorTest?: boolean;
|
|
3599
3605
|
remainingAmountMessage?: string;
|
|
3600
3606
|
hasProgressBar?: boolean;
|
|
3607
|
+
thresholds?: ProgressThreshold[];
|
|
3601
3608
|
}
|
|
3602
|
-
declare const MotivatorProgressBar: ({ fillColor, backgroundColor, unfilledColor, currencyCode, endingValue, currentAmount, rewardUnlockedMessage, isClubBarMotivatorTest, remainingAmountMessage, hasProgressBar, }: MotivatorProgressBarProps) => JSX.Element;
|
|
3609
|
+
declare const MotivatorProgressBar: ({ fillColor, backgroundColor, unfilledColor, currencyCode, endingValue, currentAmount, rewardUnlockedMessage, isClubBarMotivatorTest, remainingAmountMessage, hasProgressBar, thresholds, }: MotivatorProgressBarProps) => JSX.Element;
|
|
3603
3610
|
|
|
3604
3611
|
interface OrderBarProps {
|
|
3605
3612
|
message: string;
|
|
@@ -3942,13 +3949,14 @@ interface TableProps$2 {
|
|
|
3942
3949
|
declare const SizeTable: ({ headers, data, className }: TableProps$2) => JSX.Element;
|
|
3943
3950
|
|
|
3944
3951
|
interface SizeFitGuideProps {
|
|
3945
|
-
title
|
|
3952
|
+
title?: string;
|
|
3946
3953
|
fitPercentage?: number;
|
|
3947
3954
|
onClick: () => void;
|
|
3948
3955
|
onClickFitPercentage?: () => void;
|
|
3949
3956
|
hideIcon?: boolean;
|
|
3957
|
+
htmlContent?: JSX.Element;
|
|
3950
3958
|
}
|
|
3951
|
-
declare const SizeFitGuide: ({ title, fitPercentage, onClick, onClickFitPercentage, hideIcon, }: SizeFitGuideProps) => JSX.Element;
|
|
3959
|
+
declare const SizeFitGuide: ({ title, fitPercentage, onClick, onClickFitPercentage, hideIcon, htmlContent, }: SizeFitGuideProps) => JSX.Element;
|
|
3952
3960
|
|
|
3953
3961
|
declare type Size = 'S' | 'XS / S' | 'M' | 'M / L' | 'L' | 'XL' | 'XL / 2XL' | '2XL' | '3XL' | '4XL';
|
|
3954
3962
|
declare type SizeTip = {
|
|
@@ -4079,14 +4087,15 @@ interface BaseButtonProps {
|
|
|
4079
4087
|
|
|
4080
4088
|
declare type BaseProps = Pick<BaseButtonProps, 'disabled' | 'type' | 'onClick' | 'testId'>;
|
|
4081
4089
|
interface TextButtonProps$1 extends BaseProps {
|
|
4082
|
-
text
|
|
4090
|
+
text?: string;
|
|
4083
4091
|
LeadingIcon?: IconType;
|
|
4084
4092
|
TrailingIcon?: IconType;
|
|
4085
4093
|
iconColor?: string;
|
|
4086
4094
|
size?: ComponentSize;
|
|
4087
4095
|
uppercase?: boolean;
|
|
4096
|
+
htmlContent?: JSX.Element;
|
|
4088
4097
|
}
|
|
4089
|
-
declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, uppercase, onClick, testId, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4098
|
+
declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, uppercase, onClick, testId, htmlContent, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4090
4099
|
|
|
4091
4100
|
declare const Text: ({ variant, children, testId, asSpan, ...allProps }: TextProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4092
4101
|
declare type TextHeroProps = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),r=require("react/jsx-runtime"),e=require("@emotion/styled"),t=require("html-react-parser"),o=require("../../core/theme/Theme.js");function i(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var d,a,l=i(e),s=i(t),u=l.default.div(d||(d=n.__makeTemplateObject(["\n @keyframes loading {\n 0% {\n transform: translateX(0);\n }\n to {\n transform: translateX(400%);\n }\n }\n\n height: ",";\n background-color: ",";\n width: ",";\n border-radius: ",";\n left: ",";\n animation: ",";\n"],["\n @keyframes loading {\n 0% {\n transform: translateX(0);\n }\n to {\n transform: translateX(400%);\n }\n }\n\n height: ",";\n background-color: ",";\n width: ",";\n border-radius: ",";\n left: ",";\n animation: ",";\n"])),(function(n){return n.height||"0.5rem"}),(function(n){return n.backgroundColor}),(function(n){var r=n.percent;return r?v(r):"50%"}),(function(n){return n.borderRadius||"0.25rem"}),(function(n){return n.percent?"0":"-50%"}),(function(n){return n.percent?"none":"loading 1s ease-in 0.5s infinite"})),c=l.default.div((function(n){var r=n.backgroundColor;return{height:n.height||"0.5rem",width:"100%",backgroundColor:r,borderRadius:n.borderRadius||"0.25rem"}})),h=l.default.div({display:"grid",gridTemplateColumns:"1fr 10fr 1fr",justifyContent:"center",alignItems:"center",width:"416px",gap:"8px",maxWidth:"100%",padding:"0 16px",position:"relative"}),g=l.default.div((function(n){return{width:"475px",maxWidth:"100%",display:"flex",gap:"13px",padding:"16px 0",flexDirection:"column",alignItems:"center",background:n.backgroundColor}})),f=l.default.div(a||(a=n.__makeTemplateObject(["\n padding: 0 1rem;\n text-align: center;\n"],["\n padding: 0 1rem;\n text-align: center;\n"]))),v=function(n){return n<=100&&n>=0?"".concat(n,"%"):"0%"},m=l.default.div((function(n){return{fontWeight:n.isBold?600:400}})),p=l.default.div((function(n){var r=n.position,e=n.backgroundColor;return{position:"absolute",left:"calc(".concat(r,"% - 25.5px)"),top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",width:"27px",height:"27px",borderRadius:"50%",backgroundColor:e||"#FFFFFF",border:"2px solid #FFFFFF",boxShadow:"0 0 0 1px ".concat(e),zIndex:2,overflow:"hidden",flexShrink:0,"& > *":{maxWidth:"100%",maxHeight:"100%",flexShrink:0}}})),x=l.default.div({position:"relative",width:"100%",overflow:"visible"}),b=function(n,r){var e=n/r;return e>1?100:100*e};exports.MotivatorProgressBar=function(e){var t,i=e.fillColor,d=void 0===i?"#F7A08B":i,a=e.backgroundColor,l=void 0===a?"#F7F7F7":a,v=e.unfilledColor,k=void 0===v?"#EEBFBD":v,C=e.currencyCode,j=void 0===C?"$":C,_=e.endingValue,F=void 0===_?70:_,y=e.currentAmount,B=void 0===y?0:y,w=e.rewardUnlockedMessage,M=e.isClubBarMotivatorTest,S=void 0!==M&&M,P=e.remainingAmountMessage,T=e.hasProgressBar,A=void 0===T||T,I=e.thresholds,q=o.useTheme(),D=I&&I.length>0?function(r){return n.__spreadArray([],r,!0).sort((function(n,r){return n.threshold-r.threshold}))}(I):void 0,R=function(n,r){if(r&&0!==r.length){var e=r.find((function(r){return n<r.threshold}));return null==e?void 0:e.threshold}}(B,D),W=function(n,r){if(r&&0!==r.length)for(var e=r.length-1;e>=0;e--)if(n>=r[e].threshold)return r[e]}(B,D),X=D&&void 0!==R?R:F,O=null===(t=null==D?void 0:D[0])||void 0===t?void 0:t.threshold,E=void 0!==O&&B>=O,H=D?D[D.length-1].threshold:F,z=B>=X,L=b(B,X);return r.jsxs(g,n.__assign({backgroundColor:l},{children:[A&&r.jsxs(h,n.__assign({"data-testid":"MPBContainer"},{children:[r.jsxs(m,{children:[j,B]},void 0),r.jsxs(x,{children:[r.jsx(c,n.__assign({backgroundColor:k||q.colors.shades[100].color,"data-testid":"MPBBackground"},{children:r.jsx(u,{"data-testid":"MPBBar",backgroundColor:d,percent:L},void 0)}),void 0),E&&(null==D?void 0:D.map((function(e,t){var o=b(e.threshold,H),i=function(n,r,e){return r>=n.threshold?n.iconBackgroundColor||e:"#D1D1D1"}(e,B,d);return r.jsx(p,n.__assign({position:o,backgroundColor:i,"data-testid":"MPBThresholdIcon-".concat(t)},{children:e.icon}),"threshold-".concat(t,"-").concat(e.threshold))})))]},void 0),r.jsxs(m,n.__assign({isBold:!0},{children:[j,X]}),void 0)]}),void 0),z?r.jsx(f,{dangerouslySetInnerHTML:{__html:w}},void 0):function(){var n,e,t=D&&void 0!==R?R:F,o=Math.round(100*(t-B))/100;if(S)return r.jsxs(f,{children:["Spend ",j,o," more to unlock ",r.jsx("strong",{children:"Free Priority Shipping"},void 0)," with Club!"]},void 0);var i=null!==(e=null!==(n=null==W?void 0:W.remainingAmountMessage)&&void 0!==n?n:P)&&void 0!==e?e:"Spend currencyCoderemainingAmount more to get <strong>Free Shipping</strong>";return i=(i=i.replace("currencyCode",j)).replace("remainingAmount",o.toString()),r.jsx(f,{children:s.default(i)},void 0)}()]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=MotivatorProgressBar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("tslib"),n=require("react/jsx-runtime"),t=require("@emotion/styled"),i=require("../../../types/enums.js"),r=require("../../icons/index.js"),o=require("../../text-button/TextButton.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c,
|
|
1
|
+
"use strict";var e=require("tslib"),n=require("react/jsx-runtime"),t=require("@emotion/styled"),i=require("../../../types/enums.js"),r=require("../../icons/index.js"),o=require("../../text-button/TextButton.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l,c,a,u=s(t),d=u.default.div(l||(l=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 0.88rem;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 0.88rem;\n"]))),m=u.default.p(c||(c=e.__makeTemplateObject(["\n margin: 0 0 0 10px;\n"],["\n margin: 0 0 0 10px;\n"]))),p=u.default.span(a||(a=e.__makeTemplateObject(["\n font-weight: 700;\n text-decoration-line: underline;\n cursor: pointer;\n"],["\n font-weight: 700;\n text-decoration-line: underline;\n cursor: pointer;\n"])));module.exports=function(t){var s=t.title,l=t.fitPercentage,c=t.onClick,a=t.onClickFitPercentage,u=t.hideIcon,f=void 0!==u&&u,x=t.htmlContent,j=x?void 0:s,v=f?void 0:r.Icon.PDP.Rule;return n.jsxs(d,{children:[n.jsx(o,{LeadingIcon:v,size:i.ComponentSize.Small,text:j,onClick:c,uppercase:!1,htmlContent:x},void 0),!!l&&n.jsxs(m,{children:["Fit As Expected:"," ",n.jsxs(p,e.__assign({onClick:a,role:"button"},{children:[l,"%"]}),void 0)]},void 0)]},void 0)};
|
|
2
2
|
//# sourceMappingURL=SizeFitGuide.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e,n=require("tslib"),t=require("@emotion/react/jsx-runtime"),i=require("@emotion/react"),o=require("../../core/theme/Theme.js"),r=require("../../types/enums.js"),s=require("../shared/button/BaseButton.js"),a=function(e,t){var i=function(e){switch(e){case r.ComponentSize.Large:case r.ComponentSize.Medium:return{fontSize:"1rem"};case r.ComponentSize.Small:default:return{fontSize:"14px"}}}(t);return n.__assign(n.__assign({border:"none",background:"transparent",padding:0,color:e.colors.shades[550].color,alignItems:"center",fontFamily:e.fonts.config[0].family,lineHeight:e.component.textButton.lineHeight,fontWeight:e.component.textButton.fontWeight,textDecorationLine:"underline"},i),{"&:disabled":{color:e.colors.shades[250].color,textDecorationLine:"none"}})},c=function(o,r,s){return s&&t.jsx("span",n.__assign({css:i.css(e||(e=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n ","\n "],["\n display: flex;\n align-items: center;\n ","\n "])),r?"margin-right: 5px":"margin-left: 5px")},{children:t.jsx(s,{width:1.25,height:1.25,fill:o},void 0)}),void 0)};module.exports=function(e){var i=e.text,l=e.LeadingIcon,d=e.TrailingIcon,u=e.iconColor,m=e.disabled,g=e.type,p=e.size,h=void 0===p?r.ComponentSize.Medium:p,f=e.uppercase,x=void 0===f||f,_=e.onClick,b=e.testId,j=o.useTheme(),
|
|
1
|
+
"use strict";var e,n=require("tslib"),t=require("@emotion/react/jsx-runtime"),i=require("@emotion/react"),o=require("../../core/theme/Theme.js"),r=require("../../types/enums.js"),s=require("../shared/button/BaseButton.js"),a=function(e,t){var i=function(e){switch(e){case r.ComponentSize.Large:case r.ComponentSize.Medium:return{fontSize:"1rem"};case r.ComponentSize.Small:default:return{fontSize:"14px"}}}(t);return n.__assign(n.__assign({border:"none",background:"transparent",padding:0,color:e.colors.shades[550].color,alignItems:"center",fontFamily:e.fonts.config[0].family,lineHeight:e.component.textButton.lineHeight,fontWeight:e.component.textButton.fontWeight,textDecorationLine:"underline"},i),{"&:disabled":{color:e.colors.shades[250].color,textDecorationLine:"none"}})},c=function(o,r,s){return s&&t.jsx("span",n.__assign({css:i.css(e||(e=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n ","\n "],["\n display: flex;\n align-items: center;\n ","\n "])),r?"margin-right: 5px":"margin-left: 5px")},{children:t.jsx(s,{width:1.25,height:1.25,fill:o},void 0)}),void 0)};module.exports=function(e){var i=e.text,l=e.LeadingIcon,d=e.TrailingIcon,u=e.iconColor,m=e.disabled,g=e.type,p=e.size,h=void 0===p?r.ComponentSize.Medium:p,f=e.uppercase,x=void 0===f||f,_=e.onClick,b=e.testId,j=e.htmlContent,v=o.useTheme(),C=function(e,n,t){return n?e.colors.shades[250].color:t||e.colors.shades[550].color}(v,m,u),y=c(C,!0,l),z=c(C,!1,d);return t.jsx(s,n.__assign({renderLeading:y,renderTrailing:z,disabled:m,type:g,onClick:_,css:a(v,h),uppercase:x,testId:b},{children:j||i}),void 0)};
|
|
2
2
|
//# sourceMappingURL=TextButton.js.map
|
package/package.json
CHANGED