@laerdal/life-react-components 1.3.1 → 1.3.2-dev.12
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/esm/Accordion/ContentAccordion.js +238 -0
- package/dist/esm/Accordion/ContentAccordion.js.map +1 -0
- package/dist/esm/Accordion/__tests__/ContetnAccordion.test.js +137 -0
- package/dist/esm/Accordion/__tests__/ContetnAccordion.test.js.map +1 -0
- package/dist/esm/Accordion/index.js +1 -0
- package/dist/esm/Accordion/index.js.map +1 -1
- package/dist/esm/AuthPage/AuthPage.js +1 -1
- package/dist/esm/AuthPage/AuthPage.js.map +1 -1
- package/dist/esm/AuthPage/Information.js +1 -1
- package/dist/esm/AuthPage/Information.js.map +1 -1
- package/dist/esm/Banners/Banner.js +16 -16
- package/dist/esm/Banners/Banner.js.map +1 -1
- package/dist/esm/Button/Button.js +8 -53
- package/dist/esm/Button/Button.js.map +1 -1
- package/dist/esm/Button/DualFunctionButton.js +4 -0
- package/dist/esm/Button/DualFunctionButton.js.map +1 -1
- package/dist/esm/Button/Iconbutton.js +0 -1
- package/dist/esm/Button/Iconbutton.js.map +1 -1
- package/dist/esm/Dropdown/CommonStyling.js +4 -0
- package/dist/esm/Dropdown/CommonStyling.js.map +1 -1
- package/dist/esm/Dropdown/DropdownButton.js +5 -2
- package/dist/esm/Dropdown/DropdownButton.js.map +1 -1
- package/dist/esm/Dropdown/DropdownContent.js +6 -6
- package/dist/esm/Dropdown/DropdownContent.js.map +1 -1
- package/dist/esm/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/esm/HyperLink/HyperLink.js +2 -1
- package/dist/esm/HyperLink/HyperLink.js.map +1 -1
- package/dist/esm/InputFields/Checkbox.js +23 -13
- package/dist/esm/InputFields/Checkbox.js.map +1 -1
- package/dist/esm/Modals/__tests__/Modal.test.js +154 -0
- package/dist/esm/Modals/__tests__/Modal.test.js.map +1 -0
- package/dist/esm/Table/Table.js +113 -181
- package/dist/esm/Table/Table.js.map +1 -1
- package/dist/esm/Table/TableBody.js +135 -0
- package/dist/esm/Table/TableBody.js.map +1 -0
- package/dist/esm/Table/TableFooter.js +60 -0
- package/dist/esm/Table/TableFooter.js.map +1 -0
- package/dist/esm/Table/TableHeaders.js +55 -0
- package/dist/esm/Table/TableHeaders.js.map +1 -0
- package/dist/esm/Table/TableStyles.js +130 -117
- package/dist/esm/Table/TableStyles.js.map +1 -1
- package/dist/esm/Table/__tests__/Table.test.js +0 -21
- package/dist/esm/Table/__tests__/Table.test.js.map +1 -1
- package/dist/esm/Tabs/TabLink.js +1 -0
- package/dist/esm/Tabs/TabLink.js.map +1 -1
- package/dist/esm/styles/typography.js +66 -66
- package/dist/esm/styles/typography.js.map +1 -1
- package/dist/js/Accordion/ContentAccordion.d.ts +18 -0
- package/dist/js/Accordion/ContentAccordion.js +151 -0
- package/dist/js/Accordion/ContentAccordion.js.map +1 -0
- package/dist/js/Accordion/__tests__/ContetnAccordion.test.js +151 -0
- package/dist/js/Accordion/__tests__/ContetnAccordion.test.js.map +1 -0
- package/dist/js/Accordion/index.d.ts +1 -0
- package/dist/js/Accordion/index.js +8 -0
- package/dist/js/Accordion/index.js.map +1 -1
- package/dist/js/AuthPage/AuthPage.js +1 -1
- package/dist/js/AuthPage/AuthPage.js.map +1 -1
- package/dist/js/AuthPage/Information.d.ts +1 -1
- package/dist/js/AuthPage/Information.js +1 -1
- package/dist/js/AuthPage/Information.js.map +1 -1
- package/dist/js/Banners/Banner.js +16 -19
- package/dist/js/Banners/Banner.js.map +1 -1
- package/dist/js/Button/Button.js +6 -12
- package/dist/js/Button/Button.js.map +1 -1
- package/dist/js/Button/DualFunctionButton.js +4 -0
- package/dist/js/Button/DualFunctionButton.js.map +1 -1
- package/dist/js/Button/Iconbutton.d.ts +2 -2
- package/dist/js/Button/Iconbutton.js +0 -1
- package/dist/js/Button/Iconbutton.js.map +1 -1
- package/dist/js/Dropdown/CommonStyling.js +1 -1
- package/dist/js/Dropdown/CommonStyling.js.map +1 -1
- package/dist/js/Dropdown/DropdownButton.d.ts +1 -1
- package/dist/js/Dropdown/DropdownButton.js +5 -2
- package/dist/js/Dropdown/DropdownButton.js.map +1 -1
- package/dist/js/Dropdown/DropdownButtonTypes.d.ts +1 -0
- package/dist/js/Dropdown/DropdownContent.js +8 -8
- package/dist/js/Dropdown/DropdownContent.js.map +1 -1
- package/dist/js/Dropdown/DropdownFilter.d.ts +1 -1
- package/dist/js/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/js/HyperLink/HyperLink.d.ts +1 -1
- package/dist/js/HyperLink/HyperLink.js +2 -2
- package/dist/js/HyperLink/HyperLink.js.map +1 -1
- package/dist/js/InputFields/Checkbox.d.ts +3 -2
- package/dist/js/InputFields/Checkbox.js +13 -11
- package/dist/js/InputFields/Checkbox.js.map +1 -1
- package/dist/js/Modals/__tests__/Modal.test.js +231 -0
- package/dist/js/Modals/__tests__/Modal.test.js.map +1 -0
- package/dist/js/Table/Table.js +143 -209
- package/dist/js/Table/Table.js.map +1 -1
- package/dist/js/Table/TableBody.d.ts +9 -0
- package/dist/js/Table/TableBody.js +167 -0
- package/dist/js/Table/TableBody.js.map +1 -0
- package/dist/js/Table/TableFooter.d.ts +13 -0
- package/dist/js/Table/TableFooter.js +82 -0
- package/dist/js/Table/TableFooter.js.map +1 -0
- package/dist/js/Table/TableHeaders.d.ts +9 -0
- package/dist/js/Table/TableHeaders.js +77 -0
- package/dist/js/Table/TableHeaders.js.map +1 -0
- package/dist/js/Table/TableStyles.d.ts +17 -7
- package/dist/js/Table/TableStyles.js +58 -16
- package/dist/js/Table/TableStyles.js.map +1 -1
- package/dist/js/Table/TableTypes.d.ts +23 -16
- package/dist/js/Table/__tests__/Table.test.js +8 -30
- package/dist/js/Table/__tests__/Table.test.js.map +1 -1
- package/dist/js/Tabs/TabLink.js +1 -1
- package/dist/js/Tabs/TabLink.js.map +1 -1
- package/dist/js/styles/typography.d.ts +6 -6
- package/dist/js/styles/typography.js +66 -66
- package/dist/js/styles/typography.js.map +1 -1
- package/dist/umd/Accordion/ContentAccordion.js +266 -0
- package/dist/umd/Accordion/ContentAccordion.js.map +1 -0
- package/dist/umd/Accordion/__tests__/ContetnAccordion.test.js +165 -0
- package/dist/umd/Accordion/__tests__/ContetnAccordion.test.js.map +1 -0
- package/dist/umd/Accordion/index.js +10 -4
- package/dist/umd/Accordion/index.js.map +1 -1
- package/dist/umd/AuthPage/AuthPage.js +1 -1
- package/dist/umd/AuthPage/AuthPage.js.map +1 -1
- package/dist/umd/AuthPage/Information.js +1 -1
- package/dist/umd/AuthPage/Information.js.map +1 -1
- package/dist/umd/Banners/Banner.js +16 -16
- package/dist/umd/Banners/Banner.js.map +1 -1
- package/dist/umd/Button/Button.js +8 -53
- package/dist/umd/Button/Button.js.map +1 -1
- package/dist/umd/Button/DualFunctionButton.js +4 -0
- package/dist/umd/Button/DualFunctionButton.js.map +1 -1
- package/dist/umd/Button/Iconbutton.js +0 -1
- package/dist/umd/Button/Iconbutton.js.map +1 -1
- package/dist/umd/Dropdown/CommonStyling.js +4 -0
- package/dist/umd/Dropdown/CommonStyling.js.map +1 -1
- package/dist/umd/Dropdown/DropdownButton.js +5 -2
- package/dist/umd/Dropdown/DropdownButton.js.map +1 -1
- package/dist/umd/Dropdown/DropdownContent.js +6 -6
- package/dist/umd/Dropdown/DropdownContent.js.map +1 -1
- package/dist/umd/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/umd/HyperLink/HyperLink.js +2 -1
- package/dist/umd/HyperLink/HyperLink.js.map +1 -1
- package/dist/umd/InputFields/Checkbox.js +23 -13
- package/dist/umd/InputFields/Checkbox.js.map +1 -1
- package/dist/umd/Modals/__tests__/Modal.test.js +173 -0
- package/dist/umd/Modals/__tests__/Modal.test.js.map +1 -0
- package/dist/umd/Table/Table.js +139 -188
- package/dist/umd/Table/Table.js.map +1 -1
- package/dist/umd/Table/TableBody.js +270 -0
- package/dist/umd/Table/TableBody.js.map +1 -0
- package/dist/umd/Table/TableFooter.js +82 -0
- package/dist/umd/Table/TableFooter.js.map +1 -0
- package/dist/umd/Table/TableHeaders.js +91 -0
- package/dist/umd/Table/TableHeaders.js.map +1 -0
- package/dist/umd/Table/TableStyles.js +134 -122
- package/dist/umd/Table/TableStyles.js.map +1 -1
- package/dist/umd/Table/__tests__/Table.test.js +0 -21
- package/dist/umd/Table/__tests__/Table.test.js.map +1 -1
- package/dist/umd/Tabs/TabLink.js +1 -0
- package/dist/umd/Tabs/TabLink.js.map +1 -1
- package/dist/umd/styles/typography.js +66 -66
- package/dist/umd/styles/typography.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
if (typeof define === "function" && define.amd) {
|
|
3
|
-
define(["exports", "./AccordionMenu", "./styles"], factory);
|
|
3
|
+
define(["exports", "./AccordionMenu", "./ContentAccordion", "./styles"], factory);
|
|
4
4
|
} else if (typeof exports !== "undefined") {
|
|
5
|
-
factory(exports, require("./AccordionMenu"), require("./styles"));
|
|
5
|
+
factory(exports, require("./AccordionMenu"), require("./ContentAccordion"), require("./styles"));
|
|
6
6
|
} else {
|
|
7
7
|
var mod = {
|
|
8
8
|
exports: {}
|
|
9
9
|
};
|
|
10
|
-
factory(mod.exports, global.AccordionMenu, global.styles);
|
|
10
|
+
factory(mod.exports, global.AccordionMenu, global.ContentAccordion, global.styles);
|
|
11
11
|
global.undefined = mod.exports;
|
|
12
12
|
}
|
|
13
|
-
})(this, function (exports, _AccordionMenu, _styles) {
|
|
13
|
+
})(this, function (exports, _AccordionMenu, _ContentAccordion, _styles) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
return _interopRequireDefault(_AccordionMenu).default;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
+
Object.defineProperty(exports, "ContentAccordion", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () {
|
|
34
|
+
return _ContentAccordion.ContentAccordion;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
31
37
|
Object.defineProperty(exports, "AccordionMenuWrapper", {
|
|
32
38
|
enumerable: true,
|
|
33
39
|
get: function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Accordion/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;oDAAA,O;;;;;;oDACA,O;;;;;;qBACA,oB","sourcesContent":["export {
|
|
1
|
+
{"version":3,"sources":["../../../src/Accordion/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;oDAAA,O;;;;;;oDACA,O;;;;;;+BACA,gB;;;;;;qBACA,oB","sourcesContent":["export {default as AccordionMenu} from './AccordionMenu';\nexport {default as AccordionMenuItem} from './AccordionMenu';\nexport {ContentAccordion} from './ContentAccordion';\nexport {AccordionMenuWrapper} from './styles';\n"],"file":"index.js"}
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
screenSetsContainerId
|
|
99
99
|
}) => {
|
|
100
100
|
return /*#__PURE__*/React.createElement(React.Fragment, null, showInformationSection && /*#__PURE__*/React.createElement(_Information.InformationContainer, {
|
|
101
|
-
color: signUp ? _styles.COLORS.accent1_20 : _styles.COLORS.primary_20
|
|
101
|
+
$color: signUp ? _styles.COLORS.accent1_20 : _styles.COLORS.primary_20
|
|
102
102
|
}, /*#__PURE__*/React.createElement(_Information.InformationContent, null, (signUpPlaceholderImage || signInPlaceholderImage) && /*#__PURE__*/React.createElement(_Information.InformationImage, {
|
|
103
103
|
src: signUp ? signUpPlaceholderImage : signInPlaceholderImage,
|
|
104
104
|
alt: signUp ? signUpPlaceholderImageAlt : signInPlaceholderImageAlt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/AuthPage/AuthPage.tsx"],"names":["showInformationSection","signUp","signUpPlaceholderImage","signInPlaceholderImage","signUpPlaceholderImageAlt","signInPlaceholderImageAlt","signUpInformationHeader","signInInformationHeader","signUpInformationText","signInInformationText","screenSetsContainerId","AuthPage","COLORS","primary_20"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAAA,K;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA;AACA;AACA;AACA;AACA;AACA,QAAMW,QAAQ,GAAG,CAAC;AAAA,IAAA,sBAAA;AAAA,IAAA,MAAA;AAAA,IAAA,sBAAA;AAAA,IAAA,sBAAA;AAAA,IAAA,yBAAA;AAAA,IAAA,yBAAA;AAAA,IAAA,uBAAA;AAAA,IAAA,uBAAA;AAAA,IAAA,qBAAA;AAAA,IAAA,qBAAA;AAWhBD,IAAAA;AAXgB,GAAD,KAYI;AACnB,WAAA,aACE,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EACGV,sBAAsB,IAAA,aACrB,KAAA,CAAA,aAAA,CAAA,iCAAA,EAAA;AAAsB,MAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/AuthPage/AuthPage.tsx"],"names":["showInformationSection","signUp","signUpPlaceholderImage","signInPlaceholderImage","signUpPlaceholderImageAlt","signInPlaceholderImageAlt","signUpInformationHeader","signInInformationHeader","signUpInformationText","signInInformationText","screenSetsContainerId","AuthPage","COLORS","primary_20"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAAA,K;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA;AACA;AACA;AACA;AACA;AACA,QAAMW,QAAQ,GAAG,CAAC;AAAA,IAAA,sBAAA;AAAA,IAAA,MAAA;AAAA,IAAA,sBAAA;AAAA,IAAA,sBAAA;AAAA,IAAA,yBAAA;AAAA,IAAA,yBAAA;AAAA,IAAA,uBAAA;AAAA,IAAA,uBAAA;AAAA,IAAA,qBAAA;AAAA,IAAA,qBAAA;AAWhBD,IAAAA;AAXgB,GAAD,KAYI;AACnB,WAAA,aACE,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EACGV,sBAAsB,IAAA,aACrB,KAAA,CAAA,aAAA,CAAA,iCAAA,EAAA;AAAsB,MAAA,MAAM,EAAEC,MAAM,GAAGW,eAAH,UAAA,GAAuBA,eAAOC;AAAlE,KAAA,EAAA,aACE,KAAA,CAAA,aAAA,CAAA,+BAAA,EAAA,IAAA,EACG,CAACX,sBAAsB,IAAvB,sBAAA,KAAA,aACC,KAAA,CAAA,aAAA,CAAA,6BAAA,EAAA;AAAkB,MAAA,GAAG,EAAED,MAAM,GAAA,sBAAA,GAA7B,sBAAA;AAAiF,MAAA,GAAG,EAAEA,MAAM,GAAA,yBAAA,GAA+BI;AAA3H,KAAA,CAFJ,EAIG,CAACC,uBAAuB,IAAxB,uBAAA,KAAA,aAAwD,KAAA,CAAA,aAAA,CAAA,8BAAA,EAAA,IAAA,EAAoBL,MAAM,GAAA,uBAAA,GAJrF,uBAI2D,CAJ3D,EAKG,CAACO,qBAAqB,IAAtB,qBAAA,KAAA,aAAoD,KAAA,CAAA,aAAA,CAAA,4BAAA,EAAA,IAAA,EAAkBP,MAAM,GAAA,qBAAA,GARrF,qBAQ6D,CALvD,CADF,CAFJ,EAAA,aAYE,KAAA,CAAA,aAAA,CAAA,6BAAA,EAAA;AAAqB,MAAA,EAAE,EAAvB,qBAAA;AAAgD,MAAA,cAAc,EAAE,CAACD;AAAjE,KAAA,CAZF,CADF;AAbF,GAAA;;;AA7BEA,IAAAA,sB;AAGAC,IAAAA,M;AAEAC,IAAAA,sB;AAEAC,IAAAA,sB;AAEAC,IAAAA,yB;AAEAC,IAAAA,yB;AAEAC,IAAAA,uB;AAEAC,IAAAA,uB;AAEAC,IAAAA,qB;AAEAC,IAAAA,qB;AAEAC,IAAAA,qB;;oBAuCF,Q","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"}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
const InformationContainer = exports.InformationContainer = (0, _styledComponents2.default)(_AuthPageSection2.default)`
|
|
32
32
|
display: none;
|
|
33
|
-
background: ${props => props
|
|
33
|
+
background: ${props => props.$color};
|
|
34
34
|
|
|
35
35
|
${_styles.BREAKPOINTS.MEDIUM} {
|
|
36
36
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/AuthPage/Information.tsx"],"names":["InformationContainer","styled","props","color","BREAKPOINTS","MEDIUM","InformationContent","div","LARGE","InformationHeader","h2","HeadlineXLStyling","COLORS","InformationText","p","ParagraphLStyling","ParagraphTextStyle","InformationImage","img"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,QAAMA,oBAAoB,WAApBA,oBAAoB,GAAGC,gCAAM,yBAANA,
|
|
1
|
+
{"version":3,"sources":["../../../src/AuthPage/Information.tsx"],"names":["InformationContainer","styled","props","$color","BREAKPOINTS","MEDIUM","InformationContent","div","LARGE","InformationHeader","h2","HeadlineXLStyling","COLORS","InformationText","p","ParagraphLStyling","ParagraphTextStyle","InformationImage","img"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,QAAMA,oBAAoB,WAApBA,oBAAoB,GAAGC,gCAAM,yBAANA,CAA4C;AAChF;AACA,gBAAiBC,KAAD,IAAWA,KAAK,CAACC,MAAO;AACxC;AACA,IAAIC,oBAAYC,MAAO;AACvB;AACA;AACA;AAPO,CAAA;AAUA,QAAMC,kBAAkB,WAAlBA,kBAAkB,GAAGL,2BAAOM,GAAI;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIH,oBAAYI,KAAM;AACtB;AACA;AACA;AAXO,CAAA;AAcA,QAAMC,iBAAiB,WAAjBA,iBAAiB,GAAGR,2BAAOS,EAAG;AAC3C,IAAIC,mCAAkBC,eAAD,KAAjBD,CAAgC;AACpC;AACA;AAHO,CAAA;AAMA,QAAME,eAAe,WAAfA,eAAe,GAAGZ,2BAAOa,CAAE;AACxC,IAAIC,mCAAkBC,2BAAD,OAAjBD,EAA8CH,eAA7B,WAAjBG,CAAkE;AACtE;AAFO,CAAA;AAKA,QAAME,gBAAgB,WAAhBA,gBAAgB,GAAGhB,2BAAOiB,GAAI;AAC3C;AACA;AAFO,CAAA","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"}
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
* Styles for <Banner />
|
|
84
84
|
*/
|
|
85
85
|
const BannerContainer = _styledComponents2.default.div`
|
|
86
|
-
background: ${props => props
|
|
86
|
+
background: ${props => props.$type ? props.$type : _styles.COLORS.correct_100};
|
|
87
87
|
min-height: 48px;
|
|
88
88
|
display: flex;
|
|
89
89
|
color: ${_styles.COLORS.black};
|
|
@@ -114,8 +114,8 @@
|
|
|
114
114
|
}
|
|
115
115
|
`;
|
|
116
116
|
const BannerCenter = _styledComponents2.default.div`
|
|
117
|
-
${props => (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, props
|
|
118
|
-
|
|
117
|
+
${props => (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, props.$color)}
|
|
118
|
+
|
|
119
119
|
display: flex;
|
|
120
120
|
width: 100%;
|
|
121
121
|
margin: 0 0 0 16px;
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
`;
|
|
146
146
|
const ButtonContainer = _styledComponents2.default.div`
|
|
147
147
|
display: contents;
|
|
148
|
-
${props => props
|
|
148
|
+
${props => props.$type ? (0, _styles2.getButtonStyle)(props.$type) : null};
|
|
149
149
|
`;
|
|
150
150
|
const BannerContentWrapper = _styledComponents2.default.div`
|
|
151
151
|
display: flex;
|
|
@@ -182,12 +182,12 @@
|
|
|
182
182
|
case 'warning':
|
|
183
183
|
return /*#__PURE__*/React.createElement(BannerContainer, {
|
|
184
184
|
"data-testid": testId,
|
|
185
|
-
type: _styles.COLORS.warning_100,
|
|
185
|
+
$type: _styles.COLORS.warning_100,
|
|
186
186
|
link: _styles.COLORS.warning_700,
|
|
187
187
|
hover: _styles.COLORS.warning_20,
|
|
188
188
|
bottom: bottom
|
|
189
189
|
}, /*#__PURE__*/React.createElement(BannerCenter, {
|
|
190
|
-
color: _styles.COLORS.warning_700,
|
|
190
|
+
$color: _styles.COLORS.warning_700,
|
|
191
191
|
className: size
|
|
192
192
|
}, icon ? icon : noIcon ? null : /*#__PURE__*/React.createElement(_SystemIcons.Help, {
|
|
193
193
|
color: _styles.COLORS.warning_700,
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
href: link,
|
|
202
202
|
variant: "default"
|
|
203
203
|
}, linkText))), onClose && /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(ButtonContainer, {
|
|
204
|
-
type: formatTypeToLowerCase
|
|
204
|
+
$type: formatTypeToLowerCase
|
|
205
205
|
}, /*#__PURE__*/React.createElement(_Button.IconButton, {
|
|
206
206
|
variant: "secondary",
|
|
207
207
|
shape: "circular",
|
|
@@ -216,13 +216,13 @@
|
|
|
216
216
|
case 'critical':
|
|
217
217
|
return /*#__PURE__*/React.createElement(BannerContainer, {
|
|
218
218
|
"data-testid": testId,
|
|
219
|
-
type: _styles.COLORS.critical_100,
|
|
219
|
+
$type: _styles.COLORS.critical_100,
|
|
220
220
|
link: _styles.COLORS.critical_700,
|
|
221
221
|
hover: _styles.COLORS.critical_20,
|
|
222
222
|
bottom: bottom,
|
|
223
223
|
className: size
|
|
224
224
|
}, /*#__PURE__*/React.createElement(BannerCenter, {
|
|
225
|
-
color: _styles.COLORS.critical_700,
|
|
225
|
+
$color: _styles.COLORS.critical_700,
|
|
226
226
|
className: size
|
|
227
227
|
}, icon ? icon : noIcon ? null : /*#__PURE__*/React.createElement(_SystemIcons.TechnicalWarning, {
|
|
228
228
|
color: _styles.COLORS.critical_700,
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
href: link,
|
|
237
237
|
variant: "default"
|
|
238
238
|
}, linkText))), onClose && /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(ButtonContainer, {
|
|
239
|
-
type: formatTypeToLowerCase
|
|
239
|
+
$type: formatTypeToLowerCase
|
|
240
240
|
}, /*#__PURE__*/React.createElement(_Button.IconButton, {
|
|
241
241
|
variant: "secondary",
|
|
242
242
|
shape: "circular",
|
|
@@ -251,13 +251,13 @@
|
|
|
251
251
|
case 'positive':
|
|
252
252
|
return /*#__PURE__*/React.createElement(BannerContainer, {
|
|
253
253
|
"data-testid": testId,
|
|
254
|
-
type: _styles.COLORS.correct_100,
|
|
254
|
+
$type: _styles.COLORS.correct_100,
|
|
255
255
|
link: _styles.COLORS.correct_700,
|
|
256
256
|
hover: _styles.COLORS.correct_20,
|
|
257
257
|
bottom: bottom,
|
|
258
258
|
className: size
|
|
259
259
|
}, /*#__PURE__*/React.createElement(BannerCenter, {
|
|
260
|
-
color: _styles.COLORS.correct_700,
|
|
260
|
+
$color: _styles.COLORS.correct_700,
|
|
261
261
|
className: size
|
|
262
262
|
}, icon ? icon : noIcon ? null : /*#__PURE__*/React.createElement(_SystemIcons.ThumbsUp, {
|
|
263
263
|
color: _styles.COLORS.correct_700,
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
href: link,
|
|
272
272
|
variant: "default"
|
|
273
273
|
}, linkText))), onClose && /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(ButtonContainer, {
|
|
274
|
-
type: formatTypeToLowerCase
|
|
274
|
+
$type: formatTypeToLowerCase
|
|
275
275
|
}, /*#__PURE__*/React.createElement(_Button.IconButton, {
|
|
276
276
|
variant: "secondary",
|
|
277
277
|
shape: "circular",
|
|
@@ -286,13 +286,13 @@
|
|
|
286
286
|
default:
|
|
287
287
|
return /*#__PURE__*/React.createElement(BannerContainer, {
|
|
288
288
|
"data-testid": testId,
|
|
289
|
-
type: _styles.COLORS.primary_100,
|
|
289
|
+
$type: _styles.COLORS.primary_100,
|
|
290
290
|
link: _styles.COLORS.primary_700,
|
|
291
291
|
hover: _styles.COLORS.primary_20,
|
|
292
292
|
bottom: bottom,
|
|
293
293
|
className: size
|
|
294
294
|
}, /*#__PURE__*/React.createElement(BannerCenter, {
|
|
295
|
-
color: _styles.COLORS.primary_700,
|
|
295
|
+
$color: _styles.COLORS.primary_700,
|
|
296
296
|
className: size
|
|
297
297
|
}, icon ? icon : noIcon ? null : /*#__PURE__*/React.createElement(_SystemIcons.Tip, {
|
|
298
298
|
color: _styles.COLORS.primary_700,
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
href: link,
|
|
307
307
|
variant: "default"
|
|
308
308
|
}, linkText))), onClose && /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(ButtonContainer, {
|
|
309
|
-
type: "neutral"
|
|
309
|
+
$type: "neutral"
|
|
310
310
|
}, /*#__PURE__*/React.createElement(_Button.IconButton, {
|
|
311
311
|
variant: "secondary",
|
|
312
312
|
shape: "circular",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Banners/Banner.tsx"],"names":["BannerContainer","styled","div","props","COLORS","correct_100","black","BREAKPOINTS","MEDIUM","LARGE","link","BannerCenter","ComponentMStyling","ComponentTextStyle","ButtonWrapper","ButtonContainer","getButtonStyle","BannerContentWrapper","type","linkText","hover","bottom","testId","icon","onClose","noIcon","Banner","React","window","setWidth","formatTypeToLowerCase","size","warning_700","Math","critical_700","correct_700","primary_700"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAAA,K;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA;AACA;AACA;AACA,QAAMA,eAAe,GAAGC,2BAAOC,GAAiB;AAChD,gBAAiBC,KAAD,IAAyBA,KAAK,CAALA,IAAAA,GAAaA,KAAK,CAAlBA,IAAAA,GAA0BC,eAAOC,WAAa;AACvF;AACA;AACA,WAAWD,eAAOE,KAAM;AACxB,gBAAiBH,KAAD,IAAyBA,KAAK,CAALA,MAAAA,GAAAA,MAAAA,GAAwB,GAAK;AACtE;AACA;AACA;AACA;AACA,MAAMI,oBAAYC,MAAO;AACzB;AACA;AACA,MAAMD,oBAAYE,KAAM;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAcN,KAAD,IAAwBA,KAAK,CAACO,IAAK;AAChD;AA7BA,CAAA;AAgCA,QAAMC,YAAY,GAAGV,2BAAOC,GAAI;AAChC,IAAKC,KAAD,I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EAAC;AAAtB,SAAA,EAAA,aACE,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA;AAAY,UAAA,OAAO,EAAnB,WAAA;AAAgC,UAAA,KAAK,EAArC,UAAA;AAAiD,UAAA,wBAAwB,EAAzE,IAAA;AAA0E,UAAA,yBAAyB,EAAEpB,eAArG,KAAA;AAAmH,UAAA,MAAM,EAAE,MAAMoB,OAAO;AAAxI,SAAA,EAAA,aACE,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA;AAAO,UAAA,KAAK,EAAEpB,eAAd,WAAA;AAAkC,UAAA,IAAI,EAAC;AAAvC,SAAA,CADF,CADF,CADF,CAbJ,CADF,CADF;AAnFJ;AAVF,GAAA;;;AAXEc,IAAAA,I;AACAR,IAAAA,I;AACAS,IAAAA,Q;AACAC,IAAAA,K;AACAC,IAAAA,M;AACAC,IAAAA,M;AACAC,IAAAA,I;AACAC,IAAAA,O;AACAC,IAAAA,M;;oBA6HF,M","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} \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} \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} \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} \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":["BannerContainer","styled","div","props","COLORS","correct_100","black","BREAKPOINTS","MEDIUM","LARGE","link","BannerCenter","ComponentMStyling","ComponentTextStyle","ButtonWrapper","ButtonContainer","getButtonStyle","BannerContentWrapper","type","linkText","hover","bottom","testId","icon","onClose","noIcon","Banner","React","window","setWidth","formatTypeToLowerCase","size","warning_700","Math","critical_700","correct_700","primary_700"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAAA,K;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA;AACA;AACA;AAGA,QAAMA,eAAe,GAAGC,2BAAOC,GAAsB;AACrD,gBAAiBC,KAAD,IAA8BA,KAAK,CAALA,KAAAA,GAAcA,KAAK,CAAnBA,KAAAA,GAA4BC,eAAOC,WAAa;AAC9F;AACA;AACA,WAAWD,eAAOE,KAAM;AACxB,gBAAiBH,KAAD,IAA8BA,KAAK,CAALA,MAAAA,GAAAA,MAAAA,GAAwB,GAAK;AAC3E;AACA;AACA;AACA;AACA,MAAMI,oBAAYC,MAAO;AACzB;AACA;AACA,MAAMD,oBAAYE,KAAM;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAcN,KAAD,IAAwBA,KAAK,CAACO,IAAK;AAChD;AA7BA,CAAA;AAgCA,QAAMC,YAAY,GAAGV,2BAAOC,GAAwB;AACpD,IAAKC,KAAD,IAAWS,mCAAkBC,2BAAD,OAAjBD,EAA8CT,KAAK,CAAlC,MAAjBS,CAA4D;AAC3E;AACA;AACA;AACA;AACA,IAAIL,oBAAYC,MAAO;AACvB;AACA;AACA,IAAID,oBAAYE,KAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzBA,CAAA;AA4BA,QAAMK,aAAa,GAAGb,2BAAOC,GAAI;AACjC;AADA,CAAA;AAIA,QAAMa,eAAe,GAAGd,2BAAOC,GAAwB;AACvD;AACA,IAAKC,KAAD,IAAYA,KAAK,CAALA,KAAAA,GAAca,6BAAeb,KAAK,CAAlCA,KAAca,CAAdb,GAA4C,IAAM;AAFlE,CAAA;AAKA,QAAMc,oBAAoB,GAAGhB,2BAAOC,GAAI;AACxC;AACA;AACA;AACA;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,IAAAA,M;AACAC,IAAAA,I;AACAC,IAAAA,O;AACAC,IAAAA,M;;oBA6HF,M","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} \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} \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} \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} \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"}
|
|
@@ -292,16 +292,10 @@
|
|
|
292
292
|
}
|
|
293
293
|
&:disabled > div.button-content,
|
|
294
294
|
&.disabled-state > div.button-content {
|
|
295
|
+
pointer-events: none;
|
|
295
296
|
background-color: ${props => props.colorTheme === 'dark' ? _styles.COLORS.primary_700 : _styles.COLORS.neutral_100};
|
|
296
297
|
color: ${props => props.colorTheme === 'dark' ? _styles.COLORS.primary_800 : _styles.COLORS.neutral_300};
|
|
297
298
|
border-color: ${props => props.colorTheme === 'dark' ? _styles.COLORS.primary_700 : _styles.COLORS.neutral_100};
|
|
298
|
-
cursor: not-allowed;
|
|
299
|
-
&:hover,
|
|
300
|
-
&:active {
|
|
301
|
-
background-color: ${props => props.colorTheme === 'dark' ? _styles.COLORS.primary_700 : _styles.COLORS.neutral_100};
|
|
302
|
-
color: ${props => props.colorTheme === 'dark' ? _styles.COLORS.primary_800 : _styles.COLORS.neutral_300};
|
|
303
|
-
border-color: ${props => props.colorTheme === 'dark' ? _styles.COLORS.primary_700 : _styles.COLORS.neutral_100};
|
|
304
|
-
}
|
|
305
299
|
}
|
|
306
300
|
`;
|
|
307
301
|
const Secondary = (0, _styledComponents2.default)(Primary)`
|
|
@@ -317,9 +311,9 @@
|
|
|
317
311
|
&:focus:not(:focus-visible),
|
|
318
312
|
&:focus:not(:focus-visible) > div.button-content {
|
|
319
313
|
outline: none !important;
|
|
320
|
-
background-color: white;
|
|
321
314
|
}
|
|
322
315
|
|
|
316
|
+
|
|
323
317
|
&:hover > div.button-content,
|
|
324
318
|
&.hover-state > div.button-content {
|
|
325
319
|
color: ${props => props.colorTheme === 'teal' ? _styles.COLORS.accent1_700 : props?.colorTheme === 'dark' ? _styles.COLORS.primary_200 : _styles.COLORS.primary_700};
|
|
@@ -335,7 +329,6 @@
|
|
|
335
329
|
}
|
|
336
330
|
&:active > div.button-content,
|
|
337
331
|
&.active-state > div.button-content {
|
|
338
|
-
background-color: white;
|
|
339
332
|
color: ${props => props.colorTheme === 'teal' ? _styles.COLORS.accent1_800 : props?.colorTheme === 'dark' ? _styles.COLORS.primary_300 : _styles.COLORS.primary_800};
|
|
340
333
|
border-color: ${props => props.colorTheme === 'teal' ? _styles.COLORS.accent1_800 : props?.colorTheme === 'dark' ? _styles.COLORS.primary_300 : _styles.COLORS.primary_800};
|
|
341
334
|
background-color: transparent;
|
|
@@ -347,21 +340,18 @@
|
|
|
347
340
|
}
|
|
348
341
|
}
|
|
349
342
|
}
|
|
350
|
-
|
|
351
|
-
&.disabled-state {
|
|
352
|
-
cursor: not-allowed;
|
|
353
|
-
}
|
|
343
|
+
|
|
354
344
|
&:disabled > div.button-content,
|
|
355
345
|
&.disabled-state > div.button-content {
|
|
356
346
|
background-color: transparent;
|
|
357
347
|
color: ${props => props?.colorTheme === 'dark' ? _styles.COLORS.primary_700 : _styles.COLORS.neutral_300};
|
|
358
348
|
border-color: ${props => props?.colorTheme === 'dark' ? _styles.COLORS.primary_700 : _styles.COLORS.neutral_100};
|
|
359
|
-
cursor: not-allowed;
|
|
360
349
|
}
|
|
361
350
|
${props => props.tabbedHere ? tabbedHereStyle('secondary', props.colorTheme) : ''}
|
|
351
|
+
|
|
352
|
+
&:focus,
|
|
362
353
|
&.focus-state {
|
|
363
354
|
${props => tabbedHereStyle('secondary', props?.colorTheme)};
|
|
364
|
-
|
|
365
355
|
}
|
|
366
356
|
`;
|
|
367
357
|
const Tertiary = (0, _styledComponents2.default)(Primary)`
|
|
@@ -400,27 +390,12 @@
|
|
|
400
390
|
}
|
|
401
391
|
}
|
|
402
392
|
}
|
|
403
|
-
|
|
404
|
-
&.disabled-state {
|
|
405
|
-
cursor: not-allowed;
|
|
406
|
-
}
|
|
407
|
-
&:disabled > div.button-content,
|
|
408
|
-
&.disabled-state > div.button-content {
|
|
409
|
-
background-color: white !important;
|
|
410
|
-
color: ${_styles.COLORS.neutral_300};
|
|
411
|
-
border-color: transparent;
|
|
412
|
-
cursor: not-allowed;
|
|
413
|
-
}
|
|
414
|
-
&:disabled,
|
|
415
|
-
&.disabled-state {
|
|
416
|
-
cursor: not-allowed;
|
|
417
|
-
}
|
|
393
|
+
|
|
418
394
|
&:disabled > div.button-content,
|
|
419
395
|
&.disabled-state > div.button-content {
|
|
420
396
|
background-color: white !important;
|
|
421
397
|
color: ${_styles.COLORS.neutral_300};
|
|
422
398
|
border-color: transparent !important;
|
|
423
|
-
cursor: not-allowed;
|
|
424
399
|
}
|
|
425
400
|
${props => props.tabbedHere ? tabbedHereStyle('tertiary', props.colorTheme) : ''}
|
|
426
401
|
&.focus-state {
|
|
@@ -448,22 +423,12 @@
|
|
|
448
423
|
border-color: ${_styles.COLORS.correct_800};
|
|
449
424
|
background-color: ${_styles.COLORS.correct_800};
|
|
450
425
|
}
|
|
451
|
-
|
|
452
|
-
&.disabled-state {
|
|
453
|
-
cursor: not-allowed;
|
|
454
|
-
}
|
|
426
|
+
|
|
455
427
|
&:disabled > div.button-content,
|
|
456
428
|
&.disabled-state > div.button-content {
|
|
457
429
|
background-color: ${_styles.COLORS.neutral_100};
|
|
458
430
|
color: ${_styles.COLORS.neutral_300};
|
|
459
431
|
border-color: ${_styles.COLORS.neutral_100};
|
|
460
|
-
cursor: not-allowed;
|
|
461
|
-
&:hover,
|
|
462
|
-
&:active {
|
|
463
|
-
background-color: ${_styles.COLORS.neutral_100};
|
|
464
|
-
color: ${_styles.COLORS.neutral_300};
|
|
465
|
-
border-color: ${_styles.COLORS.neutral_100};
|
|
466
|
-
}
|
|
467
432
|
}
|
|
468
433
|
`;
|
|
469
434
|
const Critical = (0, _styledComponents2.default)(Primary)`
|
|
@@ -487,22 +452,12 @@
|
|
|
487
452
|
border-color: ${_styles.COLORS.critical_800};
|
|
488
453
|
background-color: ${_styles.COLORS.critical_800};
|
|
489
454
|
}
|
|
490
|
-
|
|
491
|
-
&.disabled-state {
|
|
492
|
-
cursor: not-allowed;
|
|
493
|
-
}
|
|
455
|
+
|
|
494
456
|
&:disabled > div.button-content,
|
|
495
457
|
&.disabled-state > div.button-content {
|
|
496
458
|
background-color: ${_styles.COLORS.neutral_100};
|
|
497
459
|
color: ${_styles.COLORS.neutral_300};
|
|
498
460
|
border-color: ${_styles.COLORS.neutral_100};
|
|
499
|
-
cursor: not-allowed;
|
|
500
|
-
&:hover,
|
|
501
|
-
&:active {
|
|
502
|
-
background-color: ${_styles.COLORS.neutral_100};
|
|
503
|
-
color: ${_styles.COLORS.neutral_300};
|
|
504
|
-
border-color: ${_styles.COLORS.neutral_100};
|
|
505
|
-
}
|
|
506
461
|
}
|
|
507
462
|
`;
|
|
508
463
|
|