Socket
Socket
Sign inDemoInstall

@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.0-20220814155032 to 0.0.0-20220817145316

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.0-20220814155032",
"version": "0.0.0-20220817145316",
"description": "Core logic for the radio widget implemented as a state machine",

@@ -33,6 +33,6 @@ "keywords": [

"@zag-js/core": "0.1.9",
"@zag-js/types": "0.0.0-20220814155032"
"@zag-js/types": "0.2.4"
},
"devDependencies": {
"@zag-js/dom-utils": "0.0.0-20220814155032",
"@zag-js/dom-utils": "0.1.10",
"@zag-js/form-utils": "0.1.0"

@@ -39,0 +39,0 @@ },

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