@xqmsg/ui-core 0.16.5 → 0.16.6
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/ui-core.cjs.development.js +13 -6
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +13 -6
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/StackedCheckbox/StackedCheckbox.tsx +12 -4
- package/src/components/input/index.tsx +6 -3
|
@@ -499,12 +499,20 @@ function Form(_ref) {
|
|
|
499
499
|
var StackedCheckbox = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
500
500
|
var value = _ref2.value,
|
|
501
501
|
label = _ref2.label,
|
|
502
|
-
|
|
502
|
+
_onChange = _ref2.onChange;
|
|
503
|
+
if (value === null) return null;
|
|
503
504
|
return /*#__PURE__*/React__default.createElement(react.Checkbox, {
|
|
504
505
|
ref: _ref,
|
|
505
506
|
value: String(value),
|
|
506
|
-
defaultChecked: Boolean(
|
|
507
|
-
|
|
507
|
+
defaultChecked: Boolean(value),
|
|
508
|
+
defaultValue: value,
|
|
509
|
+
onChange: function onChange(e) {
|
|
510
|
+
if (_onChange) return _onChange(e.target.checked);
|
|
511
|
+
}
|
|
512
|
+
}, /*#__PURE__*/React__default.createElement(react.Text, {
|
|
513
|
+
fontSize: "13px",
|
|
514
|
+
alignSelf: "center"
|
|
515
|
+
}, label));
|
|
508
516
|
});
|
|
509
517
|
|
|
510
518
|
function _extends$2() {
|
|
@@ -1696,7 +1704,6 @@ function Input(_ref) {
|
|
|
1696
1704
|
onChange: onChange,
|
|
1697
1705
|
onBlur: onBlur,
|
|
1698
1706
|
ref: ref,
|
|
1699
|
-
disabled: disabled,
|
|
1700
1707
|
value: value,
|
|
1701
1708
|
defaultValue: defaultValue,
|
|
1702
1709
|
label: label
|
|
@@ -1778,8 +1785,8 @@ function Input(_ref) {
|
|
|
1778
1785
|
id: name,
|
|
1779
1786
|
isInvalid: isInvalid,
|
|
1780
1787
|
position: "relative",
|
|
1781
|
-
py: label || helperText || isInvalid ? 6 : 0
|
|
1782
|
-
}, label && /*#__PURE__*/React__default.createElement(Label$1, {
|
|
1788
|
+
py: (label || helperText || isInvalid) && inputType !== 'checkbox' ? 6 : 0
|
|
1789
|
+
}, label && inputType !== 'checkbox' && /*#__PURE__*/React__default.createElement(Label$1, {
|
|
1783
1790
|
tooltipText: tooltipText,
|
|
1784
1791
|
label: label,
|
|
1785
1792
|
isRequired: isRequired
|