@laerdal/life-react-components 1.3.2-dev.2 → 1.3.2-dev.4

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.
Files changed (33) hide show
  1. package/dist/esm/AuthPage/AuthPage.js +1 -1
  2. package/dist/esm/AuthPage/AuthPage.js.map +1 -1
  3. package/dist/esm/AuthPage/Information.js +1 -1
  4. package/dist/esm/AuthPage/Information.js.map +1 -1
  5. package/dist/esm/Banners/Banner.js +16 -16
  6. package/dist/esm/Banners/Banner.js.map +1 -1
  7. package/dist/esm/Tabs/TabLink.js +1 -0
  8. package/dist/esm/Tabs/TabLink.js.map +1 -1
  9. package/dist/esm/styles/typography.js +66 -66
  10. package/dist/esm/styles/typography.js.map +1 -1
  11. package/dist/js/AuthPage/AuthPage.js +1 -1
  12. package/dist/js/AuthPage/AuthPage.js.map +1 -1
  13. package/dist/js/AuthPage/Information.d.ts +1 -1
  14. package/dist/js/AuthPage/Information.js +1 -1
  15. package/dist/js/AuthPage/Information.js.map +1 -1
  16. package/dist/js/Banners/Banner.js +16 -19
  17. package/dist/js/Banners/Banner.js.map +1 -1
  18. package/dist/js/Tabs/TabLink.js +1 -1
  19. package/dist/js/Tabs/TabLink.js.map +1 -1
  20. package/dist/js/styles/typography.d.ts +6 -6
  21. package/dist/js/styles/typography.js +66 -66
  22. package/dist/js/styles/typography.js.map +1 -1
  23. package/dist/umd/AuthPage/AuthPage.js +1 -1
  24. package/dist/umd/AuthPage/AuthPage.js.map +1 -1
  25. package/dist/umd/AuthPage/Information.js +1 -1
  26. package/dist/umd/AuthPage/Information.js.map +1 -1
  27. package/dist/umd/Banners/Banner.js +16 -16
  28. package/dist/umd/Banners/Banner.js.map +1 -1
  29. package/dist/umd/Tabs/TabLink.js +1 -0
  30. package/dist/umd/Tabs/TabLink.js.map +1 -1
  31. package/dist/umd/styles/typography.js +66 -66
  32. package/dist/umd/styles/typography.js.map +1 -1
  33. package/package.json +1 -1
@@ -23,7 +23,7 @@ const AuthPage = ({
23
23
  screenSetsContainerId
24
24
  }) => {
25
25
  return /*#__PURE__*/React.createElement(React.Fragment, null, showInformationSection && /*#__PURE__*/React.createElement(InformationContainer, {
26
- color: signUp ? COLORS.accent1_20 : COLORS.primary_20
26
+ $color: signUp ? COLORS.accent1_20 : COLORS.primary_20
27
27
  }, /*#__PURE__*/React.createElement(InformationContent, null, (signUpPlaceholderImage || signInPlaceholderImage) && /*#__PURE__*/React.createElement(InformationImage, {
28
28
  src: signUp ? signUpPlaceholderImage : signInPlaceholderImage,
29
29
  alt: signUp ? signUpPlaceholderImageAlt : signInPlaceholderImageAlt
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/AuthPage/AuthPage.tsx"],"names":["React","COLORS","ScreenSetsContainer","InformationContainer","InformationContent","InformationHeader","InformationText","InformationImage","AuthPage","showInformationSection","signUp","signUpPlaceholderImage","signInPlaceholderImage","signUpPlaceholderImageAlt","signInPlaceholderImageAlt","signUpInformationHeader","signInInformationHeader","signUpInformationText","signInInformationText","screenSetsContainerId","accent1_20","primary_20"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,MAAT,QAAuB,WAAvB;AACA,OAAOC,mBAAP,MAAgC,uBAAhC;AACA,SAASC,oBAAT,EAA+BC,kBAA/B,EAAmDC,iBAAnD,EAAsEC,eAAtE,EAAuFC,gBAAvF,QAA+G,eAA/G;;AA4BA;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG,CAAC;AAChBC,EAAAA,sBADgB;AAEhBC,EAAAA,MAFgB;AAGhBC,EAAAA,sBAHgB;AAIhBC,EAAAA,sBAJgB;AAKhBC,EAAAA,yBALgB;AAMhBC,EAAAA,yBANgB;AAOhBC,EAAAA,uBAPgB;AAQhBC,EAAAA,uBARgB;AAShBC,EAAAA,qBATgB;AAUhBC,EAAAA,qBAVgB;AAWhBC,EAAAA;AAXgB,CAAD,KAYI;AACnB,sBACE,0CACGV,sBAAsB,iBACrB,oBAAC,oBAAD;AAAsB,IAAA,KAAK,EAAEC,MAAM,GAAGT,MAAM,CAACmB,UAAV,GAAuBnB,MAAM,CAACoB;AAAjE,kBACE,oBAAC,kBAAD,QACG,CAACV,sBAAsB,IAAIC,sBAA3B,kBACC,oBAAC,gBAAD;AAAkB,IAAA,GAAG,EAAEF,MAAM,GAAGC,sBAAH,GAA4BC,sBAAzD;AAAiF,IAAA,GAAG,EAAEF,MAAM,GAAGG,yBAAH,GAA+BC;AAA3H,IAFJ,EAIG,CAACC,uBAAuB,IAAIC,uBAA5B,kBAAwD,oBAAC,iBAAD,QAAoBN,MAAM,GAAGK,uBAAH,GAA6BC,uBAAvD,CAJ3D,EAKG,CAACC,qBAAqB,IAAIC,qBAA1B,kBAAoD,oBAAC,eAAD,QAAkBR,MAAM,GAAGO,qBAAH,GAA2BC,qBAAnD,CALvD,CADF,CAFJ,eAYE,oBAAC,mBAAD;AAAqB,IAAA,EAAE,EAAEC,qBAAzB;AAAgD,IAAA,cAAc,EAAE,CAACV;AAAjE,IAZF,CADF;AAgBD,CA7BD;;;AA7BEA,EAAAA,sB;AAGAC,EAAAA,M;AAEAC,EAAAA,sB;AAEAC,EAAAA,sB;AAEAC,EAAAA,yB;AAEAC,EAAAA,yB;AAEAC,EAAAA,uB;AAEAC,EAAAA,uB;AAEAC,EAAAA,qB;AAEAC,EAAAA,qB;AAEAC,EAAAA,qB;;AAuCF,eAAeX,QAAf","sourcesContent":["import * as React from 'react';\nimport { COLORS } from '../styles';\nimport ScreenSetsContainer from './ScreenSetsContainer';\nimport { InformationContainer, InformationContent, InformationHeader, InformationText, InformationImage } from './Information';\n\ntype AuthPageProps = {\n /** set this to 'false' to hide the left side illustration/information section */\n showInformationSection: boolean;\n /** true if 'sign-up' screen-set is showing, otherwise false.\n * The value can be set using 'onBeforeScreenLoad' in 'gigya.accounts.showScreenSet(...)' and checking the loaded screen-set */\n signUp: boolean;\n /** img src string for 'sign-up' placeholder image */\n signUpPlaceholderImage?: string;\n /** img src string for 'sign-in' placeholder image */\n signInPlaceholderImage?: string;\n /** img alt text string for 'sign-up' placeholder image */\n signUpPlaceholderImageAlt?: string;\n /** img alt text string for 'sign-in' placeholder image */\n signInPlaceholderImageAlt?: string;\n /** information header text string below 'sign-up' placeholder image */\n signUpInformationHeader?: string;\n /** information header text string below 'sign-in' placeholder image */\n signInInformationHeader?: string;\n /** information text string below 'sign-up' header text */\n signUpInformationText?: string;\n /** information text string below 'sign-in' header text */\n signInInformationText?: string;\n /** ID that will be given to the SAP CDC screen-sets container (must match 'containerID' in 'gigya.accounts.showScreenSet(...)'!) */\n screenSetsContainerId: string;\n};\n\n/**\n * The 'AuthPage' component consist of two containers: an 'Information' container on the left, and a 'ScreenSetsContainer' on the right.\n * The 'Information' container is optional and its contents depend on the context (sign-up or sign-in).\n * The 'ScreenSetsContainer' will contain the SAP CDC screen-sets.\n */\nconst AuthPage = ({\n showInformationSection,\n signUp,\n signUpPlaceholderImage,\n signInPlaceholderImage,\n signUpPlaceholderImageAlt,\n signInPlaceholderImageAlt,\n signUpInformationHeader,\n signInInformationHeader,\n signUpInformationText,\n signInInformationText,\n screenSetsContainerId,\n}: AuthPageProps) => {\n return (\n <>\n {showInformationSection && (\n <InformationContainer color={signUp ? COLORS.accent1_20 : COLORS.primary_20}>\n <InformationContent>\n {(signUpPlaceholderImage || signInPlaceholderImage) && (\n <InformationImage src={signUp ? signUpPlaceholderImage : signInPlaceholderImage} alt={signUp ? signUpPlaceholderImageAlt : signInPlaceholderImageAlt} />\n )}\n {(signUpInformationHeader || signInInformationHeader) && <InformationHeader>{signUp ? signUpInformationHeader : signInInformationHeader}</InformationHeader>}\n {(signUpInformationText || signInInformationText) && <InformationText>{signUp ? signUpInformationText : signInInformationText}</InformationText>}\n </InformationContent>\n </InformationContainer>\n )}\n <ScreenSetsContainer id={screenSetsContainerId} centerContents={!showInformationSection} />\n </>\n );\n};\n\nexport default AuthPage;\n"],"file":"AuthPage.js"}
1
+ {"version":3,"sources":["../../../src/AuthPage/AuthPage.tsx"],"names":["React","COLORS","ScreenSetsContainer","InformationContainer","InformationContent","InformationHeader","InformationText","InformationImage","AuthPage","showInformationSection","signUp","signUpPlaceholderImage","signInPlaceholderImage","signUpPlaceholderImageAlt","signInPlaceholderImageAlt","signUpInformationHeader","signInInformationHeader","signUpInformationText","signInInformationText","screenSetsContainerId","accent1_20","primary_20"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,MAAT,QAAuB,WAAvB;AACA,OAAOC,mBAAP,MAAgC,uBAAhC;AACA,SAASC,oBAAT,EAA+BC,kBAA/B,EAAmDC,iBAAnD,EAAsEC,eAAtE,EAAuFC,gBAAvF,QAA+G,eAA/G;;AA4BA;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG,CAAC;AAChBC,EAAAA,sBADgB;AAEhBC,EAAAA,MAFgB;AAGhBC,EAAAA,sBAHgB;AAIhBC,EAAAA,sBAJgB;AAKhBC,EAAAA,yBALgB;AAMhBC,EAAAA,yBANgB;AAOhBC,EAAAA,uBAPgB;AAQhBC,EAAAA,uBARgB;AAShBC,EAAAA,qBATgB;AAUhBC,EAAAA,qBAVgB;AAWhBC,EAAAA;AAXgB,CAAD,KAYI;AACnB,sBACE,0CACGV,sBAAsB,iBACrB,oBAAC,oBAAD;AAAsB,IAAA,MAAM,EAAEC,MAAM,GAAGT,MAAM,CAACmB,UAAV,GAAuBnB,MAAM,CAACoB;AAAlE,kBACE,oBAAC,kBAAD,QACG,CAACV,sBAAsB,IAAIC,sBAA3B,kBACC,oBAAC,gBAAD;AAAkB,IAAA,GAAG,EAAEF,MAAM,GAAGC,sBAAH,GAA4BC,sBAAzD;AAAiF,IAAA,GAAG,EAAEF,MAAM,GAAGG,yBAAH,GAA+BC;AAA3H,IAFJ,EAIG,CAACC,uBAAuB,IAAIC,uBAA5B,kBAAwD,oBAAC,iBAAD,QAAoBN,MAAM,GAAGK,uBAAH,GAA6BC,uBAAvD,CAJ3D,EAKG,CAACC,qBAAqB,IAAIC,qBAA1B,kBAAoD,oBAAC,eAAD,QAAkBR,MAAM,GAAGO,qBAAH,GAA2BC,qBAAnD,CALvD,CADF,CAFJ,eAYE,oBAAC,mBAAD;AAAqB,IAAA,EAAE,EAAEC,qBAAzB;AAAgD,IAAA,cAAc,EAAE,CAACV;AAAjE,IAZF,CADF;AAgBD,CA7BD;;;AA7BEA,EAAAA,sB;AAGAC,EAAAA,M;AAEAC,EAAAA,sB;AAEAC,EAAAA,sB;AAEAC,EAAAA,yB;AAEAC,EAAAA,yB;AAEAC,EAAAA,uB;AAEAC,EAAAA,uB;AAEAC,EAAAA,qB;AAEAC,EAAAA,qB;AAEAC,EAAAA,qB;;AAuCF,eAAeX,QAAf","sourcesContent":["import * as React from 'react';\nimport { COLORS } from '../styles';\nimport ScreenSetsContainer from './ScreenSetsContainer';\nimport { InformationContainer, InformationContent, InformationHeader, InformationText, InformationImage } from './Information';\n\ntype AuthPageProps = {\n /** set this to 'false' to hide the left side illustration/information section */\n showInformationSection: boolean;\n /** true if 'sign-up' screen-set is showing, otherwise false.\n * The value can be set using 'onBeforeScreenLoad' in 'gigya.accounts.showScreenSet(...)' and checking the loaded screen-set */\n signUp: boolean;\n /** img src string for 'sign-up' placeholder image */\n signUpPlaceholderImage?: string;\n /** img src string for 'sign-in' placeholder image */\n signInPlaceholderImage?: string;\n /** img alt text string for 'sign-up' placeholder image */\n signUpPlaceholderImageAlt?: string;\n /** img alt text string for 'sign-in' placeholder image */\n signInPlaceholderImageAlt?: string;\n /** information header text string below 'sign-up' placeholder image */\n signUpInformationHeader?: string;\n /** information header text string below 'sign-in' placeholder image */\n signInInformationHeader?: string;\n /** information text string below 'sign-up' header text */\n signUpInformationText?: string;\n /** information text string below 'sign-in' header text */\n signInInformationText?: string;\n /** ID that will be given to the SAP CDC screen-sets container (must match 'containerID' in 'gigya.accounts.showScreenSet(...)'!) */\n screenSetsContainerId: string;\n};\n\n/**\n * The 'AuthPage' component consist of two containers: an 'Information' container on the left, and a 'ScreenSetsContainer' on the right.\n * The 'Information' container is optional and its contents depend on the context (sign-up or sign-in).\n * The 'ScreenSetsContainer' will contain the SAP CDC screen-sets.\n */\nconst AuthPage = ({\n showInformationSection,\n signUp,\n signUpPlaceholderImage,\n signInPlaceholderImage,\n signUpPlaceholderImageAlt,\n signInPlaceholderImageAlt,\n signUpInformationHeader,\n signInInformationHeader,\n signUpInformationText,\n signInInformationText,\n screenSetsContainerId,\n}: AuthPageProps) => {\n return (\n <>\n {showInformationSection && (\n <InformationContainer $color={signUp ? COLORS.accent1_20 : COLORS.primary_20}>\n <InformationContent>\n {(signUpPlaceholderImage || signInPlaceholderImage) && (\n <InformationImage src={signUp ? signUpPlaceholderImage : signInPlaceholderImage} alt={signUp ? signUpPlaceholderImageAlt : signInPlaceholderImageAlt} />\n )}\n {(signUpInformationHeader || signInInformationHeader) && <InformationHeader>{signUp ? signUpInformationHeader : signInInformationHeader}</InformationHeader>}\n {(signUpInformationText || signInInformationText) && <InformationText>{signUp ? signUpInformationText : signInInformationText}</InformationText>}\n </InformationContent>\n </InformationContainer>\n )}\n <ScreenSetsContainer id={screenSetsContainerId} centerContents={!showInformationSection} />\n </>\n );\n};\n\nexport default AuthPage;\n"],"file":"AuthPage.js"}
@@ -4,7 +4,7 @@ import { BREAKPOINTS, COLORS, ParagraphTextStyle } from '../styles';
4
4
  import { HeadlineXLStyling, ParagraphLStyling } from '../styles/typography';
5
5
  export const InformationContainer = styled(AuthPageSection)`
6
6
  display: none;
7
- background: ${props => props.color};
7
+ background: ${props => props.$color};
8
8
 
9
9
  ${BREAKPOINTS.MEDIUM} {
10
10
  display: flex;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/AuthPage/Information.tsx"],"names":["styled","AuthPageSection","BREAKPOINTS","COLORS","ParagraphTextStyle","HeadlineXLStyling","ParagraphLStyling","InformationContainer","props","color","MEDIUM","InformationContent","div","LARGE","InformationHeader","h2","black","InformationText","p","Regular","neutral_600","InformationImage","img"],"mappings":"AACA,OAAOA,MAAP,MAAmB,mBAAnB;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,SAAQC,WAAR,EAAqBC,MAArB,EAA6DC,kBAA7D,QAAsF,WAAtF;AACA,SAA2BC,iBAA3B,EAA8CC,iBAA9C,QAAsE,sBAAtE;AAEA,OAAO,MAAMC,oBAAoB,GAAGP,MAAM,CAACC,eAAD,CAAqC;AAC/E;AACA,gBAAgBO,KAAK,IAAIA,KAAK,CAACC,KAAM;AACrC;AACA,IAAIP,WAAW,CAACQ,MAAO;AACvB;AACA;AACA;AACA,CARO;AAUP,OAAO,MAAMC,kBAAkB,GAAGX,MAAM,CAACY,GAAI;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIV,WAAW,CAACW,KAAM;AACtB;AACA;AACA;AACA,CAZO;AAcP,OAAO,MAAMC,iBAAiB,GAAGd,MAAM,CAACe,EAAG;AAC3C,IAAIV,iBAAiB,CAACF,MAAM,CAACa,KAAR,CAAe;AACpC;AACA;AACA,CAJO;AAMP,OAAO,MAAMC,eAAe,GAAGjB,MAAM,CAACkB,CAAE;AACxC,IAAIZ,iBAAiB,CAACF,kBAAkB,CAACe,OAApB,EAA6BhB,MAAM,CAACiB,WAApC,CAAiD;AACtE;AACA,CAHO;AAKP,OAAO,MAAMC,gBAAgB,GAAGrB,MAAM,CAACsB,GAAI;AAC3C;AACA;AACA,CAHO","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport AuthPageSection from './_AuthPageSection';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, HeadlineXL, ParagraphTextStyle} from '../styles';\nimport {ComponentLStyling, HeadlineXLStyling, ParagraphLStyling} from '../styles/typography';\n\nexport const InformationContainer = styled(AuthPageSection)<{ color: string }>`\n display: none;\n background: ${props => props.color};\n\n ${BREAKPOINTS.MEDIUM} {\n display: flex;\n padding-top: 56px;\n }\n`;\n\nexport const InformationContent = styled.div`\n display: flex;\n flex-direction: column;\n align-self: center;\n align-items: center;\n text-align: center;\n max-width: 100%;\n\n ${BREAKPOINTS.LARGE} {\n align-self: flex-end;\n margin-right: 48px;\n }\n`;\n\nexport const InformationHeader = styled.h2`\n ${HeadlineXLStyling(COLORS.black)}\n font-weight: 300;\n margin-bottom: 0;\n`;\n\nexport const InformationText = styled.p`\n ${ParagraphLStyling(ParagraphTextStyle.Regular, COLORS.neutral_600)}\n margin: 8px 0;\n`;\n\nexport const InformationImage = styled.img`\n height: 275px;\n max-width: 100%;\n`;\n"],"file":"Information.js"}
1
+ {"version":3,"sources":["../../../src/AuthPage/Information.tsx"],"names":["styled","AuthPageSection","BREAKPOINTS","COLORS","ParagraphTextStyle","HeadlineXLStyling","ParagraphLStyling","InformationContainer","props","$color","MEDIUM","InformationContent","div","LARGE","InformationHeader","h2","black","InformationText","p","Regular","neutral_600","InformationImage","img"],"mappings":"AACA,OAAOA,MAAP,MAAmB,mBAAnB;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,SAASC,WAAT,EAAsBC,MAAtB,EAA8DC,kBAA9D,QAAwF,WAAxF;AACA,SAA4BC,iBAA5B,EAA+CC,iBAA/C,QAAwE,sBAAxE;AAEA,OAAO,MAAMC,oBAAoB,GAAGP,MAAM,CAACC,eAAD,CAAsC;AAChF;AACA,gBAAiBO,KAAD,IAAWA,KAAK,CAACC,MAAO;AACxC;AACA,IAAIP,WAAW,CAACQ,MAAO;AACvB;AACA;AACA;AACA,CARO;AAUP,OAAO,MAAMC,kBAAkB,GAAGX,MAAM,CAACY,GAAI;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIV,WAAW,CAACW,KAAM;AACtB;AACA;AACA;AACA,CAZO;AAcP,OAAO,MAAMC,iBAAiB,GAAGd,MAAM,CAACe,EAAG;AAC3C,IAAIV,iBAAiB,CAACF,MAAM,CAACa,KAAR,CAAe;AACpC;AACA;AACA,CAJO;AAMP,OAAO,MAAMC,eAAe,GAAGjB,MAAM,CAACkB,CAAE;AACxC,IAAIZ,iBAAiB,CAACF,kBAAkB,CAACe,OAApB,EAA6BhB,MAAM,CAACiB,WAApC,CAAiD;AACtE;AACA,CAHO;AAKP,OAAO,MAAMC,gBAAgB,GAAGrB,MAAM,CAACsB,GAAI;AAC3C;AACA;AACA,CAHO","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport AuthPageSection from './_AuthPageSection';\nimport { BREAKPOINTS, COLORS, ComponentTextStyle, HeadlineXL, ParagraphTextStyle } from '../styles';\nimport { ComponentLStyling, HeadlineXLStyling, ParagraphLStyling } from '../styles/typography';\n\nexport const InformationContainer = styled(AuthPageSection)<{ $color: string }>`\n display: none;\n background: ${(props) => props.$color};\n\n ${BREAKPOINTS.MEDIUM} {\n display: flex;\n padding-top: 56px;\n }\n`;\n\nexport const InformationContent = styled.div`\n display: flex;\n flex-direction: column;\n align-self: center;\n align-items: center;\n text-align: center;\n max-width: 100%;\n\n ${BREAKPOINTS.LARGE} {\n align-self: flex-end;\n margin-right: 48px;\n }\n`;\n\nexport const InformationHeader = styled.h2`\n ${HeadlineXLStyling(COLORS.black)}\n font-weight: 300;\n margin-bottom: 0;\n`;\n\nexport const InformationText = styled.p`\n ${ParagraphLStyling(ParagraphTextStyle.Regular, COLORS.neutral_600)}\n margin: 8px 0;\n`;\n\nexport const InformationImage = styled.img`\n height: 275px;\n max-width: 100%;\n`;\n"],"file":"Information.js"}
@@ -12,7 +12,7 @@ import { HyperLink } from '../HyperLink';
12
12
  */
13
13
 
14
14
  const BannerContainer = styled.div`
15
- background: ${props => props.type ? props.type : COLORS.correct_100};
15
+ background: ${props => props.$type ? props.$type : COLORS.correct_100};
16
16
  min-height: 48px;
17
17
  display: flex;
18
18
  color: ${COLORS.black};
@@ -43,8 +43,8 @@ const BannerContainer = styled.div`
43
43
  }
44
44
  `;
45
45
  const BannerCenter = styled.div`
46
- ${props => ComponentMStyling(ComponentTextStyle.Regular, props.color)}
47
-
46
+ ${props => ComponentMStyling(ComponentTextStyle.Regular, props.$color)}
47
+
48
48
  display: flex;
49
49
  width: 100%;
50
50
  margin: 0 0 0 16px;
@@ -74,7 +74,7 @@ const ButtonWrapper = styled.div`
74
74
  `;
75
75
  const ButtonContainer = styled.div`
76
76
  display: contents;
77
- ${props => props.type ? getButtonStyle(props.type) : null};
77
+ ${props => props.$type ? getButtonStyle(props.$type) : null};
78
78
  `;
79
79
  const BannerContentWrapper = styled.div`
80
80
  display: flex;
@@ -111,12 +111,12 @@ const Banner = ({
111
111
  case 'warning':
112
112
  return /*#__PURE__*/React.createElement(BannerContainer, {
113
113
  "data-testid": testId,
114
- type: COLORS.warning_100,
114
+ $type: COLORS.warning_100,
115
115
  link: COLORS.warning_700,
116
116
  hover: COLORS.warning_20,
117
117
  bottom: bottom
118
118
  }, /*#__PURE__*/React.createElement(BannerCenter, {
119
- color: COLORS.warning_700,
119
+ $color: COLORS.warning_700,
120
120
  className: size
121
121
  }, icon ? icon : noIcon ? null : /*#__PURE__*/React.createElement(Help, {
122
122
  color: COLORS.warning_700,
@@ -130,7 +130,7 @@ const Banner = ({
130
130
  href: link,
131
131
  variant: "default"
132
132
  }, linkText))), onClose && /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(ButtonContainer, {
133
- type: formatTypeToLowerCase
133
+ $type: formatTypeToLowerCase
134
134
  }, /*#__PURE__*/React.createElement(IconButton, {
135
135
  variant: "secondary",
136
136
  shape: "circular",
@@ -145,13 +145,13 @@ const Banner = ({
145
145
  case 'critical':
146
146
  return /*#__PURE__*/React.createElement(BannerContainer, {
147
147
  "data-testid": testId,
148
- type: COLORS.critical_100,
148
+ $type: COLORS.critical_100,
149
149
  link: COLORS.critical_700,
150
150
  hover: COLORS.critical_20,
151
151
  bottom: bottom,
152
152
  className: size
153
153
  }, /*#__PURE__*/React.createElement(BannerCenter, {
154
- color: COLORS.critical_700,
154
+ $color: COLORS.critical_700,
155
155
  className: size
156
156
  }, icon ? icon : noIcon ? null : /*#__PURE__*/React.createElement(TechnicalWarning, {
157
157
  color: COLORS.critical_700,
@@ -165,7 +165,7 @@ const Banner = ({
165
165
  href: link,
166
166
  variant: "default"
167
167
  }, linkText))), onClose && /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(ButtonContainer, {
168
- type: formatTypeToLowerCase
168
+ $type: formatTypeToLowerCase
169
169
  }, /*#__PURE__*/React.createElement(IconButton, {
170
170
  variant: "secondary",
171
171
  shape: "circular",
@@ -180,13 +180,13 @@ const Banner = ({
180
180
  case 'positive':
181
181
  return /*#__PURE__*/React.createElement(BannerContainer, {
182
182
  "data-testid": testId,
183
- type: COLORS.correct_100,
183
+ $type: COLORS.correct_100,
184
184
  link: COLORS.correct_700,
185
185
  hover: COLORS.correct_20,
186
186
  bottom: bottom,
187
187
  className: size
188
188
  }, /*#__PURE__*/React.createElement(BannerCenter, {
189
- color: COLORS.correct_700,
189
+ $color: COLORS.correct_700,
190
190
  className: size
191
191
  }, icon ? icon : noIcon ? null : /*#__PURE__*/React.createElement(ThumbsUp, {
192
192
  color: COLORS.correct_700,
@@ -200,7 +200,7 @@ const Banner = ({
200
200
  href: link,
201
201
  variant: "default"
202
202
  }, linkText))), onClose && /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(ButtonContainer, {
203
- type: formatTypeToLowerCase
203
+ $type: formatTypeToLowerCase
204
204
  }, /*#__PURE__*/React.createElement(IconButton, {
205
205
  variant: "secondary",
206
206
  shape: "circular",
@@ -215,13 +215,13 @@ const Banner = ({
215
215
  default:
216
216
  return /*#__PURE__*/React.createElement(BannerContainer, {
217
217
  "data-testid": testId,
218
- type: COLORS.primary_100,
218
+ $type: COLORS.primary_100,
219
219
  link: COLORS.primary_700,
220
220
  hover: COLORS.primary_20,
221
221
  bottom: bottom,
222
222
  className: size
223
223
  }, /*#__PURE__*/React.createElement(BannerCenter, {
224
- color: COLORS.primary_700,
224
+ $color: COLORS.primary_700,
225
225
  className: size
226
226
  }, icon ? icon : noIcon ? null : /*#__PURE__*/React.createElement(Tip, {
227
227
  color: COLORS.primary_700,
@@ -235,7 +235,7 @@ const Banner = ({
235
235
  href: link,
236
236
  variant: "default"
237
237
  }, linkText))), onClose && /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(ButtonContainer, {
238
- type: "neutral"
238
+ $type: "neutral"
239
239
  }, /*#__PURE__*/React.createElement(IconButton, {
240
240
  variant: "secondary",
241
241
  shape: "circular",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Banners/Banner.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","ComponentTextStyle","Close","Help","TechnicalWarning","ThumbsUp","Tip","IconButton","getButtonStyle","ComponentMStyling","ComponentResponsive","HyperLink","BannerContainer","div","props","type","correct_100","black","bottom","MEDIUM","LARGE","link","BannerCenter","Regular","color","ButtonWrapper","ButtonContainer","BannerContentWrapper","Banner","size","children","testId","linkText","onClose","icon","noIcon","width","setWidth","useState","window","innerWidth","useEffect","handleResize","addEventListener","formatTypeToLowerCase","toLowerCase","warning_100","warning_700","warning_20","Math","floor","random","white","warning_500","critical_100","critical_700","critical_20","critical_500","correct_700","correct_20","correct_500","primary_100","primary_700","primary_20","primary_500","hover"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AAEA,SAAQC,WAAR,EAAqBC,MAArB,EAA6BC,kBAA7B,QAAsD,WAAtD;AACA,SAAQC,KAAR,EAAeC,IAAf,EAAqBC,gBAArB,EAAuCC,QAAvC,EAAiDC,GAAjD,QAA2D,kCAA3D;AACA,SAAQC,UAAR,QAAyB,WAAzB;AACA,SAAQC,cAAR,QAA6B,UAA7B;AAEA,SAAQC,iBAAR,EAA2BC,mBAA3B,QAAqD,sBAArD;AACA,SAAQC,SAAR,QAAwB,cAAxB;AAEA;AACA;AACA;;AACA,MAAMC,eAAe,GAAGd,MAAM,CAACe,GAAiB;AAChD,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,eAAeP,MAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\n\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../styles';\nimport {Close, Help, TechnicalWarning, ThumbsUp, Tip} from '../icons/systemicons/SystemIcons';\nimport {IconButton} from '../Button';\nimport {getButtonStyle} from './styles';\nimport {Size} from '../types';\nimport {ComponentMStyling, ComponentResponsive} from '../styles/typography';\nimport {HyperLink} from '../HyperLink';\n\n/**\n * Styles for <Banner />\n */\nconst BannerContainer = styled.div<BannerProps>`\n background: ${(props: BannerProps) => (props.type ? props.type : COLORS.correct_100)};\n min-height: 48px;\n display: flex;\n color: ${COLORS.black};\n margin-top: ${(props: BannerProps) => (props.bottom ? 'auto' : '0')};\n\n button:last-child {\n line-height: 0;\n margin: 0 0 0 8px;\n ${BREAKPOINTS.MEDIUM} {\n margin: 0 0 0 16px;\n }\n ${BREAKPOINTS.LARGE} {\n margin: 0 0 0 32px;\n }\n &.small {\n margin: 0 0 0 8px;\n }\n &.medium {\n margin: 0 0 0 16px;\n }\n &.large {\n margin: 0 0 0 32px;\n }\n }\n\n a {\n color: ${(props: BannerProps) => props.link} !important;\n }\n`;\n\nconst BannerCenter = styled.div`\n ${(props) => ComponentMStyling(ComponentTextStyle.Regular, props.color)}\n \n display: flex;\n width: 100%;\n margin: 0 0 0 16px;\n ${BREAKPOINTS.MEDIUM} {\n margin: 0 16px 0 32px;\n }\n ${BREAKPOINTS.LARGE} {\n margin: 0 40px 0 56px;\n }\n &.small {\n margin: 0 0 0 16px;\n }\n &.medium {\n margin: 0 16px 0 32px;\n }\n &.large {\n margin: 0 40px 0 56px;\n }\n\n > svg {\n flex-shrink: 0;\n margin: 12px 0;\n }\n`;\n\nconst ButtonWrapper = styled.div`\n margin: 0 0 0 auto;\n`;\n\nconst ButtonContainer = styled.div<{ type?: string }>`\n display: contents;\n ${(props) => (props.type ? getButtonStyle(props.type) : null)};\n`;\n\nconst BannerContentWrapper = styled.div`\n display: flex;\n align-items: center;\n margin: 12px 0;\n &:not(:first-child) {\n margin-left: 8px;\n }\n`;\n\ntype BannerProps = {\n size?: Size.Small | Size.Medium | Size.Large;\n type?: string;\n link?: string;\n linkText?: string;\n hover?: string;\n bottom?: boolean;\n testId?: string;\n icon?: React.ReactNode;\n onClose?: () => void;\n noIcon?: boolean;\n};\n\nconst Banner: React.FunctionComponent<BannerProps> = ({ size, type, children, bottom, testId, linkText, link, onClose, icon, noIcon }) => {\n const [width, setWidth] = React.useState<number>(window.innerWidth);\n React.useEffect(() => {\n function handleResize() {\n setWidth(window.innerWidth);\n }\n window.addEventListener('resize', handleResize);\n });\n\n const formatTypeToLowerCase = type?.toLowerCase();\n switch (formatTypeToLowerCase) {\n case 'warning':\n return (\n <BannerContainer data-testid={testId} type={COLORS.warning_100} link={COLORS.warning_700} hover={COLORS.warning_20} bottom={bottom}>\n <BannerCenter color={COLORS.warning_700} className={size}>\n {icon ? icon : noIcon ? null : <Help color={COLORS.warning_700} size=\"24px\" />}\n <BannerContentWrapper>\n <ComponentResponsive size={size} width={width} color={COLORS.warning_700}>\n {children}&nbsp;&nbsp;\n {link && linkText && (\n <HyperLink id={`${Math.floor(Math.random() * 999999999999)}_BannerLink`} href={link} variant=\"default\">\n {linkText}\n </HyperLink>\n )}\n </ComponentResponsive>\n </BannerContentWrapper>\n {onClose && (\n <ButtonWrapper>\n <ButtonContainer type={formatTypeToLowerCase}>\n <IconButton variant=\"secondary\" shape=\"circular\" useTransparentBackground tabbedHereBackgroundColor={COLORS.white} action={() => onClose()}>\n <Close color={COLORS.warning_500} size=\"24px\" />\n </IconButton>\n </ButtonContainer>\n </ButtonWrapper>\n )}\n </BannerCenter>\n </BannerContainer>\n );\n case 'critical':\n return (\n <BannerContainer data-testid={testId} type={COLORS.critical_100} link={COLORS.critical_700} hover={COLORS.critical_20} bottom={bottom} className={size}>\n <BannerCenter color={COLORS.critical_700} className={size}>\n {icon ? icon : noIcon ? null : <TechnicalWarning color={COLORS.critical_700} size=\"24px\" />}\n <BannerContentWrapper>\n <ComponentResponsive size={size} width={width} color={COLORS.critical_700}>\n {children}&nbsp;&nbsp;\n {link && linkText && (\n <HyperLink id={`${Math.floor(Math.random() * 999999999999)}_BannerLink`} href={link} variant=\"default\">\n {linkText}\n </HyperLink>\n )}\n </ComponentResponsive>\n </BannerContentWrapper>\n {onClose && (\n <ButtonWrapper>\n <ButtonContainer type={formatTypeToLowerCase}>\n <IconButton variant=\"secondary\" shape=\"circular\" useTransparentBackground tabbedHereBackgroundColor={COLORS.white} action={() => onClose()}>\n <Close color={COLORS.critical_500} size=\"24px\" />\n </IconButton>\n </ButtonContainer>\n </ButtonWrapper>\n )}\n </BannerCenter>\n </BannerContainer>\n );\n case 'positive':\n return (\n <BannerContainer data-testid={testId} type={COLORS.correct_100} link={COLORS.correct_700} hover={COLORS.correct_20} bottom={bottom} className={size}>\n <BannerCenter color={COLORS.correct_700} className={size}>\n {icon ? icon : noIcon ? null : <ThumbsUp color={COLORS.correct_700} size=\"24px\" />}\n <BannerContentWrapper>\n <ComponentResponsive size={size} width={width} color={COLORS.correct_700}>\n {children}&nbsp;&nbsp;\n {link && linkText && (\n <HyperLink id={`${Math.floor(Math.random() * 999999999999)}_BannerLink`} href={link} variant=\"default\">\n {linkText}\n </HyperLink>\n )}\n </ComponentResponsive>\n </BannerContentWrapper>\n {onClose && (\n <ButtonWrapper>\n <ButtonContainer type={formatTypeToLowerCase}>\n <IconButton variant=\"secondary\" shape=\"circular\" useTransparentBackground tabbedHereBackgroundColor={COLORS.white} action={() => onClose()}>\n <Close color={COLORS.correct_500} size=\"24px\" />\n </IconButton>\n </ButtonContainer>\n </ButtonWrapper>\n )}\n </BannerCenter>\n </BannerContainer>\n );\n default:\n return (\n <BannerContainer data-testid={testId} type={COLORS.primary_100} link={COLORS.primary_700} hover={COLORS.primary_20} bottom={bottom} className={size}>\n <BannerCenter color={COLORS.primary_700} className={size}>\n {icon ? icon : noIcon ? null : <Tip color={COLORS.primary_700} size=\"24px\" />}\n <BannerContentWrapper>\n <ComponentResponsive size={size} width={width} color={COLORS.primary_700}>\n {children}&nbsp;&nbsp;\n {link && linkText && (\n <HyperLink id={`${Math.floor(Math.random() * 999999999999)}_BannerLink`} href={link} variant=\"default\">\n {linkText}\n </HyperLink>\n )}\n </ComponentResponsive>\n </BannerContentWrapper>\n {onClose && (\n <ButtonWrapper>\n <ButtonContainer type=\"neutral\">\n <IconButton variant=\"secondary\" shape=\"circular\" useTransparentBackground tabbedHereBackgroundColor={COLORS.white} action={() => onClose()}>\n <Close color={COLORS.primary_500} size=\"24px\" />\n </IconButton>\n </ButtonContainer>\n </ButtonWrapper>\n )}\n </BannerCenter>\n </BannerContainer>\n );\n }\n};\n\nexport default Banner;\n"],"file":"Banner.js"}
1
+ {"version":3,"sources":["../../../src/Banners/Banner.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","ComponentTextStyle","Close","Help","TechnicalWarning","ThumbsUp","Tip","IconButton","getButtonStyle","ComponentMStyling","ComponentResponsive","HyperLink","BannerContainer","div","props","$type","correct_100","black","bottom","MEDIUM","LARGE","link","BannerCenter","Regular","$color","ButtonWrapper","ButtonContainer","BannerContentWrapper","Banner","size","type","children","testId","linkText","onClose","icon","noIcon","width","setWidth","useState","window","innerWidth","useEffect","handleResize","addEventListener","formatTypeToLowerCase","toLowerCase","warning_100","warning_700","warning_20","Math","floor","random","white","warning_500","critical_100","critical_700","critical_20","critical_500","correct_700","correct_20","correct_500","primary_100","primary_700","primary_20","primary_500","hover"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AAEA,SAASC,WAAT,EAAsBC,MAAtB,EAA8BC,kBAA9B,QAAwD,WAAxD;AACA,SAASC,KAAT,EAAgBC,IAAhB,EAAsBC,gBAAtB,EAAwCC,QAAxC,EAAkDC,GAAlD,QAA6D,kCAA7D;AACA,SAASC,UAAT,QAA2B,WAA3B;AACA,SAASC,cAAT,QAA+B,UAA/B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AAA,I;AACAT,EAAAA,I;AACAY,EAAAA,Q;AACAiC,EAAAA,K;AACAhD,EAAAA,M;AACAc,EAAAA,M;AACAG,EAAAA,I;AACAD,EAAAA,O;AACAE,EAAAA,M;;AA6HF,eAAeR,MAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\n\nimport { BREAKPOINTS, COLORS, ComponentTextStyle } from '../styles';\nimport { Close, Help, TechnicalWarning, ThumbsUp, Tip } from '../icons/systemicons/SystemIcons';\nimport { IconButton } from '../Button';\nimport { getButtonStyle } from './styles';\nimport { Size } from '../types';\nimport { ComponentMStyling, ComponentResponsive } from '../styles/typography';\nimport { HyperLink } from '../HyperLink';\n\n/**\n * Styles for <Banner />\n */\ntype StyleBannerProps = BannerProps & { $type: string };\n\nconst BannerContainer = styled.div<StyleBannerProps>`\n background: ${(props: StyleBannerProps) => (props.$type ? props.$type : COLORS.correct_100)};\n min-height: 48px;\n display: flex;\n color: ${COLORS.black};\n margin-top: ${(props: StyleBannerProps) => (props.bottom ? 'auto' : '0')};\n\n button:last-child {\n line-height: 0;\n margin: 0 0 0 8px;\n ${BREAKPOINTS.MEDIUM} {\n margin: 0 0 0 16px;\n }\n ${BREAKPOINTS.LARGE} {\n margin: 0 0 0 32px;\n }\n &.small {\n margin: 0 0 0 8px;\n }\n &.medium {\n margin: 0 0 0 16px;\n }\n &.large {\n margin: 0 0 0 32px;\n }\n }\n\n a {\n color: ${(props: BannerProps) => props.link} !important;\n }\n`;\n\nconst BannerCenter = styled.div<{ $color: string }>`\n ${(props) => ComponentMStyling(ComponentTextStyle.Regular, props.$color)}\n\n display: flex;\n width: 100%;\n margin: 0 0 0 16px;\n ${BREAKPOINTS.MEDIUM} {\n margin: 0 16px 0 32px;\n }\n ${BREAKPOINTS.LARGE} {\n margin: 0 40px 0 56px;\n }\n &.small {\n margin: 0 0 0 16px;\n }\n &.medium {\n margin: 0 16px 0 32px;\n }\n &.large {\n margin: 0 40px 0 56px;\n }\n\n > svg {\n flex-shrink: 0;\n margin: 12px 0;\n }\n`;\n\nconst ButtonWrapper = styled.div`\n margin: 0 0 0 auto;\n`;\n\nconst ButtonContainer = styled.div<{ $type?: string }>`\n display: contents;\n ${(props) => (props.$type ? getButtonStyle(props.$type) : null)};\n`;\n\nconst BannerContentWrapper = styled.div`\n display: flex;\n align-items: center;\n margin: 12px 0;\n &:not(:first-child) {\n margin-left: 8px;\n }\n`;\n\ntype BannerProps = {\n size?: Size.Small | Size.Medium | Size.Large;\n type?: string;\n link?: string;\n linkText?: string;\n hover?: string;\n bottom?: boolean;\n testId?: string;\n icon?: React.ReactNode;\n onClose?: () => void;\n noIcon?: boolean;\n};\n\nconst Banner: React.FunctionComponent<BannerProps> = ({ size, type, children, bottom, testId, linkText, link, onClose, icon, noIcon }) => {\n const [width, setWidth] = React.useState<number>(window.innerWidth);\n React.useEffect(() => {\n function handleResize() {\n setWidth(window.innerWidth);\n }\n window.addEventListener('resize', handleResize);\n });\n\n const formatTypeToLowerCase = type?.toLowerCase();\n switch (formatTypeToLowerCase) {\n case 'warning':\n return (\n <BannerContainer data-testid={testId} $type={COLORS.warning_100} link={COLORS.warning_700} hover={COLORS.warning_20} bottom={bottom}>\n <BannerCenter $color={COLORS.warning_700} className={size}>\n {icon ? icon : noIcon ? null : <Help color={COLORS.warning_700} size=\"24px\" />}\n <BannerContentWrapper>\n <ComponentResponsive size={size} width={width} color={COLORS.warning_700}>\n {children}&nbsp;&nbsp;\n {link && linkText && (\n <HyperLink id={`${Math.floor(Math.random() * 999999999999)}_BannerLink`} href={link} variant=\"default\">\n {linkText}\n </HyperLink>\n )}\n </ComponentResponsive>\n </BannerContentWrapper>\n {onClose && (\n <ButtonWrapper>\n <ButtonContainer $type={formatTypeToLowerCase}>\n <IconButton variant=\"secondary\" shape=\"circular\" useTransparentBackground tabbedHereBackgroundColor={COLORS.white} action={() => onClose()}>\n <Close color={COLORS.warning_500} size=\"24px\" />\n </IconButton>\n </ButtonContainer>\n </ButtonWrapper>\n )}\n </BannerCenter>\n </BannerContainer>\n );\n case 'critical':\n return (\n <BannerContainer data-testid={testId} $type={COLORS.critical_100} link={COLORS.critical_700} hover={COLORS.critical_20} bottom={bottom} className={size}>\n <BannerCenter $color={COLORS.critical_700} className={size}>\n {icon ? icon : noIcon ? null : <TechnicalWarning color={COLORS.critical_700} size=\"24px\" />}\n <BannerContentWrapper>\n <ComponentResponsive size={size} width={width} color={COLORS.critical_700}>\n {children}&nbsp;&nbsp;\n {link && linkText && (\n <HyperLink id={`${Math.floor(Math.random() * 999999999999)}_BannerLink`} href={link} variant=\"default\">\n {linkText}\n </HyperLink>\n )}\n </ComponentResponsive>\n </BannerContentWrapper>\n {onClose && (\n <ButtonWrapper>\n <ButtonContainer $type={formatTypeToLowerCase}>\n <IconButton variant=\"secondary\" shape=\"circular\" useTransparentBackground tabbedHereBackgroundColor={COLORS.white} action={() => onClose()}>\n <Close color={COLORS.critical_500} size=\"24px\" />\n </IconButton>\n </ButtonContainer>\n </ButtonWrapper>\n )}\n </BannerCenter>\n </BannerContainer>\n );\n case 'positive':\n return (\n <BannerContainer data-testid={testId} $type={COLORS.correct_100} link={COLORS.correct_700} hover={COLORS.correct_20} bottom={bottom} className={size}>\n <BannerCenter $color={COLORS.correct_700} className={size}>\n {icon ? icon : noIcon ? null : <ThumbsUp color={COLORS.correct_700} size=\"24px\" />}\n <BannerContentWrapper>\n <ComponentResponsive size={size} width={width} color={COLORS.correct_700}>\n {children}&nbsp;&nbsp;\n {link && linkText && (\n <HyperLink id={`${Math.floor(Math.random() * 999999999999)}_BannerLink`} href={link} variant=\"default\">\n {linkText}\n </HyperLink>\n )}\n </ComponentResponsive>\n </BannerContentWrapper>\n {onClose && (\n <ButtonWrapper>\n <ButtonContainer $type={formatTypeToLowerCase}>\n <IconButton variant=\"secondary\" shape=\"circular\" useTransparentBackground tabbedHereBackgroundColor={COLORS.white} action={() => onClose()}>\n <Close color={COLORS.correct_500} size=\"24px\" />\n </IconButton>\n </ButtonContainer>\n </ButtonWrapper>\n )}\n </BannerCenter>\n </BannerContainer>\n );\n default:\n return (\n <BannerContainer data-testid={testId} $type={COLORS.primary_100} link={COLORS.primary_700} hover={COLORS.primary_20} bottom={bottom} className={size}>\n <BannerCenter $color={COLORS.primary_700} className={size}>\n {icon ? icon : noIcon ? null : <Tip color={COLORS.primary_700} size=\"24px\" />}\n <BannerContentWrapper>\n <ComponentResponsive size={size} width={width} color={COLORS.primary_700}>\n {children}&nbsp;&nbsp;\n {link && linkText && (\n <HyperLink id={`${Math.floor(Math.random() * 999999999999)}_BannerLink`} href={link} variant=\"default\">\n {linkText}\n </HyperLink>\n )}\n </ComponentResponsive>\n </BannerContentWrapper>\n {onClose && (\n <ButtonWrapper>\n <ButtonContainer $type=\"neutral\">\n <IconButton variant=\"secondary\" shape=\"circular\" useTransparentBackground tabbedHereBackgroundColor={COLORS.white} action={() => onClose()}>\n <Close color={COLORS.primary_500} size=\"24px\" />\n </IconButton>\n </ButtonContainer>\n </ButtonWrapper>\n )}\n </BannerCenter>\n </BannerContainer>\n );\n }\n};\n\nexport default Banner;\n"],"file":"Banner.js"}
@@ -122,6 +122,7 @@ const TopWrapper = styled.div`
122
122
  `;
123
123
  const TextContainer = styled.div`
124
124
  width: 100%;
125
+ margin: auto 0 auto 16px !important;
125
126
  `;
126
127
  const StyledNotification = styled.div`
127
128
  margin: 0 15px 0 0 !important;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Tabs/TabLink.tsx"],"names":["React","NavLink","useLocation","styled","NotificationDot","Size","COLORS","Z_INDEXES","StyledTabLink","neutral_600","props","disabled","neutral_100","focus","white","active","neutral_20","primary_20","hover","primary_600","primary_100","primary_800","primary_500","neutral_300","OptionalLineWrapperWithIcon","div","TopWrapper","TextContainer","StyledNotification","OptionalLineWrapper","TabLink","to","exact","requiredLine","optionalLine","OptionalLineIcon","onLinkClick","testId","showNotificationDot","size","Small","variant","location","ref","useRef","toString","pathname","current","blur","undefined"],"mappings":";AAAA,OAAO,KAAK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;AAEE,IAAA,eAAe,EAAC,QAFlB;AAGE,IAAA,QAAQ,EAAElC,QAHZ;AAIE,IAAA,KAAK,EAAEqB,KAJT;AAKE,IAAA,IAAI,EAAC,KALP;AAME,qBAAeD,EAAE,KAAKW,QAAQ,CAACI,QANjC;AAOE,IAAA,OAAO,EAAE,MAAM;AACbH,MAAAA,GAAG,EAAEI,OAAL,EAAcC,IAAd;;AACA,UAAIZ,WAAJ,EAAiB;AACfA,QAAAA,WAAW;AACZ;AACF,KAZH;AAaE,IAAA,GAAG,EAAEO,GAbP;AAcE,mBAAaN;AAdf,kBAeE,oBAAC,aAAD,qBACA,oBAAC,UAAD,qBACE,kCAAOJ,YAAP,CADF,CADA,EAICC,YAAY,IAAIC,gBAAhB,gBACC,oBAAC,2BAAD,QACGA,gBAAgB,iBAAI,oBAAC,gBAAD;AAAkB,IAAA,IAAI,EAAC;AAAvB,IADvB,EAEGD,YAAY,KAAKe,SAAjB,iBAA8B,kCAAOf,YAAP,CAFjC,CADD,GAKGA,YAAY,gBACd,oBAAC,mBAAD,qBACE,kCAAOA,YAAP,CADF,CADc,gBAKd,yCAdF,CAfF,eAgCE,oBAAC,kBAAD,QACGI,mBAAmB,iBAAI,oBAAC,eAAD;AAAiB,IAAA,MAAM,EAAC,iBAAxB;AAA0C,IAAA,IAAI,EAAEC,IAAhD;AAAsD,IAAA,OAAO,EAAEE;AAA/D,IAD1B,CAhCF,CADF;AAsCD,CA1CD;;;AAjJE9B,EAAAA,Q;AACAsB,EAAAA,Y;AACAC,EAAAA,Y;AAEAE,EAAAA,W;AACAC,EAAAA,M;AACAC,EAAAA,mB;AAEAG,EAAAA,O,aAAU,U,EAAa,U;;AAqLzB,eAAeX,OAAf","sourcesContent":["import * as React from 'react';\nimport { NavLink, NavLinkProps, useLocation } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { NotificationDot } from '../NotificationDot';\nimport { BaseProps } from '../icons';\nimport { Size } from '../types';\nimport { COLORS } from '../styles';\nimport {Z_INDEXES} from '../styles/z-indexes';\n\ntype TabLinkProps = {\n disabled?: boolean;\n requiredLine: string;\n optionalLine?: string;\n OptionalLineIcon?: React.FunctionComponent<BaseProps>;\n onLinkClick?: () => void;\n testId?: string;\n showNotificationDot?: boolean;\n size?: Size.Small | Size.Medium | Size.Large;\n variant?: 'positive' | 'critical';\n} & NavLinkProps;\n\ntype StyledTabLinkProps = {\n disabled?: boolean;\n exact: boolean;\n};\n\nconst StyledTabLink = styled(NavLink)<StyledTabLinkProps>`\n display: flex;\n flex-direction: row;\n align-items: center;\n\n font-size: 16px;\n line-height: 120%;\n color: ${COLORS.neutral_600};\n\n background-color: ${(props) => (props.disabled ? COLORS.neutral_100 : 'transparent')};\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n border-left: 1px solid transparent;\n text-decoration: none;\n position: relative;\n border-radius: 2px;\n\n &:not(:last-child) {\n margin-bottom: 4px;\n }\n\n &:focus {\n z-index: ${Z_INDEXES.focus};\n background-color: ${COLORS.white};\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2e7fa1;\n outline: none;\n\n &::after {\n background-color: ${COLORS.white};\n }\n }\n\n &.active {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.neutral_20};\n }\n\n &.active:hover {\n background-color: ${COLORS.primary_20};\n }\n\n &.active:focus {\n background-color: ${COLORS.white};\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n box-shadow: none;\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &.active {\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 0;\n bottom: 0;\n left: -1px;\n background-color: ${COLORS.primary_500};\n\n border-radius: 2px;\n }\n }\n\n &.active:hover {\n &::after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.active:active {\n background-color: ${COLORS.primary_100};\n\n &::after {\n background-color: ${COLORS.primary_800};\n }\n }\n\n &:disabled {\n box-shadow: none;\n background-color: ${COLORS.white};\n\n span {\n color: ${COLORS.neutral_300};\n }\n\n &::after {\n background-color: ${COLORS.white};\n }\n }\n`;\n\nconst OptionalLineWrapperWithIcon = styled.div`\n display: flex;\n flex-direction: row;\n span {\n margin: 0 0 0 4px !important;\n font-size: 12px;\n line-height: 16px;\n }\n`;\n\nconst TopWrapper = styled.div`\n display: flex;\n flex-direction: row;\n span:not(:only-child) {\n width: calc(100% - 32px);\n }\n`;\n\nconst TextContainer = styled.div`\n width: 100%;\n`;\n\nconst StyledNotification = styled.div`\n margin: 0 15px 0 0 !important;\n`;\n\nconst OptionalLineWrapper = styled.div`\n font-size: 12px;\n`;\n\nconst TabLink = ({ to, disabled = false, exact = false, requiredLine, optionalLine, OptionalLineIcon, onLinkClick, testId, showNotificationDot = false, size = Size.Small, variant = 'critical' }: TabLinkProps) => {\n const location = useLocation();\n const ref = React.useRef<any>(null);\n\n return (\n <StyledTabLink\n to={to.toString()}\n activeClassName=\"active\"\n disabled={disabled}\n exact={exact}\n role=\"tab\"\n aria-selected={to === location.pathname}\n onClick={() => {\n ref?.current?.blur();\n if (onLinkClick) {\n onLinkClick();\n }\n }}\n ref={ref}\n data-testid={testId}>\n <TextContainer> \n <TopWrapper>\n <span>{requiredLine}</span> \n </TopWrapper>\n {optionalLine && OptionalLineIcon ? (\n <OptionalLineWrapperWithIcon>\n {OptionalLineIcon && <OptionalLineIcon size=\"16px\" />}\n {optionalLine !== undefined && <span>{optionalLine}</span>}\n </OptionalLineWrapperWithIcon>\n ) : optionalLine ? (\n <OptionalLineWrapper>\n <span>{optionalLine}</span>\n </OptionalLineWrapper>\n ) : (\n <></>\n )}\n </TextContainer>\n <StyledNotification>\n {showNotificationDot && <NotificationDot testId=\"NotificationDot\" size={size} variant={variant} />}\n </StyledNotification>\n </StyledTabLink>\n );\n};\n\nexport default TabLink;\n"],"file":"TabLink.js"}
1
+ {"version":3,"sources":["../../../src/Tabs/TabLink.tsx"],"names":["React","NavLink","useLocation","styled","NotificationDot","Size","COLORS","Z_INDEXES","StyledTabLink","neutral_600","props","disabled","neutral_100","focus","white","active","neutral_20","primary_20","hover","primary_600","primary_100","primary_800","primary_500","neutral_300","OptionalLineWrapperWithIcon","div","TopWrapper","TextContainer","StyledNotification","OptionalLineWrapper","TabLink","to","exact","requiredLine","optionalLine","OptionalLineIcon","onLinkClick","testId","showNotificationDot","size","Small","variant","location","ref","useRef","toString","pathname","current","blur","undefined"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,OAAT,EAAgCC,WAAhC,QAAmD,kBAAnD;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,eAAT,QAAgC,oBAAhC;AAEA,SAASC,IAAT,QAAqB,UAArB;AACA,SAASC,MAAT,QAAuB,WAAvB;AACA,SAAQC,SAAR,QAAwB,qBAAxB;AAmBA,MAAMC,aAAa,GAAGL,MAAM,CAACF,OAAD,CAA8B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,WAAWK,MAAM,CAACG,WAAY;AAC9B;AACA,sBAAuBC,KAAD,IAAYA,KAAK,CAACC,QAAN,GAAiBL,MAAM,CAACM,WAAxB,GAAsC,aAAe;AACvF,YAAaF,KAAD,IAAYA,KAAK,CAACC,QAAN,GAAiB,aAAjB,GAAiC,SAAW;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeJ,SAAS,CAACM,KAAM;AAC/B,wBAAwBP,MAAM,CAACQ,KAAM;AACrC;AACA;AACA;AACA;AACA,0BAA0BR,MAAM,CAACQ,KAAM;AACvC;AACA;AACA;AACA;AACA,eAAeP,SAAS,CAACQ,MAAO;AAChC,wBAAwBT,MAAM,CAACU,UAAW;AAC1C;AACA;AACA;AACA,wBAAwBV,MAAM,CAACW,UAAW;AAC1C;AACA;AACA;AACA,wBAAwBX,MAAM,CAACQ,KAAM;AACr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,CAhCF,CADF;AAsCD,CA1CD;;;AAlJE9B,EAAAA,Q;AACAsB,EAAAA,Y;AACAC,EAAAA,Y;AAEAE,EAAAA,W;AACAC,EAAAA,M;AACAC,EAAAA,mB;AAEAG,EAAAA,O,aAAU,U,EAAa,U;;AAsLzB,eAAeX,OAAf","sourcesContent":["import * as React from 'react';\nimport { NavLink, NavLinkProps, useLocation } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { NotificationDot } from '../NotificationDot';\nimport { BaseProps } from '../icons';\nimport { Size } from '../types';\nimport { COLORS } from '../styles';\nimport {Z_INDEXES} from '../styles/z-indexes';\n\ntype TabLinkProps = {\n disabled?: boolean;\n requiredLine: string;\n optionalLine?: string;\n OptionalLineIcon?: React.FunctionComponent<BaseProps>;\n onLinkClick?: () => void;\n testId?: string;\n showNotificationDot?: boolean;\n size?: Size.Small | Size.Medium | Size.Large;\n variant?: 'positive' | 'critical';\n} & NavLinkProps;\n\ntype StyledTabLinkProps = {\n disabled?: boolean;\n exact: boolean;\n};\n\nconst StyledTabLink = styled(NavLink)<StyledTabLinkProps>`\n display: flex;\n flex-direction: row;\n align-items: center;\n\n font-size: 16px;\n line-height: 120%;\n color: ${COLORS.neutral_600};\n\n background-color: ${(props) => (props.disabled ? COLORS.neutral_100 : 'transparent')};\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n border-left: 1px solid transparent;\n text-decoration: none;\n position: relative;\n border-radius: 2px;\n\n &:not(:last-child) {\n margin-bottom: 4px;\n }\n\n &:focus {\n z-index: ${Z_INDEXES.focus};\n background-color: ${COLORS.white};\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2e7fa1;\n outline: none;\n\n &::after {\n background-color: ${COLORS.white};\n }\n }\n\n &.active {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.neutral_20};\n }\n\n &.active:hover {\n background-color: ${COLORS.primary_20};\n }\n\n &.active:focus {\n background-color: ${COLORS.white};\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n box-shadow: none;\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &.active {\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 0;\n bottom: 0;\n left: -1px;\n background-color: ${COLORS.primary_500};\n\n border-radius: 2px;\n }\n }\n\n &.active:hover {\n &::after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.active:active {\n background-color: ${COLORS.primary_100};\n\n &::after {\n background-color: ${COLORS.primary_800};\n }\n }\n\n &:disabled {\n box-shadow: none;\n background-color: ${COLORS.white};\n\n span {\n color: ${COLORS.neutral_300};\n }\n\n &::after {\n background-color: ${COLORS.white};\n }\n }\n`;\n\nconst OptionalLineWrapperWithIcon = styled.div`\n display: flex;\n flex-direction: row;\n span {\n margin: 0 0 0 4px !important;\n font-size: 12px;\n line-height: 16px;\n }\n`;\n\nconst TopWrapper = styled.div`\n display: flex;\n flex-direction: row;\n span:not(:only-child) {\n width: calc(100% - 32px);\n }\n`;\n\nconst TextContainer = styled.div`\n width: 100%;\n margin: auto 0 auto 16px !important;\n`;\n\nconst StyledNotification = styled.div`\n margin: 0 15px 0 0 !important;\n`;\n\nconst OptionalLineWrapper = styled.div`\n font-size: 12px;\n`;\n\nconst TabLink = ({ to, disabled = false, exact = false, requiredLine, optionalLine, OptionalLineIcon, onLinkClick, testId, showNotificationDot = false, size = Size.Small, variant = 'critical' }: TabLinkProps) => {\n const location = useLocation();\n const ref = React.useRef<any>(null);\n\n return (\n <StyledTabLink\n to={to.toString()}\n activeClassName=\"active\"\n disabled={disabled}\n exact={exact}\n role=\"tab\"\n aria-selected={to === location.pathname}\n onClick={() => {\n ref?.current?.blur();\n if (onLinkClick) {\n onLinkClick();\n }\n }}\n ref={ref}\n data-testid={testId}>\n <TextContainer> \n <TopWrapper>\n <span>{requiredLine}</span> \n </TopWrapper>\n {optionalLine && OptionalLineIcon ? (\n <OptionalLineWrapperWithIcon>\n {OptionalLineIcon && <OptionalLineIcon size=\"16px\" />}\n {optionalLine !== undefined && <span>{optionalLine}</span>}\n </OptionalLineWrapperWithIcon>\n ) : optionalLine ? (\n <OptionalLineWrapper>\n <span>{optionalLine}</span>\n </OptionalLineWrapper>\n ) : (\n <></>\n )}\n </TextContainer>\n <StyledNotification>\n {showNotificationDot && <NotificationDot testId=\"NotificationDot\" size={size} variant={variant} />}\n </StyledNotification>\n </StyledTabLink>\n );\n};\n\nexport default TabLink;\n"],"file":"TabLink.js"}
@@ -7,22 +7,22 @@ const TYPOGRAPHY = {
7
7
  fontFamily: 'Lato, sans-serif'
8
8
  };
9
9
  const TypographyBase = styled('div')(({
10
- color,
10
+ $color,
11
11
  lineHeight,
12
- fontSize,
13
- fontWeight,
14
- fontStyle,
12
+ $fontSize,
13
+ $fontWeight,
14
+ $fontStyle,
15
15
  textTransform,
16
16
  textDecorationLine
17
17
  }) => ({
18
18
  fontFamily: TYPOGRAPHY.fontFamily,
19
- fontSize: fontSize,
20
- fontWeight: fontWeight,
19
+ fontSize: $fontSize,
20
+ fontWeight: $fontWeight,
21
21
  lineHeight: lineHeight + 'px',
22
22
  textTransform: textTransform ? textTransform : 'none',
23
23
  textDecorationLine: textDecorationLine ? textDecorationLine : 'none',
24
- fontStyle: fontStyle ? fontStyle : 'normal',
25
- color: color ? color : COLORS.black
24
+ fontStyle: $fontStyle ? $fontStyle : 'normal',
25
+ color: $color ? $color : COLORS.black
26
26
  }));
27
27
 
28
28
  const HeadlineBaseStyling = (fontSize, lineHeight, color) => {
@@ -36,74 +36,74 @@ const HeadlineBaseStyling = (fontSize, lineHeight, color) => {
36
36
  };
37
37
 
38
38
  const HeadlineBase = styled(TypographyBase)(({
39
- color,
39
+ $color,
40
40
  lineHeight,
41
41
  fontSize
42
42
  }) => ({
43
43
  fontSize: fontSize,
44
44
  fontWeight: 700,
45
45
  lineHeight: lineHeight,
46
- color: color
46
+ color: $color
47
47
  }));
48
48
 
49
49
  const HeadlineXLStyling = color => HeadlineBaseStyling('48px', '64px', color);
50
50
 
51
51
  const HeadlineXL = styled(HeadlineBase)(({
52
- color
52
+ $color
53
53
  }) => ({
54
54
  fontSize: '48px',
55
55
  lineHeight: '64px',
56
- color: color
56
+ color: $color
57
57
  }));
58
58
 
59
59
  const HeadlineLStyling = color => HeadlineBaseStyling('40px', '52px', color);
60
60
 
61
61
  const HeadlineL = styled(HeadlineBase)(({
62
- color
62
+ $color
63
63
  }) => ({
64
64
  fontSize: '40px',
65
65
  lineHeight: '52px',
66
- color: color
66
+ color: $color
67
67
  }));
68
68
 
69
69
  const HeadlineMStyling = color => HeadlineBaseStyling('32px', '40px', color);
70
70
 
71
71
  const HeadlineM = styled(HeadlineBase)(({
72
- color
72
+ $color
73
73
  }) => ({
74
74
  fontSize: '32px',
75
75
  lineHeight: '40px',
76
- color: color
76
+ color: $color
77
77
  }));
78
78
 
79
79
  const HeadlineSStyling = color => HeadlineBaseStyling('28px', '36px', color);
80
80
 
81
81
  const HeadlineS = styled(HeadlineBase)(({
82
- color
82
+ $color
83
83
  }) => ({
84
84
  fontSize: '28px',
85
85
  lineHeight: '36px',
86
- color: color
86
+ color: $color
87
87
  }));
88
88
 
89
89
  const HeadlineXSStyling = color => HeadlineBaseStyling('24px', '32px', color);
90
90
 
91
91
  const HeadlineXS = styled(HeadlineBase)(({
92
- color
92
+ $color
93
93
  }) => ({
94
94
  fontSize: '24px',
95
95
  lineHeight: '32px',
96
- color: color
96
+ color: $color
97
97
  }));
98
98
 
99
99
  const HeadlineXXSStyling = color => HeadlineBaseStyling('20px', '24px', color);
100
100
 
101
101
  const HeadlineXXS = styled(HeadlineBase)(({
102
- color
102
+ $color
103
103
  }) => ({
104
104
  fontSize: '20px',
105
105
  lineHeight: '24px',
106
- color: color
106
+ color: $color
107
107
  }));
108
108
  const ParagraphStyling = css`
109
109
  :lang(ja-jp) > h1,
@@ -200,11 +200,11 @@ const ParagraphXL = ({
200
200
  let fontStyle = paragraphFontStyle(textStyle);
201
201
  let textDecorationLine = paragraphTextDecorationLine(textStyle);
202
202
  return /*#__PURE__*/React.createElement(ParagraphBase, {
203
- color: color,
203
+ $color: color,
204
204
  lineHeight: 36,
205
- fontSize: 24,
206
- fontWeight: fontWeight,
207
- fontStyle: fontStyle,
205
+ $fontSize: 24,
206
+ $fontWeight: fontWeight,
207
+ $fontStyle: fontStyle,
208
208
  textDecorationLine: textDecorationLine,
209
209
  marginBetweenParagraphs: "18px"
210
210
  }, children);
@@ -226,11 +226,11 @@ const ParagraphL = ({
226
226
  let fontStyle = paragraphFontStyle(textStyle);
227
227
  let textDecorationLine = paragraphTextDecorationLine(textStyle);
228
228
  return /*#__PURE__*/React.createElement(ParagraphBase, {
229
- color: color,
229
+ $color: color,
230
230
  lineHeight: 32,
231
- fontSize: 20,
232
- fontWeight: fontWeight,
233
- fontStyle: fontStyle,
231
+ $fontSize: 20,
232
+ $fontWeight: fontWeight,
233
+ $fontStyle: fontStyle,
234
234
  textDecorationLine: textDecorationLine,
235
235
  marginBetweenParagraphs: "16px"
236
236
  }, children);
@@ -252,11 +252,11 @@ const ParagraphM = ({
252
252
  let fontStyle = paragraphFontStyle(textStyle);
253
253
  let textDecorationLine = paragraphTextDecorationLine(textStyle);
254
254
  return /*#__PURE__*/React.createElement(ParagraphBase, {
255
- color: color,
255
+ $color: color,
256
256
  lineHeight: 28,
257
- fontSize: 18,
258
- fontWeight: fontWeight,
259
- fontStyle: fontStyle,
257
+ $fontSize: 18,
258
+ $fontWeight: fontWeight,
259
+ $fontStyle: fontStyle,
260
260
  textDecorationLine: textDecorationLine,
261
261
  marginBetweenParagraphs: "14px"
262
262
  }, children);
@@ -278,11 +278,11 @@ const ParagraphS = ({
278
278
  let fontStyle = paragraphFontStyle(textStyle);
279
279
  let textDecorationLine = paragraphTextDecorationLine(textStyle);
280
280
  return /*#__PURE__*/React.createElement(ParagraphBase, {
281
- color: color,
281
+ $color: color,
282
282
  lineHeight: 24,
283
- fontSize: 16,
284
- fontWeight: fontWeight,
285
- fontStyle: fontStyle,
283
+ $fontSize: 16,
284
+ $fontWeight: fontWeight,
285
+ $fontStyle: fontStyle,
286
286
  textDecorationLine: textDecorationLine,
287
287
  marginBetweenParagraphs: "12px"
288
288
  }, children);
@@ -304,11 +304,11 @@ const ParagraphXS = ({
304
304
  let fontStyle = paragraphFontStyle(textStyle);
305
305
  let textDecorationLine = paragraphTextDecorationLine(textStyle);
306
306
  return /*#__PURE__*/React.createElement(ParagraphBase, {
307
- color: color,
307
+ $color: color,
308
308
  lineHeight: 20,
309
- fontSize: 14,
310
- fontWeight: fontWeight,
311
- fontStyle: fontStyle,
309
+ $fontSize: 14,
310
+ $fontWeight: fontWeight,
311
+ $fontStyle: fontStyle,
312
312
  textDecorationLine: textDecorationLine,
313
313
  marginBetweenParagraphs: "10px"
314
314
  }, children);
@@ -370,11 +370,11 @@ const ComponentXL = ({
370
370
  let fontStyle = componentFontStyle(textStyle);
371
371
  return /*#__PURE__*/React.createElement(TypographyBase, {
372
372
  className: className,
373
- color: color,
373
+ $color: color,
374
374
  lineHeight: 28,
375
- fontSize: 24,
376
- fontWeight: fontWeight,
377
- fontStyle: fontStyle
375
+ $fontSize: 24,
376
+ $fontWeight: fontWeight,
377
+ $fontStyle: fontStyle
378
378
  }, children);
379
379
  };
380
380
 
@@ -396,11 +396,11 @@ const ComponentL = ({
396
396
  let fontStyle = componentFontStyle(textStyle);
397
397
  return /*#__PURE__*/React.createElement(TypographyBase, {
398
398
  className: className,
399
- color: color,
399
+ $color: color,
400
400
  lineHeight: 24,
401
- fontSize: 20,
402
- fontWeight: fontWeight,
403
- fontStyle: fontStyle
401
+ $fontSize: 20,
402
+ $fontWeight: fontWeight,
403
+ $fontStyle: fontStyle
404
404
  }, children);
405
405
  };
406
406
 
@@ -422,11 +422,11 @@ const ComponentM = ({
422
422
  let fontStyle = componentFontStyle(textStyle);
423
423
  return /*#__PURE__*/React.createElement(TypographyBase, {
424
424
  className: className,
425
- color: color,
425
+ $color: color,
426
426
  lineHeight: 24,
427
- fontSize: 18,
428
- fontWeight: fontWeight,
429
- fontStyle: fontStyle
427
+ $fontSize: 18,
428
+ $fontWeight: fontWeight,
429
+ $fontStyle: fontStyle
430
430
  }, children);
431
431
  };
432
432
 
@@ -448,11 +448,11 @@ const ComponentS = ({
448
448
  let fontStyle = componentFontStyle(textStyle);
449
449
  return /*#__PURE__*/React.createElement(TypographyBase, {
450
450
  className: className,
451
- color: color,
451
+ $color: color,
452
452
  lineHeight: 20,
453
- fontSize: 16,
454
- fontWeight: fontWeight,
455
- fontStyle: fontStyle
453
+ $fontSize: 16,
454
+ $fontWeight: fontWeight,
455
+ $fontStyle: fontStyle
456
456
  }, children);
457
457
  };
458
458
 
@@ -475,11 +475,11 @@ const ComponentXS = ({
475
475
  let textTransform = componentTextTransformation(textStyle);
476
476
  return /*#__PURE__*/React.createElement(TypographyBase, {
477
477
  className: className,
478
- color: color,
478
+ $color: color,
479
479
  lineHeight: 16,
480
- fontSize: 14,
481
- fontWeight: fontWeight,
482
- fontStyle: fontStyle,
480
+ $fontSize: 14,
481
+ $fontWeight: fontWeight,
482
+ $fontStyle: fontStyle,
483
483
  textTransform: textTransform
484
484
  }, children);
485
485
  };
@@ -503,11 +503,11 @@ const ComponentXXS = ({
503
503
  let textTransform = componentTextTransformation(textStyle);
504
504
  return /*#__PURE__*/React.createElement(TypographyBase, {
505
505
  className: className,
506
- color: color,
506
+ $color: color,
507
507
  lineHeight: 16,
508
- fontSize: 12,
509
- fontWeight: fontWeight,
510
- fontStyle: fontStyle,
508
+ $fontSize: 12,
509
+ $fontWeight: fontWeight,
510
+ $fontStyle: fontStyle,
511
511
  textTransform: textTransform
512
512
  }, children);
513
513
  };