@trafilea/afrodita-components 7.10.3 → 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.
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as t}from"@emotion/react/jsx-runtime";var i=function(i){var n=i.children,r=i.renderLeading,o=i.renderTrailing,a=i.disabled,d=i.type,s=void 0===d?"button":d,l=i.onClick,c=i.className,m=i.inline,p=i.uppercase,u=void 0===p||p,b=i.testId,f=void 0===b?"base-button":b,x=i.id;return t("button",e({onClick:l,disabled:a,className:c,type:s,"data-testid":f,css:{display:m?"inline-flex":"flex",justifyContent:"center",alignItems:"center",padding:"0.75rem 2rem",textDecoration:"none",textTransform:u?"uppercase":"unset",boxSizing:"border-box",cursor:"pointer"},id:x},{children:[r,n,o]}),void 0)};export{i as default};
1
+ import{__assign as e}from"tslib";import{jsxs as i}from"@emotion/react/jsx-runtime";var r=function(r){var t=r.children,n=r.renderLeading,a=r.renderTrailing,d=r.disabled,o=r.type,s=void 0===o?"button":o,c=r.onClick,l=r.className,b=r.inline,m=r.uppercase,p=void 0===m||m,u=r.testId,f=void 0===u?"base-button":u,x=r.id,v=r["aria-describedby"];return i("button",e({onClick:c,disabled:d,className:l,type:s,"data-testid":f,css:{display:b?"inline-flex":"flex",justifyContent:"center",alignItems:"center",padding:"0.75rem 2rem",textDecoration:"none",textTransform:p?"uppercase":"unset",boxSizing:"border-box",cursor:"pointer"},id:x,"aria-describedby":v},{children:[n,t,a]}),void 0)};export{r as default};
2
2
  //# sourceMappingURL=BaseButton.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 c}from"../../icons/index.js";import s from"../../text-button/TextButton.js";var l,d,m,a=o.div(l||(l=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(d||(d=n(["\n margin: 0 0 0 10px;\n"],["\n margin: 0 0 0 10px;\n"]))),f=o.span(m||(m=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,l=n.fitPercentage,d=n.onClick,m=n.onClickFitPercentage,u=n.hideIcon;return t(a,{children:[i(s,{LeadingIcon:void 0!==u&&u?void 0:c.PDP.Rule,size:r.Small,text:o,onClick:d,uppercase:!1},void 0),!!l&&t(p,{children:["Fit As Expected:"," ",t(f,e({onClick:m,role:"button"},{children:[l,"%"]}),void 0)]},void 0)]},void 0)};export{u as default};
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(),I=function(e,n,t){return n?e.colors.shades[250].color:t||e.colors.shades[550].color}(y,f,m);return t(s,e({renderLeading:l(I,!0,a),renderTrailing:l(I,!1,d),disabled:f,type:u,onClick:v,css:c(y,g),uppercase:x,testId:b},{children:o}),void 0)};export{d as default};
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
@@ -2816,6 +2816,7 @@ declare type CTAProps = {
2816
2816
  alignItems?: CSSProperties['alignItems'];
2817
2817
  progress?: number;
2818
2818
  innerSpan?: boolean;
2819
+ 'aria-describedby'?: string;
2819
2820
  };
2820
2821
  declare type DropdownOption<T> = {
2821
2822
  key: string;
@@ -3531,6 +3532,7 @@ interface BaseCTAProps {
3531
3532
  alignItems?: CSSProperties['alignItems'];
3532
3533
  innerSpan?: boolean;
3533
3534
  progress?: number;
3535
+ 'aria-describedby'?: string;
3534
3536
  }
3535
3537
 
3536
3538
  declare type ButtonProps = {
@@ -3940,13 +3942,14 @@ interface TableProps$2 {
3940
3942
  declare const SizeTable: ({ headers, data, className }: TableProps$2) => JSX.Element;
3941
3943
 
3942
3944
  interface SizeFitGuideProps {
3943
- title: string;
3945
+ title?: string;
3944
3946
  fitPercentage?: number;
3945
3947
  onClick: () => void;
3946
3948
  onClickFitPercentage?: () => void;
3947
3949
  hideIcon?: boolean;
3950
+ htmlContent?: JSX.Element;
3948
3951
  }
3949
- declare const SizeFitGuide: ({ title, fitPercentage, onClick, onClickFitPercentage, hideIcon, }: SizeFitGuideProps) => JSX.Element;
3952
+ declare const SizeFitGuide: ({ title, fitPercentage, onClick, onClickFitPercentage, hideIcon, htmlContent, }: SizeFitGuideProps) => JSX.Element;
3950
3953
 
3951
3954
  declare type Size = 'S' | 'XS / S' | 'M' | 'M / L' | 'L' | 'XL' | 'XL / 2XL' | '2XL' | '3XL' | '4XL';
3952
3955
  declare type SizeTip = {
@@ -4072,18 +4075,20 @@ interface BaseButtonProps {
4072
4075
  uppercase?: boolean;
4073
4076
  testId?: string;
4074
4077
  id?: string;
4078
+ 'aria-describedby'?: string;
4075
4079
  }
4076
4080
 
4077
4081
  declare type BaseProps = Pick<BaseButtonProps, 'disabled' | 'type' | 'onClick' | 'testId'>;
4078
4082
  interface TextButtonProps$1 extends BaseProps {
4079
- text: string;
4083
+ text?: string;
4080
4084
  LeadingIcon?: IconType;
4081
4085
  TrailingIcon?: IconType;
4082
4086
  iconColor?: string;
4083
4087
  size?: ComponentSize;
4084
4088
  uppercase?: boolean;
4089
+ htmlContent?: JSX.Element;
4085
4090
  }
4086
- 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;
4087
4092
 
4088
4093
  declare const Text: ({ variant, children, testId, asSpan, ...allProps }: TextProps) => _emotion_react_jsx_runtime.JSX.Element;
4089
4094
  declare type TextHeroProps = {
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),i=require("@emotion/react/jsx-runtime");module.exports=function(t){var n=t.children,r=t.renderLeading,s=t.renderTrailing,o=t.disabled,d=t.type,a=void 0===d?"button":d,l=t.onClick,c=t.className,u=t.inline,b=t.uppercase,p=void 0===b||b,m=t.testId,x=void 0===m?"base-button":m,g=t.id;return i.jsxs("button",e.__assign({onClick:l,disabled:o,className:c,type:a,"data-testid":x,css:{display:u?"inline-flex":"flex",justifyContent:"center",alignItems:"center",padding:"0.75rem 2rem",textDecoration:"none",textTransform:p?"uppercase":"unset",boxSizing:"border-box",cursor:"pointer"},id:g},{children:[r,n,s]}),void 0)};
1
+ "use strict";var e=require("tslib"),i=require("@emotion/react/jsx-runtime");module.exports=function(r){var t=r.children,n=r.renderLeading,s=r.renderTrailing,d=r.disabled,a=r.type,o=void 0===a?"button":a,c=r.onClick,l=r.className,u=r.inline,b=r.uppercase,p=void 0===b||b,m=r.testId,x=void 0===m?"base-button":m,g=r.id,v=r["aria-describedby"];return i.jsxs("button",e.__assign({onClick:c,disabled:d,className:l,type:o,"data-testid":x,css:{display:u?"inline-flex":"flex",justifyContent:"center",alignItems:"center",padding:"0.75rem 2rem",textDecoration:"none",textTransform:p?"uppercase":"unset",boxSizing:"border-box",cursor:"pointer"},id:g,"aria-describedby":v},{children:[n,t,s]}),void 0)};
2
2
  //# sourceMappingURL=BaseButton.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,l,a,u=s(t),d=u.default.div(c||(c=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"]))),p=u.default.p(l||(l=e.__makeTemplateObject(["\n margin: 0 0 0 10px;\n"],["\n margin: 0 0 0 10px;\n"]))),m=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,c=t.fitPercentage,l=t.onClick,a=t.onClickFitPercentage,u=t.hideIcon,f=void 0!==u&&u;return n.jsxs(d,{children:[n.jsx(o,{LeadingIcon:f?void 0:r.Icon.PDP.Rule,size:i.ComponentSize.Small,text:s,onClick:l,uppercase:!1},void 0),!!c&&n.jsxs(p,{children:["Fit As Expected:"," ",n.jsxs(m,e.__assign({onClick:a,role:"button"},{children:[c,"%"]}),void 0)]},void 0)]},void 0)};
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(),v=function(e,n,t){return n?e.colors.shades[250].color:t||e.colors.shades[550].color}(j,m,u);return t.jsx(s,n.__assign({renderLeading:c(v,!0,l),renderTrailing:c(v,!1,d),disabled:m,type:g,onClick:_,css:a(j,h),uppercase:x,testId:b},{children:i}),void 0)};
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
@@ -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.10.3",
6
+ "version": "7.10.6",
7
7
  "private": false,
8
8
  "main": "build/lib/index.js",
9
9
  "style": "build/es/index.css",