@zag-js/radio-group 1.46.0 → 1.48.0

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,218 +1,246 @@
1
- // src/radio-group.connect.ts
1
+ import { parts } from "./radio-group.anatomy.mjs";
2
+ import { getFirstEnabledAndCheckedInputEl, getFirstEnabledInputEl, getIndicatorId, getItemControlId, getItemHiddenInputEl, getItemHiddenInputId, getItemId, getItemLabelId, getLabelId, getRootId } from "./radio-group.dom.mjs";
2
3
  import { dataAttr, getEventTarget, isLeftClick, isSafari, visuallyHiddenStyle } from "@zag-js/dom-query";
3
4
  import { isFocusVisible } from "@zag-js/focus-visible";
4
5
  import { toPx } from "@zag-js/utils";
5
- import { parts } from "./radio-group.anatomy.mjs";
6
- import * as dom from "./radio-group.dom.mjs";
6
+ // src/radio-group.connect.ts
7
7
  function connect(service, normalize) {
8
- const { context, send, computed, prop, scope } = service;
9
- const groupDisabled = computed("isDisabled");
10
- const groupInvalid = prop("invalid");
11
- const readOnly = prop("readOnly");
12
- function getItemState(props) {
13
- return {
14
- value: props.value,
15
- invalid: !!props.invalid || !!groupInvalid,
16
- disabled: !!props.disabled || groupDisabled,
17
- checked: context.get("value") === props.value,
18
- focused: context.get("focusedValue") === props.value,
19
- focusVisible: context.get("focusVisibleValue") === props.value,
20
- hovered: context.get("hoveredValue") === props.value,
21
- active: context.get("activeValue") === props.value
22
- };
23
- }
24
- function getItemDataAttrs(props) {
25
- const itemState = getItemState(props);
26
- return {
27
- "data-focus": dataAttr(itemState.focused),
28
- "data-focus-visible": dataAttr(itemState.focusVisible),
29
- "data-disabled": dataAttr(itemState.disabled),
30
- "data-readonly": dataAttr(readOnly),
31
- "data-state": itemState.checked ? "checked" : "unchecked",
32
- "data-hover": dataAttr(itemState.hovered),
33
- "data-invalid": dataAttr(itemState.invalid),
34
- "data-orientation": prop("orientation"),
35
- "data-ssr": dataAttr(context.get("ssr"))
36
- };
37
- }
38
- const focus = () => {
39
- const nodeToFocus = dom.getFirstEnabledAndCheckedInputEl(scope) ?? dom.getFirstEnabledInputEl(scope);
40
- nodeToFocus?.focus();
41
- };
42
- return {
43
- focus,
44
- value: context.get("value"),
45
- setValue(value) {
46
- send({ type: "SET_VALUE", value, isTrusted: false });
47
- },
48
- clearValue() {
49
- send({ type: "SET_VALUE", value: null, isTrusted: false });
50
- },
51
- getRootProps() {
52
- return normalize.element({
53
- ...parts.root.attrs,
54
- role: "radiogroup",
55
- id: dom.getRootId(scope),
56
- "aria-labelledby": dom.getLabelId(scope),
57
- "aria-required": prop("required") || void 0,
58
- "aria-disabled": groupDisabled || void 0,
59
- "aria-readonly": readOnly || void 0,
60
- "data-orientation": prop("orientation"),
61
- "data-disabled": dataAttr(groupDisabled),
62
- "data-invalid": dataAttr(groupInvalid),
63
- "data-required": dataAttr(prop("required")),
64
- "aria-orientation": prop("orientation"),
65
- dir: prop("dir"),
66
- style: {
67
- position: "relative"
68
- }
69
- });
70
- },
71
- getLabelProps() {
72
- return normalize.element({
73
- ...parts.label.attrs,
74
- dir: prop("dir"),
75
- "data-orientation": prop("orientation"),
76
- "data-disabled": dataAttr(groupDisabled),
77
- "data-invalid": dataAttr(groupInvalid),
78
- "data-required": dataAttr(prop("required")),
79
- id: dom.getLabelId(scope),
80
- onClick: focus
81
- });
82
- },
83
- getItemState,
84
- getItemProps(props) {
85
- const itemState = getItemState(props);
86
- return normalize.label({
87
- ...parts.item.attrs,
88
- dir: prop("dir"),
89
- id: dom.getItemId(scope, props.value),
90
- htmlFor: dom.getItemHiddenInputId(scope, props.value),
91
- ...getItemDataAttrs(props),
92
- onPointerMove() {
93
- if (itemState.disabled) return;
94
- if (itemState.hovered) return;
95
- send({ type: "SET_HOVERED", value: props.value, hovered: true });
96
- },
97
- onPointerLeave() {
98
- if (itemState.disabled) return;
99
- send({ type: "SET_HOVERED", value: null });
100
- },
101
- onPointerDown(event) {
102
- if (itemState.disabled) return;
103
- if (!isLeftClick(event)) return;
104
- if (itemState.focused && event.pointerType === "mouse") {
105
- event.preventDefault();
106
- }
107
- send({ type: "SET_ACTIVE", value: props.value, active: true });
108
- },
109
- onPointerUp() {
110
- if (itemState.disabled) return;
111
- send({ type: "SET_ACTIVE", value: null });
112
- },
113
- onClick() {
114
- if (!itemState.disabled && isSafari()) {
115
- dom.getItemHiddenInputEl(scope, props.value)?.focus();
116
- }
117
- }
118
- });
119
- },
120
- getItemTextProps(props) {
121
- return normalize.element({
122
- ...parts.itemText.attrs,
123
- dir: prop("dir"),
124
- id: dom.getItemLabelId(scope, props.value),
125
- ...getItemDataAttrs(props)
126
- });
127
- },
128
- getItemControlProps(props) {
129
- const itemState = getItemState(props);
130
- return normalize.element({
131
- ...parts.itemControl.attrs,
132
- dir: prop("dir"),
133
- id: dom.getItemControlId(scope, props.value),
134
- "data-active": dataAttr(itemState.active),
135
- "aria-hidden": true,
136
- ...getItemDataAttrs(props)
137
- });
138
- },
139
- getItemHiddenInputProps(props) {
140
- const itemState = getItemState(props);
141
- return normalize.input({
142
- "data-ownedby": dom.getRootId(scope),
143
- id: dom.getItemHiddenInputId(scope, props.value),
144
- type: "radio",
145
- name: prop("name") || prop("id"),
146
- form: prop("form"),
147
- value: props.value,
148
- required: prop("required"),
149
- "aria-labelledby": dom.getItemLabelId(scope, props.value),
150
- "aria-invalid": itemState.invalid || void 0,
151
- onClick(event) {
152
- if (readOnly) {
153
- event.preventDefault();
154
- return;
155
- }
156
- if (event.currentTarget.checked) {
157
- send({ type: "SET_VALUE", value: props.value, isTrusted: true });
158
- }
159
- },
160
- onBlur() {
161
- send({ type: "SET_FOCUSED", value: null, focused: false, focusVisible: false });
162
- },
163
- onFocus() {
164
- const focusVisible = isFocusVisible();
165
- send({ type: "SET_FOCUSED", value: props.value, focused: true, focusVisible });
166
- },
167
- onKeyDown(event) {
168
- if (event.defaultPrevented) return;
169
- if (event.key === " ") {
170
- send({ type: "SET_ACTIVE", value: props.value, active: true });
171
- }
172
- },
173
- onKeyUp(event) {
174
- if (event.defaultPrevented) return;
175
- if (event.key === " ") {
176
- send({ type: "SET_ACTIVE", value: null });
177
- }
178
- },
179
- disabled: itemState.disabled || readOnly,
180
- defaultChecked: itemState.checked,
181
- style: visuallyHiddenStyle
182
- });
183
- },
184
- getIndicatorProps() {
185
- const rect = context.get("indicatorRect");
186
- const animateIndicator = context.get("animateIndicator");
187
- return normalize.element({
188
- id: dom.getIndicatorId(scope),
189
- ...parts.indicator.attrs,
190
- dir: prop("dir"),
191
- hidden: context.get("value") == null || isRectEmpty(rect),
192
- "data-disabled": dataAttr(groupDisabled),
193
- "data-orientation": prop("orientation"),
194
- onTransitionEnd(event) {
195
- if (getEventTarget(event) !== event.currentTarget) return;
196
- send({ type: "INDICATOR_TRANSITION_END" });
197
- },
198
- style: {
199
- "--transition-property": "left, top, width, height",
200
- "--left": toPx(rect?.x),
201
- "--top": toPx(rect?.y),
202
- "--width": toPx(rect?.width),
203
- "--height": toPx(rect?.height),
204
- position: "absolute",
205
- willChange: animateIndicator ? "var(--transition-property)" : "auto",
206
- transitionProperty: animateIndicator ? "var(--transition-property)" : "none",
207
- transitionDuration: animateIndicator ? "var(--transition-duration, 150ms)" : "0ms",
208
- transitionTimingFunction: "var(--transition-timing-function)",
209
- [prop("orientation") === "horizontal" ? "left" : "top"]: prop("orientation") === "horizontal" ? "var(--left)" : "var(--top)"
210
- }
211
- });
212
- }
213
- };
8
+ const { context, send, computed, prop, scope } = service;
9
+ const groupDisabled = computed("isDisabled");
10
+ const groupInvalid = prop("invalid");
11
+ const readOnly = prop("readOnly");
12
+ function getItemState(props) {
13
+ return {
14
+ value: props.value,
15
+ invalid: !!props.invalid || !!groupInvalid,
16
+ disabled: !!props.disabled || groupDisabled,
17
+ checked: context.get("value") === props.value,
18
+ focused: context.get("focusedValue") === props.value,
19
+ focusVisible: context.get("focusVisibleValue") === props.value,
20
+ hovered: context.get("hoveredValue") === props.value,
21
+ active: context.get("activeValue") === props.value
22
+ };
23
+ }
24
+ function getItemDataAttrs(props) {
25
+ const itemState = getItemState(props);
26
+ return {
27
+ "data-focus": dataAttr(itemState.focused),
28
+ "data-focus-visible": dataAttr(itemState.focusVisible),
29
+ "data-disabled": dataAttr(itemState.disabled),
30
+ "data-readonly": dataAttr(readOnly),
31
+ "data-state": itemState.checked ? "checked" : "unchecked",
32
+ "data-hover": dataAttr(itemState.hovered),
33
+ "data-invalid": dataAttr(itemState.invalid),
34
+ "data-orientation": prop("orientation"),
35
+ "data-ssr": dataAttr(context.get("ssr"))
36
+ };
37
+ }
38
+ const focus = () => {
39
+ (getFirstEnabledAndCheckedInputEl(scope) ?? getFirstEnabledInputEl(scope))?.focus();
40
+ };
41
+ return {
42
+ focus,
43
+ value: context.get("value"),
44
+ setValue(value) {
45
+ send({
46
+ type: "SET_VALUE",
47
+ value,
48
+ isTrusted: false
49
+ });
50
+ },
51
+ clearValue() {
52
+ send({
53
+ type: "SET_VALUE",
54
+ value: null,
55
+ isTrusted: false
56
+ });
57
+ },
58
+ getRootProps() {
59
+ return normalize.element({
60
+ ...parts.root.attrs,
61
+ role: "radiogroup",
62
+ id: getRootId(scope),
63
+ "aria-labelledby": getLabelId(scope),
64
+ "aria-required": prop("required") || void 0,
65
+ "aria-disabled": groupDisabled || void 0,
66
+ "aria-readonly": readOnly || void 0,
67
+ "data-orientation": prop("orientation"),
68
+ "data-disabled": dataAttr(groupDisabled),
69
+ "data-invalid": dataAttr(groupInvalid),
70
+ "data-required": dataAttr(prop("required")),
71
+ "aria-orientation": prop("orientation"),
72
+ dir: prop("dir"),
73
+ style: { position: "relative" }
74
+ });
75
+ },
76
+ getLabelProps() {
77
+ return normalize.element({
78
+ ...parts.label.attrs,
79
+ dir: prop("dir"),
80
+ "data-orientation": prop("orientation"),
81
+ "data-disabled": dataAttr(groupDisabled),
82
+ "data-invalid": dataAttr(groupInvalid),
83
+ "data-required": dataAttr(prop("required")),
84
+ id: getLabelId(scope),
85
+ onClick: focus
86
+ });
87
+ },
88
+ getItemState,
89
+ getItemProps(props) {
90
+ const itemState = getItemState(props);
91
+ return normalize.label({
92
+ ...parts.item.attrs,
93
+ dir: prop("dir"),
94
+ id: getItemId(scope, props.value),
95
+ htmlFor: getItemHiddenInputId(scope, props.value),
96
+ ...getItemDataAttrs(props),
97
+ onPointerMove() {
98
+ if (itemState.disabled) return;
99
+ if (itemState.hovered) return;
100
+ send({
101
+ type: "SET_HOVERED",
102
+ value: props.value,
103
+ hovered: true
104
+ });
105
+ },
106
+ onPointerLeave() {
107
+ if (itemState.disabled) return;
108
+ send({
109
+ type: "SET_HOVERED",
110
+ value: null
111
+ });
112
+ },
113
+ onPointerDown(event) {
114
+ if (itemState.disabled) return;
115
+ if (!isLeftClick(event)) return;
116
+ if (itemState.focused && event.pointerType === "mouse") event.preventDefault();
117
+ send({
118
+ type: "SET_ACTIVE",
119
+ value: props.value,
120
+ active: true
121
+ });
122
+ },
123
+ onPointerUp() {
124
+ if (itemState.disabled) return;
125
+ send({
126
+ type: "SET_ACTIVE",
127
+ value: null
128
+ });
129
+ },
130
+ onClick() {
131
+ if (!itemState.disabled && isSafari()) getItemHiddenInputEl(scope, props.value)?.focus();
132
+ }
133
+ });
134
+ },
135
+ getItemTextProps(props) {
136
+ return normalize.element({
137
+ ...parts.itemText.attrs,
138
+ dir: prop("dir"),
139
+ id: getItemLabelId(scope, props.value),
140
+ ...getItemDataAttrs(props)
141
+ });
142
+ },
143
+ getItemControlProps(props) {
144
+ const itemState = getItemState(props);
145
+ return normalize.element({
146
+ ...parts.itemControl.attrs,
147
+ dir: prop("dir"),
148
+ id: getItemControlId(scope, props.value),
149
+ "data-active": dataAttr(itemState.active),
150
+ "aria-hidden": true,
151
+ ...getItemDataAttrs(props)
152
+ });
153
+ },
154
+ getItemHiddenInputProps(props) {
155
+ const itemState = getItemState(props);
156
+ return normalize.input({
157
+ "data-ownedby": getRootId(scope),
158
+ id: getItemHiddenInputId(scope, props.value),
159
+ type: "radio",
160
+ name: prop("name") || prop("id"),
161
+ form: prop("form"),
162
+ value: props.value,
163
+ required: prop("required"),
164
+ "aria-labelledby": getItemLabelId(scope, props.value),
165
+ "aria-invalid": itemState.invalid || void 0,
166
+ onClick(event) {
167
+ if (readOnly) {
168
+ event.preventDefault();
169
+ return;
170
+ }
171
+ if (event.currentTarget.checked) send({
172
+ type: "SET_VALUE",
173
+ value: props.value,
174
+ isTrusted: true
175
+ });
176
+ },
177
+ onBlur() {
178
+ send({
179
+ type: "SET_FOCUSED",
180
+ value: null,
181
+ focused: false,
182
+ focusVisible: false
183
+ });
184
+ },
185
+ onFocus() {
186
+ const focusVisible = isFocusVisible();
187
+ send({
188
+ type: "SET_FOCUSED",
189
+ value: props.value,
190
+ focused: true,
191
+ focusVisible
192
+ });
193
+ },
194
+ onKeyDown(event) {
195
+ if (event.defaultPrevented) return;
196
+ if (event.key === " ") send({
197
+ type: "SET_ACTIVE",
198
+ value: props.value,
199
+ active: true
200
+ });
201
+ },
202
+ onKeyUp(event) {
203
+ if (event.defaultPrevented) return;
204
+ if (event.key === " ") send({
205
+ type: "SET_ACTIVE",
206
+ value: null
207
+ });
208
+ },
209
+ disabled: itemState.disabled || readOnly,
210
+ defaultChecked: itemState.checked,
211
+ style: visuallyHiddenStyle
212
+ });
213
+ },
214
+ getIndicatorProps() {
215
+ const rect = context.get("indicatorRect");
216
+ const animateIndicator = context.get("animateIndicator");
217
+ return normalize.element({
218
+ id: getIndicatorId(scope),
219
+ ...parts.indicator.attrs,
220
+ dir: prop("dir"),
221
+ hidden: context.get("value") == null || isRectEmpty(rect),
222
+ "data-disabled": dataAttr(groupDisabled),
223
+ "data-orientation": prop("orientation"),
224
+ onTransitionEnd(event) {
225
+ if (getEventTarget(event) !== event.currentTarget) return;
226
+ send({ type: "INDICATOR_TRANSITION_END" });
227
+ },
228
+ style: {
229
+ "--transition-property": "left, top, width, height",
230
+ "--left": toPx(rect?.x),
231
+ "--top": toPx(rect?.y),
232
+ "--width": toPx(rect?.width),
233
+ "--height": toPx(rect?.height),
234
+ position: "absolute",
235
+ willChange: animateIndicator ? "var(--transition-property)" : "auto",
236
+ transitionProperty: animateIndicator ? "var(--transition-property)" : "none",
237
+ transitionDuration: animateIndicator ? "var(--transition-duration, 150ms)" : "0ms",
238
+ transitionTimingFunction: "var(--transition-timing-function)",
239
+ [prop("orientation") === "horizontal" ? "left" : "top"]: prop("orientation") === "horizontal" ? "var(--left)" : "var(--top)"
240
+ }
241
+ });
242
+ }
243
+ };
214
244
  }
215
- var isRectEmpty = (rect) => rect == null || rect.width === 0 && rect.height === 0 && rect.x === 0 && rect.y === 0;
216
- export {
217
- connect
218
- };
245
+ const isRectEmpty = (rect) => rect == null || rect.width === 0 && rect.height === 0 && rect.x === 0 && rect.y === 0;
246
+ export { connect };
@@ -1,30 +1,27 @@
1
- import { Scope } from '@zag-js/core';
2
-
3
- declare const getRootId: (ctx: Scope) => any;
4
- declare const getLabelId: (ctx: Scope) => any;
5
- declare const getItemId: (ctx: Scope, value: string) => any;
6
- declare const getItemHiddenInputId: (ctx: Scope, value: string) => any;
7
- declare const getItemControlId: (ctx: Scope, value: string) => any;
8
- declare const getItemLabelId: (ctx: Scope, value: string) => any;
9
- declare const getIndicatorId: (ctx: Scope) => any;
10
- declare const getRootEl: (ctx: Scope) => HTMLElement | null;
11
- declare const getItemHiddenInputEl: (ctx: Scope, value: string) => HTMLInputElement | null;
12
- declare const getIndicatorEl: (ctx: Scope) => HTMLElement | null;
13
- declare const getFirstEnabledInputEl: (ctx: Scope) => HTMLInputElement | null | undefined;
14
- declare const getFirstEnabledAndCheckedInputEl: (ctx: Scope) => HTMLInputElement | null | undefined;
15
- declare const getInputEls: (ctx: Scope) => HTMLInputElement[];
16
- declare const getRadioEl: (ctx: Scope, value: string | null) => HTMLElement | null | undefined;
17
- declare const getOffsetRect: (el: HTMLElement | undefined) => {
18
- x: number;
19
- y: number;
20
- width: number;
21
- height: number;
1
+ import { Scope } from "@zag-js/core";
2
+ export declare const getRootId: (ctx: Scope) => any;
3
+ export declare const getLabelId: (ctx: Scope) => any;
4
+ export declare const getItemId: (ctx: Scope, value: string) => any;
5
+ export declare const getItemHiddenInputId: (ctx: Scope, value: string) => any;
6
+ export declare const getItemControlId: (ctx: Scope, value: string) => any;
7
+ export declare const getItemLabelId: (ctx: Scope, value: string) => any;
8
+ export declare const getIndicatorId: (ctx: Scope) => any;
9
+ export declare const getRootEl: (ctx: Scope) => HTMLElement | null;
10
+ export declare const getItemHiddenInputEl: (ctx: Scope, value: string) => HTMLInputElement | null;
11
+ export declare const getIndicatorEl: (ctx: Scope) => HTMLElement | null;
12
+ export declare const getFirstEnabledInputEl: (ctx: Scope) => HTMLInputElement | null | undefined;
13
+ export declare const getFirstEnabledAndCheckedInputEl: (ctx: Scope) => HTMLInputElement | null | undefined;
14
+ export declare const getInputEls: (ctx: Scope) => HTMLInputElement[];
15
+ export declare const getRadioEl: (ctx: Scope, value: string | null) => HTMLElement | null | undefined;
16
+ export declare const getOffsetRect: (el: HTMLElement | undefined) => {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
22
21
  };
23
- declare const getRectById: (ctx: Scope, id: string) => {
24
- x: number;
25
- y: number;
26
- width: number;
27
- height: number;
28
- } | undefined;
29
-
30
- export { getFirstEnabledAndCheckedInputEl, getFirstEnabledInputEl, getIndicatorEl, getIndicatorId, getInputEls, getItemControlId, getItemHiddenInputEl, getItemHiddenInputId, getItemId, getItemLabelId, getLabelId, getOffsetRect, getRadioEl, getRectById, getRootEl, getRootId };
22
+ export declare const getRectById: (ctx: Scope, id: string) => {
23
+ x: number;
24
+ y: number;
25
+ width: number;
26
+ height: number;
27
+ } | undefined;
@@ -1,30 +1,27 @@
1
- import { Scope } from '@zag-js/core';
2
-
3
- declare const getRootId: (ctx: Scope) => any;
4
- declare const getLabelId: (ctx: Scope) => any;
5
- declare const getItemId: (ctx: Scope, value: string) => any;
6
- declare const getItemHiddenInputId: (ctx: Scope, value: string) => any;
7
- declare const getItemControlId: (ctx: Scope, value: string) => any;
8
- declare const getItemLabelId: (ctx: Scope, value: string) => any;
9
- declare const getIndicatorId: (ctx: Scope) => any;
10
- declare const getRootEl: (ctx: Scope) => HTMLElement | null;
11
- declare const getItemHiddenInputEl: (ctx: Scope, value: string) => HTMLInputElement | null;
12
- declare const getIndicatorEl: (ctx: Scope) => HTMLElement | null;
13
- declare const getFirstEnabledInputEl: (ctx: Scope) => HTMLInputElement | null | undefined;
14
- declare const getFirstEnabledAndCheckedInputEl: (ctx: Scope) => HTMLInputElement | null | undefined;
15
- declare const getInputEls: (ctx: Scope) => HTMLInputElement[];
16
- declare const getRadioEl: (ctx: Scope, value: string | null) => HTMLElement | null | undefined;
17
- declare const getOffsetRect: (el: HTMLElement | undefined) => {
18
- x: number;
19
- y: number;
20
- width: number;
21
- height: number;
1
+ import { Scope } from "@zag-js/core";
2
+ export declare const getRootId: (ctx: Scope) => any;
3
+ export declare const getLabelId: (ctx: Scope) => any;
4
+ export declare const getItemId: (ctx: Scope, value: string) => any;
5
+ export declare const getItemHiddenInputId: (ctx: Scope, value: string) => any;
6
+ export declare const getItemControlId: (ctx: Scope, value: string) => any;
7
+ export declare const getItemLabelId: (ctx: Scope, value: string) => any;
8
+ export declare const getIndicatorId: (ctx: Scope) => any;
9
+ export declare const getRootEl: (ctx: Scope) => HTMLElement | null;
10
+ export declare const getItemHiddenInputEl: (ctx: Scope, value: string) => HTMLInputElement | null;
11
+ export declare const getIndicatorEl: (ctx: Scope) => HTMLElement | null;
12
+ export declare const getFirstEnabledInputEl: (ctx: Scope) => HTMLInputElement | null | undefined;
13
+ export declare const getFirstEnabledAndCheckedInputEl: (ctx: Scope) => HTMLInputElement | null | undefined;
14
+ export declare const getInputEls: (ctx: Scope) => HTMLInputElement[];
15
+ export declare const getRadioEl: (ctx: Scope, value: string | null) => HTMLElement | null | undefined;
16
+ export declare const getOffsetRect: (el: HTMLElement | undefined) => {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
22
21
  };
23
- declare const getRectById: (ctx: Scope, id: string) => {
24
- x: number;
25
- y: number;
26
- width: number;
27
- height: number;
28
- } | undefined;
29
-
30
- export { getFirstEnabledAndCheckedInputEl, getFirstEnabledInputEl, getIndicatorEl, getIndicatorId, getInputEls, getItemControlId, getItemHiddenInputEl, getItemHiddenInputId, getItemId, getItemLabelId, getLabelId, getOffsetRect, getRadioEl, getRectById, getRootEl, getRootId };
22
+ export declare const getRectById: (ctx: Scope, id: string) => {
23
+ x: number;
24
+ y: number;
25
+ width: number;
26
+ height: number;
27
+ } | undefined;