From ab1b7ee6a8552dc308d6f4a45a77ee11781850e4 Mon Sep 17 00:00:00 2001 From: carlosabadia Date: Mon, 22 Dec 2025 15:37:38 +0100 Subject: [PATCH] bump base ui to 1.0.0 --- reflex_ui/components/base/accordion.py | 2 +- reflex_ui/components/base/accordion.pyi | 10 ++-- reflex_ui/components/base/avatar.py | 2 +- reflex_ui/components/base/button.py | 2 +- reflex_ui/components/base/button.pyi | 2 +- reflex_ui/components/base/checkbox.py | 3 ++ reflex_ui/components/base/checkbox.pyi | 5 ++ reflex_ui/components/base/context_menu.py | 12 ++--- reflex_ui/components/base/context_menu.pyi | 14 ++--- reflex_ui/components/base/dialog.py | 4 +- reflex_ui/components/base/dialog.pyi | 6 +-- reflex_ui/components/base/menu.py | 53 ++++++++++--------- reflex_ui/components/base/menu.pyi | 38 +++++-------- reflex_ui/components/base/navigation_menu.py | 4 +- reflex_ui/components/base/navigation_menu.pyi | 2 +- reflex_ui/components/base/popover.py | 30 ++++++----- reflex_ui/components/base/popover.pyi | 20 ++----- reflex_ui/components/base/preview_card.py | 6 +-- reflex_ui/components/base/preview_card.pyi | 2 +- reflex_ui/components/base/select.py | 6 +-- reflex_ui/components/base/select.pyi | 2 +- reflex_ui/components/base/slider.py | 15 +++++- reflex_ui/components/base/slider.pyi | 31 +++++++++-- reflex_ui/components/base/switch.py | 5 +- reflex_ui/components/base/switch.pyi | 5 ++ reflex_ui/components/base/tabs.py | 4 +- reflex_ui/components/base/tabs.pyi | 2 +- reflex_ui/components/base/toggle_group.py | 4 +- reflex_ui/components/base/toggle_group.pyi | 4 +- reflex_ui/components/base/tooltip.py | 34 ++++++------ reflex_ui/components/base/tooltip.pyi | 24 +++------ reflex_ui/components/base_ui.py | 4 +- reflex_ui/components/base_ui.pyi | 4 +- 33 files changed, 194 insertions(+), 167 deletions(-) diff --git a/reflex_ui/components/base/accordion.py b/reflex_ui/components/base/accordion.py index 3828252..c315ac8 100644 --- a/reflex_ui/components/base/accordion.py +++ b/reflex_ui/components/base/accordion.py @@ -65,7 +65,7 @@ class AccordionRoot(AccordionBaseComponent): disabled: Var[bool] # Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True. - loop: Var[bool] + loop_focus: Var[bool] # The visual orientation of the accordion. Controls whether roving focus uses left/right or up/down arrow keys. Defaults to 'vertical'. orientation: Var[LiteralOrientation] diff --git a/reflex_ui/components/base/accordion.pyi b/reflex_ui/components/base/accordion.pyi index 2a0e465..89363be 100644 --- a/reflex_ui/components/base/accordion.pyi +++ b/reflex_ui/components/base/accordion.pyi @@ -88,7 +88,7 @@ class AccordionRoot(AccordionBaseComponent): hidden_until_found: Var[bool] | bool | None = None, multiple: Var[bool] | bool | None = None, disabled: Var[bool] | bool | None = None, - loop: Var[bool] | bool | None = None, + loop_focus: Var[bool] | bool | None = None, orientation: Literal["horizontal", "vertical"] | Var[Literal["horizontal", "vertical"]] | None = None, @@ -293,7 +293,7 @@ class HighLevelAccordion(AccordionRoot): hidden_until_found: Var[bool] | bool | None = None, multiple: Var[bool] | bool | None = None, disabled: Var[bool] | bool | None = None, - loop: Var[bool] | bool | None = None, + loop_focus: Var[bool] | bool | None = None, orientation: Literal["horizontal", "vertical"] | Var[Literal["horizontal", "vertical"]] | None = None, @@ -339,7 +339,7 @@ class HighLevelAccordion(AccordionRoot): hidden_until_found: Allows the browser's built-in page search to find and expand the panel contents. Overrides the `keep_mounted` prop and uses `hidden="until-found"` to hide the element without removing it from the DOM. Defaults to False. multiple: Whether multiple items can be open at the same time. Defaults to True. disabled: Whether the component should ignore user interaction. Defaults to False. - loop: Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True. + loop_focus: Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True. orientation: The visual orientation of the accordion. Controls whether roving focus uses left/right or up/down arrow keys. Defaults to 'vertical'. keep_mounted: Whether to keep the element in the DOM while the panel is closed. This prop is ignored when hidden_until_found is used. Defaults to False. render_: The render prop. @@ -375,7 +375,7 @@ class Accordion(ComponentNamespace): hidden_until_found: Var[bool] | bool | None = None, multiple: Var[bool] | bool | None = None, disabled: Var[bool] | bool | None = None, - loop: Var[bool] | bool | None = None, + loop_focus: Var[bool] | bool | None = None, orientation: Literal["horizontal", "vertical"] | Var[Literal["horizontal", "vertical"]] | None = None, @@ -421,7 +421,7 @@ class Accordion(ComponentNamespace): hidden_until_found: Allows the browser's built-in page search to find and expand the panel contents. Overrides the `keep_mounted` prop and uses `hidden="until-found"` to hide the element without removing it from the DOM. Defaults to False. multiple: Whether multiple items can be open at the same time. Defaults to True. disabled: Whether the component should ignore user interaction. Defaults to False. - loop: Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True. + loop_focus: Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True. orientation: The visual orientation of the accordion. Controls whether roving focus uses left/right or up/down arrow keys. Defaults to 'vertical'. keep_mounted: Whether to keep the element in the DOM while the panel is closed. This prop is ignored when hidden_until_found is used. Defaults to False. render_: The render prop. diff --git a/reflex_ui/components/base/avatar.py b/reflex_ui/components/base/avatar.py index 6ef3bfc..2a7189f 100644 --- a/reflex_ui/components/base/avatar.py +++ b/reflex_ui/components/base/avatar.py @@ -44,7 +44,7 @@ def create(cls, *children, **props) -> BaseUIComponent: class AvatarImage(AvatarBaseComponent): - """The image to be displayed in the avatar.""" + """The image to be displayed in the avatar. Renders an element.""" tag = "Avatar.Image" diff --git a/reflex_ui/components/base/button.py b/reflex_ui/components/base/button.py index 0475607..c053f6d 100644 --- a/reflex_ui/components/base/button.py +++ b/reflex_ui/components/base/button.py @@ -16,7 +16,7 @@ "xs", "sm", "md", "lg", "xl", "icon-xs", "icon-sm", "icon-md", "icon-lg", "icon-xl" ] -DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 shrink-0 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-medium cursor-pointer box-border" +DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 cursor-pointer box-border" BUTTON_VARIANTS = { "variant": { diff --git a/reflex_ui/components/base/button.pyi b/reflex_ui/components/base/button.pyi index 7e8817a..822dc55 100644 --- a/reflex_ui/components/base/button.pyi +++ b/reflex_ui/components/base/button.pyi @@ -19,7 +19,7 @@ LiteralButtonVariant = Literal[ LiteralButtonSize = Literal[ "xs", "sm", "md", "lg", "xl", "icon-xs", "icon-sm", "icon-md", "icon-lg", "icon-xl" ] -DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 shrink-0 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-medium cursor-pointer box-border" +DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 cursor-pointer box-border" BUTTON_VARIANTS = { "variant": { "primary": "bg-primary-9 text-primary-contrast hover:bg-primary-10", diff --git a/reflex_ui/components/base/checkbox.py b/reflex_ui/components/base/checkbox.py index 561cc1a..d29ef5c 100644 --- a/reflex_ui/components/base/checkbox.py +++ b/reflex_ui/components/base/checkbox.py @@ -69,6 +69,9 @@ class CheckboxRoot(CheckboxBaseComponent): # Whether the user should be unable to tick or untick the checkbox. Defaults to False. read_only: Var[bool] + # The value of the checkbox when it is unchecked. Used for form submission when unchecked. Defaults to not submitting any value. + unchecked_value: Var[str] + @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the checkbox root component.""" diff --git a/reflex_ui/components/base/checkbox.pyi b/reflex_ui/components/base/checkbox.pyi index bcdce19..7c8cb1d 100644 --- a/reflex_ui/components/base/checkbox.pyi +++ b/reflex_ui/components/base/checkbox.pyi @@ -87,6 +87,7 @@ class CheckboxRoot(CheckboxBaseComponent): native_button: Var[bool] | bool | None = None, parent: Var[bool] | bool | None = None, read_only: Var[bool] | bool | None = None, + unchecked_value: Var[str] | str | None = None, unstyled: Var[bool] | bool | None = None, style: Sequence[Mapping[str, Any]] | Mapping[str, Any] @@ -173,6 +174,7 @@ class HighLevelCheckbox(CheckboxRoot): native_button: Var[bool] | bool | None = None, parent: Var[bool] | bool | None = None, read_only: Var[bool] | bool | None = None, + unchecked_value: Var[str] | str | None = None, unstyled: Var[bool] | bool | None = None, style: Sequence[Mapping[str, Any]] | Mapping[str, Any] @@ -221,6 +223,7 @@ class HighLevelCheckbox(CheckboxRoot): native_button: Whether the component renders a native