@reliability-design/web 1.4.6 → 1.4.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 (146) hide show
  1. package/CHANGELOG.md +211 -49
  2. package/dist/components/rel-accordion/README.md +132 -132
  3. package/dist/components/rel-alert/README.md +145 -141
  4. package/dist/components/rel-autocomplete/README.md +156 -61
  5. package/dist/components/rel-avatar/README.md +116 -130
  6. package/dist/components/rel-badge/README.md +98 -93
  7. package/dist/components/rel-breadcrumb/README.md +96 -102
  8. package/dist/components/rel-button/README.md +160 -130
  9. package/dist/components/rel-calendar/README.md +109 -109
  10. package/dist/components/rel-card/README.md +75 -94
  11. package/dist/components/rel-cardmedia/README.md +100 -127
  12. package/dist/components/rel-carousel/README.md +184 -166
  13. package/dist/components/rel-checkbox/README.md +93 -75
  14. package/dist/components/rel-chip/README.md +132 -121
  15. package/dist/components/rel-container/README.md +107 -99
  16. package/dist/components/rel-date-picker/README.md +200 -289
  17. package/dist/components/rel-divider/README.md +78 -100
  18. package/dist/components/rel-drawer/README.md +187 -200
  19. package/dist/components/rel-kbd/README.md +141 -151
  20. package/dist/components/rel-menu/README.md +178 -151
  21. package/dist/components/rel-menubar/README.md +218 -329
  22. package/dist/components/rel-otp/README.md +170 -440
  23. package/dist/components/rel-pagination/README.md +100 -424
  24. package/dist/components/rel-popover/README.md +203 -568
  25. package/dist/components/rel-progress/README.md +88 -110
  26. package/dist/components/rel-radio/README.md +131 -138
  27. package/dist/components/rel-range-picker/README.md +162 -0
  28. package/dist/components/rel-resizable/README.md +199 -140
  29. package/dist/components/rel-segmented-button/README.md +155 -141
  30. package/dist/components/rel-select/README.md +154 -93
  31. package/dist/components/rel-sheet/README.md +168 -224
  32. package/dist/components/rel-skeleton/README.md +103 -0
  33. package/dist/components/rel-slider/README.md +130 -135
  34. package/dist/components/rel-snackbar/README.md +162 -134
  35. package/dist/components/rel-stepper/README.md +158 -160
  36. package/dist/components/rel-switch/README.md +108 -102
  37. package/dist/components/rel-tab/README.md +171 -163
  38. package/dist/components/rel-textfield/README.md +159 -69
  39. package/dist/components/rel-time-picker/README.md +122 -157
  40. package/dist/components/rel-toast/README.md +157 -148
  41. package/dist/components/rel-tooltip/README.md +108 -111
  42. package/dist/components/rel-upload/README.md +220 -0
  43. package/dist/index.d.mts +1147 -340
  44. package/dist/index.d.ts +1147 -340
  45. package/dist/index.js +3451 -3163
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +3416 -3118
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/styles/vars.css +877 -866
  50. package/dist/{vars-XNMTSRVN.css → vars-JHTUGNRG.css} +877 -866
  51. package/package.json +3 -2
  52. package/dist/components/rel-accordion/rel-accordion.ts +0 -336
  53. package/dist/components/rel-alert/rel-alert.ts +0 -305
  54. package/dist/components/rel-autocomplete/rel-autocomplete.ts +0 -720
  55. package/dist/components/rel-avatar/rel-avatar.ts +0 -142
  56. package/dist/components/rel-badge/rel-badge.ts +0 -175
  57. package/dist/components/rel-breadcrumb/rel-breadcrumb.ts +0 -106
  58. package/dist/components/rel-button/rel-button.ts +0 -560
  59. package/dist/components/rel-calendar/index.ts +0 -1
  60. package/dist/components/rel-calendar/rel-calendar.ts +0 -565
  61. package/dist/components/rel-card/rel-card.ts +0 -88
  62. package/dist/components/rel-cardmedia/rel-cardmedia.ts +0 -88
  63. package/dist/components/rel-carousel/index.ts +0 -1
  64. package/dist/components/rel-carousel/rel-carousel.ts +0 -723
  65. package/dist/components/rel-chart/README.md +0 -286
  66. package/dist/components/rel-chart/index.ts +0 -1
  67. package/dist/components/rel-chart/rel-chart.ts +0 -754
  68. package/dist/components/rel-checkbox/rel-checkbox.ts +0 -382
  69. package/dist/components/rel-chip/rel-chip.ts +0 -483
  70. package/dist/components/rel-container/rel-container.ts +0 -95
  71. package/dist/components/rel-date-picker/date-format.test.ts +0 -43
  72. package/dist/components/rel-date-picker/date-format.ts +0 -47
  73. package/dist/components/rel-date-picker/date-parse.test.ts +0 -116
  74. package/dist/components/rel-date-picker/date-parse.ts +0 -178
  75. package/dist/components/rel-date-picker/index.ts +0 -1
  76. package/dist/components/rel-date-picker/rel-date-picker.ts +0 -1676
  77. package/dist/components/rel-divider/rel-divider.ts +0 -54
  78. package/dist/components/rel-drawer/index.ts +0 -1
  79. package/dist/components/rel-drawer/rel-drawer-footer.ts +0 -27
  80. package/dist/components/rel-drawer/rel-drawer.ts +0 -607
  81. package/dist/components/rel-kbd/rel-kbd.ts +0 -188
  82. package/dist/components/rel-layout/rel-layout.ts +0 -49
  83. package/dist/components/rel-menu/rel-menu.ts +0 -541
  84. package/dist/components/rel-menubar/index.ts +0 -2
  85. package/dist/components/rel-menubar/rel-menubar-menu.css +0 -3
  86. package/dist/components/rel-menubar/rel-menubar-menu.ts +0 -17
  87. package/dist/components/rel-menubar/rel-menubar.ts +0 -777
  88. package/dist/components/rel-nav-menu/README.md +0 -289
  89. package/dist/components/rel-nav-menu/index.ts +0 -3
  90. package/dist/components/rel-nav-menu/rel-nav-menu-item.ts +0 -243
  91. package/dist/components/rel-nav-menu/rel-nav-menu-panel.ts +0 -72
  92. package/dist/components/rel-nav-menu/rel-nav-menu.ts +0 -270
  93. package/dist/components/rel-navbar/README.md +0 -126
  94. package/dist/components/rel-navbar/rel-navbar.ts +0 -105
  95. package/dist/components/rel-otp/index.ts +0 -1
  96. package/dist/components/rel-otp/rel-otp.ts +0 -527
  97. package/dist/components/rel-pagination/index.ts +0 -1
  98. package/dist/components/rel-pagination/rel-pagination.ts +0 -522
  99. package/dist/components/rel-popover/index.ts +0 -2
  100. package/dist/components/rel-popover/rel-popover-content.ts +0 -81
  101. package/dist/components/rel-popover/rel-popover.ts +0 -475
  102. package/dist/components/rel-progress/rel-progress.ts +0 -234
  103. package/dist/components/rel-radio/rel-radio.ts +0 -481
  104. package/dist/components/rel-range-picker/rel-range-picker.ts +0 -1688
  105. package/dist/components/rel-resizable/index.ts +0 -3
  106. package/dist/components/rel-resizable/rel-resizable-group.ts +0 -405
  107. package/dist/components/rel-resizable/rel-resizable-handle.ts +0 -150
  108. package/dist/components/rel-resizable/rel-resizable-panel.ts +0 -58
  109. package/dist/components/rel-segmented-button/rel-segmented-button.ts +0 -217
  110. package/dist/components/rel-select/rel-select.ts +0 -1416
  111. package/dist/components/rel-sheet/rel-sheet.ts +0 -610
  112. package/dist/components/rel-sidebar/README.md +0 -209
  113. package/dist/components/rel-sidebar/rel-sidebar.ts +0 -1191
  114. package/dist/components/rel-skeleton/rel-skeleton.ts +0 -143
  115. package/dist/components/rel-slider/rel-slider.ts +0 -673
  116. package/dist/components/rel-snackbar/rel-snackbar.ts +0 -329
  117. package/dist/components/rel-stepper/rel-stepper.ts +0 -567
  118. package/dist/components/rel-switch/rel-switch.ts +0 -199
  119. package/dist/components/rel-tab/rel-tab.ts +0 -264
  120. package/dist/components/rel-table/README.md +0 -178
  121. package/dist/components/rel-table/rel-table-body.ts +0 -22
  122. package/dist/components/rel-table/rel-table-caption.ts +0 -30
  123. package/dist/components/rel-table/rel-table-cell.ts +0 -43
  124. package/dist/components/rel-table/rel-table-footer.ts +0 -24
  125. package/dist/components/rel-table/rel-table-head.ts +0 -47
  126. package/dist/components/rel-table/rel-table-header.ts +0 -22
  127. package/dist/components/rel-table/rel-table-row.ts +0 -37
  128. package/dist/components/rel-table/rel-table.ts +0 -62
  129. package/dist/components/rel-textfield/rel-textfield.ts +0 -1054
  130. package/dist/components/rel-time-picker/rel-time-picker.ts +0 -1482
  131. package/dist/components/rel-time-picker/time-parse.test.ts +0 -67
  132. package/dist/components/rel-time-picker/time-parse.ts +0 -85
  133. package/dist/components/rel-toast/rel-toast.ts +0 -206
  134. package/dist/components/rel-tooltip/rel-tooltip.ts +0 -193
  135. package/dist/components/rel-topbar/rel-topbar-actions.ts +0 -27
  136. package/dist/components/rel-topbar/rel-topbar-brand.ts +0 -54
  137. package/dist/components/rel-topbar/rel-topbar-dropdown-item.ts +0 -69
  138. package/dist/components/rel-topbar/rel-topbar-dropdown.ts +0 -31
  139. package/dist/components/rel-topbar/rel-topbar-item.ts +0 -324
  140. package/dist/components/rel-topbar/rel-topbar-mobile-panel.ts +0 -27
  141. package/dist/components/rel-topbar/rel-topbar-profile.ts +0 -243
  142. package/dist/components/rel-topbar/rel-topbar-utilities.ts +0 -27
  143. package/dist/components/rel-topbar/rel-topbar.ts +0 -446
  144. package/dist/components/rel-upload/UPLOAD-DESIGN-CHANGES.md +0 -134
  145. package/dist/components/rel-upload/rel-upload-actions.ts +0 -163
  146. package/dist/components/rel-upload/rel-upload.ts +0 -968
@@ -1,163 +1,171 @@
1
- # rel-tab
2
-
3
- ## Overview
4
- A tabbed interface component with automatic underline indicator, keyboard navigation, optional badge counts, and disabled states. Features ARIA-compliant navigation with roving tabindex and arrow key support.
5
-
6
- ## Usage
7
- ```html
8
- <!-- Basic tabs -->
9
- <rel-tab id="basicTabs"></rel-tab>
10
- <script>
11
- const tabs = document.getElementById('basicTabs');
12
- tabs.tabs = [
13
- { label: 'Overview' },
14
- { label: 'Details' },
15
- { label: 'Settings' }
16
- ];
17
- tabs.activeIndex = 0;
18
- </script>
19
-
20
- <!-- With badges (notification counts) -->
21
- <rel-tab id="badgeTabs"></rel-tab>
22
- <script>
23
- const badgeTabs = document.getElementById('badgeTabs');
24
- badgeTabs.tabs = [
25
- { label: 'Inbox', badge: 5 },
26
- { label: 'Drafts', badge: 2 },
27
- { label: 'Sent' }
28
- ];
29
- </script>
30
-
31
- <!-- With disabled tab -->
32
- <rel-tab id="disabledTabs"></rel-tab>
33
- <script>
34
- const disabledTabs = document.getElementById('disabledTabs');
35
- disabledTabs.tabs = [
36
- { label: 'Available' },
37
- { label: 'Coming Soon', disabled: true },
38
- { label: 'Active' }
39
- ];
40
- </script>
41
-
42
- <!-- Listen for tab changes -->
43
- <rel-tab id="tabsWithListener"></rel-tab>
44
- <script>
45
- const listener = document.getElementById('tabsWithListener');
46
- listener.tabs = [
47
- { label: 'Tab 1' },
48
- { label: 'Tab 2' },
49
- { label: 'Tab 3' }
50
- ];
51
- listener.addEventListener('tab-change', (e) => {
52
- console.log('Active tab index:', e.detail);
53
- });
54
- </script>
55
-
56
- <!-- Tab content controlled externally -->
57
- <rel-tab id="contentTabs" activeIndex="0"></rel-tab>
58
- <div id="tabContent">
59
- <div class="panel" data-index="0">Content for Tab 1</div>
60
- <div class="panel" data-index="1" style="display:none;">Content for Tab 2</div>
61
- <div class="panel" data-index="2" style="display:none;">Content for Tab 3</div>
62
- </div>
63
- <script>
64
- const contentTabs = document.getElementById('contentTabs');
65
- contentTabs.tabs = [
66
- { label: 'Tab 1' },
67
- { label: 'Tab 2' },
68
- { label: 'Tab 3' }
69
- ];
70
- contentTabs.addEventListener('tab-change', (e) => {
71
- document.querySelectorAll('#tabContent .panel').forEach((panel, i) => {
72
- panel.style.display = i === e.detail ? 'block' : 'none';
73
- });
74
- });
75
- </script>
76
- ```
77
-
78
- ## API
79
-
80
- ### Attributes/Properties
81
- | Name | Type | Default | Description |
82
- |------|------|---------|-------------|
83
- | `tabs` | `TabItem[]` | `[]` | Array of tab items (see TabItem interface below) |
84
- | `activeIndex` (reflected) | `number` | `0` | Index of the currently active tab |
85
-
86
- ### TabItem Interface
87
- ```typescript
88
- interface TabItem {
89
- label: string; // Display text
90
- badge?: number; // Optional notification count
91
- disabled?: boolean; // Disables interaction
92
- }
93
- ```
94
-
95
- ## Events
96
- | Event | Detail | Description |
97
- |-------|--------|-------------|
98
- | `tab-change` | `number` (the new active index) | Fired when a different tab is selected |
99
-
100
- ## Slots
101
- | Slot | Description |
102
- |------|-------------|
103
- | (default) | Tab panel content (rendered in `.tab-content` wrapper below tabs) |
104
-
105
- ## CSS Parts
106
- None exposed.
107
-
108
- ## Tokens / CSS Variables
109
-
110
- ### Component-Level Custom Properties
111
- The component defines CSS custom properties on `:host`:
112
-
113
- - `--tab-active-color` - Active tab underline color (default: `--rel-bg-brand`)
114
- - `--tab-text-default` - Default tab text color (default: `--rel-text-default`)
115
- - `--tab-text-disabled` - Disabled tab text color (default: `--rel-text-disabled`)
116
- - `--tab-text-hover` - Hover tab text color (default: `--rel-text-label`)
117
- - `--tab-underline-height` - Height of active underline (default: `3px`)
118
- - `--tab-hover-color` - Background color on hover (default: `--rel-bg-neutral-elevated-1`)
119
-
120
- ### Design Token References
121
- - `--rel-fonts-font-family` - Font family
122
- - `--rel-body-md-regular-font-size` - Font size
123
- - `--rel-fonts-weight-body-medium` - Font weight
124
- - `--rel-spacing-sm`, `--rel-spacing-md` - Tab padding
125
- - `--rel-spacing-2xs` - Gap between label and badge
126
- - `--rel-border-accent` - Bottom border color (default: `#c4c4c4`)
127
- - `--rel-border-info` - Focus outline color
128
- - `--rel-border-radius-xs` - Focus outline border radius
129
- - `--rel-bg-danger` - Badge background color
130
- - `--rel-bg-surface` - Badge text color
131
-
132
- ## Accessibility
133
- - Uses `role="tablist"` on container and `role="tab"` on each tab
134
- - Tabs have `aria-selected` and `aria-disabled` attributes
135
- - Implements roving tabindex (only active tab is focusable via Tab key)
136
- - Arrow key navigation between tabs
137
- - Focus visible states with blue outline
138
-
139
- ### Keyboard Interactions
140
- - `Tab` - Focus the active tab (or first non-disabled tab)
141
- - `Arrow Right` - Navigate to next tab (wraps to first, skips disabled)
142
- - `Arrow Left` - Navigate to previous tab (wraps to last, skips disabled)
143
- - `Enter / Space` - Activate focused tab
144
-
145
- ### Focus Behavior
146
- - Focus outline: 2px blue with -2px offset (inside boundary)
147
- - Border radius applied to focus outline
148
- - Focus automatically moves when navigating with arrow keys
149
-
150
- ## Notes / Edge Cases
151
- - The **active tab** has a colored underline (3px high by default) at the bottom
152
- - **Hover effect** (non-active, non-disabled): light gray background
153
- - **Badges** are circular (16px height, min 16px width) with red background and white text
154
- - Clicking a disabled tab does nothing (no event dispatched, no index change)
155
- - Arrow key navigation wraps around (after last tab, goes to first, and vice versa)
156
- - Arrow key navigation skips disabled tabs
157
- - When a tab is activated via arrow keys, focus is programmatically moved to that tab
158
- - The component includes a `.tab-content` wrapper (with 1rem vertical padding) that renders slotted content
159
- - The `.tab-content` is always visible; consumers must manually show/hide panel content based on `activeIndex`
160
- - Tabs have a bottom border (1px solid) via `border-bottom` on `.tabs-wrapper`
161
- - Active tab underline (`position: absolute`, `bottom: 0`) overlays the border
162
- - Transitions: color (0.2s), background-color (0.2s), transform (0.2s) for smooth interactions
163
- - The `activeIndex` property is reflected in HTML as an attribute
1
+ # rel-tab
2
+
3
+ `<rel-tab>` implements the Figma **Tab Item** component (6473:1075) as an underline tab strip with roving-tabindex keyboard navigation, optional count or dot badges and a single shared tabpanel below the strip. Tabs are declared either with slotted `<rel-tab-item>` elements (registered by this folder; they render nothing themselves) or with the `tabs` array property. Use it to switch between peer views of the same content in place; for moving between pages use links or the navbar recipe, and for ordered multi-step flows use `<rel-stepper>`.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <!-- Declarative tabs with badges and a disabled item -->
9
+ <rel-tab id="inbox-tabs" size="medium">
10
+ <rel-tab-item slot="items" label="Inbox" value="inbox" badge="5"></rel-tab-item>
11
+ <rel-tab-item slot="items" label="Drafts" value="drafts" badge-dot></rel-tab-item>
12
+ <rel-tab-item slot="items" label="Archive" value="archive" disabled></rel-tab-item>
13
+ <div id="inbox-panel">Inbox content.</div>
14
+ </rel-tab>
15
+
16
+ <script>
17
+ const tabs = document.getElementById('inbox-tabs');
18
+ tabs.addEventListener('rel-tab-change', (e) => {
19
+ const index = e.detail; // number
20
+ const item = tabs.querySelectorAll('rel-tab-item')[index];
21
+ document.getElementById('inbox-panel').textContent = `${item.value} content.`;
22
+ });
23
+ </script>
24
+
25
+ <!-- Sizes: small (32px), medium (40px), large (48px) -->
26
+ <rel-tab size="small">
27
+ <rel-tab-item slot="items" label="Overview"></rel-tab-item>
28
+ <rel-tab-item slot="items" label="Details"></rel-tab-item>
29
+ </rel-tab>
30
+ <rel-tab size="large" activeindex="1">
31
+ <rel-tab-item slot="items" label="Overview"></rel-tab-item>
32
+ <rel-tab-item slot="items" label="Details"></rel-tab-item>
33
+ </rel-tab>
34
+
35
+ <!-- Tabs from the `tabs` property -->
36
+ <rel-tab id="array-tabs"></rel-tab>
37
+ <script>
38
+ document.getElementById('array-tabs').tabs = [
39
+ { label: 'Overview' },
40
+ { label: 'Alerts', badge: 2 },
41
+ { label: 'Beta', badgeDot: true },
42
+ { label: 'Coming soon', disabled: true },
43
+ ];
44
+ </script>
45
+ ```
46
+
47
+ ### Deprecated aliases
48
+
49
+ ```html
50
+ <!-- size="sm" / "md" / "lg" → size="small" / "medium" / "large" (still accepted; no console notice is logged) -->
51
+ <rel-tab size="sm">
52
+ <rel-tab-item slot="items" label="Overview"></rel-tab-item>
53
+ </rel-tab>
54
+ ```
55
+
56
+ <!-- readme-gen:start -->
57
+
58
+ <!-- Generated from rel-tab.ts — do not edit; run readme-generate.mjs -->
59
+
60
+ ## Elements
61
+
62
+ | Element | Class | Source |
63
+ | --- | --- | --- |
64
+ | `<rel-tab>` | `RelTab` | `rel-tab.ts` |
65
+ | `<rel-tab-item>` | `RelTabItem` | `rel-tab.ts` |
66
+
67
+ ## API
68
+
69
+ ### `<rel-tab>`
70
+
71
+ #### Attributes / Properties
72
+
73
+ | Property | Attribute | Type | Default | Description |
74
+ | --- | --- | --- | --- | --- |
75
+ | `tabs` | `tabs` | `TabItem[]` | `[]` | Tab definitions as `{ label, badge?, badgeDot?, disabled? }` objects — normally set as a property (as an attribute it must be a JSON string). Assign a new array to update; mutating in place does not re-render. Ignored when `<rel-tab-item>` children are slotted into `items`. |
76
+ | `activeIndex` | `activeindex` | `number` | `0` | Zero-based index of the selected tab. Set it to switch tabs programmatically (no event is fired for programmatic changes). Reflected. |
77
+ | `size` | `size` | `"sm" \| "md" \| "lg" \| "small" \| "medium" \| "large"` | `"md"` | Tab size — styled via :host([size]) rules. Explicit item heights 32 / 40 / 48px (audit 34); `small\|medium\|large` alias `sm\|md\|lg`. Reflected. |
78
+
79
+ ### Events
80
+
81
+ | Event | Detail | Bubbles / composed | Description |
82
+ | --- | --- | --- | --- |
83
+ | `rel-tab-change` | `index` | bubbles / composed | Fired when the user selects a tab by click or keyboard (not on programmatic `activeIndex` changes). Detail: the new active index (number). |
84
+
85
+ ### Slots
86
+
87
+ | Slot | Description |
88
+ | --- | --- |
89
+ | (default) | Content of the single tabpanel rendered under the strip (always visible — swap it yourself on `rel-tab-change`) |
90
+ | `items` | `<rel-tab-item>` definitions; when present they take precedence over the `tabs` array |
91
+
92
+ ### CSS Parts
93
+
94
+ | Part | Description |
95
+ | --- | --- |
96
+ | `list` | The `role="tablist"` row |
97
+ | `item` | Each `role="tab"` element |
98
+ | `label` | The text span inside each tab |
99
+
100
+ ### Tokens / CSS Variables
101
+
102
+ #### Component hooks
103
+
104
+ Set these on the host (or an ancestor) to customise the element without touching design tokens.
105
+
106
+ | Custom property | Default | Description |
107
+ | --- | --- | --- |
108
+ | `--rel-tab-active-color` | `var(--tab-active-color)` | Underline colour of the active tab; default `var(--rel-bg-brand)` |
109
+ | `--rel-tab-hover-color` | `var(--tab-hover-color)` | Background of an inactive tab on hover; default `var(--rel-bg-neutral-elevated-1)` |
110
+ | `--rel-tab-text-default` | `var(--tab-text-default)` | Label colour of the active tab; default `var(--rel-text-default)` |
111
+ | `--rel-tab-text-disabled` | `var(--tab-text-disabled)` | Label colour of a disabled tab; default `var(--rel-text-disabled)` |
112
+ | `--rel-tab-text-hover` | `var(--tab-text-hover)` | Label colour while hovering an enabled tab; default `var(--rel-text-label)` |
113
+ | `--rel-tab-underline-height` | `var(--tab-underline-height)` | Thickness of the active underline; default 3px |
114
+
115
+ ### `<rel-tab-item>`
116
+
117
+ #### Attributes / Properties
118
+
119
+ | Property | Attribute | Type | Default | Description |
120
+ | --- | --- | --- | --- | --- |
121
+ | `label` | `label` | `string` | `""` | Text shown on the tab. |
122
+ | `value` | `value` | `string` | `""` | Optional identifier for the tab. `<rel-tab>` does not read it; look it up from the item at `event.detail` when handling `rel-tab-change`. |
123
+ | `badge` | `badge` | `number` | `0` | Count shown in a small badge after the label; `0` hides the badge. |
124
+ | `badgeDot` | `badge-dot` | `boolean` | `false` | Shows a small dot instead of a numbered badge — takes precedence over `badge`. |
125
+ | `disabled` | `disabled` | `boolean` | `false` | Greys the tab out and skips it in click, arrow-key and Home/End navigation. |
126
+
127
+ ### Events
128
+
129
+ | Event | Detail | Bubbles / composed | Description |
130
+ | --- | --- | --- | --- |
131
+ | — | — | — | This element emits no custom events. |
132
+
133
+ ### Slots
134
+
135
+ | Slot | Description |
136
+ | --- | --- |
137
+ | — | This element has no slots. |
138
+
139
+ ### CSS Parts
140
+
141
+ | Part | Description |
142
+ | --- | --- |
143
+ | — | None exposed. |
144
+
145
+ <!-- readme-gen:end -->
146
+
147
+ ## Accessibility
148
+
149
+ - The strip is `role="tablist"`; every tab is `role="tab"` with `aria-selected`, `aria-disabled` and `aria-controls` pointing at the shared `role="tabpanel"`, which in turn is `aria-labelledby` the active tab and is focusable (`tabindex="0"`).
150
+ - Roving tabindex: only the active tab is in the Tab order (`tabindex="0"`); other and disabled tabs are `tabindex="-1"`.
151
+ - Arrow keys use automatic activation — moving focus also selects the tab and fires `rel-tab-change`.
152
+ - Focus is shown as a 2px outline inset inside the tab.
153
+ - Disabled tabs ignore clicks and keys and are skipped by arrow, Home and End navigation.
154
+
155
+ | Key | Action |
156
+ | --- | --- |
157
+ | `ArrowRight` | Selects and focuses the next enabled tab (wraps to the first). |
158
+ | `ArrowLeft` | Selects and focuses the previous enabled tab (wraps to the last). |
159
+ | `Home` | Selects and focuses the first enabled tab. |
160
+ | `End` | Selects and focuses the last enabled tab. |
161
+ | `Enter` / `Space` | Selects the focused tab (no-op when disabled). |
162
+ | `Tab` | Leaves the strip (moves to the tabpanel). |
163
+
164
+ ## Notes / Edge Cases
165
+
166
+ - There is one always-visible tabpanel (the default slot). The component does not show/hide content per tab — swap or filter the panel content yourself on `rel-tab-change` or by watching `activeIndex`.
167
+ - `rel-tab-change` fires for user selection only; setting `activeIndex` programmatically updates the strip silently.
168
+ - Slotted `<rel-tab-item>` elements take precedence over the `tabs` array. Their `value` is not read by `<rel-tab>` — look it up from the item at `event.detail` when you need an identifier. The `items` slot itself is hidden.
169
+ - `badge-dot` wins over `badge`; a `badge` of `0` renders no badge. Badges use the danger tone on enabled tabs and a neutral inverse tone on disabled tabs.
170
+ - `size` accepts `small` / `medium` / `large` (item heights 32 / 40 / 48px with body-sm / md / lg type); the short forms `sm` / `md` / `lg` are aliases (see Deprecated aliases).
171
+ - Legacy hook aliases still honoured: `--tab-active-color`, `--tab-underline-height`, `--tab-text-default`, `--tab-text-hover`, `--tab-text-disabled` and `--tab-hover-color` are read as fallbacks of the `--rel-tab-*` hooks.