@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,199 +1,220 @@
1
- # rel-resizable
2
-
3
- `rel-resizable` is a three-element split-pane system: `<rel-resizable-group>` lays out its direct-child `<rel-resizable-panel>`s along one axis (`direction="horizontal"` side by side, `"vertical"` stacked) and lets the user drag or keyboard-nudge the `<rel-resizable-handle>` between two neighbours to trade percentage size between them, within each panel's `minsize` / `maxsize`. Use it for editor / preview splits, sidebar + content layouts and inspector panes where the user should control the proportions. It has no Figma component of its own; it follows the WAI-ARIA window-splitter pattern. It is not a general grid or an accordion — every panel stays visible and cannot be collapsed below its `minsize`.
4
-
5
- ## Usage
6
-
7
- ```html
8
- <!-- Horizontal split (default direction) -->
9
- <rel-resizable-group direction="horizontal" style="height: 320px;">
10
- <rel-resizable-panel defaultsize="50">
11
- <h3>Left</h3>
12
- </rel-resizable-panel>
13
- <rel-resizable-handle></rel-resizable-handle>
14
- <rel-resizable-panel defaultsize="50">
15
- <h3>Right</h3>
16
- </rel-resizable-panel>
17
- </rel-resizable-group>
18
-
19
- <!-- Vertical split: the group needs an explicit height to divide -->
20
- <rel-resizable-group direction="vertical" style="height: 480px;">
21
- <rel-resizable-panel defaultsize="40">Top</rel-resizable-panel>
22
- <rel-resizable-handle></rel-resizable-handle>
23
- <rel-resizable-panel defaultsize="60">Bottom</rel-resizable-panel>
24
- </rel-resizable-group>
25
-
26
- <!-- Constraints: percentages of the group -->
27
- <rel-resizable-group style="height: 320px;">
28
- <rel-resizable-panel defaultsize="30" minsize="20" maxsize="50">Sidebar</rel-resizable-panel>
29
- <rel-resizable-handle></rel-resizable-handle>
30
- <rel-resizable-panel defaultsize="70">Main</rel-resizable-panel>
31
- </rel-resizable-group>
32
-
33
- <!-- Nested: a vertical group inside the right panel of a horizontal one -->
34
- <rel-resizable-group direction="horizontal" style="height: 480px;">
35
- <rel-resizable-panel defaultsize="33">Sidebar</rel-resizable-panel>
36
- <rel-resizable-handle></rel-resizable-handle>
37
- <rel-resizable-panel defaultsize="67">
38
- <rel-resizable-group direction="vertical">
39
- <rel-resizable-panel defaultsize="50">Editor</rel-resizable-panel>
40
- <rel-resizable-handle></rel-resizable-handle>
41
- <rel-resizable-panel defaultsize="50">Preview</rel-resizable-panel>
42
- </rel-resizable-group>
43
- </rel-resizable-panel>
44
- </rel-resizable-group>
45
-
46
- <!-- Listening for size changes -->
47
- <rel-resizable-group id="split" style="height: 320px;">
48
- <rel-resizable-panel>A</rel-resizable-panel>
49
- <rel-resizable-handle></rel-resizable-handle>
50
- <rel-resizable-panel>B</rel-resizable-panel>
51
- </rel-resizable-group>
52
- <script>
53
- const split = document.getElementById('split');
54
- // fires continuously while dragging
55
- split.addEventListener('rel-resize', (e) => console.log(e.detail.sizes));
56
- // fires once per drag, and after every keyboard step — good for persisting
57
- split.addEventListener('rel-resize-end', (e) => localStorage.setItem('split', JSON.stringify(e.detail.sizes)));
58
- </script>
59
- ```
60
-
61
- <!-- readme-gen:start -->
62
-
63
- <!-- Generated from rel-resizable-group.ts, rel-resizable-handle.ts, rel-resizable-panel.ts — do not edit; run readme-generate.mjs -->
64
-
65
- ## Elements
66
-
67
- | Element | Class | Source |
68
- | --- | --- | --- |
69
- | `<rel-resizable-group>` | `RelResizableGroup` | `rel-resizable-group.ts` |
70
- | `<rel-resizable-handle>` | `RelResizableHandle` | `rel-resizable-handle.ts` |
71
- | `<rel-resizable-panel>` | `RelResizablePanel` | `rel-resizable-panel.ts` |
72
-
73
- ## API
74
-
75
- ### `<rel-resizable-group>`
76
-
77
- #### Attributes / Properties
78
-
79
- | Property | Attribute | Type | Default | Description |
80
- | --- | --- | --- | --- | --- |
81
- | `direction` | `direction` | `"horizontal" \| "vertical"` | `"horizontal"` | Layout axis: `horizontal` places panels side by side and resizes widths, `vertical` stacks them and resizes heights; also pushed to every child handle's `orientation`. Reflected. |
82
-
83
- ### Events
84
-
85
- | Event | Detail | Bubbles / composed | Description |
86
- | --- | --- | --- | --- |
87
- | `rel-resize` | `{ direction: this.direction, sizes, }` | bubbles / composed | Fired continuously while a handle is dragged. Detail: `{ direction, sizes: number[] }` with one percentage per panel. |
88
- | `rel-resize-end` | `{ direction: this.direction, sizes, }` | bubbles / composed | Fired once when a drag ends (pointerup) and after every keyboard resize step. Detail: `{ direction, sizes: number[] }` with one percentage per panel. |
89
-
90
- ### Slots
91
-
92
- | Slot | Description |
93
- | --- | --- |
94
- | (default) | The panels and handles, as direct children in display order (panel, handle, panel, …) |
95
-
96
- ### CSS Parts
97
-
98
- | Part | Description |
99
- | --- | --- |
100
- | — | None exposed. |
101
-
102
- ### `<rel-resizable-handle>`
103
-
104
- #### Attributes / Properties
105
-
106
- | Property | Attribute | Type | Default | Description |
107
- | --- | --- | --- | --- | --- |
108
- | `orientation` | `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Axis the handle separates: `horizontal` = 8px-wide vertical bar with `col-resize` cursor, `vertical` = 8px-tall bar with `row-resize`; set automatically from the parent group's `direction` on first render and mirrored to `aria-orientation`. Reflected. |
109
-
110
- #### Public fields / accessors
111
-
112
- | Name | Type | Description |
113
- | --- | --- | --- |
114
- | `splitValue` | `number` | Current split of the two neighbouring panels as a percentage 0–100 (share held by the leading panel); read-only — the parent group updates it and mirrors it to `aria-valuenow`. |
115
-
116
- ### Events
117
-
118
- | Event | Detail | Bubbles / composed | Description |
119
- | --- | --- | --- | --- |
120
- | — | — | — | This element emits no custom events. |
121
-
122
- ### Slots
123
-
124
- | Slot | Description |
125
- | --- | --- |
126
- | — | This element has no slots. |
127
-
128
- ### CSS Parts
129
-
130
- | Part | Description |
131
- | --- | --- |
132
- | — | None exposed. |
133
-
134
- ### `<rel-resizable-panel>`
135
-
136
- #### Attributes / Properties
137
-
138
- | Property | Attribute | Type | Default | Description |
139
- | --- | --- | --- | --- | --- |
140
- | `defaultSize` | `defaultsize` | `number` | `undefined` | Initial size as a percentage of the group; panels without one share whatever is left of 100%, then all sizes are normalised to sum to 100. Attribute is `defaultsize`. |
141
- | `minSize` | `minsize` | `number` | `10` | Smallest size (percentage) the panel can be resized to. Attribute is `minsize`. |
142
- | `maxSize` | `maxsize` | `number` | `90` | Largest size (percentage) the panel can be resized to. Attribute is `maxsize`. |
143
-
144
- #### Public fields / accessors
145
-
146
- | Name | Type | Description |
147
- | --- | --- | --- |
148
- | `currentSize` | `number` | Current size as a percentage of the group (also written to the host's `flex-basis`); read-only — the parent group updates it on every resize. |
149
-
150
- ### Events
151
-
152
- | Event | Detail | Bubbles / composed | Description |
153
- | --- | --- | --- | --- |
154
- | — | — | — | This element emits no custom events. |
155
-
156
- ### Slots
157
-
158
- | Slot | Description |
159
- | --- | --- |
160
- | (default) | The panel's content; slotted `h1`–`h4` get the headings-md role |
161
-
162
- ### CSS Parts
163
-
164
- | Part | Description |
165
- | --- | --- |
166
- | — | None exposed. |
167
-
168
- <!-- readme-gen:end -->
169
-
170
- ## Accessibility
171
-
172
- - Each `<rel-resizable-handle>` makes itself focusable (`tabindex="0"`) and takes `role="separator"` with `aria-orientation` mirroring its `orientation`. The group writes `aria-valuenow` (the leading panel's share of the pair, rounded, 0–100), `aria-valuemin="0"` and `aria-valuemax="100"` on first render and after every resize, so assistive technology can read the current split before and after any interaction.
173
- - Handles have no accessible name of their own; when several handles are on a page add `aria-label` to each (e.g. `aria-label="Resize sidebar"`).
174
- - The group and the panels set no roles and are not focusable; panels are `overflow: auto`, so their content scrolls natively and any interactive content inside keeps its own tab order.
175
- - A focused handle shows a 2px focus ring (`--rel-border-focus`) and a lighter background; hover and drag states change the background and grab-bar colours only.
176
- - Keyboard resizing (handled by the group, on a focused handle):
177
-
178
- | Key | Direction | Action |
179
- | --- | --- | --- |
180
- | `ArrowLeft` / `ArrowRight` | `horizontal` | Shrink / grow the leading panel by 2% (of the group). |
181
- | `ArrowUp` / `ArrowDown` | `vertical` | Shrink / grow the leading panel by 2%. |
182
- | `Shift` + arrow | either | Same, in 5% steps. |
183
- | `Home` | either | Collapse the leading panel to its `minsize` (as far as the neighbour allows). |
184
- | `End` | either | Grow the leading panel to its `maxsize` (as far as the neighbour allows). |
185
-
186
- - Every keyboard step dispatches `rel-resize-end` (not `rel-resize`).
187
- - Motion: the handle's background transitions are removed under `prefers-reduced-motion: reduce`.
188
-
189
- ## Notes / Edge Cases
190
-
191
- - Panels and handles must be **direct children** of the group (`:scope > rel-resizable-panel`), alternating panel / handle / panel. A handle at the start or end, or two handles in a row, has no valid pair and does nothing.
192
- - Layout is computed once in `firstUpdated`: panels without `defaultsize` share whatever remains of 100%, then all sizes are normalised to sum to exactly 100 (so `defaultsize="50"` + `defaultsize="70"` ends up as 41.7 / 58.3). Panels or handles added or removed later are **not** observed; re-attach the group to re-initialise.
193
- - Sizes are always percentages of the group, applied as `flex-basis` with `flex-grow: 0; flex-shrink: 0`. The group itself is `display: flex; width: 100%; height: 100%`, so a `vertical` group needs an ancestor with a definite height or it has nothing to divide.
194
- - Only the two panels adjacent to the dragged handle change; each is clamped to its own `minsize` / `maxsize`, then the pair is rescaled so their combined share stays constant. A panel therefore cannot go below its `minsize` (default 10) and never collapses to 0 unless you set `minsize="0"`.
195
- - Attribute names are lowercase with no hyphen: `defaultsize`, `minsize`, `maxsize` (properties `defaultSize`, `minSize`, `maxSize`).
196
- - While a drag is in progress the active handle carries a `data-dragging` attribute (the group sets and removes it) — the only hook for drag-specific styling from outside.
197
- - Each handle's `orientation` is overwritten from the group's `direction` on first render; set `direction` on the group, not `orientation` on the handles.
198
- - `rel-resize` fires on every pointer move during a drag; throttle any expensive listener. `rel-resize-end` fires once on pointer-up and after each keyboard step; both carry `{ direction, sizes }` where `sizes[i]` is panel *i*'s current percentage.
199
- - Nested groups work because the inner group is ordinary panel content; pointer events are handled by the nearest group whose handle is in the event's composed path.
1
+ # rel-resizable
2
+
3
+ `rel-resizable` is a three-element split-pane system: `<rel-resizable-group>` lays out its direct-child `<rel-resizable-panel>`s along one axis (`direction="horizontal"` side by side, `"vertical"` stacked) and lets the user drag or keyboard-nudge the `<rel-resizable-handle>` between two neighbours to trade percentage size between them, within each panel's `min-size` / `max-size`. Use it for editor / preview splits, sidebar + content layouts and inspector panes where the user should control the proportions. It has no Figma component of its own; it follows the WAI-ARIA window-splitter pattern. It is not a general grid or an accordion — every panel stays visible and cannot be collapsed below its `min-size`.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <!-- Horizontal split (default direction) -->
9
+ <rel-resizable-group direction="horizontal" style="height: 320px;">
10
+ <rel-resizable-panel default-size="50">
11
+ <h3>Left</h3>
12
+ </rel-resizable-panel>
13
+ <rel-resizable-handle></rel-resizable-handle>
14
+ <rel-resizable-panel default-size="50">
15
+ <h3>Right</h3>
16
+ </rel-resizable-panel>
17
+ </rel-resizable-group>
18
+
19
+ <!-- Vertical split: the group needs an explicit height to divide -->
20
+ <rel-resizable-group direction="vertical" style="height: 480px;">
21
+ <rel-resizable-panel default-size="40">Top</rel-resizable-panel>
22
+ <rel-resizable-handle></rel-resizable-handle>
23
+ <rel-resizable-panel default-size="60">Bottom</rel-resizable-panel>
24
+ </rel-resizable-group>
25
+
26
+ <!-- Constraints: percentages of the group -->
27
+ <rel-resizable-group style="height: 320px;">
28
+ <rel-resizable-panel default-size="30" min-size="20" max-size="50">Sidebar</rel-resizable-panel>
29
+ <rel-resizable-handle></rel-resizable-handle>
30
+ <rel-resizable-panel default-size="70">Main</rel-resizable-panel>
31
+ </rel-resizable-group>
32
+
33
+ <!-- Nested: a vertical group inside the right panel of a horizontal one -->
34
+ <rel-resizable-group direction="horizontal" style="height: 480px;">
35
+ <rel-resizable-panel default-size="33">Sidebar</rel-resizable-panel>
36
+ <rel-resizable-handle></rel-resizable-handle>
37
+ <rel-resizable-panel default-size="67">
38
+ <rel-resizable-group direction="vertical">
39
+ <rel-resizable-panel default-size="50">Editor</rel-resizable-panel>
40
+ <rel-resizable-handle></rel-resizable-handle>
41
+ <rel-resizable-panel default-size="50">Preview</rel-resizable-panel>
42
+ </rel-resizable-group>
43
+ </rel-resizable-panel>
44
+ </rel-resizable-group>
45
+
46
+ <!-- Scrollable panel (new in 1.5.0): while the content overflows, the panel is a
47
+ focusable region named by panel-label, so keyboard users can scroll it -->
48
+ <rel-resizable-group style="height: 240px;">
49
+ <rel-resizable-panel default-size="30" panel-label="Shipment list">…long list…</rel-resizable-panel>
50
+ <rel-resizable-handle aria-label="Resize shipment list"></rel-resizable-handle>
51
+ <rel-resizable-panel default-size="70">Details</rel-resizable-panel>
52
+ </rel-resizable-group>
53
+
54
+ <!-- Listening for size changes -->
55
+ <rel-resizable-group id="split" style="height: 320px;">
56
+ <rel-resizable-panel>A</rel-resizable-panel>
57
+ <rel-resizable-handle></rel-resizable-handle>
58
+ <rel-resizable-panel>B</rel-resizable-panel>
59
+ </rel-resizable-group>
60
+ <script>
61
+ const split = document.getElementById('split');
62
+ // fires continuously while dragging
63
+ split.addEventListener('rel-resize', (e) => console.log(e.detail.sizes));
64
+ // fires once per drag, and after every keyboard step — good for persisting
65
+ split.addEventListener('rel-resize-end', (e) => localStorage.setItem('split', JSON.stringify(e.detail.sizes)));
66
+ </script>
67
+ ```
68
+
69
+ ### Deprecated aliases
70
+
71
+ ```html
72
+ <!-- defaultsize / minsize / maxsize → default-size / min-size / max-size (since 1.5.0; still work,
73
+ log a one-time console notice, removed in 3.0) -->
74
+ <rel-resizable-panel defaultsize="30" minsize="20" maxsize="50">Sidebar</rel-resizable-panel>
75
+ <rel-resizable-panel default-size="30" min-size="20" max-size="50">Sidebar</rel-resizable-panel>
76
+ ```
77
+
78
+ <!-- readme-gen:start -->
79
+
80
+ <!-- Generated from rel-resizable-group.ts, rel-resizable-handle.ts, rel-resizable-panel.ts — do not edit; run readme-generate.mjs -->
81
+
82
+ ## Elements
83
+
84
+ | Element | Class | Source |
85
+ | --- | --- | --- |
86
+ | `<rel-resizable-group>` | `RelResizableGroup` | `rel-resizable-group.ts` |
87
+ | `<rel-resizable-handle>` | `RelResizableHandle` | `rel-resizable-handle.ts` |
88
+ | `<rel-resizable-panel>` | `RelResizablePanel` | `rel-resizable-panel.ts` |
89
+
90
+ ## API
91
+
92
+ ### `<rel-resizable-group>`
93
+
94
+ #### Attributes / Properties
95
+
96
+ | Property | Attribute | Type | Default | Description |
97
+ | --- | --- | --- | --- | --- |
98
+ | `direction` | `direction` | `"horizontal" \| "vertical"` | `"horizontal"` | Layout axis: `horizontal` places panels side by side and resizes widths, `vertical` stacks them and resizes heights; also pushed to every child handle's `orientation`. Reflected. |
99
+
100
+ ### Events
101
+
102
+ | Event | Detail | Bubbles / composed | Description |
103
+ | --- | --- | --- | --- |
104
+ | `rel-resize` | `{ direction: this.direction, sizes, }` | bubbles / composed | Fired continuously while a handle is dragged. Detail: `{ direction, sizes: number[] }` with one percentage per panel. |
105
+ | `rel-resize-end` | `{ direction: this.direction, sizes, }` | bubbles / composed | Fired once when a drag ends (pointerup) and after every keyboard resize step. Detail: `{ direction, sizes: number[] }` with one percentage per panel. |
106
+
107
+ ### Slots
108
+
109
+ | Slot | Description |
110
+ | --- | --- |
111
+ | (default) | The panels and handles, as direct children in display order (panel, handle, panel, …) |
112
+
113
+ ### CSS Parts
114
+
115
+ | Part | Description |
116
+ | --- | --- |
117
+ | — | None exposed. |
118
+
119
+ ### `<rel-resizable-handle>`
120
+
121
+ #### Attributes / Properties
122
+
123
+ | Property | Attribute | Type | Default | Description |
124
+ | --- | --- | --- | --- | --- |
125
+ | `orientation` | `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Axis the handle separates: `horizontal` = 8px-wide vertical bar with `col-resize` cursor, `vertical` = 8px-tall bar with `row-resize`; set automatically from the parent group's `direction` on first render and mirrored to `aria-orientation`. Reflected. |
126
+
127
+ #### Public fields / accessors
128
+
129
+ | Name | Type | Description |
130
+ | --- | --- | --- |
131
+ | `splitValue` | `number` | Current split of the two neighbouring panels as a percentage 0–100 (share held by the leading panel); read-only — the parent group updates it and mirrors it to `aria-valuenow`. |
132
+
133
+ ### Events
134
+
135
+ | Event | Detail | Bubbles / composed | Description |
136
+ | --- | --- | --- | --- |
137
+ | — | — | — | This element emits no custom events. |
138
+
139
+ ### Slots
140
+
141
+ | Slot | Description |
142
+ | --- | --- |
143
+ | — | This element has no slots. |
144
+
145
+ ### CSS Parts
146
+
147
+ | Part | Description |
148
+ | --- | --- |
149
+ | — | None exposed. |
150
+
151
+ ### `<rel-resizable-panel>`
152
+
153
+ #### Attributes / Properties
154
+
155
+ | Property | Attribute | Type | Default | Description |
156
+ | --- | --- | --- | --- | --- |
157
+ | `defaultSize` | `default-size` | `number` | `undefined` | Initial size as a percentage of the group; panels without one share whatever is left of 100%, then all sizes are normalised to sum to 100. The `defaultsize` attribute spelling is deprecated (still works; removal targeted for 3.0). |
158
+ | `minSize` | `min-size` | `number` | `10` | Smallest size (percentage) the panel can be resized to. The `minsize` attribute spelling is deprecated (still works; removal targeted for 3.0). |
159
+ | `maxSize` | `max-size` | `number` | `90` | Largest size (percentage) the panel can be resized to. The `maxsize` attribute spelling is deprecated (still works; removal targeted for 3.0). |
160
+ | `panelLabel` | `panel-label` | `string` | `undefined` | New in 1.5.0. Accessible name the panel carries while its content overflows (it is then a focusable `role="region"`). Defaults to "Panel N", N being its position among the group's panels. Ignored when the page sets its own `aria-label` / `aria-labelledby`. |
161
+
162
+ #### Public fields / accessors
163
+
164
+ | Name | Type | Description |
165
+ | --- | --- | --- |
166
+ | `currentSize` | `number` | Current size as a percentage of the group (also written to the host's `flex-basis`); read-only — the parent group updates it on every resize. |
167
+ | `scrollable` | `boolean` | True while the content overflows the panel in either axis; read-only, kept current by a ResizeObserver. |
168
+
169
+ ### Events
170
+
171
+ | Event | Detail | Bubbles / composed | Description |
172
+ | --- | --- | --- | --- |
173
+ | — | — | — | This element emits no custom events. |
174
+
175
+ ### Slots
176
+
177
+ | Slot | Description |
178
+ | --- | --- |
179
+ | (default) | The panel's content; slotted `h1`–`h4` get the headings-md role |
180
+
181
+ ### CSS Parts
182
+
183
+ | Part | Description |
184
+ | --- | --- |
185
+ | — | None exposed. |
186
+
187
+ <!-- readme-gen:end -->
188
+
189
+ ## Accessibility
190
+
191
+ - Each `<rel-resizable-handle>` makes itself focusable (`tabindex="0"`) and takes `role="separator"` with `aria-orientation` mirroring its `orientation`. The group writes `aria-valuenow` (the leading panel's share of the pair, rounded, 0–100), `aria-valuemin="0"` and `aria-valuemax="100"` on first render and after every resize, so assistive technology can read the current split before and after any interaction.
192
+ - Handles have no accessible name of their own; when several handles are on a page add `aria-label` to each (e.g. `aria-label="Resize sidebar"`).
193
+ - The group sets no role and is not focusable. Panels are `overflow: auto`, and any interactive content inside keeps its own tab order.
194
+ - Scrollable panels (new in 1.5.0): while a panel's content overflows it (either axis), the panel gets `tabindex="0"`, `role="region"` and an `aria-label` (`panel-label`, default "Panel 1", "Panel 2"… by position), so a keyboard user can Tab to it and scroll with the arrow keys, Page Up / Page Down and Home / End. Focus shows a 2px `--rel-border-focus` ring drawn inside the panel edge (the group clips anything outside), or the system highlight colour in forced-colors mode. When the content fits again (resized larger, content removed) all three are removed, so a panel that cannot scroll is never a dead tab stop; a panel that is focused at that moment keeps its tab stop until focus leaves. Overflow is re-measured on panel and content resizes and on content changes.
195
+ - A `tabindex` you set yourself is never changed or removed (including `-1`), and the panel then leaves `role` and `aria-label` to you as well. A `role` or `aria-label` / `aria-labelledby` you set is never overridden. Give each scrollable panel a distinct `panel-label` when the defaults would repeat (for example in nested groups, where each group numbers its panels from 1).
196
+ - A focused handle shows a 2px focus ring (`--rel-border-focus`) and a lighter background; hover and drag states change the background and grab-bar colours only.
197
+ - Keyboard resizing (handled by the group, on a focused handle):
198
+
199
+ | Key | Direction | Action |
200
+ | --- | --- | --- |
201
+ | `ArrowLeft` / `ArrowRight` | `horizontal` | Shrink / grow the leading panel by 2% (of the group). |
202
+ | `ArrowUp` / `ArrowDown` | `vertical` | Shrink / grow the leading panel by 2%. |
203
+ | `Shift` + arrow | either | Same, in 5% steps. |
204
+ | `Home` | either | Collapse the leading panel to its `min-size` (as far as the neighbour allows). |
205
+ | `End` | either | Grow the leading panel to its `max-size` (as far as the neighbour allows). |
206
+
207
+ - Every keyboard step dispatches `rel-resize-end` (not `rel-resize`).
208
+ - Motion: the handle's background transitions are removed under `prefers-reduced-motion: reduce`.
209
+
210
+ ## Notes / Edge Cases
211
+
212
+ - Panels and handles must be **direct children** of the group (`:scope > rel-resizable-panel`), alternating panel / handle / panel. A handle at the start or end, or two handles in a row, has no valid pair and does nothing.
213
+ - Layout is computed once in `firstUpdated`: panels without `default-size` share whatever remains of 100%, then all sizes are normalised to sum to exactly 100 (so `default-size="50"` + `default-size="70"` ends up as 41.7 / 58.3). Panels or handles added or removed later are **not** observed; re-attach the group to re-initialise.
214
+ - Sizes are always percentages of the group, applied as `flex-basis` with `flex-grow: 0; flex-shrink: 0`. The group itself is `display: flex; width: 100%; height: 100%`, so a `vertical` group needs an ancestor with a definite height or it has nothing to divide.
215
+ - Only the two panels adjacent to the dragged handle change; each is clamped to its own `min-size` / `max-size`, then the pair is rescaled so their combined share stays constant. A panel therefore cannot go below its `min-size` (default 10) and never collapses to 0 unless you set `min-size="0"`.
216
+ - Attribute names are kebab-case: `default-size`, `min-size`, `max-size` (properties `defaultSize`, `minSize`, `maxSize`). The older lowercase spellings still work since 1.5.0 but log a one-time console notice and are removed in 3.0; see Deprecated aliases.
217
+ - While a drag is in progress the active handle carries a `data-dragging` attribute (the group sets and removes it) — the only hook for drag-specific styling from outside.
218
+ - Each handle's `orientation` is overwritten from the group's `direction` on first render; set `direction` on the group, not `orientation` on the handles.
219
+ - `rel-resize` fires on every pointer move during a drag; throttle any expensive listener. `rel-resize-end` fires once on pointer-up and after each keyboard step; both carry `{ direction, sizes }` where `sizes[i]` is panel *i*'s current percentage.
220
+ - Nested groups work because the inner group is ordinary panel content; pointer events are handled by the nearest group whose handle is in the event's composed path.