@xqmsg/ui-core 0.16.5 → 0.16.7

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.
@@ -6,11 +6,9 @@ declare const _default: {
6
6
  color: string;
7
7
  };
8
8
  helperText: {
9
- position: string;
10
- color: string;
11
9
  mt: number;
12
10
  ml: number;
13
- bottom: number;
11
+ color: string;
14
12
  fontSize: string;
15
13
  };
16
14
  };
@@ -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
- defaultValue = _ref2.defaultValue;
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(defaultValue)
507
- }, label);
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() {
@@ -1573,8 +1581,7 @@ var Label$1 = function Label(_ref) {
1573
1581
  isRequired = _ref.isRequired,
1574
1582
  label = _ref.label;
1575
1583
  return /*#__PURE__*/React__default.createElement(react.FormLabel, {
1576
- display: "flex",
1577
- alignItems: "center"
1584
+ display: "flex"
1578
1585
  }, label, isRequired && /*#__PURE__*/React__default.createElement(react.Box, {
1579
1586
  ml: 1,
1580
1587
  color: colors.label.error
@@ -1696,7 +1703,6 @@ function Input(_ref) {
1696
1703
  onChange: onChange,
1697
1704
  onBlur: onBlur,
1698
1705
  ref: ref,
1699
- disabled: disabled,
1700
1706
  value: value,
1701
1707
  defaultValue: defaultValue,
1702
1708
  label: label
@@ -1778,8 +1784,8 @@ function Input(_ref) {
1778
1784
  id: name,
1779
1785
  isInvalid: isInvalid,
1780
1786
  position: "relative",
1781
- py: label || helperText || isInvalid ? 6 : 0
1782
- }, label && /*#__PURE__*/React__default.createElement(Label$1, {
1787
+ py: (label || helperText || isInvalid) && inputType !== 'checkbox' ? 6 : 0
1788
+ }, label && inputType !== 'checkbox' && /*#__PURE__*/React__default.createElement(Label$1, {
1783
1789
  tooltipText: tooltipText,
1784
1790
  label: label,
1785
1791
  isRequired: isRequired
@@ -2452,11 +2458,9 @@ function baseStyleRequiredIndicator() {
2452
2458
 
2453
2459
  function baseStyleHelperText() {
2454
2460
  return {
2455
- position: 'absolute',
2456
- color: colors.label.secondary.light,
2457
2461
  mt: 1,
2458
2462
  ml: 1,
2459
- bottom: 0,
2463
+ color: colors.label.secondary.light,
2460
2464
  fontSize: '13px'
2461
2465
  };
2462
2466
  }