@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
package/dist/ui-core.esm.js
CHANGED
|
@@ -492,12 +492,20 @@ function Form(_ref) {
|
|
|
492
492
|
var StackedCheckbox = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
493
493
|
var value = _ref2.value,
|
|
494
494
|
label = _ref2.label,
|
|
495
|
-
|
|
495
|
+
_onChange = _ref2.onChange;
|
|
496
|
+
if (value === null) return null;
|
|
496
497
|
return /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
497
498
|
ref: _ref,
|
|
498
499
|
value: String(value),
|
|
499
|
-
defaultChecked: Boolean(
|
|
500
|
-
|
|
500
|
+
defaultChecked: Boolean(value),
|
|
501
|
+
defaultValue: value,
|
|
502
|
+
onChange: function onChange(e) {
|
|
503
|
+
if (_onChange) return _onChange(e.target.checked);
|
|
504
|
+
}
|
|
505
|
+
}, /*#__PURE__*/React__default.createElement(Text$2, {
|
|
506
|
+
fontSize: "13px",
|
|
507
|
+
alignSelf: "center"
|
|
508
|
+
}, label));
|
|
501
509
|
});
|
|
502
510
|
|
|
503
511
|
function _extends$2() {
|
|
@@ -1689,7 +1697,6 @@ function Input(_ref) {
|
|
|
1689
1697
|
onChange: onChange,
|
|
1690
1698
|
onBlur: onBlur,
|
|
1691
1699
|
ref: ref,
|
|
1692
|
-
disabled: disabled,
|
|
1693
1700
|
value: value,
|
|
1694
1701
|
defaultValue: defaultValue,
|
|
1695
1702
|
label: label
|
|
@@ -1771,8 +1778,8 @@ function Input(_ref) {
|
|
|
1771
1778
|
id: name,
|
|
1772
1779
|
isInvalid: isInvalid,
|
|
1773
1780
|
position: "relative",
|
|
1774
|
-
py: label || helperText || isInvalid ? 6 : 0
|
|
1775
|
-
}, label && /*#__PURE__*/React__default.createElement(Label$1, {
|
|
1781
|
+
py: (label || helperText || isInvalid) && inputType !== 'checkbox' ? 6 : 0
|
|
1782
|
+
}, label && inputType !== 'checkbox' && /*#__PURE__*/React__default.createElement(Label$1, {
|
|
1776
1783
|
tooltipText: tooltipText,
|
|
1777
1784
|
label: label,
|
|
1778
1785
|
isRequired: isRequired
|