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.
Files changed (33) 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 +5 -1
  14. package/dist/components/Footer.js +8 -44
  15. package/dist/components/Header.js +11 -47
  16. package/dist/components/InputField.js +92 -141
  17. package/dist/components/Label.js +11 -53
  18. package/dist/components/List.js +21 -72
  19. package/dist/components/LoadingAnimation.js +6 -42
  20. package/dist/components/NavigationBar.js +126 -179
  21. package/dist/components/NavigationBarListItem.js +22 -59
  22. package/dist/components/Paper.js +6 -42
  23. package/dist/components/RadioButtonIcon.js +18 -60
  24. package/dist/components/RadioButtonInput.js +17 -53
  25. package/dist/components/RadioButtonListItem.js +13 -49
  26. package/dist/components/Select.js +100 -142
  27. package/dist/components/Textarea.js +52 -91
  28. package/dist/components/Theme.js +55 -98
  29. package/dist/components/WizardNavigation/Step.js +35 -72
  30. package/dist/components/WizardNavigation.js +25 -59
  31. package/dist/functions/theme.js +10 -10
  32. package/dist/index.js +24 -24
  33. 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
  });
@@ -27,160 +25,113 @@ require("react-datepicker/dist/react-datepicker.css");
27
25
 
28
26
  var _InputFieldModule = _interopRequireDefault(require("./InputField.module.scss"));
29
27
 
30
- 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); }
28
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
29
 
32
- 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; }
30
+ 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; }
33
31
 
34
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
33
 
36
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
37
-
38
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
39
-
40
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
41
-
42
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
43
-
44
- 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); } }
45
-
46
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
47
-
48
- 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); }
49
-
50
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
51
-
52
- 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); }; }
53
-
54
- 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); }
55
-
56
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
57
-
58
- 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; } }
59
-
60
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
61
-
62
34
  (0, _reactDatepicker.registerLocale)('nb', _nb.default);
63
35
 
64
- var InputField = /*#__PURE__*/function (_React$Component) {
65
- _inherits(InputField, _React$Component);
36
+ class InputField extends _react.default.Component {
37
+ getThemeErrorInputStyle(theme) {
38
+ return {
39
+ boxShadow: "0 0 3px ".concat((0, _theme.getThemePaletteBackgroundColor)(theme, 'warning')),
40
+ borderColor: (0, _theme.getThemePaletteBackgroundColor)(theme, 'warning')
41
+ };
42
+ }
66
43
 
67
- var _super = _createSuper(InputField);
44
+ getThemeErrorMessageStyle(theme) {
45
+ return {
46
+ color: (0, _theme.getThemePaletteBackgroundColor)(theme, 'warning')
47
+ };
48
+ }
68
49
 
69
- function InputField() {
70
- _classCallCheck(this, InputField);
50
+ convertDateToString(date) {
51
+ return date ? (0, _dateFns.format)(new Date(date), this.props.dateFormat, {
52
+ locale: _nb.default
53
+ }) : '';
54
+ }
71
55
 
72
- return _super.apply(this, arguments);
56
+ renderValueAsText(value, defaultContent) {
57
+ return this.props.type === 'date' ? value ? this.convertDateToString(value) : defaultContent : value ? value : defaultContent;
73
58
  }
74
59
 
75
- _createClass(InputField, [{
76
- key: "getThemeErrorInputStyle",
77
- value: function getThemeErrorInputStyle(theme) {
78
- return {
79
- boxShadow: "0 0 3px ".concat((0, _theme.getThemePaletteBackgroundColor)(theme, 'warning')),
80
- borderColor: (0, _theme.getThemePaletteBackgroundColor)(theme, 'warning')
60
+ renderInputField() {
61
+ var _this$props$width;
62
+
63
+ const styleRules = { ...(this.props.hasErrors ? this.getThemeErrorInputStyle(this.props.theme) : null),
64
+ ...(((_this$props$width = this.props.width) === null || _this$props$width === void 0 ? void 0 : _this$props$width.length) && {
65
+ maxWidth: this.props.width
66
+ })
67
+ };
68
+
69
+ if (this.props.type === 'date') {
70
+ const value = this.props.defaultValue ? this.props.defaultValue : this.props.value || null;
71
+ const props = {
72
+ name: this.props.name,
73
+ readOnly: this.props.readOnly,
74
+ disabled: this.props.disabled,
75
+ id: this.props.id,
76
+ dateFormat: this.props.dateFormat,
77
+ locale: 'nb',
78
+ selectsStart: this.props.selectsStart,
79
+ selectsEnd: this.props.selectsEnd,
80
+ startDate: this.props.startDate ? new Date(this.props.startDate) : null,
81
+ endDate: this.props.endDate ? new Date(this.props.endDate) : null,
82
+ minDate: this.props.minDate || null,
83
+ maxDate: this.props.maxDate || null,
84
+ onChange: this.props.onChange ? date => this.props.onChange(date) : console.log("Missing onChange handler for date picker with id: ".concat(this.props.id)),
85
+ onBlur: this.props.onBlur ? date => this.props.onBlur(date) : null,
86
+ selected: value ? new Date(value) : null,
87
+ placeholderText: this.props.placeholder,
88
+ className: this.props.hasErrors ? _InputFieldModule.default.hasErrors : '',
89
+ style: styleRules
81
90
  };
82
- }
83
- }, {
84
- key: "getThemeErrorMessageStyle",
85
- value: function getThemeErrorMessageStyle(theme) {
86
- return {
87
- color: (0, _theme.getThemePaletteBackgroundColor)(theme, 'warning')
91
+ return /*#__PURE__*/_react.default.createElement(_reactDatepicker.default, props);
92
+ } else {
93
+ const defaultValue = !this.props.value && this.props.defaultValue ? this.props.defaultValue : false;
94
+ const props = {
95
+ name: this.props.name,
96
+ readOnly: this.props.readOnly,
97
+ disabled: this.props.disabled,
98
+ type: this.props.type,
99
+ id: this.props.id,
100
+ onChange: this.props.onChange,
101
+ onBlur: this.props.onBlur,
102
+ [defaultValue ? 'defaultValue' : 'value']: defaultValue || this.props.value,
103
+ placeholder: this.props.placeholder,
104
+ className: this.props.hasErrors ? _InputFieldModule.default.hasErrors : '',
105
+ 'aria-required': this.props.mandatory,
106
+ style: styleRules
88
107
  };
108
+ return /*#__PURE__*/_react.default.createElement("input", props);
89
109
  }
90
- }, {
91
- key: "convertDateToString",
92
- value: function convertDateToString(date) {
93
- return date ? (0, _dateFns.format)(new Date(date), this.props.dateFormat, {
94
- locale: _nb.default
95
- }) : '';
96
- }
97
- }, {
98
- key: "renderValueAsText",
99
- value: function renderValueAsText(value, defaultContent) {
100
- return this.props.type === 'date' ? value ? this.convertDateToString(value) : defaultContent : value ? value : defaultContent;
101
- }
102
- }, {
103
- key: "renderInputField",
104
- value: function renderInputField() {
105
- var _this$props$width,
106
- _this = this;
110
+ }
107
111
 
108
- var styleRules = _objectSpread(_objectSpread({}, this.props.hasErrors ? this.getThemeErrorInputStyle(this.props.theme) : null), ((_this$props$width = this.props.width) === null || _this$props$width === void 0 ? void 0 : _this$props$width.length) && {
109
- maxWidth: this.props.width
110
- });
111
-
112
- if (this.props.type === 'date') {
113
- var value = this.props.defaultValue ? this.props.defaultValue : this.props.value || null;
114
- var props = {
115
- name: this.props.name,
116
- readOnly: this.props.readOnly,
117
- disabled: this.props.disabled,
118
- id: this.props.id,
119
- dateFormat: this.props.dateFormat,
120
- locale: 'nb',
121
- selectsStart: this.props.selectsStart,
122
- selectsEnd: this.props.selectsEnd,
123
- startDate: this.props.startDate ? new Date(this.props.startDate) : null,
124
- endDate: this.props.endDate ? new Date(this.props.endDate) : null,
125
- onChange: this.props.onChange ? function (date) {
126
- return _this.props.onChange(date);
127
- } : console.log("Missing onChange handler for date picker with id: ".concat(this.props.id)),
128
- onBlur: this.props.onBlur ? function (date) {
129
- return _this.props.onBlur(date);
130
- } : null,
131
- selected: value ? new Date(value) : null,
132
- placeholderText: this.props.placeholder,
133
- className: this.props.hasErrors ? _InputFieldModule.default.hasErrors : '',
134
- style: styleRules
135
- };
136
- return /*#__PURE__*/_react.default.createElement(_reactDatepicker.default, props);
137
- } else {
138
- var _props2;
139
-
140
- var defaultValue = !this.props.value && this.props.defaultValue ? this.props.defaultValue : false;
141
-
142
- var _props = (_props2 = {
143
- name: this.props.name,
144
- readOnly: this.props.readOnly,
145
- disabled: this.props.disabled,
146
- type: this.props.type,
147
- id: this.props.id,
148
- onChange: this.props.onChange,
149
- onBlur: this.props.onBlur
150
- }, _defineProperty(_props2, defaultValue ? 'defaultValue' : 'value', defaultValue || this.props.value), _defineProperty(_props2, "placeholder", this.props.placeholder), _defineProperty(_props2, "className", this.props.hasErrors ? _InputFieldModule.default.hasErrors : ''), _defineProperty(_props2, 'aria-required', this.props.mandatory), _defineProperty(_props2, "style", styleRules), _props2);
151
-
152
- return /*#__PURE__*/_react.default.createElement("input", _props);
153
- }
154
- }
155
- }, {
156
- key: "render",
157
- value: function render() {
158
- var _this2 = this;
159
-
160
- return /*#__PURE__*/_react.default.createElement("div", {
161
- className: "".concat(_InputFieldModule.default.inputField, " ").concat(_InputFieldModule.default[this.props.type])
162
- }, /*#__PURE__*/_react.default.createElement(_Label.default, {
163
- htmlFor: this.props.id
164
- }, this.props.label, this.props.type === 'file' ? /*#__PURE__*/_react.default.createElement("div", {
165
- className: _InputFieldModule.default.fileInputContainer
166
- }, /*#__PURE__*/_react.default.createElement("span", {
167
- className: _InputFieldModule.default.input
168
- }, this.props.selectedFileName), this.props.buttonContent ? /*#__PURE__*/_react.default.createElement(_Button.default, {
169
- color: this.props.buttonColor,
170
- onClick: function onClick() {
171
- document.getElementById(_this2.props.id).click();
172
- },
173
- content: this.props.buttonContent,
174
- theme: this.props.theme
175
- }) : '') : ''), !this.props.contentOnly ? this.renderInputField() : /*#__PURE__*/_react.default.createElement("span", null, this.renderValueAsText(this.props.value || this.props.defaultValue, this.props.defaultContent)), /*#__PURE__*/_react.default.createElement("span", {
176
- className: _InputFieldModule.default.errorMessage,
177
- style: this.getThemeErrorMessageStyle(this.props.theme)
178
- }, this.props.errorMessage ? this.props.errorMessage : ''));
179
- }
180
- }]);
112
+ render() {
113
+ return /*#__PURE__*/_react.default.createElement("div", {
114
+ className: "".concat(_InputFieldModule.default.inputField, " ").concat(_InputFieldModule.default[this.props.type])
115
+ }, /*#__PURE__*/_react.default.createElement(_Label.default, {
116
+ htmlFor: this.props.id
117
+ }, this.props.label, this.props.type === 'file' ? /*#__PURE__*/_react.default.createElement("div", {
118
+ className: _InputFieldModule.default.fileInputContainer
119
+ }, /*#__PURE__*/_react.default.createElement("span", {
120
+ className: _InputFieldModule.default.input
121
+ }, this.props.selectedFileName), this.props.buttonContent ? /*#__PURE__*/_react.default.createElement(_Button.default, {
122
+ color: this.props.buttonColor,
123
+ onClick: () => {
124
+ document.getElementById(this.props.id).click();
125
+ },
126
+ content: this.props.buttonContent,
127
+ theme: this.props.theme
128
+ }) : '') : ''), !this.props.contentOnly ? this.renderInputField() : /*#__PURE__*/_react.default.createElement("span", null, this.renderValueAsText(this.props.value || this.props.defaultValue, this.props.defaultContent)), /*#__PURE__*/_react.default.createElement("span", {
129
+ className: _InputFieldModule.default.errorMessage,
130
+ style: this.getThemeErrorMessageStyle(this.props.theme)
131
+ }, this.props.errorMessage ? this.props.errorMessage : ''));
132
+ }
181
133
 
182
- return InputField;
183
- }(_react.default.Component);
134
+ }
184
135
 
185
136
  InputField.propTypes = {
186
137
  /** Text content inside list item */
@@ -217,7 +168,7 @@ InputField.defaultProps = {
217
168
  hasErrors: false,
218
169
  errorMessage: '',
219
170
  mandatory: false,
220
- onChange: function onChange() {
171
+ onChange: () => {
221
172
  return false;
222
173
  }
223
174
  };
@@ -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,59 +15,19 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
15
 
18
16
  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); }
19
17
 
20
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
21
-
22
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
23
-
24
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
25
-
26
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27
-
28
- 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); } }
29
-
30
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
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 Label = /*#__PURE__*/function (_React$Component) {
47
- _inherits(Label, _React$Component);
48
-
49
- var _super = _createSuper(Label);
50
-
51
- function Label() {
52
- _classCallCheck(this, Label);
53
-
54
- return _super.apply(this, arguments);
18
+ class Label extends _react.default.Component {
19
+ render() {
20
+ let labelProps = { ...this.props
21
+ };
22
+ delete labelProps.inline;
23
+ delete labelProps.normalCursor;
24
+ const className = "".concat(_LabelModule.default.label, " ").concat(this.props.inline ? _LabelModule.default.inline : '', " ").concat(this.props.normalCursor ? _LabelModule.default.normalCursor : '');
25
+ return /*#__PURE__*/_react.default.createElement("label", _extends({}, labelProps, {
26
+ className: className
27
+ }), this.props.children);
55
28
  }
56
29
 
57
- _createClass(Label, [{
58
- key: "render",
59
- value: function render() {
60
- var labelProps = _objectSpread({}, this.props);
61
-
62
- delete labelProps.inline;
63
- delete labelProps.normalCursor;
64
- var className = "".concat(_LabelModule.default.label, " ").concat(this.props.inline ? _LabelModule.default.inline : '', " ").concat(this.props.normalCursor ? _LabelModule.default.normalCursor : '');
65
- return /*#__PURE__*/_react.default.createElement("label", _extends({}, labelProps, {
66
- className: className
67
- }), this.props.children);
68
- }
69
- }]);
70
-
71
- return Label;
72
- }(_react.default.Component);
30
+ }
73
31
 
74
32
  Label.propTypes = {
75
33
  inline: _propTypes.default.bool,
@@ -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,84 +13,35 @@ var _ListModule = _interopRequireDefault(require("./List.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; } }
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 ListItem = /*#__PURE__*/function (_React$Component) {
39
- _inherits(ListItem, _React$Component);
40
-
41
- var _super = _createSuper(ListItem);
42
-
43
- function ListItem() {
44
- _classCallCheck(this, ListItem);
45
-
46
- return _super.apply(this, arguments);
16
+ class ListItem extends _react.default.Component {
17
+ render() {
18
+ return /*#__PURE__*/_react.default.createElement("li", null, this.props.listItem);
47
19
  }
48
20
 
49
- _createClass(ListItem, [{
50
- key: "render",
51
- value: function render() {
52
- return /*#__PURE__*/_react.default.createElement("li", null, this.props.listItem);
53
- }
54
- }]);
55
-
56
- return ListItem;
57
- }(_react.default.Component);
58
-
59
- var List = /*#__PURE__*/function (_React$Component2) {
60
- _inherits(List, _React$Component2);
21
+ }
61
22
 
62
- var _super2 = _createSuper(List);
23
+ class List extends _react.default.Component {
24
+ renderList() {
25
+ let listItems = this.props.listItems.map(function (listItem, i) {
26
+ return /*#__PURE__*/_react.default.createElement(ListItem, {
27
+ listItem: listItem,
28
+ key: i
29
+ });
30
+ });
31
+ let listType = this.props.ordered ? 'ol' : 'ul';
63
32
 
64
- function List() {
65
- _classCallCheck(this, List);
33
+ let listElement = /*#__PURE__*/_react.default.createElement(listType, {
34
+ className: _ListModule.default.list
35
+ }, listItems);
66
36
 
67
- return _super2.apply(this, arguments);
37
+ return listElement;
68
38
  }
69
39
 
70
- _createClass(List, [{
71
- key: "renderList",
72
- value: function renderList() {
73
- var listItems = this.props.listItems.map(function (listItem, i) {
74
- return /*#__PURE__*/_react.default.createElement(ListItem, {
75
- listItem: listItem,
76
- key: i
77
- });
78
- });
79
- var listType = this.props.ordered ? 'ol' : 'ul';
80
-
81
- var listElement = /*#__PURE__*/_react.default.createElement(listType, {
82
- className: _ListModule.default.list
83
- }, listItems);
84
-
85
- return listElement;
86
- }
87
- }, {
88
- key: "render",
89
- value: function render() {
90
- return /*#__PURE__*/_react.default.createElement("div", null, this.renderList());
91
- }
92
- }]);
40
+ render() {
41
+ return /*#__PURE__*/_react.default.createElement("div", null, this.renderList());
42
+ }
93
43
 
94
- return List;
95
- }(_react.default.Component);
44
+ }
96
45
 
97
46
  List.propTypes = {
98
47
  listItems: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -15,48 +13,14 @@ var _LoadingAnimationModule = _interopRequireDefault(require("./LoadingAnimation
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; } }
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 LoadingAnimation = /*#__PURE__*/function (_React$Component) {
39
- _inherits(LoadingAnimation, _React$Component);
40
-
41
- var _super = _createSuper(LoadingAnimation);
42
-
43
- function LoadingAnimation() {
44
- _classCallCheck(this, LoadingAnimation);
45
-
46
- return _super.apply(this, arguments);
16
+ class LoadingAnimation extends _react.default.Component {
17
+ render() {
18
+ return /*#__PURE__*/_react.default.createElement("div", {
19
+ className: this.props.fixed ? _LoadingAnimationModule.default.loadingAnimation + ' ' + _LoadingAnimationModule.default.fixed : _LoadingAnimationModule.default.loadingAnimation
20
+ }, this.props.message);
47
21
  }
48
22
 
49
- _createClass(LoadingAnimation, [{
50
- key: "render",
51
- value: function render() {
52
- return /*#__PURE__*/_react.default.createElement("div", {
53
- className: this.props.fixed ? _LoadingAnimationModule.default.loadingAnimation + ' ' + _LoadingAnimationModule.default.fixed : _LoadingAnimationModule.default.loadingAnimation
54
- }, this.props.message);
55
- }
56
- }]);
57
-
58
- return LoadingAnimation;
59
- }(_react.default.Component);
23
+ }
60
24
 
61
25
  LoadingAnimation.propTypes = {
62
26
  fixed: _propTypes.default.bool,