@trafilea/afrodita-components 7.22.1 → 7.22.3
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/icon-button/IconButton.js +1 -1
- package/build/es/components/molecules/Video/Video.js +1 -1
- package/build/es/components/text-button/TextButton.js +1 -1
- package/build/index.d.ts +3 -1
- package/build/lib/components/icon-button/IconButton.js +1 -1
- package/build/lib/components/molecules/Video/Video.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 o}from"tslib";import{jsx as r}from"react/jsx-runtime";import e from"@emotion/styled";import{useTheme as i}from"../../core/theme/Theme.js";import{ComponentSize as t}from"../../types/enums.js";var d,a=function(n){switch(n){case t.Large:return{widthHeight:"4.25rem",margin:"0.938rem"};case t.Medium:return{widthHeight:"2.5rem",margin:"0.625rem"};case t.Small:return{widthHeight:"1.5rem",margin:"0.375rem"}}},l=e.div(d||(d=n(["\n background-color: ",";\n width: ",";\n height: ",";\n border: ",";\n border-radius: ",";\n display:
|
|
1
|
+
import{__makeTemplateObject as n,__assign as o}from"tslib";import{jsx as r}from"react/jsx-runtime";import e from"@emotion/styled";import{useTheme as i}from"../../core/theme/Theme.js";import{ComponentSize as t}from"../../types/enums.js";var d,a=function(n){switch(n){case t.Large:return{widthHeight:"4.25rem",margin:"0.938rem"};case t.Medium:return{widthHeight:"2.5rem",margin:"0.625rem"};case t.Small:return{widthHeight:"1.5rem",margin:"0.375rem"}}},l=e.div(d||(d=n(["\n background-color: ",";\n width: ",";\n height: ",";\n border: ",";\n border-radius: ",";\n display: ",";\n justify-content: center;\n align-items: center;\n transition: background-color 0.1s ease;\n box-shadow: ",";\n padding: ",";\n gap: ",";\n\n &:hover {\n background-color: ",";\n cursor: pointer;\n }\n\n &.disabled {\n background-color: ",";\n cursor: not-allowed;\n\n svg path {\n fill: ",";\n }\n }\n"],["\n background-color: ",";\n width: ",";\n height: ",";\n border: ",";\n border-radius: ",";\n display: ",";\n justify-content: center;\n align-items: center;\n transition: background-color 0.1s ease;\n box-shadow: ",";\n padding: ",";\n gap: ",";\n\n &:hover {\n background-color: ",";\n cursor: pointer;\n }\n\n &.disabled {\n background-color: ",";\n cursor: not-allowed;\n\n svg path {\n fill: ",";\n }\n }\n"])),(function(n){return n.backgroundColor}),(function(n){var o,r=n.width,e=n.size;return n.hasText?null!=r?r:"auto":null===(o=a(e))||void 0===o?void 0:o.widthHeight}),(function(n){var o,r=n.size;return null===(o=a(r))||void 0===o?void 0:o.widthHeight}),(function(n){return n.border}),(function(n){var o=n.hasText,r=n.rounded;return o?r?"24px":"0.5rem":r?"50%":"0.5rem"}),(function(n){return n.inline?"inline-flex":"flex"}),(function(n){var o=n.boxShadow;return null!=o?o:"none"}),(function(n){var o,r=n.size;return null===(o=a(r))||void 0===o?void 0:o.margin}),(function(n){return n.hasText?"4px":"0"}),(function(n){return n.hoverBackgroundColor}),(function(n){return n.disabledColor}),(function(n){return n.disabledIconColor})),u=function(n){var e,d,a=n.children,u=n.disabled,c=n.size,s=void 0===c?t.Medium:c,h=n.onClick,b=n.backgroundColor,m=n.dataTestId,g=void 0===m?"Container":m,v=n.hasText,f=void 0!==v&&v,p=n.boxShadow,w=n.rounded,k=void 0===w||w,x=n.width,C=n.border,y=n.inline,T=void 0!==y&&y,j=i();return r(l,o({border:C,width:x,className:u?"disabled":"",backgroundColor:null!==(e=null==b?void 0:b.active)&&void 0!==e?e:j.component.button.primary.active.backgroundColor,hoverBackgroundColor:null!==(d=null==b?void 0:b.hover)&&void 0!==d?d:j.component.button.secondary.active.backgroundColor,disabledColor:j.colors.shades[50].color,disabledIconColor:j.colors.shades[200].color,size:s,"data-testid":g,onClick:u?function(){}:h,hasText:f,boxShadow:p,rounded:k,inline:T},{children:a}),void 0)};export{u as IconButton};
|
|
2
2
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as o,__assign as t}from"tslib";import{useRef as r,useState as
|
|
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,C=h.className,L=h.withProgressBar,A=void 0===L||L,k=h.hasAudioControl,I=h.muted,T=h.onLoadedData,D=h.autoPlay,N=h.isActive,w=void 0===N||N,B=o(h,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData","autoPlay","isActive"]),x=r(null),z=n(!0),E=z[0],H=z[1],M=n(!1),O=M[0],V=M[1],_=n(!!D||I),q=_[0],F=_[1],S=n(0),U=S[0],G=S[1],J=n(!1),K=J[0],Q=J[1],R=n(!1),W=R[0],X=R[1],Y=n(!1),Z=Y[0],$=Y[1],oo=U>0,to=(null===(y=x.current)||void 0===y?void 0:y.duration)?U/x.current.duration:0,ro=U===(null===(g=null==x?void 0:x.current)||void 0===g?void 0:g.duration)||0===U,no=D?void 0:P;e((function(){$(!1)}),[j]),e((function(){var o=x.current;o&&o.load()}),[j,no]),e((function(){var o=x.current;if(o)if(w&&D&&Z){o.muted=!0,F(!0);var t=o.play();void 0!==t&&t.then((function(){V(!0)})).catch((function(o){"NotAllowedError"===o.name&&X(!0)}))}else w||(o.pause(),V(!1))}),[w,D,Z]);return a(d,t({className:C},{children:[!E&&A&&u(s,{progress:to,hide:ro},void 0),O?u(f,{"data-testid":"pause",onClick:function(){x.current&&O&&(x.current.pause(),V(!1))}},void 0):u(l,t({"data-testid":"play",onClick:function(){x.current&&!K&&(Q(!0),x.current.play().then((function(){V(!0)})).catch((function(o){"NotAllowedError"===o.name&&X(!0)})).finally((function(){return Q(!1)})))}},{children:oo&&u(m,{},void 0)}),void 0),k&&a(p,t({onClick:function(){x.current&&F((function(o){return!o}))}},{children:[q&&u(c,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!q&&u(c,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),i(v,t({},B,{key:"".concat(j,"-").concat(no||"no-poster"),autoPlay:D&&w,muted:q,"data-testid":"video",poster:no,playsInline:!0,controls:W,ref:x,onTimeUpdate:function(){if(x.current){var o=x.current.currentTime;requestAnimationFrame((function(){return G(o)}))}},onCanPlay:function(){return H(!1)},onCanPlayThrough:function(){return $(!0)},onLoadedData:function(o){T&&T(o),H(!1)},onPause:function(){return V(!1)},onPlaying:function(){return V(!0)},height:b||"auto"}),u("track",{kind:"captions"},void 0),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 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
|
|
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 i}from"../../core/theme/Theme.js";import{ComponentSize as r}from"../../types/enums.js";import s from"../shared/button/BaseButton.js";var a,l=function(n,t){var o=function(e){switch(e){case r.Large:case r.Medium:return{fontSize:"1rem"};case r.Small:return{fontSize:"14px"};case r.XSmall:return{fontSize:"12px"};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"}})},c=function(i,r,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 "])),r?"margin-right: 5px":"margin-left: 5px")},{children:t(s,{width:1.25,height:1.25,fill:i},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?r.Medium:p,h=n.uppercase,x=void 0===h||h,v=n.onClick,b=n.testId,y=n.htmlContent,S=n.inline,z=void 0!==S&&S,I=i(),L=function(e,n,t){return n?e.colors.shades[250].color:t||e.colors.shades[550].color}(I,f,m),j=c(L,!0,a),B=c(L,!1,d);return t(s,e({renderLeading:j,renderTrailing:B,disabled:f,type:u,onClick:v,css:l(I,g),inline:z,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
|
@@ -3498,6 +3498,7 @@ interface IconButtonProps {
|
|
|
3498
3498
|
rounded?: boolean;
|
|
3499
3499
|
width?: string;
|
|
3500
3500
|
border?: string;
|
|
3501
|
+
inline?: boolean;
|
|
3501
3502
|
}
|
|
3502
3503
|
declare const IconButton: FC<IconButtonProps>;
|
|
3503
3504
|
|
|
@@ -4160,8 +4161,9 @@ interface TextButtonProps$1 extends BaseProps {
|
|
|
4160
4161
|
size?: ComponentSize;
|
|
4161
4162
|
uppercase?: boolean;
|
|
4162
4163
|
htmlContent?: JSX.Element;
|
|
4164
|
+
inline?: boolean;
|
|
4163
4165
|
}
|
|
4164
|
-
declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, uppercase, onClick, testId, htmlContent, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4166
|
+
declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, uppercase, onClick, testId, htmlContent, inline, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4165
4167
|
|
|
4166
4168
|
declare const Text: ({ variant, children, testId, asSpan, ...allProps }: TextProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
4167
4169
|
declare type TextHeroProps = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),o=require("react/jsx-runtime"),e=require("@emotion/styled"),r=require("../../core/theme/Theme.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),o=require("react/jsx-runtime"),e=require("@emotion/styled"),r=require("../../core/theme/Theme.js"),i=require("../../types/enums.js");function t(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var d,a=function(n){switch(n){case i.ComponentSize.Large:return{widthHeight:"4.25rem",margin:"0.938rem"};case i.ComponentSize.Medium:return{widthHeight:"2.5rem",margin:"0.625rem"};case i.ComponentSize.Small:return{widthHeight:"1.5rem",margin:"0.375rem"}}},u=t(e).default.div(d||(d=n.__makeTemplateObject(["\n background-color: ",";\n width: ",";\n height: ",";\n border: ",";\n border-radius: ",";\n display: ",";\n justify-content: center;\n align-items: center;\n transition: background-color 0.1s ease;\n box-shadow: ",";\n padding: ",";\n gap: ",";\n\n &:hover {\n background-color: ",";\n cursor: pointer;\n }\n\n &.disabled {\n background-color: ",";\n cursor: not-allowed;\n\n svg path {\n fill: ",";\n }\n }\n"],["\n background-color: ",";\n width: ",";\n height: ",";\n border: ",";\n border-radius: ",";\n display: ",";\n justify-content: center;\n align-items: center;\n transition: background-color 0.1s ease;\n box-shadow: ",";\n padding: ",";\n gap: ",";\n\n &:hover {\n background-color: ",";\n cursor: pointer;\n }\n\n &.disabled {\n background-color: ",";\n cursor: not-allowed;\n\n svg path {\n fill: ",";\n }\n }\n"])),(function(n){return n.backgroundColor}),(function(n){var o,e=n.width,r=n.size;return n.hasText?null!=e?e:"auto":null===(o=a(r))||void 0===o?void 0:o.widthHeight}),(function(n){var o,e=n.size;return null===(o=a(e))||void 0===o?void 0:o.widthHeight}),(function(n){return n.border}),(function(n){var o=n.hasText,e=n.rounded;return o?e?"24px":"0.5rem":e?"50%":"0.5rem"}),(function(n){return n.inline?"inline-flex":"flex"}),(function(n){var o=n.boxShadow;return null!=o?o:"none"}),(function(n){var o,e=n.size;return null===(o=a(e))||void 0===o?void 0:o.margin}),(function(n){return n.hasText?"4px":"0"}),(function(n){return n.hoverBackgroundColor}),(function(n){return n.disabledColor}),(function(n){return n.disabledIconColor}));exports.IconButton=function(e){var t,d,a=e.children,l=e.disabled,c=e.size,s=void 0===c?i.ComponentSize.Medium:c,h=e.onClick,b=e.backgroundColor,g=e.dataTestId,v=void 0===g?"Container":g,m=e.hasText,f=void 0!==m&&m,p=e.boxShadow,k=e.rounded,w=void 0===k||k,x=e.width,C=e.border,y=e.inline,j=void 0!==y&&y,z=r.useTheme();return o.jsx(u,n.__assign({border:C,width:x,className:l?"disabled":"",backgroundColor:null!==(t=null==b?void 0:b.active)&&void 0!==t?t:z.component.button.primary.active.backgroundColor,hoverBackgroundColor:null!==(d=null==b?void 0:b.hover)&&void 0!==d?d:z.component.button.secondary.active.backgroundColor,disabledColor:z.colors.shades[50].color,disabledIconColor:z.colors.shades[200].color,size:s,"data-testid":v,onClick:l?function(){}:h,hasText:f,boxShadow:p,rounded:w,inline:j},{children:a}),void 0)};
|
|
2
2
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
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(s){var u,a,c=s.source,d=s.thumbnail,l=s.height,f=s.className,m=s.withProgressBar,v=void 0===m||m,j=s.hasAudioControl,
|
|
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(s){var u,a,c=s.source,d=s.thumbnail,l=s.height,f=s.className,m=s.withProgressBar,v=void 0===m||m,j=s.hasAudioControl,h=s.muted,g=s.onLoadedData,y=s.autoPlay,p=s.isActive,P=void 0===p||p,q=e.__rest(s,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData","autoPlay","isActive"]),b=r.useRef(null),_=r.useState(!0),x=_[0],C=_[1],L=r.useState(!1),I=L[0],S=L[1],A=r.useState(!!y||h),T=A[0],k=A[1],E=r.useState(0),B=E[0],D=E[1],M=r.useState(!1),N=M[0],w=M[1],V=r.useState(!1),H=V[0],O=V[1],z=r.useState(!1),F=z[0],R=z[1],U=B>0,G=(null===(u=b.current)||void 0===u?void 0:u.duration)?B/b.current.duration:0,J=B===(null===(a=null==b?void 0:b.current)||void 0===a?void 0:a.duration)||0===B,K=y?void 0:d;r.useEffect((function(){R(!1)}),[c]),r.useEffect((function(){var e=b.current;e&&e.load()}),[c,K]),r.useEffect((function(){var e=b.current;if(e)if(P&&y&&F){e.muted=!0,k(!0);var r=e.play();void 0!==r&&r.then((function(){S(!0)})).catch((function(e){"NotAllowedError"===e.name&&O(!0)}))}else P||(e.pause(),S(!1))}),[P,y,F]);return t.jsxs(i.Container,e.__assign({className:f},{children:[!x&&v&&t.jsx(o.ProgressBar,{progress:G,hide:J},void 0),I?t.jsx(i.PauseContainer,{"data-testid":"pause",onClick:function(){b.current&&I&&(b.current.pause(),S(!1))}},void 0):t.jsx(i.PlayContainer,e.__assign({"data-testid":"play",onClick:function(){b.current&&!N&&(w(!0),b.current.play().then((function(){S(!0)})).catch((function(e){"NotAllowedError"===e.name&&O(!0)})).finally((function(){return w(!1)})))}},{children:U&&t.jsx(i.PlayIcon,{},void 0)}),void 0),j&&t.jsxs(i.MuteButton,e.__assign({onClick:function(){b.current&&k((function(e){return!e}))}},{children:[T&&t.jsx(n.Icon,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!T&&t.jsx(n.Icon,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),r.createElement(i.HTMLVideo,e.__assign({},q,{key:"".concat(c,"-").concat(K||"no-poster"),autoPlay:y&&P,muted:T,"data-testid":"video",poster:K,playsInline:!0,controls:H,ref:b,onTimeUpdate:function(){if(b.current){var e=b.current.currentTime;requestAnimationFrame((function(){return D(e)}))}},onCanPlay:function(){return C(!1)},onCanPlayThrough:function(){return R(!0)},onLoadedData:function(e){g&&g(e),C(!1)},onPause:function(){return S(!1)},onPlaying:function(){return S(!0)},height:l||"auto"}),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,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,
|
|
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:return{fontSize:"14px"};case r.ComponentSize.XSmall:return{fontSize:"12px"};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,p=e.type,g=e.size,f=void 0===g?r.ComponentSize.Medium:g,h=e.uppercase,x=void 0===h||h,S=e.onClick,z=e.testId,_=e.htmlContent,v=e.inline,C=void 0!==v&&v,b=o.useTheme(),j=function(e,n,t){return n?e.colors.shades[250].color:t||e.colors.shades[550].color}(b,m,u),y=c(j,!0,l),q=c(j,!1,d);return t.jsx(s,n.__assign({renderLeading:y,renderTrailing:q,disabled:m,type:p,onClick:S,css:a(b,f),inline:C,uppercase:x,testId:z},{children:_||i}),void 0)};
|
|
2
2
|
//# sourceMappingURL=TextButton.js.map
|
package/package.json
CHANGED