@laerdal/life-react-components 5.0.0 → 5.0.1

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 +1 @@
1
- {"version":3,"file":"typography.js","names":["React","styled","css","COLORS","Size","jsx","_jsx","TypographyBase","_ref","$color","lineHeight","$lineHeight","$fontSize","$fontWeight","$fontStyle","textTransform","$textTransform","textDecorationLine","$textDecorationLine","fontSize","fontWeight","fontStyle","color","black","ComponentTextStyle","componentFontWeight","textStyle","Bold","UppercaseBold","componentFontStyle","Italic","componentTextTransformation","ComponentStyling","_templateObject","_taggedTemplateLiteral","props","concat","getColor","theme","ComponentXLStyling","ComponentXL","_ref2","children","className","propTypes","_pt","string","oneOf","node","ComponentLStyling","ComponentL","_ref3","ComponentMStyling","ComponentM","_ref4","ComponentSStyling","ComponentS","_ref5","ComponentXSStyling","ComponentXS","_ref6","ComponentXXSStyling","ComponentXXS","_ref7","ComponentResponsive","_ref8","size","width","fontsize","Medium","Small","Large","XXSmall","XSmall","Typography","_templateObject2","QuoteTypography","_templateObject3","NoteTypography","_templateObject4","UpperCaseTypography","_templateObject5","Note","p","_templateObject6","Quote","_templateObject7","UpperCase","_templateObject8"],"sources":["../../src/styles/typography.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled, {css} from 'styled-components';\r\nimport {COLORS} from '.';\r\nimport {Property} from 'csstype';\r\nimport {Size} from '../types';\r\n\r\ninterface ITypographyBase {\r\n $color?: string;\r\n $lineHeight: number;\r\n $fontSize: number;\r\n $fontWeight: number;\r\n $fontStyle?: string;\r\n $textTransform?: Property.TextTransform;\r\n $textDecorationLine?: Property.TextDecorationLine;\r\n}\r\n\r\nexport const TypographyBase = styled('div')<ITypographyBase>(({\r\n $color,\r\n $lineHeight: lineHeight,\r\n $fontSize,\r\n $fontWeight,\r\n $fontStyle,\r\n $textTransform: textTransform,\r\n $textDecorationLine: textDecorationLine\r\n }) => ({\r\n fontSize: $fontSize,\r\n fontWeight: $fontWeight,\r\n lineHeight: lineHeight + 'px',\r\n textTransform: textTransform ? textTransform : 'none',\r\n textDecorationLine: textDecorationLine ? textDecorationLine : 'none',\r\n fontStyle: $fontStyle ? $fontStyle : 'normal',\r\n color: $color ? $color : COLORS.black,\r\n}));\r\n\r\nenum ComponentTextStyle {\r\n Regular = 1,\r\n Bold,\r\n Italic,\r\n UppercaseBold,\r\n}\r\n\r\ntype ComponentProps = {\r\n color?: string;\r\n className?: string;\r\n textStyle?: ComponentTextStyle;\r\n children?: React.ReactNode;\r\n};\r\n\r\nconst componentFontWeight = (textStyle?: ComponentTextStyle) => {\r\n let fontWeight = 400;\r\n if (textStyle === ComponentTextStyle.Bold || textStyle === ComponentTextStyle.UppercaseBold) {\r\n fontWeight = 700;\r\n }\r\n return fontWeight;\r\n};\r\n\r\nconst componentFontStyle = (textStyle?: ComponentTextStyle) => {\r\n let fontStyle = textStyle && textStyle === ComponentTextStyle.Italic ? 'italic' : '';\r\n return fontStyle;\r\n};\r\n\r\nconst componentTextTransformation = (textStyle?: ComponentTextStyle): Property.TextTransform => {\r\n let fontStyle: Property.TextTransform = textStyle && textStyle === ComponentTextStyle.UppercaseBold ? 'uppercase' : 'none';\r\n return fontStyle;\r\n};\r\n\r\nconst ComponentStyling = (fontSize: string, lineHeight: string, textStyle: ComponentTextStyle, color: string | undefined | null) => {\r\n return css`\r\n font-size: ${fontSize};\r\n font-weight: ${componentFontWeight(textStyle)};\r\n line-height: ${lineHeight};\r\n font-style: ${componentFontStyle(textStyle)};\r\n ${props => color === null ? '' : `color: ${color || COLORS.getColor('black', props.theme)};`}\r\n `;\r\n};\r\n\r\nconst ComponentXLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('24px', '28px', textStyle, color);\r\nconst ComponentXL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={28} $fontSize={24} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('20px', '24px', textStyle, color);\r\nconst ComponentL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={24} $fontSize={20} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentMStyling = (textStyle: ComponentTextStyle, color: string | undefined | null) => ComponentStyling('18px', '24px', textStyle, color);\r\nconst ComponentM: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={24} $fontSize={18} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('16px', '20px', textStyle, color);\r\nconst ComponentS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={20} $fontSize={16} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('14px', '16px', textStyle, color);\r\nconst ComponentXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={16} $fontSize={14} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} $textTransform={textTransform}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('12px', '16px', textStyle, color);\r\nconst ComponentXXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={16} $fontSize={12} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} $textTransform={textTransform}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentResponsive: React.FunctionComponent<ComponentProps & { size?: Size; width: number }> = ({\r\n color,\r\n textStyle,\r\n children,\r\n size,\r\n width\r\n }) => {\r\n let fontsize = size;\r\n if (!size) {\r\n if (width == -1) {\r\n fontsize = Size.Medium;\r\n } else if (width < 768) {\r\n fontsize = Size.Small;\r\n } else if (width < 992) {\r\n fontsize = Size.Medium;\r\n } else {\r\n fontsize = Size.Large;\r\n }\r\n }\r\n switch (fontsize) {\r\n case Size.XXSmall:\r\n return <ComponentXXS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.XSmall:\r\n return <ComponentXS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Small:\r\n return <ComponentS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Medium:\r\n return <ComponentM color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Large:\r\n default:\r\n return <ComponentL color={color} textStyle={textStyle} children={children}/>;\r\n }\r\n};\r\n\r\nexport const Typography = css`\r\n html {\r\n font-size: 100%;\r\n }\r\n\r\n @media (min-width: 48rem) {\r\n html {\r\n font-size: 112.5%;\r\n }\r\n }\r\n\r\n @media (min-width: 80rem) {\r\n html {\r\n font-size: 125%;\r\n }\r\n }\r\n\r\n h1, h2, h3, h4, h5, h6 {\r\n font-weight: 700;\r\n line-height: 120%;\r\n margin: 0;\r\n }\r\n\r\n h1 {\r\n font-size: 3rem;\r\n }\r\n\r\n h2 {\r\n font-size: 2.5rem;\r\n }\r\n\r\n h3 {\r\n font-size: 2rem;\r\n }\r\n\r\n h4 {\r\n font-size: 1.75rem;\r\n }\r\n\r\n h5 {\r\n font-size: 1.5rem;\r\n }\r\n\r\n h6 {\r\n font-size: 1.25rem;\r\n }\r\n\r\n p {\r\n font-size: 1rem;\r\n line-height: 150%;\r\n margin: 0 0 0.5rem;\r\n }\r\n\r\n p:last-of-type {\r\n margin-bottom: 0;\r\n }\r\n\r\n\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 34rem;\r\n }\r\n\r\n :lang(ja-jp) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(ko-kr) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(zh-CN) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n`;\r\n\r\nexport const QuoteTypography = css`\r\n font-size: 1.5rem;\r\n line-height: 150%;\r\n margin-bottom: 0.75rem;\r\n`;\r\n\r\nexport const NoteTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n margin-bottom: 0.375rem;\r\n`;\r\n\r\nexport const UpperCaseTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n font-weight: 700;\r\n text-transform: uppercase;\r\n`;\r\n\r\nexport const Note = styled.p`\r\n ${NoteTypography}\r\n`;\r\n\r\nexport const Quote = styled.p`\r\n ${QuoteTypography}\r\n`;\r\n\r\nexport const UpperCase = styled.p`\r\n ${UpperCaseTypography}\r\n`;\r\n\r\nexport {\r\n ComponentTextStyle,\r\n ComponentXL,\r\n ComponentL,\r\n ComponentM,\r\n ComponentS,\r\n ComponentXS,\r\n ComponentXXS,\r\n ComponentResponsive\r\n};\r\nexport {\r\n ComponentXLStyling,\r\n ComponentLStyling,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n};\r\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,IAAGC,GAAG,QAAO,mBAAmB;AAC7C,SAAQC,MAAM,QAAO,GAAG;AAExB,SAAQC,IAAI,QAAO,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAY9B,OAAO,IAAMC,cAAc,GAAGN,MAAM,CAAC,KAAK,CAAC,CAAkB,UAAAO,IAAA;EAAA,IACGC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACOC,UAAU,GAAAF,IAAA,CAAvBG,WAAW;IACXC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IACTC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,UAAU,GAAAN,IAAA,CAAVM,UAAU;IACMC,aAAa,GAAAP,IAAA,CAA7BQ,cAAc;IACOC,kBAAkB,GAAAT,IAAA,CAAvCU,mBAAmB;EAAA,OACd;IACnEC,QAAQ,EAAEP,SAAS;IACnBQ,UAAU,EAAEP,WAAW;IACvBH,UAAU,EAAEA,UAAU,GAAG,IAAI;IAC7BK,aAAa,EAAEA,aAAa,GAAGA,aAAa,GAAG,MAAM;IACrDE,kBAAkB,EAAEA,kBAAkB,GAAGA,kBAAkB,GAAG,MAAM;IACpEI,SAAS,EAAEP,UAAU,GAAGA,UAAU,GAAG,QAAQ;IAC7CQ,KAAK,EAAEb,MAAM,GAAGA,MAAM,GAAGN,MAAM,CAACoB;EAClC,CAAC;AAAA,CAAC,CAAC;AAAC,IAECC,kBAAkB;AAAA,WAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EA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SAAS,EAAAmB,GAAA,CAAAE,KAAA;EACTL,QAAQ,EAAAG,GAAA,CAAAG;AAAA;AA2IV,OAAO,IAAM0B,UAAU,GAAGxE,GAAG,CAAAyE,gBAAA,KAAAA,gBAAA,GAAAzC,sBAAA,ygCA+E5B;AAED,OAAO,IAAM0C,eAAe,GAAG1E,GAAG,CAAA2E,gBAAA,KAAAA,gBAAA,GAAA3C,sBAAA,iFAIjC;AAED,OAAO,IAAM4C,cAAc,GAAG5E,GAAG,CAAA6E,gBAAA,KAAAA,gBAAA,GAAA7C,sBAAA,mFAIhC;AAED,OAAO,IAAM8C,mBAAmB,GAAG9E,GAAG,CAAA+E,gBAAA,KAAAA,gBAAA,GAAA/C,sBAAA,0GAKrC;AAED,OAAO,IAAMgD,IAAI,GAAGjF,MAAM,CAACkF,CAAC,CAAAC,gBAAA,KAAAA,gBAAA,GAAAlD,sBAAA,mBACxB4C,cAAc,CACjB;AAED,OAAO,IAAMO,KAAK,GAAGpF,MAAM,CAACkF,CAAC,CAAAG,gBAAA,KAAAA,gBAAA,GAAApD,sBAAA,mBACzB0C,eAAe,CAClB;AAED,OAAO,IAAMW,SAAS,GAAGtF,MAAM,CAACkF,CAAC,CAAAK,gBAAA,KAAAA,gBAAA,GAAAtD,sBAAA,mBAC7B8C,mBAAmB,CACtB;AAED,SACExD,kBAAkB,EAClBgB,WAAW,EACXU,UAAU,EACVG,UAAU,EACVG,UAAU,EACVG,WAAW,EACXG,YAAY,EACZE,mBAAmB;AAErB,SACEzB,kBAAkB,EAClBU,iBAAiB,EACjBG,iBAAiB,EACjBG,iBAAiB,EACjBG,kBAAkB,EAClBG,mBAAmB","ignoreList":[]}
1
+ {"version":3,"file":"typography.js","names":["React","styled","css","COLORS","Size","jsx","_jsx","TypographyBase","div","_templateObject","_taggedTemplateLiteral","props","$fontSize","$fontWeight","$lineHeight","_props$$textTransform","$textTransform","_props$$textDecoratio","$textDecorationLine","_props$$fontStyle","$fontStyle","_props$color","color","getColor","theme","ComponentTextStyle","componentFontWeight","textStyle","fontWeight","Bold","UppercaseBold","componentFontStyle","fontStyle","Italic","componentTextTransformation","ComponentStyling","fontSize","lineHeight","_templateObject2","concat","ComponentXLStyling","ComponentXL","_ref","children","className","$color","propTypes","_pt","string","oneOf","node","ComponentLStyling","ComponentL","_ref2","ComponentMStyling","ComponentM","_ref3","ComponentSStyling","ComponentS","_ref4","ComponentXSStyling","ComponentXS","_ref5","textTransform","ComponentXXSStyling","ComponentXXS","_ref6","ComponentResponsive","_ref7","size","width","fontsize","Medium","Small","Large","XXSmall","XSmall","Typography","_templateObject3","QuoteTypography","_templateObject4","NoteTypography","_templateObject5","UpperCaseTypography","_templateObject6","Note","p","_templateObject7","Quote","_templateObject8","UpperCase","_templateObject9"],"sources":["../../src/styles/typography.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled, {css} from 'styled-components';\r\nimport {COLORS} from '.';\r\nimport {Property} from 'csstype';\r\nimport {Size} from '../types';\r\n\r\nexport const TypographyBase = styled.div<{$color?: string,\r\n $lineHeight: number,\r\n $fontSize: number,\r\n $fontWeight: number,\r\n $fontStyle?: string,\r\n $textTransform?: Property.TextTransform,\r\n $textDecorationLine?: Property.TextDecorationLine,\r\n}>`\r\n fontSize: ${props => props.$fontSize};\r\n fontWeight: ${props => props.$fontWeight};\r\n lineHeight: ${props => props.$lineHeight}px;\r\n textTransform: ${props => props.$textTransform ?? 'none' };\r\n textDecorationLine: ${props => props.$textDecorationLine ?? 'none'};\r\n fontStyle: ${props => props.$fontStyle ?? 'normal'};\r\n color: ${props => props.color ?? COLORS.getColor('black', props.theme)};\r\n`;\r\n\r\nenum ComponentTextStyle {\r\n Regular = 1,\r\n Bold,\r\n Italic,\r\n UppercaseBold,\r\n}\r\n\r\ntype ComponentProps = {\r\n color?: string;\r\n className?: string;\r\n textStyle?: ComponentTextStyle;\r\n children?: React.ReactNode;\r\n};\r\n\r\nconst componentFontWeight = (textStyle?: ComponentTextStyle) => {\r\n let fontWeight = 400;\r\n if (textStyle === ComponentTextStyle.Bold || textStyle === ComponentTextStyle.UppercaseBold) {\r\n fontWeight = 700;\r\n }\r\n return fontWeight;\r\n};\r\n\r\nconst componentFontStyle = (textStyle?: ComponentTextStyle) => {\r\n let fontStyle = textStyle && textStyle === ComponentTextStyle.Italic ? 'italic' : '';\r\n return fontStyle;\r\n};\r\n\r\nconst componentTextTransformation = (textStyle?: ComponentTextStyle): Property.TextTransform => {\r\n let fontStyle: Property.TextTransform = textStyle && textStyle === ComponentTextStyle.UppercaseBold ? 'uppercase' : 'none';\r\n return fontStyle;\r\n};\r\n\r\nconst ComponentStyling = (fontSize: string, lineHeight: string, textStyle: ComponentTextStyle, color: string | undefined | null) => {\r\n return css`\r\n font-size: ${fontSize};\r\n font-weight: ${componentFontWeight(textStyle)};\r\n line-height: ${lineHeight};\r\n font-style: ${componentFontStyle(textStyle)};\r\n ${props => color === null ? '' : `color: ${color || COLORS.getColor('black', props.theme)};`}\r\n `;\r\n};\r\n\r\nconst ComponentXLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('24px', '28px', textStyle, color);\r\nconst ComponentXL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={28} $fontSize={24} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('20px', '24px', textStyle, color);\r\nconst ComponentL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={24} $fontSize={20} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentMStyling = (textStyle: ComponentTextStyle, color: string | undefined | null) => ComponentStyling('18px', '24px', textStyle, color);\r\nconst ComponentM: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={24} $fontSize={18} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('16px', '20px', textStyle, color);\r\nconst ComponentS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={20} $fontSize={16} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('14px', '16px', textStyle, color);\r\nconst ComponentXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={16} $fontSize={14} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} $textTransform={textTransform}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('12px', '16px', textStyle, color);\r\nconst ComponentXXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} $lineHeight={16} $fontSize={12} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} $textTransform={textTransform}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentResponsive: React.FunctionComponent<ComponentProps & { size?: Size; width: number }> = ({\r\n color,\r\n textStyle,\r\n children,\r\n size,\r\n width\r\n }) => {\r\n let fontsize = size;\r\n if (!size) {\r\n if (width == -1) {\r\n fontsize = Size.Medium;\r\n } else if (width < 768) {\r\n fontsize = Size.Small;\r\n } else if (width < 992) {\r\n fontsize = Size.Medium;\r\n } else {\r\n fontsize = Size.Large;\r\n }\r\n }\r\n switch (fontsize) {\r\n case Size.XXSmall:\r\n return <ComponentXXS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.XSmall:\r\n return <ComponentXS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Small:\r\n return <ComponentS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Medium:\r\n return <ComponentM color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Large:\r\n default:\r\n return <ComponentL color={color} textStyle={textStyle} children={children}/>;\r\n }\r\n};\r\n\r\nexport const Typography = css`\r\n html {\r\n font-size: 100%;\r\n }\r\n\r\n @media (min-width: 48rem) {\r\n html {\r\n font-size: 112.5%;\r\n }\r\n }\r\n\r\n @media (min-width: 80rem) {\r\n html {\r\n font-size: 125%;\r\n }\r\n }\r\n\r\n h1, h2, h3, h4, h5, h6 {\r\n font-weight: 700;\r\n line-height: 120%;\r\n margin: 0;\r\n }\r\n\r\n h1 {\r\n font-size: 3rem;\r\n }\r\n\r\n h2 {\r\n font-size: 2.5rem;\r\n }\r\n\r\n h3 {\r\n font-size: 2rem;\r\n }\r\n\r\n h4 {\r\n font-size: 1.75rem;\r\n }\r\n\r\n h5 {\r\n font-size: 1.5rem;\r\n }\r\n\r\n h6 {\r\n font-size: 1.25rem;\r\n }\r\n\r\n p {\r\n font-size: 1rem;\r\n line-height: 150%;\r\n margin: 0 0 0.5rem;\r\n }\r\n\r\n p:last-of-type {\r\n margin-bottom: 0;\r\n }\r\n\r\n\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 34rem;\r\n }\r\n\r\n :lang(ja-jp) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(ko-kr) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(zh-CN) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n`;\r\n\r\nexport const QuoteTypography = css`\r\n font-size: 1.5rem;\r\n line-height: 150%;\r\n margin-bottom: 0.75rem;\r\n`;\r\n\r\nexport const NoteTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n margin-bottom: 0.375rem;\r\n`;\r\n\r\nexport const UpperCaseTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n font-weight: 700;\r\n text-transform: uppercase;\r\n`;\r\n\r\nexport const Note = styled.p`\r\n ${NoteTypography}\r\n`;\r\n\r\nexport const Quote = styled.p`\r\n ${QuoteTypography}\r\n`;\r\n\r\nexport const UpperCase = styled.p`\r\n ${UpperCaseTypography}\r\n`;\r\n\r\nexport {\r\n ComponentTextStyle,\r\n ComponentXL,\r\n ComponentL,\r\n ComponentM,\r\n ComponentS,\r\n ComponentXS,\r\n ComponentXXS,\r\n ComponentResponsive\r\n};\r\nexport {\r\n ComponentXLStyling,\r\n ComponentLStyling,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n};\r\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,IAAGC,GAAG,QAAO,mBAAmB;AAC7C,SAAQC,MAAM,QAAO,GAAG;AAExB,SAAQC,IAAI,QAAO,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE9B,OAA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ED,OAAO,IAAMuE,cAAc,GAAG/E,GAAG,CAAAgF,gBAAA,KAAAA,gBAAA,GAAAxE,sBAAA,mFAIhC;AAED,OAAO,IAAMyE,mBAAmB,GAAGjF,GAAG,CAAAkF,gBAAA,KAAAA,gBAAA,GAAA1E,sBAAA,0GAKrC;AAED,OAAO,IAAM2E,IAAI,GAAGpF,MAAM,CAACqF,CAAC,CAAAC,gBAAA,KAAAA,gBAAA,GAAA7E,sBAAA,mBACxBuE,cAAc,CACjB;AAED,OAAO,IAAMO,KAAK,GAAGvF,MAAM,CAACqF,CAAC,CAAAG,gBAAA,KAAAA,gBAAA,GAAA/E,sBAAA,mBACzBqE,eAAe,CAClB;AAED,OAAO,IAAMW,SAAS,GAAGzF,MAAM,CAACqF,CAAC,CAAAK,gBAAA,KAAAA,gBAAA,GAAAjF,sBAAA,mBAC7ByE,mBAAmB,CACtB;AAED,SACE1D,kBAAkB,EAClBgB,WAAW,EACXW,UAAU,EACVG,UAAU,EACVG,UAAU,EACVG,WAAW,EACXI,YAAY,EACZE,mBAAmB;AAErB,SACE3B,kBAAkB,EAClBW,iBAAiB,EACjBG,iBAAiB,EACjBG,iBAAiB,EACjBG,kBAAkB,EAClBI,mBAAmB","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ var _exportNames = {
8
+ render: true
9
+ };
10
+ exports.render = void 0;
11
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
+ var _react = _interopRequireDefault(require("react"));
13
+ var _react2 = require("@testing-library/react");
14
+ Object.keys(_react2).forEach(function (key) {
15
+ if (key === "default" || key === "__esModule") return;
16
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
17
+ if (key in exports && exports[key] === _react2[key]) return;
18
+ Object.defineProperty(exports, key, {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _react2[key];
22
+ }
23
+ });
24
+ });
25
+ var _styledComponents = require("styled-components");
26
+ var _jsxRuntime = require("react/jsx-runtime");
27
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
28
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29
+ var AllTheProviders = function AllTheProviders(_ref) {
30
+ var children = _ref.children;
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledComponents.ThemeProvider, {
32
+ theme: {},
33
+ children: children
34
+ });
35
+ };
36
+ var customRender = function customRender(ui, options) {
37
+ return (0, _react2.render)(ui, _objectSpread({
38
+ wrapper: AllTheProviders
39
+ }, options));
40
+ };
41
+ exports.render = customRender;
42
+ //# sourceMappingURL=test-utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-utils.cjs","names":["_react","_interopRequireDefault","require","_react2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_styledComponents","_jsxRuntime","ownKeys","e","r","t","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","push","apply","_objectSpread","arguments","length","_defineProperty2","getOwnPropertyDescriptors","defineProperties","AllTheProviders","_ref","children","jsx","ThemeProvider","theme","customRender","ui","options","render","wrapper"],"sources":["../src/test-utils.tsx"],"sourcesContent":["import React, {ReactElement} from 'react'\r\nimport {render, RenderOptions} from '@testing-library/react'\r\nimport {ThemeProvider} from 'styled-components'\r\n\r\nconst AllTheProviders = ({children}: {children: React.ReactNode}) => {\r\n return (\r\n <ThemeProvider theme={{}}>\r\n {children}\r\n </ThemeProvider>\r\n )\r\n}\r\n\r\nconst customRender = (\r\n ui: ReactElement,\r\n options?: Omit<RenderOptions, 'wrapper'>,\r\n) => render(ui, {wrapper: AllTheProviders, ...options})\r\n\r\nexport * from '@testing-library/react'\r\nexport {customRender as render}"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAgBAE,MAAA,CAAAC,IAAA,CAAAF,OAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,OAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,OAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAfA,IAAAS,iBAAA,GAAAd,OAAA;AAA+C,IAAAe,WAAA,GAAAf,OAAA;AAAA,SAAAgB,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAjB,MAAA,CAAAC,IAAA,CAAAc,CAAA,OAAAf,MAAA,CAAAkB,qBAAA,QAAAC,CAAA,GAAAnB,MAAA,CAAAkB,qBAAA,CAAAH,CAAA,GAAAC,CAAA,KAAAG,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAJ,CAAA,WAAAhB,MAAA,CAAAqB,wBAAA,CAAAN,CAAA,EAAAC,CAAA,EAAAN,UAAA,OAAAO,CAAA,CAAAK,IAAA,CAAAC,KAAA,CAAAN,CAAA,EAAAE,CAAA,YAAAF,CAAA;AAAA,SAAAO,cAAAT,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAS,SAAA,CAAAC,MAAA,EAAAV,CAAA,UAAAC,CAAA,WAAAQ,SAAA,CAAAT,CAAA,IAAAS,SAAA,CAAAT,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAd,MAAA,CAAAiB,CAAA,OAAAf,OAAA,WAAAc,CAAA,QAAAW,gBAAA,aAAAZ,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAhB,MAAA,CAAA4B,yBAAA,GAAA5B,MAAA,CAAA6B,gBAAA,CAAAd,CAAA,EAAAf,MAAA,CAAA4B,yBAAA,CAAAX,CAAA,KAAAH,OAAA,CAAAd,MAAA,CAAAiB,CAAA,GAAAf,OAAA,WAAAc,CAAA,IAAAhB,MAAA,CAAAS,cAAA,CAAAM,CAAA,EAAAC,CAAA,EAAAhB,MAAA,CAAAqB,wBAAA,CAAAJ,CAAA,EAAAD,CAAA,iBAAAD,CAAA;AAE/C,IAAMe,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAAgD;EAAA,IAA3CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAChC,oBACE,IAAAnB,WAAA,CAAAoB,GAAA,EAACrB,iBAAA,CAAAsB,aAAa;IAACC,KAAK,EAAE,CAAC,CAAE;IAAAH,QAAA,EACpBA;EAAQ,CACE,CAAC;AAEpB,CAAC;AAED,IAAMI,YAAY,GAAG,SAAfA,YAAYA,CAChBC,EAAgB,EAChBC,OAAwC;EAAA,OACrC,IAAAC,cAAM,EAACF,EAAE,EAAAb,aAAA;IAAGgB,OAAO,EAAEV;EAAe,GAAKQ,OAAO,CAAC,CAAC;AAAA;AAAA9B,OAAA,CAAA+B,MAAA,GAAAH,YAAA","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ import { ReactElement } from 'react';
2
+ import { RenderOptions } from '@testing-library/react';
3
+ declare const customRender: (ui: ReactElement, options?: Omit<RenderOptions, 'wrapper'>) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
4
+ export * from '@testing-library/react';
5
+ export { customRender as render };
@@ -0,0 +1,22 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ import React from 'react';
5
+ import { render } from '@testing-library/react';
6
+ import { ThemeProvider } from 'styled-components';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ var AllTheProviders = function AllTheProviders(_ref) {
9
+ var children = _ref.children;
10
+ return /*#__PURE__*/_jsx(ThemeProvider, {
11
+ theme: {},
12
+ children: children
13
+ });
14
+ };
15
+ var customRender = function customRender(ui, options) {
16
+ return render(ui, _objectSpread({
17
+ wrapper: AllTheProviders
18
+ }, options));
19
+ };
20
+ export * from '@testing-library/react';
21
+ export { customRender as render };
22
+ //# sourceMappingURL=test-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-utils.js","names":["React","render","ThemeProvider","jsx","_jsx","AllTheProviders","_ref","children","theme","customRender","ui","options","_objectSpread","wrapper"],"sources":["../src/test-utils.tsx"],"sourcesContent":["import React, {ReactElement} from 'react'\r\nimport {render, RenderOptions} from '@testing-library/react'\r\nimport {ThemeProvider} from 'styled-components'\r\n\r\nconst AllTheProviders = ({children}: {children: React.ReactNode}) => {\r\n return (\r\n <ThemeProvider theme={{}}>\r\n {children}\r\n </ThemeProvider>\r\n )\r\n}\r\n\r\nconst customRender = (\r\n ui: ReactElement,\r\n options?: Omit<RenderOptions, 'wrapper'>,\r\n) => render(ui, {wrapper: AllTheProviders, ...options})\r\n\r\nexport * from '@testing-library/react'\r\nexport {customRender as render}"],"mappings":";;;AAAA,OAAOA,KAAK,MAAsB,OAAO;AACzC,SAAQC,MAAM,QAAsB,wBAAwB;AAC5D,SAAQC,aAAa,QAAO,mBAAmB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE/C,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAAgD;EAAA,IAA3CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAChC,oBACEH,IAAA,CAACF,aAAa;IAACM,KAAK,EAAE,CAAC,CAAE;IAAAD,QAAA,EACpBA;EAAQ,CACE,CAAC;AAEpB,CAAC;AAED,IAAME,YAAY,GAAG,SAAfA,YAAYA,CAChBC,EAAgB,EAChBC,OAAwC;EAAA,OACrCV,MAAM,CAACS,EAAE,EAAAE,aAAA;IAAGC,OAAO,EAAER;EAAe,GAAKM,OAAO,CAAC,CAAC;AAAA;AAEvD,cAAc,wBAAwB;AACtC,SAAQF,YAAY,IAAIR,MAAM","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laerdal/life-react-components",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "private": false,
5
5
  "author": "Erik Martirosyan <erik.martirosyan@laerdal.com>",
6
6
  "contributors": [],
@@ -102,13 +102,15 @@
102
102
  "@storybook/react": "^8.1.3",
103
103
  "@storybook/react-webpack5": "^8.1.3",
104
104
  "@storybook/test": "^8.1.3",
105
- "@testing-library/jest-dom": "^5.16.5",
106
- "@testing-library/react": "13.4.0",
107
- "@testing-library/user-event": "^14.4.3",
108
- "@types/jest": "^29.2.3",
105
+ "@testing-library/dom": "^10.4.0",
106
+ "@testing-library/jest-dom": "^6.5.0",
107
+ "@testing-library/react": "^16.0.1",
108
+ "@testing-library/user-event": "^14.5.2",
109
+ "@types/jest": "^29.5.12",
109
110
  "@types/node": "^18.0.6",
110
111
  "@types/react": "^18.3.3",
111
112
  "@types/react-datepicker": "^4.4.2",
113
+ "@types/react-dom": "^18.3.0",
112
114
  "@types/react-modal": "^3.13.1",
113
115
  "@types/react-router-dom": "^5.3.3",
114
116
  "babel-plugin-inline-react-svg": "^2.0.1",
@@ -117,8 +119,8 @@
117
119
  "cross-env": "^7.0.3",
118
120
  "eslint-plugin-storybook": "^0.8.0",
119
121
  "history": "^5.3.0",
120
- "jest": "^29.3.1",
121
- "jest-environment-jsdom": "^29.2.1",
122
+ "jest": "^29.7.0",
123
+ "jest-environment-jsdom": "^29.7.0",
122
124
  "jest-styled-components": "^7.2.0",
123
125
  "jest-svg-transformer": "^1.0.0",
124
126
  "react-router": "^6.3.0",
@@ -126,7 +128,7 @@
126
128
  "react-share": "^5.1.0",
127
129
  "regenerator-runtime": "^0.13.9",
128
130
  "storybook": "^8.1.3",
129
- "ts-jest": "^29.0.3"
131
+ "ts-jest": "^29.2.5"
130
132
  },
131
133
  "peerDependencies": {
132
134
  "@babel/core": "^7.0.0",