dibk-design 0.4.22 → 0.4.26
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/components/Accordion.js +39 -77
- package/dist/components/Button.js +31 -75
- package/dist/components/Button.module.scss +25 -2
- package/dist/components/CheckBoxIcon.js +24 -64
- package/dist/components/CheckBoxIcon.md +6 -0
- package/dist/components/CheckBoxInput.js +26 -59
- package/dist/components/CheckBoxInput.md +6 -0
- package/dist/components/CheckBoxListItem.js +18 -51
- package/dist/components/CheckBoxListItem.md +9 -0
- package/dist/components/ContentBox.js +30 -67
- package/dist/components/Dialog.js +57 -98
- package/dist/components/DragAndDropFileInput.js +91 -132
- package/dist/components/DragAndDropFileInput.md +5 -1
- package/dist/components/Footer.js +8 -44
- package/dist/components/Header.js +11 -47
- package/dist/components/InputField.js +92 -141
- package/dist/components/Label.js +11 -53
- package/dist/components/List.js +21 -72
- package/dist/components/LoadingAnimation.js +6 -42
- package/dist/components/NavigationBar.js +126 -179
- package/dist/components/NavigationBarListItem.js +22 -59
- package/dist/components/Paper.js +6 -42
- package/dist/components/RadioButtonIcon.js +18 -60
- package/dist/components/RadioButtonInput.js +17 -53
- package/dist/components/RadioButtonListItem.js +13 -49
- package/dist/components/Select.js +100 -142
- package/dist/components/Textarea.js +52 -91
- package/dist/components/Theme.js +55 -98
- package/dist/components/WizardNavigation/Step.js +35 -72
- package/dist/components/WizardNavigation.js +25 -59
- package/dist/functions/theme.js +10 -10
- package/dist/index.js +24 -24
- package/package.json +1 -1
package/dist/components/Theme.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -19,109 +17,68 @@ var _ThemeModule = _interopRequireDefault(require("./Theme.module.scss"));
|
|
|
19
17
|
|
|
20
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
|
-
|
|
32
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
33
|
-
|
|
34
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
35
|
-
|
|
36
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
|
-
|
|
38
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
-
|
|
40
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
-
|
|
42
|
-
var Theme = /*#__PURE__*/function (_React$Component) {
|
|
43
|
-
_inherits(Theme, _React$Component);
|
|
20
|
+
class Theme extends _react.default.Component {
|
|
21
|
+
getThemeColorPaletteStyle(theme, color) {
|
|
22
|
+
return {
|
|
23
|
+
backgroundColor: (0, _theme.getThemePaletteBackgroundColor)(theme, color),
|
|
24
|
+
color: (0, _theme.getThemePaletteTextColor)(theme, color)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
44
27
|
|
|
45
|
-
|
|
28
|
+
getThemeTextStyle(theme) {
|
|
29
|
+
return {
|
|
30
|
+
color: (0, _theme.getThemeTextColor)(theme)
|
|
31
|
+
};
|
|
32
|
+
}
|
|
46
33
|
|
|
47
|
-
|
|
48
|
-
|
|
34
|
+
getThemeLinkStyle(theme) {
|
|
35
|
+
return {
|
|
36
|
+
color: (0, _theme.getThemeLinkColor)(theme)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
49
39
|
|
|
50
|
-
|
|
40
|
+
renderColors(theme) {
|
|
41
|
+
const colors = ['default', 'primary', 'success', 'warning', 'info', 'lightCyan', 'orange', 'lightOrange', 'lime', 'lightLime'];
|
|
42
|
+
return colors.map(color => {
|
|
43
|
+
const colorClassName = _ThemeModule.default[color];
|
|
44
|
+
const colorPaletteStyle = this.props.theme ? this.getThemeColorPaletteStyle(this.props.theme, color) : null;
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
+
key: color,
|
|
47
|
+
className: "".concat(_ThemeModule.default.color, " ").concat(colorClassName),
|
|
48
|
+
style: colorPaletteStyle
|
|
49
|
+
}, color);
|
|
50
|
+
});
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
}, {
|
|
69
|
-
key: "getThemeLinkStyle",
|
|
70
|
-
value: function getThemeLinkStyle(theme) {
|
|
71
|
-
return {
|
|
72
|
-
color: (0, _theme.getThemeLinkColor)(theme)
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
}, {
|
|
76
|
-
key: "renderColors",
|
|
77
|
-
value: function renderColors(theme) {
|
|
78
|
-
var _this = this;
|
|
53
|
+
renderLogo(logoLink) {
|
|
54
|
+
const themeLogo = (0, _theme.getThemeLogo)(this.props.theme);
|
|
55
|
+
const themeAppName = (0, _theme.getThemeAppName)(this.props.theme);
|
|
56
|
+
const logoElement = themeLogo && themeAppName ? /*#__PURE__*/_react.default.createElement("img", {
|
|
57
|
+
alt: "".concat(themeAppName, " logo"),
|
|
58
|
+
src: themeLogo
|
|
59
|
+
}) : /*#__PURE__*/_react.default.createElement("img", {
|
|
60
|
+
alt: "DIBK logo",
|
|
61
|
+
src: _dibkLogoMobile.default
|
|
62
|
+
});
|
|
63
|
+
return logoLink && logoLink.length ? /*#__PURE__*/_react.default.createElement("a", {
|
|
64
|
+
href: logoLink
|
|
65
|
+
}, logoElement) : logoElement;
|
|
66
|
+
}
|
|
79
67
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
key: "renderLogo",
|
|
93
|
-
value: function renderLogo(logoLink) {
|
|
94
|
-
var themeLogo = (0, _theme.getThemeLogo)(this.props.theme);
|
|
95
|
-
var themeAppName = (0, _theme.getThemeAppName)(this.props.theme);
|
|
96
|
-
var logoElement = themeLogo && themeAppName ? /*#__PURE__*/_react.default.createElement("img", {
|
|
97
|
-
alt: "".concat(themeAppName, " logo"),
|
|
98
|
-
src: themeLogo
|
|
99
|
-
}) : /*#__PURE__*/_react.default.createElement("img", {
|
|
100
|
-
alt: "DIBK logo",
|
|
101
|
-
src: _dibkLogoMobile.default
|
|
102
|
-
});
|
|
103
|
-
return logoLink && logoLink.length ? /*#__PURE__*/_react.default.createElement("a", {
|
|
104
|
-
href: logoLink
|
|
105
|
-
}, logoElement) : logoElement;
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
108
|
-
key: "render",
|
|
109
|
-
value: function render() {
|
|
110
|
-
var themeTextStyle = this.props.theme ? this.getThemeTextStyle(this.props.theme) : null;
|
|
111
|
-
var themeLinkStyle = this.props.theme ? this.getThemeLinkStyle(this.props.theme) : null;
|
|
112
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
-
className: _ThemeModule.default.colorPalette
|
|
114
|
-
}, this.renderColors(this.props.theme)), /*#__PURE__*/_react.default.createElement("p", {
|
|
115
|
-
style: themeTextStyle
|
|
116
|
-
}, "The is default text"), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
117
|
-
style: themeLinkStyle,
|
|
118
|
-
href: "#theme"
|
|
119
|
-
}, "This is a hyperlink")), this.renderLogo(this.props.theme));
|
|
120
|
-
}
|
|
121
|
-
}]);
|
|
68
|
+
render() {
|
|
69
|
+
const themeTextStyle = this.props.theme ? this.getThemeTextStyle(this.props.theme) : null;
|
|
70
|
+
const themeLinkStyle = this.props.theme ? this.getThemeLinkStyle(this.props.theme) : null;
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
72
|
+
className: _ThemeModule.default.colorPalette
|
|
73
|
+
}, this.renderColors(this.props.theme)), /*#__PURE__*/_react.default.createElement("p", {
|
|
74
|
+
style: themeTextStyle
|
|
75
|
+
}, "The is default text"), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
76
|
+
style: themeLinkStyle,
|
|
77
|
+
href: "#theme"
|
|
78
|
+
}, "This is a hyperlink")), this.renderLogo(this.props.theme));
|
|
79
|
+
}
|
|
122
80
|
|
|
123
|
-
|
|
124
|
-
}(_react.default.Component);
|
|
81
|
+
}
|
|
125
82
|
|
|
126
83
|
Theme.propTypes = {
|
|
127
84
|
theme: _propTypes.default.object
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -17,83 +15,48 @@ var _StepModule = _interopRequireDefault(require("./Step.module.scss"));
|
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
24
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
-
|
|
26
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
27
|
-
|
|
28
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
29
|
-
|
|
30
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
31
|
-
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
|
-
|
|
34
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
19
|
|
|
36
|
-
function
|
|
20
|
+
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; }
|
|
37
21
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var Step = /*#__PURE__*/function (_Component) {
|
|
45
|
-
_inherits(Step, _Component);
|
|
46
|
-
|
|
47
|
-
var _super = _createSuper(Step);
|
|
22
|
+
// Dependencies
|
|
23
|
+
// Stylesheets
|
|
24
|
+
class Step extends _react.Component {
|
|
25
|
+
getActiveClass() {
|
|
26
|
+
return this.props.activeStepId === this.props.step.id ? _StepModule.default.active : '';
|
|
27
|
+
}
|
|
48
28
|
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
getFinishedClass() {
|
|
30
|
+
return this.props.step.finished ? _StepModule.default.finished : '';
|
|
31
|
+
}
|
|
51
32
|
|
|
52
|
-
|
|
33
|
+
getErrorClass() {
|
|
34
|
+
return this.props.step.hasErrors ? _StepModule.default.hasErrors : '';
|
|
53
35
|
}
|
|
54
36
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
className: "".concat(_StepModule.default.wizardTopnavItem, " ").concat(this.getActiveClass(), " ").concat(this.getFinishedClass(), " ").concat(this.getErrorClass())
|
|
77
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
78
|
-
className: _StepModule.default.wizardTopnavItemContent
|
|
79
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
80
|
-
className: _StepModule.default.stepNumber
|
|
81
|
-
}, this.props.index + 1), /*#__PURE__*/_react.default.createElement("span", {
|
|
82
|
-
className: _StepModule.default.stepName
|
|
83
|
-
}, this.props.step.name))) : /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
-
className: "".concat(_StepModule.default.wizardTopnavItem, " ").concat(this.getActiveClass(), " ").concat(this.getFinishedClass(), " ").concat(this.getErrorClass())
|
|
85
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
86
|
-
className: _StepModule.default.wizardTopnavItemContent
|
|
87
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
88
|
-
className: _StepModule.default.stepNumber
|
|
89
|
-
}, this.props.index + 1), /*#__PURE__*/_react.default.createElement("span", {
|
|
90
|
-
className: _StepModule.default.stepName
|
|
91
|
-
}, this.props.step.name)));
|
|
92
|
-
}
|
|
93
|
-
}]);
|
|
37
|
+
render() {
|
|
38
|
+
const step = this.props.step;
|
|
39
|
+
return step.link && Object.keys(step.link).length ? /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
40
|
+
to: step.link,
|
|
41
|
+
className: "".concat(_StepModule.default.wizardTopnavItem, " ").concat(this.getActiveClass(), " ").concat(this.getFinishedClass(), " ").concat(this.getErrorClass())
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
43
|
+
className: _StepModule.default.wizardTopnavItemContent
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
45
|
+
className: _StepModule.default.stepNumber
|
|
46
|
+
}, this.props.index + 1), /*#__PURE__*/_react.default.createElement("span", {
|
|
47
|
+
className: _StepModule.default.stepName
|
|
48
|
+
}, this.props.step.name))) : /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
+
className: "".concat(_StepModule.default.wizardTopnavItem, " ").concat(this.getActiveClass(), " ").concat(this.getFinishedClass(), " ").concat(this.getErrorClass())
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
51
|
+
className: _StepModule.default.wizardTopnavItemContent
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
53
|
+
className: _StepModule.default.stepNumber
|
|
54
|
+
}, this.props.index + 1), /*#__PURE__*/_react.default.createElement("span", {
|
|
55
|
+
className: _StepModule.default.stepName
|
|
56
|
+
}, this.props.step.name)));
|
|
57
|
+
}
|
|
94
58
|
|
|
95
|
-
|
|
96
|
-
}(_react.Component);
|
|
59
|
+
}
|
|
97
60
|
|
|
98
61
|
Step.propTypes = {
|
|
99
62
|
step: _propTypes.default.object.isRequired,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -17,66 +15,34 @@ var _WizardNavigationModule = _interopRequireDefault(require("./WizardNavigation
|
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
21
|
-
|
|
22
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
|
-
|
|
42
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
|
-
|
|
44
|
-
var WizardNavigation = /*#__PURE__*/function (_Component) {
|
|
45
|
-
_inherits(WizardNavigation, _Component);
|
|
46
|
-
|
|
47
|
-
var _super = _createSuper(WizardNavigation);
|
|
48
|
-
|
|
49
|
-
function WizardNavigation() {
|
|
50
|
-
_classCallCheck(this, WizardNavigation);
|
|
51
|
-
|
|
52
|
-
return _super.apply(this, arguments);
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
// Dependencies
|
|
23
|
+
// Components
|
|
24
|
+
// Stylesheets
|
|
25
|
+
class WizardNavigation extends _react.Component {
|
|
26
|
+
renderSteps(steps, activeStepId) {
|
|
27
|
+
const hasSteps = steps && Object.keys(steps).length;
|
|
28
|
+
return hasSteps ? Object.keys(steps).map((stepKey, stepIndex) => {
|
|
29
|
+
const step = steps[stepKey];
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_Step.default, {
|
|
31
|
+
step: step,
|
|
32
|
+
activeStepId: activeStepId,
|
|
33
|
+
index: stepIndex,
|
|
34
|
+
key: stepKey
|
|
35
|
+
});
|
|
36
|
+
}) : '';
|
|
53
37
|
}
|
|
54
38
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var step = steps[stepKey];
|
|
61
|
-
return /*#__PURE__*/_react.default.createElement(_Step.default, {
|
|
62
|
-
step: step,
|
|
63
|
-
activeStepId: activeStepId,
|
|
64
|
-
index: stepIndex,
|
|
65
|
-
key: stepKey
|
|
66
|
-
});
|
|
67
|
-
}) : '';
|
|
68
|
-
}
|
|
69
|
-
}, {
|
|
70
|
-
key: "render",
|
|
71
|
-
value: function render() {
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
-
className: _WizardNavigationModule.default.wizardTopnav
|
|
74
|
-
}, this.renderSteps(this.props.steps, this.props.activeStepId));
|
|
75
|
-
}
|
|
76
|
-
}]);
|
|
39
|
+
render() {
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
className: _WizardNavigationModule.default.wizardTopnav
|
|
42
|
+
}, this.renderSteps(this.props.steps, this.props.activeStepId));
|
|
43
|
+
}
|
|
77
44
|
|
|
78
|
-
|
|
79
|
-
}(_react.Component);
|
|
45
|
+
}
|
|
80
46
|
|
|
81
47
|
WizardNavigation.propTypes = {
|
|
82
48
|
steps: _propTypes.default.shape({
|
package/dist/functions/theme.js
CHANGED
|
@@ -5,61 +5,61 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getThemeTextColor = exports.getThemePaletteTextColor = exports.getThemePaletteBorderColor = exports.getThemePaletteBackgroundColor = exports.getThemeNavigationBarTextColor = exports.getThemeNavigationBarBackgroundColor = exports.getThemeLogoPadding = exports.getThemeLogo = exports.getThemeLinkColor = exports.getThemeAppName = void 0;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const getThemePaletteBackgroundColor = (theme, color) => {
|
|
9
9
|
return theme && theme.colors && theme.colors.palette && theme.colors.palette[color] && theme.colors.palette[color].background ? theme.colors.palette[color].background : null;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.getThemePaletteBackgroundColor = getThemePaletteBackgroundColor;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const getThemePaletteTextColor = (theme, color) => {
|
|
15
15
|
return theme && theme.colors && theme.colors.palette && theme.colors.palette[color] && theme.colors.palette[color].text ? theme.colors.palette[color].text : null;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
exports.getThemePaletteTextColor = getThemePaletteTextColor;
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const getThemePaletteBorderColor = (theme, color) => {
|
|
21
21
|
return theme && theme.colors && theme.colors.palette && theme.colors.palette[color] && theme.colors.palette[color].border ? theme.colors.palette[color].border : null;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
exports.getThemePaletteBorderColor = getThemePaletteBorderColor;
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
const getThemeNavigationBarBackgroundColor = theme => {
|
|
27
27
|
return theme && theme.colors && theme.colors.navigationBar && theme.colors.navigationBar.background ? theme.colors.navigationBar.background : null;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
exports.getThemeNavigationBarBackgroundColor = getThemeNavigationBarBackgroundColor;
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
const getThemeNavigationBarTextColor = theme => {
|
|
33
33
|
return theme && theme.colors && theme.colors.navigationBar && theme.colors.navigationBar.text ? theme.colors.navigationBar.text : null;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
exports.getThemeNavigationBarTextColor = getThemeNavigationBarTextColor;
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
const getThemeLogo = theme => {
|
|
39
39
|
return theme && theme.logo ? theme.logo : null;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
exports.getThemeLogo = getThemeLogo;
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
const getThemeLogoPadding = theme => {
|
|
45
45
|
return theme && theme.logoPadding ? theme.logoPadding : null;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
exports.getThemeLogoPadding = getThemeLogoPadding;
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
const getThemeAppName = theme => {
|
|
51
51
|
return theme && theme.appName ? theme.appName : null;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
exports.getThemeAppName = getThemeAppName;
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
const getThemeTextColor = theme => {
|
|
57
57
|
return theme && theme.colors && theme.colors.text ? theme.colors.text : null;
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
exports.getThemeTextColor = getThemeTextColor;
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
const getThemeLinkColor = theme => {
|
|
63
63
|
return theme && theme.colors && theme.colors.link ? theme.colors.link : null;
|
|
64
64
|
};
|
|
65
65
|
|