dibk-design 0.4.23 → 0.4.27

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.
Files changed (37) hide show
  1. package/dist/components/Accordion.js +39 -77
  2. package/dist/components/Button.js +31 -75
  3. package/dist/components/Button.module.scss +25 -2
  4. package/dist/components/CheckBoxIcon.js +24 -64
  5. package/dist/components/CheckBoxIcon.md +6 -0
  6. package/dist/components/CheckBoxInput.js +26 -59
  7. package/dist/components/CheckBoxInput.md +6 -0
  8. package/dist/components/CheckBoxListItem.js +18 -51
  9. package/dist/components/CheckBoxListItem.md +9 -0
  10. package/dist/components/ContentBox.js +30 -67
  11. package/dist/components/Dialog.js +57 -98
  12. package/dist/components/DragAndDropFileInput.js +91 -132
  13. package/dist/components/DragAndDropFileInput.md +7 -1
  14. package/dist/components/DragAndDropFileInput.module.scss +10 -1
  15. package/dist/components/Footer.js +8 -44
  16. package/dist/components/Header.js +11 -47
  17. package/dist/components/InputField.js +92 -141
  18. package/dist/components/InputField.module.scss +1 -0
  19. package/dist/components/Label.js +11 -53
  20. package/dist/components/List.js +21 -72
  21. package/dist/components/LoadingAnimation.js +6 -42
  22. package/dist/components/NavigationBar.js +126 -179
  23. package/dist/components/NavigationBarListItem.js +22 -59
  24. package/dist/components/Paper.js +6 -42
  25. package/dist/components/RadioButtonIcon.js +18 -60
  26. package/dist/components/RadioButtonInput.js +17 -53
  27. package/dist/components/RadioButtonListItem.js +13 -49
  28. package/dist/components/Select.js +100 -142
  29. package/dist/components/Select.module.scss +1 -0
  30. package/dist/components/Textarea.js +52 -91
  31. package/dist/components/Textarea.module.scss +5 -1
  32. package/dist/components/Theme.js +55 -98
  33. package/dist/components/WizardNavigation/Step.js +35 -72
  34. package/dist/components/WizardNavigation.js +25 -59
  35. package/dist/functions/theme.js +10 -10
  36. package/dist/index.js +24 -24
  37. 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
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
-
28
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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
- _createClass(CheckBoxListItem, [{
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
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); 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
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : 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);
40
-
41
- var _super = _createSuper(ContentBox);
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
- 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
- }
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
- return ContentBox;
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
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); 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 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
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
+ componentDidMount() {
27
+ document.addEventListener('mousedown', this.handleClickOutside);
28
+ document.addEventListener("keydown", this.keyDownFunction, false);
29
+ this.hiddenInputWrapperRef.tabIndex = -1;
30
+ }
37
31
 
38
- var Dialog = /*#__PURE__*/function (_React$Component) {
39
- _inherits(Dialog, _React$Component);
32
+ componentWillUnmount() {
33
+ document.removeEventListener('mousedown', this.handleClickOutside);
34
+ document.removeEventListener("keydown", this.keyDownFunction, false);
35
+ }
40
36
 
41
- var _super = _createSuper(Dialog);
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
- function Dialog(props) {
44
- var _this;
44
+ default:
45
+ return null;
46
+ }
47
+ }
45
48
 
46
- _classCallCheck(this, Dialog);
49
+ setWrapperRef(node) {
50
+ this.wrapperRef = node;
51
+ }
47
52
 
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;
53
+ setHiddenInputWrapperRef(node) {
54
+ this.hiddenInputWrapperRef = node;
55
55
  }
56
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) {
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
- 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();
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
- key: "render",
102
- value: function render() {
103
- return /*#__PURE__*/_react.default.createElement("div", {
104
- className: _DialogModule.default.dialogOverlay
105
- }, /*#__PURE__*/_react.default.createElement("div", {
106
- ref: this.setWrapperRef,
107
- className: "".concat(_DialogModule.default.dialogContent, " ").concat(this.props.noPadding ? _DialogModule.default.noPadding : ''),
108
- style: {
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
- }) : '', /*#__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
- return Dialog;
124
- }(_react.default.Component);
83
+ }
125
84
 
126
85
  ;
127
86
  Dialog.propTypes = {