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,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,62 +21,24 @@ 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; }
|
|
24
|
+
var RadioButtonIcon = function RadioButtonIcon(props) {
|
|
25
|
+
var inlineStyle = {
|
|
26
|
+
height: props.size,
|
|
27
|
+
width: props.size
|
|
28
|
+
};
|
|
41
29
|
|
|
42
|
-
|
|
30
|
+
if (props.theme && props.checked) {
|
|
31
|
+
var _objectSpread2;
|
|
43
32
|
|
|
44
|
-
|
|
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);
|
|
33
|
+
inlineStyle = _objectSpread(_objectSpread({}, inlineStyle), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, !props.hasErrors && "background", (0, _theme.getThemePaletteBackgroundColor)(props.theme, "primary")), _defineProperty(_objectSpread2, !props.hasErrors && "boxShadow", "0 0 0 1px ".concat((0, _theme.getThemePaletteBackgroundColor)(props.theme, "primary"))), _objectSpread2));
|
|
55
34
|
}
|
|
56
35
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
var props = {
|
|
73
|
-
className: "".concat(_RadioButtonIconModule.default.radioButtonIcon, " ").concat(this.props.checked ? _RadioButtonIconModule.default.checked : '', " ").concat(this.props.disabled ? _RadioButtonIconModule.default.disabled : '', " ").concat(this.props.hasErrors ? _RadioButtonIconModule.default.hasErrors : ''),
|
|
74
|
-
style: inlineStyle
|
|
75
|
-
};
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement("span", props);
|
|
77
|
-
}
|
|
78
|
-
}]);
|
|
79
|
-
|
|
80
|
-
return RadioButtonIcon;
|
|
81
|
-
}(_react.default.Component);
|
|
36
|
+
var radioButtonIconProps = {
|
|
37
|
+
className: "".concat(_RadioButtonIconModule.default.radioButtonIcon, " ").concat(props.checked ? _RadioButtonIconModule.default.checked : "", " ").concat(props.disabled ? _RadioButtonIconModule.default.disabled : "", " ").concat(props.hasErrors ? _RadioButtonIconModule.default.hasErrors : ""),
|
|
38
|
+
style: inlineStyle
|
|
39
|
+
};
|
|
40
|
+
return _react.default.createElement("span", radioButtonIconProps);
|
|
41
|
+
};
|
|
82
42
|
|
|
83
43
|
RadioButtonIcon.propTypes = {
|
|
84
44
|
size: _propTypes.default.string,
|
|
@@ -88,7 +48,7 @@ RadioButtonIcon.propTypes = {
|
|
|
88
48
|
hasErrors: _propTypes.default.bool
|
|
89
49
|
};
|
|
90
50
|
RadioButtonIcon.defaultProps = {
|
|
91
|
-
size:
|
|
51
|
+
size: "10px",
|
|
92
52
|
checked: false,
|
|
93
53
|
disabled: false,
|
|
94
54
|
hasErrors: false
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
@import "../style/global.scss";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
.radioButtonIcon {
|
|
4
|
+
@include border-radius(50%);
|
|
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
|
+
background: white;
|
|
13
|
+
margin-right: 0.4em;
|
|
14
|
+
margin-top: 2px;
|
|
15
|
+
border: 0.3em solid white;
|
|
16
|
+
cursor: pointer;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
&:local(.hasErrors) {
|
|
22
|
-
@include box-shadow(0 0 2px 1px #9d2024);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&:local(.checked) {
|
|
26
|
-
background: $color-primary;
|
|
27
|
-
&:local(.hasErrors) {
|
|
28
|
-
background: #9d2024;
|
|
18
|
+
&:not(.hasErrors) {
|
|
19
|
+
@include box-shadow(0 0 0 1px #6a6262);
|
|
29
20
|
}
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
&.hasErrors {
|
|
22
|
+
@include box-shadow(0 0 2px 1px $color-error);
|
|
32
23
|
}
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
|
|
25
|
+
&.checked {
|
|
26
|
+
background: $color-primary;
|
|
27
|
+
&.hasErrors {
|
|
28
|
+
background: $color-error;
|
|
29
|
+
}
|
|
30
|
+
&:not(.hasErrors) {
|
|
31
|
+
@include box-shadow(0 0 0 1px $color-dark-blue);
|
|
32
|
+
}
|
|
33
|
+
&.hasErrors {
|
|
34
|
+
@include box-shadow(0 0 2px 1px $color-error);
|
|
35
|
+
}
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
&.disabled {
|
|
38
|
+
opacity: 0.5;
|
|
39
|
+
border-color: #bfbfbf;
|
|
40
|
+
&:not(.checked) {
|
|
41
|
+
background: #bfbfbf;
|
|
42
|
+
}
|
|
42
43
|
}
|
|
43
|
-
}
|
|
44
44
|
}
|
|
@@ -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,67 +15,30 @@ var _RadioButtonInputModule = _interopRequireDefault(require("./RadioButtonInput
|
|
|
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 RadioButtonInput() {
|
|
46
|
-
_classCallCheck(this, RadioButtonInput);
|
|
47
|
-
|
|
48
|
-
return _super.apply(this, arguments);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
_createClass(RadioButtonInput, [{
|
|
52
|
-
key: "render",
|
|
53
|
-
value: function render() {
|
|
54
|
-
var labelProps = {
|
|
55
|
-
className: "".concat(_RadioButtonInputModule.default.radioButtonInput, " ").concat(this.props.checked ? _RadioButtonInputModule.default.checked : "", " ").concat(this.props.disabled ? _RadioButtonInputModule.default.disabled : "", " ").concat(this.props.hasErrors ? _RadioButtonInputModule.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
|
-
hasErrors: this.props.contentOnly && this.props.hasErrors
|
|
63
|
-
};
|
|
64
|
-
var inputProps = {
|
|
65
|
-
id: this.props.id,
|
|
66
|
-
name: this.props.name || null,
|
|
67
|
-
type: "radio",
|
|
68
|
-
value: this.props.inputValue,
|
|
69
|
-
checked: this.props.checked,
|
|
70
|
-
disabled: this.props.disabled,
|
|
71
|
-
onChange: this.props.onChange,
|
|
72
|
-
tabIndex: this.props.tabIndex || null,
|
|
73
|
-
"aria-controls": this.props["aria-controls"]
|
|
74
|
-
};
|
|
75
|
-
return /*#__PURE__*/_react.default.createElement("label", labelProps, !this.props.contentOnly ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_RadioButtonIcon.default, iconProps), /*#__PURE__*/_react.default.createElement("input", inputProps)) : null, /*#__PURE__*/_react.default.createElement("span", null, this.props.children));
|
|
76
|
-
}
|
|
77
|
-
}]);
|
|
78
|
-
|
|
79
|
-
return RadioButtonInput;
|
|
80
|
-
}(_react.default.Component);
|
|
18
|
+
var RadioButtonInput = function RadioButtonInput(props) {
|
|
19
|
+
var labelProps = {
|
|
20
|
+
className: "".concat(_RadioButtonInputModule.default.radioButtonInput, " ").concat(props.checked ? _RadioButtonInputModule.default.checked : "", " ").concat(props.disabled ? _RadioButtonInputModule.default.disabled : "", " ").concat(props.hasErrors ? _RadioButtonInputModule.default.hasErrors : ""),
|
|
21
|
+
htmlFor: props.id
|
|
22
|
+
};
|
|
23
|
+
var iconProps = {
|
|
24
|
+
checked: props.checked,
|
|
25
|
+
disabled: props.disabled,
|
|
26
|
+
theme: props.theme,
|
|
27
|
+
hasErrors: !props.contentOnly && props.hasErrors
|
|
28
|
+
};
|
|
29
|
+
var inputProps = {
|
|
30
|
+
id: props.id,
|
|
31
|
+
name: props.name || null,
|
|
32
|
+
type: "radio",
|
|
33
|
+
value: props.inputValue,
|
|
34
|
+
checked: props.checked,
|
|
35
|
+
disabled: props.disabled,
|
|
36
|
+
onChange: props.onChange,
|
|
37
|
+
tabIndex: props.tabIndex || null,
|
|
38
|
+
"aria-controls": props["aria-controls"]
|
|
39
|
+
};
|
|
40
|
+
return _react.default.createElement("label", labelProps, !props.contentOnly ? _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_RadioButtonIcon.default, iconProps), _react.default.createElement("input", inputProps)) : null, _react.default.createElement("span", null, props.children));
|
|
41
|
+
};
|
|
81
42
|
|
|
82
43
|
RadioButtonInput.propTypes = {
|
|
83
44
|
checked: _propTypes.default.bool,
|
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
@import "../style/global.scss";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
border: 1px solid transparent;
|
|
3
|
+
.radioButtonInput {
|
|
4
|
+
display: flex;
|
|
5
|
+
margin-right: 1em;
|
|
6
|
+
border: 1px solid transparent;
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
&:not(.contentOnly):not(.disabled) {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
input {
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
13
|
}
|
|
14
|
-
}
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
&.hasErrors {
|
|
16
|
+
span {
|
|
17
|
+
color: $color-error;
|
|
18
|
+
}
|
|
20
19
|
}
|
|
21
|
-
}
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
&:focus-within {
|
|
22
|
+
outline-width: 2px;
|
|
23
|
+
outline-color: $color-focus-outline;
|
|
24
|
+
outline-style: auto;
|
|
25
|
+
outline-offset: 1px;
|
|
26
|
+
}
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
input[type="radio"] {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
position: absolute;
|
|
31
|
+
}
|
|
34
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 _RadioButtonListModule = _interopRequireDefault(require("./RadioButtonList.module.scss"));
|
|
11
13
|
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
16
|
var RadioButtonList = function RadioButtonList(props) {
|
|
15
|
-
|
|
17
|
+
var _props$legend;
|
|
18
|
+
|
|
19
|
+
return _react.default.createElement("fieldset", {
|
|
16
20
|
className: _RadioButtonListModule.default.radioButtonList
|
|
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
|
+
RadioButtonList.propTypes = {
|
|
25
|
+
legend: _propTypes.default.string
|
|
26
|
+
};
|
|
20
27
|
var _default = RadioButtonList;
|
|
21
28
|
exports.default = _default;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
@import "../style/global.scss";
|
|
2
|
+
|
|
3
|
+
fieldset.radioButtonList {
|
|
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 _RadioButtonListItemModule = _interopRequireDefault(require("./RadioButtonLi
|
|
|
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 RadioButtonListItem = function RadioButtonListItem(props) {
|
|
25
21
|
var listItemClassNameArray = [_RadioButtonListItemModule.default.radioButtonListItem, props.disabled ? _RadioButtonListItemModule.default.disabled : null, props.compact ? _RadioButtonListItemModule.default.compact : null, props.contentOnly ? _RadioButtonListItemModule.default.contentOnly : null, props.hasErrors ? _RadioButtonListItemModule.default.hasErrors : null];
|
|
26
22
|
var listItemClassNameString = (0, _helpers.classNameArrayToClassNameString)(listItemClassNameArray);
|
|
@@ -35,9 +31,9 @@ var RadioButtonListItem = function RadioButtonListItem(props) {
|
|
|
35
31
|
name: props.name,
|
|
36
32
|
theme: props.theme
|
|
37
33
|
};
|
|
38
|
-
return
|
|
34
|
+
return _react.default.createElement("div", {
|
|
39
35
|
className: listItemClassNameString
|
|
40
|
-
},
|
|
36
|
+
}, _react.default.createElement(_RadioButtonInput.default, inputProps, props.children));
|
|
41
37
|
};
|
|
42
38
|
|
|
43
39
|
RadioButtonListItem.propTypes = {
|
|
@@ -48,6 +44,7 @@ RadioButtonListItem.propTypes = {
|
|
|
48
44
|
id: _propTypes.default.string.isRequired,
|
|
49
45
|
onChange: _propTypes.default.func,
|
|
50
46
|
contentOnly: _propTypes.default.bool,
|
|
47
|
+
compact: _propTypes.default.bool,
|
|
51
48
|
theme: _propTypes.default.object,
|
|
52
49
|
hasErrors: _propTypes.default.bool
|
|
53
50
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import "../style/global.scss";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
.radioButtonListItem {
|
|
4
4
|
@include box-sizing(content-box);
|
|
5
5
|
@include border-radius(5px);
|
|
6
6
|
@include transition(all 0.1s ease-in-out);
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
font-size: 17px;
|
|
19
19
|
color: #000;
|
|
20
20
|
|
|
21
|
-
&:not(
|
|
21
|
+
&:not(.contentOnly):not(.compact) {
|
|
22
22
|
@include box-shadow(0 0 2px $color-dark-blue);
|
|
23
23
|
background: white;
|
|
24
24
|
margin-bottom: 10px;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
&.contentOnly {
|
|
28
28
|
cursor: auto;
|
|
29
29
|
label {
|
|
30
30
|
cursor: auto;
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
&.disabled {
|
|
36
36
|
label {
|
|
37
37
|
cursor: auto;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
&.checked:not(.contentOnly):not(.compact):not(.disabled) {
|
|
42
42
|
@include box-shadow(0 0 0 1px $color-dark-blue, 0 0 4px 0 $color-dark-blue);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
&:not(
|
|
45
|
+
&:not(.checked):not(.contentOnly):not(.compact):not(.disabled):hover {
|
|
46
46
|
@include box-shadow(0 0 6px $color-dark-blue);
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
cursor: pointer;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
&.compact {
|
|
57
57
|
display: table;
|
|
58
58
|
label {
|
|
59
59
|
padding: 6px 4px;
|