@thecb/components 10.7.5-beta.1 → 10.7.5-beta.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.esm.js CHANGED
@@ -39323,9 +39323,7 @@ var ToggleSwitch = function ToggleSwitch(_ref10) {
39323
39323
  _ref10$labelStyles = _ref10.labelStyles,
39324
39324
  labelStyles = _ref10$labelStyles === void 0 ? "" : _ref10$labelStyles,
39325
39325
  _ref10$labelAs = _ref10.labelAs,
39326
- labelAs = _ref10$labelAs === void 0 ? "h4" : _ref10$labelAs,
39327
- _ref10$srOnlyLabel = _ref10.srOnlyLabel,
39328
- srOnlyLabel = _ref10$srOnlyLabel === void 0 ? "" : _ref10$srOnlyLabel,
39326
+ labelAs = _ref10$labelAs === void 0 ? "label" : _ref10$labelAs,
39329
39327
  themeValues = _ref10.themeValues,
39330
39328
  isMobile = _ref10.isMobile,
39331
39329
  dataQa = _ref10.dataQa,
@@ -39390,7 +39388,7 @@ var ToggleSwitch = function ToggleSwitch(_ref10) {
39390
39388
  }
39391
39389
  };
39392
39390
  return /*#__PURE__*/React.createElement(Box, {
39393
- padding: "0",
39391
+ padding: "0.5rem",
39394
39392
  extraStyles: "\n margin: 0 0.5rem;\n ".concat(labelLeft ? themeValues.leftLabelStyles : themeValues.rightLabelStyles).concat(extraStyles)
39395
39393
  }, /*#__PURE__*/React.createElement(Center, null, /*#__PURE__*/React.createElement(Cluster, {
39396
39394
  justify: "space-between",
@@ -39423,18 +39421,18 @@ var ToggleSwitch = function ToggleSwitch(_ref10) {
39423
39421
  pose: isOn ? "on" : "off",
39424
39422
  tabIndex: disabled ? -1 : 0,
39425
39423
  disabled: disabled,
39426
- isMobile: isMobile
39424
+ isMobile: isMobile,
39425
+ tabindex: "0"
39427
39426
  }, /*#__PURE__*/React.createElement(ToggleSwitchRing, {
39428
39427
  isMobile: isMobile
39429
39428
  })))), label && /*#__PURE__*/React.createElement(Box, {
39430
39429
  as: labelAs,
39430
+ "aria-label": "".concat(name, ": ").concat(label),
39431
39431
  extraStyles: "\n font-weight: ".concat(FONT_WEIGHT_SEMIBOLD, ";\n color: ").concat(CHARADE_GREY, ";\n margin: 0 0 0 0.25rem; \n position: relative; \n bottom: 1px; \n display: inline-block; \n ").concat(labelStyles),
39432
39432
  id: "".concat(nameId, "-label"),
39433
39433
  htmlFor: labelAs === "label" ? nameId : null,
39434
39434
  padding: "0"
39435
- }, srOnlyLabel && /*#__PURE__*/React.createElement("span", {
39436
- style: SCREEN_READER_ONLY
39437
- }, srOnlyLabel), label))));
39435
+ }, label))));
39438
39436
  };
39439
39437
  var ToggleSwitch$1 = themeComponent(ToggleSwitch, "ToggleSwitch", fallbackValues$y);
39440
39438