@reliability-design/web 1.4.6 → 1.4.8

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 (148) hide show
  1. package/CHANGELOG.md +246 -49
  2. package/dist/components/rel-accordion/README.md +133 -132
  3. package/dist/components/rel-alert/README.md +145 -141
  4. package/dist/components/rel-autocomplete/README.md +172 -61
  5. package/dist/components/rel-avatar/README.md +118 -130
  6. package/dist/components/rel-badge/README.md +97 -93
  7. package/dist/components/rel-breadcrumb/README.md +96 -102
  8. package/dist/components/rel-button/README.md +190 -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 +186 -166
  13. package/dist/components/rel-checkbox/README.md +96 -75
  14. package/dist/components/rel-chip/README.md +138 -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 +88 -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-layout/README.md +34 -0
  21. package/dist/components/rel-menu/README.md +180 -151
  22. package/dist/components/rel-menubar/README.md +218 -329
  23. package/dist/components/rel-otp/README.md +171 -440
  24. package/dist/components/rel-pagination/README.md +100 -424
  25. package/dist/components/rel-popover/README.md +203 -568
  26. package/dist/components/rel-progress/README.md +88 -110
  27. package/dist/components/rel-radio/README.md +131 -138
  28. package/dist/components/rel-range-picker/README.md +165 -0
  29. package/dist/components/rel-resizable/README.md +199 -140
  30. package/dist/components/rel-segmented-button/README.md +156 -141
  31. package/dist/components/rel-select/README.md +156 -93
  32. package/dist/components/rel-sheet/README.md +168 -224
  33. package/dist/components/rel-skeleton/README.md +104 -0
  34. package/dist/components/rel-slider/README.md +131 -135
  35. package/dist/components/rel-snackbar/README.md +168 -134
  36. package/dist/components/rel-stepper/README.md +162 -160
  37. package/dist/components/rel-switch/README.md +117 -102
  38. package/dist/components/rel-tab/README.md +173 -163
  39. package/dist/components/rel-textfield/README.md +176 -69
  40. package/dist/components/rel-time-picker/README.md +122 -157
  41. package/dist/components/rel-toast/README.md +165 -148
  42. package/dist/components/rel-tooltip/README.md +119 -111
  43. package/dist/components/rel-upload/README.md +220 -0
  44. package/dist/index.d.mts +1726 -447
  45. package/dist/index.d.ts +1726 -447
  46. package/dist/index.js +13715 -10870
  47. package/dist/index.js.map +1 -1
  48. package/dist/index.mjs +14018 -11163
  49. package/dist/index.mjs.map +1 -1
  50. package/dist/styles/focus-ring.ts +84 -0
  51. package/dist/styles/vars.css +892 -866
  52. package/dist/{vars-XNMTSRVN.css → vars-DXX6QOAG.css} +892 -866
  53. package/package.json +3 -2
  54. package/dist/components/rel-accordion/rel-accordion.ts +0 -336
  55. package/dist/components/rel-alert/rel-alert.ts +0 -305
  56. package/dist/components/rel-autocomplete/rel-autocomplete.ts +0 -720
  57. package/dist/components/rel-avatar/rel-avatar.ts +0 -142
  58. package/dist/components/rel-badge/rel-badge.ts +0 -175
  59. package/dist/components/rel-breadcrumb/rel-breadcrumb.ts +0 -106
  60. package/dist/components/rel-button/rel-button.ts +0 -560
  61. package/dist/components/rel-calendar/index.ts +0 -1
  62. package/dist/components/rel-calendar/rel-calendar.ts +0 -565
  63. package/dist/components/rel-card/rel-card.ts +0 -88
  64. package/dist/components/rel-cardmedia/rel-cardmedia.ts +0 -88
  65. package/dist/components/rel-carousel/index.ts +0 -1
  66. package/dist/components/rel-carousel/rel-carousel.ts +0 -723
  67. package/dist/components/rel-chart/README.md +0 -286
  68. package/dist/components/rel-chart/index.ts +0 -1
  69. package/dist/components/rel-chart/rel-chart.ts +0 -754
  70. package/dist/components/rel-checkbox/rel-checkbox.ts +0 -382
  71. package/dist/components/rel-chip/rel-chip.ts +0 -483
  72. package/dist/components/rel-container/rel-container.ts +0 -95
  73. package/dist/components/rel-date-picker/date-format.test.ts +0 -43
  74. package/dist/components/rel-date-picker/date-format.ts +0 -47
  75. package/dist/components/rel-date-picker/date-parse.test.ts +0 -116
  76. package/dist/components/rel-date-picker/date-parse.ts +0 -178
  77. package/dist/components/rel-date-picker/index.ts +0 -1
  78. package/dist/components/rel-date-picker/rel-date-picker.ts +0 -1676
  79. package/dist/components/rel-divider/rel-divider.ts +0 -54
  80. package/dist/components/rel-drawer/index.ts +0 -1
  81. package/dist/components/rel-drawer/rel-drawer-footer.ts +0 -27
  82. package/dist/components/rel-drawer/rel-drawer.ts +0 -607
  83. package/dist/components/rel-kbd/rel-kbd.ts +0 -188
  84. package/dist/components/rel-layout/rel-layout.ts +0 -49
  85. package/dist/components/rel-menu/rel-menu.ts +0 -541
  86. package/dist/components/rel-menubar/index.ts +0 -2
  87. package/dist/components/rel-menubar/rel-menubar-menu.css +0 -3
  88. package/dist/components/rel-menubar/rel-menubar-menu.ts +0 -17
  89. package/dist/components/rel-menubar/rel-menubar.ts +0 -777
  90. package/dist/components/rel-nav-menu/README.md +0 -289
  91. package/dist/components/rel-nav-menu/index.ts +0 -3
  92. package/dist/components/rel-nav-menu/rel-nav-menu-item.ts +0 -243
  93. package/dist/components/rel-nav-menu/rel-nav-menu-panel.ts +0 -72
  94. package/dist/components/rel-nav-menu/rel-nav-menu.ts +0 -270
  95. package/dist/components/rel-navbar/README.md +0 -126
  96. package/dist/components/rel-navbar/rel-navbar.ts +0 -105
  97. package/dist/components/rel-otp/index.ts +0 -1
  98. package/dist/components/rel-otp/rel-otp.ts +0 -527
  99. package/dist/components/rel-pagination/index.ts +0 -1
  100. package/dist/components/rel-pagination/rel-pagination.ts +0 -522
  101. package/dist/components/rel-popover/index.ts +0 -2
  102. package/dist/components/rel-popover/rel-popover-content.ts +0 -81
  103. package/dist/components/rel-popover/rel-popover.ts +0 -475
  104. package/dist/components/rel-progress/rel-progress.ts +0 -234
  105. package/dist/components/rel-radio/rel-radio.ts +0 -481
  106. package/dist/components/rel-range-picker/rel-range-picker.ts +0 -1688
  107. package/dist/components/rel-resizable/index.ts +0 -3
  108. package/dist/components/rel-resizable/rel-resizable-group.ts +0 -405
  109. package/dist/components/rel-resizable/rel-resizable-handle.ts +0 -150
  110. package/dist/components/rel-resizable/rel-resizable-panel.ts +0 -58
  111. package/dist/components/rel-segmented-button/rel-segmented-button.ts +0 -217
  112. package/dist/components/rel-select/rel-select.ts +0 -1416
  113. package/dist/components/rel-sheet/rel-sheet.ts +0 -610
  114. package/dist/components/rel-sidebar/README.md +0 -209
  115. package/dist/components/rel-sidebar/rel-sidebar.ts +0 -1191
  116. package/dist/components/rel-skeleton/rel-skeleton.ts +0 -143
  117. package/dist/components/rel-slider/rel-slider.ts +0 -673
  118. package/dist/components/rel-snackbar/rel-snackbar.ts +0 -329
  119. package/dist/components/rel-stepper/rel-stepper.ts +0 -567
  120. package/dist/components/rel-switch/rel-switch.ts +0 -199
  121. package/dist/components/rel-tab/rel-tab.ts +0 -264
  122. package/dist/components/rel-table/README.md +0 -178
  123. package/dist/components/rel-table/rel-table-body.ts +0 -22
  124. package/dist/components/rel-table/rel-table-caption.ts +0 -30
  125. package/dist/components/rel-table/rel-table-cell.ts +0 -43
  126. package/dist/components/rel-table/rel-table-footer.ts +0 -24
  127. package/dist/components/rel-table/rel-table-head.ts +0 -47
  128. package/dist/components/rel-table/rel-table-header.ts +0 -22
  129. package/dist/components/rel-table/rel-table-row.ts +0 -37
  130. package/dist/components/rel-table/rel-table.ts +0 -62
  131. package/dist/components/rel-textfield/rel-textfield.ts +0 -1054
  132. package/dist/components/rel-time-picker/rel-time-picker.ts +0 -1482
  133. package/dist/components/rel-time-picker/time-parse.test.ts +0 -67
  134. package/dist/components/rel-time-picker/time-parse.ts +0 -85
  135. package/dist/components/rel-toast/rel-toast.ts +0 -206
  136. package/dist/components/rel-tooltip/rel-tooltip.ts +0 -193
  137. package/dist/components/rel-topbar/rel-topbar-actions.ts +0 -27
  138. package/dist/components/rel-topbar/rel-topbar-brand.ts +0 -54
  139. package/dist/components/rel-topbar/rel-topbar-dropdown-item.ts +0 -69
  140. package/dist/components/rel-topbar/rel-topbar-dropdown.ts +0 -31
  141. package/dist/components/rel-topbar/rel-topbar-item.ts +0 -324
  142. package/dist/components/rel-topbar/rel-topbar-mobile-panel.ts +0 -27
  143. package/dist/components/rel-topbar/rel-topbar-profile.ts +0 -243
  144. package/dist/components/rel-topbar/rel-topbar-utilities.ts +0 -27
  145. package/dist/components/rel-topbar/rel-topbar.ts +0 -446
  146. package/dist/components/rel-upload/UPLOAD-DESIGN-CHANGES.md +0 -134
  147. package/dist/components/rel-upload/rel-upload-actions.ts +0 -163
  148. package/dist/components/rel-upload/rel-upload.ts +0 -968
@@ -1,163 +1,173 @@
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
+ | `icon` | — |
99
+ | `label` | The text span inside each tab |
100
+
101
+ ### Tokens / CSS Variables
102
+
103
+ #### Component hooks
104
+
105
+ Set these on the host (or an ancestor) to customise the element without touching design tokens.
106
+
107
+ | Custom property | Default | Description |
108
+ | --- | --- | --- |
109
+ | `--rel-tab-active-color` | `var(--tab-active-color)` | Underline colour of the active tab; default `var(--rel-bg-brand)` |
110
+ | `--rel-tab-hover-color` | `var(--tab-hover-color)` | Background of an inactive tab on hover; default `var(--rel-bg-neutral-elevated-1)` |
111
+ | `--rel-tab-text-default` | `var(--tab-text-default)` | Label colour of the active tab; default `var(--rel-text-default)` |
112
+ | `--rel-tab-text-disabled` | `inherit` | Label colour of a disabled tab; default `var(--rel-text-disabled)` |
113
+ | `--rel-tab-text-hover` | `var(--tab-text-hover)` | Label colour while hovering an enabled tab; default `var(--rel-text-label)` |
114
+ | `--rel-tab-underline-height` | `var(--tab-underline-height)` | Thickness of the active underline; default 1px (`--rel-stroke-sm`, the weight Figma draws). Set it to restore the heavier 3px bar shipped previously. |
115
+
116
+ ### `<rel-tab-item>`
117
+
118
+ #### Attributes / Properties
119
+
120
+ | Property | Attribute | Type | Default | Description |
121
+ | --- | --- | --- | --- | --- |
122
+ | `label` | `label` | `string` | `""` | Text shown on the tab. |
123
+ | `icon` | `icon` | `string` | `""` | Icon name from the generated icon dictionary, rendered before the label (Figma "Show Icon" / "Icon"). Sized 20 / 18 / 16px with the tab's own size step. |
124
+ | `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`. |
125
+ | `badge` | `badge` | `number` | `0` | Count shown in a small badge after the label; `0` hides the badge. |
126
+ | `badgeDot` | `badge-dot` | `boolean` | `false` | Shows a small dot instead of a numbered badge — takes precedence over `badge`. |
127
+ | `disabled` | `disabled` | `boolean` | `false` | Greys the tab out and skips it in click, arrow-key and Home/End navigation. |
128
+
129
+ ### Events
130
+
131
+ | Event | Detail | Bubbles / composed | Description |
132
+ | --- | --- | --- | --- |
133
+ | — | — | — | This element emits no custom events. |
134
+
135
+ ### Slots
136
+
137
+ | Slot | Description |
138
+ | --- | --- |
139
+ | — | This element has no slots. |
140
+
141
+ ### CSS Parts
142
+
143
+ | Part | Description |
144
+ | --- | --- |
145
+ | — | None exposed. |
146
+
147
+ <!-- readme-gen:end -->
148
+
149
+ ## Accessibility
150
+
151
+ - 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"`).
152
+ - Roving tabindex: only the active tab is in the Tab order (`tabindex="0"`); other and disabled tabs are `tabindex="-1"`.
153
+ - Arrow keys use automatic activation — moving focus also selects the tab and fires `rel-tab-change`.
154
+ - Focus is shown as a 2px outline inset inside the tab.
155
+ - Disabled tabs ignore clicks and keys and are skipped by arrow, Home and End navigation.
156
+
157
+ | Key | Action |
158
+ | --- | --- |
159
+ | `ArrowRight` | Selects and focuses the next enabled tab (wraps to the first). |
160
+ | `ArrowLeft` | Selects and focuses the previous enabled tab (wraps to the last). |
161
+ | `Home` | Selects and focuses the first enabled tab. |
162
+ | `End` | Selects and focuses the last enabled tab. |
163
+ | `Enter` / `Space` | Selects the focused tab (no-op when disabled). |
164
+ | `Tab` | Leaves the strip (moves to the tabpanel). |
165
+
166
+ ## Notes / Edge Cases
167
+
168
+ - 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`.
169
+ - `rel-tab-change` fires for user selection only; setting `activeIndex` programmatically updates the strip silently.
170
+ - 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.
171
+ - `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.
172
+ - `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).
173
+ - 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.