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

@zag-js/radio

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/radio - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

dist/index.d.ts

@@ -86,3 +86,3 @@ import { RequiredBy, DirectionProperty, CommonProperties, Context, PropTypes, NormalizeProps } from '@zag-js/types';

setValue(value: string): void;
focus(): void;
focus: () => void;
blur(): void;

@@ -89,0 +89,0 @@ rootProps: T["element"];

@@ -153,2 +153,11 @@ "use strict";

}
const focus = () => {
const firstEnabledAndCheckedInput = dom.getFirstEnabledAndCheckedInputEl(state.context);
if (firstEnabledAndCheckedInput) {
firstEnabledAndCheckedInput.focus();
return;
}
const firstEnabledInput = dom.getFirstEnabledInputEl(state.context);
firstEnabledInput == null ? void 0 : firstEnabledInput.focus();
};
return {

@@ -159,11 +168,3 @@ value: state.context.value,

},
focus() {
const firstEnabledAndCheckedInput = dom.getFirstEnabledAndCheckedInputEl(state.context);
if (firstEnabledAndCheckedInput) {
firstEnabledAndCheckedInput.focus();
return;
}
const firstEnabledInput = dom.getFirstEnabledInputEl(state.context);
firstEnabledInput == null ? void 0 : firstEnabledInput.focus();
},
focus,
blur() {

@@ -186,3 +187,4 @@ const focusedElement = dom.getActiveElement(state.context);

"data-part": "label",
id: dom.getLabelId(state.context)
id: dom.getLabelId(state.context),
onClick: focus
}),

@@ -189,0 +191,0 @@ getItemProps(props) {

{
"name": "@zag-js/radio",
"version": "0.0.2",
"version": "0.0.3",
"description": "Core logic for the radio widget implemented as a state machine",

@@ -32,8 +32,8 @@ "keywords": [

"dependencies": {
"@zag-js/core": "0.1.9",
"@zag-js/types": "0.2.4"
"@zag-js/core": "0.1.10",
"@zag-js/types": "0.2.5"
},
"devDependencies": {
"@zag-js/dom-utils": "0.1.10",
"@zag-js/form-utils": "0.1.0"
"@zag-js/dom-utils": "0.1.11",
"@zag-js/form-utils": "0.1.1"
},

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

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