The described behavior is possible to achieve if you use the widget's expand
events to check which container is visible/expanded/collapsed and adjust the other container's height.
In order to ensure that the item containers are able to fit random amount of content, they should be scrollable.
Animations should be disabled.
If you want to use animations as well, you will need to use custom ones, because the custom resizing logic will interfere with the the native PanelBar animations.
Here is a demo, which I made to be sure that I can claim the desired behavior is possible to achieve in theory. It is a custom implementation of a generally unsupported scenario, so it is provided "as is".
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI