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
|
@@ -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
|
});
|
|
@@ -23,195 +21,144 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
23
21
|
|
|
24
22
|
function _extends() { _extends = Object.assign || 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); }
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
-
|
|
36
|
-
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); }; }
|
|
37
|
-
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
41
|
-
|
|
42
|
-
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; } }
|
|
43
|
-
|
|
44
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
|
+
class NavigationBar extends _react.default.Component {
|
|
25
|
+
constructor(props) {
|
|
26
|
+
super(props);
|
|
27
|
+
this.state = {
|
|
28
|
+
active: false
|
|
29
|
+
};
|
|
30
|
+
}
|
|
45
31
|
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
handleClickOutside() {
|
|
33
|
+
this.setState({
|
|
34
|
+
active: false
|
|
35
|
+
});
|
|
36
|
+
}
|
|
48
37
|
|
|
49
|
-
|
|
38
|
+
toggleList() {
|
|
39
|
+
this.setState(prevState => ({
|
|
40
|
+
active: !prevState.active
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
50
43
|
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
getNavigationBarThemeStyle(theme) {
|
|
45
|
+
return {
|
|
46
|
+
backgroundColor: (0, _theme.getThemeNavigationBarBackgroundColor)(theme),
|
|
47
|
+
color: (0, _theme.getThemeNavigationBarTextColor)(theme)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
53
50
|
|
|
54
|
-
|
|
51
|
+
getListItemThemeStyle(theme) {
|
|
52
|
+
return {
|
|
53
|
+
color: (0, _theme.getThemeNavigationBarTextColor)(theme),
|
|
54
|
+
borderBottomColor: (0, _theme.getThemeNavigationBarTextColor)(theme)
|
|
55
|
+
};
|
|
56
|
+
}
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
getLogoThemeStyle(theme) {
|
|
59
|
+
return {
|
|
60
|
+
padding: (0, _theme.getThemeLogoPadding)(theme)
|
|
59
61
|
};
|
|
60
|
-
return _this;
|
|
61
62
|
}
|
|
62
63
|
|
|
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) {
|
|
64
|
+
renderPrimaryList() {
|
|
65
|
+
let items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.primaryListItems;
|
|
66
|
+
let iteration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
67
|
+
const listItemThemeStyle = this.getListItemThemeStyle(this.props.theme);
|
|
68
|
+
let listItems = items.map((listItem, i) => {
|
|
69
|
+
let key = iteration + '-' + i;
|
|
70
|
+
|
|
71
|
+
if (listItem.listItems !== undefined) {
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
73
|
+
key: key
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
75
|
+
style: listItemThemeStyle
|
|
76
|
+
}, listItem.name), this.renderPrimaryList(listItem.listItems, iteration + 1));
|
|
77
|
+
} else {
|
|
137
78
|
return /*#__PURE__*/_react.default.createElement(_NavigationBarListItem.default, {
|
|
138
79
|
listItem: listItem,
|
|
139
|
-
key:
|
|
140
|
-
theme:
|
|
80
|
+
key: key,
|
|
81
|
+
theme: this.props.theme
|
|
141
82
|
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
86
|
+
className: _NavigationBarModule.default.primaryList
|
|
87
|
+
}, listItems);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
renderSecondaryList() {
|
|
91
|
+
let listItems = this.props.secondaryListItems.map((listItem, i) => {
|
|
92
|
+
return /*#__PURE__*/_react.default.createElement(_NavigationBarListItem.default, {
|
|
93
|
+
listItem: listItem,
|
|
94
|
+
key: i,
|
|
95
|
+
theme: this.props.theme
|
|
142
96
|
});
|
|
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
|
-
className: "".concat(_NavigationBarModule.default.dropdownOverlay, " ").concat(this.state.active ? _NavigationBarModule.default.active : '')
|
|
209
|
-
})));
|
|
210
|
-
}
|
|
211
|
-
}]);
|
|
212
|
-
|
|
213
|
-
return NavigationBar;
|
|
214
|
-
}(_react.default.Component);
|
|
97
|
+
});
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
99
|
+
className: _NavigationBarModule.default.secondaryList
|
|
100
|
+
}, listItems);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
renderLogo(logoLink) {
|
|
104
|
+
const themeLogo = (0, _theme.getThemeLogo)(this.props.theme);
|
|
105
|
+
const themeAppName = (0, _theme.getThemeAppName)(this.props.theme);
|
|
106
|
+
const logoElement = themeLogo && themeAppName ? /*#__PURE__*/_react.default.createElement("img", {
|
|
107
|
+
alt: "".concat(themeAppName, " logo"),
|
|
108
|
+
src: themeLogo,
|
|
109
|
+
style: this.getLogoThemeStyle(this.props.theme)
|
|
110
|
+
}) : /*#__PURE__*/_react.default.createElement("img", {
|
|
111
|
+
alt: "DIBK logo",
|
|
112
|
+
src: _dibkLogoMobile.default
|
|
113
|
+
});
|
|
114
|
+
const logoLinkProps = {
|
|
115
|
+
target: this.props.openLogoLinkInNewTab ? '_blank' : null,
|
|
116
|
+
rel: this.props.openLogoLinkInNewTab ? 'noopener noreferrer' : null
|
|
117
|
+
};
|
|
118
|
+
return logoLink && logoLink.length ? /*#__PURE__*/_react.default.createElement("a", _extends({}, logoLinkProps, {
|
|
119
|
+
href: logoLink
|
|
120
|
+
}), logoElement) : logoElement;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
render() {
|
|
124
|
+
const navigationBarThemeStyle = this.getNavigationBarThemeStyle(this.props.theme);
|
|
125
|
+
const hamburgerIconLineStyle = {
|
|
126
|
+
backgroundColor: (0, _theme.getThemeNavigationBarTextColor)(this.props.theme)
|
|
127
|
+
};
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement("header", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
129
|
+
className: _NavigationBarModule.default.isPresent
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
131
|
+
className: _NavigationBarModule.default.navigationBar,
|
|
132
|
+
style: navigationBarThemeStyle
|
|
133
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
134
|
+
className: _NavigationBarModule.default.logoContainer
|
|
135
|
+
}, this.renderLogo(this.props.logoLink)), this.props.children ? /*#__PURE__*/_react.default.createElement("div", {
|
|
136
|
+
className: _NavigationBarModule.default.childElements
|
|
137
|
+
}, this.props.children) : '', this.props.primaryListItems && this.props.primaryListItems.length || this.props.secondaryListItems && this.props.secondaryListItems.length ? /*#__PURE__*/_react.default.createElement("button", {
|
|
138
|
+
className: "".concat(_NavigationBarModule.default.menuToggle, " ").concat(this.state.active ? _NavigationBarModule.default.active : ''),
|
|
139
|
+
onClick: () => this.toggleList()
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
141
|
+
className: _NavigationBarModule.default.hamburgerIcon
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
143
|
+
className: _NavigationBarModule.default.line,
|
|
144
|
+
style: hamburgerIconLineStyle
|
|
145
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
146
|
+
className: _NavigationBarModule.default.line,
|
|
147
|
+
style: hamburgerIconLineStyle
|
|
148
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
149
|
+
className: _NavigationBarModule.default.line,
|
|
150
|
+
style: hamburgerIconLineStyle
|
|
151
|
+
}))) : ''), /*#__PURE__*/_react.default.createElement("div", {
|
|
152
|
+
className: "".concat(_NavigationBarModule.default.dropdownContainer, " ").concat(this.state.active ? _NavigationBarModule.default.active : '')
|
|
153
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
154
|
+
className: _NavigationBarModule.default.dropdown,
|
|
155
|
+
style: navigationBarThemeStyle
|
|
156
|
+
}, this.renderPrimaryList(), this.renderSecondaryList(), this.props.children)), /*#__PURE__*/_react.default.createElement("div", {
|
|
157
|
+
className: "".concat(_NavigationBarModule.default.dropdownOverlay, " ").concat(this.state.active ? _NavigationBarModule.default.active : '')
|
|
158
|
+
})));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
}
|
|
215
162
|
|
|
216
163
|
NavigationBar.propTypes = {
|
|
217
164
|
/** Main links in navigation bar */
|
|
@@ -13,69 +13,32 @@ var _theme = require("../functions/theme");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
23
|
-
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
|
-
|
|
28
|
-
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); }; }
|
|
29
|
-
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
-
|
|
34
|
-
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; } }
|
|
35
|
-
|
|
36
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
-
|
|
38
|
-
var NavigationBarListItem = /*#__PURE__*/function (_React$Component) {
|
|
39
|
-
_inherits(NavigationBarListItem, _React$Component);
|
|
40
|
-
|
|
41
|
-
var _super = _createSuper(NavigationBarListItem);
|
|
42
|
-
|
|
43
|
-
function NavigationBarListItem() {
|
|
44
|
-
_classCallCheck(this, NavigationBarListItem);
|
|
45
|
-
|
|
46
|
-
return _super.apply(this, arguments);
|
|
16
|
+
class NavigationBarListItem extends _react.default.Component {
|
|
17
|
+
getListItemThemeStyle(theme) {
|
|
18
|
+
return {
|
|
19
|
+
color: (0, _theme.getThemeNavigationBarTextColor)(theme),
|
|
20
|
+
borderBottomColor: (0, _theme.getThemeNavigationBarTextColor)(theme)
|
|
21
|
+
};
|
|
47
22
|
}
|
|
48
23
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("span", {
|
|
64
|
-
style: listItemThemeStyle
|
|
65
|
-
}, this.props.listItem));
|
|
66
|
-
} else if (_typeof(this.props.listItem) === 'object') {
|
|
67
|
-
return /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
68
|
-
href: this.props.listItem.href,
|
|
69
|
-
style: listItemThemeStyle
|
|
70
|
-
}, this.props.listItem.name));
|
|
71
|
-
} else {
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
24
|
+
render() {
|
|
25
|
+
const listItemThemeStyle = this.getListItemThemeStyle(this.props.theme);
|
|
26
|
+
|
|
27
|
+
if (typeof this.props.listItem === 'string') {
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("span", {
|
|
29
|
+
style: listItemThemeStyle
|
|
30
|
+
}, this.props.listItem));
|
|
31
|
+
} else if (typeof this.props.listItem === 'object') {
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
33
|
+
href: this.props.listItem.href,
|
|
34
|
+
style: listItemThemeStyle
|
|
35
|
+
}, this.props.listItem.name));
|
|
36
|
+
} else {
|
|
37
|
+
return null;
|
|
74
38
|
}
|
|
75
|
-
}
|
|
39
|
+
}
|
|
76
40
|
|
|
77
|
-
|
|
78
|
-
}(_react.default.Component);
|
|
41
|
+
}
|
|
79
42
|
|
|
80
43
|
NavigationBarListItem.propTypes = {
|
|
81
44
|
listItem: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]),
|
package/dist/components/Paper.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
|
});
|
|
@@ -15,48 +13,14 @@ var _PaperModule = _interopRequireDefault(require("./Paper.module.scss"));
|
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
|
-
|
|
28
|
-
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); }; }
|
|
29
|
-
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
-
|
|
34
|
-
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; } }
|
|
35
|
-
|
|
36
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
-
|
|
38
|
-
var Paper = /*#__PURE__*/function (_React$Component) {
|
|
39
|
-
_inherits(Paper, _React$Component);
|
|
40
|
-
|
|
41
|
-
var _super = _createSuper(Paper);
|
|
42
|
-
|
|
43
|
-
function Paper() {
|
|
44
|
-
_classCallCheck(this, Paper);
|
|
45
|
-
|
|
46
|
-
return _super.apply(this, arguments);
|
|
16
|
+
class Paper extends _react.default.Component {
|
|
17
|
+
render() {
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
|
+
className: "".concat(_PaperModule.default.paper, " ").concat(this.props.noMargin ? _PaperModule.default.noMargin : '', " ").concat(this.props.noPadding ? _PaperModule.default.noPadding : '')
|
|
20
|
+
}, this.props.children);
|
|
47
21
|
}
|
|
48
22
|
|
|
49
|
-
|
|
50
|
-
key: "render",
|
|
51
|
-
value: function render() {
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
53
|
-
className: "".concat(_PaperModule.default.paper, " ").concat(this.props.noMargin ? _PaperModule.default.noMargin : '', " ").concat(this.props.noPadding ? _PaperModule.default.noPadding : '')
|
|
54
|
-
}, this.props.children);
|
|
55
|
-
}
|
|
56
|
-
}]);
|
|
57
|
-
|
|
58
|
-
return Paper;
|
|
59
|
-
}(_react.default.Component);
|
|
23
|
+
}
|
|
60
24
|
|
|
61
25
|
;
|
|
62
26
|
Paper.propTypes = {
|
|
@@ -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,67 +15,27 @@ var _RadioButtonIconModule = _interopRequireDefault(require("./RadioButtonIcon.m
|
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
-
|
|
36
|
-
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); }; }
|
|
37
|
-
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
41
|
-
|
|
42
|
-
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; } }
|
|
43
|
-
|
|
44
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
|
-
|
|
46
|
-
var RadioButtonIcon = /*#__PURE__*/function (_React$Component) {
|
|
47
|
-
_inherits(RadioButtonIcon, _React$Component);
|
|
48
|
-
|
|
49
|
-
var _super = _createSuper(RadioButtonIcon);
|
|
50
|
-
|
|
51
|
-
function RadioButtonIcon() {
|
|
52
|
-
_classCallCheck(this, RadioButtonIcon);
|
|
53
|
-
|
|
54
|
-
return _super.apply(this, arguments);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
_createClass(RadioButtonIcon, [{
|
|
58
|
-
key: "render",
|
|
59
|
-
value: function render() {
|
|
60
|
-
var inlineStyle = {
|
|
61
|
-
height: this.props.size,
|
|
62
|
-
width: this.props.size
|
|
18
|
+
class RadioButtonIcon extends _react.default.Component {
|
|
19
|
+
render() {
|
|
20
|
+
let inlineStyle = {
|
|
21
|
+
height: this.props.size,
|
|
22
|
+
width: this.props.size
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
if (this.props.theme && this.props.checked) {
|
|
26
|
+
inlineStyle = { ...inlineStyle,
|
|
27
|
+
background: (0, _theme.getThemePaletteBackgroundColor)(this.props.theme, 'primary'),
|
|
28
|
+
boxShadow: "0 0 0 1px ".concat((0, _theme.getThemePaletteBackgroundColor)(this.props.theme, 'primary'))
|
|
63
29
|
};
|
|
64
|
-
|
|
65
|
-
if (this.props.theme && this.props.checked) {
|
|
66
|
-
inlineStyle = _objectSpread(_objectSpread({}, inlineStyle), {}, {
|
|
67
|
-
background: (0, _theme.getThemePaletteBackgroundColor)(this.props.theme, 'primary'),
|
|
68
|
-
boxShadow: "0 0 0 1px ".concat((0, _theme.getThemePaletteBackgroundColor)(this.props.theme, 'primary'))
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
73
|
-
className: "".concat(_RadioButtonIconModule.default.radioButtonIcon, " ").concat(this.props.checked ? _RadioButtonIconModule.default.checked : ''),
|
|
74
|
-
style: inlineStyle
|
|
75
|
-
});
|
|
76
30
|
}
|
|
77
|
-
}]);
|
|
78
31
|
|
|
79
|
-
|
|
80
|
-
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
33
|
+
className: "".concat(_RadioButtonIconModule.default.radioButtonIcon, " ").concat(this.props.checked ? _RadioButtonIconModule.default.checked : ''),
|
|
34
|
+
style: inlineStyle
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|
|
81
39
|
|
|
82
40
|
RadioButtonIcon.propTypes = {
|
|
83
41
|
size: _propTypes.default.string,
|