@zag-js/radio-group 2.0.0-next.1 → 2.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
1
  import { Machine, EventObject, Service } from '@zag-js/core';
2
- import { PropTypes, RequiredBy, DirectionProperty, CommonProperties, Rect } from '@zag-js/types';
2
+ import { PropTypes, DirectionProperty, CommonProperties, Rect } from '@zag-js/types';
3
3
 
4
4
  interface ValueChangeDetails {
5
5
  value: string | null;
6
6
  }
7
- type ElementIds = Partial<{
8
- root: string;
9
- label: string;
10
- indicator: string;
11
- item: (value: string) => string;
12
- itemLabel: (value: string) => string;
13
- itemControl: (value: string) => string;
14
- itemHiddenInput: (value: string) => string;
15
- }>;
7
+ interface ElementIds {
8
+ root?: string | undefined;
9
+ label?: string | undefined;
10
+ indicator?: string | undefined;
11
+ item?: ((value: string) => string) | undefined;
12
+ itemLabel?: ((value: string) => string) | undefined;
13
+ itemControl?: ((value: string) => string) | undefined;
14
+ itemHiddenInput?: ((value: string) => string) | undefined;
15
+ }
16
16
  interface RadioGroupProps extends DirectionProperty, CommonProperties {
17
17
  /**
18
18
  * The ids of the elements in the radio. Useful for composition.
@@ -118,7 +118,8 @@ interface Refs {
118
118
  }
119
119
  interface RadioGroupSchema {
120
120
  state: "idle";
121
- props: RequiredBy<RadioGroupProps, PropsWithDefault>;
121
+ props: RadioGroupProps;
122
+ defaultPropKey: PropsWithDefault;
122
123
  context: PrivateContext;
123
124
  computed: ComputedContext;
124
125
  refs: Refs;
@@ -1,18 +1,18 @@
1
1
  import { Machine, EventObject, Service } from '@zag-js/core';
2
- import { PropTypes, RequiredBy, DirectionProperty, CommonProperties, Rect } from '@zag-js/types';
2
+ import { PropTypes, DirectionProperty, CommonProperties, Rect } from '@zag-js/types';
3
3
 
4
4
  interface ValueChangeDetails {
5
5
  value: string | null;
6
6
  }
7
- type ElementIds = Partial<{
8
- root: string;
9
- label: string;
10
- indicator: string;
11
- item: (value: string) => string;
12
- itemLabel: (value: string) => string;
13
- itemControl: (value: string) => string;
14
- itemHiddenInput: (value: string) => string;
15
- }>;
7
+ interface ElementIds {
8
+ root?: string | undefined;
9
+ label?: string | undefined;
10
+ indicator?: string | undefined;
11
+ item?: ((value: string) => string) | undefined;
12
+ itemLabel?: ((value: string) => string) | undefined;
13
+ itemControl?: ((value: string) => string) | undefined;
14
+ itemHiddenInput?: ((value: string) => string) | undefined;
15
+ }
16
16
  interface RadioGroupProps extends DirectionProperty, CommonProperties {
17
17
  /**
18
18
  * The ids of the elements in the radio. Useful for composition.
@@ -118,7 +118,8 @@ interface Refs {
118
118
  }
119
119
  interface RadioGroupSchema {
120
120
  state: "idle";
121
- props: RequiredBy<RadioGroupProps, PropsWithDefault>;
121
+ props: RadioGroupProps;
122
+ defaultPropKey: PropsWithDefault;
122
123
  context: PrivateContext;
123
124
  computed: ComputedContext;
124
125
  refs: Refs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/radio-group",
3
- "version": "2.0.0-next.1",
3
+ "version": "2.0.0-next.3",
4
4
  "description": "Core logic for the radio group widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -30,12 +30,12 @@
30
30
  "url": "https://github.com/chakra-ui/zag/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@zag-js/anatomy": "2.0.0-next.1",
34
- "@zag-js/dom-query": "2.0.0-next.1",
35
- "@zag-js/focus-visible": "2.0.0-next.1",
36
- "@zag-js/utils": "2.0.0-next.1",
37
- "@zag-js/core": "2.0.0-next.1",
38
- "@zag-js/types": "2.0.0-next.1"
33
+ "@zag-js/anatomy": "2.0.0-next.3",
34
+ "@zag-js/dom-query": "2.0.0-next.3",
35
+ "@zag-js/focus-visible": "2.0.0-next.3",
36
+ "@zag-js/utils": "2.0.0-next.3",
37
+ "@zag-js/core": "2.0.0-next.3",
38
+ "@zag-js/types": "2.0.0-next.3"
39
39
  },
40
40
  "devDependencies": {
41
41
  "clean-package": "2.2.0"
@@ -69,7 +69,7 @@
69
69
  },
70
70
  "scripts": {
71
71
  "build": "tsup",
72
- "lint": "eslint src",
72
+ "lint": "oxlint src",
73
73
  "typecheck": "tsc --noEmit"
74
74
  }
75
75
  }