@zag-js/radio-group 1.47.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.
- 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 -250
- package/dist/radio-group.connect.mjs +241 -213
- package/dist/radio-group.dom.d.mts +26 -29
- package/dist/radio-group.dom.d.ts +26 -29
- package/dist/radio-group.dom.js +48 -86
- package/dist/radio-group.dom.mjs +29 -46
- package/dist/radio-group.machine.d.mts +2 -7
- package/dist/radio-group.machine.d.ts +2 -7
- package/dist/radio-group.machine.js +155 -217
- package/dist/radio-group.machine.mjs +150 -181
- 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 +185 -187
- package/dist/radio-group.types.d.ts +185 -187
- package/dist/radio-group.types.js +4 -18
- package/dist/radio-group.types.mjs +1 -0
- package/package.json +9 -9
|
@@ -1,218 +1,246 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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;
|