Skip to content

Commit 46bee93

Browse files
committed
refactor: remove rovingFocus and dir props from ToggleGroup component
1 parent d8d2001 commit 46bee93

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
lines changed

docs/content/docs/4.components/toggle-group.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,10 @@ ToggleGroup integrates with Nuxt UI's `UForm` via `useFormField`. Wrap it in a `
188188
| `defaultValue` | `string \| string[]` | - | Initial value when uncontrolled |
189189
| `multiple` | `boolean` | `true` | Allow multiple items to be selected |
190190
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Layout direction (affects keyboard navigation) |
191-
| `rovingFocus` | `boolean` | `true` | Enable arrow key navigation |
192191
| `loop` | `boolean` | `true` | Loop focus from last to first item |
193192
| `disabled` | `boolean` | `false` | Disable all interactions |
194193
| `name` | `string` | - | Form field name for form integration |
195194
| `required` | `boolean` | `false` | Mark as required for form validation |
196-
| `dir` | `'ltr' \| 'rtl'` | - | Reading direction |
197195
| `ui` | `{ root?, item? }` | - | Custom classes for root and item wrappers |
198196

199197
### Events

playground/app/pages/components/toggle-group.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,12 +394,6 @@
394394
<td class="py-2 pr-4 text-gray-500">"horizontal"</td>
395395
<td class="py-2 font-sans text-sm">Layout direction (affects keyboard nav)</td>
396396
</tr>
397-
<tr class="border-b border-gray-100 dark:border-gray-800">
398-
<td class="py-2 pr-4 text-primary">rovingFocus</td>
399-
<td class="py-2 pr-4 text-gray-500">boolean</td>
400-
<td class="py-2 pr-4 text-gray-500">true</td>
401-
<td class="py-2 font-sans text-sm">Enable arrow key navigation</td>
402-
</tr>
403397
<tr class="border-b border-gray-100 dark:border-gray-800">
404398
<td class="py-2 pr-4 text-primary">loop</td>
405399
<td class="py-2 pr-4 text-gray-500">boolean</td>

src/runtime/components/ToggleGroup.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
T extends ToggleGroupItem[] = ToggleGroupItem[],
2020
VK extends GetItemKeys<T> | undefined = "value",
2121
M extends boolean = true,
22-
> extends Pick<ToggleGroupRootProps, "rovingFocus" | "loop" | "disabled" | "name" | "required"> {
22+
> extends Pick<ToggleGroupRootProps, "loop" | "disabled" | "name" | "required"> {
2323
/**
2424
* The items to display
2525
*/
@@ -49,10 +49,6 @@
4949
* @defaultValue 'horizontal'
5050
*/
5151
orientation?: "horizontal" | "vertical"
52-
/**
53-
* The reading direction.
54-
*/
55-
dir?: "ltr" | "rtl"
5652
ui?: ToggleGroup["slots"]
5753
}
5854
@@ -78,7 +74,6 @@
7874
multiple = true as M,
7975
valueKey = "value" as VK,
8076
orientation = "horizontal",
81-
rovingFocus = true,
8277
loop = true,
8378
disabled = false,
8479
required = false,
@@ -194,8 +189,6 @@
194189
:model-value="internalValue"
195190
:default-value="defaultValue"
196191
:orientation="orientation"
197-
:dir="dir"
198-
:roving-focus="rovingFocus"
199192
:loop="loop"
200193
:disabled="formDisabled"
201194
:name="formFieldName"

0 commit comments

Comments
 (0)