@uncinc/uncinc-react-kitchen-sink 2.16.3 → 2.16.4

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.
@@ -18,7 +18,8 @@ export var Checkbox = function Checkbox(props) {
18
18
  _onChange = props.onChange,
19
19
  className = props.className,
20
20
  wrapperClassName = props.wrapperClassName,
21
- disabled = props.disabled;
21
+ disabled = props.disabled,
22
+ id = props.id;
22
23
  var _useExtendedFormikCon = useExtendedFormikContext(),
23
24
  values = _useExtendedFormikCon.values,
24
25
  errors = _useExtendedFormikCon.errors,
@@ -57,7 +58,7 @@ export var Checkbox = function Checkbox(props) {
57
58
  }, function (_ref) {
58
59
  var field = _ref.field,
59
60
  form = _ref.form;
60
- var id = "".concat(props.fieldName, "--").concat(props.value);
61
+ var elementId = "".concat(props.fieldName, "--").concat(props.value).concat(id ? "--".concat(id) : '');
61
62
  // TODO: Remove the WebformCheckboxes class (BREAKING): This shouldn't be in KS.
62
63
  var classes = c('Checkboxes__checkbox__input', 'WebformCheckboxes__checkbox__input', {
63
64
  'icon-before': true,
@@ -67,11 +68,11 @@ export var Checkbox = function Checkbox(props) {
67
68
  });
68
69
  return /*#__PURE__*/React.createElement("label", {
69
70
  className: classes,
70
- htmlFor: id
71
+ htmlFor: elementId
71
72
  }, /*#__PURE__*/React.createElement("input", _extends({}, field, {
72
73
  name: fieldName,
73
74
  type: "checkbox",
74
- id: id,
75
+ id: elementId,
75
76
  checked: field.value,
76
77
  onChange: function onChange(e) {
77
78
  field.onChange(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uncinc/uncinc-react-kitchen-sink",
3
- "version": "2.16.3",
3
+ "version": "2.16.4",
4
4
  "description": "Default React components that are easily extended.",
5
5
  "author": "uncinc",
6
6
  "license": "MIT",