@ctlyst.id/internal-ui 2.0.21 → 2.0.23

Sign up to get free protection for your applications and to get access to all the features.
@@ -384,19 +384,21 @@ CardCustom.defaultProps = {
384
384
  isRounded: true
385
385
  };
386
386
 
387
- function CheckboxComponent({
387
+ const CheckboxComponent = /*#__PURE__*/forwardRef$1(({
388
388
  isError = false,
389
389
  helpText = '',
390
390
  errorText = '',
391
+ boxProps,
391
392
  children,
392
393
  isDisabled,
393
394
  ...rest
394
- }) {
395
+ }, ref) => {
395
396
  const variant = isError ? 'errors' : 'unstyled';
396
- return /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
397
+ return /*#__PURE__*/React__default.createElement(Box, Object.assign({}, boxProps), /*#__PURE__*/React__default.createElement(Box, {
397
398
  display: "flex"
398
399
  }, /*#__PURE__*/React__default.createElement(Checkbox$1, Object.assign({
399
- variant: variant
400
+ variant: variant,
401
+ ref: ref
400
402
  }, rest, {
401
403
  isDisabled: isDisabled
402
404
  }), children && /*#__PURE__*/React__default.createElement(Text, {
@@ -404,7 +406,7 @@ function CheckboxComponent({
404
406
  display: "block",
405
407
  textStyle: "text.sm",
406
408
  color: isDisabled ? 'black.medium' : 'black.high'
407
- }, children))), /*#__PURE__*/React__default.createElement(Box, {
409
+ }, children))), (isError || helpText) && /*#__PURE__*/React__default.createElement(Box, {
408
410
  mt: "5px",
409
411
  ml: "24px"
410
412
  }, isError ? /*#__PURE__*/React__default.createElement(Text, {
@@ -418,11 +420,12 @@ function CheckboxComponent({
418
420
  textStyle: "text.xs",
419
421
  color: "black.medium"
420
422
  }, helpText)));
421
- }
423
+ });
422
424
  CheckboxComponent.defaultProps = {
423
425
  isError: false,
424
426
  helpText: '',
425
- errorText: ''
427
+ errorText: '',
428
+ boxProps: {}
426
429
  };
427
430
 
428
431
  const Field = props => {