dibk-design 0.3.24
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/LICENSE +674 -0
- package/README.md +3 -0
- package/dist/components/Accordion.js +120 -0
- package/dist/components/Accordion.md +15 -0
- package/dist/components/Accordion.module.scss +180 -0
- package/dist/components/Button.js +104 -0
- package/dist/components/Button.md +48 -0
- package/dist/components/Button.module.scss +141 -0
- package/dist/components/CheckBoxIcon.js +97 -0
- package/dist/components/CheckBoxIcon.md +23 -0
- package/dist/components/CheckBoxIcon.module.scss +39 -0
- package/dist/components/CheckBoxInput.js +91 -0
- package/dist/components/CheckBoxInput.md +39 -0
- package/dist/components/CheckBoxInput.module.scss +18 -0
- package/dist/components/CheckBoxListItem.js +85 -0
- package/dist/components/CheckBoxListItem.md +35 -0
- package/dist/components/CheckBoxListItem.module.scss +59 -0
- package/dist/components/ContentBox.js +106 -0
- package/dist/components/ContentBox.md +46 -0
- package/dist/components/ContentBox.module.scss +105 -0
- package/dist/components/DragAndDropFileInput.js +196 -0
- package/dist/components/DragAndDropFileInput.md +7 -0
- package/dist/components/DragAndDropFileInput.module.scss +36 -0
- package/dist/components/Footer.js +62 -0
- package/dist/components/Footer.md +7 -0
- package/dist/components/Footer.module.scss +11 -0
- package/dist/components/Header.js +75 -0
- package/dist/components/Header.md +7 -0
- package/dist/components/Header.module.scss +30 -0
- package/dist/components/InputField.js +201 -0
- package/dist/components/InputField.md +36 -0
- package/dist/components/InputField.module.scss +91 -0
- package/dist/components/List.js +106 -0
- package/dist/components/List.md +10 -0
- package/dist/components/List.module.scss +19 -0
- package/dist/components/LoadingAnimation.js +74 -0
- package/dist/components/LoadingAnimation.md +5 -0
- package/dist/components/LoadingAnimation.module.scss +26 -0
- package/dist/components/NavigationBar.js +229 -0
- package/dist/components/NavigationBar.md +31 -0
- package/dist/components/NavigationBar.module.scss +176 -0
- package/dist/components/NavigationBarListItem.js +85 -0
- package/dist/components/NavigationBarListItem.md +16 -0
- package/dist/components/Paper.js +71 -0
- package/dist/components/Paper.md +9 -0
- package/dist/components/Paper.module.scss +17 -0
- package/dist/components/RadioButtonIcon.js +92 -0
- package/dist/components/RadioButtonIcon.md +23 -0
- package/dist/components/RadioButtonIcon.module.scss +21 -0
- package/dist/components/RadioButtonInput.js +89 -0
- package/dist/components/RadioButtonInput.md +22 -0
- package/dist/components/RadioButtonInput.module.scss +15 -0
- package/dist/components/RadioButtonListItem.js +86 -0
- package/dist/components/RadioButtonListItem.md +24 -0
- package/dist/components/RadioButtonListItem.module.scss +59 -0
- package/dist/components/Select.js +188 -0
- package/dist/components/Select.md +26 -0
- package/dist/components/Select.module.scss +84 -0
- package/dist/components/Theme.js +131 -0
- package/dist/components/Theme.md +12 -0
- package/dist/components/Theme.module.scss +76 -0
- package/dist/components/WizardNavigation/Step.js +104 -0
- package/dist/components/WizardNavigation/Step.module.scss +75 -0
- package/dist/components/WizardNavigation.js +95 -0
- package/dist/components/WizardNavigation.md +84 -0
- package/dist/components/WizardNavigation.module.scss +4 -0
- package/dist/fonts/Altis-Light.eot +0 -0
- package/dist/fonts/Altis-Light.svg +326 -0
- package/dist/fonts/Altis-Light.ttf +0 -0
- package/dist/fonts/Altis-Light.woff +0 -0
- package/dist/functions/theme.js +60 -0
- package/dist/images/dibk-logo-mobile.svg +91 -0
- package/dist/images/dibk-logo.svg +991 -0
- package/dist/images/spinner.svg +57 -0
- package/dist/index.js +185 -0
- package/dist/style/abstracts/_all.scss +2 -0
- package/dist/style/abstracts/mixins/_all.scss +12 -0
- package/dist/style/abstracts/mixins/_animation.scss +6 -0
- package/dist/style/abstracts/mixins/_appearance.scss +5 -0
- package/dist/style/abstracts/mixins/_border-radius.scss +31 -0
- package/dist/style/abstracts/mixins/_box-shadow.scss +5 -0
- package/dist/style/abstracts/mixins/_box-sizing.scss +5 -0
- package/dist/style/abstracts/mixins/_calc.scss +5 -0
- package/dist/style/abstracts/mixins/_keyframes.scss +14 -0
- package/dist/style/abstracts/mixins/_opacity.scss +5 -0
- package/dist/style/abstracts/mixins/_placeholder.scss +17 -0
- package/dist/style/abstracts/mixins/_scrollbar.scss +26 -0
- package/dist/style/abstracts/mixins/_transform.scss +6 -0
- package/dist/style/abstracts/mixins/_transition.scss +34 -0
- package/dist/style/abstracts/variables/_all.scss +3 -0
- package/dist/style/abstracts/variables/_colors.scss +35 -0
- package/dist/style/abstracts/variables/_typography.scss +1 -0
- package/dist/style/abstracts/variables/_viewports.scss +11 -0
- package/dist/style/base/_all.scss +2 -0
- package/dist/style/base/_reset.scss +15 -0
- package/dist/style/base/_typography.scss +6 -0
- package/dist/style/base/fonts.css +6 -0
- package/dist/style/global.scss +3 -0
- package/dist/style/layout/_all.scss +1 -0
- package/dist/style/layout/_containers.scss +9 -0
- package/package.json +43 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
NavigationBar example:
|
|
2
|
+
|
|
3
|
+
```js
|
|
4
|
+
<NavigationBar primaryListItems={[{name: 'Primary item 1', listItems:['Sub item 1', 'Sub item 2']}, 'Primary item 2', {name: 'Primary item 3', href: '#'}]} secondaryListItems={['Secondary item 1', 'Secondary item 2']} />
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
NavigationBar without list items example
|
|
8
|
+
```js
|
|
9
|
+
<NavigationBar />
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
NavigationBar with child elements
|
|
13
|
+
```js
|
|
14
|
+
<NavigationBar primaryListItems={[{name: 'Primary item 1', listItems:['Sub item 1', 'Sub item 2']}, 'Primary item 2', {name: 'Primary item 3', href: '#'}]} secondaryListItems={['Secondary item 1', 'Secondary item 2']} >
|
|
15
|
+
Content here
|
|
16
|
+
</NavigationBar>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
NavigationBar with child elements and without list items example
|
|
21
|
+
```js
|
|
22
|
+
<NavigationBar>
|
|
23
|
+
Content here
|
|
24
|
+
</NavigationBar>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Themed NavigationBar example:
|
|
28
|
+
```js
|
|
29
|
+
import customTheme from 'data/customTheme';
|
|
30
|
+
<NavigationBar theme={customTheme} primaryListItems={[{name: 'Primary item 1', listItems:['Sub item 1', 'Sub item 2']}, 'Primary item 2', {name: 'Primary item 3', href: '#'}]} secondaryListItems={['Secondary item 1', 'Secondary item 2']} />
|
|
31
|
+
```
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
@import "../style/global.scss";
|
|
2
|
+
|
|
3
|
+
:local(.isPresent) {
|
|
4
|
+
@include box-shadow(0 2px 4px -2px rgba(0,0,0,.2));
|
|
5
|
+
position: relative;
|
|
6
|
+
z-index: 1;
|
|
7
|
+
:local(.navigationBar) {
|
|
8
|
+
background-color: $color-dark-blue;
|
|
9
|
+
height: 54px;
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
align-items: center;
|
|
13
|
+
@media only screen and (min-width: $screen-xs) {
|
|
14
|
+
height: 73px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:local(.logoContainer) {
|
|
19
|
+
width: 200px;
|
|
20
|
+
height: 54px;
|
|
21
|
+
display: inline-block;
|
|
22
|
+
img {
|
|
23
|
+
height: 54px;
|
|
24
|
+
max-width: none;
|
|
25
|
+
}
|
|
26
|
+
@media only screen and (min-width: $screen-xs) {
|
|
27
|
+
width: 270px;
|
|
28
|
+
height: 73px;
|
|
29
|
+
img {
|
|
30
|
+
height: 73px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:local(.childElements) {
|
|
36
|
+
display: block;
|
|
37
|
+
color: #fff;
|
|
38
|
+
flex: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:local(.dropdownOverlay) {
|
|
42
|
+
@media only screen and (max-width: $screen-md) and (min-width: $screen-xs) {
|
|
43
|
+
@include transition(all 0.1s ease-out);
|
|
44
|
+
content: "";
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 73px;
|
|
47
|
+
right: 0;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
left: 0;
|
|
50
|
+
z-index: 1;
|
|
51
|
+
visibility: hidden;
|
|
52
|
+
opacity: 0;
|
|
53
|
+
background: transparent;
|
|
54
|
+
&:local(.active) {
|
|
55
|
+
opacity: 1;
|
|
56
|
+
background: rgba(0, 0, 0, 0.5);
|
|
57
|
+
visibility: visible;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:local(.menuToggle) {
|
|
63
|
+
@include appearance(none);
|
|
64
|
+
@include transition(background-color 300ms ease-out);
|
|
65
|
+
border: none;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
position: relative;
|
|
68
|
+
background-color: transparent;
|
|
69
|
+
float: right;
|
|
70
|
+
margin: 0 12px;
|
|
71
|
+
:local(.hamburgerIcon) {
|
|
72
|
+
width: 30px;
|
|
73
|
+
display: block;
|
|
74
|
+
:local(.line) {
|
|
75
|
+
background-color: #fff;
|
|
76
|
+
height: 2px;
|
|
77
|
+
margin: 6px 0;
|
|
78
|
+
display: block;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
@media only screen and (min-width: $screen-xs) {
|
|
82
|
+
margin: 0 21px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:local(.dropdownContainer) {
|
|
87
|
+
@include transition(max-height 0.15s ease-out);
|
|
88
|
+
max-height: 0;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
&:local(.active) {
|
|
91
|
+
@include transition(max-height 0.15s ease-out);
|
|
92
|
+
max-height: 500px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:local(.dropdown) {
|
|
97
|
+
@include box-shadow(0 2px 4px -2px rgba(0,0,0,.2));
|
|
98
|
+
background-color: $color-dark-blue;
|
|
99
|
+
z-index: 2;
|
|
100
|
+
> :local(ul.primaryList) {
|
|
101
|
+
list-style: none;
|
|
102
|
+
padding: 20px;
|
|
103
|
+
margin: 0;
|
|
104
|
+
li {
|
|
105
|
+
a,
|
|
106
|
+
span {
|
|
107
|
+
color: #fff;
|
|
108
|
+
text-transform: uppercase;
|
|
109
|
+
text-decoration: none;
|
|
110
|
+
font-family: "Open Sans";
|
|
111
|
+
padding: 10px 0;
|
|
112
|
+
display: block;
|
|
113
|
+
border-bottom: 1px solid $color-primary;
|
|
114
|
+
font-size: 14px;
|
|
115
|
+
line-height: 1.6;
|
|
116
|
+
}
|
|
117
|
+
> :local(ul.primaryList) {
|
|
118
|
+
list-style: none;
|
|
119
|
+
padding: 0;
|
|
120
|
+
li {
|
|
121
|
+
a,
|
|
122
|
+
span {
|
|
123
|
+
color: #fff;
|
|
124
|
+
text-transform: none;
|
|
125
|
+
text-decoration: none;
|
|
126
|
+
font-family: "Open Sans";
|
|
127
|
+
padding: 10px 0;
|
|
128
|
+
margin-left: 20px;
|
|
129
|
+
display: block;
|
|
130
|
+
border-bottom: 1px solid #1b3a48;
|
|
131
|
+
font-size: 14px;
|
|
132
|
+
line-height: 1.6;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
> :local(ul.secondaryList) {
|
|
139
|
+
list-style: none;
|
|
140
|
+
padding: 20px;
|
|
141
|
+
margin: 0;
|
|
142
|
+
|
|
143
|
+
li {
|
|
144
|
+
a,
|
|
145
|
+
span {
|
|
146
|
+
color: #fff;
|
|
147
|
+
text-decoration: underline;
|
|
148
|
+
font-family: "Arial";
|
|
149
|
+
font-size: 14px;
|
|
150
|
+
padding: 10px 0;
|
|
151
|
+
line-height: 1;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@media only screen and (min-width: $screen-xs) {
|
|
158
|
+
:local(.dropdownContainer) {
|
|
159
|
+
position: relative;
|
|
160
|
+
overflow: visible;
|
|
161
|
+
:local(.dropdown) {
|
|
162
|
+
@include transition(max-height 0.15s ease-out);
|
|
163
|
+
width: 300px;
|
|
164
|
+
position: absolute;
|
|
165
|
+
right: 0;
|
|
166
|
+
max-height: 0;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
}
|
|
169
|
+
&:local(.active) {
|
|
170
|
+
:local(.dropdown) {
|
|
171
|
+
max-height: 500px;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _theme = require("../functions/theme");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
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 NavigationBarListItem = /*#__PURE__*/function (_React$Component) {
|
|
39
|
+
_inherits(NavigationBarListItem, _React$Component);
|
|
40
|
+
|
|
41
|
+
var _super = _createSuper(NavigationBarListItem);
|
|
42
|
+
|
|
43
|
+
function NavigationBarListItem() {
|
|
44
|
+
_classCallCheck(this, NavigationBarListItem);
|
|
45
|
+
|
|
46
|
+
return _super.apply(this, arguments);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
_createClass(NavigationBarListItem, [{
|
|
50
|
+
key: "getListItemThemeStyle",
|
|
51
|
+
value: function getListItemThemeStyle(theme) {
|
|
52
|
+
return {
|
|
53
|
+
color: (0, _theme.getThemeNavigationBarTextColor)(theme),
|
|
54
|
+
borderBottomColor: (0, _theme.getThemeNavigationBarTextColor)(theme)
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
key: "render",
|
|
59
|
+
value: function render() {
|
|
60
|
+
var listItemThemeStyle = this.getListItemThemeStyle(this.props.theme);
|
|
61
|
+
|
|
62
|
+
if (typeof this.props.listItem === 'string') {
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("span", {
|
|
64
|
+
style: listItemThemeStyle
|
|
65
|
+
}, this.props.listItem));
|
|
66
|
+
} else if (_typeof(this.props.listItem) === 'object') {
|
|
67
|
+
return /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
68
|
+
href: this.props.listItem.href,
|
|
69
|
+
style: listItemThemeStyle
|
|
70
|
+
}, this.props.listItem.name));
|
|
71
|
+
} else {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}]);
|
|
76
|
+
|
|
77
|
+
return NavigationBarListItem;
|
|
78
|
+
}(_react.default.Component);
|
|
79
|
+
|
|
80
|
+
NavigationBarListItem.propTypes = {
|
|
81
|
+
listItem: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]),
|
|
82
|
+
theme: _propTypes.default.object
|
|
83
|
+
};
|
|
84
|
+
var _default = NavigationBarListItem;
|
|
85
|
+
exports.default = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
NavigationBarListItem example:
|
|
2
|
+
```js
|
|
3
|
+
<ul>
|
|
4
|
+
<NavigationBarListItem listItem='Primary item 1' />
|
|
5
|
+
<NavigationBarListItem listItem={{name: 'Primary item 2', href: '#'}} />
|
|
6
|
+
</ul>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Themed NavigationBarListItem example:
|
|
10
|
+
```js
|
|
11
|
+
import customTheme from 'data/customTheme';
|
|
12
|
+
<ul>
|
|
13
|
+
<NavigationBarListItem listItem='Primary item 1' theme={customTheme} />
|
|
14
|
+
<NavigationBarListItem listItem={{name: 'Primary item 2', href: '#'}} theme={customTheme} />
|
|
15
|
+
</ul>
|
|
16
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _PaperModule = _interopRequireDefault(require("./Paper.module.scss"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
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 Paper = /*#__PURE__*/function (_React$Component) {
|
|
39
|
+
_inherits(Paper, _React$Component);
|
|
40
|
+
|
|
41
|
+
var _super = _createSuper(Paper);
|
|
42
|
+
|
|
43
|
+
function Paper() {
|
|
44
|
+
_classCallCheck(this, Paper);
|
|
45
|
+
|
|
46
|
+
return _super.apply(this, arguments);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
_createClass(Paper, [{
|
|
50
|
+
key: "render",
|
|
51
|
+
value: function render() {
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
53
|
+
className: "".concat(_PaperModule.default.paper, " ").concat(this.props.noMargin ? _PaperModule.default.noMargin : '', " ").concat(this.props.noPadding ? _PaperModule.default.noPadding : '')
|
|
54
|
+
}, this.props.children);
|
|
55
|
+
}
|
|
56
|
+
}]);
|
|
57
|
+
|
|
58
|
+
return Paper;
|
|
59
|
+
}(_react.default.Component);
|
|
60
|
+
|
|
61
|
+
;
|
|
62
|
+
Paper.propTypes = {
|
|
63
|
+
noMargin: _propTypes.default.bool,
|
|
64
|
+
noPadding: _propTypes.default.bool
|
|
65
|
+
};
|
|
66
|
+
Paper.defaultProps = {
|
|
67
|
+
noMargin: false,
|
|
68
|
+
noPadding: false
|
|
69
|
+
};
|
|
70
|
+
var _default = Paper;
|
|
71
|
+
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
:local(.paper) {
|
|
2
|
+
line-height: 1.6;
|
|
3
|
+
position: relative;
|
|
4
|
+
padding: 24px 28px;
|
|
5
|
+
margin: 20px 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
background: white;
|
|
8
|
+
box-shadow: 0 2px 3px rgba(0,0,0,0.18);
|
|
9
|
+
|
|
10
|
+
&:local(.noMargin) {
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&:local(.noPadding) {
|
|
15
|
+
padding: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _theme = require("../functions/theme");
|
|
15
|
+
|
|
16
|
+
var _RadioButtonIconModule = _interopRequireDefault(require("./RadioButtonIcon.module.scss"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
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 RadioButtonIcon = /*#__PURE__*/function (_React$Component) {
|
|
47
|
+
_inherits(RadioButtonIcon, _React$Component);
|
|
48
|
+
|
|
49
|
+
var _super = _createSuper(RadioButtonIcon);
|
|
50
|
+
|
|
51
|
+
function RadioButtonIcon() {
|
|
52
|
+
_classCallCheck(this, RadioButtonIcon);
|
|
53
|
+
|
|
54
|
+
return _super.apply(this, arguments);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
_createClass(RadioButtonIcon, [{
|
|
58
|
+
key: "render",
|
|
59
|
+
value: function render() {
|
|
60
|
+
var inlineStyle = {
|
|
61
|
+
height: this.props.size,
|
|
62
|
+
width: this.props.size
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
if (this.props.theme && this.props.checked) {
|
|
66
|
+
inlineStyle = _objectSpread(_objectSpread({}, inlineStyle), {}, {
|
|
67
|
+
background: (0, _theme.getThemePaletteBackgroundColor)(this.props.theme, 'primary'),
|
|
68
|
+
boxShadow: "0 0 0 1px ".concat((0, _theme.getThemePaletteBackgroundColor)(this.props.theme, 'primary'))
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
73
|
+
className: "".concat(_RadioButtonIconModule.default.radioButtonIcon, " ").concat(this.props.checked ? _RadioButtonIconModule.default.checked : ''),
|
|
74
|
+
style: inlineStyle
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}]);
|
|
78
|
+
|
|
79
|
+
return RadioButtonIcon;
|
|
80
|
+
}(_react.default.Component);
|
|
81
|
+
|
|
82
|
+
RadioButtonIcon.propTypes = {
|
|
83
|
+
size: _propTypes.default.string,
|
|
84
|
+
checked: _propTypes.default.bool,
|
|
85
|
+
theme: _propTypes.default.object
|
|
86
|
+
};
|
|
87
|
+
RadioButtonIcon.defaultProps = {
|
|
88
|
+
size: '10px',
|
|
89
|
+
checked: false
|
|
90
|
+
};
|
|
91
|
+
var _default = RadioButtonIcon;
|
|
92
|
+
exports.default = _default;
|