@deque/cauldron-react 5.5.0-canary.720bc9bd → 5.5.1

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.
Files changed (2) hide show
  1. package/lib/index.js +24 -23
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -2648,24 +2648,25 @@ var RadioGroup = function (_a) {
2648
2648
  var label = radio.label, disabled = radio.disabled, radioValue = radio.value, labelDescription = radio.labelDescription, id = radio.id, className = radio.className, other = tslib.__rest(radio, ["label", "disabled", "value", "labelDescription", "id", "className"]);
2649
2649
  var isChecked = currentValue === radioValue;
2650
2650
  var isFocused = focusIndex === index;
2651
- return (React__default.createElement("div", { className: classNames('Radio is--flex-row', className), key: id },
2652
- React__default.createElement("input", tslib.__assign({ type: "radio", name: name, value: radioValue, id: id, ref: function (input) {
2653
- if (!input) {
2654
- return;
2655
- }
2656
- inputs.current.push(input);
2657
- }, onFocus: function () { return onRadioFocus(index); }, onBlur: function () { return onRadioBlur(); }, onChange: function () {
2658
- var _a;
2659
- handleChange(radioValue);
2660
- onChange(radio, (_a = inputs.current) === null || _a === void 0 ? void 0 : _a[index]);
2661
- }, disabled: disabled, checked: isChecked, "aria-describedby": labelDescription ? "".concat(id, "Desc") : undefined }, other)),
2662
- React__default.createElement("label", { htmlFor: id, className: classNames('Field__label', {
2663
- 'Field__label--disabled': disabled
2664
- }) }, label),
2665
- React__default.createElement(Icon, { className: classNames('Radio__overlay', {
2666
- 'Radio__overlay--focused': isFocused,
2667
- 'Radio__overlay--disabled': disabled
2668
- }), type: isChecked ? 'radio-checked' : 'radio-unchecked', "aria-hidden": "true", onClick: function () { return onRadioClick(index); } }),
2651
+ return (React__default.createElement("div", { className: "Radio__wrap", key: id },
2652
+ React__default.createElement("div", { className: classNames('Radio is--flex-row', className) },
2653
+ React__default.createElement("input", tslib.__assign({ type: "radio", name: name, value: radioValue, id: id, ref: function (input) {
2654
+ if (!input) {
2655
+ return;
2656
+ }
2657
+ inputs.current.push(input);
2658
+ }, onFocus: function () { return onRadioFocus(index); }, onBlur: function () { return onRadioBlur(); }, onChange: function () {
2659
+ var _a;
2660
+ handleChange(radioValue);
2661
+ onChange(radio, (_a = inputs.current) === null || _a === void 0 ? void 0 : _a[index]);
2662
+ }, disabled: disabled, checked: isChecked, "aria-describedby": labelDescription ? "".concat(id, "Desc") : undefined }, other)),
2663
+ React__default.createElement("label", { htmlFor: id, className: classNames('Radio__label', {
2664
+ 'Field__label--disabled': disabled
2665
+ }) }, label),
2666
+ React__default.createElement(Icon, { className: classNames('Radio__overlay', {
2667
+ 'Radio__overlay--focused': isFocused,
2668
+ 'Radio__overlay--disabled': disabled
2669
+ }), type: isChecked ? 'radio-checked' : 'radio-unchecked', "aria-hidden": "true", onClick: function () { return onRadioClick(index); } })),
2669
2670
  labelDescription && (React__default.createElement("span", { id: "".concat(id, "Desc"), className: classNames('Field__labelDescription', {
2670
2671
  'Field__labelDescription--disabled': disabled
2671
2672
  }) }, labelDescription))));
@@ -2839,7 +2840,7 @@ var Checkbox = React.forwardRef(function (_a, ref) {
2839
2840
  if (labelDescription) {
2840
2841
  ariaDescribedbyId = tokenList(labelDescriptionId, ariaDescribedbyId);
2841
2842
  }
2842
- return (React__default.createElement(React__default.Fragment, null,
2843
+ return (React__default.createElement("div", { className: "Checkbox__wrap" },
2843
2844
  React__default.createElement("div", { className: classNames('Checkbox is--flex-row', className) },
2844
2845
  React__default.createElement("input", tslib.__assign({ id: id, ref: typeof refProp === 'function' || !refProp ? checkRef : refProp, type: "checkbox", checked: isChecked, disabled: disabled, onFocus: function (e) {
2845
2846
  setFocused(true);
@@ -2857,7 +2858,7 @@ var Checkbox = React.forwardRef(function (_a, ref) {
2857
2858
  onChange(e);
2858
2859
  }
2859
2860
  } }, other)),
2860
- React__default.createElement("label", { className: classNames('Field__label', {
2861
+ React__default.createElement("label", { className: classNames('Checkbox__label', {
2861
2862
  'Field__label--disabled': disabled
2862
2863
  }), htmlFor: id }, label),
2863
2864
  React__default.createElement(Icon, { className: classNames('Checkbox__overlay', {
@@ -2872,9 +2873,9 @@ var Checkbox = React.forwardRef(function (_a, ref) {
2872
2873
  else {
2873
2874
  (_b = checkRef.current) === null || _b === void 0 ? void 0 : _b.click();
2874
2875
  }
2875
- } }),
2876
- labelDescription && (React__default.createElement("span", { id: labelDescriptionId, className: "Field__labelDescription" }, labelDescription)),
2877
- error && (React__default.createElement("div", { id: errorId, className: "Error" }, error)))));
2876
+ } })),
2877
+ labelDescription && (React__default.createElement("span", { id: labelDescriptionId, className: "Field__labelDescription" }, labelDescription)),
2878
+ error && (React__default.createElement("div", { id: errorId, className: "Error" }, error))));
2878
2879
  });
2879
2880
  Checkbox.displayName = 'Checkbox';
2880
2881
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "5.5.0-canary.720bc9bd",
3
+ "version": "5.5.1",
4
4
  "description": "Fully accessible react components library for Deque Cauldron",
5
5
  "homepage": "https://cauldron.dequelabs.com/",
6
6
  "publishConfig": {
@@ -122,4 +122,4 @@
122
122
  "\\.svg$": "<rootDir>/__tests__/svgMock.js"
123
123
  }
124
124
  }
125
- }
125
+ }