New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clickable-box

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clickable-box - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

4

dist/index.cjs.js

@@ -163,3 +163,3 @@ 'use strict';

switch (event.key) {
case "Space":
case " ":
onClick(event);

@@ -189,3 +189,3 @@ break;

var isActiveButton = !disabled && onClick;
var isActiveButton = !disabled && !!onClick;
return React.createElement(Component, _extends({

@@ -192,0 +192,0 @@ tabIndex: isActiveButton ? tabIndex : -1,

{
"name": "clickable-box",
"description": "Add `onClick` to HTML elements without sacrificing accessibility.",
"version": "0.1.4",
"version": "0.1.5",
"author": "Daniel O'Connor <daniel@danoc.me>",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -26,3 +26,3 @@ import React from "react";

switch (event.key) {
case "Space":
case " ":
onClick(event);

@@ -53,3 +53,3 @@ break;

const isActiveButton = !disabled && onClick;
const isActiveButton = !disabled && !!onClick;

@@ -56,0 +56,0 @@ return (

@@ -7,6 +7,10 @@ import React from "react";

const charCode = {
enter: 13,
space: 32,
period: 190
};
const validEnterPress = {
key: "Enter",
charCode: 13,
which: 13
charCode: charCode.enter
};

@@ -105,5 +109,3 @@

fireEvent.keyPress(getByText("Submit"), {
key: "Space",
charCode: 32,
which: 32
charCode: charCode.space
});

@@ -177,5 +179,3 @@

fireEvent.keyPress(getByText("Submit"), {
key: ".",
charCode: 91,
which: 91
charCode: charCode.period
});

@@ -221,5 +221,3 @@

fireEvent.keyPress(getByText("Submit"), {
key: "Space",
charCode: 32,
which: 32
charCode: charCode.space
});

@@ -291,5 +289,3 @@

fireEvent.keyPress(getByText("Submit"), {
key: "Space",
charCode: 32,
which: 32
charCode: charCode.space
});

@@ -296,0 +292,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc