dibk-design 0.4.30 → 0.4.31
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 +77 -39
- package/dist/components/Button.js +75 -31
- package/dist/components/CheckBoxIcon.js +64 -20
- package/dist/components/CheckBoxIcon.md +13 -4
- package/dist/components/CheckBoxIcon.module.scss +7 -0
- package/dist/components/CheckBoxInput.js +63 -22
- package/dist/components/CheckBoxInput.md +14 -8
- package/dist/components/CheckBoxInput.module.scss +4 -1
- package/dist/components/CheckBoxListItem.js +55 -16
- package/dist/components/CheckBoxListItem.md +20 -5
- package/dist/components/CheckBoxListItem.module.scss +8 -2
- package/dist/components/ContentBox.js +67 -30
- package/dist/components/Dialog.js +98 -57
- package/dist/components/DragAndDropFileInput.js +140 -90
- package/dist/components/Footer.js +44 -8
- package/dist/components/Header.js +47 -11
- package/dist/components/InputField.js +144 -93
- package/dist/components/Label.js +53 -11
- package/dist/components/List.js +72 -21
- package/dist/components/LoadingAnimation.js +42 -6
- package/dist/components/NavigationBar.js +179 -126
- package/dist/components/NavigationBarListItem.js +59 -22
- package/dist/components/Paper.js +42 -6
- package/dist/components/RadioButtonIcon.js +63 -19
- package/dist/components/RadioButtonIcon.md +7 -1
- package/dist/components/RadioButtonIcon.module.scss +9 -1
- package/dist/components/RadioButtonInput.js +56 -17
- package/dist/components/RadioButtonInput.md +8 -0
- package/dist/components/RadioButtonInput.module.scss +7 -0
- package/dist/components/RadioButtonListItem.js +52 -13
- package/dist/components/RadioButtonListItem.md +21 -3
- package/dist/components/RadioButtonListItem.module.scss +8 -2
- package/dist/components/Select.js +142 -100
- package/dist/components/Textarea.js +91 -52
- package/dist/components/Theme.js +98 -55
- package/dist/components/WizardNavigation/Step.js +72 -35
- package/dist/components/WizardNavigation.js +59 -25
- package/dist/functions/theme.js +10 -10
- package/dist/index.js +24 -24
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -15,116 +17,164 @@ var _DragAndDropFileInputModule = _interopRequireDefault(require("./DragAndDropF
|
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
|
-
class
|
|
19
|
-
constructor(props) {
|
|
20
|
-
super(props);
|
|
21
|
-
this.state = {
|
|
22
|
-
highlight: false
|
|
23
|
-
};
|
|
24
|
-
this.setWrapperRef = this.setWrapperRef.bind(this);
|
|
25
|
-
this.setFileInputElementRef = this.setFileInputElementRef.bind(this);
|
|
26
|
-
this.highlight = this.highlight.bind(this);
|
|
27
|
-
this.unhighlight = this.unhighlight.bind(this);
|
|
28
|
-
this.handleDrop = this.handleDrop.bind(this);
|
|
29
|
-
}
|
|
20
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
30
21
|
|
|
31
|
-
|
|
32
|
-
const containerElement = this.containerElement;
|
|
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); } }
|
|
33
23
|
|
|
34
|
-
|
|
35
|
-
// Prevent defaults
|
|
36
|
-
containerElement.addEventListener('dragenter', this.preventDefaults, false);
|
|
37
|
-
containerElement.addEventListener('dragover', this.preventDefaults, false);
|
|
38
|
-
containerElement.addEventListener('dragleave', this.preventDefaults, false);
|
|
39
|
-
containerElement.addEventListener('drop', this.preventDefaults, false); // Highlight
|
|
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; }
|
|
40
25
|
|
|
41
|
-
|
|
42
|
-
containerElement.addEventListener('dragover', this.highlight, false); // Unhighlight
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
43
27
|
|
|
44
|
-
|
|
45
|
-
containerElement.addEventListener('drop', this.unhighlight, false); // Hande drop
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
46
29
|
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
}
|
|
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); }; }
|
|
50
31
|
|
|
51
|
-
|
|
52
|
-
this.containerElement = node;
|
|
53
|
-
}
|
|
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); }
|
|
54
33
|
|
|
55
|
-
|
|
56
|
-
this.fileInputElement = node;
|
|
57
|
-
}
|
|
34
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
58
35
|
|
|
59
|
-
|
|
60
|
-
e.preventDefault();
|
|
61
|
-
e.stopPropagation();
|
|
62
|
-
}
|
|
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; } }
|
|
63
37
|
|
|
64
|
-
|
|
65
|
-
this.setState({
|
|
66
|
-
highlight: true
|
|
67
|
-
});
|
|
68
|
-
}
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
69
39
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
highlight: false
|
|
73
|
-
});
|
|
74
|
-
}
|
|
40
|
+
var DragAndDropFileInput = /*#__PURE__*/function (_React$Component) {
|
|
41
|
+
_inherits(DragAndDropFileInput, _React$Component);
|
|
75
42
|
|
|
76
|
-
|
|
77
|
-
const files = e.dataTransfer.files;
|
|
78
|
-
this.handleFiles(files);
|
|
79
|
-
}
|
|
43
|
+
var _super = _createSuper(DragAndDropFileInput);
|
|
80
44
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
45
|
+
function DragAndDropFileInput(props) {
|
|
46
|
+
var _this;
|
|
84
47
|
|
|
85
|
-
|
|
86
|
-
return value ? value : defaultContent;
|
|
87
|
-
}
|
|
48
|
+
_classCallCheck(this, DragAndDropFileInput);
|
|
88
49
|
|
|
89
|
-
|
|
90
|
-
|
|
50
|
+
_this = _super.call(this, props);
|
|
51
|
+
_this.state = {
|
|
52
|
+
highlight: false
|
|
53
|
+
};
|
|
54
|
+
_this.setWrapperRef = _this.setWrapperRef.bind(_assertThisInitialized(_this));
|
|
55
|
+
_this.setFileInputElementRef = _this.setFileInputElementRef.bind(_assertThisInitialized(_this));
|
|
56
|
+
_this.highlight = _this.highlight.bind(_assertThisInitialized(_this));
|
|
57
|
+
_this.unhighlight = _this.unhighlight.bind(_assertThisInitialized(_this));
|
|
58
|
+
_this.handleDrop = _this.handleDrop.bind(_assertThisInitialized(_this));
|
|
59
|
+
return _this;
|
|
91
60
|
}
|
|
92
61
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
62
|
+
_createClass(DragAndDropFileInput, [{
|
|
63
|
+
key: "componentDidMount",
|
|
64
|
+
value: function componentDidMount() {
|
|
65
|
+
var containerElement = this.containerElement;
|
|
96
66
|
|
|
97
|
-
|
|
98
|
-
|
|
67
|
+
if (containerElement) {
|
|
68
|
+
// Prevent defaults
|
|
69
|
+
containerElement.addEventListener('dragenter', this.preventDefaults, false);
|
|
70
|
+
containerElement.addEventListener('dragover', this.preventDefaults, false);
|
|
71
|
+
containerElement.addEventListener('dragleave', this.preventDefaults, false);
|
|
72
|
+
containerElement.addEventListener('drop', this.preventDefaults, false); // Highlight
|
|
99
73
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
} else {
|
|
103
|
-
buttonContent = this.props.buttonContent;
|
|
104
|
-
}
|
|
74
|
+
containerElement.addEventListener('dragenter', this.highlight, false);
|
|
75
|
+
containerElement.addEventListener('dragover', this.highlight, false); // Unhighlight
|
|
105
76
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
77
|
+
containerElement.addEventListener('dragleave', this.unhighlight, false);
|
|
78
|
+
containerElement.addEventListener('drop', this.unhighlight, false); // Hande drop
|
|
79
|
+
|
|
80
|
+
containerElement.addEventListener('drop', this.handleDrop, false);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
key: "setWrapperRef",
|
|
85
|
+
value: function setWrapperRef(node) {
|
|
86
|
+
this.containerElement = node;
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
key: "setFileInputElementRef",
|
|
90
|
+
value: function setFileInputElementRef(node) {
|
|
91
|
+
this.fileInputElement = node;
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
key: "preventDefaults",
|
|
95
|
+
value: function preventDefaults(e) {
|
|
96
|
+
e.preventDefault();
|
|
97
|
+
e.stopPropagation();
|
|
98
|
+
}
|
|
99
|
+
}, {
|
|
100
|
+
key: "highlight",
|
|
101
|
+
value: function highlight(e) {
|
|
102
|
+
this.setState({
|
|
103
|
+
highlight: true
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}, {
|
|
107
|
+
key: "unhighlight",
|
|
108
|
+
value: function unhighlight(e) {
|
|
109
|
+
this.setState({
|
|
110
|
+
highlight: false
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}, {
|
|
114
|
+
key: "handleDrop",
|
|
115
|
+
value: function handleDrop(e) {
|
|
116
|
+
var files = e.dataTransfer.files;
|
|
117
|
+
this.handleFiles(files);
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
key: "handleFiles",
|
|
121
|
+
value: function handleFiles(files) {
|
|
122
|
+
this.props.onDragAndDropChange(files);
|
|
123
|
+
}
|
|
124
|
+
}, {
|
|
125
|
+
key: "renderValueAsText",
|
|
126
|
+
value: function renderValueAsText(value, defaultContent) {
|
|
127
|
+
return value ? value : defaultContent;
|
|
128
|
+
}
|
|
129
|
+
}, {
|
|
130
|
+
key: "handleAddButtonOnClick",
|
|
131
|
+
value: function handleAddButtonOnClick() {
|
|
132
|
+
this.fileInputElement.click();
|
|
133
|
+
}
|
|
134
|
+
}, {
|
|
135
|
+
key: "handeFileInputElementOnChange",
|
|
136
|
+
value: function handeFileInputElementOnChange(files) {
|
|
137
|
+
this.props.onSelectChange(files);
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
key: "render",
|
|
141
|
+
value: function render() {
|
|
142
|
+
var _this2 = this;
|
|
143
|
+
|
|
144
|
+
var buttonContent;
|
|
145
|
+
|
|
146
|
+
if (this.props.selectedFileName) {
|
|
147
|
+
buttonContent = this.props.buttonContentWhenSelectedFile ? this.props.buttonContentWhenSelectedFile : this.props.buttonContent;
|
|
148
|
+
} else {
|
|
149
|
+
buttonContent = this.props.buttonContent;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
153
|
+
className: _DragAndDropFileInputModule.default.dragAndDropFileInput
|
|
154
|
+
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
155
|
+
htmlFor: this.props.id
|
|
156
|
+
}, this.props.label, !this.props.contentOnly ? /*#__PURE__*/_react.default.createElement("div", {
|
|
157
|
+
ref: this.setWrapperRef,
|
|
158
|
+
className: "".concat(_DragAndDropFileInputModule.default.dragAndDropContainer, " ").concat(this.state.highlight ? _DragAndDropFileInputModule.default.highlighted : '')
|
|
159
|
+
}, this.props.selectedFileName ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("b", null, "Valgt fil:"), " ", this.props.selectedFileName)) : /*#__PURE__*/_react.default.createElement("div", null, "Slipp fil her"), /*#__PURE__*/_react.default.createElement("input", {
|
|
160
|
+
ref: this.setFileInputElementRef,
|
|
161
|
+
type: "file",
|
|
162
|
+
onChange: this.props.onSelectChange
|
|
163
|
+
}), this.props.buttonContent ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, this.props.selectedFileName ? '' : 'eller klikk på knappen for å velge fil'), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
164
|
+
size: "small",
|
|
165
|
+
color: this.props.buttonColor,
|
|
166
|
+
onClick: function onClick() {
|
|
167
|
+
return _this2.handleAddButtonOnClick();
|
|
168
|
+
},
|
|
169
|
+
content: buttonContent
|
|
170
|
+
})) : '') : ''), this.props.contentOnly ? /*#__PURE__*/_react.default.createElement("span", null, this.renderValueAsText(this.props.selectedFileName, this.props.defaultContent)) : '', /*#__PURE__*/_react.default.createElement("span", {
|
|
171
|
+
className: _DragAndDropFileInputModule.default.errorMessage
|
|
172
|
+
}, this.props.errorMessage ? this.props.errorMessage : ''));
|
|
173
|
+
}
|
|
174
|
+
}]);
|
|
126
175
|
|
|
127
|
-
|
|
176
|
+
return DragAndDropFileInput;
|
|
177
|
+
}(_react.default.Component);
|
|
128
178
|
|
|
129
179
|
DragAndDropFileInput.propTypes = {
|
|
130
180
|
/** Text content inside list item */
|
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -11,16 +13,50 @@ var _FooterModule = _interopRequireDefault(require("./Footer.module.scss"));
|
|
|
11
13
|
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
|
-
class
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
+
|
|
18
|
+
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); } }
|
|
19
|
+
|
|
20
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
+
|
|
22
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
23
|
+
|
|
24
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25
|
+
|
|
26
|
+
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); }; }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
|
+
|
|
32
|
+
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; } }
|
|
33
|
+
|
|
34
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
|
+
|
|
36
|
+
var Footer = /*#__PURE__*/function (_React$Component) {
|
|
37
|
+
_inherits(Footer, _React$Component);
|
|
38
|
+
|
|
39
|
+
var _super = _createSuper(Footer);
|
|
40
|
+
|
|
41
|
+
function Footer() {
|
|
42
|
+
_classCallCheck(this, Footer);
|
|
43
|
+
|
|
44
|
+
return _super.apply(this, arguments);
|
|
21
45
|
}
|
|
22
46
|
|
|
23
|
-
|
|
47
|
+
_createClass(Footer, [{
|
|
48
|
+
key: "render",
|
|
49
|
+
value: function render() {
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement("footer", {
|
|
51
|
+
className: _FooterModule.default.footer
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
53
|
+
className: _FooterModule.default.footerContainer
|
|
54
|
+
}, this.props.children));
|
|
55
|
+
}
|
|
56
|
+
}]);
|
|
57
|
+
|
|
58
|
+
return Footer;
|
|
59
|
+
}(_react.default.Component);
|
|
24
60
|
|
|
25
61
|
var _default = Footer;
|
|
26
62
|
exports.default = _default;
|
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -13,21 +15,55 @@ var _HeaderModule = _interopRequireDefault(require("./Header.module.scss"));
|
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
|
-
class
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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); 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"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); 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; }
|
|
20
33
|
|
|
21
|
-
|
|
22
|
-
className: "".concat(_HeaderModule.default.header, " ").concat(bigClass, " ").concat(themeClass)
|
|
23
|
-
}, this.props.content);
|
|
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; } }
|
|
24
35
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
36
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
+
|
|
38
|
+
var Header = /*#__PURE__*/function (_React$Component) {
|
|
39
|
+
_inherits(Header, _React$Component);
|
|
40
|
+
|
|
41
|
+
var _super = _createSuper(Header);
|
|
42
|
+
|
|
43
|
+
function Header() {
|
|
44
|
+
_classCallCheck(this, Header);
|
|
45
|
+
|
|
46
|
+
return _super.apply(this, arguments);
|
|
28
47
|
}
|
|
29
48
|
|
|
30
|
-
|
|
49
|
+
_createClass(Header, [{
|
|
50
|
+
key: "render",
|
|
51
|
+
value: function render() {
|
|
52
|
+
var bigClass = this.props.big ? _HeaderModule.default.bigHeader : '';
|
|
53
|
+
var themeClass = this.props.theme ? _HeaderModule.default.hasTheme : '';
|
|
54
|
+
|
|
55
|
+
var headerElement = /*#__PURE__*/_react.default.createElement('h' + this.props.size, {
|
|
56
|
+
className: "".concat(_HeaderModule.default.header, " ").concat(bigClass, " ").concat(themeClass)
|
|
57
|
+
}, this.props.content);
|
|
58
|
+
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: _HeaderModule.default.headerContainer
|
|
61
|
+
}, " ", headerElement, " ");
|
|
62
|
+
}
|
|
63
|
+
}]);
|
|
64
|
+
|
|
65
|
+
return Header;
|
|
66
|
+
}(_react.default.Component);
|
|
31
67
|
|
|
32
68
|
Header.propTypes = {
|
|
33
69
|
/** Text content inside button */
|