@laerdal/life-react-components 5.0.0 → 5.0.2-dev.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.
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/InputFields/TextField.d.ts +1 -1
- package/dist/Modals/ModalContainer.cjs +6 -5
- package/dist/Modals/ModalContainer.cjs.map +1 -1
- package/dist/Modals/ModalContainer.d.ts +1 -0
- package/dist/Modals/ModalContainer.js +6 -5
- package/dist/Modals/ModalContainer.js.map +1 -1
- package/dist/Modals/ModalDialog.cjs +4 -1
- package/dist/Modals/ModalDialog.cjs.map +1 -1
- package/dist/Modals/ModalDialog.d.ts +1 -0
- package/dist/Modals/ModalDialog.js +4 -1
- package/dist/Modals/ModalDialog.js.map +1 -1
- package/dist/Tabs/__tests__/Tablist.tests.d.ts +1 -1
- package/dist/styles/typography.cjs +63 -62
- package/dist/styles/typography.cjs.map +1 -1
- package/dist/styles/typography.d.ts +6 -9
- package/dist/styles/typography.js +63 -62
- package/dist/styles/typography.js.map +1 -1
- package/dist/test-utils.cjs +42 -0
- package/dist/test-utils.cjs.map +1 -0
- package/dist/test-utils.d.ts +5 -0
- package/dist/test-utils.js +22 -0
- package/dist/test-utils.js.map +1 -0
- package/package.json +10 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_interopRequireWildcard","_","_types","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TypographyBase","styled","_ref","$color","lineHeight","$lineHeight","$fontSize","$fontWeight","$fontStyle","textTransform","$textTransform","textDecorationLine","$textDecorationLine","fontSize","fontWeight","fontStyle","color","COLORS","black","exports","ComponentTextStyle","componentFontWeight","textStyle","Bold","UppercaseBold","componentFontStyle","Italic","componentTextTransformation","ComponentStyling","css","_taggedTemplateLiteral2","props","concat","getColor","theme","ComponentXLStyling","ComponentXL","_ref2","children","className","jsx","propTypes","_propTypes","string","oneOf","node","ComponentLStyling","ComponentL","_ref3","ComponentMStyling","ComponentM","_ref4","ComponentSStyling","ComponentS","_ref5","ComponentXSStyling","ComponentXS","_ref6","ComponentXXSStyling","ComponentXXS","_ref7","ComponentResponsive","_ref8","size","width","fontsize","Size","Medium","Small","Large","XXSmall","XSmall","Typography","QuoteTypography","NoteTypography","UpperCaseTypography","Note","p","Quote","UpperCase"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAA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AyD,IAAA,GAAAA,IAAA;AAEK,IAAME,KAAK,GAAG7E,4BAAM,CAAC4E,CAAC,CAAAnG,gBAAA,KAAAA,gBAAA,OAAAoD,uBAAA,+BACzB2C,eAAe,CAClB;AAACtD,OAAA,CAAA2D,KAAA,GAAAA,KAAA;AAEK,IAAMC,SAAS,GAAG9E,4BAAM,CAAC4E,CAAC,CAAAlG,gBAAA,KAAAA,gBAAA,OAAAmD,uBAAA,+BAC7B6C,mBAAmB,CACtB;AAACxD,OAAA,CAAA4D,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"typography.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_interopRequireWildcard","_","_types","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TypographyBase","styled","div","_taggedTemplateLiteral2","props","$fontSize","$fontWeight","$lineHeight","_props$$textTransform","$textTransform","_props$$textDecoratio","$textDecorationLine","_props$$fontStyle","$fontStyle","_props$color","color","COLORS","getColor","theme","exports","ComponentTextStyle","componentFontWeight","textStyle","fontWeight","Bold","UppercaseBold","componentFontStyle","fontStyle","Italic","componentTextTransformation","ComponentStyling","fontSize","lineHeight","css","concat","ComponentXLStyling","ComponentXL","_ref","children","className","jsx","$color","propTypes","_propTypes","string","oneOf","node","ComponentLStyling","ComponentL","_ref2","ComponentMStyling","ComponentM","_ref3","ComponentSStyling","ComponentS","_ref4","ComponentXSStyling","ComponentXS","_ref5","textTransform","ComponentXXSStyling","ComponentXXS","_ref6","ComponentResponsive","_ref7","size","width","fontsize","Size","Medium","Small","Large","XXSmall","XSmall","Typography","QuoteTypography","NoteTypography","UpperCaseTypography","Note","p","Quote","UpperCase"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,CAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAA8B,IAAAK,WAAA,GAAAL,OAAA;AAAA,IAAAM,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAd,wBAAAc,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CA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
|
3
3
|
import { Size } from '../types';
|
|
4
|
-
|
|
5
|
-
$color?: string;
|
|
4
|
+
export declare const TypographyBase: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
5
|
+
$color?: string | undefined;
|
|
6
6
|
$lineHeight: number;
|
|
7
7
|
$fontSize: number;
|
|
8
8
|
$fontWeight: number;
|
|
9
|
-
$fontStyle?: string;
|
|
10
|
-
$textTransform?: Property.TextTransform;
|
|
11
|
-
$textDecorationLine?: Property.TextDecorationLine;
|
|
12
|
-
}
|
|
13
|
-
export declare const TypographyBase: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
15
|
-
}, ITypographyBase>> & string;
|
|
9
|
+
$fontStyle?: string | undefined;
|
|
10
|
+
$textTransform?: Property.TextTransform | undefined;
|
|
11
|
+
$textDecorationLine?: Property.TextDecorationLine | undefined;
|
|
12
|
+
}>> & string;
|
|
16
13
|
declare enum ComponentTextStyle {
|
|
17
14
|
Regular = 1,
|
|
18
15
|
Bold = 2,
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
2
|
import _pt from "prop-types";
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
6
|
import { COLORS } from '.';
|
|
7
7
|
import { Size } from '../types';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
export var TypographyBase = styled(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
export var TypographyBase = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fontSize: ", ";\n fontWeight: ", ";\n lineHeight: ", "px;\n textTransform: ", ";\n textDecorationLine: ", ";\n fontStyle: ", ";\n color: ", ";\n"])), function (props) {
|
|
10
|
+
return props.$fontSize;
|
|
11
|
+
}, function (props) {
|
|
12
|
+
return props.$fontWeight;
|
|
13
|
+
}, function (props) {
|
|
14
|
+
return props.$lineHeight;
|
|
15
|
+
}, function (props) {
|
|
16
|
+
var _props$$textTransform;
|
|
17
|
+
return (_props$$textTransform = props.$textTransform) !== null && _props$$textTransform !== void 0 ? _props$$textTransform : 'none';
|
|
18
|
+
}, function (props) {
|
|
19
|
+
var _props$$textDecoratio;
|
|
20
|
+
return (_props$$textDecoratio = props.$textDecorationLine) !== null && _props$$textDecoratio !== void 0 ? _props$$textDecoratio : 'none';
|
|
21
|
+
}, function (props) {
|
|
22
|
+
var _props$$fontStyle;
|
|
23
|
+
return (_props$$fontStyle = props.$fontStyle) !== null && _props$$fontStyle !== void 0 ? _props$$fontStyle : 'normal';
|
|
24
|
+
}, function (props) {
|
|
25
|
+
var _props$color;
|
|
26
|
+
return (_props$color = props.color) !== null && _props$color !== void 0 ? _props$color : COLORS.getColor('black', props.theme);
|
|
26
27
|
});
|
|
27
28
|
var ComponentTextStyle;
|
|
28
29
|
(function (ComponentTextStyle) {
|
|
@@ -47,18 +48,18 @@ var componentTextTransformation = function componentTextTransformation(textStyle
|
|
|
47
48
|
return fontStyle;
|
|
48
49
|
};
|
|
49
50
|
var ComponentStyling = function ComponentStyling(fontSize, lineHeight, textStyle, color) {
|
|
50
|
-
return css(
|
|
51
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n font-style: ", ";\n ", "\n "])), fontSize, componentFontWeight(textStyle), lineHeight, componentFontStyle(textStyle), function (props) {
|
|
51
52
|
return color === null ? '' : "color: ".concat(color || COLORS.getColor('black', props.theme), ";");
|
|
52
53
|
});
|
|
53
54
|
};
|
|
54
55
|
var ComponentXLStyling = function ComponentXLStyling(textStyle, color) {
|
|
55
56
|
return ComponentStyling('24px', '28px', textStyle, color);
|
|
56
57
|
};
|
|
57
|
-
var ComponentXL = function ComponentXL(
|
|
58
|
-
var color =
|
|
59
|
-
textStyle =
|
|
60
|
-
children =
|
|
61
|
-
className =
|
|
58
|
+
var ComponentXL = function ComponentXL(_ref) {
|
|
59
|
+
var color = _ref.color,
|
|
60
|
+
textStyle = _ref.textStyle,
|
|
61
|
+
children = _ref.children,
|
|
62
|
+
className = _ref.className;
|
|
62
63
|
var fontWeight = componentFontWeight(textStyle);
|
|
63
64
|
var fontStyle = componentFontStyle(textStyle);
|
|
64
65
|
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
@@ -80,11 +81,11 @@ ComponentXL.propTypes = {
|
|
|
80
81
|
var ComponentLStyling = function ComponentLStyling(textStyle, color) {
|
|
81
82
|
return ComponentStyling('20px', '24px', textStyle, color);
|
|
82
83
|
};
|
|
83
|
-
var ComponentL = function ComponentL(
|
|
84
|
-
var color =
|
|
85
|
-
textStyle =
|
|
86
|
-
children =
|
|
87
|
-
className =
|
|
84
|
+
var ComponentL = function ComponentL(_ref2) {
|
|
85
|
+
var color = _ref2.color,
|
|
86
|
+
textStyle = _ref2.textStyle,
|
|
87
|
+
children = _ref2.children,
|
|
88
|
+
className = _ref2.className;
|
|
88
89
|
var fontWeight = componentFontWeight(textStyle);
|
|
89
90
|
var fontStyle = componentFontStyle(textStyle);
|
|
90
91
|
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
@@ -106,11 +107,11 @@ ComponentL.propTypes = {
|
|
|
106
107
|
var ComponentMStyling = function ComponentMStyling(textStyle, color) {
|
|
107
108
|
return ComponentStyling('18px', '24px', textStyle, color);
|
|
108
109
|
};
|
|
109
|
-
var ComponentM = function ComponentM(
|
|
110
|
-
var color =
|
|
111
|
-
textStyle =
|
|
112
|
-
children =
|
|
113
|
-
className =
|
|
110
|
+
var ComponentM = function ComponentM(_ref3) {
|
|
111
|
+
var color = _ref3.color,
|
|
112
|
+
textStyle = _ref3.textStyle,
|
|
113
|
+
children = _ref3.children,
|
|
114
|
+
className = _ref3.className;
|
|
114
115
|
var fontWeight = componentFontWeight(textStyle);
|
|
115
116
|
var fontStyle = componentFontStyle(textStyle);
|
|
116
117
|
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
@@ -132,11 +133,11 @@ ComponentM.propTypes = {
|
|
|
132
133
|
var ComponentSStyling = function ComponentSStyling(textStyle, color) {
|
|
133
134
|
return ComponentStyling('16px', '20px', textStyle, color);
|
|
134
135
|
};
|
|
135
|
-
var ComponentS = function ComponentS(
|
|
136
|
-
var color =
|
|
137
|
-
textStyle =
|
|
138
|
-
children =
|
|
139
|
-
className =
|
|
136
|
+
var ComponentS = function ComponentS(_ref4) {
|
|
137
|
+
var color = _ref4.color,
|
|
138
|
+
textStyle = _ref4.textStyle,
|
|
139
|
+
children = _ref4.children,
|
|
140
|
+
className = _ref4.className;
|
|
140
141
|
var fontWeight = componentFontWeight(textStyle);
|
|
141
142
|
var fontStyle = componentFontStyle(textStyle);
|
|
142
143
|
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
@@ -158,11 +159,11 @@ ComponentS.propTypes = {
|
|
|
158
159
|
var ComponentXSStyling = function ComponentXSStyling(textStyle, color) {
|
|
159
160
|
return ComponentStyling('14px', '16px', textStyle, color);
|
|
160
161
|
};
|
|
161
|
-
var ComponentXS = function ComponentXS(
|
|
162
|
-
var color =
|
|
163
|
-
textStyle =
|
|
164
|
-
children =
|
|
165
|
-
className =
|
|
162
|
+
var ComponentXS = function ComponentXS(_ref5) {
|
|
163
|
+
var color = _ref5.color,
|
|
164
|
+
textStyle = _ref5.textStyle,
|
|
165
|
+
children = _ref5.children,
|
|
166
|
+
className = _ref5.className;
|
|
166
167
|
var fontWeight = componentFontWeight(textStyle);
|
|
167
168
|
var fontStyle = componentFontStyle(textStyle);
|
|
168
169
|
var textTransform = componentTextTransformation(textStyle);
|
|
@@ -186,11 +187,11 @@ ComponentXS.propTypes = {
|
|
|
186
187
|
var ComponentXXSStyling = function ComponentXXSStyling(textStyle, color) {
|
|
187
188
|
return ComponentStyling('12px', '16px', textStyle, color);
|
|
188
189
|
};
|
|
189
|
-
var ComponentXXS = function ComponentXXS(
|
|
190
|
-
var color =
|
|
191
|
-
textStyle =
|
|
192
|
-
children =
|
|
193
|
-
className =
|
|
190
|
+
var ComponentXXS = function ComponentXXS(_ref6) {
|
|
191
|
+
var color = _ref6.color,
|
|
192
|
+
textStyle = _ref6.textStyle,
|
|
193
|
+
children = _ref6.children,
|
|
194
|
+
className = _ref6.className;
|
|
194
195
|
var fontWeight = componentFontWeight(textStyle);
|
|
195
196
|
var fontStyle = componentFontStyle(textStyle);
|
|
196
197
|
var textTransform = componentTextTransformation(textStyle);
|
|
@@ -211,12 +212,12 @@ ComponentXXS.propTypes = {
|
|
|
211
212
|
textStyle: _pt.oneOf([1, 2, 3, 4]),
|
|
212
213
|
children: _pt.node
|
|
213
214
|
};
|
|
214
|
-
var ComponentResponsive = function ComponentResponsive(
|
|
215
|
-
var color =
|
|
216
|
-
textStyle =
|
|
217
|
-
children =
|
|
218
|
-
size =
|
|
219
|
-
width =
|
|
215
|
+
var ComponentResponsive = function ComponentResponsive(_ref7) {
|
|
216
|
+
var color = _ref7.color,
|
|
217
|
+
textStyle = _ref7.textStyle,
|
|
218
|
+
children = _ref7.children,
|
|
219
|
+
size = _ref7.size,
|
|
220
|
+
width = _ref7.width;
|
|
220
221
|
var fontsize = size;
|
|
221
222
|
if (!size) {
|
|
222
223
|
if (width == -1) {
|
|
@@ -269,13 +270,13 @@ ComponentResponsive.propTypes = {
|
|
|
269
270
|
textStyle: _pt.oneOf([1, 2, 3, 4]),
|
|
270
271
|
children: _pt.node
|
|
271
272
|
};
|
|
272
|
-
export var Typography = css(
|
|
273
|
-
export var QuoteTypography = css(
|
|
274
|
-
export var NoteTypography = css(
|
|
275
|
-
export var UpperCaseTypography = css(
|
|
276
|
-
export var Note = styled.p(
|
|
277
|
-
export var Quote = styled.p(
|
|
278
|
-
export var UpperCase = styled.p(
|
|
273
|
+
export var Typography = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n html {\n font-size: 100%;\n }\n\n @media (min-width: 48rem) {\n html {\n font-size: 112.5%;\n }\n }\n\n @media (min-width: 80rem) {\n html {\n font-size: 125%;\n }\n }\n\n h1, h2, h3, h4, h5, h6 {\n font-weight: 700;\n line-height: 120%;\n margin: 0;\n }\n\n h1 {\n font-size: 3rem;\n }\n\n h2 {\n font-size: 2.5rem;\n }\n\n h3 {\n font-size: 2rem;\n }\n\n h4 {\n font-size: 1.75rem;\n }\n\n h5 {\n font-size: 1.5rem;\n }\n\n h6 {\n font-size: 1.25rem;\n }\n\n p {\n font-size: 1rem;\n line-height: 150%;\n margin: 0 0 0.5rem;\n }\n\n p:last-of-type {\n margin-bottom: 0;\n }\n\n\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 34rem;\n }\n\n :lang(ja-jp) {\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 30rem;\n }\n }\n\n :lang(ko-kr) {\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 30rem;\n }\n }\n\n :lang(zh-CN) {\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 30rem;\n }\n }\n"])));
|
|
274
|
+
export var QuoteTypography = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: 1.5rem;\n line-height: 150%;\n margin-bottom: 0.75rem;\n"])));
|
|
275
|
+
export var NoteTypography = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-size: 0.75rem;\n line-height: 150%;\n margin-bottom: 0.375rem;\n"])));
|
|
276
|
+
export var UpperCaseTypography = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: 0.75rem;\n line-height: 150%;\n font-weight: 700;\n text-transform: uppercase;\n"])));
|
|
277
|
+
export var Note = styled.p(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n"])), NoteTypography);
|
|
278
|
+
export var Quote = styled.p(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", "\n"])), QuoteTypography);
|
|
279
|
+
export var UpperCase = styled.p(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n"])), UpperCaseTypography);
|
|
279
280
|
export { ComponentTextStyle, ComponentXL, ComponentL, ComponentM, ComponentS, ComponentXS, ComponentXXS, ComponentResponsive };
|
|
280
281
|
export { ComponentXLStyling, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXSStyling, ComponentXXSStyling };
|
|
281
282
|
//# sourceMappingURL=typography.js.map
|
|
@@ -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,CAAT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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,OAAO,IAAMC,cAAc,GAAGN,MAAM,CAACO,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,mKAQ1B,UAAAC,KAAK;EAAA,OAAIA,KAAK,CAACC,SAAS;AAAA,GACtB,UAAAD,KAAK;EAAA,OAAIA,KAAK,CAACE,WAAW;AAAA,GAC1B,UAAAF,KAAK;EAAA,OAAIA,KAAK,CAACG,WAAW;AAAA,GACvB,UAAAH,KAAK;EAAA,IAAAI,qBAAA;EAAA,QAAAA,qBAAA,GAAIJ,KAAK,CAACK,cAAc,cAAAD,qBAAA,cAAAA,qBAAA,GAAI,MAAM;AAAA,GAClC,UAAAJ,KAAK;EAAA,IAAAM,qBAAA;EAAA,QAAAA,qBAAA,GAAIN,KAAK,CAACO,mBAAmB,cAAAD,qBAAA,cAAAA,qBAAA,GAAI,MAAM;AAAA,GACrD,UAAAN,KAAK;EAAA,IAAAQ,iBAAA;EAAA,QAAAA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W,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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W,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.
|
|
3
|
+
"version": "5.0.2-dev.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/
|
|
106
|
-
"@testing-library/
|
|
107
|
-
"@testing-library/
|
|
108
|
-
"@
|
|
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.
|
|
121
|
-
"jest-environment-jsdom": "^29.
|
|
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.
|
|
131
|
+
"ts-jest": "^29.2.5"
|
|
130
132
|
},
|
|
131
133
|
"peerDependencies": {
|
|
132
134
|
"@babel/core": "^7.0.0",
|