dibk-design 0.4.21 → 0.4.25
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/Accordion.module.scss +3 -2
- 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 +84 -134
- package/dist/components/Footer.js +8 -44
- package/dist/components/Header.js +11 -47
- package/dist/components/InputField.js +90 -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/dist/style/abstracts/variables/_typography.scss +2 -1
- 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
|
});
|
|
@@ -17,55 +15,22 @@ var _CheckBoxInput = _interopRequireDefault(require("./CheckBoxInput"));
|
|
|
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
|
-
|
|
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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
-
|
|
40
|
-
var CheckBoxListItem = /*#__PURE__*/function (_React$Component) {
|
|
41
|
-
_inherits(CheckBoxListItem, _React$Component);
|
|
42
|
-
|
|
43
|
-
var _super = _createSuper(CheckBoxListItem);
|
|
44
|
-
|
|
45
|
-
function CheckBoxListItem() {
|
|
46
|
-
_classCallCheck(this, CheckBoxListItem);
|
|
47
|
-
|
|
48
|
-
return _super.apply(this, arguments);
|
|
18
|
+
class CheckBoxListItem extends _react.default.Component {
|
|
19
|
+
render() {
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
+
className: "".concat(_CheckBoxListItemModule.default.checkBoxListItem, " ").concat(this.props.checked ? _CheckBoxListItemModule.default.checked : '', " ").concat(this.props.contentOnly ? _CheckBoxListItemModule.default.contentOnly : '', " ").concat(this.props.compact ? _CheckBoxListItemModule.default.compact : '', " ").concat(this.props.hasErrors ? _CheckBoxListItemModule.default.hasErrors : '')
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement(_CheckBoxInput.default, {
|
|
23
|
+
onChange: this.props.onChange,
|
|
24
|
+
checked: this.props.checked,
|
|
25
|
+
contentOnly: this.props.contentOnly,
|
|
26
|
+
hasErrors: this.props.hasErrors,
|
|
27
|
+
id: this.props.id,
|
|
28
|
+
theme: this.props.theme,
|
|
29
|
+
checkmarkCharacter: this.props.checkmarkCharacter
|
|
30
|
+
}, this.props.children));
|
|
49
31
|
}
|
|
50
32
|
|
|
51
|
-
|
|
52
|
-
key: "render",
|
|
53
|
-
value: function render() {
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
-
className: "".concat(_CheckBoxListItemModule.default.checkBoxListItem, " ").concat(this.props.checked ? _CheckBoxListItemModule.default.checked : '', " ").concat(this.props.contentOnly ? _CheckBoxListItemModule.default.contentOnly : '', " ").concat(this.props.compact ? _CheckBoxListItemModule.default.compact : '', " ").concat(this.props.hasErrors ? _CheckBoxListItemModule.default.hasErrors : '')
|
|
56
|
-
}, /*#__PURE__*/_react.default.createElement(_CheckBoxInput.default, {
|
|
57
|
-
onChange: this.props.onChange,
|
|
58
|
-
checked: this.props.checked,
|
|
59
|
-
contentOnly: this.props.contentOnly,
|
|
60
|
-
hasErrors: this.props.hasErrors,
|
|
61
|
-
id: this.props.id,
|
|
62
|
-
theme: this.props.theme
|
|
63
|
-
}, this.props.children));
|
|
64
|
-
}
|
|
65
|
-
}]);
|
|
66
|
-
|
|
67
|
-
return CheckBoxListItem;
|
|
68
|
-
}(_react.default.Component);
|
|
33
|
+
}
|
|
69
34
|
|
|
70
35
|
CheckBoxListItem.propTypes = {
|
|
71
36
|
/** Text content inside list item */
|
|
@@ -76,14 +41,16 @@ CheckBoxListItem.propTypes = {
|
|
|
76
41
|
contentOnly: _propTypes.default.bool,
|
|
77
42
|
theme: _propTypes.default.object,
|
|
78
43
|
compact: _propTypes.default.bool,
|
|
79
|
-
hasErrors: _propTypes.default.bool
|
|
44
|
+
hasErrors: _propTypes.default.bool,
|
|
45
|
+
checkmarkCharacter: _propTypes.default.string
|
|
80
46
|
};
|
|
81
47
|
CheckBoxListItem.defaultProps = {
|
|
82
48
|
checked: false,
|
|
83
49
|
id: '',
|
|
84
50
|
name: '',
|
|
85
51
|
contentOnly: false,
|
|
86
|
-
hasErrors: false
|
|
52
|
+
hasErrors: false,
|
|
53
|
+
checkmarkCharacter: '✔'
|
|
87
54
|
};
|
|
88
55
|
var _default = CheckBoxListItem;
|
|
89
56
|
exports.default = _default;
|
|
@@ -13,6 +13,9 @@ Check box list item example:
|
|
|
13
13
|
<CheckBoxListItem onChange={()=>{console.log('onchange')}} name="checkbox" id="checkboxListItem-4" contentOnly={true}>
|
|
14
14
|
Label for unchecked checkbox with content only
|
|
15
15
|
</CheckBoxListItem>
|
|
16
|
+
<CheckBoxListItem onChange={()=>{console.log('onchange')}} checked={true} name="checkbox" id="checkboxListItem-5" checkmarkCharacter="✕">
|
|
17
|
+
Label for checked checkbox with custom checkmark
|
|
18
|
+
</CheckBoxListItem>
|
|
16
19
|
```
|
|
17
20
|
|
|
18
21
|
Compact check box list item example:
|
|
@@ -36,6 +39,9 @@ Compact check box list item example:
|
|
|
36
39
|
<CheckBoxListItem onChange={()=>{console.log('onchange')}} name="checkbox" id="compact-checkboxListItem-4" compact hasErrors>
|
|
37
40
|
Label for unchecked checkbox with content only
|
|
38
41
|
</CheckBoxListItem>
|
|
42
|
+
<CheckBoxListItem onChange={()=>{console.log('onchange')}} checked={true} name="checkbox" id="compact-checkboxListItem-5" compact checkmarkCharacter="✕">
|
|
43
|
+
Label for checked checkbox with custom checkmark
|
|
44
|
+
</CheckBoxListItem>
|
|
39
45
|
```
|
|
40
46
|
|
|
41
47
|
Themed Check box list item example:
|
|
@@ -54,5 +60,8 @@ import customTheme from 'data/customTheme';
|
|
|
54
60
|
<CheckBoxListItem onChange={()=>{console.log('onchange')}} name="themed-checkbox" id="themed-checkboxListItem-4" contentOnly={true} theme={customTheme}>
|
|
55
61
|
Label for unchecked checkbox with content only
|
|
56
62
|
</CheckBoxListItem>
|
|
63
|
+
<CheckBoxListItem onChange={()=>{console.log('onchange')}} checked={true} name="themed-checkbox" id="themed-checkboxListItem-5" checkmarkCharacter="✕" theme={customTheme}>
|
|
64
|
+
Label for checked checkbox with custom checkmark
|
|
65
|
+
</CheckBoxListItem>
|
|
57
66
|
</React.Fragment>
|
|
58
67
|
```
|
|
@@ -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,76 +13,41 @@ 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
|
-
|
|
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; } }
|
|
16
|
+
class ContentBox extends _react.default.Component {
|
|
17
|
+
renderTitle() {
|
|
18
|
+
let className = _ContentBoxModule.default.title + " " + _ContentBoxModule.default[this.props.titleSize];
|
|
35
19
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
function ContentBox() {
|
|
44
|
-
_classCallCheck(this, ContentBox);
|
|
45
|
-
|
|
46
|
-
return _super.apply(this, arguments);
|
|
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
|
-
}
|
|
20
|
+
if (this.props.title) {
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement("h2", {
|
|
22
|
+
className: className
|
|
23
|
+
}, this.props.title);
|
|
24
|
+
} else {
|
|
25
|
+
return;
|
|
61
26
|
}
|
|
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;
|
|
27
|
+
}
|
|
68
28
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
29
|
+
render() {
|
|
30
|
+
let colorClass = " " + _ContentBoxModule.default[this.props.color];
|
|
31
|
+
let linkClass = this.props.href ? " " + _ContentBoxModule.default.link : "";
|
|
32
|
+
let className = _ContentBoxModule.default.contentBox + colorClass + linkClass;
|
|
33
|
+
|
|
34
|
+
if (this.props.href) {
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement("a", {
|
|
36
|
+
href: this.props.href,
|
|
37
|
+
className: className
|
|
38
|
+
}, this.renderTitle(), /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
+
className: _ContentBoxModule.default.content
|
|
40
|
+
}, this.props.content));
|
|
41
|
+
} else {
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
+
className: className
|
|
44
|
+
}, this.renderTitle(), /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
+
className: _ContentBoxModule.default.content
|
|
46
|
+
}, this.props.content));
|
|
83
47
|
}
|
|
84
|
-
}
|
|
48
|
+
}
|
|
85
49
|
|
|
86
|
-
|
|
87
|
-
}(_react.default.Component);
|
|
50
|
+
}
|
|
88
51
|
|
|
89
52
|
ContentBox.propTypes = {
|
|
90
53
|
/** Content title inside box */
|
|
@@ -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,113 +13,74 @@ var _DialogModule = _interopRequireDefault(require("./Dialog.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
|
-
|
|
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; } }
|
|
16
|
+
class Dialog extends _react.default.Component {
|
|
17
|
+
constructor(props) {
|
|
18
|
+
super(props);
|
|
19
|
+
this.state = {};
|
|
20
|
+
this.setWrapperRef = this.setWrapperRef.bind(this);
|
|
21
|
+
this.setHiddenInputWrapperRef = this.setHiddenInputWrapperRef.bind(this);
|
|
22
|
+
this.handleClickOutside = this.handleClickOutside.bind(this);
|
|
23
|
+
this.keyDownFunction = this.keyDownFunction.bind(this);
|
|
24
|
+
}
|
|
35
25
|
|
|
36
|
-
|
|
26
|
+
componentDidMount() {
|
|
27
|
+
document.addEventListener('mousedown', this.handleClickOutside);
|
|
28
|
+
document.addEventListener("keydown", this.keyDownFunction, false);
|
|
29
|
+
this.hiddenInputWrapperRef.tabIndex = -1;
|
|
30
|
+
}
|
|
37
31
|
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
componentWillUnmount() {
|
|
33
|
+
document.removeEventListener('mousedown', this.handleClickOutside);
|
|
34
|
+
document.removeEventListener("keydown", this.keyDownFunction, false);
|
|
35
|
+
}
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
keyDownFunction(event) {
|
|
38
|
+
switch (event.keyCode) {
|
|
39
|
+
case 27:
|
|
40
|
+
// Escape
|
|
41
|
+
if (this.props.onClickOutside) this.props.onClickOutside();
|
|
42
|
+
break;
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
default:
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
setWrapperRef(node) {
|
|
50
|
+
this.wrapperRef = node;
|
|
51
|
+
}
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
|
|
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;
|
|
53
|
+
setHiddenInputWrapperRef(node) {
|
|
54
|
+
this.hiddenInputWrapperRef = node;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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) {
|
|
73
|
-
switch (event.keyCode) {
|
|
74
|
-
case 27:
|
|
75
|
-
// Escape
|
|
76
|
-
if (this.props.onClickOutside) this.props.onClickOutside();
|
|
77
|
-
break;
|
|
78
|
-
|
|
79
|
-
default:
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}, {
|
|
84
|
-
key: "setWrapperRef",
|
|
85
|
-
value: function setWrapperRef(node) {
|
|
86
|
-
this.wrapperRef = node;
|
|
57
|
+
handleClickOutside(event) {
|
|
58
|
+
if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {
|
|
59
|
+
this.props.onClickOutside();
|
|
87
60
|
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this.props.
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
render() {
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
+
className: _DialogModule.default.dialogOverlay
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
67
|
+
ref: this.setWrapperRef,
|
|
68
|
+
className: "".concat(_DialogModule.default.dialogContent, " ").concat(this.props.noPadding ? _DialogModule.default.noPadding : ''),
|
|
69
|
+
style: {
|
|
70
|
+
maxWidth: this.props.maxWidth
|
|
98
71
|
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
maxWidth: this.props.maxWidth
|
|
110
|
-
}
|
|
111
|
-
}, this.props.closeButton ? /*#__PURE__*/_react.default.createElement("button", {
|
|
112
|
-
onClick: this.props.onClickOutside,
|
|
113
|
-
className: _DialogModule.default.closeButton
|
|
114
|
-
}, "Lukk") : '', /*#__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
|
-
}]);
|
|
72
|
+
}, this.props.closeButton ? /*#__PURE__*/_react.default.createElement("button", {
|
|
73
|
+
onClick: this.props.onClickOutside,
|
|
74
|
+
className: _DialogModule.default.closeButton
|
|
75
|
+
}) : '', /*#__PURE__*/_react.default.createElement("input", {
|
|
76
|
+
type: "button",
|
|
77
|
+
ref: this.setHiddenInputWrapperRef,
|
|
78
|
+
className: _DialogModule.default.hidden,
|
|
79
|
+
autoFocus: true
|
|
80
|
+
}), this.props.children));
|
|
81
|
+
}
|
|
122
82
|
|
|
123
|
-
|
|
124
|
-
}(_react.default.Component);
|
|
83
|
+
}
|
|
125
84
|
|
|
126
85
|
;
|
|
127
86
|
Dialog.propTypes = {
|