@thecb/components 10.7.5-beta.2 → 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.cjs.js
CHANGED
|
@@ -39331,9 +39331,7 @@ var ToggleSwitch = function ToggleSwitch(_ref10) {
|
|
|
39331
39331
|
_ref10$labelStyles = _ref10.labelStyles,
|
|
39332
39332
|
labelStyles = _ref10$labelStyles === void 0 ? "" : _ref10$labelStyles,
|
|
39333
39333
|
_ref10$labelAs = _ref10.labelAs,
|
|
39334
|
-
labelAs = _ref10$labelAs === void 0 ? "
|
|
39335
|
-
_ref10$srOnlyLabel = _ref10.srOnlyLabel,
|
|
39336
|
-
srOnlyLabel = _ref10$srOnlyLabel === void 0 ? "" : _ref10$srOnlyLabel,
|
|
39334
|
+
labelAs = _ref10$labelAs === void 0 ? "label" : _ref10$labelAs,
|
|
39337
39335
|
themeValues = _ref10.themeValues,
|
|
39338
39336
|
isMobile = _ref10.isMobile,
|
|
39339
39337
|
dataQa = _ref10.dataQa,
|
|
@@ -39398,7 +39396,7 @@ var ToggleSwitch = function ToggleSwitch(_ref10) {
|
|
|
39398
39396
|
}
|
|
39399
39397
|
};
|
|
39400
39398
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
39401
|
-
padding: "0",
|
|
39399
|
+
padding: "0.5rem",
|
|
39402
39400
|
extraStyles: "\n margin: 0 0.5rem;\n ".concat(labelLeft ? themeValues.leftLabelStyles : themeValues.rightLabelStyles).concat(extraStyles)
|
|
39403
39401
|
}, /*#__PURE__*/React__default.createElement(Center, null, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
39404
39402
|
justify: "space-between",
|
|
@@ -39431,18 +39429,18 @@ var ToggleSwitch = function ToggleSwitch(_ref10) {
|
|
|
39431
39429
|
pose: isOn ? "on" : "off",
|
|
39432
39430
|
tabIndex: disabled ? -1 : 0,
|
|
39433
39431
|
disabled: disabled,
|
|
39434
|
-
isMobile: isMobile
|
|
39432
|
+
isMobile: isMobile,
|
|
39433
|
+
tabindex: "0"
|
|
39435
39434
|
}, /*#__PURE__*/React__default.createElement(ToggleSwitchRing, {
|
|
39436
39435
|
isMobile: isMobile
|
|
39437
39436
|
})))), label && /*#__PURE__*/React__default.createElement(Box, {
|
|
39438
39437
|
as: labelAs,
|
|
39438
|
+
"aria-label": "".concat(name, ": ").concat(label),
|
|
39439
39439
|
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),
|
|
39440
39440
|
id: "".concat(nameId, "-label"),
|
|
39441
39441
|
htmlFor: labelAs === "label" ? nameId : null,
|
|
39442
39442
|
padding: "0"
|
|
39443
|
-
},
|
|
39444
|
-
style: SCREEN_READER_ONLY
|
|
39445
|
-
}, srOnlyLabel), label))));
|
|
39443
|
+
}, label))));
|
|
39446
39444
|
};
|
|
39447
39445
|
var ToggleSwitch$1 = themeComponent(ToggleSwitch, "ToggleSwitch", fallbackValues$y);
|
|
39448
39446
|
|