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
… some optimizations (#77) * change `Default` theme to `Neutral` and use neutral theme as default * overhaul `Button` and add examples * update button group and separator * update accordion * update `Alert` and add `AlertAction` * update `Badge`, change `as_button` to `render_as`, links can render as badges * rm old file * update `Avatar` and add `size` prop to `Avatar`, add `AvatarBadge` and `AvatarGroupCount` and examples * update breadcrumb, add `none` variant to `Button` * update select components and add basic multi-select support * update card, add `CardAction` * update checkbox * cleanup, consolidate and merge a bunch of components * clean up checkbox * more input/label tweaks * update popovers * more cleanup/try to separate layout and style more * dialog stuff * finish dialog/alert_dialog, examples and docs * update `AspectRatio` * update `Empty` * update `Field` * update input_group and textarea * update item * update kbd * update label * add `Label` examples * update `Pagination` * update `Progress` * update leptosfmt.toml * update `Radio` and make invalid and disabled states/labels consistent/respect parent `Field` values * WIP: `Sidebar`, `Collapsible`, primitives, add trigger highlighting * add `Sheet`, sidebar mobile rendering * work on dialogs in dropdowns/triggers * update deps * add button active state * add testing site * start making primitives * start making primitives * more primitives * separator wrappers * fix hydration weirdness when spreading on primitives * fix popover submenus opening in the wrong place * fix some client routing effect weirdness * make `CheckboxPrimitive` for `Checkbox` `Switch` and `Radio` and limit visibility for most contexts * update `Skeleton` style * add/update skeleton examples * update slider * clean up docs_macro and add multi-threading with rayon for syntax hightlighting - 3x speed increase * more rayon more fast * handle signals properly with no effects for checkboxes * better signal handing/reactivity, lower latency * better signal handing/reactivity, lower latency * rm unused * update `Switch` component/styling and examples * update table * update `Tabs` component and examples * simplify some type descriptions for readability * update `Toggle` component and examples * update theme switcher a bit * update `Tooltip` component and examples, some more reactivity tweaks * set up modular base styles and hard code vega for now * put that back * hook up base switching and add accordion bases * add `Alert` bases * some dialog stuff * add alert dialog variants * add dialog variants * rm redundant css, reduced motion gate, match shadcn api, fix width issues * add avatar variants * add badge variants * add breadcrumb variants * add button variants * add button_group variants * add card variants * fix typo * add checkbox variants * better build.rs errors * add dropdown variants * add empty variants * add label variants * add field variants * add input variants * add input_group variants * add item variants * add kbd variants * add pagination variants * add popover variants * add progress variants * add radio variants * add select variants * add separator variants * add sheet variants * add sidebar variants * add skeleton variants * add slider variants * add switch variants * add table variants * add tabs variants * add textarea variants * tweak sidebar shadows to match upstream * add toggle variants * add tooltip variants * fix some style override issues * css tweaks/fixes * more css layering/tweaks/fixes * tooltip tweaks * fix tabs layering and underline * more layer tweaks * anchor positioning gets weird with spans * fix field label cards * `Fields` and inputs inherit `disabled` and `invalid` signals * handle some warnings * only sera should be uppercase * more minor tweaks and fixes
Closed
|
Thanks a lot for the update ! |
Owner
Author
|
FYI: Sorry for any inconvenience but I got it wrong and now it's right |
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.
Singlestage 0.5
This PR thread shall serve as a migration guide
Incomplete 0.5 docs are live at https://beta.singlestage.doordesk.net
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
openandmodalprops 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.modalcontrols 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 popoverdismissandmodalareReactiveand 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
Theme::Defaultis renamed toTheme::Neutraland the default theme is nowTheme::NeutralAlertnow grows to the full width of its parent containerAlertActioncomponentas_buttonLinkprop renamed torender_asand now takes aString.as_button=trueis nowrender_as="button"Links can now render asBadges withrender_as="badge"sizeprop toAvatarAvatarBadgeandAvatarGroupCountButtonBreadcrumbEllipsis,BreadcrumbList,BreadcrumbPageBreadcrumbchanged name toBreadcrumbListand was replaced with anavcontainer componentBreadcrumbcomponent is a bit more accessible with some aria roles and tags for screen readersSelectItemrenamed toSelectOptionSelectContentrenamed toSelectOptGroupCardActionDialogTriggeris no longer a slot<Dialog alert=true>is now<AlertDialog>DialogCancelandDialogActionAlertDialogCancelandAlertDialogActionAlertDialogMediaDialogContent, andAlertDialogContentwhich are now required, and dialog headers and footers go inside them nowAspectRatiorationow takes aStringProgressmaxandvalueprops now takef64orientationprop toSlidersizeprop toSwitchorientationprop toTabsvariantprop toTabsListTooltiphas changed quite a bit to match shadcn:would now be
ThemeProvidershould now come before user styles to ensure proper cascading:to:
Fields and various inputs now inherit signals for things likedisabledandinvalidfrom their parents. So anInputwithin aFieldinherits from theField, and in the case of aCheckboxwithin aFieldwithin aCheckboxGroup, both theFieldandCheckboxinherit from theCheckboxGroupField variant="button"was removed. Now anyFieldinside of aFieldLabelcontaining a checkbox, switch, or radio button renders as a choice card. Here is an example:sizeandvariantoptions forLinks andButtons used withinSidebarMenuButtonsLinknow usesleptos_router::components::Ainternally, which means it can now only be used within aRoutercontext, which is probably fine more often than it's notLinkandButtonnow havearia_current, onButtons it doesn't do anything outside ofSidebarMenuButtoncurrentlyLinks usingrender_as="button"while insideSidebarMenuButtonoverride the sidebar styling with button styling. They stretch to the same width as other sidebar buttons. Button content is centered by default since it is the default style forButtons, but it can be justified to the start or end withclass="justify-start"class="justify-end"depending on which side the sidebar is on to make it more sidebar-likeas_childtoLinkandButtonverticalis removed fromSeparator,ButtonGroupSeparator, andButtonGroup, and was replaced withorientationto match shadcn. so<Separator vertical=true />is now<Separator orientation="vertical" />, etc.class="w-48", etc.