dibk-design 1.1.9 → 2.0.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/dist/{fonts → assets/fonts}/Altis-Light.eot +0 -0
- package/dist/{fonts → assets/fonts}/Altis-Light.svg +0 -0
- package/dist/{fonts → assets/fonts}/Altis-Light.ttf +0 -0
- package/dist/{fonts → assets/fonts}/Altis-Light.woff +0 -0
- package/dist/{fonts → assets/fonts}/Altis.eot +0 -0
- package/dist/{fonts → assets/fonts}/Altis.svg +0 -0
- package/dist/{fonts → assets/fonts}/Altis.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.woff2 +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.woff2 +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.woff2 +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.woff2 +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.woff2 +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.woff2 +0 -0
- package/dist/assets/png/dibk-logo.png +0 -0
- package/dist/{images → assets/svg}/dibk-logo-mobile.svg +0 -0
- package/dist/{images → assets/svg}/dibk-logo.svg +0 -0
- package/dist/{images → assets/svg}/spinner.svg +0 -0
- package/dist/components/Accordion.js +61 -92
- package/dist/components/Accordion.module.scss +40 -39
- package/dist/components/Button.js +44 -84
- package/dist/components/Button.module.scss +24 -18
- package/dist/components/CheckBoxIcon.js +20 -61
- package/dist/components/CheckBoxIcon.module.scss +52 -52
- package/dist/components/CheckBoxInput.js +25 -64
- package/dist/components/CheckBoxInput.module.scss +23 -23
- package/dist/components/CheckBoxList.js +9 -2
- package/dist/components/CheckBoxList.module.scss +14 -2
- package/dist/components/CheckBoxListItem.js +2 -6
- package/dist/components/CheckBoxListItem.module.scss +53 -53
- package/dist/components/Container.js +6 -49
- package/dist/components/Container.module.scss +1 -1
- package/dist/components/ContentBox.js +38 -77
- package/dist/components/ContentBox.module.scss +35 -35
- package/dist/components/Dialog.js +38 -106
- package/dist/components/Dialog.module.scss +14 -12
- package/dist/components/DragAndDropFileInput.js +86 -147
- package/dist/components/DragAndDropFileInput.module.scss +28 -28
- package/dist/components/ErrorBox.js +5 -11
- package/dist/components/ErrorBox.module.scss +1 -1
- package/dist/components/ErrorMessage.js +13 -54
- package/dist/components/ErrorMessage.module.scss +1 -1
- package/dist/components/Footer.js +5 -44
- package/dist/components/Footer.module.scss +1 -1
- package/dist/components/Header.js +3 -5
- package/dist/components/Header.module.scss +9 -9
- package/dist/components/InputField.js +69 -120
- package/dist/components/InputField.module.scss +69 -69
- package/dist/components/Label.js +9 -48
- package/dist/components/Label.module.scss +3 -3
- package/dist/components/List.js +1 -1
- package/dist/components/List.module.scss +17 -17
- package/dist/components/ListItem.js +1 -1
- package/dist/components/LoadingAnimation.js +6 -47
- package/dist/components/LoadingAnimation.module.scss +23 -23
- package/dist/components/NavigationBar.js +137 -190
- package/dist/components/NavigationBar.module.scss +165 -165
- package/dist/components/NavigationBarListItem.js +22 -60
- package/dist/components/Paper.js +5 -45
- package/dist/components/Paper.module.scss +14 -14
- package/dist/components/ProgressBar.js +16 -8
- package/dist/components/ProgressBar.module.scss +2 -2
- package/dist/components/RadioButtonIcon.js +15 -55
- package/dist/components/RadioButtonIcon.module.scss +36 -36
- package/dist/components/RadioButtonInput.js +24 -63
- package/dist/components/RadioButtonInput.module.scss +23 -25
- package/dist/components/RadioButtonList.js +9 -2
- package/dist/components/RadioButtonList.module.scss +14 -2
- package/dist/components/RadioButtonListItem.js +3 -6
- package/dist/components/RadioButtonListItem.module.scss +7 -7
- package/dist/components/Select.js +98 -140
- package/dist/components/Select.module.scss +76 -76
- package/dist/components/Table.js +1 -3
- package/dist/components/Table.module.scss +1 -1
- package/dist/components/Textarea.js +54 -96
- package/dist/components/Textarea.module.scss +2 -2
- package/dist/components/Theme.js +60 -106
- package/dist/components/Theme.module.scss +12 -12
- package/dist/components/WizardNavigation/Step.js +34 -80
- package/dist/components/WizardNavigation/Step.module.scss +12 -12
- package/dist/components/WizardNavigation.js +19 -63
- package/dist/components/WizardNavigation.module.scss +1 -1
- package/dist/functions/theme.js +24 -10
- package/dist/index.js +0 -2
- package/dist/style/base/_all.scss +1 -0
- package/dist/style/base/_fonts.scss +97 -0
- package/package.json +63 -28
- package/dist/components/Accordion.md +0 -15
- package/dist/components/Button.md +0 -78
- package/dist/components/CheckBoxIcon.md +0 -38
- package/dist/components/CheckBoxInput.md +0 -51
- package/dist/components/CheckBoxList.md +0 -26
- package/dist/components/CheckBoxListItem.md +0 -82
- package/dist/components/Container.md +0 -7
- package/dist/components/ContentBox.md +0 -46
- package/dist/components/Dialog.md +0 -6
- package/dist/components/DragAndDropFileInput.md +0 -13
- package/dist/components/ErrorBox.md +0 -27
- package/dist/components/ErrorMessage.md +0 -15
- package/dist/components/Footer.md +0 -7
- package/dist/components/Header.md +0 -12
- package/dist/components/InputField.md +0 -40
- package/dist/components/Label.md +0 -9
- package/dist/components/List.md +0 -71
- package/dist/components/LoadingAnimation.md +0 -5
- package/dist/components/NavigationBar.md +0 -42
- package/dist/components/NavigationBarListItem.md +0 -16
- package/dist/components/Paper.md +0 -9
- package/dist/components/ProgressBar.md +0 -13
- package/dist/components/RadioButtonIcon.md +0 -41
- package/dist/components/RadioButtonInput.md +0 -30
- package/dist/components/RadioButtonList.md +0 -28
- package/dist/components/RadioButtonListItem.md +0 -70
- package/dist/components/Select.md +0 -28
- package/dist/components/Table.md +0 -26
- package/dist/components/Textarea.md +0 -27
- package/dist/components/Theme.md +0 -12
- package/dist/components/WizardNavigation.md +0 -84
- package/dist/style/base/fonts.css +0 -95
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
@import "../style/global.scss";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
3
|
+
.loadingAnimation {
|
|
4
|
+
@include box-shadow(0 8px 17px 0 rgba(0, 0, 0, 0.2));
|
|
5
|
+
z-index: 6;
|
|
6
|
+
background-repeat: no-repeat;
|
|
7
|
+
background-position: 50% 15px;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
height: auto;
|
|
10
|
+
width: 200px;
|
|
11
|
+
border: 1px solid #ddd;
|
|
12
|
+
padding: 15px;
|
|
13
|
+
color: #666;
|
|
14
|
+
display: block;
|
|
15
|
+
text-align: center;
|
|
16
|
+
&.fixed {
|
|
17
|
+
@include calc(left, "50% - 100px");
|
|
18
|
+
top: 40%;
|
|
19
|
+
margin: auto;
|
|
20
|
+
position: fixed;
|
|
21
|
+
}
|
|
22
|
+
&:before {
|
|
23
|
+
content: url(../assets/svg/spinner.svg);
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
26
|
}
|
|
@@ -7,230 +7,177 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
|
14
|
+
var _NavigationBarListItem = _interopRequireDefault(require("./NavigationBarListItem"));
|
|
15
|
+
|
|
14
16
|
var _theme = require("../functions/theme");
|
|
15
17
|
|
|
16
|
-
var _dibkLogoMobile = _interopRequireDefault(require("../
|
|
17
|
-
|
|
18
|
-
var _NavigationBarListItem = _interopRequireDefault(require("./NavigationBarListItem"));
|
|
18
|
+
var _dibkLogoMobile = _interopRequireDefault(require("../assets/svg/dibk-logo-mobile.svg?url"));
|
|
19
19
|
|
|
20
20
|
var _NavigationBarModule = _interopRequireDefault(require("./NavigationBar.module.scss"));
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
25
|
|
|
28
|
-
function
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
27
|
|
|
30
|
-
function
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
29
|
|
|
32
|
-
function
|
|
30
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
31
|
|
|
34
|
-
function
|
|
32
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
35
33
|
|
|
36
|
-
function
|
|
34
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
37
35
|
|
|
38
|
-
function
|
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
39
37
|
|
|
40
|
-
function
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
41
39
|
|
|
42
|
-
function
|
|
40
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
var NavigationBar = function NavigationBar(props) {
|
|
43
|
+
var _props$primaryListIte, _props$secondaryListI;
|
|
45
44
|
|
|
46
|
-
var
|
|
47
|
-
|
|
45
|
+
var _useState = (0, _react.useState)(false),
|
|
46
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
47
|
+
active = _useState2[0],
|
|
48
|
+
setActive = _useState2[1];
|
|
48
49
|
|
|
49
|
-
var
|
|
50
|
+
var toggleList = function toggleList() {
|
|
51
|
+
setActive(!active);
|
|
52
|
+
};
|
|
50
53
|
|
|
51
|
-
function
|
|
52
|
-
|
|
54
|
+
var getNavigationBarThemeStyle = function getNavigationBarThemeStyle(theme) {
|
|
55
|
+
return {
|
|
56
|
+
backgroundColor: (0, _theme.getThemeNavigationBarBackgroundColor)(theme),
|
|
57
|
+
color: (0, _theme.getThemeNavigationBarTextColor)(theme)
|
|
58
|
+
};
|
|
59
|
+
};
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
var getListItemThemeStyle = function getListItemThemeStyle(theme) {
|
|
62
|
+
return {
|
|
63
|
+
color: (0, _theme.getThemeNavigationBarTextColor)(theme),
|
|
64
|
+
borderBottomColor: (0, _theme.getThemeNavigationBarTextColor)(theme)
|
|
65
|
+
};
|
|
66
|
+
};
|
|
55
67
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
var getLogoThemeStyle = function getLogoThemeStyle(theme) {
|
|
69
|
+
return {
|
|
70
|
+
padding: (0, _theme.getThemeLogoPadding)(theme)
|
|
59
71
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}, {
|
|
80
|
-
key: "getNavigationBarThemeStyle",
|
|
81
|
-
value: function getNavigationBarThemeStyle(theme) {
|
|
82
|
-
return {
|
|
83
|
-
backgroundColor: (0, _theme.getThemeNavigationBarBackgroundColor)(theme),
|
|
84
|
-
color: (0, _theme.getThemeNavigationBarTextColor)(theme)
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
key: "getListItemThemeStyle",
|
|
89
|
-
value: function getListItemThemeStyle(theme) {
|
|
90
|
-
return {
|
|
91
|
-
color: (0, _theme.getThemeNavigationBarTextColor)(theme),
|
|
92
|
-
borderBottomColor: (0, _theme.getThemeNavigationBarTextColor)(theme)
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
}, {
|
|
96
|
-
key: "getLogoThemeStyle",
|
|
97
|
-
value: function getLogoThemeStyle(theme) {
|
|
98
|
-
return {
|
|
99
|
-
padding: (0, _theme.getThemeLogoPadding)(theme)
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
}, {
|
|
103
|
-
key: "renderPrimaryList",
|
|
104
|
-
value: function renderPrimaryList() {
|
|
105
|
-
var _this2 = this;
|
|
106
|
-
|
|
107
|
-
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.primaryListItems;
|
|
108
|
-
var iteration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
109
|
-
var listItemThemeStyle = this.getListItemThemeStyle(this.props.theme);
|
|
110
|
-
var listItems = items.map(function (listItem, i) {
|
|
111
|
-
var key = iteration + '-' + i;
|
|
112
|
-
|
|
113
|
-
if (listItem.listItems !== undefined) {
|
|
114
|
-
return /*#__PURE__*/_react.default.createElement("li", {
|
|
115
|
-
key: key
|
|
116
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
117
|
-
style: listItemThemeStyle
|
|
118
|
-
}, listItem.name), _this2.renderPrimaryList(listItem.listItems, iteration + 1));
|
|
119
|
-
} else {
|
|
120
|
-
return /*#__PURE__*/_react.default.createElement(_NavigationBarListItem.default, {
|
|
121
|
-
listItem: listItem,
|
|
122
|
-
key: key,
|
|
123
|
-
theme: _this2.props.theme
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
128
|
-
className: _NavigationBarModule.default.primaryList
|
|
129
|
-
}, listItems);
|
|
130
|
-
}
|
|
131
|
-
}, {
|
|
132
|
-
key: "renderSecondaryList",
|
|
133
|
-
value: function renderSecondaryList() {
|
|
134
|
-
var _this3 = this;
|
|
135
|
-
|
|
136
|
-
var listItems = this.props.secondaryListItems.map(function (listItem, i) {
|
|
137
|
-
return /*#__PURE__*/_react.default.createElement(_NavigationBarListItem.default, {
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
var renderPrimaryList = function renderPrimaryList() {
|
|
75
|
+
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.primaryListItems;
|
|
76
|
+
var iteration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
77
|
+
var listItemThemeStyle = getListItemThemeStyle(props.theme);
|
|
78
|
+
var listItems = items.map(function (listItem, i) {
|
|
79
|
+
var key = iteration + "-" + i;
|
|
80
|
+
|
|
81
|
+
if (listItem.listItems !== undefined) {
|
|
82
|
+
return _react.default.createElement("li", {
|
|
83
|
+
key: key
|
|
84
|
+
}, _react.default.createElement("span", {
|
|
85
|
+
style: listItemThemeStyle
|
|
86
|
+
}, listItem.name), renderPrimaryList(listItem.listItems, iteration + 1));
|
|
87
|
+
} else {
|
|
88
|
+
return _react.default.createElement(_NavigationBarListItem.default, {
|
|
138
89
|
listItem: listItem,
|
|
139
|
-
key:
|
|
140
|
-
theme:
|
|
90
|
+
key: key,
|
|
91
|
+
theme: props.theme
|
|
141
92
|
});
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
return _react.default.createElement("ul", {
|
|
96
|
+
className: _NavigationBarModule.default.primaryList
|
|
97
|
+
}, listItems);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var renderSecondaryList = function renderSecondaryList() {
|
|
101
|
+
var listItems = props.secondaryListItems.map(function (listItem, i) {
|
|
102
|
+
return _react.default.createElement(_NavigationBarListItem.default, {
|
|
103
|
+
listItem: listItem,
|
|
104
|
+
key: i,
|
|
105
|
+
theme: props.theme
|
|
142
106
|
});
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}, this.renderPrimaryList(), this.renderSecondaryList(), this.props.children)), /*#__PURE__*/_react.default.createElement("div", {
|
|
212
|
-
className: "".concat(_NavigationBarModule.default.dropdownOverlay, " ").concat(this.state.active ? _NavigationBarModule.default.active : '')
|
|
213
|
-
})));
|
|
214
|
-
}
|
|
215
|
-
}]);
|
|
216
|
-
|
|
217
|
-
return NavigationBar;
|
|
218
|
-
}(_react.default.Component);
|
|
107
|
+
});
|
|
108
|
+
return _react.default.createElement("ul", {
|
|
109
|
+
className: _NavigationBarModule.default.secondaryList
|
|
110
|
+
}, listItems);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
var renderLogo = function renderLogo(logoLink) {
|
|
114
|
+
var themeLogo = (0, _theme.getThemeLogo)(props.theme);
|
|
115
|
+
var themeAppName = (0, _theme.getThemeAppName)(props.theme);
|
|
116
|
+
var logoElement = themeLogo && themeAppName ? _react.default.createElement("img", {
|
|
117
|
+
alt: "".concat(themeAppName, " logo"),
|
|
118
|
+
src: themeLogo,
|
|
119
|
+
style: getLogoThemeStyle(props.theme)
|
|
120
|
+
}) : _react.default.createElement("img", {
|
|
121
|
+
alt: "DIBK logo",
|
|
122
|
+
src: _dibkLogoMobile.default
|
|
123
|
+
});
|
|
124
|
+
var logoLinkProps = {
|
|
125
|
+
target: props.openLogoLinkInNewTab ? "_blank" : null,
|
|
126
|
+
rel: props.openLogoLinkInNewTab ? "noopener noreferrer" : null
|
|
127
|
+
};
|
|
128
|
+
return logoLink && logoLink.length ? _react.default.createElement("a", _extends({}, logoLinkProps, {
|
|
129
|
+
href: logoLink
|
|
130
|
+
}), logoElement) : logoElement;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
var navigationBarThemeStyle = getNavigationBarThemeStyle(props.theme);
|
|
134
|
+
var hamburgerIconLineStyle = {
|
|
135
|
+
backgroundColor: (0, _theme.getThemeNavigationBarTextColor)(props.theme)
|
|
136
|
+
};
|
|
137
|
+
return _react.default.createElement("header", null, _react.default.createElement("div", {
|
|
138
|
+
className: _NavigationBarModule.default.isPresent
|
|
139
|
+
}, _react.default.createElement("div", {
|
|
140
|
+
className: _NavigationBarModule.default.navigationBar,
|
|
141
|
+
style: navigationBarThemeStyle
|
|
142
|
+
}, _react.default.createElement("div", {
|
|
143
|
+
className: _NavigationBarModule.default.logoContainer
|
|
144
|
+
}, renderLogo(props.logoLink)), props.children ? _react.default.createElement("div", {
|
|
145
|
+
className: _NavigationBarModule.default.childElements
|
|
146
|
+
}, props.children) : null, !!((_props$primaryListIte = props.primaryListItems) !== null && _props$primaryListIte !== void 0 && _props$primaryListIte.length) || !!((_props$secondaryListI = props.secondaryListItems) !== null && _props$secondaryListI !== void 0 && _props$secondaryListI.length) ? _react.default.createElement("button", {
|
|
147
|
+
type: "button",
|
|
148
|
+
className: "".concat(_NavigationBarModule.default.menuToggle, " ").concat(active ? _NavigationBarModule.default.active : ""),
|
|
149
|
+
onClick: function onClick() {
|
|
150
|
+
return toggleList();
|
|
151
|
+
},
|
|
152
|
+
"aria-expanded": active ? "true" : "false",
|
|
153
|
+
"aria-controls": "main-menu-dropdown"
|
|
154
|
+
}, _react.default.createElement("span", {
|
|
155
|
+
className: _NavigationBarModule.default.hamburgerIcon
|
|
156
|
+
}, _react.default.createElement("span", {
|
|
157
|
+
className: _NavigationBarModule.default.line,
|
|
158
|
+
style: hamburgerIconLineStyle
|
|
159
|
+
}), _react.default.createElement("span", {
|
|
160
|
+
className: _NavigationBarModule.default.line,
|
|
161
|
+
style: hamburgerIconLineStyle
|
|
162
|
+
}), _react.default.createElement("span", {
|
|
163
|
+
className: _NavigationBarModule.default.line,
|
|
164
|
+
style: hamburgerIconLineStyle
|
|
165
|
+
}))) : null), _react.default.createElement("div", {
|
|
166
|
+
className: "".concat(_NavigationBarModule.default.dropdownContainer, " ").concat(active ? _NavigationBarModule.default.active : "")
|
|
167
|
+
}, _react.default.createElement("div", {
|
|
168
|
+
id: "main-menu-dropdown",
|
|
169
|
+
className: _NavigationBarModule.default.dropdown,
|
|
170
|
+
style: navigationBarThemeStyle
|
|
171
|
+
}, renderPrimaryList(), renderSecondaryList(), props.children)), _react.default.createElement("div", {
|
|
172
|
+
className: "".concat(_NavigationBarModule.default.dropdownOverlay, " ").concat(active ? _NavigationBarModule.default.active : "")
|
|
173
|
+
})));
|
|
174
|
+
};
|
|
219
175
|
|
|
220
176
|
NavigationBar.propTypes = {
|
|
221
|
-
/** Main links in navigation bar */
|
|
222
177
|
primaryListItems: _propTypes.default.array,
|
|
223
|
-
|
|
224
|
-
/** Secondary links in navigation bar */
|
|
225
178
|
secondaryListItems: _propTypes.default.array,
|
|
226
|
-
|
|
227
|
-
/** Link for logo */
|
|
228
179
|
logoLink: _propTypes.default.string,
|
|
229
|
-
|
|
230
|
-
/** Opens logo link in a new tab on click */
|
|
231
180
|
openLogoLinkInNewTab: _propTypes.default.bool,
|
|
232
|
-
|
|
233
|
-
/** Theme for navigation bar */
|
|
234
181
|
theme: _propTypes.default.object
|
|
235
182
|
};
|
|
236
183
|
NavigationBar.defaultProps = {
|