Skip to content

Commit c2435c0

Browse files
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 state
1 parent 582ecc0 commit c2435c0

17 files changed

Lines changed: 881 additions & 500 deletions

apps/radix-storybook/.storybook/tailwind.css

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,51 @@
126126
--animate-popover-popup-out: popover-popup-out 120ms ease-in;
127127
--animate-popover-viewport-in: popover-viewport-in 200ms ease-out;
128128
--animate-popover-viewport-out: popover-viewport-out 200ms ease-in;
129+
130+
--animate-accordion-down: accordion-down 200ms ease-out;
131+
--animate-accordion-up: accordion-up 200ms ease-out;
132+
--animate-accordion-right: accordion-right 200ms ease-out;
133+
--animate-accordion-left: accordion-left 200ms ease-out;
134+
}
135+
136+
@keyframes accordion-down {
137+
from {
138+
height: 0;
139+
}
140+
141+
to {
142+
height: var(--radix-accordion-content-height);
143+
}
144+
}
145+
146+
@keyframes accordion-up {
147+
from {
148+
height: var(--radix-accordion-content-height);
149+
}
150+
151+
to {
152+
height: 0;
153+
}
154+
}
155+
156+
@keyframes accordion-right {
157+
from {
158+
width: 0;
159+
}
160+
161+
to {
162+
width: var(--radix-accordion-content-width);
163+
}
164+
}
165+
166+
@keyframes accordion-left {
167+
from {
168+
width: var(--radix-accordion-content-width);
169+
}
170+
171+
to {
172+
width: 0;
173+
}
129174
}
130175

131176
@keyframes popover-in {

0 commit comments

Comments
 (0)