@reliability-design/web 1.4.9 → 1.4.11

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 (55) hide show
  1. package/CHANGELOG.md +161 -2
  2. package/custom-elements.json +18604 -0
  3. package/dist/components/rel-accordion/README.md +9 -2
  4. package/dist/components/rel-alert/README.md +4 -7
  5. package/dist/components/rel-autocomplete/README.md +209 -209
  6. package/dist/components/rel-avatar/README.md +228 -118
  7. package/dist/components/rel-breadcrumb/README.md +1 -0
  8. package/dist/components/rel-button/README.md +9 -9
  9. package/dist/components/rel-calendar/README.md +111 -109
  10. package/dist/components/rel-cardmedia/README.md +1 -1
  11. package/dist/components/rel-carousel/README.md +187 -187
  12. package/dist/components/rel-checkbox/README.md +159 -147
  13. package/dist/components/rel-chip/README.md +141 -138
  14. package/dist/components/rel-container/README.md +1 -1
  15. package/dist/components/rel-date-picker/README.md +221 -206
  16. package/dist/components/rel-drawer/README.md +4 -4
  17. package/dist/components/rel-kbd/README.md +188 -141
  18. package/dist/components/rel-layout/README.md +34 -34
  19. package/dist/components/rel-menu/README.md +17 -10
  20. package/dist/components/rel-menubar/README.md +218 -218
  21. package/dist/components/rel-otp/README.md +4 -8
  22. package/dist/components/rel-pagination/README.md +141 -100
  23. package/dist/components/rel-popover/README.md +220 -203
  24. package/dist/components/rel-radio/README.md +142 -131
  25. package/dist/components/rel-range-picker/README.md +194 -171
  26. package/dist/components/rel-resizable/README.md +220 -199
  27. package/dist/components/rel-segmented-button/README.md +158 -157
  28. package/dist/components/rel-select/README.md +21 -17
  29. package/dist/components/rel-sheet/README.md +3 -2
  30. package/dist/components/rel-signature-pad/README.md +161 -0
  31. package/dist/components/rel-slider/README.md +140 -131
  32. package/dist/components/rel-snackbar/README.md +170 -168
  33. package/dist/components/rel-split-button/README.md +129 -0
  34. package/dist/components/rel-stepper/README.md +171 -171
  35. package/dist/components/rel-switch/README.md +122 -117
  36. package/dist/components/rel-tab/README.md +184 -174
  37. package/dist/components/rel-textfield/README.md +21 -28
  38. package/dist/components/rel-time-picker/README.md +188 -170
  39. package/dist/components/rel-toast/README.md +20 -11
  40. package/dist/components/rel-tooltip/README.md +5 -4
  41. package/dist/components/rel-tree/README.md +157 -0
  42. package/dist/components/rel-upload/README.md +8 -5
  43. package/dist/index.d.mts +1608 -624
  44. package/dist/index.d.ts +1608 -624
  45. package/dist/index.js +11933 -6802
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +11009 -5885
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/styles/ag-grid.css +274 -0
  50. package/dist/styles/motion.css +31 -0
  51. package/dist/styles/motion.tokens.json +38 -0
  52. package/dist/styles/vars.css +88 -64
  53. package/dist/{vars-DXX6QOAG.css → vars-E22LYFMV.css} +88 -64
  54. package/package.json +61 -37
  55. package/dist/styles/focus-ring.ts +0 -84
@@ -1,171 +1,171 @@
1
- # rel-stepper
2
-
3
- A multi-step progress indicator implementing the Figma "Stepper" component: its `Type` axis (default, dot, number, icon indicators), its `Typel` label-placement axis (top, centered, inverted), two sizes and both orientations. Each entry in `steps` renders as a focusable step with a circular indicator, a label and a connector to the next step, styled by its status (`done`, `progress`, `disabled`). Use it to show where the user is in a linear flow (checkout, onboarding, a wizard) and to let them jump back to completed steps; the component is presentation only — it never changes a step's status itself, so drive `steps` from your own state.
4
-
5
- ## Usage
6
-
7
- ```html
8
- <!-- Horizontal (default), labels under the indicators -->
9
- <rel-stepper id="checkout"></rel-stepper>
10
- <script>
11
- document.getElementById('checkout').steps = [
12
- { title: 'Cart', status: 'done' },
13
- { title: 'Shipping', status: 'progress' },
14
- { title: 'Payment', status: 'disabled' },
15
- { title: 'Confirmation', status: 'disabled' }
16
- ];
17
- </script>
18
-
19
- <!-- Vertical, label beside the indicator (Figma Type = Centered).
20
- `size` is DEPRECATED and deliberately omitted: Figma has no Size axis on the
21
- Stepper — the connector geometry is fixed — so it was a code-only scale. It is
22
- still accepted so existing markup keeps working, but it now resolves to the one
23
- Figma geometry and logs a one-time notice. Retune with
24
- `--rel-stepper-connector-length` instead. -->
25
- <rel-stepper id="onboarding" orientation="vertical" label-placement="centered"></rel-stepper>
26
- <script>
27
- document.getElementById('onboarding').steps = [
28
- { title: 'Create account', status: 'done' },
29
- { title: 'Verify email', status: 'done' },
30
- { title: 'Set up profile', status: 'progress' },
31
- { title: 'Done', status: 'disabled' }
32
- ];
33
- </script>
34
-
35
- <!-- Figma Type axis: dot / number / icon indicators -->
36
- <rel-stepper type="dot" steps='[{"title":"Plan","status":"done"},{"title":"Build","status":"progress"},{"title":"Ship","status":"disabled"}]'></rel-stepper>
37
- <rel-stepper type="number" steps='[{"title":"Plan","status":"done"},{"title":"Build","status":"progress"},{"title":"Ship","status":"disabled"}]'></rel-stepper>
38
- <rel-stepper type="icon" steps='[{"title":"Plan","status":"done"},{"title":"Build","status":"progress"},{"title":"Ship","status":"disabled"}]'></rel-stepper>
39
-
40
- <!-- Figma .Line Types axis: the CONNECTOR between steps, dashed 2px on / 2px off.
41
- Distinct from type="dot" above, which is the indicator disc — combine freely. -->
42
- <rel-stepper connector="dot" steps='[{"title":"Plan","status":"done"},{"title":"Build","status":"progress"},{"title":"Ship","status":"disabled"}]'></rel-stepper>
43
- <rel-stepper connector="dot" type="dot" steps='[{"title":"Plan","status":"done"},{"title":"Build","status":"progress"},{"title":"Ship","status":"disabled"}]'></rel-stepper>
44
-
45
- <!-- Label placement (Figma Typel): top-aligned beside the indicator, or indicator above the label -->
46
- <rel-stepper orientation="vertical" label-placement="top" steps='[{"title":"Review","status":"done"},{"title":"Approve","status":"progress"}]'></rel-stepper>
47
- <rel-stepper label-placement="inverted" steps='[{"title":"Review","status":"done"},{"title":"Approve","status":"progress"}]'></rel-stepper>
48
-
49
- <!-- Let users jump back to a completed step -->
50
- <rel-stepper id="wizard"></rel-stepper>
51
- <script>
52
- const wizard = document.getElementById('wizard');
53
- wizard.steps = [
54
- { title: 'Select', status: 'done' },
55
- { title: 'Configure', status: 'progress' },
56
- { title: 'Review', status: 'disabled' }
57
- ];
58
- wizard.addEventListener('rel-step-change', (e) => {
59
- console.log('Activated step', e.detail.index, e.detail.step.title);
60
- // Recompute statuses and assign a new array so the stepper re-renders
61
- wizard.steps = wizard.steps.map((s, i) => ({
62
- ...s,
63
- status: i < e.detail.index ? 'done' : i === e.detail.index ? 'progress' : 'disabled'
64
- }));
65
- });
66
- </script>
67
- ```
68
-
69
- ### Deprecated aliases
70
-
71
- ```html
72
- <!-- textalign="right" → label-placement="centered"; textalign="below" → label-placement="inverted".
73
- Still supported and still the fallback when label-placement is unset. Since 1.4.9 a
74
- non-default value logs a one-time console notice; it had been marked deprecated since the
75
- rename but never said so at runtime. Setting label-placement supersedes it and stays silent. -->
76
- <rel-stepper textalign="right" steps='[{"title":"Review","status":"done"},{"title":"Approve","status":"progress"}]'></rel-stepper>
77
- ```
78
-
79
- The `Step` type and the `StepStatus`, `StepperType`, `StepperConnector` and `LabelPlacement` unions are exported from the package:
80
-
81
- ```typescript
82
- import type { Step } from '@reliability-design/web';
83
-
84
- const steps: Step[] = [
85
- { title: 'Cart', status: 'done' }, // filled indicator with a check mark
86
- { title: 'Shipping', status: 'progress' }, // current step (aria-current="step")
87
- { title: 'Payment', status: 'disabled' } // not yet reachable; rendered at 40% opacity, not focusable
88
- ];
89
- ```
90
-
91
- <!-- readme-gen:start -->
92
-
93
- <!-- Generated from rel-stepper.ts — do not edit; run readme-generate.mjs -->
94
-
95
- ## API
96
-
97
- ### Attributes / Properties
98
-
99
- | Property | Attribute | Type | Default | Description |
100
- | --- | --- | --- | --- | --- |
101
- | `steps` | `steps` | `Step[]` | `[]` | The steps in order, each `{ title: string; subtitle?: string; status: "done" \| "progress" \| "disabled" }`. Set as a property (or a JSON array attribute); the component never mutates it — update it from the `rel-step-change` handler. |
102
- | `orientation` | `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Layout axis: `horizontal` (default) lays the steps out in a centred row; `vertical` stacks them. |
103
- | `type` | `type` | `"default" \| "dot" \| "number" \| "icon"` | `"default"` | Figma "Type" axis — what the INDICATOR shows: `default` (step number, check mark once done), `dot` (8px dot, no glyph), `number` (always the number) or `icon` (always the check mark). Not the same axis as `connector="dot"`, which dashes the line between steps. Reflected. |
104
- | `connector` | `connector` | `"solid" \| "dot"` | `"solid"` | Figma ".Line Types" axis — how the line BETWEEN steps is drawn: `solid` (an unbroken 1px rule) or `dot` (a 1px rule dashed 2px on, 2px off). Applies to both orientations. Not the same axis as `type="dot"`, which is the indicator disc; the two are independent and can be combined. Reflected. |
105
- | `labelPlacement` | `label-placement` | `"top" \| "centered" \| "inverted"` | `undefined` | Figma "Typel" axis — where the label sits: `top` (top-aligned beside the indicator), `centered` (vertically centred beside it) or `inverted` (indicator above the label). When unset, the deprecated `textAlign` prop drives the layout (`below` ≈ `inverted`, `right` ≈ `centered`). Figma marks Top + Horizontal as an unsupported combination. Reflected. |
106
-
107
- #### Deprecated (still supported — removal targeted for 3.0)
108
-
109
- | Property | Attribute | Type | Use instead |
110
- | --- | --- | --- | --- |
111
- | `textAlign` | `textalign` | `"right" \| "below"` | Deprecated alias of `label-placement`; use `label-placement="inverted"` instead of `textalign="below"` and `label-placement="centered"` instead of `textalign="right"`. |
112
- | `size` | `size` | `"small" \| "large"` | Figma has no Size axis on the Stepper — the connector geometry is fixed — so this was a code-only scale. It stays accepted so existing markup keeps working, and now resolves to the one Figma geometry. Retune it with `--rel-stepper-connector-length` instead. Logs a one-time notice. |
113
-
114
- ## Events
115
-
116
- | Event | Detail | Bubbles / composed | Description |
117
- | --- | --- | --- | --- |
118
- | `rel-step-change` | `{ index, step, }` | bubbles / composed | Fired when a step whose status is not `disabled` is clicked or activated with Enter / Space. Detail: `{ index: number, step: Step }`. Statuses are not changed by the component — update `steps` in the handler. |
119
-
120
- ## Slots
121
-
122
- | Slot | Description |
123
- | --- | --- |
124
- | — | This element has no slots. |
125
-
126
- ## CSS Parts
127
-
128
- | Part | Description |
129
- | --- | --- |
130
- | `indicator` | The 24px circle (8px for `type="dot"`) that holds the step number, check mark or icon. |
131
- | `track` | The 1px connector line from a step to the next one (not rendered on the last step). |
132
- | `label` | The step title text. |
133
- | `subtitle` | The optional second line under the title; rendered only when a step sets `subtitle`. |
134
-
135
- ## Tokens / CSS Variables
136
-
137
- ### Component hooks
138
-
139
- Set these on the host (or an ancestor) to customise the element without touching design tokens.
140
-
141
- | Custom property | Default | Description |
142
- | --- | --- | --- |
143
- | `--rel-stepper-connector-length` | `var(--rel-stepper-connector-length-lg, 96px)` | Length of the connector line; the step gap is derived from it by adding Figma's clear space at both ends. Defaults to Figma's fixed geometry: 96px horizontally, 34px vertically with `label-placement="centered"`, 51px with `inverted`. |
144
- | `--rel-stepper-indicator-size` | `24px` | Indicator diameter (default 24px; `type="dot"` is fixed at 8px). |
145
-
146
- <!-- readme-gen:end -->
147
-
148
- ## Accessibility
149
-
150
- - The list renders as a `role="group"` with the fixed name "Progress steps" (not configurable).
151
- - Every step is a `role="button"` element with `aria-label="<title>, step n of N"`, plus ", completed" for `done` steps. The `progress` step carries `aria-current="step"`; `disabled` steps carry `aria-disabled="true"` and `tabindex="-1"` so they are skipped in the Tab order and by the arrow keys.
152
- - Enabled steps are individual Tab stops (`tabindex="0"`) with a 2px focus ring; the indicators and connectors are purely visual (the check mark SVG is `aria-hidden`).
153
- - Activating a step only emits `rel-step-change`; nothing is announced and no status changes until you update `steps`.
154
-
155
- | Key | Action |
156
- | --- | --- |
157
- | `Enter` / `Space` | Activate the focused step (emits `rel-step-change`; ignored on `disabled` steps) |
158
- | `ArrowRight` / `ArrowDown` | Move focus to the next enabled step (wraps to the first) |
159
- | `ArrowLeft` / `ArrowUp` | Move focus to the previous enabled step (wraps to the last) |
160
- | `Home` / `End` | Move focus to the first / last enabled step |
161
-
162
- ## Notes / Edge Cases
163
-
164
- - `label-placement` is the canonical layout switch (Figma `Typel`). When it is unset the deprecated `textalign` prop decides: `below` renders like `inverted` (indicator above the label), `right` renders like `centered` (label beside the indicator). `top` differs from `centered` only in aligning the label to the top of the indicator. Figma marks Top + Horizontal as an unsupported combination.
165
- - Statuses map to the Figma `.Artwork` states: `done` = inverse fill with a check mark (or the number when `type="number"`, nothing when `type="dot"`), `progress` = neutral fill with a strong 1px border, `disabled` = the same drawn at 40% opacity. Connectors are `border-strong` after a `done` / `progress` step and `border-default` otherwise.
166
- - `type="icon"` shows the check mark on every step regardless of status; `type="dot"` shrinks the indicator to 8px and fills it for `done` and `progress`.
167
- - Two axes spell one value "dot" and they are independent: `type="dot"` is the INDICATOR (an 8px disc replacing the number), `connector="dot"` is the LINE between steps. `connector="dot"` draws a 1px rule dashed 2px on / 2px off, matching Figma `.Line Types` `Type=Dot` (`strokeWeight=1`, `strokeDashes=[2,2]`). It is a repeating gradient rather than a dashed border because no engine lets you state a 2/2 dash period. The dash takes the connector's own state colour, so it goes `border-strong` after a `done` / `progress` step like the solid line does.
168
- - Connector length doubles as the gap between steps and depends on `size` and `orientation`: large = `--rel-stepper-connector-length-lg` (86px) in both orientations; small horizontal = `--rel-stepper-connector-length-md` (60px); small vertical = `--rel-stepper-connector-length-sm` (42px). Note the `md` / `sm` suffixes refer to those defaults, not to a size value.
169
- - Labels never wrap (`white-space: nowrap`); keep titles short or widen the connector hooks.
170
- - `steps` is compared by reference: mutate-in-place changes are not picked up — assign a new array.
171
- - Steps are `<div role="button">` elements, not native buttons, so they do not submit forms and do not get native disabled styling.
1
+ # rel-stepper
2
+
3
+ A multi-step progress indicator implementing the Figma "Stepper" component: its `Type` axis (default, dot, number, icon indicators), its `Typel` label-placement axis (top, centered, inverted), two sizes and both orientations. Each entry in `steps` renders as a focusable step with a circular indicator, a label and a connector to the next step, styled by its status (`done`, `progress`, `disabled`). Use it to show where the user is in a linear flow (checkout, onboarding, a wizard) and to let them jump back to completed steps; the component is presentation only — it never changes a step's status itself, so drive `steps` from your own state.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <!-- Horizontal (default), labels under the indicators -->
9
+ <rel-stepper id="checkout"></rel-stepper>
10
+ <script>
11
+ document.getElementById('checkout').steps = [
12
+ { title: 'Cart', status: 'done' },
13
+ { title: 'Shipping', status: 'progress' },
14
+ { title: 'Payment', status: 'disabled' },
15
+ { title: 'Confirmation', status: 'disabled' }
16
+ ];
17
+ </script>
18
+
19
+ <!-- Vertical, label beside the indicator (Figma Type = Centered).
20
+ `size` is DEPRECATED and deliberately omitted: Figma has no Size axis on the
21
+ Stepper — the connector geometry is fixed — so it was a code-only scale. It is
22
+ still accepted so existing markup keeps working, but it now resolves to the one
23
+ Figma geometry and logs a one-time notice. Retune with
24
+ `--rel-stepper-connector-length` instead. -->
25
+ <rel-stepper id="onboarding" orientation="vertical" label-placement="centered"></rel-stepper>
26
+ <script>
27
+ document.getElementById('onboarding').steps = [
28
+ { title: 'Create account', status: 'done' },
29
+ { title: 'Verify email', status: 'done' },
30
+ { title: 'Set up profile', status: 'progress' },
31
+ { title: 'Done', status: 'disabled' }
32
+ ];
33
+ </script>
34
+
35
+ <!-- Figma Type axis: dot / number / icon indicators -->
36
+ <rel-stepper type="dot" steps='[{"title":"Plan","status":"done"},{"title":"Build","status":"progress"},{"title":"Ship","status":"disabled"}]'></rel-stepper>
37
+ <rel-stepper type="number" steps='[{"title":"Plan","status":"done"},{"title":"Build","status":"progress"},{"title":"Ship","status":"disabled"}]'></rel-stepper>
38
+ <rel-stepper type="icon" steps='[{"title":"Plan","status":"done"},{"title":"Build","status":"progress"},{"title":"Ship","status":"disabled"}]'></rel-stepper>
39
+
40
+ <!-- Figma .Line Types axis: the CONNECTOR between steps, dashed 2px on / 2px off.
41
+ Distinct from type="dot" above, which is the indicator disc — combine freely. -->
42
+ <rel-stepper connector="dot" steps='[{"title":"Plan","status":"done"},{"title":"Build","status":"progress"},{"title":"Ship","status":"disabled"}]'></rel-stepper>
43
+ <rel-stepper connector="dot" type="dot" steps='[{"title":"Plan","status":"done"},{"title":"Build","status":"progress"},{"title":"Ship","status":"disabled"}]'></rel-stepper>
44
+
45
+ <!-- Label placement (Figma Typel): top-aligned beside the indicator, or indicator above the label -->
46
+ <rel-stepper orientation="vertical" label-placement="top" steps='[{"title":"Review","status":"done"},{"title":"Approve","status":"progress"}]'></rel-stepper>
47
+ <rel-stepper label-placement="inverted" steps='[{"title":"Review","status":"done"},{"title":"Approve","status":"progress"}]'></rel-stepper>
48
+
49
+ <!-- Let users jump back to a completed step -->
50
+ <rel-stepper id="wizard"></rel-stepper>
51
+ <script>
52
+ const wizard = document.getElementById('wizard');
53
+ wizard.steps = [
54
+ { title: 'Select', status: 'done' },
55
+ { title: 'Configure', status: 'progress' },
56
+ { title: 'Review', status: 'disabled' }
57
+ ];
58
+ wizard.addEventListener('rel-step-change', (e) => {
59
+ console.log('Activated step', e.detail.index, e.detail.step.title);
60
+ // Recompute statuses and assign a new array so the stepper re-renders
61
+ wizard.steps = wizard.steps.map((s, i) => ({
62
+ ...s,
63
+ status: i < e.detail.index ? 'done' : i === e.detail.index ? 'progress' : 'disabled'
64
+ }));
65
+ });
66
+ </script>
67
+ ```
68
+
69
+ ### Deprecated aliases
70
+
71
+ ```html
72
+ <!-- textalign="right" → label-placement="centered"; textalign="below" → label-placement="inverted".
73
+ Still supported and still the fallback when label-placement is unset. Since 1.4.9 a
74
+ non-default value logs a one-time console notice; it had been marked deprecated since the
75
+ rename but never said so at runtime. Setting label-placement supersedes it and stays silent. -->
76
+ <rel-stepper textalign="right" steps='[{"title":"Review","status":"done"},{"title":"Approve","status":"progress"}]'></rel-stepper>
77
+ ```
78
+
79
+ The `Step` type and the `StepStatus`, `StepperType`, `StepperConnector` and `LabelPlacement` unions are exported from the package:
80
+
81
+ ```typescript
82
+ import type { Step } from '@reliability-design/web';
83
+
84
+ const steps: Step[] = [
85
+ { title: 'Cart', status: 'done' }, // filled indicator with a check mark
86
+ { title: 'Shipping', status: 'progress' }, // current step (aria-current="step")
87
+ { title: 'Payment', status: 'disabled' } // not yet reachable; rendered at 40% opacity, not focusable
88
+ ];
89
+ ```
90
+
91
+ <!-- readme-gen:start -->
92
+
93
+ <!-- Generated from rel-stepper.ts — do not edit; run readme-generate.mjs -->
94
+
95
+ ## API
96
+
97
+ ### Attributes / Properties
98
+
99
+ | Property | Attribute | Type | Default | Description |
100
+ | --- | --- | --- | --- | --- |
101
+ | `steps` | `steps` | `Step[]` | `[]` | The steps in order, each `{ title: string; subtitle?: string; status: "done" \| "progress" \| "disabled" }`. Set as a property (or a JSON array attribute); the component never mutates it — update it from the `rel-step-change` handler. |
102
+ | `orientation` | `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Layout axis: `horizontal` (default) lays the steps out in a centred row; `vertical` stacks them. |
103
+ | `type` | `type` | `"default" \| "dot" \| "number" \| "icon"` | `"default"` | Figma "Type" axis — what the INDICATOR shows: `default` (step number, check mark once done), `dot` (8px dot, no glyph), `number` (always the number) or `icon` (always the check mark). Not the same axis as `connector="dot"`, which dashes the line between steps. Reflected. |
104
+ | `connector` | `connector` | `"solid" \| "dot"` | `"solid"` | Figma ".Line Types" axis — how the line BETWEEN steps is drawn: `solid` (an unbroken 1px rule) or `dot` (a 1px rule dashed 2px on, 2px off). Applies to both orientations. Not the same axis as `type="dot"`, which is the indicator disc; the two are independent and can be combined. Reflected. |
105
+ | `labelPlacement` | `label-placement` | `"top" \| "centered" \| "inverted"` | `undefined` | Figma "Typel" axis — where the label sits: `top` (top-aligned beside the indicator), `centered` (vertically centred beside it) or `inverted` (indicator above the label). When unset, the deprecated `textAlign` prop drives the layout (`below` ≈ `inverted`, `right` ≈ `centered`). Figma marks Top + Horizontal as an unsupported combination. Reflected. |
106
+
107
+ #### Deprecated (still supported — removal targeted for 3.0)
108
+
109
+ | Property | Attribute | Type | Use instead |
110
+ | --- | --- | --- | --- |
111
+ | `textAlign` | `textalign` | `"right" \| "below"` | Deprecated alias of `label-placement`; use `label-placement="inverted"` instead of `textalign="below"` and `label-placement="centered"` instead of `textalign="right"`. |
112
+ | `size` | `size` | `"small" \| "large"` | Figma has no Size axis on the Stepper — the connector geometry is fixed — so this was a code-only scale. It stays accepted so existing markup keeps working, and now resolves to the one Figma geometry. Retune it with `--rel-stepper-connector-length` instead. Logs a one-time notice. |
113
+
114
+ ## Events
115
+
116
+ | Event | Detail | Bubbles / composed | Description |
117
+ | --- | --- | --- | --- |
118
+ | `rel-step-change` | `{ index, step, }` | bubbles / composed | Fired when a step whose status is not `disabled` is clicked or activated with Enter / Space. Detail: `{ index: number, step: Step }`. Statuses are not changed by the component — update `steps` in the handler. |
119
+
120
+ ## Slots
121
+
122
+ | Slot | Description |
123
+ | --- | --- |
124
+ | — | This element has no slots. |
125
+
126
+ ## CSS Parts
127
+
128
+ | Part | Description |
129
+ | --- | --- |
130
+ | `indicator` | The 24px circle (8px for `type="dot"`) that holds the step number, check mark or icon. |
131
+ | `track` | The 1px connector line from a step to the next one (not rendered on the last step). |
132
+ | `label` | The step title text. |
133
+ | `subtitle` | The optional second line under the title; rendered only when a step sets `subtitle`. |
134
+
135
+ ## Tokens / CSS Variables
136
+
137
+ ### Component hooks
138
+
139
+ Set these on the host (or an ancestor) to customise the element without touching design tokens.
140
+
141
+ | Custom property | Default | Description |
142
+ | --- | --- | --- |
143
+ | `--rel-stepper-connector-length` | `var(--rel-stepper-connector-length-lg, 96px)` | Length of the connector line; the step gap is derived from it by adding Figma's clear space at both ends. Defaults to Figma's fixed geometry: 96px horizontally, 34px vertically with `label-placement="centered"`, 51px with `inverted`. |
144
+ | `--rel-stepper-indicator-size` | `24px` | Indicator diameter (default 24px; `type="dot"` is fixed at 8px). |
145
+
146
+ <!-- readme-gen:end -->
147
+
148
+ ## Accessibility
149
+
150
+ - The list renders as a `role="group"` with the fixed name "Progress steps" (not configurable).
151
+ - Every step is a `role="button"` element with `aria-label="<title>, step n of N"`, plus ", completed" for `done` steps. The `progress` step carries `aria-current="step"`; `disabled` steps carry `aria-disabled="true"` and `tabindex="-1"` so they are skipped in the Tab order and by the arrow keys.
152
+ - Enabled steps are individual Tab stops (`tabindex="0"`) with a 2px focus ring; the indicators and connectors are purely visual (the check mark SVG is `aria-hidden`).
153
+ - Activating a step only emits `rel-step-change`; nothing is announced and no status changes until you update `steps`.
154
+
155
+ | Key | Action |
156
+ | --- | --- |
157
+ | `Enter` / `Space` | Activate the focused step (emits `rel-step-change`; ignored on `disabled` steps) |
158
+ | `ArrowRight` / `ArrowDown` | Move focus to the next enabled step (wraps to the first) |
159
+ | `ArrowLeft` / `ArrowUp` | Move focus to the previous enabled step (wraps to the last) |
160
+ | `Home` / `End` | Move focus to the first / last enabled step |
161
+
162
+ ## Notes / Edge Cases
163
+
164
+ - `label-placement` is the canonical layout switch (Figma `Typel`). When it is unset the deprecated `textalign` prop decides: `below` renders like `inverted` (indicator above the label), `right` renders like `centered` (label beside the indicator). `top` differs from `centered` only in aligning the label to the top of the indicator. Figma marks Top + Horizontal as an unsupported combination.
165
+ - Statuses map to the Figma `.Artwork` states: `done` = inverse fill with a check mark (or the number when `type="number"`, nothing when `type="dot"`), `progress` = neutral fill with a strong 1px border, `disabled` = the same drawn at 40% opacity. Connectors are `border-strong` after a `done` / `progress` step and `border-default` otherwise.
166
+ - `type="icon"` shows the check mark on every step regardless of status; `type="dot"` shrinks the indicator to 8px and fills it for `done` and `progress`.
167
+ - Two axes spell one value "dot" and they are independent: `type="dot"` is the INDICATOR (an 8px disc replacing the number), `connector="dot"` is the LINE between steps. `connector="dot"` draws a 1px rule dashed 2px on / 2px off, matching Figma `.Line Types` `Type=Dot` (`strokeWeight=1`, `strokeDashes=[2,2]`). It is a repeating gradient rather than a dashed border because no engine lets you state a 2/2 dash period. The dash takes the connector's own state colour, so it goes `border-strong` after a `done` / `progress` step like the solid line does.
168
+ - Connector length doubles as the gap between steps and depends on `size` and `orientation`: large = `--rel-stepper-connector-length-lg` (86px) in both orientations; small horizontal = `--rel-stepper-connector-length-md` (60px); small vertical = `--rel-stepper-connector-length-sm` (42px). Note the `md` / `sm` suffixes refer to those defaults, not to a size value.
169
+ - Labels never wrap (`white-space: nowrap`); keep titles short or widen the connector hooks.
170
+ - `steps` is compared by reference: mutate-in-place changes are not picked up — assign a new array.
171
+ - Steps are `<div role="button">` elements, not native buttons, so they do not submit forms and do not get native disabled styling.