dibk-design 1.0.0 → 1.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.
|
@@ -71,13 +71,10 @@ var CheckBoxIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
var props = _defineProperty({
|
|
74
|
+
var props = {
|
|
77
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 : ''),
|
|
78
76
|
style: inlineStyle
|
|
79
|
-
}
|
|
80
|
-
|
|
77
|
+
};
|
|
81
78
|
return /*#__PURE__*/_react.default.createElement("span", props, /*#__PURE__*/_react.default.createElement("span", {
|
|
82
79
|
className: _CheckBoxIconModule.default.checkmark
|
|
83
80
|
}, this.props.checked ? this.props.checkmarkCharacter : ''));
|
|
@@ -94,8 +91,7 @@ CheckBoxIcon.propTypes = {
|
|
|
94
91
|
showBox: _propTypes.default.bool,
|
|
95
92
|
theme: _propTypes.default.object,
|
|
96
93
|
hasErrors: _propTypes.default.bool,
|
|
97
|
-
checkmarkCharacter: _propTypes.default.string
|
|
98
|
-
expandable: _propTypes.default.bool
|
|
94
|
+
checkmarkCharacter: _propTypes.default.string
|
|
99
95
|
};
|
|
100
96
|
CheckBoxIcon.defaultProps = {
|
|
101
97
|
size: '20px',
|
|
@@ -103,8 +99,7 @@ CheckBoxIcon.defaultProps = {
|
|
|
103
99
|
disabled: false,
|
|
104
100
|
showBox: true,
|
|
105
101
|
hasErrors: false,
|
|
106
|
-
checkmarkCharacter: '✔'
|
|
107
|
-
expandable: false
|
|
102
|
+
checkmarkCharacter: '✔'
|
|
108
103
|
};
|
|
109
104
|
var _default = CheckBoxIcon;
|
|
110
105
|
exports.default = _default;
|
|
@@ -51,29 +51,29 @@ var CheckBoxInput = /*#__PURE__*/function (_React$Component) {
|
|
|
51
51
|
_createClass(CheckBoxInput, [{
|
|
52
52
|
key: "render",
|
|
53
53
|
value: function render() {
|
|
54
|
-
|
|
55
|
-
className: "".concat(_CheckBoxInputModule.default.checkBoxInput, " ").concat(this.props.contentOnly ? _CheckBoxInputModule.default.contentOnly :
|
|
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
56
|
htmlFor: this.props.id
|
|
57
|
-
}
|
|
57
|
+
};
|
|
58
|
+
var iconProps = {
|
|
58
59
|
checked: this.props.checked,
|
|
59
60
|
disabled: this.props.disabled,
|
|
60
61
|
theme: this.props.theme,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
type: "checkbox",
|
|
67
|
-
name: this.props.name,
|
|
62
|
+
showBox: !this.props.contentOnly,
|
|
63
|
+
hasErrors: this.props.contentOnly && this.props.hasErrors,
|
|
64
|
+
checkmarkCharacter: this.props.checkmarkCharacter
|
|
65
|
+
};
|
|
66
|
+
var inputProps = {
|
|
68
67
|
id: this.props.id,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})) : /*#__PURE__*/_react.default.createElement(_CheckBoxIcon.default, {
|
|
68
|
+
name: this.props.name || null,
|
|
69
|
+
type: "checkbox",
|
|
72
70
|
checked: this.props.checked,
|
|
73
71
|
disabled: this.props.disabled,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
onChange: this.props.onChange,
|
|
73
|
+
"aria-expanded": this.props["aria-expanded"],
|
|
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
77
|
}
|
|
78
78
|
}]);
|
|
79
79
|
|
|
@@ -90,15 +90,16 @@ CheckBoxInput.propTypes = {
|
|
|
90
90
|
hasErrors: _propTypes.default.bool,
|
|
91
91
|
theme: _propTypes.default.object,
|
|
92
92
|
checkmarkCharacter: _propTypes.default.string,
|
|
93
|
-
|
|
93
|
+
"aria-expanded": _propTypes.default.string,
|
|
94
|
+
"aria-controls": _propTypes.default.string
|
|
94
95
|
};
|
|
95
96
|
CheckBoxInput.defaultProps = {
|
|
96
97
|
checked: false,
|
|
97
98
|
disabled: false,
|
|
98
|
-
name:
|
|
99
|
+
name: "",
|
|
99
100
|
contentOnly: false,
|
|
100
101
|
hasErrors: false,
|
|
101
|
-
checkmarkCharacter:
|
|
102
|
+
checkmarkCharacter: "✔",
|
|
102
103
|
expandable: false
|
|
103
104
|
};
|
|
104
105
|
var _default = CheckBoxInput;
|
|
@@ -69,13 +69,10 @@ var RadioButtonIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
var props = _defineProperty({
|
|
72
|
+
var props = {
|
|
75
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 : ''),
|
|
76
74
|
style: inlineStyle
|
|
77
|
-
}
|
|
78
|
-
|
|
75
|
+
};
|
|
79
76
|
return /*#__PURE__*/_react.default.createElement("span", props);
|
|
80
77
|
}
|
|
81
78
|
}]);
|
|
@@ -88,15 +85,13 @@ RadioButtonIcon.propTypes = {
|
|
|
88
85
|
checked: _propTypes.default.bool,
|
|
89
86
|
disabled: _propTypes.default.bool,
|
|
90
87
|
theme: _propTypes.default.object,
|
|
91
|
-
hasErrors: _propTypes.default.bool
|
|
92
|
-
expandable: _propTypes.default.bool
|
|
88
|
+
hasErrors: _propTypes.default.bool
|
|
93
89
|
};
|
|
94
90
|
RadioButtonIcon.defaultProps = {
|
|
95
91
|
size: '10px',
|
|
96
92
|
checked: false,
|
|
97
93
|
disabled: false,
|
|
98
|
-
hasErrors: false
|
|
99
|
-
expandable: false
|
|
94
|
+
hasErrors: false
|
|
100
95
|
};
|
|
101
96
|
var _default = RadioButtonIcon;
|
|
102
97
|
exports.default = _default;
|
|
@@ -51,23 +51,28 @@ var RadioButtonInput = /*#__PURE__*/function (_React$Component) {
|
|
|
51
51
|
_createClass(RadioButtonInput, [{
|
|
52
52
|
key: "render",
|
|
53
53
|
value: function render() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
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 = {
|
|
58
59
|
checked: this.props.checked,
|
|
59
60
|
disabled: this.props.disabled,
|
|
60
61
|
theme: this.props.theme,
|
|
61
|
-
hasErrors: this.props.hasErrors
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
type: "radio",
|
|
65
|
-
onChange: this.props.onChange,
|
|
62
|
+
hasErrors: this.props.contentOnly && this.props.hasErrors
|
|
63
|
+
};
|
|
64
|
+
var inputProps = {
|
|
66
65
|
id: this.props.id,
|
|
67
|
-
name: this.props.name,
|
|
66
|
+
name: this.props.name || null,
|
|
67
|
+
type: "radio",
|
|
68
68
|
value: this.props.inputValue,
|
|
69
|
-
checked: this.props.checked
|
|
70
|
-
|
|
69
|
+
checked: this.props.checked,
|
|
70
|
+
disabled: this.props.disabled,
|
|
71
|
+
onChange: this.props.onChange,
|
|
72
|
+
"aria-expanded": this.props["aria-expanded"],
|
|
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));
|
|
71
76
|
}
|
|
72
77
|
}]);
|
|
73
78
|
|
|
@@ -77,22 +82,22 @@ var RadioButtonInput = /*#__PURE__*/function (_React$Component) {
|
|
|
77
82
|
RadioButtonInput.propTypes = {
|
|
78
83
|
checked: _propTypes.default.bool,
|
|
79
84
|
disabled: _propTypes.default.bool,
|
|
80
|
-
inputValue: _propTypes.default.string.isRequired,
|
|
81
|
-
name: _propTypes.default.string,
|
|
82
85
|
id: _propTypes.default.string.isRequired,
|
|
86
|
+
name: _propTypes.default.string,
|
|
83
87
|
onChange: _propTypes.default.func,
|
|
84
88
|
contentOnly: _propTypes.default.bool,
|
|
85
|
-
theme: _propTypes.default.object,
|
|
86
89
|
hasErrors: _propTypes.default.bool,
|
|
87
|
-
|
|
90
|
+
theme: _propTypes.default.object,
|
|
91
|
+
inputValue: _propTypes.default.string.isRequired,
|
|
92
|
+
"aria-expanded": _propTypes.default.string,
|
|
93
|
+
"aria-controls": _propTypes.default.string
|
|
88
94
|
};
|
|
89
95
|
RadioButtonInput.defaultProps = {
|
|
90
|
-
name:
|
|
96
|
+
name: "",
|
|
91
97
|
checked: false,
|
|
92
98
|
disabled: false,
|
|
93
99
|
contentOnly: false,
|
|
94
|
-
hasErrors: false
|
|
95
|
-
expandable: false
|
|
100
|
+
hasErrors: false
|
|
96
101
|
};
|
|
97
102
|
var _default = RadioButtonInput;
|
|
98
103
|
exports.default = _default;
|