@trafilea/afrodita-components 7.10.4 → 7.10.6
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/size/guide/SizeFitGuide.js +1 -1
- package/build/es/components/text-button/TextButton.js +1 -1
- package/build/index.d.ts +6 -4
- 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 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
|
@@ -3942,13 +3942,14 @@ interface TableProps$2 {
|
|
|
3942
3942
|
declare const SizeTable: ({ headers, data, className }: TableProps$2) => JSX.Element;
|
|
3943
3943
|
|
|
3944
3944
|
interface SizeFitGuideProps {
|
|
3945
|
-
title
|
|
3945
|
+
title?: string;
|
|
3946
3946
|
fitPercentage?: number;
|
|
3947
3947
|
onClick: () => void;
|
|
3948
3948
|
onClickFitPercentage?: () => void;
|
|
3949
3949
|
hideIcon?: boolean;
|
|
3950
|
+
htmlContent?: JSX.Element;
|
|
3950
3951
|
}
|
|
3951
|
-
declare const SizeFitGuide: ({ title, fitPercentage, onClick, onClickFitPercentage, hideIcon, }: SizeFitGuideProps) => JSX.Element;
|
|
3952
|
+
declare const SizeFitGuide: ({ title, fitPercentage, onClick, onClickFitPercentage, hideIcon, htmlContent, }: SizeFitGuideProps) => JSX.Element;
|
|
3952
3953
|
|
|
3953
3954
|
declare type Size = 'S' | 'XS / S' | 'M' | 'M / L' | 'L' | 'XL' | 'XL / 2XL' | '2XL' | '3XL' | '4XL';
|
|
3954
3955
|
declare type SizeTip = {
|
|
@@ -4079,14 +4080,15 @@ interface BaseButtonProps {
|
|
|
4079
4080
|
|
|
4080
4081
|
declare type BaseProps = Pick<BaseButtonProps, 'disabled' | 'type' | 'onClick' | 'testId'>;
|
|
4081
4082
|
interface TextButtonProps$1 extends BaseProps {
|
|
4082
|
-
text
|
|
4083
|
+
text?: string;
|
|
4083
4084
|
LeadingIcon?: IconType;
|
|
4084
4085
|
TrailingIcon?: IconType;
|
|
4085
4086
|
iconColor?: string;
|
|
4086
4087
|
size?: ComponentSize;
|
|
4087
4088
|
uppercase?: boolean;
|
|
4089
|
+
htmlContent?: JSX.Element;
|
|
4088
4090
|
}
|
|
4089
|
-
declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, uppercase, onClick, testId, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4091
|
+
declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, uppercase, onClick, testId, htmlContent, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4090
4092
|
|
|
4091
4093
|
declare const Text: ({ variant, children, testId, asSpan, ...allProps }: TextProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4092
4094
|
declare type TextHeroProps = {
|
|
@@ -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