Closed Supamiu closed 3 months ago
:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook
:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook
:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook
:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook
:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook
:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook
:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook
:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook
:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook
Description
luPopover2
handles focus management and restore to have popovers that can be interacted with using screen readers and keyboard-only navigation, we had to do this in a separate component for maintainability (N layers of abstraction for just popover would make no sense) and in order to be able to make API changes without them being breaking everywhere.Eventually, the current
luPopover
will end up being deprecated but that's not for today.Position has been handled in a simple 2 axis style with 4 possible positions for simplicity and ease of use for UI devs but for fine-tuned position logic,
customPositions
can accept aConnectedPositionPair[]
that will override the current logic (which includes fallback) so that we can hand things like left-aligned menus, contained menus and so on. But since the average popover's position is either, above, below, before or after, they are the default ones that you can pick from if you don't want to write 4 position pairs, including fallbacks, by yourself.