Skip to content

Commit 8518b37

Browse files
committed
chore: remove comments from Tab components
1 parent 8221712 commit 8518b37

File tree

4 files changed

+0
-47
lines changed

4 files changed

+0
-47
lines changed

app/components/Tab/Item.vue

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
<script setup lang="ts">
22
import type { IconClass } from '~/types'
33
4-
/**
5-
* Tab — a single tab button. Must be used inside TabList, within a TabRoot.
6-
*
7-
* Styling is driven by `data-selected` attribute — no conditional class logic.
8-
* Extra classes and attrs are passed through to ButtonBase.
9-
*/
10-
114
defineOptions({ name: 'TabItem', inheritAttrs: false })
125
136
const props = withDefaults(
147
defineProps<{
15-
/** Unique value identifying this tab. Must match a TabPanel's value. */
168
value: string
17-
/** Optional icon class displayed before the label. */
189
icon?: IconClass
19-
/** Optional explicit element id (default: auto-generated from TabRoot idPrefix). */
2010
tabId?: string
21-
/** @default "secondary" */
2211
variant?: 'primary' | 'secondary'
23-
/** @default "md" */
2412
size?: 'sm' | 'md'
2513
}>(),
2614
{

app/components/Tab/List.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
<script setup lang="ts">
2-
/**
3-
* TabList — wraps Tab children with `role="tablist"` and handles
4-
* arrow-key roving focus per WAI-ARIA Tabs pattern.
5-
*/
6-
72
defineOptions({ name: 'TabList' })
83
94
defineProps<{

app/components/Tab/Panel.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
<script setup lang="ts">
2-
/**
3-
* TabPanel — content panel associated with a Tab.
4-
*
5-
* Automatically shows/hides based on the selected tab value.
6-
* Uses `data-selected` for CSS-driven visibility when needed.
7-
*/
8-
92
defineOptions({ name: 'TabPanel' })
103
114
const props = defineProps<{
12-
/** Must match the corresponding Tab's value. */
135
value: string
14-
/** Optional explicit element id (default: auto-generated from Tabs idPrefix). */
156
panelId?: string
167
}>()
178

app/components/Tab/Root.vue

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,10 @@
11
<script setup lang="ts">
2-
/**
3-
* Root container for the accessible Tabs compound component.
4-
*
5-
* Provides shared state to TabList, Tab, and TabPanel children
6-
* via provide/inject. Minimal JS — visual states are driven by
7-
* `data-selected` attributes on Tab and TabPanel elements.
8-
*
9-
* @example
10-
* <Tabs v-model="activeTab" default-value="overview">
11-
* <TabList aria-label="Section navigation">
12-
* <Tab value="overview">Overview</Tab>
13-
* <Tab value="details">Details</Tab>
14-
* </TabList>
15-
* <TabPanel value="overview">Overview content</TabPanel>
16-
* <TabPanel value="details">Details content</TabPanel>
17-
* </Tabs>
18-
*/
19-
202
defineOptions({ name: 'TabRoot' })
213
224
const props = withDefaults(
235
defineProps<{
24-
/** Currently active tab value. */
256
modelValue?: string
26-
/** Fallback value when modelValue is not provided. */
277
defaultValue?: string
28-
/** Optional id prefix for generated tab/panel ids. */
298
idPrefix?: string
309
}>(),
3110
{

0 commit comments

Comments
 (0)