dibk-design 1.1.10 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{fonts → assets/fonts}/Altis-Light.eot +0 -0
- package/dist/{fonts → assets/fonts}/Altis-Light.svg +0 -0
- package/dist/{fonts → assets/fonts}/Altis-Light.ttf +0 -0
- package/dist/{fonts → assets/fonts}/Altis-Light.woff +0 -0
- package/dist/{fonts → assets/fonts}/Altis.eot +0 -0
- package/dist/{fonts → assets/fonts}/Altis.svg +0 -0
- package/dist/{fonts → assets/fonts}/Altis.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.woff2 +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.woff2 +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.woff2 +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.woff2 +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.woff2 +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.eot +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.svg +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.ttf +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.woff +0 -0
- package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.woff2 +0 -0
- package/dist/assets/png/dibk-logo.png +0 -0
- package/dist/{images → assets/svg}/dibk-logo-mobile.svg +0 -0
- package/dist/{images → assets/svg}/dibk-logo.svg +0 -0
- package/dist/{images → assets/svg}/spinner.svg +0 -0
- package/dist/components/Accordion.js +61 -92
- package/dist/components/Accordion.module.scss +40 -39
- package/dist/components/Button.js +44 -84
- package/dist/components/Button.module.scss +24 -18
- package/dist/components/CheckBoxIcon.js +20 -61
- package/dist/components/CheckBoxIcon.module.scss +52 -52
- package/dist/components/CheckBoxInput.js +25 -64
- package/dist/components/CheckBoxInput.module.scss +23 -23
- package/dist/components/CheckBoxList.js +2 -4
- package/dist/components/CheckBoxList.module.scss +2 -2
- package/dist/components/CheckBoxListItem.js +2 -6
- package/dist/components/CheckBoxListItem.module.scss +53 -53
- package/dist/components/Container.js +6 -49
- package/dist/components/Container.module.scss +1 -1
- package/dist/components/ContentBox.js +38 -77
- package/dist/components/ContentBox.module.scss +35 -35
- package/dist/components/Dialog.js +38 -106
- package/dist/components/Dialog.module.scss +14 -12
- package/dist/components/DragAndDropFileInput.js +86 -147
- package/dist/components/DragAndDropFileInput.module.scss +28 -28
- package/dist/components/ErrorBox.js +5 -11
- package/dist/components/ErrorBox.module.scss +1 -1
- package/dist/components/ErrorMessage.js +13 -54
- package/dist/components/ErrorMessage.module.scss +1 -1
- package/dist/components/Footer.js +5 -44
- package/dist/components/Footer.module.scss +1 -1
- package/dist/components/Header.js +3 -5
- package/dist/components/Header.module.scss +9 -9
- package/dist/components/InputField.js +69 -120
- package/dist/components/InputField.module.scss +69 -69
- package/dist/components/Label.js +9 -48
- package/dist/components/Label.module.scss +3 -3
- package/dist/components/List.js +1 -1
- package/dist/components/List.module.scss +17 -17
- package/dist/components/ListItem.js +1 -1
- package/dist/components/LoadingAnimation.js +6 -47
- package/dist/components/LoadingAnimation.module.scss +23 -23
- package/dist/components/NavigationBar.js +137 -190
- package/dist/components/NavigationBar.module.scss +165 -165
- package/dist/components/NavigationBarListItem.js +22 -60
- package/dist/components/Paper.js +5 -45
- package/dist/components/Paper.module.scss +14 -14
- package/dist/components/ProgressBar.js +16 -8
- package/dist/components/ProgressBar.module.scss +2 -2
- package/dist/components/RadioButtonIcon.js +15 -55
- package/dist/components/RadioButtonIcon.module.scss +36 -36
- package/dist/components/RadioButtonInput.js +24 -63
- package/dist/components/RadioButtonInput.module.scss +23 -25
- package/dist/components/RadioButtonList.js +2 -4
- package/dist/components/RadioButtonList.module.scss +2 -2
- package/dist/components/RadioButtonListItem.js +3 -6
- package/dist/components/RadioButtonListItem.module.scss +7 -7
- package/dist/components/Select.js +98 -140
- package/dist/components/Select.module.scss +76 -76
- package/dist/components/Table.js +1 -3
- package/dist/components/Table.module.scss +1 -1
- package/dist/components/Textarea.js +54 -96
- package/dist/components/Textarea.module.scss +2 -2
- package/dist/components/Theme.js +60 -106
- package/dist/components/Theme.module.scss +12 -12
- package/dist/components/WizardNavigation/Step.js +34 -80
- package/dist/components/WizardNavigation/Step.module.scss +12 -12
- package/dist/components/WizardNavigation.js +19 -63
- package/dist/components/WizardNavigation.module.scss +1 -1
- package/dist/functions/theme.js +24 -10
- package/dist/index.js +0 -2
- package/dist/style/base/_all.scss +1 -0
- package/dist/style/base/_fonts.scss +97 -0
- package/package.json +81 -40
- package/dist/components/Accordion.md +0 -15
- package/dist/components/Button.md +0 -78
- package/dist/components/CheckBoxIcon.md +0 -38
- package/dist/components/CheckBoxInput.md +0 -51
- package/dist/components/CheckBoxList.md +0 -54
- package/dist/components/CheckBoxListItem.md +0 -82
- package/dist/components/Container.md +0 -7
- package/dist/components/ContentBox.md +0 -46
- package/dist/components/Dialog.md +0 -6
- package/dist/components/DragAndDropFileInput.md +0 -13
- package/dist/components/ErrorBox.md +0 -27
- package/dist/components/ErrorMessage.md +0 -15
- package/dist/components/Footer.md +0 -7
- package/dist/components/Header.md +0 -12
- package/dist/components/InputField.md +0 -40
- package/dist/components/Label.md +0 -9
- package/dist/components/List.md +0 -71
- package/dist/components/LoadingAnimation.md +0 -5
- package/dist/components/NavigationBar.md +0 -42
- package/dist/components/NavigationBarListItem.md +0 -16
- package/dist/components/Paper.md +0 -9
- package/dist/components/ProgressBar.md +0 -13
- package/dist/components/RadioButtonIcon.md +0 -41
- package/dist/components/RadioButtonInput.md +0 -30
- package/dist/components/RadioButtonList.md +0 -57
- package/dist/components/RadioButtonListItem.md +0 -70
- package/dist/components/Select.md +0 -28
- package/dist/components/Table.md +0 -26
- package/dist/components/Textarea.md +0 -27
- package/dist/components/Theme.md +0 -12
- package/dist/components/WizardNavigation.md +0 -84
- package/dist/style/base/fonts.css +0 -95
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
|
@@ -15,106 +15,75 @@ var _AccordionModule = _interopRequireDefault(require("./Accordion.module.scss")
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
}, {
|
|
75
|
-
key: "renderPanel",
|
|
76
|
-
value: function renderPanel() {
|
|
77
|
-
return /*#__PURE__*/_react.default.createElement("button", {
|
|
78
|
-
className: _AccordionModule.default.panel,
|
|
79
|
-
onClick: this.handleToggleExpand,
|
|
80
|
-
"aria-expanded": this.state.expanded ? 'true' : 'false'
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
82
|
-
className: _AccordionModule.default.panelText
|
|
83
|
-
}, this.props.title), /*#__PURE__*/_react.default.createElement("span", {
|
|
84
|
-
className: "".concat(_AccordionModule.default.panelChevron, " ").concat(this.state.expanded ? _AccordionModule.default.expanded : '')
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
key: "render",
|
|
89
|
-
value: function render() {
|
|
90
|
-
var className = "".concat(_AccordionModule.default.accordion, " ").concat(this.props.color ? _AccordionModule.default[this.props.color] : '');
|
|
91
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
92
|
-
className: className
|
|
93
|
-
}, this.renderPanel(), /*#__PURE__*/_react.default.createElement("div", {
|
|
94
|
-
className: "".concat(_AccordionModule.default.content, " ").concat(this.state.initialized ? _AccordionModule.default.initialized : '', " ").concat(this.state.expanded ? _AccordionModule.default.expanded : '')
|
|
95
|
-
}, this.props.children));
|
|
96
|
-
}
|
|
97
|
-
}]);
|
|
98
|
-
|
|
99
|
-
return Accordion;
|
|
100
|
-
}(_react.default.Component);
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
|
|
24
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
+
|
|
26
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
+
|
|
28
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
29
|
+
|
|
30
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
31
|
+
|
|
32
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
+
|
|
34
|
+
var Accordion = function Accordion(props) {
|
|
35
|
+
var _useState = (0, _react.useState)(props.expanded),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
+
expanded = _useState2[0],
|
|
38
|
+
setExpanded = _useState2[1];
|
|
39
|
+
|
|
40
|
+
var _useState3 = (0, _react.useState)(props.initialized),
|
|
41
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
42
|
+
initialized = _useState4[0],
|
|
43
|
+
setInitialized = _useState4[1];
|
|
44
|
+
|
|
45
|
+
var handleToggleExpand = function handleToggleExpand() {
|
|
46
|
+
setExpanded(!expanded);
|
|
47
|
+
setInitialized(true);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
(0, _react.useEffect)(function () {
|
|
51
|
+
setExpanded(props.expanded);
|
|
52
|
+
}, [props.expanded]);
|
|
53
|
+
|
|
54
|
+
var renderPanel = function renderPanel() {
|
|
55
|
+
return _react.default.createElement("button", {
|
|
56
|
+
className: _AccordionModule.default.panel,
|
|
57
|
+
onClick: handleToggleExpand,
|
|
58
|
+
"aria-expanded": expanded ? "true" : "false"
|
|
59
|
+
}, _react.default.createElement("span", {
|
|
60
|
+
className: _AccordionModule.default.panelText
|
|
61
|
+
}, props.title), _react.default.createElement("span", {
|
|
62
|
+
className: "".concat(_AccordionModule.default.panelChevron, " ").concat(expanded ? _AccordionModule.default.expanded : "")
|
|
63
|
+
}));
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var className = "".concat(_AccordionModule.default.accordion, " ").concat(props.color ? _AccordionModule.default[props.color] : "");
|
|
67
|
+
return _react.default.createElement("div", {
|
|
68
|
+
className: className
|
|
69
|
+
}, renderPanel(), _react.default.createElement("div", {
|
|
70
|
+
className: "".concat(_AccordionModule.default.content, " ").concat(initialized ? _AccordionModule.default.initialized : "", " ").concat(expanded ? _AccordionModule.default.expanded : "")
|
|
71
|
+
}, props.children));
|
|
72
|
+
};
|
|
101
73
|
|
|
102
74
|
Accordion.propTypes = {
|
|
103
|
-
/** Content title inside box */
|
|
104
75
|
title: _propTypes.default.string,
|
|
105
|
-
titleSize: _propTypes.default.oneOf([
|
|
106
|
-
|
|
107
|
-
/** Text content inside box */
|
|
76
|
+
titleSize: _propTypes.default.oneOf(["regular", "large"]),
|
|
108
77
|
content: _propTypes.default.string,
|
|
109
|
-
color: _propTypes.default.oneOf([
|
|
78
|
+
color: _propTypes.default.oneOf(["default", "primary", "success", "warning", "info", "lightCyan", "orange", "lightOrange", "lime", "lightLime"]),
|
|
110
79
|
expanded: _propTypes.default.bool
|
|
111
80
|
};
|
|
112
81
|
Accordion.defaultProps = {
|
|
113
82
|
title: null,
|
|
114
|
-
titleSize:
|
|
83
|
+
titleSize: "regular",
|
|
115
84
|
href: null,
|
|
116
|
-
content:
|
|
117
|
-
color:
|
|
85
|
+
content: "",
|
|
86
|
+
color: "default",
|
|
118
87
|
expanded: false
|
|
119
88
|
};
|
|
120
89
|
var _default = Accordion;
|
|
@@ -69,91 +69,92 @@
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
.accordion {
|
|
73
73
|
font-family: $default-font;
|
|
74
74
|
text-decoration: none;
|
|
75
75
|
width: 100%;
|
|
76
76
|
display: block;
|
|
77
|
-
|
|
77
|
+
&.default {
|
|
78
78
|
background-color: $color-default;
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
.panel span,
|
|
80
|
+
.content {
|
|
81
81
|
color: #000;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
&.primary {
|
|
85
85
|
background-color: $color-primary;
|
|
86
86
|
color: #fff;
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
.panel span,
|
|
88
|
+
.content {
|
|
89
89
|
color: #fff;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
&.success {
|
|
93
93
|
background-color: $color-success;
|
|
94
94
|
color: #fff;
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
.panel span,
|
|
96
|
+
.content {
|
|
97
97
|
color: #fff;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
&.warning {
|
|
101
101
|
background-color: $color-warning;
|
|
102
102
|
color: #fff;
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
.panel span,
|
|
104
|
+
.content {
|
|
105
105
|
color: #fff;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
&.info {
|
|
110
110
|
background-color: $color-info;
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
.panel span,
|
|
112
|
+
.content {
|
|
113
113
|
color: #000;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
&.lightCyan {
|
|
117
117
|
background-color: $color-light-cyan;
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
.panel span,
|
|
119
|
+
.content {
|
|
120
120
|
color: #000;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
&.orange {
|
|
124
124
|
background-color: $color-orange;
|
|
125
125
|
color: #fff;
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
.panel span,
|
|
127
|
+
.content {
|
|
128
128
|
color: #fff;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
&.lightOrange {
|
|
132
132
|
background-color: $color-light-orange;
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
.panel span,
|
|
134
|
+
.content {
|
|
135
135
|
color: #000;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
|
|
138
|
+
&.lime {
|
|
139
139
|
background-color: $color-lime;
|
|
140
140
|
color: #fff;
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
.panel span,
|
|
142
|
+
.content {
|
|
143
143
|
color: #fff;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
&.lightLime {
|
|
147
147
|
background-color: $color-light-lime;
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
.panel span,
|
|
149
|
+
.content {
|
|
150
150
|
color: #000;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
.panel {
|
|
155
155
|
@include appearance(none);
|
|
156
156
|
@include border-radius(0);
|
|
157
|
+
font-family: $default-font;
|
|
157
158
|
padding: 15px 15px;
|
|
158
159
|
display: flex;
|
|
159
160
|
align-items: center;
|
|
@@ -174,14 +175,14 @@
|
|
|
174
175
|
outline-style: auto;
|
|
175
176
|
outline-width: 2px;
|
|
176
177
|
outline-offset: 0px;
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
}
|
|
179
|
+
.panelText {
|
|
179
180
|
font-family: $heading-font;
|
|
180
181
|
font-weight: bold;
|
|
181
182
|
font-size: 18px;
|
|
182
183
|
flex: 1;
|
|
183
184
|
}
|
|
184
|
-
|
|
185
|
+
.panelChevron {
|
|
185
186
|
box-sizing: border-box;
|
|
186
187
|
position: relative;
|
|
187
188
|
display: block;
|
|
@@ -204,14 +205,14 @@
|
|
|
204
205
|
transform: translateY(-30%) rotate(45deg);
|
|
205
206
|
transition: transform 0.3s ease-in-out;
|
|
206
207
|
}
|
|
207
|
-
|
|
208
|
+
&.expanded {
|
|
208
209
|
&::after {
|
|
209
210
|
transform: translateY(30%) rotate(225deg);
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
|
-
|
|
215
|
+
.content {
|
|
215
216
|
opacity: 0;
|
|
216
217
|
margin-top: 0px;
|
|
217
218
|
line-height: 0;
|
|
@@ -221,11 +222,11 @@
|
|
|
221
222
|
@media only screen and (min-width: $screen-sm) {
|
|
222
223
|
padding: 0 30px 0;
|
|
223
224
|
}
|
|
224
|
-
|
|
225
|
+
&.initialized {
|
|
225
226
|
animation: hide 0.3s ease-in-out;
|
|
226
227
|
}
|
|
227
228
|
|
|
228
|
-
|
|
229
|
+
&.expanded {
|
|
229
230
|
animation: show 0.3s ease-in-out;
|
|
230
231
|
opacity: 1;
|
|
231
232
|
margin-top: 0px;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -25,102 +23,64 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
25
23
|
|
|
26
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; }
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
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); } }
|
|
31
|
-
|
|
32
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
33
|
-
|
|
34
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
35
|
-
|
|
36
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
|
-
|
|
38
|
-
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); }; }
|
|
39
|
-
|
|
40
|
-
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); }
|
|
41
|
-
|
|
42
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
43
|
-
|
|
44
|
-
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; } }
|
|
26
|
+
var Button = function Button(props) {
|
|
27
|
+
var _props$href;
|
|
45
28
|
|
|
46
|
-
|
|
29
|
+
var getArrowClass = function getArrowClass(arrow) {
|
|
30
|
+
switch (arrow) {
|
|
31
|
+
case "left":
|
|
32
|
+
return _ButtonModule.default.hasArrowLeft;
|
|
47
33
|
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
case "right":
|
|
35
|
+
return _ButtonModule.default.hasArrowRight;
|
|
50
36
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
function Button() {
|
|
54
|
-
_classCallCheck(this, Button);
|
|
55
|
-
|
|
56
|
-
return _super.apply(this, arguments);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
_createClass(Button, [{
|
|
60
|
-
key: "getArrowClass",
|
|
61
|
-
value: function getArrowClass() {
|
|
62
|
-
switch (this.props.arrow) {
|
|
63
|
-
case 'left':
|
|
64
|
-
return _ButtonModule.default.hasArrowLeft;
|
|
65
|
-
|
|
66
|
-
case 'right':
|
|
67
|
-
return _ButtonModule.default.hasArrowRight;
|
|
68
|
-
|
|
69
|
-
default:
|
|
70
|
-
return '';
|
|
71
|
-
}
|
|
37
|
+
default:
|
|
38
|
+
return "";
|
|
72
39
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
className: className,
|
|
99
|
-
style: themeStyle
|
|
100
|
-
}), this.props.content || this.props.children);
|
|
101
|
-
}
|
|
102
|
-
}]);
|
|
103
|
-
|
|
104
|
-
return Button;
|
|
105
|
-
}(_react.default.Component);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var getThemeStyle = function getThemeStyle(theme, color) {
|
|
43
|
+
return {
|
|
44
|
+
backgroundColor: (0, _theme.getThemePaletteBackgroundColor)(theme, color),
|
|
45
|
+
color: (0, _theme.getThemePaletteTextColor)(theme, color),
|
|
46
|
+
borderColor: (0, _theme.getThemePaletteBorderColor)(theme, color),
|
|
47
|
+
borderWidth: (0, _theme.getThemePaletteBorderColor)(theme, color) ? "1px" : "0"
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var buttonProps = _objectSpread({}, props);
|
|
52
|
+
|
|
53
|
+
delete buttonProps.noHover;
|
|
54
|
+
delete buttonProps.rounded;
|
|
55
|
+
var themeStyle = props.theme ? getThemeStyle(props.theme, props.color) : null;
|
|
56
|
+
var className = "".concat(_ButtonModule.default.button, " ").concat(_ButtonModule.default[props.color], " ").concat(_ButtonModule.default[props.size], " ").concat(getArrowClass(props.arrow), " ").concat(props.theme ? _ButtonModule.default.hasTheme : "", " ").concat(props.noHover ? _ButtonModule.default.noHover : "", " ").concat(props.rounded ? _ButtonModule.default.rounded : "");
|
|
57
|
+
return (_props$href = props.href) !== null && _props$href !== void 0 && _props$href.length ? _react.default.createElement("a", _extends({}, buttonProps, {
|
|
58
|
+
className: className,
|
|
59
|
+
style: themeStyle
|
|
60
|
+
}), props.content || props.children) : _react.default.createElement("button", _extends({}, buttonProps, {
|
|
61
|
+
className: className,
|
|
62
|
+
style: themeStyle
|
|
63
|
+
}), props.content || props.children);
|
|
64
|
+
};
|
|
106
65
|
|
|
107
66
|
Button.propTypes = {
|
|
108
|
-
/** Text content inside button */
|
|
109
67
|
content: _propTypes.default.string,
|
|
110
|
-
color: _propTypes.default.oneOf([
|
|
111
|
-
size: _propTypes.default.oneOf([
|
|
112
|
-
arrow: _propTypes.default.oneOf([
|
|
68
|
+
color: _propTypes.default.oneOf(["default", "primary"]),
|
|
69
|
+
size: _propTypes.default.oneOf(["small", "regular"]),
|
|
70
|
+
arrow: _propTypes.default.oneOf(["none", "left", "right"]),
|
|
113
71
|
theme: _propTypes.default.object,
|
|
114
72
|
disabled: _propTypes.default.bool,
|
|
115
73
|
noHover: _propTypes.default.bool,
|
|
116
74
|
rounded: _propTypes.default.bool,
|
|
117
|
-
href: _propTypes.default.string
|
|
75
|
+
href: _propTypes.default.string,
|
|
76
|
+
onClick: _propTypes.default.func
|
|
118
77
|
};
|
|
119
78
|
Button.defaultProps = {
|
|
120
|
-
color:
|
|
121
|
-
size:
|
|
79
|
+
color: "default",
|
|
80
|
+
size: "regular",
|
|
122
81
|
disabled: false,
|
|
123
|
-
noHover: false
|
|
82
|
+
noHover: false,
|
|
83
|
+
arrow: 'none'
|
|
124
84
|
};
|
|
125
85
|
var _default = Button;
|
|
126
86
|
exports.default = _default;
|