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,67 +1,67 @@
|
|
|
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
|
-
&:not(:local(.contentOnly)):not(:local(.compact)) {
|
|
22
|
-
@include box-shadow(0 0 2px $color-dark-blue);
|
|
23
|
-
background: white;
|
|
24
|
-
margin-bottom: 10px;
|
|
25
|
-
}
|
|
3
|
+
.checkBoxListItem {
|
|
4
|
+
@include box-sizing(content-box);
|
|
5
|
+
@include border-radius(5px);
|
|
6
|
+
@include transition(all 0.1s ease-in-out);
|
|
7
|
+
display: -webkit-box;
|
|
8
|
+
display: -webkit-flex;
|
|
9
|
+
display: -ms-flexbox;
|
|
10
|
+
display: flex;
|
|
11
|
+
-webkit-align-items: flex-start;
|
|
12
|
+
-webkit-box-align: flex-start;
|
|
13
|
+
-ms-flex-align: flex-start;
|
|
14
|
+
align-items: flex-start;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
font-family: $default-font;
|
|
17
|
+
position: relative;
|
|
18
|
+
font-size: 17px;
|
|
19
|
+
color: #000;
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
padding: 5px 10px;
|
|
21
|
+
&:not(.contentOnly):not(.compact) {
|
|
22
|
+
@include box-shadow(0 0 2px $color-dark-blue);
|
|
23
|
+
background: white;
|
|
24
|
+
margin-bottom: 10px;
|
|
32
25
|
}
|
|
33
|
-
}
|
|
34
26
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
&.contentOnly {
|
|
28
|
+
cursor: auto;
|
|
29
|
+
label {
|
|
30
|
+
cursor: auto;
|
|
31
|
+
padding: 5px 10px;
|
|
32
|
+
}
|
|
38
33
|
}
|
|
39
|
-
}
|
|
40
34
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
&.disabled {
|
|
36
|
+
label {
|
|
37
|
+
cursor: auto;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
&.checked:not(.contentOnly):not(.compact):not(.disabled) {
|
|
42
|
+
@include box-shadow(0 0 0 1px $color-dark-blue, 0 0 4px 0 $color-dark-blue);
|
|
43
|
+
}
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
margin: 0;
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
}
|
|
45
|
+
&:not(.checked):not(.contentOnly):not(.compact):not(.disabled):hover {
|
|
46
|
+
@include box-shadow(0 0 6px $color-dark-blue);
|
|
47
|
+
}
|
|
55
48
|
|
|
56
|
-
&:local(.compact) {
|
|
57
|
-
display: table;
|
|
58
49
|
label {
|
|
59
|
-
|
|
50
|
+
width: 100%;
|
|
51
|
+
padding: 10px;
|
|
52
|
+
margin: 0;
|
|
53
|
+
cursor: pointer;
|
|
60
54
|
}
|
|
61
|
-
}
|
|
62
55
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
&.compact {
|
|
57
|
+
display: table;
|
|
58
|
+
label {
|
|
59
|
+
padding: 6px 4px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
input[type="checkbox"] {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
position: absolute;
|
|
66
|
+
}
|
|
67
67
|
}
|
|
@@ -1,64 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
7
|
|
|
10
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
10
|
var _ContainerModule = _interopRequireDefault(require("./Container.module.scss"));
|
|
13
11
|
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
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); } }
|
|
23
|
-
|
|
24
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
-
|
|
26
|
-
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
|
-
|
|
28
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
-
|
|
30
|
-
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); }; }
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
|
-
|
|
36
|
-
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; } }
|
|
37
|
-
|
|
38
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
-
|
|
40
|
-
var Container = /*#__PURE__*/function (_Component) {
|
|
41
|
-
_inherits(Container, _Component);
|
|
42
|
-
|
|
43
|
-
var _super = _createSuper(Container);
|
|
44
|
-
|
|
45
|
-
function Container() {
|
|
46
|
-
_classCallCheck(this, Container);
|
|
47
|
-
|
|
48
|
-
return _super.apply(this, arguments);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
_createClass(Container, [{
|
|
52
|
-
key: "render",
|
|
53
|
-
value: function render() {
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
-
className: _ContainerModule.default.container
|
|
56
|
-
}, this.props.children);
|
|
57
|
-
}
|
|
58
|
-
}]);
|
|
59
|
-
|
|
60
|
-
return Container;
|
|
61
|
-
}(_react.Component);
|
|
14
|
+
var Container = function Container(props) {
|
|
15
|
+
return _react.default.createElement("div", {
|
|
16
|
+
className: _ContainerModule.default.container
|
|
17
|
+
}, props.children);
|
|
18
|
+
};
|
|
62
19
|
|
|
63
20
|
var _default = Container;
|
|
64
21
|
exports.default = _default;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -15,92 +13,55 @@ var _ContentBoxModule = _interopRequireDefault(require("./ContentBox.module.scss
|
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
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); } }
|
|
21
|
-
|
|
22
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); 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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
|
-
|
|
26
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : 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.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
-
|
|
38
|
-
var ContentBox = /*#__PURE__*/function (_React$Component) {
|
|
39
|
-
_inherits(ContentBox, _React$Component);
|
|
16
|
+
var ContentBox = function ContentBox(props) {
|
|
17
|
+
var _props$content;
|
|
40
18
|
|
|
41
|
-
var
|
|
19
|
+
var renderTitle = function renderTitle() {
|
|
20
|
+
var className = _ContentBoxModule.default.title + " " + _ContentBoxModule.default[props.titleSize];
|
|
42
21
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
_createClass(ContentBox, [{
|
|
50
|
-
key: "renderTitle",
|
|
51
|
-
value: function renderTitle() {
|
|
52
|
-
var className = _ContentBoxModule.default.title + " " + _ContentBoxModule.default[this.props.titleSize];
|
|
53
|
-
|
|
54
|
-
if (this.props.title) {
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement("h2", {
|
|
56
|
-
className: className
|
|
57
|
-
}, this.props.title);
|
|
58
|
-
} else {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}, {
|
|
63
|
-
key: "render",
|
|
64
|
-
value: function render() {
|
|
65
|
-
var colorClass = " " + _ContentBoxModule.default[this.props.color];
|
|
66
|
-
var linkClass = this.props.href ? " " + _ContentBoxModule.default.link : "";
|
|
67
|
-
var className = _ContentBoxModule.default.contentBox + colorClass + linkClass;
|
|
68
|
-
|
|
69
|
-
if (this.props.href) {
|
|
70
|
-
return /*#__PURE__*/_react.default.createElement("a", {
|
|
71
|
-
href: this.props.href,
|
|
72
|
-
className: className
|
|
73
|
-
}, this.renderTitle(), /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
-
className: _ContentBoxModule.default.content
|
|
75
|
-
}, this.props.content));
|
|
76
|
-
} else {
|
|
77
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
-
className: className
|
|
79
|
-
}, this.renderTitle(), /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
-
className: _ContentBoxModule.default.content
|
|
81
|
-
}, this.props.content));
|
|
82
|
-
}
|
|
22
|
+
if (props.title) {
|
|
23
|
+
return _react.default.createElement("h2", {
|
|
24
|
+
className: className
|
|
25
|
+
}, props.title);
|
|
26
|
+
} else {
|
|
27
|
+
return;
|
|
83
28
|
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var colorClass = " " + _ContentBoxModule.default[props.color];
|
|
32
|
+
var linkClass = props.href ? " " + _ContentBoxModule.default.link : "";
|
|
33
|
+
var className = _ContentBoxModule.default.contentBox + colorClass + linkClass;
|
|
34
|
+
var bodyContent = (_props$content = props.content) !== null && _props$content !== void 0 && _props$content.length ? props.content : props.children;
|
|
35
|
+
|
|
36
|
+
if (props.href) {
|
|
37
|
+
return _react.default.createElement("a", {
|
|
38
|
+
href: props.href,
|
|
39
|
+
className: className
|
|
40
|
+
}, renderTitle(), _react.default.createElement("div", {
|
|
41
|
+
className: _ContentBoxModule.default.content
|
|
42
|
+
}, bodyContent));
|
|
43
|
+
} else {
|
|
44
|
+
return _react.default.createElement("div", {
|
|
45
|
+
className: className
|
|
46
|
+
}, renderTitle(), _react.default.createElement("div", {
|
|
47
|
+
className: _ContentBoxModule.default.content
|
|
48
|
+
}, bodyContent));
|
|
49
|
+
}
|
|
50
|
+
};
|
|
88
51
|
|
|
89
52
|
ContentBox.propTypes = {
|
|
90
|
-
/** Content title inside box */
|
|
91
53
|
title: _propTypes.default.string,
|
|
92
|
-
titleSize: _propTypes.default.oneOf([
|
|
93
|
-
|
|
94
|
-
/** Text content inside box */
|
|
54
|
+
titleSize: _propTypes.default.oneOf(["regular", "large"]),
|
|
95
55
|
content: _propTypes.default.string,
|
|
96
|
-
|
|
56
|
+
children: _propTypes.default.any,
|
|
57
|
+
color: _propTypes.default.oneOf(["default", "primary", "success", "warning", "info", "lightCyan", "orange", "lightOrange", "lime", "lightLime"])
|
|
97
58
|
};
|
|
98
59
|
ContentBox.defaultProps = {
|
|
99
60
|
title: null,
|
|
100
|
-
titleSize:
|
|
61
|
+
titleSize: "regular",
|
|
101
62
|
href: null,
|
|
102
|
-
content:
|
|
103
|
-
color:
|
|
63
|
+
content: "",
|
|
64
|
+
color: "default"
|
|
104
65
|
};
|
|
105
66
|
var _default = ContentBox;
|
|
106
67
|
exports.default = _default;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
@import "../style/global.scss";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
.contentBox {
|
|
4
4
|
font-family: $default-font;
|
|
5
5
|
text-decoration: none;
|
|
6
6
|
padding: 20px;
|
|
7
7
|
width: 100%;
|
|
8
8
|
display: block;
|
|
9
|
-
|
|
9
|
+
&.link {
|
|
10
10
|
color: $color-primary;
|
|
11
11
|
@include transition(filter 0.3s);
|
|
12
12
|
&:hover,
|
|
@@ -17,85 +17,85 @@
|
|
|
17
17
|
filter: brightness(85%);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
&.default {
|
|
21
21
|
background-color: $color-default;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
.content,
|
|
23
|
+
.title {
|
|
24
24
|
color: #000;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
&.primary {
|
|
28
28
|
background-color: $color-primary;
|
|
29
29
|
color: #fff;
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
.content,
|
|
31
|
+
.title {
|
|
32
32
|
color: #fff;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
&.success {
|
|
36
36
|
background-color: $color-success;
|
|
37
37
|
color: #fff;
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
.content,
|
|
39
|
+
.title {
|
|
40
40
|
color: #fff;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
&.warning {
|
|
44
44
|
background-color: $color-warning;
|
|
45
45
|
color: #fff;
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
.content,
|
|
47
|
+
.title {
|
|
48
48
|
color: #fff;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
&.info {
|
|
53
53
|
background-color: $color-info;
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
.content,
|
|
55
|
+
.title {
|
|
56
56
|
color: #000;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
&.lightCyan {
|
|
60
60
|
background-color: $color-light-cyan;
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
.content,
|
|
62
|
+
.title {
|
|
63
63
|
color: #000;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
&.orange {
|
|
67
67
|
background-color: $color-orange;
|
|
68
68
|
color: #fff;
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
.content,
|
|
70
|
+
.title {
|
|
71
71
|
color: #fff;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
&.lightOrange {
|
|
75
75
|
background-color: $color-light-orange;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
.content,
|
|
77
|
+
.title {
|
|
78
78
|
color: #000;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
|
|
81
|
+
&.lime {
|
|
82
82
|
background-color: $color-lime;
|
|
83
83
|
color: #fff;
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
.content,
|
|
85
|
+
.title {
|
|
86
86
|
color: #fff;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
&.lightLime {
|
|
90
90
|
background-color: $color-light-lime;
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
.content,
|
|
92
|
+
.title {
|
|
93
93
|
color: #000;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
.title {
|
|
98
|
+
&.regular {
|
|
99
99
|
font-family: $default-font;
|
|
100
100
|
font-weight: bold;
|
|
101
101
|
font-size: 21px;
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
padding-bottom: 10px;
|
|
105
105
|
border-bottom: 1px solid #e5e3e1;
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
&.large {
|
|
108
108
|
font-family: $default-font;
|
|
109
109
|
font-weight: normal;
|
|
110
110
|
font-size: 24px;
|
|
@@ -7,7 +7,7 @@ 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
|
|
|
@@ -15,130 +15,62 @@ var _DialogModule = _interopRequireDefault(require("./Dialog.module.scss"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
function
|
|
18
|
+
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); }
|
|
19
19
|
|
|
20
|
-
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; }
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
-
|
|
38
|
-
var Dialog = /*#__PURE__*/function (_React$Component) {
|
|
39
|
-
_inherits(Dialog, _React$Component);
|
|
40
|
-
|
|
41
|
-
var _super = _createSuper(Dialog);
|
|
42
|
-
|
|
43
|
-
function Dialog(props) {
|
|
44
|
-
var _this;
|
|
45
|
-
|
|
46
|
-
_classCallCheck(this, Dialog);
|
|
47
|
-
|
|
48
|
-
_this = _super.call(this, props);
|
|
49
|
-
_this.state = {};
|
|
50
|
-
_this.setWrapperRef = _this.setWrapperRef.bind(_assertThisInitialized(_this));
|
|
51
|
-
_this.setHiddenInputWrapperRef = _this.setHiddenInputWrapperRef.bind(_assertThisInitialized(_this));
|
|
52
|
-
_this.handleClickOutside = _this.handleClickOutside.bind(_assertThisInitialized(_this));
|
|
53
|
-
_this.keyDownFunction = _this.keyDownFunction.bind(_assertThisInitialized(_this));
|
|
54
|
-
return _this;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
_createClass(Dialog, [{
|
|
58
|
-
key: "componentDidMount",
|
|
59
|
-
value: function componentDidMount() {
|
|
60
|
-
document.addEventListener('mousedown', this.handleClickOutside);
|
|
61
|
-
document.addEventListener("keydown", this.keyDownFunction, false);
|
|
62
|
-
this.hiddenInputWrapperRef.tabIndex = -1;
|
|
63
|
-
}
|
|
64
|
-
}, {
|
|
65
|
-
key: "componentWillUnmount",
|
|
66
|
-
value: function componentWillUnmount() {
|
|
67
|
-
document.removeEventListener('mousedown', this.handleClickOutside);
|
|
68
|
-
document.removeEventListener("keydown", this.keyDownFunction, false);
|
|
69
|
-
}
|
|
70
|
-
}, {
|
|
71
|
-
key: "keyDownFunction",
|
|
72
|
-
value: function keyDownFunction(event) {
|
|
22
|
+
var Dialog = function Dialog(props) {
|
|
23
|
+
var wrapperRef = (0, _react.useRef)();
|
|
24
|
+
var hiddenInputWrapperRef = (0, _react.useRef)();
|
|
25
|
+
(0, _react.useEffect)(function () {
|
|
26
|
+
var keyDownFunction = function keyDownFunction(event) {
|
|
73
27
|
switch (event.keyCode) {
|
|
74
28
|
case 27:
|
|
75
|
-
|
|
76
|
-
if (this.props.onClickOutside) this.props.onClickOutside();
|
|
29
|
+
if (props.onClickOutside) props.onClickOutside();
|
|
77
30
|
break;
|
|
78
31
|
|
|
79
32
|
default:
|
|
80
33
|
return null;
|
|
81
34
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
key: "setHiddenInputWrapperRef",
|
|
90
|
-
value: function setHiddenInputWrapperRef(node) {
|
|
91
|
-
this.hiddenInputWrapperRef = node;
|
|
92
|
-
}
|
|
93
|
-
}, {
|
|
94
|
-
key: "handleClickOutside",
|
|
95
|
-
value: function handleClickOutside(event) {
|
|
96
|
-
if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {
|
|
97
|
-
this.props.onClickOutside();
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
38
|
+
if (wrapperRef !== null && wrapperRef !== void 0 && wrapperRef.current && !wrapperRef.current.contains(event.target)) {
|
|
39
|
+
props.onClickOutside();
|
|
98
40
|
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
44
|
+
document.addEventListener("keydown", keyDownFunction, false);
|
|
45
|
+
hiddenInputWrapperRef.current.tabIndex = -1;
|
|
46
|
+
}, [props]);
|
|
47
|
+
return _react.default.createElement("div", {
|
|
48
|
+
className: "".concat(_DialogModule.default.dialogOverlay, " ").concat(props.hidden && _DialogModule.default.hidden)
|
|
49
|
+
}, _react.default.createElement("div", {
|
|
50
|
+
ref: wrapperRef,
|
|
51
|
+
className: "".concat(_DialogModule.default.dialogContent, " ").concat(props.noPadding ? _DialogModule.default.noPadding : ""),
|
|
52
|
+
style: {
|
|
53
|
+
maxWidth: props.maxWidth
|
|
99
54
|
}
|
|
100
|
-
}, {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
}, this.props.closeButton ? /*#__PURE__*/_react.default.createElement("button", {
|
|
112
|
-
onClick: this.props.onClickOutside,
|
|
113
|
-
className: _DialogModule.default.closeButton
|
|
114
|
-
}) : '', /*#__PURE__*/_react.default.createElement("input", {
|
|
115
|
-
type: "button",
|
|
116
|
-
ref: this.setHiddenInputWrapperRef,
|
|
117
|
-
className: _DialogModule.default.hidden,
|
|
118
|
-
autoFocus: true
|
|
119
|
-
}), this.props.children));
|
|
120
|
-
}
|
|
121
|
-
}]);
|
|
122
|
-
|
|
123
|
-
return Dialog;
|
|
124
|
-
}(_react.default.Component);
|
|
55
|
+
}, props.closeButton ? _react.default.createElement("button", {
|
|
56
|
+
onClick: props.onClickOutside,
|
|
57
|
+
className: _DialogModule.default.closeButton
|
|
58
|
+
}) : "", _react.default.createElement("input", {
|
|
59
|
+
type: "button",
|
|
60
|
+
ref: hiddenInputWrapperRef,
|
|
61
|
+
className: _DialogModule.default.hidden,
|
|
62
|
+
autoFocus: true
|
|
63
|
+
}), props.children));
|
|
64
|
+
};
|
|
125
65
|
|
|
126
|
-
;
|
|
127
66
|
Dialog.propTypes = {
|
|
128
|
-
/** Sets max width for modal content element */
|
|
129
67
|
maxWidth: _propTypes.default.string,
|
|
130
|
-
|
|
131
|
-
/** Removes padding from modal content element */
|
|
132
68
|
noPadding: _propTypes.default.bool,
|
|
133
|
-
|
|
134
|
-
/** Displays close button in upper right corner */
|
|
135
69
|
closeButton: _propTypes.default.bool,
|
|
136
|
-
|
|
137
|
-
/** Function for click outside modal content element or click on close button element */
|
|
138
70
|
onClickOutside: _propTypes.default.func.isRequired
|
|
139
71
|
};
|
|
140
72
|
Dialog.defaultProps = {
|
|
141
|
-
maxWidth:
|
|
73
|
+
maxWidth: "none"
|
|
142
74
|
};
|
|
143
75
|
var _default = Dialog;
|
|
144
76
|
exports.default = _default;
|