dibk-design 1.1.9 → 2.0.0
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 +9 -2
- package/dist/components/CheckBoxList.module.scss +14 -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 +9 -2
- package/dist/components/RadioButtonList.module.scss +14 -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 +63 -28
- 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 -26
- 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 -28
- 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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import "../style/global.scss";
|
|
2
|
+
|
|
2
3
|
@include keyframes(pushnext) {
|
|
3
4
|
0% {
|
|
4
5
|
@include transform(rotate(45deg) translate3d(0, 0, 0));
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
.button {
|
|
30
31
|
@include appearance(none);
|
|
31
32
|
@include border-radius(0);
|
|
32
33
|
@include transition(
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
font-size: 20px;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
&.hasTheme {
|
|
57
58
|
&:hover,
|
|
58
59
|
&:focus {
|
|
59
60
|
filter: brightness(90%);
|
|
@@ -71,14 +72,14 @@
|
|
|
71
72
|
outline-offset: 0px;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
&.regular {
|
|
75
76
|
padding: 14px 24px;
|
|
76
77
|
@media only screen and (min-width: $screen-sm) {
|
|
77
78
|
padding: 17px 32px;
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
&.small {
|
|
82
83
|
padding: 6px 24px;
|
|
83
84
|
min-width: 80px;
|
|
84
85
|
line-height: 18px;
|
|
@@ -88,11 +89,11 @@
|
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
|
|
91
|
-
|
|
92
|
+
&.default {
|
|
92
93
|
background-color: #fff;
|
|
93
94
|
color: $color-primary;
|
|
94
|
-
&:not(
|
|
95
|
-
&:hover:not(
|
|
95
|
+
&:not(.hasTheme) {
|
|
96
|
+
&:hover:not(.noHover),
|
|
96
97
|
&:focus-visible,
|
|
97
98
|
&:active {
|
|
98
99
|
background-color: $color-primary;
|
|
@@ -105,11 +106,11 @@
|
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
|
|
109
|
+
&.primary {
|
|
109
110
|
background-color: $color-primary;
|
|
110
111
|
color: #fff;
|
|
111
|
-
&:not(
|
|
112
|
-
&:hover:not(
|
|
112
|
+
&:not(.hasTheme) {
|
|
113
|
+
&:hover:not(.noHover),
|
|
113
114
|
&:focus-visible,
|
|
114
115
|
&:active {
|
|
115
116
|
background-color: #fff;
|
|
@@ -123,9 +124,9 @@
|
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
&:disabled {
|
|
126
|
-
|
|
127
|
-
&:not(
|
|
128
|
-
|
|
127
|
+
&.hasTheme,
|
|
128
|
+
&:not(.hasTheme) {
|
|
129
|
+
&.default {
|
|
129
130
|
background-color: #fff;
|
|
130
131
|
cursor: default;
|
|
131
132
|
opacity: 0.6;
|
|
@@ -149,7 +150,7 @@
|
|
|
149
150
|
border-color: #afaba8;
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
|
-
|
|
153
|
+
&.primary {
|
|
153
154
|
background-color: $color-primary;
|
|
154
155
|
cursor: default;
|
|
155
156
|
opacity: 0.6;
|
|
@@ -176,11 +177,11 @@
|
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
179
|
|
|
179
|
-
|
|
180
|
+
&.rounded {
|
|
180
181
|
border-radius: 20px;
|
|
181
182
|
}
|
|
182
183
|
|
|
183
|
-
|
|
184
|
+
&.hasArrowLeft {
|
|
184
185
|
&:before {
|
|
185
186
|
@include transform(rotate(-135deg));
|
|
186
187
|
@include calc("top", "50% - 0.4rem");
|
|
@@ -205,14 +206,14 @@
|
|
|
205
206
|
@include animation(pushprev 0.8s linear infinite);
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
|
-
|
|
209
|
+
&.default {
|
|
209
210
|
&:before {
|
|
210
211
|
border-color: $color-primary;
|
|
211
212
|
}
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
215
|
|
|
215
|
-
|
|
216
|
+
&.hasArrowRight {
|
|
216
217
|
&:after {
|
|
217
218
|
@include transform(rotate(45deg));
|
|
218
219
|
@include calc("top", "50% - 0.4rem");
|
|
@@ -237,5 +238,10 @@
|
|
|
237
238
|
@include animation(pushnext 0.8s linear infinite);
|
|
238
239
|
}
|
|
239
240
|
}
|
|
241
|
+
&.default {
|
|
242
|
+
&:after {
|
|
243
|
+
border-color: $color-primary;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
240
246
|
}
|
|
241
247
|
}
|
|
@@ -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
|
});
|
|
@@ -23,67 +21,28 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
23
21
|
|
|
24
22
|
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
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
33
|
-
|
|
34
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : 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; } }
|
|
24
|
+
var CheckBoxIcon = function CheckBoxIcon(props) {
|
|
25
|
+
var inlineStyle = {
|
|
26
|
+
height: props.size,
|
|
27
|
+
width: props.size,
|
|
28
|
+
fontSize: props.size
|
|
29
|
+
};
|
|
43
30
|
|
|
44
|
-
|
|
31
|
+
if (props.theme && props.checked) {
|
|
32
|
+
var _objectSpread2;
|
|
45
33
|
|
|
46
|
-
|
|
47
|
-
_inherits(CheckBoxIcon, _React$Component);
|
|
48
|
-
|
|
49
|
-
var _super = _createSuper(CheckBoxIcon);
|
|
50
|
-
|
|
51
|
-
function CheckBoxIcon() {
|
|
52
|
-
_classCallCheck(this, CheckBoxIcon);
|
|
53
|
-
|
|
54
|
-
return _super.apply(this, arguments);
|
|
34
|
+
inlineStyle = _objectSpread(_objectSpread({}, inlineStyle), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, !props.hasErrors && "color", (0, _theme.getThemePaletteBackgroundColor)(props.theme, "primary")), _defineProperty(_objectSpread2, !props.hasErrors && props.showBox && "boxShadow", "0 0 0 1px ".concat((0, _theme.getThemePaletteBackgroundColor)(props.theme, "primary"))), _objectSpread2));
|
|
55
35
|
}
|
|
56
36
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (this.props.theme && this.props.checked) {
|
|
67
|
-
inlineStyle = _objectSpread(_objectSpread({}, inlineStyle), {}, {
|
|
68
|
-
color: (0, _theme.getThemePaletteBackgroundColor)(this.props.theme, 'primary'),
|
|
69
|
-
boxShadow: "0 0 0 1px ".concat((0, _theme.getThemePaletteBackgroundColor)(this.props.theme, 'primary')) // TODO: support theme error color
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
var props = {
|
|
75
|
-
className: "".concat(_CheckBoxIconModule.default.checkBoxIcon, " ").concat(this.props.checked ? _CheckBoxIconModule.default.checked : '', " ").concat(this.props.disabled ? _CheckBoxIconModule.default.disabled : '', " ").concat(this.props.showBox ? _CheckBoxIconModule.default.showBox : '', " ").concat(this.props.hasErrors ? _CheckBoxIconModule.default.hasErrors : ''),
|
|
76
|
-
style: inlineStyle
|
|
77
|
-
};
|
|
78
|
-
return /*#__PURE__*/_react.default.createElement("span", props, /*#__PURE__*/_react.default.createElement("span", {
|
|
79
|
-
"aria-hidden": true,
|
|
80
|
-
className: _CheckBoxIconModule.default.checkmark
|
|
81
|
-
}, this.props.checked ? this.props.checkmarkCharacter : ''));
|
|
82
|
-
}
|
|
83
|
-
}]);
|
|
84
|
-
|
|
85
|
-
return CheckBoxIcon;
|
|
86
|
-
}(_react.default.Component);
|
|
37
|
+
var checkBoxIconProps = {
|
|
38
|
+
className: "".concat(_CheckBoxIconModule.default.checkBoxIcon, " ").concat(props.checked ? _CheckBoxIconModule.default.checked : "", " ").concat(props.disabled ? _CheckBoxIconModule.default.disabled : "", " ").concat(props.showBox ? _CheckBoxIconModule.default.showBox : "", " ").concat(props.hasErrors ? _CheckBoxIconModule.default.hasErrors : ""),
|
|
39
|
+
style: inlineStyle
|
|
40
|
+
};
|
|
41
|
+
return _react.default.createElement("span", checkBoxIconProps, _react.default.createElement("span", {
|
|
42
|
+
"aria-hidden": true,
|
|
43
|
+
className: _CheckBoxIconModule.default.checkmark
|
|
44
|
+
}, props.checked ? props.checkmarkCharacter : ""));
|
|
45
|
+
};
|
|
87
46
|
|
|
88
47
|
CheckBoxIcon.propTypes = {
|
|
89
48
|
size: _propTypes.default.string,
|
|
@@ -95,12 +54,12 @@ CheckBoxIcon.propTypes = {
|
|
|
95
54
|
checkmarkCharacter: _propTypes.default.string
|
|
96
55
|
};
|
|
97
56
|
CheckBoxIcon.defaultProps = {
|
|
98
|
-
size:
|
|
57
|
+
size: "20px",
|
|
99
58
|
checked: false,
|
|
100
59
|
disabled: false,
|
|
101
60
|
showBox: true,
|
|
102
61
|
hasErrors: false,
|
|
103
|
-
checkmarkCharacter:
|
|
62
|
+
checkmarkCharacter: "✔"
|
|
104
63
|
};
|
|
105
64
|
var _default = CheckBoxIcon;
|
|
106
65
|
exports.default = _default;
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
@import "../style/global.scss";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
.checkBoxIcon {
|
|
4
|
+
@include border-radius(0);
|
|
5
|
+
@include transition(all 0.1s ease-in-out);
|
|
6
|
+
@include box-sizing(content-box);
|
|
7
|
+
display: inline-block;
|
|
8
|
+
vertical-align: middle;
|
|
9
|
+
min-width: 10px;
|
|
10
|
+
width: 10px;
|
|
11
|
+
height: 10px;
|
|
12
|
+
min-width: 20px;
|
|
13
|
+
margin-right: 0.2em;
|
|
14
|
+
line-height: 1;
|
|
15
|
+
text-align: center;
|
|
16
|
+
cursor: pointer;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
&.showBox {
|
|
19
|
+
margin-right: 0.4em;
|
|
20
|
+
margin-top: 2px;
|
|
21
|
+
background: white;
|
|
22
|
+
&:not(.hasErrors) {
|
|
23
|
+
@include box-shadow(0 0 0 1px #6a6262);
|
|
24
|
+
}
|
|
25
|
+
&.hasErrors {
|
|
26
|
+
@include box-shadow(0 0 2px 1px $color-error);
|
|
27
|
+
}
|
|
24
28
|
}
|
|
25
|
-
&:local(.hasErrors) {
|
|
26
|
-
@include box-shadow(0 0 2px 1px #9d2024);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
&.checked {
|
|
31
|
+
color: $color-primary;
|
|
32
|
+
&.hasErrors {
|
|
33
|
+
span {
|
|
34
|
+
color: $color-error;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&.showBox {
|
|
38
|
+
&:not(.hasErrors) {
|
|
39
|
+
@include box-shadow(0 0 0 1px #6a6262);
|
|
40
|
+
}
|
|
41
|
+
&.hasErrors {
|
|
42
|
+
@include box-shadow(0 0 2px 1px $color-error);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
44
45
|
}
|
|
45
|
-
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
&.disabled {
|
|
48
|
+
opacity: 0.5;
|
|
49
|
+
background: rgba(0, 0, 0, 0.25);
|
|
50
|
+
cursor: default;
|
|
51
|
+
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
.checkmark {
|
|
54
|
+
font-size: 1em;
|
|
55
|
+
line-height: 0.75em;
|
|
56
|
+
}
|
|
57
|
+
:not(.showBox) {
|
|
58
|
+
&.checkmark {
|
|
59
|
+
line-height: 1.05em;
|
|
60
|
+
}
|
|
60
61
|
}
|
|
61
|
-
}
|
|
62
62
|
}
|
|
@@ -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
|
});
|
|
@@ -17,68 +15,31 @@ var _CheckBoxInputModule = _interopRequireDefault(require("./CheckBoxInput.modul
|
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
function CheckBoxInput() {
|
|
46
|
-
_classCallCheck(this, CheckBoxInput);
|
|
47
|
-
|
|
48
|
-
return _super.apply(this, arguments);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
_createClass(CheckBoxInput, [{
|
|
52
|
-
key: "render",
|
|
53
|
-
value: function render() {
|
|
54
|
-
var labelProps = {
|
|
55
|
-
className: "".concat(_CheckBoxInputModule.default.checkBoxInput, " ").concat(this.props.contentOnly ? _CheckBoxInputModule.default.contentOnly : "", " ").concat(this.props.disabled ? _CheckBoxInputModule.default.disabled : "", " ").concat(this.props.hasErrors ? _CheckBoxInputModule.default.hasErrors : ""),
|
|
56
|
-
htmlFor: this.props.id
|
|
57
|
-
};
|
|
58
|
-
var iconProps = {
|
|
59
|
-
checked: this.props.checked,
|
|
60
|
-
disabled: this.props.disabled,
|
|
61
|
-
theme: this.props.theme,
|
|
62
|
-
showBox: !this.props.contentOnly,
|
|
63
|
-
hasErrors: this.props.contentOnly && this.props.hasErrors,
|
|
64
|
-
checkmarkCharacter: this.props.checkmarkCharacter
|
|
65
|
-
};
|
|
66
|
-
var inputProps = {
|
|
67
|
-
id: this.props.id,
|
|
68
|
-
name: this.props.name || null,
|
|
69
|
-
type: "checkbox",
|
|
70
|
-
checked: this.props.checked,
|
|
71
|
-
disabled: this.props.disabled,
|
|
72
|
-
onChange: this.props.onChange,
|
|
73
|
-
tabIndex: this.props.tabIndex || null,
|
|
74
|
-
"aria-controls": this.props["aria-controls"]
|
|
75
|
-
};
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement("label", labelProps, !this.props.contentOnly ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_CheckBoxIcon.default, iconProps), /*#__PURE__*/_react.default.createElement("input", inputProps)) : /*#__PURE__*/_react.default.createElement(_CheckBoxIcon.default, iconProps), /*#__PURE__*/_react.default.createElement("span", null, this.props.children));
|
|
77
|
-
}
|
|
78
|
-
}]);
|
|
79
|
-
|
|
80
|
-
return CheckBoxInput;
|
|
81
|
-
}(_react.default.Component);
|
|
18
|
+
var CheckBoxInput = function CheckBoxInput(props) {
|
|
19
|
+
var labelProps = {
|
|
20
|
+
className: "".concat(_CheckBoxInputModule.default.checkBoxInput, " ").concat(props.contentOnly ? _CheckBoxInputModule.default.contentOnly : "", " ").concat(props.disabled ? _CheckBoxInputModule.default.disabled : "", " ").concat(props.hasErrors ? _CheckBoxInputModule.default.hasErrors : ""),
|
|
21
|
+
htmlFor: props.id
|
|
22
|
+
};
|
|
23
|
+
var iconProps = {
|
|
24
|
+
checked: props.checked,
|
|
25
|
+
disabled: props.disabled,
|
|
26
|
+
theme: props.theme,
|
|
27
|
+
showBox: !props.contentOnly,
|
|
28
|
+
hasErrors: props.contentOnly && props.hasErrors,
|
|
29
|
+
checkmarkCharacter: props.checkmarkCharacter
|
|
30
|
+
};
|
|
31
|
+
var inputProps = {
|
|
32
|
+
id: props.id,
|
|
33
|
+
name: props.name || null,
|
|
34
|
+
type: "checkbox",
|
|
35
|
+
checked: props.checked,
|
|
36
|
+
disabled: props.disabled,
|
|
37
|
+
onChange: props.onChange,
|
|
38
|
+
tabIndex: props.tabIndex || null,
|
|
39
|
+
"aria-controls": props["aria-controls"]
|
|
40
|
+
};
|
|
41
|
+
return _react.default.createElement("label", labelProps, !props.contentOnly ? _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_CheckBoxIcon.default, iconProps), _react.default.createElement("input", inputProps)) : _react.default.createElement(_CheckBoxIcon.default, iconProps), _react.default.createElement("span", null, props.children));
|
|
42
|
+
};
|
|
82
43
|
|
|
83
44
|
CheckBoxInput.propTypes = {
|
|
84
45
|
checked: _propTypes.default.bool,
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
@import "../style/global.scss";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
.checkBoxInput {
|
|
4
|
+
display: flex;
|
|
5
|
+
margin-right: 1em;
|
|
6
|
+
border: 1px solid transparent;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
&:not(.contentOnly):not(.disabled) {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
input {
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
12
13
|
}
|
|
13
|
-
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
&.hasErrors {
|
|
16
|
+
span {
|
|
17
|
+
color: $color-error;
|
|
18
|
+
}
|
|
18
19
|
}
|
|
19
|
-
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
&:focus-within {
|
|
22
|
+
outline-width: 2px;
|
|
23
|
+
outline-color: $color-focus-outline;
|
|
24
|
+
outline-style: auto;
|
|
25
|
+
outline-offset: 1px;
|
|
26
|
+
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
input[type="checkbox"] {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
position: absolute;
|
|
31
|
+
}
|
|
32
32
|
}
|
|
@@ -7,15 +7,22 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
10
12
|
var _CheckBoxListModule = _interopRequireDefault(require("./CheckBoxList.module.scss"));
|
|
11
13
|
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
16
|
var CheckBoxList = function CheckBoxList(props) {
|
|
15
|
-
|
|
17
|
+
var _props$legend;
|
|
18
|
+
|
|
19
|
+
return _react.default.createElement("fieldset", {
|
|
16
20
|
className: _CheckBoxListModule.default.checkBoxList
|
|
17
|
-
}, props.children);
|
|
21
|
+
}, !!((_props$legend = props.legend) !== null && _props$legend !== void 0 && _props$legend.length) ? _react.default.createElement("legend", null, props.legend) : null, props.children);
|
|
18
22
|
};
|
|
19
23
|
|
|
24
|
+
CheckBoxList.propTypes = {
|
|
25
|
+
legend: _propTypes.default.string
|
|
26
|
+
};
|
|
20
27
|
var _default = CheckBoxList;
|
|
21
28
|
exports.default = _default;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
@import "../style/global.scss";
|
|
2
|
+
|
|
3
|
+
fieldset.checkBoxList {
|
|
2
4
|
margin: 0;
|
|
3
5
|
padding: 0;
|
|
4
|
-
|
|
6
|
+
border: none;
|
|
7
|
+
legend {
|
|
8
|
+
color: #000;
|
|
9
|
+
display: block;
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
line-height: 1.2;
|
|
13
|
+
margin-bottom: 2px;
|
|
14
|
+
font-family: $default-font;
|
|
15
|
+
overflow-wrap: break-word;
|
|
16
|
+
}
|
|
5
17
|
}
|
|
@@ -17,10 +17,6 @@ var _CheckBoxListItemModule = _interopRequireDefault(require("./CheckBoxListItem
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
// Dependencies
|
|
21
|
-
// Components
|
|
22
|
-
// Functions
|
|
23
|
-
// Stylesheets
|
|
24
20
|
var CheckBoxListItem = function CheckBoxListItem(props) {
|
|
25
21
|
var listItemClassNameArray = [_CheckBoxListItemModule.default.checkBoxListItem, props.checked ? _CheckBoxListItemModule.default.checked : null, props.disabled ? _CheckBoxListItemModule.default.disabled : null, props.compact ? _CheckBoxListItemModule.default.compact : null, props.contentOnly ? _CheckBoxListItemModule.default.contentOnly : null, props.hasErrors ? _CheckBoxListItemModule.default.hasErrors : null];
|
|
26
22
|
var listItemClassNameString = (0, _helpers.classNameArrayToClassNameString)(listItemClassNameArray);
|
|
@@ -34,9 +30,9 @@ var CheckBoxListItem = function CheckBoxListItem(props) {
|
|
|
34
30
|
theme: props.theme,
|
|
35
31
|
checkmarkCharacter: props.checkmarkCharacter
|
|
36
32
|
};
|
|
37
|
-
return
|
|
33
|
+
return _react.default.createElement("div", {
|
|
38
34
|
className: listItemClassNameString
|
|
39
|
-
},
|
|
35
|
+
}, _react.default.createElement(_CheckBoxInput.default, inputProps, props.children));
|
|
40
36
|
};
|
|
41
37
|
|
|
42
38
|
CheckBoxListItem.propTypes = {
|