Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion reflex_ui/components/base/accordion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
10 changes: 5 additions & 5 deletions reflex_ui/components/base/accordion.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion reflex_ui/components/base/avatar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <img> element."""

tag = "Avatar.Image"

Expand Down
2 changes: 1 addition & 1 deletion reflex_ui/components/base/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion reflex_ui/components/base/button.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions reflex_ui/components/base/checkbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
5 changes: 5 additions & 0 deletions reflex_ui/components/base/checkbox.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -221,6 +223,7 @@ class HighLevelCheckbox(CheckboxRoot):
native_button: Whether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (e.g. <div>). Defaults to True.
parent: Whether the checkbox controls a group of child checkboxes. Must be used in a Checkbox Group. Defaults to False.
read_only: Whether the user should be unable to tick or untick the checkbox. Defaults to False.
unchecked_value: The value of the checkbox when it is unchecked. Used for form submission when unchecked. Defaults to not submitting any value.
unstyled: Whether the component should be unstyled
style: The style of the component.
key: A unique key for the component.
Expand Down Expand Up @@ -253,6 +256,7 @@ class CheckboxNamespace(ComponentNamespace):
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]
Expand Down Expand Up @@ -301,6 +305,7 @@ class CheckboxNamespace(ComponentNamespace):
native_button: Whether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (e.g. <div>). Defaults to True.
parent: Whether the checkbox controls a group of child checkboxes. Must be used in a Checkbox Group. Defaults to False.
read_only: Whether the user should be unable to tick or untick the checkbox. Defaults to False.
unchecked_value: The value of the checkbox when it is unchecked. Used for form submission when unchecked. Defaults to not submitting any value.
unstyled: Whether the component should be unstyled
style: The style of the component.
key: A unique key for the component.
Expand Down
12 changes: 6 additions & 6 deletions reflex_ui/components/base/context_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ class ContextMenuRoot(ContextMenuBaseComponent):
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]

# Whether keyboard navigation should loop around when reaching the end of the items. Defaults to True.
loop: 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_focus: Var[bool]

# The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
orientation: Var[LiteralMenuOrientation]
Expand Down Expand Up @@ -190,8 +190,8 @@ class ContextMenuPositioner(ContextMenuBaseComponent):
# Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults to False.
sticky: Var[bool]

# Whether the popup tracks any layout shift of its positioning anchor. Defaults to True.
track_anchor: Var[bool]
# Whether to disable the popup tracking any layout shift of its positioning anchor. Defaults to False.
disable_anchor_tracking: Var[bool]

# Determines which CSS position property to use. Defaults to "absolute".
position_method: Var[LiteralPositionMethod]
Expand Down Expand Up @@ -487,7 +487,7 @@ class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
close_delay: Var[int]

# 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 submenu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
orientation: Var[LiteralMenuOrientation]
Expand Down Expand Up @@ -546,7 +546,7 @@ class HighLevelContextMenu(ContextMenuRoot):
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"disable_anchor_tracking",
"side_offset",
"collision_avoidance",
"collision_boundary",
Expand Down
14 changes: 7 additions & 7 deletions reflex_ui/components/base/context_menu.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class ContextMenuRoot(ContextMenuBaseComponent):
actions_ref: Var[str] | str | None = None,
close_parent_on_esc: 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,
Expand Down Expand Up @@ -287,7 +287,7 @@ class ContextMenuPositioner(ContextMenuBaseComponent):
collision_padding: Var[int] | int | None = None,
collision_boundary: Var[str] | str | None = None,
sticky: Var[bool] | bool | None = None,
track_anchor: Var[bool] | bool | None = None,
disable_anchor_tracking: Var[bool] | bool | None = None,
position_method: Literal["absolute", "fixed"]
| Var[Literal["absolute", "fixed"]]
| None = None,
Expand Down Expand Up @@ -774,7 +774,7 @@ class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
open_on_hover: Var[bool] | bool | None = None,
delay: Var[int] | int | None = None,
close_delay: Var[int] | int | 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,
Expand Down Expand Up @@ -871,7 +871,7 @@ class HighLevelContextMenu(ContextMenuRoot):
actions_ref: Var[str] | str | None = None,
close_parent_on_esc: 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,
Expand Down Expand Up @@ -923,7 +923,7 @@ class HighLevelContextMenu(ContextMenuRoot):
close_parent_on_esc: When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. Defaults to True.
on_open_change_complete: Event handler called after any animations complete when the context menu is closed.
disabled: Whether the component should ignore user interaction. Defaults to False.
loop: Whether keyboard navigation should loop around when reaching the end of the items. 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 menu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
unstyled: Whether the component should be unstyled
style: The style of the component.
Expand Down Expand Up @@ -974,7 +974,7 @@ class ContextMenu(ComponentNamespace):
actions_ref: Var[str] | str | None = None,
close_parent_on_esc: 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,
Expand Down Expand Up @@ -1026,7 +1026,7 @@ class ContextMenu(ComponentNamespace):
close_parent_on_esc: When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. Defaults to True.
on_open_change_complete: Event handler called after any animations complete when the context menu is closed.
disabled: Whether the component should ignore user interaction. Defaults to False.
loop: Whether keyboard navigation should loop around when reaching the end of the items. 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 menu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
unstyled: Whether the component should be unstyled
style: The style of the component.
Expand Down
4 changes: 2 additions & 2 deletions reflex_ui/components/base/dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class DialogRoot(DialogBaseComponent):
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]

# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines whether pointer dismissal (clicking outside) is disabled. Defaults to False.
disable_pointer_dismissal: Var[bool]

# Determines if the dialog enters a modal state when open.
# - True: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled.
Expand Down
6 changes: 3 additions & 3 deletions reflex_ui/components/base/dialog.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class DialogRoot(DialogBaseComponent):
*children,
default_open: Var[bool] | bool | None = None,
open: Var[bool] | bool | None = None,
dismissible: Var[bool] | bool | None = None,
disable_pointer_dismissal: Var[bool] | bool | None = None,
modal: Literal["trap-focus"]
| Var[Literal["trap-focus"] | bool]
| bool
Expand Down Expand Up @@ -417,7 +417,7 @@ class HighLevelDialog(DialogRoot):
description: Component | Var[Component | str | None] | str | None = None,
default_open: Var[bool] | bool | None = None,
open: Var[bool] | bool | None = None,
dismissible: Var[bool] | bool | None = None,
disable_pointer_dismissal: Var[bool] | bool | None = None,
modal: Literal["trap-focus"]
| Var[Literal["trap-focus"] | bool]
| bool
Expand Down Expand Up @@ -478,7 +478,7 @@ class Dialog(ComponentNamespace):
description: Component | Var[Component | str | None] | str | None = None,
default_open: Var[bool] | bool | None = None,
open: Var[bool] | bool | None = None,
dismissible: Var[bool] | bool | None = None,
disable_pointer_dismissal: Var[bool] | bool | None = None,
modal: Literal["trap-focus"]
| Var[Literal["trap-focus"] | bool]
| bool
Expand Down
Loading