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

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