@opentripplanner/building-blocks 3.0.2-alpha.1 → 3.1.0
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/README.md +0 -4
- package/esm/alert/Alert.js +2 -1
- package/esm/alert/Alert.js.map +1 -1
- package/esm/index.js +2 -1
- package/esm/index.js.map +1 -1
- package/lib/alert/Alert.d.ts +3 -4
- package/lib/alert/Alert.d.ts.map +1 -1
- package/lib/alert/Alert.js +72 -103
- package/lib/alert/Alert.js.map +1 -1
- package/lib/colors/blue.js +18 -14
- package/lib/colors/blue.js.map +1 -1
- package/lib/colors/grey.js +18 -14
- package/lib/colors/grey.js.map +1 -1
- package/lib/colors/red.js +18 -14
- package/lib/colors/red.js.map +1 -1
- package/lib/dropdown/index.d.ts.map +1 -1
- package/lib/dropdown/index.js +101 -87
- package/lib/dropdown/index.js.map +1 -1
- package/lib/dropdown/styled.js +19 -72
- package/lib/dropdown/styled.js.map +1 -1
- package/lib/focus-trap-wrapper/dom-query.js +36 -20
- package/lib/focus-trap-wrapper/dom-query.js.map +1 -1
- package/lib/focus-trap-wrapper/index.d.ts.map +1 -1
- package/lib/focus-trap-wrapper/index.js +50 -52
- package/lib/focus-trap-wrapper/index.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +47 -36
- package/lib/index.js.map +1 -1
- package/lib/stories/ColorPalette.d.ts +0 -1
- package/lib/stories/ColorPalette.d.ts.map +1 -1
- package/lib/stories/ColorPalette.js +26 -37
- package/lib/stories/ColorPalette.js.map +1 -1
- package/package.json +3 -3
- package/src/alert/Alert.tsx +11 -8
- package/src/index.ts +8 -1
- package/src/stories/__snapshots__/alerts.story.tsx.snap +88 -83
- package/src/stories/__snapshots__/dropdown.story.tsx.snap +1 -1
- package/src/stories/__snapshots__/focusTrapStory.story.tsx.snap +1 -1
- package/src/stories/__snapshots__/index.story.tsx.snap +1 -1
- package/src/stories/alerts.story.tsx +23 -14
- package/tsconfig.tsbuildinfo +1 -1
package/README.md
CHANGED
package/esm/alert/Alert.js
CHANGED
|
@@ -9,7 +9,7 @@ import blue from "../colors/blue";
|
|
|
9
9
|
var AlertContainer = styled.div.withConfig({
|
|
10
10
|
displayName: "Alert__AlertContainer",
|
|
11
11
|
componentId: "sc-2vlo3n-0"
|
|
12
|
-
})(["background-color:", ";display:grid;grid-template-columns:50px auto auto;grid-template-rows:minmax(25px,auto) auto;
|
|
12
|
+
})(["background-color:", ";display:grid;grid-template-columns:50px auto auto;grid-template-rows:minmax(25px,auto) auto;column-gap:1em;padding:1.5em;svg{align-self:center;grid-column:1;grid-row:1 / span 2;justify-self:center;}button.toggle-btn{background:transparent;border:none;width:40px;svg{transform:", ";transition:all 0.2s ease-in;}}@media (max-width:550px){grid-template-columns:40px auto auto;padding:1.25em 1.25em;}"], function (props) {
|
|
13
13
|
return props.backgroundColor ? props.backgroundColor : blue[50];
|
|
14
14
|
}, function (props) {
|
|
15
15
|
return !props.expandAlert && "rotate(180deg)";
|
|
@@ -61,6 +61,7 @@ var Alert = function Alert(_ref) {
|
|
|
61
61
|
size: 24
|
|
62
62
|
}), /*#__PURE__*/React.createElement(AlertHeader, null, alertHeader), /*#__PURE__*/React.createElement(ButtonContainer, null, collapsible && /*#__PURE__*/React.createElement("button", {
|
|
63
63
|
type: "button",
|
|
64
|
+
className: "toggle-btn",
|
|
64
65
|
onClick: function onClick() {
|
|
65
66
|
return setExpandAlert(!expandAlert);
|
|
66
67
|
},
|
package/esm/alert/Alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","names":["React","useState","styled","AnimateHeight","ChevronUp","Bell","useIntl","blue","AlertContainer","div","withConfig","displayName","componentId","props","backgroundColor","expandAlert","ButtonContainer","span","AlertHeader","AlertSubheader","AlertContent","ContentPadding","collapsible","Alert","_ref","alertHeader","alertSubheader","children","_ref$Icon","Icon","_useState","_useState2","_slicedToArray","setExpandAlert","intl","label","formatMessage","id","defaultMessage","createElement","size","type","onClick","title","duration","height"],"sources":["../../src/alert/Alert.tsx"],"sourcesContent":["import React, {
|
|
1
|
+
{"version":3,"file":"Alert.js","names":["React","useState","styled","AnimateHeight","ChevronUp","Bell","useIntl","blue","AlertContainer","div","withConfig","displayName","componentId","props","backgroundColor","expandAlert","ButtonContainer","span","AlertHeader","AlertSubheader","AlertContent","ContentPadding","collapsible","Alert","_ref","alertHeader","alertSubheader","children","_ref$Icon","Icon","_useState","_useState2","_slicedToArray","setExpandAlert","intl","label","formatMessage","id","defaultMessage","createElement","size","type","className","onClick","title","duration","height"],"sources":["../../src/alert/Alert.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport styled from \"styled-components\";\nimport AnimateHeight from \"react-animate-height\";\nimport { ChevronUp } from \"@styled-icons/bootstrap/ChevronUp\";\nimport { Bell } from \"@styled-icons/bootstrap/Bell\";\nimport { StyledIcon } from \"@styled-icons/styled-icon\";\nimport { useIntl } from \"react-intl\";\nimport blue from \"../colors/blue\";\n\ninterface Props {\n alertHeader: JSX.Element | string;\n alertSubheader?: JSX.Element | string;\n backgroundColor?: string;\n /* If true, adds a toggle that expands/collapses the alert content */\n collapsible?: boolean;\n children?: JSX.Element | string;\n /* Icon displayed on Alert - default is Bell */\n Icon?: StyledIcon;\n}\n\nconst AlertContainer = styled.div<{\n backgroundColor: string;\n collapsible: boolean;\n expandAlert: boolean;\n}>`\n background-color: ${props =>\n props.backgroundColor ? props.backgroundColor : blue[50]};\n display: grid;\n grid-template-columns: 50px auto auto;\n grid-template-rows: minmax(25px, auto) auto;\n column-gap: 1em;\n padding: 1.5em;\n\n svg {\n align-self: center;\n grid-column: 1;\n grid-row: 1 / span 2;\n justify-self: center;\n }\n\n button.toggle-btn {\n background: transparent;\n border: none;\n width: 40px;\n\n svg {\n transform: ${props => !props.expandAlert && \"rotate(180deg)\"};\n transition: all 0.2s ease-in;\n }\n }\n\n @media (max-width: 550px) {\n grid-template-columns: 40px auto auto;\n padding: 1.25em 1.25em;\n }\n`;\n\nconst ButtonContainer = styled.span`\n align-items: center;\n display: flex;\n justify-content: center;\n justify-self: right;\n`;\n\nconst AlertHeader = styled.span`\n align-self: center;\n font-weight: 700;\n grid-column: 2;\n`;\n\nconst AlertSubheader = styled(AlertHeader)`\n font-weight: 400;\n margin-top: 0.3em;\n`;\n\nconst AlertContent = styled.div`\n grid-column: 2;\n grid-row: 3;\n`;\n\nconst ContentPadding = styled.div<{\n collapsible: boolean;\n}>`\n margin-top: ${props => (props.collapsible ? \"1em\" : \".5em\")};\n`;\n\nconst Alert = ({\n alertHeader,\n alertSubheader,\n backgroundColor,\n children,\n collapsible,\n Icon = Bell\n}: Props): JSX.Element => {\n const [expandAlert, setExpandAlert] = useState(false);\n const intl = useIntl();\n const label = intl.formatMessage({\n id: \"otpUi.buildingBlocks.alert.expand\",\n defaultMessage: \"Expand\"\n });\n return (\n <AlertContainer\n backgroundColor={backgroundColor}\n expandAlert={expandAlert}\n collapsible={collapsible}\n >\n <Icon size={24} />\n <AlertHeader>{alertHeader}</AlertHeader>\n <ButtonContainer>\n {collapsible && (\n <button\n type=\"button\"\n className=\"toggle-btn\"\n onClick={() => setExpandAlert(!expandAlert)}\n aria-label={label}\n title={label}\n >\n <ChevronUp size={16} />\n </button>\n )}\n </ButtonContainer>\n {alertSubheader && <AlertSubheader>{alertSubheader}</AlertSubheader>}\n {children && (\n <AlertContent>\n <AnimateHeight\n duration={500}\n height={collapsible ? (expandAlert ? \"auto\" : 0) : \"auto\"}\n >\n <ContentPadding collapsible={collapsible}>\n {children}\n </ContentPadding>\n </AnimateHeight>\n </AlertContent>\n )}\n </AlertContainer>\n );\n};\n\nexport default Alert;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,aAAa,MAAM,sBAAsB;AAChD,SAASC,SAAS,QAAQ,mCAAmC;AAC7D,SAASC,IAAI,Q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I;IACdC,MAAM,EAAExB,WAAW,GAAIP,WAAW,GAAG,MAAM,GAAG,CAAC,GAAI;EAAO,gBAE1Df,KAAA,CAAAuC,aAAA,CAAClB,cAAc;IAACC,WAAW,EAAEA;EAAY,GACtCK,QACa,CACH,CACH,CAEF,CAAC;AAErB,CAAC;AAED,eAAeJ,KAAK","ignoreList":[]}
|
package/esm/index.js
CHANGED
|
@@ -3,9 +3,10 @@ import red from "./colors/red";
|
|
|
3
3
|
import grey from "./colors/grey";
|
|
4
4
|
import Dropdown from "./dropdown";
|
|
5
5
|
import FocusTrapWrapper, { getNextSibling, getPreviousSibling } from "./focus-trap-wrapper";
|
|
6
|
+
import Alert from "./alert/Alert";
|
|
6
7
|
|
|
7
8
|
// TODO: Fix exports
|
|
8
|
-
export { Dropdown, FocusTrapWrapper, getNextSibling, getPreviousSibling };
|
|
9
|
+
export { Alert, Dropdown, FocusTrapWrapper, getNextSibling, getPreviousSibling };
|
|
9
10
|
export default {
|
|
10
11
|
blue: blue,
|
|
11
12
|
red: red,
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["blue","red","grey","Dropdown","FocusTrapWrapper","getNextSibling","getPreviousSibling"],"sources":["../src/index.ts"],"sourcesContent":["import blue from \"./colors/blue\";\nimport red from \"./colors/red\";\nimport grey from \"./colors/grey\";\nimport Dropdown from \"./dropdown\";\nimport FocusTrapWrapper, {\n getNextSibling,\n getPreviousSibling\n} from \"./focus-trap-wrapper\";\n\n// TODO: Fix exports\nexport {
|
|
1
|
+
{"version":3,"file":"index.js","names":["blue","red","grey","Dropdown","FocusTrapWrapper","getNextSibling","getPreviousSibling","Alert"],"sources":["../src/index.ts"],"sourcesContent":["import blue from \"./colors/blue\";\nimport red from \"./colors/red\";\nimport grey from \"./colors/grey\";\nimport Dropdown from \"./dropdown\";\nimport FocusTrapWrapper, {\n getNextSibling,\n getPreviousSibling\n} from \"./focus-trap-wrapper\";\nimport Alert from \"./alert/Alert\";\n\n// TODO: Fix exports\nexport {\n Alert,\n Dropdown,\n FocusTrapWrapper,\n getNextSibling,\n getPreviousSibling\n};\nexport default { blue, red, grey };\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,eAAe;AAChC,OAAOC,GAAG,MAAM,cAAc;AAC9B,OAAOC,IAAI,MAAM,eAAe;AAChC,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,gBAAgB,IACrBC,cAAc,EACdC,kBAAkB,QACb,sBAAsB;AAC7B,OAAOC,KAAK,MAAM,eAAe;;AAEjC;AACA,SACEA,KAAK,EACLJ,QAAQ,EACRC,gBAAgB,EAChBC,cAAc,EACdC,kBAAkB;AAEpB,eAAe;EAAEN,IAAI,EAAJA,IAAI;EAAEC,GAAG,EAAHA,GAAG;EAAEC,IAAI,EAAJA;AAAK,CAAC","ignoreList":[]}
|
package/lib/alert/Alert.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ReactChild } from "react";
|
|
2
1
|
import { StyledIcon } from "@styled-icons/styled-icon";
|
|
3
2
|
interface Props {
|
|
4
|
-
alertHeader: string;
|
|
5
|
-
alertSubheader?: string;
|
|
3
|
+
alertHeader: JSX.Element | string;
|
|
4
|
+
alertSubheader?: JSX.Element | string;
|
|
6
5
|
backgroundColor?: string;
|
|
7
6
|
collapsible?: boolean;
|
|
8
|
-
children?:
|
|
7
|
+
children?: JSX.Element | string;
|
|
9
8
|
Icon?: StyledIcon;
|
|
10
9
|
}
|
|
11
10
|
declare const Alert: ({ alertHeader, alertSubheader, backgroundColor, children, collapsible, Icon }: Props) => JSX.Element;
|
package/lib/alert/Alert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../src/alert/Alert.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../src/alert/Alert.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAIvD,UAAU,KAAK;IACb,WAAW,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IAClC,cAAc,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IAEhC,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAoED,QAAA,MAAM,KAAK,GAAI,+EAOZ,KAAK,KAAG,GAAG,CAAC,OA2Cd,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/lib/alert/Alert.js
CHANGED
|
@@ -1,107 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const react_1 = __importStar(require("react"));
|
|
30
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
31
|
-
const react_animate_height_1 = __importDefault(require("react-animate-height"));
|
|
32
|
-
const ChevronUp_1 = require("@styled-icons/bootstrap/ChevronUp");
|
|
33
|
-
const Bell_1 = require("@styled-icons/bootstrap/Bell");
|
|
34
|
-
const react_intl_1 = require("react-intl");
|
|
35
|
-
const blue_1 = __importDefault(require("../colors/blue"));
|
|
36
|
-
const AlertContainer = styled_components_1.default.div `
|
|
37
|
-
background-color: ${props => props.backgroundColor ? props.backgroundColor : blue_1.default[50]};
|
|
38
|
-
display: grid;
|
|
39
|
-
grid-template-columns: 50px auto auto;
|
|
40
|
-
grid-template-rows: minmax(25px, auto) auto;
|
|
41
|
-
max-width: 715px;
|
|
42
|
-
padding: 1.5em 2em;
|
|
43
|
-
|
|
44
|
-
svg {
|
|
45
|
-
align-self: center;
|
|
46
|
-
grid-column: 1;
|
|
47
|
-
grid-row: 1 / span 2;
|
|
48
|
-
justify-self: start;
|
|
49
|
-
}
|
|
50
2
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
+
var _reactAnimateHeight = _interopRequireDefault(require("react-animate-height"));
|
|
11
|
+
var _ChevronUp = require("@styled-icons/bootstrap/ChevronUp");
|
|
12
|
+
var _Bell = require("@styled-icons/bootstrap/Bell");
|
|
13
|
+
var _reactIntl = require("react-intl");
|
|
14
|
+
var _blue = _interopRequireDefault(require("../colors/blue"));
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
+
const AlertContainer = _styledComponents.default.div.withConfig({
|
|
17
|
+
displayName: "Alert__AlertContainer",
|
|
18
|
+
componentId: "sc-2vlo3n-0"
|
|
19
|
+
})(["background-color:", ";display:grid;grid-template-columns:50px auto auto;grid-template-rows:minmax(25px,auto) auto;column-gap:1em;padding:1.5em;svg{align-self:center;grid-column:1;grid-row:1 / span 2;justify-self:center;}button.toggle-btn{background:transparent;border:none;width:40px;svg{transform:", ";transition:all 0.2s ease-in;}}@media (max-width:550px){grid-template-columns:40px auto auto;padding:1.25em 1.25em;}"], props => props.backgroundColor ? props.backgroundColor : _blue.default[50], props => !props.expandAlert && "rotate(180deg)");
|
|
20
|
+
const ButtonContainer = _styledComponents.default.span.withConfig({
|
|
21
|
+
displayName: "Alert__ButtonContainer",
|
|
22
|
+
componentId: "sc-2vlo3n-1"
|
|
23
|
+
})(["align-items:center;display:flex;justify-content:center;justify-self:right;"]);
|
|
24
|
+
const AlertHeader = _styledComponents.default.span.withConfig({
|
|
25
|
+
displayName: "Alert__AlertHeader",
|
|
26
|
+
componentId: "sc-2vlo3n-2"
|
|
27
|
+
})(["align-self:center;font-weight:700;grid-column:2;"]);
|
|
28
|
+
const AlertSubheader = (0, _styledComponents.default)(AlertHeader).withConfig({
|
|
29
|
+
displayName: "Alert__AlertSubheader",
|
|
30
|
+
componentId: "sc-2vlo3n-3"
|
|
31
|
+
})(["font-weight:400;margin-top:0.3em;"]);
|
|
32
|
+
const AlertContent = _styledComponents.default.div.withConfig({
|
|
33
|
+
displayName: "Alert__AlertContent",
|
|
34
|
+
componentId: "sc-2vlo3n-4"
|
|
35
|
+
})(["grid-column:2;grid-row:3;"]);
|
|
36
|
+
const ContentPadding = _styledComponents.default.div.withConfig({
|
|
37
|
+
displayName: "Alert__ContentPadding",
|
|
38
|
+
componentId: "sc-2vlo3n-5"
|
|
39
|
+
})(["margin-top:", ";"], props => props.collapsible ? "1em" : ".5em");
|
|
40
|
+
const Alert = ({
|
|
41
|
+
alertHeader,
|
|
42
|
+
alertSubheader,
|
|
43
|
+
backgroundColor,
|
|
44
|
+
children,
|
|
45
|
+
collapsible,
|
|
46
|
+
Icon = _Bell.Bell
|
|
47
|
+
}) => {
|
|
48
|
+
const [expandAlert, setExpandAlert] = (0, _react.useState)(false);
|
|
49
|
+
const intl = (0, _reactIntl.useIntl)();
|
|
50
|
+
const label = intl.formatMessage({
|
|
51
|
+
id: "otpUi.buildingBlocks.alert.expand",
|
|
52
|
+
defaultMessage: "Expand"
|
|
53
|
+
});
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(AlertContainer, {
|
|
55
|
+
backgroundColor: backgroundColor,
|
|
56
|
+
expandAlert: expandAlert,
|
|
57
|
+
collapsible: collapsible
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
59
|
+
size: 24
|
|
60
|
+
}), /*#__PURE__*/_react.default.createElement(AlertHeader, null, alertHeader), /*#__PURE__*/_react.default.createElement(ButtonContainer, null, collapsible && /*#__PURE__*/_react.default.createElement("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
className: "toggle-btn",
|
|
63
|
+
onClick: () => setExpandAlert(!expandAlert),
|
|
64
|
+
"aria-label": label,
|
|
65
|
+
title: label
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_ChevronUp.ChevronUp, {
|
|
67
|
+
size: 16
|
|
68
|
+
}))), alertSubheader && /*#__PURE__*/_react.default.createElement(AlertSubheader, null, alertSubheader), children && /*#__PURE__*/_react.default.createElement(AlertContent, null, /*#__PURE__*/_react.default.createElement(_reactAnimateHeight.default, {
|
|
69
|
+
duration: 500,
|
|
70
|
+
height: collapsible ? expandAlert ? "auto" : 0 : "auto"
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(ContentPadding, {
|
|
72
|
+
collapsible: collapsible
|
|
73
|
+
}, children))));
|
|
105
74
|
};
|
|
106
|
-
exports.default = Alert;
|
|
75
|
+
var _default = exports.default = Alert;
|
|
107
76
|
//# sourceMappingURL=Alert.js.map
|
package/lib/alert/Alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","
|
|
1
|
+
{"version":3,"file":"Alert.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_reactAnimateHeight","_ChevronUp","_Bell","_reactIntl","_blue","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AlertContainer","styled","div","withConfig","displayName","componentId","props","backgroundColor","blue","expandAlert","ButtonContainer","span","AlertHeader","AlertSubheader","AlertContent","ContentPadding","collapsible","Alert","alertHeader","alertSubheader","children","Icon","Bell","setExpandAlert","useState","intl","useIntl","label","formatMessage","id","defaultMessage","createElement","size","type","className","onClick","title","ChevronUp","duration","height","_default","exports"],"sources":["../../src/alert/Alert.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport styled from \"styled-components\";\nimport AnimateHeight from \"react-animate-height\";\nimport { ChevronUp } from \"@styled-icons/bootstrap/ChevronUp\";\nimport { Bell } from \"@styled-icons/bootstrap/Bell\";\nimport { StyledIcon } from \"@styled-icons/styled-icon\";\nimport { useIntl } from \"react-intl\";\nimport blue from \"../colors/blue\";\n\ninterface Props {\n alertHeader: JSX.Element | string;\n alertSubheader?: JSX.Element | string;\n backgroundColor?: string;\n /* If true, adds a toggle that expands/collapses the alert content */\n collapsible?: boolean;\n children?: JSX.Element | string;\n /* Icon displayed on Alert - default is Bell */\n Icon?: StyledIcon;\n}\n\nconst AlertContainer = styled.div<{\n backgroundColor: string;\n collapsible: boolean;\n expandAlert: boolean;\n}>`\n background-color: ${props =>\n props.backgroundColor ? props.backgroundColor : blue[50]};\n display: grid;\n grid-template-columns: 50px auto auto;\n grid-template-rows: minmax(25px, auto) auto;\n column-gap: 1em;\n padding: 1.5em;\n\n svg {\n align-self: center;\n grid-column: 1;\n grid-row: 1 / span 2;\n justify-self: center;\n }\n\n button.toggle-btn {\n background: transparent;\n border: none;\n width: 40px;\n\n svg {\n transform: ${props => !props.expandAlert && \"rotate(180deg)\"};\n transition: all 0.2s ease-in;\n }\n }\n\n @media (max-width: 550px) {\n grid-template-columns: 40px auto auto;\n padding: 1.25em 1.25em;\n }\n`;\n\nconst ButtonContainer = styled.span`\n align-items: center;\n display: flex;\n justify-content: center;\n justify-self: right;\n`;\n\nconst AlertHeader = styled.span`\n align-self: center;\n font-weight: 700;\n grid-column: 2;\n`;\n\nconst AlertSubheader = styled(AlertHeader)`\n font-weight: 400;\n margin-top: 0.3em;\n`;\n\nconst AlertContent = styled.div`\n grid-column: 2;\n grid-row: 3;\n`;\n\nconst ContentPadding = styled.div<{\n collapsible: boolean;\n}>`\n margin-top: ${props => (props.collapsible ? \"1em\" : \".5em\")};\n`;\n\nconst Alert = ({\n alertHeader,\n alertSubheader,\n backgroundColor,\n children,\n collapsible,\n Icon = Bell\n}: Props): JSX.Element => {\n const [expandAlert, setExpandAlert] = useState(false);\n const intl = useIntl();\n const label = intl.formatMessage({\n id: \"otpUi.buildingBlocks.alert.expand\",\n defaultMessage: \"Expand\"\n });\n return (\n <AlertContainer\n backgroundColor={backgroundColor}\n expandAlert={expandAlert}\n collapsible={collapsible}\n >\n <Icon size={24} />\n <AlertHeader>{alertHeader}</AlertHeader>\n <ButtonContainer>\n {collapsible && (\n <button\n type=\"button\"\n className=\"toggle-btn\"\n onClick={() => setExpandAlert(!expandAlert)}\n aria-label={label}\n title={label}\n >\n <ChevronUp size={16} />\n </button>\n )}\n </ButtonContainer>\n {alertSubheader && <AlertSubheader>{alertSubheader}</AlertSubheader>}\n {children && (\n <AlertContent>\n <AnimateHeight\n duration={500}\n height={collapsible ? (expandAlert ? \"auto\" : 0) : \"auto\"}\n >\n <ContentPadding collapsible={collapsible}>\n {children}\n </ContentPadding>\n </AnimateHeight>\n </AlertContent>\n )}\n </AlertContainer>\n );\n};\n\nexport default Alert;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAD,sBAA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|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
3
7
|
const blue = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
50: "#E5ECF3",
|
|
9
|
+
100: "#CCDAE7",
|
|
10
|
+
200: "#B2C7DB",
|
|
11
|
+
300: "#99B5CF",
|
|
12
|
+
400: "#7FA2C2",
|
|
13
|
+
500: "#6690B7",
|
|
14
|
+
600: "#4D7EAB",
|
|
15
|
+
// 700 and above text is WCAG AA accessible on white backgrounds.
|
|
16
|
+
700: "#336B9E",
|
|
17
|
+
// 800 and above text is WCAG AAA accessible on white backgrounds.
|
|
18
|
+
800: "#1A5992",
|
|
19
|
+
900: "#004686"
|
|
16
20
|
};
|
|
17
|
-
exports.default = blue;
|
|
21
|
+
var _default = exports.default = blue;
|
|
18
22
|
//# sourceMappingURL=blue.js.map
|
package/lib/colors/blue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blue.js","
|
|
1
|
+
{"version":3,"file":"blue.js","names":["blue","_default","exports","default"],"sources":["../../src/colors/blue.ts"],"sourcesContent":["const blue = {\n 50: \"#E5ECF3\",\n 100: \"#CCDAE7\",\n 200: \"#B2C7DB\",\n 300: \"#99B5CF\",\n 400: \"#7FA2C2\",\n 500: \"#6690B7\",\n 600: \"#4D7EAB\",\n // 700 and above text is WCAG AA accessible on white backgrounds.\n 700: \"#336B9E\",\n // 800 and above text is WCAG AAA accessible on white backgrounds.\n 800: \"#1A5992\",\n 900: \"#004686\"\n};\n\nexport default blue;\n"],"mappings":";;;;;;AAAA,MAAMA,IAAI,GAAG;EACX,EAAE,EAAE,SAAS;EACb,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd;EACA,GAAG,EAAE,SAAS;EACd;EACA,GAAG,EAAE,SAAS;EACd,GAAG,EAAE;AACP,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaH,IAAI","ignoreList":[]}
|
package/lib/colors/grey.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
3
7
|
const grey = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
50: "#ECECEC",
|
|
9
|
+
100: "#D9D9D9",
|
|
10
|
+
200: "#C5C5C5",
|
|
11
|
+
300: "#B3B3B3",
|
|
12
|
+
400: "#9F9F9F",
|
|
13
|
+
500: "#8C8C8C",
|
|
14
|
+
600: "#797979",
|
|
15
|
+
// 700 and above text is WCAG AA accessible on white backgrounds.
|
|
16
|
+
700: "#666666",
|
|
17
|
+
// 800 and above text is WCAG AAA accessible on white backgrounds.
|
|
18
|
+
800: "#535353",
|
|
19
|
+
900: "#404040"
|
|
16
20
|
};
|
|
17
|
-
exports.default = grey;
|
|
21
|
+
var _default = exports.default = grey;
|
|
18
22
|
//# sourceMappingURL=grey.js.map
|
package/lib/colors/grey.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grey.js","
|
|
1
|
+
{"version":3,"file":"grey.js","names":["grey","_default","exports","default"],"sources":["../../src/colors/grey.ts"],"sourcesContent":["const grey = {\n 50: \"#ECECEC\",\n 100: \"#D9D9D9\",\n 200: \"#C5C5C5\",\n 300: \"#B3B3B3\",\n 400: \"#9F9F9F\",\n 500: \"#8C8C8C\",\n 600: \"#797979\",\n // 700 and above text is WCAG AA accessible on white backgrounds.\n 700: \"#666666\",\n // 800 and above text is WCAG AAA accessible on white backgrounds.\n 800: \"#535353\",\n 900: \"#404040\"\n};\n\nexport default grey;\n"],"mappings":";;;;;;AAAA,MAAMA,IAAI,GAAG;EACX,EAAE,EAAE,SAAS;EACb,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd;EACA,GAAG,EAAE,SAAS;EACd;EACA,GAAG,EAAE,SAAS;EACd,GAAG,EAAE;AACP,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaH,IAAI","ignoreList":[]}
|
package/lib/colors/red.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
3
7
|
const red = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
50: "#F7E7E6",
|
|
9
|
+
100: "#EFCFCE",
|
|
10
|
+
200: "#E7B6B4",
|
|
11
|
+
300: "#DF9E9C",
|
|
12
|
+
400: "#D78683",
|
|
13
|
+
500: "#CF6E6B",
|
|
14
|
+
600: "#C75652",
|
|
15
|
+
// 700 and above text is WCAG AA accessible on white backgrounds.
|
|
16
|
+
700: "#BF3E3A",
|
|
17
|
+
800: "#B72620",
|
|
18
|
+
// 900 text is WCAG AAA accessible on white backgrounds.
|
|
19
|
+
900: "#AF0E08"
|
|
16
20
|
};
|
|
17
|
-
exports.default = red;
|
|
21
|
+
var _default = exports.default = red;
|
|
18
22
|
//# sourceMappingURL=red.js.map
|
package/lib/colors/red.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"red.js","
|
|
1
|
+
{"version":3,"file":"red.js","names":["red","_default","exports","default"],"sources":["../../src/colors/red.ts"],"sourcesContent":["const red = {\n 50: \"#F7E7E6\",\n 100: \"#EFCFCE\",\n 200: \"#E7B6B4\",\n 300: \"#DF9E9C\",\n 400: \"#D78683\",\n 500: \"#CF6E6B\",\n 600: \"#C75652\",\n // 700 and above text is WCAG AA accessible on white backgrounds.\n 700: \"#BF3E3A\",\n 800: \"#B72620\",\n // 900 text is WCAG AAA accessible on white backgrounds.\n 900: \"#AF0E08\"\n};\n\nexport default red;\n"],"mappings":";;;;;;AAAA,MAAMA,GAAG,GAAG;EACV,EAAE,EAAE,SAAS;EACb,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd;EACA,GAAG,EAAE,SAAS;EACd,GAAG,EAAE,SAAS;EACd;EACA,GAAG,EAAE;AACP,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaH,GAAG","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dropdown/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,cAAc,EAMf,MAAM,OAAO,CAAC;AAQf,MAAM,WAAW,KAAM,SAAQ,cAAc,CAAC,WAAW,CAAC;IACxD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,QAAA,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dropdown/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,cAAc,EAMf,MAAM,OAAO,CAAC;AAQf,MAAM,WAAW,KAAM,SAAQ,cAAc,CAAC,WAAW,CAAC;IACxD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,QAAA,MAAM,QAAQ,GAAI,iFASf,KAAK,KAAG,GAAG,CAAC,OAsGd,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|