@zag-js/radio-group 2.0.0-next.2 → 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.
- package/dist/index.d.mts +6 -8
- package/dist/index.d.ts +6 -8
- package/dist/index.js +14 -38
- package/dist/index.mjs +2 -7
- package/dist/radio-group.anatomy.d.mts +2 -6
- package/dist/radio-group.anatomy.d.ts +2 -6
- package/dist/radio-group.anatomy.js +8 -40
- package/dist/radio-group.anatomy.mjs +4 -14
- package/dist/radio-group.connect.d.mts +3 -7
- package/dist/radio-group.connect.d.ts +3 -7
- package/dist/radio-group.connect.js +247 -257
- package/dist/radio-group.connect.mjs +242 -221
- package/dist/radio-group.dom.d.mts +26 -29
- package/dist/radio-group.dom.d.ts +26 -29
- package/dist/radio-group.dom.js +47 -85
- package/dist/radio-group.dom.mjs +28 -45
- package/dist/radio-group.machine.d.mts +2 -7
- package/dist/radio-group.machine.d.ts +2 -7
- package/dist/radio-group.machine.js +159 -217
- package/dist/radio-group.machine.mjs +155 -182
- package/dist/radio-group.props.d.mts +5 -10
- package/dist/radio-group.props.d.ts +5 -10
- package/dist/radio-group.props.js +32 -54
- package/dist/radio-group.props.mjs +25 -26
- package/dist/radio-group.types.d.mts +212 -213
- package/dist/radio-group.types.d.ts +212 -213
- package/dist/radio-group.types.js +4 -18
- package/dist/radio-group.types.mjs +1 -0
- package/package.json +8 -8
|
@@ -1,225 +1,246 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
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
|
-
|
|
6
|
-
import * as dom from "./radio-group.dom.mjs";
|
|
6
|
+
// src/radio-group.connect.ts
|
|
7
7
|
function connect(service, normalize) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
declare const
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
11
|
-
declare const
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
14
|
-
declare const
|
|
15
|
-
declare const
|
|
16
|
-
declare const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
declare const
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
11
|
-
declare const
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
14
|
-
declare const
|
|
15
|
-
declare const
|
|
16
|
-
declare const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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;
|