Conversation
… add external/manual popover control, add submenus, add `CheckboxItem` and `RadioItem`, add `PopoverHeader` components (#45) * refactor: rework popovers * add reactive `dismiss` prop to popovers and make `dismissable` reactive * update docs and add inset prop to `DropdownMenuLabel` and `DropdownMenuItem` * css * more css * add submenus for dropdown and context menus * add more examples * fix submenu positioning * add `CheckboxItem` and `RadioItem` * tweaks and docs * open submenus on hover * run clippy * finish `Popover` stuff, add `PopoverHeader`, `PopoverTitle`, `PopoverDescription`, docs, and examples * custom class support for popover header/children
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
alignandsideprops toDropdownMenuContentandPopoverContentfor anchor positioning. The anchor is the triggerButton.Accepted values for
alignare"start"|"center"|"end", with"start"being the default.Accepted values for
sideare"top"|"right"|"bottom"|"left", with "bottom" being the default.Adds
openanddismissableprops toDropdownMenu,ContextMenu, andPopovercomponents.openis a reactive signal that controls open/close state of popovers, but is not coupled to the actual open state of the popover.dismissablecontrols whether a popover can be light dismissed (clicking off the popover/trigger, pressing esc, etc.) and can be used in conjunction withopento create a manually controlled popover. This effectively couples the open signal to the open state of the popover but this is not enforced so there may be edge cases where sync is lost.dropdown-menuCSS class changed todropdown-menu-contentBasic popover styling and positioning related CSS is now separate from menu styling CSS to better support custom popover/dropdown/context menu implementation
DropdownMenuItemnow has adismissprop that toggles whether or not clicking the item closes the popoverdismissanddismissableareReactiveand can take signalsAdded animations for popovers for users who don't prefer reduced motion
Updated styling to mimic shadcn
Added submenus for dropdown and context menus
Added
CheckboxItemandRadioItemcomponents for use within popover menusAdded PopoverHeader, PopoverTitle, and PopoverDescription to Popover
Change all
invalidanddisabledprops toReactiveto allow signalsCloses #44
Mitigates #48