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
1 change: 1 addition & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pyi
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fail_fast: true

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
rev: v0.14.1
hooks:
- id: ruff-check
files: ^reflex_ui/
Expand Down
2 changes: 1 addition & 1 deletion reflex_ui/components/base/accordion.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class AccordionRoot(AccordionBaseComponent):
hidden_until_found: Var[bool]

# Whether multiple items can be open at the same time. Defaults to True.
open_multiple: Var[bool]
multiple: Var[bool]

# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
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 @@ -86,7 +86,7 @@ class AccordionRoot(AccordionBaseComponent):
default_value: Var[list[Any]] | list[Any] | None = None,
value: Var[list[Any]] | list[Any] | None = None,
hidden_until_found: Var[bool] | bool | None = None,
open_multiple: Var[bool] | bool | None = None,
multiple: Var[bool] | bool | None = None,
disabled: Var[bool] | bool | None = None,
loop: Var[bool] | bool | None = None,
orientation: Literal["horizontal", "vertical"]
Expand Down Expand Up @@ -291,7 +291,7 @@ class HighLevelAccordion(AccordionRoot):
default_value: Var[list[Any]] | list[Any] | None = None,
value: Var[list[Any]] | list[Any] | None = None,
hidden_until_found: Var[bool] | bool | None = None,
open_multiple: Var[bool] | bool | None = None,
multiple: Var[bool] | bool | None = None,
disabled: Var[bool] | bool | None = None,
loop: Var[bool] | bool | None = None,
orientation: Literal["horizontal", "vertical"]
Expand Down Expand Up @@ -337,7 +337,7 @@ class HighLevelAccordion(AccordionRoot):
value: The controlled value of the item(s) that should be expanded. To render an uncontrolled accordion, use the `default_value` prop instead.
on_value_change: Event handler called when an accordion item is expanded or collapsed. Provides the new value as an argument.
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.
open_multiple: Whether multiple items can be open at the same time. Defaults to True.
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.
orientation: The visual orientation of the accordion. Controls whether roving focus uses left/right or up/down arrow keys. Defaults to 'vertical'.
Expand Down Expand Up @@ -373,7 +373,7 @@ class Accordion(ComponentNamespace):
default_value: Var[list[Any]] | list[Any] | None = None,
value: Var[list[Any]] | list[Any] | None = None,
hidden_until_found: Var[bool] | bool | None = None,
open_multiple: Var[bool] | bool | None = None,
multiple: Var[bool] | bool | None = None,
disabled: Var[bool] | bool | None = None,
loop: Var[bool] | bool | None = None,
orientation: Literal["horizontal", "vertical"]
Expand Down Expand Up @@ -419,7 +419,7 @@ class Accordion(ComponentNamespace):
value: The controlled value of the item(s) that should be expanded. To render an uncontrolled accordion, use the `default_value` prop instead.
on_value_change: Event handler called when an accordion item is expanded or collapsed. Provides the new value as an argument.
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.
open_multiple: Whether multiple items can be open at the same time. Defaults to True.
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.
orientation: The visual orientation of the accordion. Controls whether roving focus uses left/right or up/down arrow keys. Defaults to 'vertical'.
Expand Down
5 changes: 3 additions & 2 deletions reflex_ui/components/base/badge.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ class Badge(Span, CoreComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down
5 changes: 3 additions & 2 deletions reflex_ui/components/base/button.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ class Button(BaseButton, CoreComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down
45 changes: 27 additions & 18 deletions reflex_ui/components/base/card.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ class CardComponent(Div, CoreComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down Expand Up @@ -278,8 +279,9 @@ class CardRoot(CardComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down Expand Up @@ -492,8 +494,9 @@ class CardHeader(CardComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down Expand Up @@ -706,8 +709,9 @@ class CardTitle(CardComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down Expand Up @@ -920,8 +924,9 @@ class CardDescription(CardComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down Expand Up @@ -1134,8 +1139,9 @@ class CardContent(CardComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down Expand Up @@ -1348,8 +1354,9 @@ class CardFooter(CardComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down Expand Up @@ -1566,8 +1573,9 @@ class HighLevelCard(CardComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down Expand Up @@ -1790,8 +1798,9 @@ class Card(ComponentNamespace):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down
10 changes: 6 additions & 4 deletions reflex_ui/components/base/input.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ class InputRoot(InputBaseComponent, ReflexInput):
alt: Var[str] | str | None = None,
auto_complete: Var[str] | str | None = None,
auto_focus: Var[bool] | bool | None = None,
capture: Literal["environment", "user", False, True]
| Var[Literal["environment", "user", False, True]]
capture: Literal["environment", "user"]
| Var[Literal["environment", "user"] | bool]
| bool
| None = None,
checked: Var[bool] | bool | None = None,
default_checked: Var[bool] | bool | None = None,
Expand Down Expand Up @@ -182,8 +183,9 @@ class InputRoot(InputBaseComponent, ReflexInput):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down
5 changes: 3 additions & 2 deletions reflex_ui/components/base/link.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ class Link(ReactRouterLink):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down
16 changes: 16 additions & 0 deletions reflex_ui/components/base/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,21 @@ def create(cls, *children, **props) -> BaseUIComponent:
return super().create(*children, **props)


class SelectList(SelectBaseComponent):
"""A list component that wraps select items. Renders a <div> element."""

tag = "Select.List"

# The render prop
render_: Var[Component]

@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the select list component."""
props["data-slot"] = "select-list"
return super().create(*children, **props)


class SelectItem(SelectBaseComponent):
"""An individual option in the select menu."""

Expand Down Expand Up @@ -576,6 +591,7 @@ class Select(ComponentNamespace):
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
Expand Down
38 changes: 38 additions & 0 deletions reflex_ui/components/base/select.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,43 @@ class SelectPopup(SelectBaseComponent):
) -> SelectPopup:
"""Create the dialog trigger component."""

class SelectList(SelectBaseComponent):
@classmethod
def create(
cls,
*children,
render_: Component | Var[Component] | None = None,
unstyled: Var[bool] | bool | None = None,
style: Sequence[Mapping[str, Any]]
| Mapping[str, Any]
| Var[Mapping[str, Any]]
| Breakpoints
| None = None,
key: Any | None = None,
id: Any | None = None,
ref: Var | None = None,
class_name: Any | None = None,
custom_attrs: dict[str, Var | Any] | None = None,
on_blur: EventType[()] | None = None,
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
on_focus: EventType[()] | None = None,
on_mount: EventType[()] | None = None,
on_mouse_down: EventType[()] | None = None,
on_mouse_enter: EventType[()] | None = None,
on_mouse_leave: EventType[()] | None = None,
on_mouse_move: EventType[()] | None = None,
on_mouse_out: EventType[()] | None = None,
on_mouse_over: EventType[()] | None = None,
on_mouse_up: EventType[()] | None = None,
on_scroll: EventType[()] | None = None,
on_scroll_end: EventType[()] | None = None,
on_unmount: EventType[()] | None = None,
**props,
) -> SelectList:
"""Create the select list component."""

class SelectItem(SelectBaseComponent):
@classmethod
def create(
Expand Down Expand Up @@ -898,6 +935,7 @@ class Select(ComponentNamespace):
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
Expand Down
5 changes: 3 additions & 2 deletions reflex_ui/components/base/textarea.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ class Textarea(TextareaComponent, CoreComponent):
]
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
content_editable: Literal["inherit", "plaintext-only"]
| Var[Literal["inherit", "plaintext-only"] | bool]
| bool
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
Expand Down
2 changes: 1 addition & 1 deletion reflex_ui/components/base_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from reflex_ui.components.component import CoreComponent

PACKAGE_NAME = "@base-ui-components/react"
PACKAGE_VERSION = "1.0.0-beta.3"
PACKAGE_VERSION = "1.0.0-beta.4"


class BaseUIComponent(CoreComponent):
Expand Down
2 changes: 1 addition & 1 deletion reflex_ui/components/base_ui.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent

PACKAGE_NAME = "@base-ui-components/react"
PACKAGE_VERSION = "1.0.0-beta.3"
PACKAGE_VERSION = "1.0.0-beta.4"

class BaseUIComponent(CoreComponent):
@classmethod
Expand Down
2 changes: 1 addition & 1 deletion reflex_ui/components/icons/hugeicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def create(cls, *children, **props) -> Component:
icon_name,
_var_data=VarData(
imports={
"@hugeicons/core-free-icons@1.1.0": ImportVar(tag=icon_name)
"@hugeicons/core-free-icons@1.2.1": ImportVar(tag=icon_name)
}
),
)
Expand Down
5 changes: 4 additions & 1 deletion reflex_ui/components/icons/simple_icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
class SimpleIcon(rx.Component):
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""

library = "@icons-pack/react-simple-icons"
library = "@icons-pack/react-simple-icons@13.8.0"

tag = "SiReact"

# The color of the icon
color: rx.Var[str]

# The size of the icon
size: rx.Var[int | str]

@classmethod
Expand Down
2 changes: 2 additions & 0 deletions reflex_ui/components/icons/simple_icon.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class SimpleIcon(rx.Component):
Args:
icon_name: The icon component name (e.g., "SiReact", "SiGithub", "SiPython")
color: The color of the icon
size: The size of the icon
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
Expand Down
Loading