@typed/ui 1.0.0-beta.5 → 1.0.0-beta.7

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.
Files changed (128) hide show
  1. package/dist/Alert.d.ts +35 -41
  2. package/dist/Alert.d.ts.map +1 -1
  3. package/dist/Alert.js +23 -20
  4. package/dist/Button.d.ts +34 -78
  5. package/dist/Button.d.ts.map +1 -1
  6. package/dist/Button.js +16 -12
  7. package/dist/Carousel.d.ts +35 -236
  8. package/dist/Carousel.d.ts.map +1 -1
  9. package/dist/Carousel.js +13 -136
  10. package/dist/Checkbox.d.ts +55 -90
  11. package/dist/Checkbox.d.ts.map +1 -1
  12. package/dist/Checkbox.js +44 -38
  13. package/dist/Collection.d.ts +15 -15
  14. package/dist/Collection.js +7 -7
  15. package/dist/Combobox.d.ts +38 -187
  16. package/dist/Combobox.d.ts.map +1 -1
  17. package/dist/Combobox.js +9 -80
  18. package/dist/Component.d.ts +30 -24
  19. package/dist/Component.d.ts.map +1 -1
  20. package/dist/Component.js +23 -12
  21. package/dist/Composite.d.ts +50 -50
  22. package/dist/Composite.js +20 -20
  23. package/dist/Dialog.d.ts +34 -34
  24. package/dist/Dialog.d.ts.map +1 -1
  25. package/dist/Dialog.js +16 -14
  26. package/dist/Disclosure.d.ts +15 -15
  27. package/dist/Disclosure.js +6 -6
  28. package/dist/Dom/Events.d.ts +4 -4
  29. package/dist/Dom/Events.js +4 -4
  30. package/dist/Dom/Props.d.ts +9 -9
  31. package/dist/Dom/Props.js +4 -4
  32. package/dist/Dom/Refs.d.ts +2 -2
  33. package/dist/Dom/Refs.js +1 -1
  34. package/dist/Dom/Render.d.ts +2 -2
  35. package/dist/Dom/Render.js +2 -2
  36. package/dist/Dom/Types.d.ts +33 -33
  37. package/dist/Dom/index.d.ts +5 -5
  38. package/dist/Dom/index.d.ts.map +1 -1
  39. package/dist/Dom/index.js +4 -4
  40. package/dist/Dom.d.ts +1 -1
  41. package/dist/Dom.js +1 -1
  42. package/dist/Focusable.d.ts +5 -5
  43. package/dist/Focusable.js +1 -1
  44. package/dist/Form.d.ts +565 -533
  45. package/dist/Form.d.ts.map +1 -1
  46. package/dist/Form.js +350 -195
  47. package/dist/Grid.d.ts +39 -220
  48. package/dist/Grid.d.ts.map +1 -1
  49. package/dist/Grid.js +12 -107
  50. package/dist/Group.d.ts +50 -69
  51. package/dist/Group.d.ts.map +1 -1
  52. package/dist/Group.js +33 -25
  53. package/dist/Heading.d.ts +41 -40
  54. package/dist/Heading.d.ts.map +1 -1
  55. package/dist/Heading.js +26 -16
  56. package/dist/Hovercard.d.ts +18 -18
  57. package/dist/Hovercard.js +6 -6
  58. package/dist/HttpRouter.d.ts +3 -3
  59. package/dist/HttpRouter.js +5 -5
  60. package/dist/Link.d.ts +17 -21
  61. package/dist/Link.d.ts.map +1 -1
  62. package/dist/Link.js +11 -0
  63. package/dist/Listbox.d.ts +31 -163
  64. package/dist/Listbox.d.ts.map +1 -1
  65. package/dist/Listbox.js +9 -80
  66. package/dist/Menu.d.ts +67 -376
  67. package/dist/Menu.d.ts.map +1 -1
  68. package/dist/Menu.js +17 -179
  69. package/dist/Menubar.d.ts +24 -142
  70. package/dist/Menubar.d.ts.map +1 -1
  71. package/dist/Menubar.js +8 -66
  72. package/dist/Meter.d.ts +72 -132
  73. package/dist/Meter.d.ts.map +1 -1
  74. package/dist/Meter.js +35 -42
  75. package/dist/NativeDetails.d.ts +1 -1
  76. package/dist/NativeDetails.js +1 -1
  77. package/dist/NativeDialog.d.ts +7 -5
  78. package/dist/NativeDialog.d.ts.map +1 -1
  79. package/dist/NativeDialog.js +42 -4
  80. package/dist/NativePopover.d.ts +6 -4
  81. package/dist/NativePopover.d.ts.map +1 -1
  82. package/dist/NativePopover.js +43 -5
  83. package/dist/Popover.d.ts +18 -19
  84. package/dist/Popover.d.ts.map +1 -1
  85. package/dist/Popover.js +7 -8
  86. package/dist/RadioGroup.d.ts +86 -188
  87. package/dist/RadioGroup.d.ts.map +1 -1
  88. package/dist/RadioGroup.js +55 -105
  89. package/dist/Role.d.ts +4 -4
  90. package/dist/Role.js +1 -1
  91. package/dist/Select.d.ts +109 -220
  92. package/dist/Select.d.ts.map +1 -1
  93. package/dist/Select.js +67 -117
  94. package/dist/Separator.d.ts +30 -26
  95. package/dist/Separator.d.ts.map +1 -1
  96. package/dist/Separator.js +16 -10
  97. package/dist/Slider.d.ts +64 -111
  98. package/dist/Slider.d.ts.map +1 -1
  99. package/dist/Slider.js +47 -42
  100. package/dist/SpinButton.d.ts +64 -111
  101. package/dist/SpinButton.d.ts.map +1 -1
  102. package/dist/SpinButton.js +47 -42
  103. package/dist/Storybook.d.ts +2 -2
  104. package/dist/Storybook.js +1 -1
  105. package/dist/Switch.d.ts +52 -91
  106. package/dist/Switch.d.ts.map +1 -1
  107. package/dist/Switch.js +30 -36
  108. package/dist/Tabs.d.ts +44 -224
  109. package/dist/Tabs.d.ts.map +1 -1
  110. package/dist/Tabs.js +10 -94
  111. package/dist/Toolbar.d.ts +24 -142
  112. package/dist/Toolbar.d.ts.map +1 -1
  113. package/dist/Toolbar.js +8 -66
  114. package/dist/Tooltip.d.ts +20 -20
  115. package/dist/Tooltip.js +6 -6
  116. package/dist/Tree.d.ts +43 -229
  117. package/dist/Tree.d.ts.map +1 -1
  118. package/dist/Tree.js +12 -113
  119. package/dist/TreeGrid.d.ts +45 -264
  120. package/dist/TreeGrid.d.ts.map +1 -1
  121. package/dist/TreeGrid.js +13 -125
  122. package/dist/VisuallyHidden.d.ts +41 -27
  123. package/dist/VisuallyHidden.d.ts.map +1 -1
  124. package/dist/VisuallyHidden.js +27 -10
  125. package/dist/WindowSplitter.d.ts +68 -108
  126. package/dist/WindowSplitter.d.ts.map +1 -1
  127. package/dist/WindowSplitter.js +106 -23
  128. package/package.json +9 -8
@@ -1,15 +1,12 @@
1
1
  /**
2
- * RadioGroup keeps a selected value and active id in explicit state. Arrow movement skips disabled
3
- * registered items, updates selection, and moves focus; each item renders a real radio input with
4
- * ARIA state.
2
+ * Native radio selection with optional registered keyboard movement.
3
+ * Choice values, element IDs, and shared native names have distinct responsibilities.
5
4
  *
6
- * @remarks
7
- * The module keeps policy, state transitions, and DOM rendering separable so applications can use
8
- * the state and pure operations without mounting UI, or supply custom hosts without replacing native
9
- * events and browser-owned focus.
5
+ * Read the [RadioGroup guide](/explore/ui-radio-group) for a complete example.
10
6
  *
7
+ * [APG interaction reference](https://www.w3.org/WAI/ARIA/apg/patterns/radio/).
11
8
  * @since 1.0.0
12
- * @category modules
9
+ * @category Overview
13
10
  * @packageDocumentation
14
11
  */
15
12
  import * as Effect from "effect/Effect";
@@ -23,80 +20,54 @@ import * as Composite from "./Composite.js";
23
20
  import * as Dom from "./Dom.js";
24
21
  import type { HostResult } from "./Dom/Types.js";
25
22
  /**
26
- * Complete renderer-independent state for RadioGroup.
23
+ * Selected choice plus the active element used for keyboard movement.
27
24
  *
28
25
  * @remarks
29
- * ## Why
30
- *
31
- * Applications can inspect, update, and test RadioGroup behavior without mounting or coupling the
32
- * state to a renderer.
33
- *
34
- * ## Ownership and lifetime
35
- *
36
- * This declaration is data or schema metadata and acquires no resources.
37
- *
38
- * ## Example
39
- *
40
- * Import with `import type { State } from "@typed/ui/RadioGroup";` Extend the [RadioGroup.makeState
41
- * runnable setup](/reference/%40typed%2Fui%2FRadioGroup%23makeState). Inside the linked program,
42
- * `const snapshot: State = yield* state` exposes the checked value and roving-focus id.
26
+ * value need not equal activeId. Orientation is vertical, virtualFocus is false, and the native
27
+ * inputs retain their own browser grouping by name.
43
28
  * @since 1.0.0
44
- * @category models
29
+ * @category State models
45
30
  */
46
31
  export interface State extends Omit<Composite.State, "orientation"> {
47
32
  /**
48
33
  * Axis used to interpret Arrow-key movement.
49
34
  * @since 1.0.0
50
- * @category models
35
+ * @category Keyboard navigation
51
36
  */
52
37
  readonly orientation: "vertical";
53
38
  /**
54
39
  * Current semantic value selected or edited by the widget.
55
40
  * @since 1.0.0
56
- * @category models
41
+ * @category Value state
57
42
  */
58
43
  readonly value: string;
59
44
  }
60
45
  /**
61
- * Initial RadioGroup values. The caller supplies value; activeId defaults to that value and loop
62
- * defaults true.
46
+ * Required selected value with optional initial active ID and wrap policy.
63
47
  *
64
48
  * @remarks
65
- * ## Why
66
- *
67
- * Making initialization explicit documents hydration-sensitive defaults and lets servers and
68
- * clients construct matching state.
69
- *
70
- * ## Ownership and lifetime
71
- *
72
- * This declaration is data or schema metadata and acquires no resources.
73
- *
74
- * ## Example
75
- *
76
- * Import with `import type { InitialState } from "@typed/ui/RadioGroup";` Extend the
77
- * [RadioGroup.makeState runnable setup](/reference/%40typed%2Fui%2FRadioGroup%23makeState).
78
- * Construct state with
79
- * `const initial: InitialState = { value: "email", activeId: "email" }; const state = yield* RadioGroup.makeState(initial)`.
49
+ * activeId defaults to null; loop defaults to true. Supply an element ID only when the initial
50
+ * active choice is known.
80
51
  * @since 1.0.0
81
- * @category models
52
+ * @category State models
82
53
  */
83
54
  export interface InitialState {
84
55
  /**
85
56
  * Current semantic value selected or edited by the widget.
86
57
  * @since 1.0.0
87
- * @category models
58
+ * @category Value state
88
59
  */
89
60
  readonly value: string;
90
61
  /**
91
62
  * Id currently active for keyboard navigation; null means no active item.
92
63
  * @since 1.0.0
93
- * @category models
64
+ * @category Keyboard focus
94
65
  */
95
66
  readonly activeId?: string | null;
96
67
  /**
97
68
  * Whether movement wraps between the first and last enabled items.
98
69
  * @since 1.0.0
99
- * @category models
70
+ * @category Keyboard navigation
100
71
  */
101
72
  readonly loop?: boolean;
102
73
  }
@@ -104,15 +75,9 @@ export interface InitialState {
104
75
  * Effect Schema used by makeState to encode, decode, and hydrate RadioGroup state.
105
76
  *
106
77
  * @remarks
107
- * ## Why
108
- *
109
78
  * A public schema makes hydration and serialized state use the same runtime validation as direct
110
79
  * construction.
111
80
  *
112
- * ## Ownership and lifetime
113
- *
114
- * This declaration is data or schema metadata and acquires no resources.
115
- *
116
81
  * @example
117
82
  * ```ts
118
83
  * import * as Schema from "effect/Schema";
@@ -121,7 +86,7 @@ export interface InitialState {
121
86
  * const decodeState = Schema.decodeUnknownEffect(RadioGroup.StateSchema);
122
87
  * ```
123
88
  * @since 1.0.0
124
- * @category schemas
89
+ * @category Hydration schemas
125
90
  */
126
91
  export declare const StateSchema: Schema.Struct<{
127
92
  readonly value: Schema.String;
@@ -132,19 +97,13 @@ export declare const StateSchema: Schema.Struct<{
132
97
  readonly virtualFocus: Schema.Boolean;
133
98
  }>;
134
99
  /**
135
- * Creates hydrated RadioGroup state. The caller supplies value; activeId defaults to that value
136
- * and loop defaults true.
100
+ * Creates hydrated radio selection with a required value, null active ID, and looping enabled by
101
+ * default.
137
102
  *
138
103
  * @remarks
139
- * ## Why
140
- *
141
- * State and collection ownership can be composed and tested independently from any renderer.
142
- *
143
- * ## Ownership and lifetime
144
- *
145
- * The returned Effect creates the RefSubject when run. That state is renderer-independent;
146
- * collection registrations belong to the separate Scope that runs register or ref, not to state
147
- * creation.
104
+ * The selected value and element ID are separate. The first keyboard movement can resolve the
105
+ * selected value against the mounted collection. Creation requires Scope; renderers borrow the
106
+ * returned subject.
148
107
  *
149
108
  * @example
150
109
  * ```ts
@@ -160,7 +119,7 @@ export declare const StateSchema: Schema.Struct<{
160
119
  * );
161
120
  * ```
162
121
  * @since 1.0.0
163
- * @category constructors
122
+ * @category State construction
164
123
  */
165
124
  export declare function makeState(initial: InitialState): Effect.Effect<RefSubject.HydratedRefSubject<{
166
125
  readonly value: string;
@@ -174,12 +133,8 @@ export declare function makeState(initial: InitialState): Effect.Effect<RefSubje
174
133
  * Creates a scoped Collection for RadioGroup items.
175
134
  *
176
135
  * @remarks
177
- * ## Why
178
- *
179
136
  * State and collection ownership can be composed and tested independently from any renderer.
180
137
  *
181
- * ## Ownership and lifetime
182
- *
183
138
  * The returned Effect allocates the RefSubject in the caller's Scope. Each later registration is
184
139
  * owned by the Scope that runs register, independently of this construction Effect.
185
140
  *
@@ -196,78 +151,51 @@ export declare function makeState(initial: InitialState): Effect.Effect<RefSubje
196
151
  * );
197
152
  * ```
198
153
  * @since 1.0.0
199
- * @category constructors
154
+ * @category State construction
200
155
  */
201
156
  export declare const makeCollection: (initial?: Collection.State<string, Element>) => Effect.Effect<RefSubject.RefSubject<Collection.State<string, Element>, never, never>, never, Scope.Scope>;
202
157
  /**
203
- * Sets selected value and activeId to the same registered radio id.
158
+ * Sets the selected value and optionally the active element ID.
204
159
  *
205
160
  * @remarks
206
- * ## Why
207
- *
208
- * The operation exposes RadioGroup's transition directly so callers can compose it in Effect
209
- * programs and native event handlers.
210
- *
211
- * ## Ownership and lifetime
212
- *
213
- * The returned Effect performs the update or DOM side effect only when run, preserves the declared
214
- * error and service channels, and retains no resources after completion.
215
- *
216
- * ## Example
217
- *
218
- * Import with `import { setValue } from "@typed/ui/RadioGroup";` Extend the [RadioGroup.makeState
219
- * runnable setup](/reference/%40typed%2Fui%2FRadioGroup%23makeState). Inside the linked Effect
220
- * program invoke `yield* setValue(state, "phone", "phone")`, then read state to observe the checked
221
- * value and active roving-focus id update together.
161
+ * Omitting activeId preserves the previous active ID. This state update does not look up an
162
+ * item, move DOM focus, or verify that the value belongs to the group.
222
163
  * @since 1.0.0
223
- * @category combinators
164
+ * @category State transitions
224
165
  */
225
166
  export declare function setValue<E, R>(state: RefSubject.RefSubject<State, E, R>, value: string, activeId?: string): Effect.Effect<State, E, R>;
226
167
  /**
227
- * Inputs accepted by RadioGroup.Root in addition to the shared DOM host options.
168
+ * State, optional navigation collection, child content, and group name.
228
169
  *
229
170
  * @remarks
230
- * ## Why
231
- *
232
- * The options type makes required state, content, accessible relationships, and custom-host inputs
233
- * visible before rendering.
234
- *
235
- * ## Ownership and lifetime
236
- *
237
- * This declaration is data or schema metadata and acquires no resources.
238
- *
239
- * ## Example
240
- *
241
- * Import with `import type { RootOptions } from "@typed/ui/RadioGroup";` Extend the
242
- * [RadioGroup.makeState runnable setup](/reference/%40typed%2Fui%2FRadioGroup%23makeState). Enable
243
- * Arrow-key selection with
244
- * `const options: RootOptions = { state, collection, label: "Contact method", content: "Choices" }`.
171
+ * Share the same collection with Item to enable registered keyboard movement. label names the
172
+ * group; each item still needs its own label.
245
173
  * @since 1.0.0
246
- * @category models
174
+ * @category Component options
247
175
  */
248
176
  export interface RootOptions extends Dom.HostOptions<HTMLDivElement> {
249
177
  /**
250
178
  * Renderer-independent RefSubject state consumed by this component or operation.
251
179
  * @since 1.0.0
252
- * @category models
180
+ * @category State connection
253
181
  */
254
182
  readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
255
183
  /**
256
184
  * Item registry used for collection-driven keyboard behavior and mounted ordering.
257
185
  * @since 1.0.0
258
- * @category models
186
+ * @category Item registration
259
187
  */
260
188
  readonly collection?: RefSubject.RefSubject<Collection.State<string>>;
261
189
  /**
262
190
  * Renderable child content for the component host.
263
191
  * @since 1.0.0
264
- * @category models
192
+ * @category Rendered content
265
193
  */
266
194
  readonly content: Renderable.Any;
267
195
  /**
268
196
  * Accessible label rendered through aria-label.
269
197
  * @since 1.0.0
270
- * @category models
198
+ * @category Accessible naming
271
199
  */
272
200
  readonly label?: Renderable.Any<string | null | undefined>;
273
201
  }
@@ -279,87 +207,86 @@ declare function rootInternalProps<const Options extends RootOptions>(options: O
279
207
  };
280
208
  type RootInternalProps<Options extends RootOptions> = ReturnType<ReturnType<typeof rootInternalProps<Options>>>;
281
209
  /**
282
- * Renders the radiogroup and maps Arrow keys to selection and focus movement.
210
+ * Renders a named radiogroup around native radio items.
283
211
  *
284
212
  * @remarks
285
- * ## Why
286
- *
287
- * The component applies the family behavior while leaving callers free to supply a custom host
288
- * through the shared DOM boundary.
289
- *
290
- * ## Ownership and lifetime
291
- *
292
- * The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
293
- * collection registrations only when rendered. The rendering Scope removes those resources;
294
- * unrelated nodes and attributes remain caller-owned.
213
+ * Pass the same state to every item and the same native name to items in one group. With a
214
+ * collection, the root handles vertical arrow movement and Home/End, skips disabled
215
+ * registrations, updates selection, and moves real focus. Without a collection, native input
216
+ * behavior remains the keyboard boundary.
295
217
  *
296
- * ## Example
218
+ * @example
219
+ * ```ts
220
+ * import { html } from "@typed/template";
221
+ * import { component } from "@typed/ui/Component";
222
+ * import * as RadioGroup from "@typed/ui/RadioGroup";
297
223
  *
298
- * Import with `import { Root } from "@typed/ui/RadioGroup";` Extend the [RadioGroup.makeState
299
- * runnable setup](/reference/%40typed%2Fui%2FRadioGroup%23makeState). Replace the linked program's
300
- * final snapshot read with `Root({ state, label: "Contact method", content: "Choices" })`; render
301
- * that Fx before the same Scope closes.
224
+ * export const DeliveryChoice = component(function* () {
225
+ * const state = yield* RadioGroup.makeState({ value: "standard" });
226
+ * const collection = yield* RadioGroup.makeCollection();
227
+ * return RadioGroup.Root({
228
+ * state,
229
+ * collection,
230
+ * label: "Delivery speed",
231
+ * content: html`
232
+ * <label>${RadioGroup.Item({
233
+ * state, collection, id: "delivery-standard", name: "delivery", value: "standard",
234
+ * })} Standard delivery</label>
235
+ * <label>${RadioGroup.Item({
236
+ * state, collection, id: "delivery-express", name: "delivery", value: "express",
237
+ * })} Express delivery</label>
238
+ * `,
239
+ * });
240
+ * });
241
+ * ```
302
242
  * @since 1.0.0
303
- * @category components
243
+ * @category Native controls
304
244
  */
305
245
  export declare function Root<const Options extends RootOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, RootInternalProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
306
246
  /**
307
- * Inputs accepted by RadioGroup.Item in addition to the shared DOM host options.
247
+ * One native choice with stable element ID, application value, and native group name.
308
248
  *
309
249
  * @remarks
310
- * ## Why
311
- *
312
- * The options type makes required state, content, accessible relationships, and custom-host inputs
313
- * visible before rendering.
314
- *
315
- * ## Ownership and lifetime
316
- *
317
- * This declaration is data or schema metadata and acquires no resources.
318
- *
319
- * ## Example
320
- *
321
- * Import with `import type { ItemOptions } from "@typed/ui/RadioGroup";` Extend the
322
- * [RadioGroup.makeState runnable setup](/reference/%40typed%2Fui%2FRadioGroup%23makeState). A
323
- * native radio input is
324
- * `const options: ItemOptions = { state, collection, id: "email", value: "email", name: "contact" }`.
250
+ * Use the same state and name across one radio group, unique IDs across the document, and distinct
251
+ * values across choices. disabled is a boolean used by both rendering and registration.
325
252
  * @since 1.0.0
326
- * @category models
253
+ * @category Component options
327
254
  */
328
255
  export interface ItemOptions extends Dom.HostOptions<HTMLInputElement> {
329
256
  /**
330
257
  * Renderer-independent RefSubject state consumed by this component or operation.
331
258
  * @since 1.0.0
332
- * @category models
259
+ * @category State connection
333
260
  */
334
261
  readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
335
262
  /**
336
263
  * Item registry used for collection-driven keyboard behavior and mounted ordering.
337
264
  * @since 1.0.0
338
- * @category models
265
+ * @category Item registration
339
266
  */
340
267
  readonly collection?: RefSubject.RefSubject<Collection.State<string>>;
341
268
  /**
342
269
  * Stable id used for collection identity and ARIA relationships.
343
270
  * @since 1.0.0
344
- * @category models
271
+ * @category Identity and relationships
345
272
  */
346
273
  readonly id: string;
347
274
  /**
348
275
  * Current semantic value selected or edited by the widget.
349
276
  * @since 1.0.0
350
- * @category models
277
+ * @category Value state
351
278
  */
352
279
  readonly value: string;
353
280
  /**
354
281
  * Native radio-group form name shared by related input items.
355
282
  * @since 1.0.0
356
- * @category models
283
+ * @category Native form data
357
284
  */
358
285
  readonly name?: string;
359
286
  /**
360
287
  * Flag used by collection movement and widget handlers to skip activation by default.
361
288
  * @since 1.0.0
362
- * @category models
289
+ * @category Availability
363
290
  */
364
291
  readonly disabled?: boolean;
365
292
  }
@@ -379,53 +306,24 @@ declare function itemInternalProps<const Options extends ItemOptions>(options: O
379
306
  };
380
307
  type ItemInternalProps<Options extends ItemOptions> = ReturnType<ReturnType<typeof itemInternalProps<Options>>>;
381
308
  /**
382
- * Renders and optionally registers a native radio input synchronized with selected value.
309
+ * Renders one native radio input and optionally registers it for group navigation.
383
310
  *
384
311
  * @remarks
385
- * ## Why
386
- *
387
- * The component applies the family behavior while leaving callers free to supply a custom host
388
- * through the shared DOM boundary.
389
- *
390
- * ## Ownership and lifetime
391
- *
392
- * The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
393
- * collection registrations only when rendered. The rendering Scope removes those resources;
394
- * unrelated nodes and attributes remain caller-owned.
395
- *
396
- * ## Example
397
- *
398
- * Import with `import { Item } from "@typed/ui/RadioGroup";` Extend the [RadioGroup.makeState
399
- * runnable setup](/reference/%40typed%2Fui%2FRadioGroup%23makeState). Replace the linked program's
400
- * final snapshot read with `Item({ state, id: "email", value: "email", name: "contact" })`; render
401
- * that Fx before the same Scope closes.
312
+ * id identifies the element; value identifies the choice; name establishes the native browser
313
+ * group. A native change updates the selected value and active ID. Supply a wrapping label or an
314
+ * external label linked to id. Registration ends with the rendered Scope.
402
315
  * @since 1.0.0
403
- * @category components
316
+ * @category Native controls
404
317
  */
405
318
  export declare function Item<const Options extends ItemOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, ItemInternalProps<Options>>, "", Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
406
319
  /**
407
- * Consumer-facing alias of the canonical RadioGroup component with identical behavior and
408
- * lifetime.
320
+ * Alias of Root.
409
321
  *
410
322
  * @remarks
411
- * ## Why
412
- *
413
- * The component applies the family behavior while leaving callers free to supply a custom host
414
- * through the shared DOM boundary.
415
- *
416
- * ## Ownership and lifetime
417
- *
418
- * The alias acquires nothing. Rendering it has exactly the canonical component's Scope and DOM
419
- * ownership contract.
420
- *
421
- * ## Example
422
- *
423
- * Import with `import { RadioGroup } from "@typed/ui/RadioGroup";` Extend the [RadioGroup.makeState
424
- * runnable setup](/reference/%40typed%2Fui%2FRadioGroup%23makeState). Replace the linked program's
425
- * final snapshot read with `RadioGroup({ state, label: "Contact method", content: "Choices" })`;
426
- * render that Fx before the same Scope closes.
323
+ * The alias exposes the same native-input grouping and optional collection behavior; it introduces
324
+ * no additional state or focus policy.
427
325
  * @since 1.0.0
428
- * @category components
326
+ * @category Native controls
429
327
  */
430
328
  export declare const RadioGroup: typeof Root;
431
329
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../src/RadioGroup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,YAAY,EAEZ,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,KAAM,SAAQ,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC;IACjE;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,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