@cleartrip/ct-design-typography
Advanced tools
Comparing version 2.11.1-SNAPSHOT-novac-common.0 to 2.12.0-SNAPSHOT-common-novac.0
@@ -1,2 +0,2 @@ | ||
"use strict";var e=require("tslib"),t=require("react/jsx-runtime"),o=require("@cleartrip/ct-design-theme"),i=require("styled-components"),r=require("@cleartrip/ct-design-conditional-wrap"),a=require("@cleartrip/ct-design-container");function n(e){return e&&e.__esModule?e:{default:e}}var p,s,y=n(i),h=n(r),g=y.default.div((function(t){var o=t.color,i=t.cursor,r=t.fontSize,a=t.fontWeight,n=t.lineHeight,p=t.textDecoration,s=t.fontStyle,y=t.width,h=t.display,g=t.webkitLineClamp,l=t.webkitBoxOrient,c=t.overflow,f=t.textTransform,d=t.letterSpacing,u=t.css,x=void 0===u?{}:u;return e.__assign(e.__assign({},function(t){var o=t.fontSize,i=t.fontWeight,r=t.lineHeight,a=t.color,n=t.textDecoration,p=t.fontStyle,s=t.width,y=t.display,h=t.webkitLineClamp,g=t.webkitBoxOrient,l=t.overflow,c=t.cursor,f=t.css,d=void 0===f?{}:f,u=e.__rest(t,["fontSize","fontWeight","lineHeight","color","textDecoration","fontStyle","width","display","webkitLineClamp","webkitBoxOrient","overflow","cursor","css"]);return e.__assign(e.__assign({fontSize:o,fontWeight:i,lineHeight:r,color:a,textDecoration:n,fontStyle:p,width:s,display:y,"-webkit-line-clamp":"".concat(h),"-webkit-box-orient":g,overflow:l,cursor:c},u),d)}({color:o,cursor:i,fontSize:r,fontWeight:a,lineHeight:n,textDecoration:p,fontStyle:s,width:y,display:h,webkitLineClamp:g,webkitBoxOrient:l,overflow:c,textTransform:f,letterSpacing:d})),x)}));exports.TypographyVariant=void 0,(p=exports.TypographyVariant||(exports.TypographyVariant={})).HD1="HD1",p.HD2="HD2",p.HD3="HD3",p.HM1="HM1",p.HM2="HM2",p.HM3="HM3",p.HM4="HM4",p.B1="B1",p.B2="B2",p.B3="B3",p.B3CAPS="B3CAPS",p.B4="B4",p.B4CAPS="B4CAPS",p.P1="P1",p.P2="P2",p.P3="P3",p.L1="L1",p.L2="L2",p.L3="L3",p.OVERLINE="OVERLINE",p.TAG="TAG",exports.TypographyColor=void 0,(s=exports.TypographyColor||(exports.TypographyColor={})).PRIMARY="primary",s.SECONDARY="secondary",s.TERTIARY="tertiary",s.HEADING="heading",s.SUBHEADING="subheading",s.SUCCESS="success",s.ALERT="alert",s.WARNING="warning",s.DISABLED="disabled",s.LINK="link",s.NEUTRAL="neutral",s.LINK2="link2";var l=function(e,t){switch(t){case exports.TypographyColor.PRIMARY:return e.color.text.primary;case exports.TypographyColor.SECONDARY:return e.color.text.secondary;case exports.TypographyColor.TERTIARY:return e.color.text.tertiary;case exports.TypographyColor.ALERT:return e.color.text.alert;case exports.TypographyColor.DISABLED:return e.color.text.disabled;case exports.TypographyColor.HEADING:return e.color.text.heading;case exports.TypographyColor.LINK:return e.color.text.link;case exports.TypographyColor.SUBHEADING:return e.color.text.subHeading;case exports.TypographyColor.SUCCESS:return e.color.text.success;case exports.TypographyColor.WARNING:return e.color.text.warning;case exports.TypographyColor.NEUTRAL:return e.color.text.neutral;case exports.TypographyColor.LINK2:return e.color.text.link2;default:return e.color.text.primary}},c=function(t){var o=t.theme,i=t.variant,r=t.color,a=t.isClickable,n=t.isStriked,p=t.colorCode,s=t.showInItalics,y=t.lineClamp,h=t.isDisabled;return e.__assign(e.__assign(e.__assign({},function(e,t){switch(t){case exports.TypographyVariant.HD1:return{fontSize:e.typography.size[48],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[56]};case exports.TypographyVariant.HD2:return{fontSize:e.typography.size[40],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[48]};case exports.TypographyVariant.HD3:return{fontSize:e.typography.size[32],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[40]};case exports.TypographyVariant.HM1:return{fontSize:e.typography.size[24],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[32]};case exports.TypographyVariant.HM2:return{fontSize:e.typography.size[20],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[28]};case exports.TypographyVariant.HM3:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[24]};case exports.TypographyVariant.HM4:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[20]};case exports.TypographyVariant.B1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[24]};case exports.TypographyVariant.B2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[20]};case exports.TypographyVariant.B3:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[16]};case exports.TypographyVariant.B3CAPS:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[16],letterSpacing:e.typography.letterSpacing.point4,textTransform:"uppercase"};case exports.TypographyVariant.B4:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[14]};case exports.TypographyVariant.B4CAPS:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[12],letterSpacing:e.typography.letterSpacing.point4,textTransform:"uppercase"};case exports.TypographyVariant.P1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[22]};case exports.TypographyVariant.P2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[20]};case exports.TypographyVariant.P3:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[16]};case exports.TypographyVariant.L1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[24]};case exports.TypographyVariant.L2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[20]};case exports.TypographyVariant.L3:case exports.TypographyVariant.OVERLINE:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[16]};case exports.TypographyVariant.TAG:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[12]};default:return{fontSize:e.typography.size[20],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[28]}}}(o,null!=i?i:exports.TypographyVariant.HM2)),function(e){return e?{display:"-webkit-box",webkitLineClamp:e,webkitBoxOrient:"vertical",overflow:"hidden"}:{}}(y)),{color:p||l(o,null!=r?r:exports.TypographyColor.PRIMARY),textDecoration:n?"line-through":"none",cursor:h?"not-allowed":a?"pointer":"auto",fontStyle:s?"italic":"none"})};exports.Typography=function(i){var r=i.children,n=void 0===r?null:r,p=i.variant,s=i.color,y=void 0===s?exports.TypographyColor.PRIMARY:s,l=i.isClickable,f=void 0!==l&&l,d=i.isStriked,u=void 0!==d&&d,x=i.onClick,H=void 0===x?function(){}:x,w=i.className,S=void 0===w?"":w,m=i.colorCode,T=void 0===m?"":m,C=i.showInItalics,z=void 0!==C&&C,b=i.width,v=i.lineClamp,D=i.containerClassName,k=void 0===D?"":D,B=i.componentNode,L=i.isDisabled,W=void 0!==L&&L,I=i.css,N=i.styleConfig,A=void 0===N?{}:N,V=e.__rest(i,["children","variant","color","isClickable","isStriked","onClick","className","colorCode","showInItalics","width","lineClamp","containerClassName","componentNode","isDisabled","css","styleConfig"]),_=o.useTheme(),E=c({theme:_,variant:p,color:y,isClickable:f,isStriked:u,colorCode:T,showInItalics:z,lineClamp:v,isDisabled:W}),R=E.color,M=E.cursor,P=E.textDecoration,O=E.fontSize,G=E.fontWeight,Y=E.lineHeight,q=E.fontStyle,U=E.display,j=E.webkitLineClamp,K=E.webkitBoxOrient,F=E.overflow,J=e.__rest(E,["color","cursor","textDecoration","fontSize","fontWeight","lineHeight","fontStyle","display","webkitLineClamp","webkitBoxOrient","overflow"]),Q=A.className,X=A.css,Z=A.containerClassName,$=A.containerCss,ee=B||function(e){return{HD1:"h1",HD2:"h2",HD3:"h3",HM1:"h1",HM2:"h2",HM3:"h3",HM4:"h4",B1:"p",B2:"p",B3:"p",B4:"p",P1:"p",P2:"p",P3:"p",L1:"p",L2:"p",L3:"p",OVERLINE:"p"}[e]}(p);return t.jsx(h.default,e.__assign({condition:f,wrap:function(o){return t.jsx(a.Container,e.__assign({onClick:H,className:Z||k,css:$||I},{children:o}))}},{children:t.jsx(g,e.__assign({as:ee,color:R,cursor:M,textDecoration:P,fontSize:O,fontStyle:q,lineHeight:Y,fontWeight:G,className:Q||S,width:b,display:U,webkitLineClamp:j,webkitBoxOrient:K,overflow:F},J,{css:X},V,{children:n}))}))},exports.getTypographyStyles=c; | ||
"use strict";var e=require("tslib"),t=require("react/jsx-runtime"),o=require("@cleartrip/ct-design-theme"),i=require("styled-components"),r=require("@cleartrip/ct-design-conditional-wrap"),a=require("@cleartrip/ct-design-container");function n(e){return e&&e.__esModule?e:{default:e}}var p,s,y=n(i),h=n(r),g=y.default.div((function(t){var o=t.color,i=t.cursor,r=t.fontSize,a=t.fontWeight,n=t.lineHeight,p=t.textDecoration,s=t.fontStyle,y=t.width,h=t.display,g=t.webkitLineClamp,l=t.webkitBoxOrient,c=t.overflow,f=t.textTransform,d=t.letterSpacing,u=t.css,x=void 0===u?{}:u;return e.__assign(e.__assign({},function(t){var o=t.fontSize,i=t.fontWeight,r=t.lineHeight,a=t.color,n=t.textDecoration,p=t.fontStyle,s=t.width,y=t.display,h=t.webkitLineClamp,g=t.webkitBoxOrient,l=t.overflow,c=t.cursor,f=t.css,d=void 0===f?{}:f,u=e.__rest(t,["fontSize","fontWeight","lineHeight","color","textDecoration","fontStyle","width","display","webkitLineClamp","webkitBoxOrient","overflow","cursor","css"]);return e.__assign(e.__assign({fontSize:o,fontWeight:i,lineHeight:r,color:a,textDecoration:n,fontStyle:p,width:s,display:y,"-webkit-line-clamp":"".concat(h),"-webkit-box-orient":g,overflow:l,cursor:c},u),d)}({color:o,cursor:i,fontSize:r,fontWeight:a,lineHeight:n,textDecoration:p,fontStyle:s,width:y,display:h,webkitLineClamp:g,webkitBoxOrient:l,overflow:c,textTransform:f,letterSpacing:d})),x)}));exports.TypographyVariant=void 0,(p=exports.TypographyVariant||(exports.TypographyVariant={})).HD1="HD1",p.HD2="HD2",p.HD3="HD3",p.HM1="HM1",p.HM2="HM2",p.HM3="HM3",p.HM4="HM4",p.B1="B1",p.B2="B2",p.B3="B3",p.B3CAPS="B3CAPS",p.B4="B4",p.B4CAPS="B4CAPS",p.P1="P1",p.P2="P2",p.P3="P3",p.L1="L1",p.L2="L2",p.L3="L3",p.OVERLINE="OVERLINE",p.TAG="TAG",exports.TypographyColor=void 0,(s=exports.TypographyColor||(exports.TypographyColor={})).PRIMARY="primary",s.SECONDARY="secondary",s.TERTIARY="tertiary",s.HEADING="heading",s.SUBHEADING="subheading",s.SUCCESS="success",s.ALERT="alert",s.WARNING="warning",s.DISABLED="disabled",s.LINK="link",s.NEUTRAL="neutral",s.LINK2="link2";var l=function(e,t){switch(t){case exports.TypographyColor.PRIMARY:return e.color.text.primary;case exports.TypographyColor.SECONDARY:return e.color.text.secondary;case exports.TypographyColor.TERTIARY:return e.color.text.tertiary;case exports.TypographyColor.ALERT:return e.color.text.alert;case exports.TypographyColor.DISABLED:return e.color.text.disabled;case exports.TypographyColor.HEADING:return e.color.text.heading;case exports.TypographyColor.LINK:return e.color.text.link;case exports.TypographyColor.SUBHEADING:return e.color.text.subHeading;case exports.TypographyColor.SUCCESS:return e.color.text.success;case exports.TypographyColor.WARNING:return e.color.text.warning;case exports.TypographyColor.NEUTRAL:return e.color.text.neutral;case exports.TypographyColor.LINK2:return e.color.text.link2;default:return e.color.text.primary}},c=function(t){var o=t.theme,i=t.variant,r=t.color,a=t.isClickable,n=t.isStriked,p=t.colorCode,s=t.showInItalics,y=t.lineClamp,h=t.isDisabled;return e.__assign(e.__assign(e.__assign({},function(e,t){switch(t){case exports.TypographyVariant.HD1:return{fontSize:e.typography.size[48],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[56]};case exports.TypographyVariant.HD2:return{fontSize:e.typography.size[40],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[48]};case exports.TypographyVariant.HD3:return{fontSize:e.typography.size[32],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[40]};case exports.TypographyVariant.HM1:return{fontSize:e.typography.size[24],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[32]};case exports.TypographyVariant.HM2:return{fontSize:e.typography.size[20],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[28]};case exports.TypographyVariant.HM3:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[24]};case exports.TypographyVariant.HM4:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[20]};case exports.TypographyVariant.B1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[24]};case exports.TypographyVariant.B2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[20]};case exports.TypographyVariant.B3:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[16]};case exports.TypographyVariant.B3CAPS:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[16],letterSpacing:e.typography.letterSpacing.point4,textTransform:"uppercase"};case exports.TypographyVariant.B4:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[14]};case exports.TypographyVariant.B4CAPS:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[12],letterSpacing:e.typography.letterSpacing.point4,textTransform:"uppercase"};case exports.TypographyVariant.P1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[22]};case exports.TypographyVariant.P2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[20]};case exports.TypographyVariant.P3:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[16]};case exports.TypographyVariant.L1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[24]};case exports.TypographyVariant.L2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[20]};case exports.TypographyVariant.L3:case exports.TypographyVariant.OVERLINE:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[16]};case exports.TypographyVariant.TAG:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[12],letterSpacing:e.typography.letterSpacing.point4};default:return{fontSize:e.typography.size[20],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[28]}}}(o,null!=i?i:exports.TypographyVariant.HM2)),function(e){return e?{display:"-webkit-box",webkitLineClamp:e,webkitBoxOrient:"vertical",overflow:"hidden"}:{}}(y)),{color:p||l(o,null!=r?r:exports.TypographyColor.PRIMARY),textDecoration:n?"line-through":"none",cursor:h?"not-allowed":a?"pointer":"auto",fontStyle:s?"italic":"none"})};exports.Typography=function(i){var r=i.children,n=void 0===r?null:r,p=i.variant,s=i.color,y=void 0===s?exports.TypographyColor.PRIMARY:s,l=i.isClickable,f=void 0!==l&&l,d=i.isStriked,u=void 0!==d&&d,x=i.onClick,H=void 0===x?function(){}:x,S=i.className,w=void 0===S?"":S,m=i.colorCode,T=void 0===m?"":m,C=i.showInItalics,z=void 0!==C&&C,b=i.width,v=i.lineClamp,D=i.containerClassName,k=void 0===D?"":D,B=i.componentNode,L=i.isDisabled,W=void 0!==L&&L,I=i.css,N=i.styleConfig,A=void 0===N?{}:N,V=e.__rest(i,["children","variant","color","isClickable","isStriked","onClick","className","colorCode","showInItalics","width","lineClamp","containerClassName","componentNode","isDisabled","css","styleConfig"]),_=o.useTheme(),E=c({theme:_,variant:p,color:y,isClickable:f,isStriked:u,colorCode:T,showInItalics:z,lineClamp:v,isDisabled:W}),R=E.color,M=E.cursor,P=E.textDecoration,O=E.fontSize,G=E.fontWeight,Y=E.lineHeight,q=E.fontStyle,U=E.display,j=E.webkitLineClamp,K=E.webkitBoxOrient,F=E.overflow,J=e.__rest(E,["color","cursor","textDecoration","fontSize","fontWeight","lineHeight","fontStyle","display","webkitLineClamp","webkitBoxOrient","overflow"]),Q=A.className,X=A.css,Z=A.containerClassName,$=A.containerCss,ee=B||function(e){return{HD1:"h1",HD2:"h2",HD3:"h3",HM1:"h1",HM2:"h2",HM3:"h3",HM4:"h4",B1:"p",B2:"p",B3:"p",B4:"p",P1:"p",P2:"p",P3:"p",L1:"p",L2:"p",L3:"p",OVERLINE:"p"}[e]}(p);return t.jsx(h.default,e.__assign({condition:f,wrap:function(o){return t.jsx(a.Container,e.__assign({onClick:H,className:Z||k,css:$||I},{children:o}))}},{children:t.jsx(g,e.__assign({as:ee,color:R,cursor:M,textDecoration:P,fontSize:O,fontStyle:q,lineHeight:Y,fontWeight:G,className:Q||w,width:b,display:U,webkitLineClamp:j,webkitBoxOrient:K,overflow:F},J,{css:X},V,{children:n}))}))},exports.getTypographyStyles=c; | ||
//# sourceMappingURL=ct-design-typography.browser.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
import{__rest as e,__assign as t}from"tslib";import{jsx as i}from"react/jsx-runtime";import{useTheme as o}from"@cleartrip/ct-design-theme";import r from"styled-components";import n from"@cleartrip/ct-design-conditional-wrap";import{Container as a}from"@cleartrip/ct-design-container";var l,h,p=r.div((function(i){var o=i.color,r=i.cursor,n=i.fontSize,a=i.fontWeight,l=i.lineHeight,h=i.textDecoration,p=i.fontStyle,g=i.width,s=i.display,c=i.webkitLineClamp,y=i.webkitBoxOrient,f=i.overflow,d=i.textTransform,H=i.letterSpacing,u=i.css,m=void 0===u?{}:u;return t(t({},function(i){var o=i.fontSize,r=i.fontWeight,n=i.lineHeight,a=i.color,l=i.textDecoration,h=i.fontStyle,p=i.width,g=i.display,s=i.webkitLineClamp,c=i.webkitBoxOrient,y=i.overflow,f=i.cursor,d=i.css,H=void 0===d?{}:d,u=e(i,["fontSize","fontWeight","lineHeight","color","textDecoration","fontStyle","width","display","webkitLineClamp","webkitBoxOrient","overflow","cursor","css"]);return t(t({fontSize:o,fontWeight:r,lineHeight:n,color:a,textDecoration:l,fontStyle:h,width:p,display:g,"-webkit-line-clamp":"".concat(s),"-webkit-box-orient":c,overflow:y,cursor:f},u),H)}({color:o,cursor:r,fontSize:n,fontWeight:a,lineHeight:l,textDecoration:h,fontStyle:p,width:g,display:s,webkitLineClamp:c,webkitBoxOrient:y,overflow:f,textTransform:d,letterSpacing:H})),m)}));!function(e){e.HD1="HD1",e.HD2="HD2",e.HD3="HD3",e.HM1="HM1",e.HM2="HM2",e.HM3="HM3",e.HM4="HM4",e.B1="B1",e.B2="B2",e.B3="B3",e.B3CAPS="B3CAPS",e.B4="B4",e.B4CAPS="B4CAPS",e.P1="P1",e.P2="P2",e.P3="P3",e.L1="L1",e.L2="L2",e.L3="L3",e.OVERLINE="OVERLINE",e.TAG="TAG"}(l||(l={})),function(e){e.PRIMARY="primary",e.SECONDARY="secondary",e.TERTIARY="tertiary",e.HEADING="heading",e.SUBHEADING="subheading",e.SUCCESS="success",e.ALERT="alert",e.WARNING="warning",e.DISABLED="disabled",e.LINK="link",e.NEUTRAL="neutral",e.LINK2="link2"}(h||(h={}));var g=function(e,t){switch(t){case h.PRIMARY:return e.color.text.primary;case h.SECONDARY:return e.color.text.secondary;case h.TERTIARY:return e.color.text.tertiary;case h.ALERT:return e.color.text.alert;case h.DISABLED:return e.color.text.disabled;case h.HEADING:return e.color.text.heading;case h.LINK:return e.color.text.link;case h.SUBHEADING:return e.color.text.subHeading;case h.SUCCESS:return e.color.text.success;case h.WARNING:return e.color.text.warning;case h.NEUTRAL:return e.color.text.neutral;case h.LINK2:return e.color.text.link2;default:return e.color.text.primary}},s=function(e){var i=e.theme,o=e.variant,r=e.color,n=e.isClickable,a=e.isStriked,p=e.colorCode,s=e.showInItalics,c=e.lineClamp,y=e.isDisabled;return t(t(t({},function(e,t){switch(t){case l.HD1:return{fontSize:e.typography.size[48],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[56]};case l.HD2:return{fontSize:e.typography.size[40],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[48]};case l.HD3:return{fontSize:e.typography.size[32],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[40]};case l.HM1:return{fontSize:e.typography.size[24],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[32]};case l.HM2:return{fontSize:e.typography.size[20],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[28]};case l.HM3:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[24]};case l.HM4:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[20]};case l.B1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[24]};case l.B2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[20]};case l.B3:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[16]};case l.B3CAPS:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[16],letterSpacing:e.typography.letterSpacing.point4,textTransform:"uppercase"};case l.B4:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[14]};case l.B4CAPS:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[12],letterSpacing:e.typography.letterSpacing.point4,textTransform:"uppercase"};case l.P1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[22]};case l.P2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[20]};case l.P3:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[16]};case l.L1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[24]};case l.L2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[20]};case l.L3:case l.OVERLINE:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[16]};case l.TAG:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[12]};default:return{fontSize:e.typography.size[20],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[28]}}}(i,null!=o?o:l.HM2)),function(e){return e?{display:"-webkit-box",webkitLineClamp:e,webkitBoxOrient:"vertical",overflow:"hidden"}:{}}(c)),{color:p||g(i,null!=r?r:h.PRIMARY),textDecoration:a?"line-through":"none",cursor:y?"not-allowed":n?"pointer":"auto",fontStyle:s?"italic":"none"})},c=function(r){var l=r.children,g=void 0===l?null:l,c=r.variant,y=r.color,f=void 0===y?h.PRIMARY:y,d=r.isClickable,H=void 0!==d&&d,u=r.isStriked,m=void 0!==u&&u,w=r.onClick,S=void 0===w?function(){}:w,z=r.className,b=void 0===z?"":z,C=r.colorCode,x=void 0===C?"":C,D=r.showInItalics,k=void 0!==D&&D,v=r.width,B=r.lineClamp,L=r.containerClassName,W=void 0===L?"":L,I=r.componentNode,N=r.isDisabled,A=void 0!==N&&N,E=r.css,R=r.styleConfig,P=void 0===R?{}:R,M=e(r,["children","variant","color","isClickable","isStriked","onClick","className","colorCode","showInItalics","width","lineClamp","containerClassName","componentNode","isDisabled","css","styleConfig"]),T=o(),O=s({theme:T,variant:c,color:f,isClickable:H,isStriked:m,colorCode:x,showInItalics:k,lineClamp:B,isDisabled:A}),G=O.color,Y=O.cursor,U=O.textDecoration,K=O.fontSize,V=O.fontWeight,j=O.lineHeight,q=O.fontStyle,F=O.display,J=O.webkitLineClamp,Q=O.webkitBoxOrient,X=O.overflow,Z=e(O,["color","cursor","textDecoration","fontSize","fontWeight","lineHeight","fontStyle","display","webkitLineClamp","webkitBoxOrient","overflow"]),$=P.className,_=P.css,ee=P.containerClassName,te=P.containerCss,ie=I||function(e){return{HD1:"h1",HD2:"h2",HD3:"h3",HM1:"h1",HM2:"h2",HM3:"h3",HM4:"h4",B1:"p",B2:"p",B3:"p",B4:"p",P1:"p",P2:"p",P3:"p",L1:"p",L2:"p",L3:"p",OVERLINE:"p"}[e]}(c);return i(n,t({condition:H,wrap:function(e){return i(a,t({onClick:S,className:ee||W,css:te||E},{children:e}))}},{children:i(p,t({as:ie,color:G,cursor:Y,textDecoration:U,fontSize:K,fontStyle:q,lineHeight:j,fontWeight:V,className:$||b,width:v,display:F,webkitLineClamp:J,webkitBoxOrient:Q,overflow:X},Z,{css:_},M,{children:g}))}))};export{c as Typography,h as TypographyColor,l as TypographyVariant,s as getTypographyStyles}; | ||
import{__rest as e,__assign as t}from"tslib";import{jsx as i}from"react/jsx-runtime";import{useTheme as o}from"@cleartrip/ct-design-theme";import r from"styled-components";import n from"@cleartrip/ct-design-conditional-wrap";import{Container as a}from"@cleartrip/ct-design-container";var l,h,p=r.div((function(i){var o=i.color,r=i.cursor,n=i.fontSize,a=i.fontWeight,l=i.lineHeight,h=i.textDecoration,p=i.fontStyle,g=i.width,s=i.display,c=i.webkitLineClamp,y=i.webkitBoxOrient,f=i.overflow,d=i.textTransform,H=i.letterSpacing,u=i.css,m=void 0===u?{}:u;return t(t({},function(i){var o=i.fontSize,r=i.fontWeight,n=i.lineHeight,a=i.color,l=i.textDecoration,h=i.fontStyle,p=i.width,g=i.display,s=i.webkitLineClamp,c=i.webkitBoxOrient,y=i.overflow,f=i.cursor,d=i.css,H=void 0===d?{}:d,u=e(i,["fontSize","fontWeight","lineHeight","color","textDecoration","fontStyle","width","display","webkitLineClamp","webkitBoxOrient","overflow","cursor","css"]);return t(t({fontSize:o,fontWeight:r,lineHeight:n,color:a,textDecoration:l,fontStyle:h,width:p,display:g,"-webkit-line-clamp":"".concat(s),"-webkit-box-orient":c,overflow:y,cursor:f},u),H)}({color:o,cursor:r,fontSize:n,fontWeight:a,lineHeight:l,textDecoration:h,fontStyle:p,width:g,display:s,webkitLineClamp:c,webkitBoxOrient:y,overflow:f,textTransform:d,letterSpacing:H})),m)}));!function(e){e.HD1="HD1",e.HD2="HD2",e.HD3="HD3",e.HM1="HM1",e.HM2="HM2",e.HM3="HM3",e.HM4="HM4",e.B1="B1",e.B2="B2",e.B3="B3",e.B3CAPS="B3CAPS",e.B4="B4",e.B4CAPS="B4CAPS",e.P1="P1",e.P2="P2",e.P3="P3",e.L1="L1",e.L2="L2",e.L3="L3",e.OVERLINE="OVERLINE",e.TAG="TAG"}(l||(l={})),function(e){e.PRIMARY="primary",e.SECONDARY="secondary",e.TERTIARY="tertiary",e.HEADING="heading",e.SUBHEADING="subheading",e.SUCCESS="success",e.ALERT="alert",e.WARNING="warning",e.DISABLED="disabled",e.LINK="link",e.NEUTRAL="neutral",e.LINK2="link2"}(h||(h={}));var g=function(e,t){switch(t){case h.PRIMARY:return e.color.text.primary;case h.SECONDARY:return e.color.text.secondary;case h.TERTIARY:return e.color.text.tertiary;case h.ALERT:return e.color.text.alert;case h.DISABLED:return e.color.text.disabled;case h.HEADING:return e.color.text.heading;case h.LINK:return e.color.text.link;case h.SUBHEADING:return e.color.text.subHeading;case h.SUCCESS:return e.color.text.success;case h.WARNING:return e.color.text.warning;case h.NEUTRAL:return e.color.text.neutral;case h.LINK2:return e.color.text.link2;default:return e.color.text.primary}},s=function(e){var i=e.theme,o=e.variant,r=e.color,n=e.isClickable,a=e.isStriked,p=e.colorCode,s=e.showInItalics,c=e.lineClamp,y=e.isDisabled;return t(t(t({},function(e,t){switch(t){case l.HD1:return{fontSize:e.typography.size[48],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[56]};case l.HD2:return{fontSize:e.typography.size[40],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[48]};case l.HD3:return{fontSize:e.typography.size[32],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[40]};case l.HM1:return{fontSize:e.typography.size[24],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[32]};case l.HM2:return{fontSize:e.typography.size[20],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[28]};case l.HM3:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[24]};case l.HM4:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[20]};case l.B1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[24]};case l.B2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[20]};case l.B3:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[16]};case l.B3CAPS:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[16],letterSpacing:e.typography.letterSpacing.point4,textTransform:"uppercase"};case l.B4:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.medium,lineHeight:e.typography.lineHeight[14]};case l.B4CAPS:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[12],letterSpacing:e.typography.letterSpacing.point4,textTransform:"uppercase"};case l.P1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[22]};case l.P2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[20]};case l.P3:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.normal,lineHeight:e.typography.lineHeight[16]};case l.L1:return{fontSize:e.typography.size[16],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[24]};case l.L2:return{fontSize:e.typography.size[14],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[20]};case l.L3:case l.OVERLINE:return{fontSize:e.typography.size[12],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[16]};case l.TAG:return{fontSize:e.typography.size[10],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[12],letterSpacing:e.typography.letterSpacing.point4};default:return{fontSize:e.typography.size[20],fontWeight:e.typography.weight.semibold,lineHeight:e.typography.lineHeight[28]}}}(i,null!=o?o:l.HM2)),function(e){return e?{display:"-webkit-box",webkitLineClamp:e,webkitBoxOrient:"vertical",overflow:"hidden"}:{}}(c)),{color:p||g(i,null!=r?r:h.PRIMARY),textDecoration:a?"line-through":"none",cursor:y?"not-allowed":n?"pointer":"auto",fontStyle:s?"italic":"none"})},c=function(r){var l=r.children,g=void 0===l?null:l,c=r.variant,y=r.color,f=void 0===y?h.PRIMARY:y,d=r.isClickable,H=void 0!==d&&d,u=r.isStriked,m=void 0!==u&&u,w=r.onClick,S=void 0===w?function(){}:w,z=r.className,b=void 0===z?"":z,C=r.colorCode,x=void 0===C?"":C,D=r.showInItalics,k=void 0!==D&&D,v=r.width,B=r.lineClamp,L=r.containerClassName,W=void 0===L?"":L,I=r.componentNode,N=r.isDisabled,A=void 0!==N&&N,E=r.css,R=r.styleConfig,P=void 0===R?{}:R,M=e(r,["children","variant","color","isClickable","isStriked","onClick","className","colorCode","showInItalics","width","lineClamp","containerClassName","componentNode","isDisabled","css","styleConfig"]),T=o(),O=s({theme:T,variant:c,color:f,isClickable:H,isStriked:m,colorCode:x,showInItalics:k,lineClamp:B,isDisabled:A}),G=O.color,Y=O.cursor,U=O.textDecoration,K=O.fontSize,V=O.fontWeight,j=O.lineHeight,q=O.fontStyle,F=O.display,J=O.webkitLineClamp,Q=O.webkitBoxOrient,X=O.overflow,Z=e(O,["color","cursor","textDecoration","fontSize","fontWeight","lineHeight","fontStyle","display","webkitLineClamp","webkitBoxOrient","overflow"]),$=P.className,_=P.css,ee=P.containerClassName,te=P.containerCss,ie=I||function(e){return{HD1:"h1",HD2:"h2",HD3:"h3",HM1:"h1",HM2:"h2",HM3:"h3",HM4:"h4",B1:"p",B2:"p",B3:"p",B4:"p",P1:"p",P2:"p",P3:"p",L1:"p",L2:"p",L3:"p",OVERLINE:"p"}[e]}(c);return i(n,t({condition:H,wrap:function(e){return i(a,t({onClick:S,className:ee||W,css:te||E},{children:e}))}},{children:i(p,t({as:ie,color:G,cursor:Y,textDecoration:U,fontSize:K,fontStyle:q,lineHeight:j,fontWeight:V,className:$||b,width:v,display:F,webkitLineClamp:J,webkitBoxOrient:Q,overflow:X},Z,{css:_},M,{children:g}))}))};export{c as Typography,h as TypographyColor,l as TypographyVariant,s as getTypographyStyles}; | ||
//# sourceMappingURL=ct-design-typography.browser.esm.js.map |
@@ -231,2 +231,3 @@ 'use strict'; | ||
lineHeight: theme.typography.lineHeight[12], | ||
letterSpacing: theme.typography.letterSpacing.point4, | ||
}; | ||
@@ -233,0 +234,0 @@ } |
@@ -224,2 +224,3 @@ import { __rest, __assign } from 'tslib'; | ||
lineHeight: theme.typography.lineHeight[12], | ||
letterSpacing: theme.typography.letterSpacing.point4, | ||
}; | ||
@@ -226,0 +227,0 @@ } |
@@ -267,2 +267,3 @@ (function (global, factory) { | ||
lineHeight: theme.typography.lineHeight[12], | ||
letterSpacing: theme.typography.letterSpacing.point4, | ||
}; | ||
@@ -269,0 +270,0 @@ } |
@@ -109,3 +109,3 @@ import type { Theme } from '@cleartrip/ct-design-theme'; | ||
lineHeight: "12px"; | ||
letterSpacing?: undefined; | ||
letterSpacing: "0.4px"; | ||
textTransform?: undefined; | ||
@@ -623,3 +623,3 @@ }; | ||
lineHeight: "12px"; | ||
letterSpacing?: undefined; | ||
letterSpacing: "0.4px"; | ||
textTransform?: undefined; | ||
@@ -638,5 +638,5 @@ } | { | ||
lineHeight: "12px"; | ||
letterSpacing?: undefined; | ||
letterSpacing: "0.4px"; | ||
textTransform?: undefined; | ||
}; | ||
//# sourceMappingURL=style.d.ts.map |
{ | ||
"name": "@cleartrip/ct-design-typography", | ||
"version": "2.11.1-SNAPSHOT-novac-common.0", | ||
"version": "2.12.0-SNAPSHOT-common-novac.0", | ||
"description": "", | ||
@@ -18,6 +18,6 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@cleartrip/ct-design-types": "2.11.1-SNAPSHOT-novac-common.0", | ||
"@cleartrip/ct-design-theme": "2.12.0-SNAPSHOT-novac-common.0", | ||
"@cleartrip/ct-design-container": "2.11.0", | ||
"@cleartrip/ct-design-conditional-wrap": "2.11.0" | ||
"@cleartrip/ct-design-types": "2.11.1-SNAPSHOT-common-novac.0", | ||
"@cleartrip/ct-design-theme": "2.12.0-SNAPSHOT-common-novac.0", | ||
"@cleartrip/ct-design-conditional-wrap": "2.11.0", | ||
"@cleartrip/ct-design-container": "2.11.0" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": {}, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
181390
1875
+ Added@cleartrip/ct-design-theme@2.12.0-SNAPSHOT-common-novac.0(transitive)
+ Added@cleartrip/ct-design-tokens@2.12.0-SNAPSHOT-common-novac.0(transitive)
+ Added@cleartrip/ct-design-types@2.11.1-SNAPSHOT-common-novac.0(transitive)
- Removed@cleartrip/ct-design-theme@2.12.0-SNAPSHOT-novac-common.0(transitive)
- Removed@cleartrip/ct-design-tokens@2.12.0-SNAPSHOT-novac-common.0(transitive)
- Removed@cleartrip/ct-design-types@2.11.1-SNAPSHOT-novac-common.0(transitive)
Updated@cleartrip/ct-design-theme@2.12.0-SNAPSHOT-common-novac.0
Updated@cleartrip/ct-design-types@2.11.1-SNAPSHOT-common-novac.0