@thecb/components 12.1.0-beta.13 → 12.1.0-beta.14
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
|
@@ -22155,6 +22155,7 @@ var ARROW_DOWN = 40;
|
|
|
22155
22155
|
var ENTER = 13;
|
|
22156
22156
|
var ESCAPE = 27;
|
|
22157
22157
|
var SPACEBAR = 32;
|
|
22158
|
+
var SPACE_KEY = " ";
|
|
22158
22159
|
|
|
22159
22160
|
var _excluded$x = ["title", "name", "checked", "onChange", "disabled", "themeValues", "hidden", "error", "isRequired", "checkboxMargin", "extraStyles", "textExtraStyles", "labelledById", "dataQa", "checkboxExtraStyles", "hasIconOverride", "icon", "customAriaLabel"];
|
|
22160
22161
|
var CheckboxContainer = styled__default.span.withConfig({
|
|
@@ -22235,7 +22236,8 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
|
22235
22236
|
focused = _useState2[0],
|
|
22236
22237
|
setFocused = _useState2[1];
|
|
22237
22238
|
var handleClick = function handleClick(e, func) {
|
|
22238
|
-
if (e.
|
|
22239
|
+
if (e.key === SPACE_KEY) {
|
|
22240
|
+
e.preventDefault();
|
|
22239
22241
|
func();
|
|
22240
22242
|
}
|
|
22241
22243
|
};
|