Commit c2435c0
committed
feat(accordion): align with Base UI API, fix data-disabled bugs, refactor stories
New inputs/outputs (Base UI alignment):
- `multiple: boolean` on root (takes precedence over `type`, which stays for compat)
- `loopFocus: boolean` on root (default true), wired into useArrowNavigation
- `onOpenChange: output<boolean>` on item (skips initial render)
- `data-index` on all parts: item, header, trigger, content
- `data-panel-open` on trigger for open-state CSS styling
- `data-disabled` on root
Bug fixes:
- content/header were binding boolean `false` to data-disabled instead of removing the attribute
- item data-disabled used item-level `disabled()` only, ignoring root disabled state1 parent 582ecc0 commit c2435c0
17 files changed
Lines changed: 881 additions & 500 deletions
File tree
- apps/radix-storybook/.storybook
- packages/primitives
- accordion
- __tests__
- src
- stories
- storybook
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
129 | 174 | | |
130 | 175 | | |
131 | 176 | | |
| |||
0 commit comments