@moda/om 21.6.5 → 21.6.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.
package/dist/index.cjs.js CHANGED
@@ -7528,19 +7528,17 @@ var Checkbox = function Checkbox(_ref) {
7528
7528
  }, [onChange, checked]);
7529
7529
  return /*#__PURE__*/React.createElement("label", {
7530
7530
  htmlFor: id,
7531
- tabIndex: 0,
7532
7531
  className: classNames('Checkbox', className, {
7533
7532
  'Checkbox--disabled': disabled
7534
7533
  }),
7535
7534
  "data-test-id": dataTestId && "".concat(dataTestId, "--label")
7536
7535
  }, /*#__PURE__*/React.createElement("span", {
7537
- tabIndex: -1,
7536
+ "aria-hidden": "true",
7538
7537
  className: classNames('Checkbox__indicator', {
7539
7538
  'Checkbox__indicator--disabled': disabled
7540
7539
  })
7541
7540
  }, isChecked && /*#__PURE__*/React.createElement(React.Fragment, null, checkIcon === 'checkmark' && /*#__PURE__*/React.createElement(Checkmark16, CHECKED_ITEM_PROPS), checkIcon === 'circle' && /*#__PURE__*/React.createElement(Circle12, CHECKED_ITEM_PROPS))), /*#__PURE__*/React.createElement("input", _extends$1({
7542
7541
  id: id,
7543
- tabIndex: -1,
7544
7542
  className: "Checkbox__input",
7545
7543
  type: "checkbox",
7546
7544
  checked: isChecked,
@@ -12444,46 +12442,34 @@ var PromoBanner = function PromoBanner(_ref) {
12444
12442
  })));
12445
12443
  };
12446
12444
 
12447
- var _excluded$7 = ["className", "checked", "children", "value", "tabIndex", "disabled"];
12445
+ var _excluded$7 = ["className", "checked", "children", "value", "disabled"];
12448
12446
  var RadioButton = function RadioButton(_ref) {
12449
12447
  var className = _ref.className,
12450
12448
  checked = _ref.checked,
12451
12449
  children = _ref.children,
12452
12450
  value = _ref.value,
12453
- tabIndex = _ref.tabIndex,
12454
12451
  disabled = _ref.disabled,
12455
12452
  rest = _objectWithoutProperties(_ref, _excluded$7);
12456
- var inputRef = React.useRef(null);
12457
12453
  return /*#__PURE__*/React.createElement("label", {
12458
- tabIndex: tabIndex !== null && tabIndex !== void 0 ? tabIndex : 0,
12459
- onKeyDown: function onKeyDown(_ref2) {
12460
- var _inputRef$current;
12461
- var key = _ref2.key;
12462
- return (key === 'Enter' || key === ' ') && ((_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.click());
12463
- },
12464
12454
  className: classNames('RadioButton', className, {
12465
12455
  'RadioButton--checked': checked,
12466
12456
  'RadioButton--disabled': disabled
12467
12457
  })
12468
12458
  }, /*#__PURE__*/React.createElement("span", {
12469
- tabIndex: -1,
12459
+ "aria-hidden": "true",
12470
12460
  className: classNames('RadioButton__indicator', {
12471
12461
  'RadioButton__indicator--checked': checked,
12472
12462
  'RadioButton__indicator--unchecked': !checked,
12473
12463
  'RadioButton__indicator--disabled': disabled
12474
12464
  })
12475
12465
  }), /*#__PURE__*/React.createElement("input", _extends$1({
12476
- ref: inputRef,
12477
- tabIndex: -1,
12478
12466
  className: "RadioButton__input",
12479
12467
  type: "radio",
12480
- role: "radio",
12481
12468
  checked: checked,
12482
12469
  value: value,
12483
12470
  disabled: disabled
12484
12471
  }, rest)), children && /*#__PURE__*/React.createElement("span", {
12485
- className: "RadioButton__label",
12486
- tabIndex: -1
12472
+ className: "RadioButton__label"
12487
12473
  }, children));
12488
12474
  };
12489
12475