Socket
Book a DemoInstallSign in
Socket

@zag-js/radio-group

Package Overview
Dependencies
Maintainers
1
Versions
877
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/radio-group - npm Package Compare versions

Comparing version

to
1.21.2

4

dist/index.d.ts

@@ -112,2 +112,6 @@ import * as _zag_js_anatomy from '@zag-js/anatomy';

indicatorCleanup: VoidFunction | null;
/**
* The value of the radio that has focus visible
*/
focusVisibleValue: string | null;
}

@@ -114,0 +118,0 @@ interface RadioGroupSchema {

17

dist/index.js

@@ -56,8 +56,6 @@ 'use strict';

function connect(service, normalize) {
const { context, send, computed, prop, scope } = service;
const { context, send, computed, prop, scope, refs } = service;
const groupDisabled = computed("isDisabled");
const readOnly = prop("readOnly");
function getItemState(props2) {
const focused = context.get("focusedValue") === props2.value;
const focusVisible$1 = focused && focusVisible.isFocusVisible();
return {

@@ -68,4 +66,4 @@ value: props2.value,

checked: context.get("value") === props2.value,
focused,
focusVisible: focusVisible$1,
focused: context.get("focusedValue") === props2.value,
focusVisible: refs.get("focusVisibleValue") === props2.value,
hovered: context.get("hoveredValue") === props2.value,

@@ -205,3 +203,4 @@ active: context.get("activeValue") === props2.value

onFocus() {
send({ type: "SET_FOCUSED", value: props2.value, focused: true });
const focusVisible$1 = focusVisible.isFocusVisible();
send({ type: "SET_FOCUSED", value: props2.value, focused: true, focusVisible: focusVisible$1 });
},

@@ -296,3 +295,4 @@ onKeyDown(event) {

return {
indicatorCleanup: null
indicatorCleanup: null,
focusVisibleValue: null
};

@@ -363,4 +363,5 @@ },

},
setFocused({ context, event }) {
setFocused({ context, event, refs }) {
context.set("focusedValue", event.value);
refs.set("focusVisibleValue", event.focusVisible ? event.value : null);
},

@@ -367,0 +368,0 @@ syncInputElements({ context, scope }) {

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

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

"dependencies": {
"@zag-js/anatomy": "1.21.1",
"@zag-js/dom-query": "1.21.1",
"@zag-js/focus-visible": "1.21.1",
"@zag-js/utils": "1.21.1",
"@zag-js/core": "1.21.1",
"@zag-js/types": "1.21.1"
"@zag-js/anatomy": "1.21.2",
"@zag-js/dom-query": "1.21.2",
"@zag-js/focus-visible": "1.21.2",
"@zag-js/utils": "1.21.2",
"@zag-js/core": "1.21.2",
"@zag-js/types": "1.21.2"
},

@@ -38,0 +38,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.