Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solid-aria/toggle

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-aria/toggle - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

32

dist/index.js

@@ -5,3 +5,3 @@ // src/createToggle.ts

import { combineProps, filterDOMProps } from "@solid-aria/utils";
import { createMemo, mergeProps, splitProps } from "solid-js";
import { createMemo, mergeProps } from "solid-js";

@@ -36,3 +36,2 @@ // src/createToggleState.ts

function createToggle(props, inputRef) {
const state = createToggleState(props);
const defaultProps = {

@@ -42,13 +41,4 @@ isDisabled: false,

};
const propsWithDefault = mergeProps(defaultProps, props);
const [local] = splitProps(propsWithDefault, [
"isDisabled",
"isRequired",
"isReadOnly",
"value",
"name",
"aria-errormessage",
"aria-controls",
"validationState"
]);
props = mergeProps(defaultProps, props);
const state = createToggleState(props);
const onChange = (event) => {

@@ -67,10 +57,10 @@ event.stopPropagation();

return combineProps(domProps(), {
"aria-invalid": local.validationState === "invalid" || void 0,
"aria-errormessage": local["aria-errormessage"],
"aria-controls": local["aria-controls"],
"aria-readonly": local.isReadOnly || void 0,
"aria-required": local.isRequired || void 0,
disabled: local.isDisabled,
value: local.value,
name: local.name,
"aria-invalid": props.validationState === "invalid" || void 0,
"aria-errormessage": props["aria-errormessage"],
"aria-controls": props["aria-controls"],
"aria-readonly": props.isReadOnly || void 0,
"aria-required": props.isRequired || void 0,
disabled: props.isDisabled,
value: props.value,
name: props.name,
type: "checkbox",

@@ -77,0 +67,0 @@ onChange

{
"name": "@solid-aria/toggle",
"version": "0.0.4",
"version": "0.0.5",
"private": false,

@@ -34,6 +34,6 @@ "description": "Primitives for building toggle components like checkboxes and switches.",

"dependencies": {
"@solid-aria/focus": "^0.0.3",
"@solid-aria/interactions": "^0.0.3",
"@solid-aria/focus": "^0.0.4",
"@solid-aria/interactions": "^0.0.4",
"@solid-aria/types": "^0.0.3",
"@solid-aria/utils": "^0.0.3"
"@solid-aria/utils": "^0.0.4"
},

@@ -40,0 +40,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

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