@speakapbv/dough-component-library 9.18.2 → 9.18.3

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/index.es.js CHANGED
@@ -3889,11 +3889,12 @@ var CheckBox = forwardRef(function (props, ref) {
3889
3889
  },
3890
3890
  }); });
3891
3891
  var handleChange = function () {
3892
- if (!props.checkOnly || (props.checkOnly && !props.value)) {
3893
- if (props.onChange) {
3894
- props.onChange(!props.value);
3895
- }
3892
+ if (props.disabled ||
3893
+ !props.onChange ||
3894
+ (props.checkOnly && props.value)) {
3895
+ return;
3896
3896
  }
3897
+ props.onChange(!props.value);
3897
3898
  };
3898
3899
  var getIcon = function (val) {
3899
3900
  if (val !== -1) {
@@ -3911,7 +3912,7 @@ var CheckBox = forwardRef(function (props, ref) {
3911
3912
  checked: props.value === 1 || props.value,
3912
3913
  rounded: props.rounded,
3913
3914
  }) },
3914
- React.createElement("input", { readOnly: true, ref: hiddenInputRef, checked: props.value === 1 || props.value ? true : false, className: cn(props.inputClassName, "dough-hidden-input"), type: props.checkOnly ? "radio" : "checkbox", name: props.name, value: props.value ? "on" : "off" }),
3915
+ React.createElement("input", { readOnly: true, ref: hiddenInputRef, checked: props.value === 1 || props.value ? true : false, className: cn(props.inputClassName, "dough-hidden-input"), disabled: props === null || props === void 0 ? void 0 : props.disabled, type: props.checkOnly ? "radio" : "checkbox", name: props.name, value: props.value ? "on" : "off" }),
3915
3916
  React.createElement(Box, { display: BoxDisplay.FLEX, alignItems: BoxAlign.CENTER, wrap: BoxWrap.NOWRAP },
3916
3917
  React.createElement(Box, { display: BoxDisplay.INLINE_FLEX, alignItems: BoxAlign.CENTER, className: "dough-selection-left-box", padding: Sizes.XXS },
3917
3918
  React.createElement(Button, { className: cn("dough-selection-button", "dough-checkbox-size-" + size), tabIndex: props.tabIndex === undefined
package/dist/index.js CHANGED
@@ -3874,11 +3874,12 @@ var CheckBox = React.forwardRef(function (props, ref) {
3874
3874
  },
3875
3875
  }); });
3876
3876
  var handleChange = function () {
3877
- if (!props.checkOnly || (props.checkOnly && !props.value)) {
3878
- if (props.onChange) {
3879
- props.onChange(!props.value);
3880
- }
3877
+ if (props.disabled ||
3878
+ !props.onChange ||
3879
+ (props.checkOnly && props.value)) {
3880
+ return;
3881
3881
  }
3882
+ props.onChange(!props.value);
3882
3883
  };
3883
3884
  var getIcon = function (val) {
3884
3885
  if (val !== -1) {
@@ -3896,7 +3897,7 @@ var CheckBox = React.forwardRef(function (props, ref) {
3896
3897
  checked: props.value === 1 || props.value,
3897
3898
  rounded: props.rounded,
3898
3899
  }) },
3899
- React__default.createElement("input", { readOnly: true, ref: hiddenInputRef, checked: props.value === 1 || props.value ? true : false, className: cn(props.inputClassName, "dough-hidden-input"), type: props.checkOnly ? "radio" : "checkbox", name: props.name, value: props.value ? "on" : "off" }),
3900
+ React__default.createElement("input", { readOnly: true, ref: hiddenInputRef, checked: props.value === 1 || props.value ? true : false, className: cn(props.inputClassName, "dough-hidden-input"), disabled: props === null || props === void 0 ? void 0 : props.disabled, type: props.checkOnly ? "radio" : "checkbox", name: props.name, value: props.value ? "on" : "off" }),
3900
3901
  React__default.createElement(Box, { display: exports.BoxDisplay.FLEX, alignItems: exports.BoxAlign.CENTER, wrap: exports.BoxWrap.NOWRAP },
3901
3902
  React__default.createElement(Box, { display: exports.BoxDisplay.INLINE_FLEX, alignItems: exports.BoxAlign.CENTER, className: "dough-selection-left-box", padding: exports.Sizes.XXS },
3902
3903
  React__default.createElement(Button, { className: cn("dough-selection-button", "dough-checkbox-size-" + size), tabIndex: props.tabIndex === undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speakapbv/dough-component-library",
3
- "version": "9.18.2",
3
+ "version": "9.18.3",
4
4
  "description": "DOUGH: Speakap React Component Library",
5
5
  "author": "Speakap",
6
6
  "license": "MIT",