@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.esm.js
CHANGED
|
@@ -22147,6 +22147,7 @@ var ARROW_DOWN = 40;
|
|
|
22147
22147
|
var ENTER = 13;
|
|
22148
22148
|
var ESCAPE = 27;
|
|
22149
22149
|
var SPACEBAR = 32;
|
|
22150
|
+
var SPACE_KEY = " ";
|
|
22150
22151
|
|
|
22151
22152
|
var _excluded$x = ["title", "name", "checked", "onChange", "disabled", "themeValues", "hidden", "error", "isRequired", "checkboxMargin", "extraStyles", "textExtraStyles", "labelledById", "dataQa", "checkboxExtraStyles", "hasIconOverride", "icon", "customAriaLabel"];
|
|
22152
22153
|
var CheckboxContainer = styled.span.withConfig({
|
|
@@ -22227,7 +22228,8 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
22227
22228
|
focused = _useState2[0],
|
|
22228
22229
|
setFocused = _useState2[1];
|
|
22229
22230
|
var handleClick = function handleClick(e, func) {
|
|
22230
|
-
if (e.
|
|
22231
|
+
if (e.key === SPACE_KEY) {
|
|
22232
|
+
e.preventDefault();
|
|
22231
22233
|
func();
|
|
22232
22234
|
}
|
|
22233
22235
|
};
|