parent
670faf291a
commit
d68de02bc8
1
.github/workflows/integration_tests.yml
vendored
1
.github/workflows/integration_tests.yml
vendored
@ -101,6 +101,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Show OS combos first in GUI
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
python-version: [ "3.10.10", "3.11.4" ]
|
||||
node-version: [ "16.x" ]
|
||||
|
@ -7,8 +7,6 @@ from reflex.vars import Var
|
||||
class Badge(ChakraComponent):
|
||||
"""A badge component."""
|
||||
|
||||
library = "@chakra-ui/layout@2.3.1"
|
||||
|
||||
tag = "Badge"
|
||||
|
||||
# Variant of the badge ("solid" | "subtle" | "outline")
|
||||
|
@ -518,6 +518,4 @@ class CodeBlock(Component):
|
||||
class Code(ChakraComponent):
|
||||
"""Used to display inline code."""
|
||||
|
||||
library = "@chakra-ui/layout@2.3.1"
|
||||
|
||||
tag = "Code"
|
||||
|
@ -10,8 +10,6 @@ LiteralLayout = Literal["horizontal", "vertical"]
|
||||
class Divider(ChakraComponent):
|
||||
"""Dividers are used to visually separate content in a list or group."""
|
||||
|
||||
library = "@chakra-ui/layout@2.3.1"
|
||||
|
||||
tag = "Divider"
|
||||
|
||||
# Pass the orientation prop and set it to either horizontal or vertical. If the vertical orientation is used, make sure that the parent element is assigned a height.
|
||||
|
@ -6,6 +6,4 @@ from reflex.components.chakra import ChakraComponent
|
||||
class KeyboardKey(ChakraComponent):
|
||||
"""Display a keyboard key text."""
|
||||
|
||||
library = "@chakra-ui/layout@2.3.1"
|
||||
|
||||
tag = "Kbd"
|
||||
|
@ -8,13 +8,7 @@ from reflex.components.core.foreach import Foreach
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseList(ChakraComponent):
|
||||
"""The base class for all Chakra list components."""
|
||||
|
||||
library = "@chakra-ui/layout@2.3.1"
|
||||
|
||||
|
||||
class List(BaseList):
|
||||
class List(ChakraComponent):
|
||||
"""Display a list of items."""
|
||||
|
||||
tag = "List"
|
||||
@ -50,7 +44,7 @@ class List(BaseList):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class ListItem(BaseList):
|
||||
class ListItem(ChakraComponent):
|
||||
"""A single list item."""
|
||||
|
||||
tag = "ListItem"
|
||||
|
@ -12,86 +12,7 @@ from reflex.components.component import Component
|
||||
from reflex.components.core.foreach import Foreach
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseList(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseList":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class List(BaseList):
|
||||
class List(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -175,7 +96,7 @@ class List(BaseList):
|
||||
"""
|
||||
...
|
||||
|
||||
class ListItem(BaseList):
|
||||
class ListItem(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -5,13 +5,7 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseStat(ChakraComponent):
|
||||
"""The base class for all stat components."""
|
||||
|
||||
library = "@chakra-ui/stat@2.1.0"
|
||||
|
||||
|
||||
class Stat(BaseStat):
|
||||
class Stat(ChakraComponent):
|
||||
"""The Stat component is used to display some statistics. It can take in a label, a number and a help text."""
|
||||
|
||||
tag = "Stat"
|
||||
@ -53,25 +47,25 @@ class Stat(BaseStat):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class StatLabel(BaseStat):
|
||||
class StatLabel(ChakraComponent):
|
||||
"""A stat label component."""
|
||||
|
||||
tag = "StatLabel"
|
||||
|
||||
|
||||
class StatNumber(BaseStat):
|
||||
class StatNumber(ChakraComponent):
|
||||
"""The stat to display."""
|
||||
|
||||
tag = "StatNumber"
|
||||
|
||||
|
||||
class StatHelpText(BaseStat):
|
||||
class StatHelpText(ChakraComponent):
|
||||
"""A helper text to display under the stat."""
|
||||
|
||||
tag = "StatHelpText"
|
||||
|
||||
|
||||
class StatArrow(BaseStat):
|
||||
class StatArrow(ChakraComponent):
|
||||
"""A stat arrow component indicating the direction of change."""
|
||||
|
||||
tag = "StatArrow"
|
||||
@ -80,7 +74,7 @@ class StatArrow(BaseStat):
|
||||
type_: Var[str]
|
||||
|
||||
|
||||
class StatGroup(BaseStat):
|
||||
class StatGroup(ChakraComponent):
|
||||
"""A stat group component to evenly space out the stats."""
|
||||
|
||||
tag = "StatGroup"
|
||||
|
@ -11,86 +11,7 @@ from reflex.components.chakra import ChakraComponent
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseStat(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseStat":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Stat(BaseStat):
|
||||
class Stat(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -174,7 +95,7 @@ class Stat(BaseStat):
|
||||
"""
|
||||
...
|
||||
|
||||
class StatLabel(BaseStat):
|
||||
class StatLabel(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -253,7 +174,7 @@ class StatLabel(BaseStat):
|
||||
"""
|
||||
...
|
||||
|
||||
class StatNumber(BaseStat):
|
||||
class StatNumber(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -332,7 +253,7 @@ class StatNumber(BaseStat):
|
||||
"""
|
||||
...
|
||||
|
||||
class StatHelpText(BaseStat):
|
||||
class StatHelpText(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -411,7 +332,7 @@ class StatHelpText(BaseStat):
|
||||
"""
|
||||
...
|
||||
|
||||
class StatArrow(BaseStat):
|
||||
class StatArrow(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -492,7 +413,7 @@ class StatArrow(BaseStat):
|
||||
"""
|
||||
...
|
||||
|
||||
class StatGroup(BaseStat):
|
||||
class StatGroup(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -8,13 +8,7 @@ from reflex.utils import types
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseTable(ChakraComponent):
|
||||
"""The base class for all Chakra table components."""
|
||||
|
||||
library = "@chakra-ui/table@2.1.0"
|
||||
|
||||
|
||||
class Table(BaseTable):
|
||||
class Table(ChakraComponent):
|
||||
"""A table component."""
|
||||
|
||||
tag = "Table"
|
||||
@ -65,7 +59,7 @@ class Table(BaseTable):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class Thead(BaseTable):
|
||||
class Thead(ChakraComponent):
|
||||
"""A table header component."""
|
||||
|
||||
tag = "Thead"
|
||||
@ -117,7 +111,7 @@ class Thead(BaseTable):
|
||||
raise TypeError("table headers should be a list or tuple")
|
||||
|
||||
|
||||
class Tbody(BaseTable):
|
||||
class Tbody(ChakraComponent):
|
||||
"""A table body component."""
|
||||
|
||||
tag = "Tbody"
|
||||
@ -191,7 +185,7 @@ class Tbody(BaseTable):
|
||||
)
|
||||
|
||||
|
||||
class Tfoot(BaseTable):
|
||||
class Tfoot(ChakraComponent):
|
||||
"""A table footer component."""
|
||||
|
||||
tag = "Tfoot"
|
||||
@ -240,7 +234,7 @@ class Tfoot(BaseTable):
|
||||
raise TypeError("table headers should be a list or tuple")
|
||||
|
||||
|
||||
class Tr(BaseTable):
|
||||
class Tr(ChakraComponent):
|
||||
"""A table row component."""
|
||||
|
||||
tag = "Tr"
|
||||
@ -271,7 +265,7 @@ class Tr(BaseTable):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class Th(BaseTable):
|
||||
class Th(ChakraComponent):
|
||||
"""A table header cell component."""
|
||||
|
||||
tag = "Th"
|
||||
@ -283,7 +277,7 @@ class Th(BaseTable):
|
||||
is_numeric: Var[bool]
|
||||
|
||||
|
||||
class Td(BaseTable):
|
||||
class Td(ChakraComponent):
|
||||
"""A table data cell component."""
|
||||
|
||||
tag = "Td"
|
||||
@ -295,7 +289,7 @@ class Td(BaseTable):
|
||||
is_numeric: Var[bool]
|
||||
|
||||
|
||||
class TableCaption(BaseTable):
|
||||
class TableCaption(ChakraComponent):
|
||||
"""A table caption component."""
|
||||
|
||||
tag = "TableCaption"
|
||||
@ -304,7 +298,7 @@ class TableCaption(BaseTable):
|
||||
placement: Var[str]
|
||||
|
||||
|
||||
class TableContainer(BaseTable):
|
||||
class TableContainer(ChakraComponent):
|
||||
"""The table container component renders a div that wraps the table component."""
|
||||
|
||||
tag = "TableContainer"
|
||||
|
@ -14,86 +14,7 @@ from reflex.components.core.foreach import Foreach
|
||||
from reflex.utils import types
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseTable(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseTable":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Table(BaseTable):
|
||||
class Table(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -185,7 +106,7 @@ class Table(BaseTable):
|
||||
"""
|
||||
...
|
||||
|
||||
class Thead(BaseTable):
|
||||
class Thead(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -266,7 +187,7 @@ class Thead(BaseTable):
|
||||
@staticmethod
|
||||
def validate_headers(headers): ...
|
||||
|
||||
class Tbody(BaseTable):
|
||||
class Tbody(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -346,7 +267,7 @@ class Tbody(BaseTable):
|
||||
@staticmethod
|
||||
def validate_rows(rows): ...
|
||||
|
||||
class Tfoot(BaseTable):
|
||||
class Tfoot(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -426,7 +347,7 @@ class Tfoot(BaseTable):
|
||||
@staticmethod
|
||||
def validate_footers(footers): ...
|
||||
|
||||
class Tr(BaseTable):
|
||||
class Tr(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -506,7 +427,7 @@ class Tr(BaseTable):
|
||||
"""
|
||||
...
|
||||
|
||||
class Th(BaseTable):
|
||||
class Th(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -587,7 +508,7 @@ class Th(BaseTable):
|
||||
"""
|
||||
...
|
||||
|
||||
class Td(BaseTable):
|
||||
class Td(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -668,7 +589,7 @@ class Td(BaseTable):
|
||||
"""
|
||||
...
|
||||
|
||||
class TableCaption(BaseTable):
|
||||
class TableCaption(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -749,7 +670,7 @@ class TableCaption(BaseTable):
|
||||
"""
|
||||
...
|
||||
|
||||
class TableContainer(BaseTable):
|
||||
class TableContainer(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -11,37 +11,31 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseTag(ChakraComponent):
|
||||
"""The base tag component."""
|
||||
|
||||
library = "@chakra-ui/tag@3.1.1"
|
||||
|
||||
|
||||
class TagLabel(BaseTag):
|
||||
class TagLabel(ChakraComponent):
|
||||
"""The label of the tag."""
|
||||
|
||||
tag = "TagLabel"
|
||||
|
||||
|
||||
class TagLeftIcon(BaseTag):
|
||||
class TagLeftIcon(ChakraComponent):
|
||||
"""The left icon of the tag."""
|
||||
|
||||
tag = "TagLeftIcon"
|
||||
|
||||
|
||||
class TagRightIcon(BaseTag):
|
||||
class TagRightIcon(ChakraComponent):
|
||||
"""The right icon of the tag."""
|
||||
|
||||
tag = "TagRightIcon"
|
||||
|
||||
|
||||
class TagCloseButton(BaseTag):
|
||||
class TagCloseButton(ChakraComponent):
|
||||
"""The close button of the tag."""
|
||||
|
||||
tag = "TagCloseButton"
|
||||
|
||||
|
||||
class Tag(BaseTag):
|
||||
class Tag(ChakraComponent):
|
||||
"""The parent wrapper that provides context for its children."""
|
||||
|
||||
tag = "Tag"
|
||||
|
@ -17,86 +17,7 @@ from reflex.components.chakra import (
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseTag(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseTag":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class TagLabel(BaseTag):
|
||||
class TagLabel(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -175,7 +96,7 @@ class TagLabel(BaseTag):
|
||||
"""
|
||||
...
|
||||
|
||||
class TagLeftIcon(BaseTag):
|
||||
class TagLeftIcon(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -254,7 +175,7 @@ class TagLeftIcon(BaseTag):
|
||||
"""
|
||||
...
|
||||
|
||||
class TagRightIcon(BaseTag):
|
||||
class TagRightIcon(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -333,7 +254,7 @@ class TagRightIcon(BaseTag):
|
||||
"""
|
||||
...
|
||||
|
||||
class TagCloseButton(BaseTag):
|
||||
class TagCloseButton(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -412,7 +333,7 @@ class TagCloseButton(BaseTag):
|
||||
"""
|
||||
...
|
||||
|
||||
class Tag(BaseTag):
|
||||
class Tag(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -7,13 +7,7 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseAccordion(ChakraComponent):
|
||||
"""The base accordion component."""
|
||||
|
||||
library = "@chakra-ui/accordion@2.3.1"
|
||||
|
||||
|
||||
class Accordion(BaseAccordion):
|
||||
class Accordion(ChakraComponent):
|
||||
"""The wrapper that uses cloneElement to pass props to AccordionItem children."""
|
||||
|
||||
tag = "Accordion"
|
||||
@ -83,7 +77,7 @@ class Accordion(BaseAccordion):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class AccordionItem(BaseAccordion):
|
||||
class AccordionItem(ChakraComponent):
|
||||
"""A single accordion item."""
|
||||
|
||||
tag = "AccordionItem"
|
||||
@ -98,19 +92,19 @@ class AccordionItem(BaseAccordion):
|
||||
is_focusable: Var[bool]
|
||||
|
||||
|
||||
class AccordionButton(BaseAccordion):
|
||||
class AccordionButton(ChakraComponent):
|
||||
"""The button that toggles the expand/collapse state of the accordion item. This button must be wrapped in an element with role heading."""
|
||||
|
||||
tag = "AccordionButton"
|
||||
|
||||
|
||||
class AccordionPanel(BaseAccordion):
|
||||
class AccordionPanel(ChakraComponent):
|
||||
"""The container for the details to be revealed."""
|
||||
|
||||
tag = "AccordionPanel"
|
||||
|
||||
|
||||
class AccordionIcon(BaseAccordion):
|
||||
class AccordionIcon(ChakraComponent):
|
||||
"""A chevron-down icon that rotates based on the expanded/collapsed state."""
|
||||
|
||||
tag = "AccordionIcon"
|
||||
|
@ -12,86 +12,7 @@ from reflex.components.chakra import ChakraComponent
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseAccordion(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseAccordion":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Accordion(BaseAccordion):
|
||||
class Accordion(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -185,7 +106,7 @@ class Accordion(BaseAccordion):
|
||||
"""
|
||||
...
|
||||
|
||||
class AccordionItem(BaseAccordion):
|
||||
class AccordionItem(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -270,7 +191,7 @@ class AccordionItem(BaseAccordion):
|
||||
"""
|
||||
...
|
||||
|
||||
class AccordionButton(BaseAccordion):
|
||||
class AccordionButton(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -349,7 +270,7 @@ class AccordionButton(BaseAccordion):
|
||||
"""
|
||||
...
|
||||
|
||||
class AccordionPanel(BaseAccordion):
|
||||
class AccordionPanel(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -428,7 +349,7 @@ class AccordionPanel(BaseAccordion):
|
||||
"""
|
||||
...
|
||||
|
||||
class AccordionIcon(BaseAccordion):
|
||||
class AccordionIcon(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -12,13 +12,7 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseTabs(ChakraComponent):
|
||||
"""The base tabs component."""
|
||||
|
||||
library = "@chakra-ui/tabs@3.0.0"
|
||||
|
||||
|
||||
class Tabs(BaseTabs):
|
||||
class Tabs(ChakraComponent):
|
||||
"""An accessible tabs component that provides keyboard interactions and ARIA attributes described in the WAI-ARIA Tabs Design Pattern. Tabs, provides context and state for all components."""
|
||||
|
||||
tag = "Tabs"
|
||||
@ -79,7 +73,7 @@ class Tabs(BaseTabs):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class Tab(BaseTabs):
|
||||
class Tab(ChakraComponent):
|
||||
"""An element that serves as a label for one of the tab panels and can be activated to display that panel.."""
|
||||
|
||||
tag = "Tab"
|
||||
@ -97,19 +91,19 @@ class Tab(BaseTabs):
|
||||
panel_id: Var[str]
|
||||
|
||||
|
||||
class TabList(BaseTabs):
|
||||
class TabList(ChakraComponent):
|
||||
"""Wrapper for the Tab components."""
|
||||
|
||||
tag = "TabList"
|
||||
|
||||
|
||||
class TabPanels(BaseTabs):
|
||||
class TabPanels(ChakraComponent):
|
||||
"""Wrapper for the Tab components."""
|
||||
|
||||
tag = "TabPanels"
|
||||
|
||||
|
||||
class TabPanel(BaseTabs):
|
||||
class TabPanel(ChakraComponent):
|
||||
"""An element that contains the content associated with a tab."""
|
||||
|
||||
tag = "TabPanel"
|
||||
|
@ -17,86 +17,7 @@ from reflex.components.chakra import (
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseTabs(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseTabs":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Tabs(BaseTabs):
|
||||
class Tabs(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -267,7 +188,7 @@ class Tabs(BaseTabs):
|
||||
"""
|
||||
...
|
||||
|
||||
class Tab(BaseTabs):
|
||||
class Tab(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -354,7 +275,7 @@ class Tab(BaseTabs):
|
||||
"""
|
||||
...
|
||||
|
||||
class TabList(BaseTabs):
|
||||
class TabList(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -433,7 +354,7 @@ class TabList(BaseTabs):
|
||||
"""
|
||||
...
|
||||
|
||||
class TabPanels(BaseTabs):
|
||||
class TabPanels(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -512,7 +433,7 @@ class TabPanels(BaseTabs):
|
||||
"""
|
||||
...
|
||||
|
||||
class TabPanel(BaseTabs):
|
||||
class TabPanel(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -5,13 +5,7 @@ from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseTransition(ChakraComponent):
|
||||
"""Base componemt of all chakra transitions."""
|
||||
|
||||
library = "@chakra-ui/transition@2.1.0"
|
||||
|
||||
|
||||
class Transition(BaseTransition):
|
||||
class Transition(ChakraComponent):
|
||||
"""Base componemt of all transitions."""
|
||||
|
||||
# Show the component; triggers when enter or exit states
|
||||
@ -21,13 +15,13 @@ class Transition(BaseTransition):
|
||||
unmount_on_exit: Var[bool]
|
||||
|
||||
|
||||
class Fade(BaseTransition):
|
||||
class Fade(Transition):
|
||||
"""Fade component cab be used show and hide content of your app."""
|
||||
|
||||
tag = "Fade"
|
||||
|
||||
|
||||
class ScaleFade(BaseTransition):
|
||||
class ScaleFade(Transition):
|
||||
"""Fade component can be scaled and reverse your app."""
|
||||
|
||||
tag = "ScaleFade"
|
||||
@ -39,7 +33,7 @@ class ScaleFade(BaseTransition):
|
||||
reverse: Var[bool]
|
||||
|
||||
|
||||
class Slide(BaseTransition):
|
||||
class Slide(Transition):
|
||||
"""Side can be used show content below your app."""
|
||||
|
||||
tag = "Slide"
|
||||
@ -48,7 +42,7 @@ class Slide(BaseTransition):
|
||||
direction: Var[str]
|
||||
|
||||
|
||||
class SlideFade(BaseTransition):
|
||||
class SlideFade(Transition):
|
||||
"""SlideFade component."""
|
||||
|
||||
tag = "SlideFade"
|
||||
@ -63,7 +57,7 @@ class SlideFade(BaseTransition):
|
||||
reverse: Var[bool]
|
||||
|
||||
|
||||
class Collapse(BaseTransition):
|
||||
class Collapse(Transition):
|
||||
"""Collapse component can collapse some content."""
|
||||
|
||||
tag = "Collapse"
|
||||
|
@ -11,86 +11,7 @@ from typing import Union
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseTransition(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseTransition":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Transition(BaseTransition):
|
||||
class Transition(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -173,12 +94,14 @@ class Transition(BaseTransition):
|
||||
"""
|
||||
...
|
||||
|
||||
class Fade(BaseTransition):
|
||||
class Fade(Transition):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
in_: Optional[Union[Var[bool], bool]] = None,
|
||||
unmount_on_exit: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -236,6 +159,8 @@ class Fade(BaseTransition):
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
in_: Show the component; triggers when enter or exit states
|
||||
unmount_on_exit: If true, the element will unmount when `in={false}` and animation is done
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
@ -252,7 +177,7 @@ class Fade(BaseTransition):
|
||||
"""
|
||||
...
|
||||
|
||||
class ScaleFade(BaseTransition):
|
||||
class ScaleFade(Transition):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -260,6 +185,8 @@ class ScaleFade(BaseTransition):
|
||||
*children,
|
||||
initial_scale: Optional[Union[Var[float], float]] = None,
|
||||
reverse: Optional[Union[Var[bool], bool]] = None,
|
||||
in_: Optional[Union[Var[bool], bool]] = None,
|
||||
unmount_on_exit: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -319,6 +246,8 @@ class ScaleFade(BaseTransition):
|
||||
*children: The children of the component.
|
||||
initial_scale: The initial scale of the element
|
||||
reverse: If true, the element will transition back to exit state
|
||||
in_: Show the component; triggers when enter or exit states
|
||||
unmount_on_exit: If true, the element will unmount when `in={false}` and animation is done
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
@ -335,13 +264,15 @@ class ScaleFade(BaseTransition):
|
||||
"""
|
||||
...
|
||||
|
||||
class Slide(BaseTransition):
|
||||
class Slide(Transition):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
direction: Optional[Union[Var[str], str]] = None,
|
||||
in_: Optional[Union[Var[bool], bool]] = None,
|
||||
unmount_on_exit: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -400,6 +331,8 @@ class Slide(BaseTransition):
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
direction: The direction to slide from
|
||||
in_: Show the component; triggers when enter or exit states
|
||||
unmount_on_exit: If true, the element will unmount when `in={false}` and animation is done
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
@ -416,7 +349,7 @@ class Slide(BaseTransition):
|
||||
"""
|
||||
...
|
||||
|
||||
class SlideFade(BaseTransition):
|
||||
class SlideFade(Transition):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -425,6 +358,8 @@ class SlideFade(BaseTransition):
|
||||
offsetX: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
|
||||
offsetY: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
|
||||
reverse: Optional[Union[Var[bool], bool]] = None,
|
||||
in_: Optional[Union[Var[bool], bool]] = None,
|
||||
unmount_on_exit: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -485,6 +420,8 @@ class SlideFade(BaseTransition):
|
||||
offsetX: The offset on the horizontal or x axis
|
||||
offsetY: The offset on the vertical or y axis
|
||||
reverse: If true, the element will be transitioned back to the offset when it leaves. Otherwise, it'll only fade out
|
||||
in_: Show the component; triggers when enter or exit states
|
||||
unmount_on_exit: If true, the element will unmount when `in={false}` and animation is done
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
@ -501,7 +438,7 @@ class SlideFade(BaseTransition):
|
||||
"""
|
||||
...
|
||||
|
||||
class Collapse(BaseTransition):
|
||||
class Collapse(Transition):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -510,6 +447,8 @@ class Collapse(BaseTransition):
|
||||
animateOpacity: Optional[Union[Var[bool], bool]] = None,
|
||||
endingHeight: Optional[Union[Var[str], str]] = None,
|
||||
startingHeight: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
|
||||
in_: Optional[Union[Var[bool], bool]] = None,
|
||||
unmount_on_exit: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -570,6 +509,8 @@ class Collapse(BaseTransition):
|
||||
animateOpacity: If true, the opacity of the content will be animated
|
||||
endingHeight: The height you want the content in its expanded state.
|
||||
startingHeight: The height you want the content in its collapsed state.
|
||||
in_: Show the component; triggers when enter or exit states
|
||||
unmount_on_exit: If true, the element will unmount when `in={false}` and animation is done
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
|
@ -6,6 +6,4 @@ from reflex.components.chakra import ChakraComponent
|
||||
class VisuallyHidden(ChakraComponent):
|
||||
"""A component that visually hides content while still allowing it to be read by screen readers."""
|
||||
|
||||
library = "@chakra-ui/visually-hidden@2.2.0"
|
||||
|
||||
tag = "VisuallyHidden"
|
||||
|
@ -9,13 +9,7 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseAlert(ChakraComponent):
|
||||
"""The base class for all alert components."""
|
||||
|
||||
library = "@chakra-ui/alert@2.2.2"
|
||||
|
||||
|
||||
class Alert(BaseAlert):
|
||||
class Alert(ChakraComponent):
|
||||
"""An alert feedback box."""
|
||||
|
||||
tag = "Alert"
|
||||
@ -56,19 +50,19 @@ class Alert(BaseAlert):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class AlertIcon(BaseAlert):
|
||||
class AlertIcon(ChakraComponent):
|
||||
"""An icon displayed in the alert."""
|
||||
|
||||
tag = "AlertIcon"
|
||||
|
||||
|
||||
class AlertTitle(BaseAlert):
|
||||
class AlertTitle(ChakraComponent):
|
||||
"""The title of the alert."""
|
||||
|
||||
tag = "AlertTitle"
|
||||
|
||||
|
||||
class AlertDescription(BaseAlert):
|
||||
class AlertDescription(ChakraComponent):
|
||||
"""AlertDescription composes the Box component."""
|
||||
|
||||
tag = "AlertDescription"
|
||||
|
@ -11,86 +11,7 @@ from reflex.components.chakra import ChakraComponent, LiteralAlertVariant, Liter
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseAlert(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseAlert":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Alert(BaseAlert):
|
||||
class Alert(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -186,7 +107,7 @@ class Alert(BaseAlert):
|
||||
"""
|
||||
...
|
||||
|
||||
class AlertIcon(BaseAlert):
|
||||
class AlertIcon(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -265,7 +186,7 @@ class AlertIcon(BaseAlert):
|
||||
"""
|
||||
...
|
||||
|
||||
class AlertTitle(BaseAlert):
|
||||
class AlertTitle(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -344,7 +265,7 @@ class AlertTitle(BaseAlert):
|
||||
"""
|
||||
...
|
||||
|
||||
class AlertDescription(BaseAlert):
|
||||
class AlertDescription(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -6,13 +6,7 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseCircularProgress(ChakraComponent):
|
||||
"""The base circular progress component."""
|
||||
|
||||
library = "@chakra-ui/progress@2.2.0"
|
||||
|
||||
|
||||
class CircularProgress(BaseCircularProgress):
|
||||
class CircularProgress(ChakraComponent):
|
||||
"""The CircularProgress component is used to indicate the progress for determinate and indeterminate processes."""
|
||||
|
||||
tag = "CircularProgress"
|
||||
@ -67,7 +61,7 @@ class CircularProgress(BaseCircularProgress):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class CircularProgressLabel(BaseCircularProgress):
|
||||
class CircularProgressLabel(ChakraComponent):
|
||||
"""Label of CircularProcess."""
|
||||
|
||||
tag = "CircularProgressLabel"
|
||||
|
@ -12,86 +12,7 @@ from reflex.components.chakra import ChakraComponent
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseCircularProgress(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseCircularProgress":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class CircularProgress(BaseCircularProgress):
|
||||
class CircularProgress(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -189,7 +110,7 @@ class CircularProgress(BaseCircularProgress):
|
||||
"""
|
||||
...
|
||||
|
||||
class CircularProgressLabel(BaseCircularProgress):
|
||||
class CircularProgressLabel(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -9,8 +9,6 @@ from reflex.vars import Var
|
||||
class Progress(ChakraComponent):
|
||||
"""A bar to display progress."""
|
||||
|
||||
library = "@chakra-ui/progress@2.2.0"
|
||||
|
||||
tag = "Progress"
|
||||
|
||||
# If true, the progress bar will show stripe
|
||||
|
@ -4,13 +4,7 @@ from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseSkeleton(ChakraComponent):
|
||||
"""The base skeleton component."""
|
||||
|
||||
library = "@chakra-ui/skeleton@2.1.0"
|
||||
|
||||
|
||||
class Skeleton(BaseSkeleton):
|
||||
class Skeleton(ChakraComponent):
|
||||
"""Skeleton is used to display the loading state of some components. You can use it as a standalone component. Or to wrap another component to take the same height and width."""
|
||||
|
||||
tag = "Skeleton"
|
||||
@ -31,7 +25,7 @@ class Skeleton(BaseSkeleton):
|
||||
start_color: Var[str]
|
||||
|
||||
|
||||
class SkeletonCircle(BaseSkeleton):
|
||||
class SkeletonCircle(ChakraComponent):
|
||||
"""SkeletonCircle is used to display the loading state of some components."""
|
||||
|
||||
tag = "SkeletonCircle"
|
||||
@ -52,7 +46,7 @@ class SkeletonCircle(BaseSkeleton):
|
||||
start_color: Var[str]
|
||||
|
||||
|
||||
class SkeletonText(BaseSkeleton):
|
||||
class SkeletonText(ChakraComponent):
|
||||
"""SkeletonText is used to display the loading state of some components."""
|
||||
|
||||
tag = "SkeletonText"
|
||||
|
@ -10,86 +10,7 @@ from reflex.style import Style
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseSkeleton(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseSkeleton":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Skeleton(BaseSkeleton):
|
||||
class Skeleton(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -178,7 +99,7 @@ class Skeleton(BaseSkeleton):
|
||||
"""
|
||||
...
|
||||
|
||||
class SkeletonCircle(BaseSkeleton):
|
||||
class SkeletonCircle(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -267,7 +188,7 @@ class SkeletonCircle(BaseSkeleton):
|
||||
"""
|
||||
...
|
||||
|
||||
class SkeletonText(BaseSkeleton):
|
||||
class SkeletonText(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -7,8 +7,6 @@ from reflex.vars import Var
|
||||
class Spinner(ChakraComponent):
|
||||
"""The component that spins."""
|
||||
|
||||
library = "@chakra-ui/spinner@2.1.0"
|
||||
|
||||
tag = "Spinner"
|
||||
|
||||
# The color of the empty area in the spinner
|
||||
|
@ -11,13 +11,7 @@ from reflex.components.chakra import (
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseButton(ChakraComponent):
|
||||
"""Base class for all button components."""
|
||||
|
||||
library = "@chakra-ui/button@2.1.0"
|
||||
|
||||
|
||||
class Button(BaseButton):
|
||||
class Button(ChakraComponent):
|
||||
"""The Button component is used to trigger an event or event, such as submitting a form, opening a dialog, canceling an event, or performing a delete operation."""
|
||||
|
||||
tag = "Button"
|
||||
@ -67,7 +61,7 @@ class Button(BaseButton):
|
||||
name: Var[str]
|
||||
|
||||
|
||||
class ButtonGroup(BaseButton):
|
||||
class ButtonGroup(ChakraComponent):
|
||||
"""A group of buttons."""
|
||||
|
||||
tag = "ButtonGroup"
|
||||
|
@ -17,86 +17,7 @@ from reflex.components.chakra import (
|
||||
)
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseButton(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseButton":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Button(BaseButton):
|
||||
class Button(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -255,7 +176,7 @@ class Button(BaseButton):
|
||||
"""
|
||||
...
|
||||
|
||||
class ButtonGroup(BaseButton):
|
||||
class ButtonGroup(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -12,13 +12,7 @@ from reflex.constants import EventTriggers
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseCheckbox(ChakraComponent):
|
||||
"""The base class for all checkbox components."""
|
||||
|
||||
library = "@chakra-ui/checkbox@2.3.2"
|
||||
|
||||
|
||||
class Checkbox(BaseCheckbox):
|
||||
class Checkbox(ChakraComponent):
|
||||
"""The Checkbox component is used in forms when a user needs to select multiple values from several options."""
|
||||
|
||||
tag = "Checkbox"
|
||||
@ -74,7 +68,7 @@ class Checkbox(BaseCheckbox):
|
||||
}
|
||||
|
||||
|
||||
class CheckboxGroup(BaseCheckbox):
|
||||
class CheckboxGroup(ChakraComponent):
|
||||
"""A group of checkboxes."""
|
||||
|
||||
tag = "CheckboxGroup"
|
||||
|
@ -12,86 +12,7 @@ from reflex.components.chakra import ChakraComponent, LiteralColorScheme, Litera
|
||||
from reflex.constants import EventTriggers
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseCheckbox(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseCheckbox":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Checkbox(BaseCheckbox):
|
||||
class Checkbox(ChakraComponent):
|
||||
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
@ -247,7 +168,7 @@ class Checkbox(BaseCheckbox):
|
||||
"""
|
||||
...
|
||||
|
||||
class CheckboxGroup(BaseCheckbox):
|
||||
class CheckboxGroup(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -8,13 +8,7 @@ from reflex.constants import EventTriggers
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseEditable(ChakraComponent):
|
||||
"""The base class for all Chakra editable components."""
|
||||
|
||||
library = "@chakra-ui/editable@3.1.0"
|
||||
|
||||
|
||||
class Editable(BaseEditable):
|
||||
class Editable(ChakraComponent):
|
||||
"""The wrapper component that provides context value."""
|
||||
|
||||
tag = "Editable"
|
||||
@ -58,19 +52,19 @@ class Editable(BaseEditable):
|
||||
}
|
||||
|
||||
|
||||
class EditableInput(BaseEditable):
|
||||
class EditableInput(ChakraComponent):
|
||||
"""The edit view of the component. It shows when you click or focus on the text."""
|
||||
|
||||
tag = "EditableInput"
|
||||
|
||||
|
||||
class EditableTextarea(BaseEditable):
|
||||
class EditableTextarea(ChakraComponent):
|
||||
"""Use the textarea element to handle multi line text input in an editable context."""
|
||||
|
||||
tag = "EditableTextarea"
|
||||
|
||||
|
||||
class EditablePreview(BaseEditable):
|
||||
class EditablePreview(ChakraComponent):
|
||||
"""The read-only view of the component."""
|
||||
|
||||
tag = "EditablePreview"
|
||||
|
@ -12,86 +12,7 @@ from reflex.components.chakra import ChakraComponent
|
||||
from reflex.constants import EventTriggers
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseEditable(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseEditable":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Editable(BaseEditable):
|
||||
class Editable(ChakraComponent):
|
||||
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
@ -199,7 +120,7 @@ class Editable(BaseEditable):
|
||||
"""
|
||||
...
|
||||
|
||||
class EditableInput(BaseEditable):
|
||||
class EditableInput(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -278,7 +199,7 @@ class EditableInput(BaseEditable):
|
||||
"""
|
||||
...
|
||||
|
||||
class EditableTextarea(BaseEditable):
|
||||
class EditableTextarea(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -357,7 +278,7 @@ class EditableTextarea(BaseEditable):
|
||||
"""
|
||||
...
|
||||
|
||||
class EditablePreview(BaseEditable):
|
||||
class EditablePreview(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -7,7 +7,6 @@ from typing import Any, Dict, Iterator
|
||||
from jinja2 import Environment
|
||||
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.component import Component
|
||||
from reflex.components.tags import Tag
|
||||
from reflex.constants import Dirs, EventTriggers
|
||||
@ -34,7 +33,7 @@ HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
|
||||
)
|
||||
|
||||
|
||||
class Form(ChakraLayoutComponent):
|
||||
class Form(ChakraComponent):
|
||||
"""A form component."""
|
||||
|
||||
tag = "Box"
|
||||
|
@ -11,7 +11,6 @@ from hashlib import md5
|
||||
from typing import Any, Dict, Iterator
|
||||
from jinja2 import Environment
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.component import Component
|
||||
from reflex.components.tags import Tag
|
||||
from reflex.constants import Dirs, EventTriggers
|
||||
@ -25,7 +24,7 @@ HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
|
||||
"\n const handleSubmit_{{ handle_submit_unique_name }} = useCallback((ev) => {\n const $form = ev.target\n ev.preventDefault()\n const {{ form_data }} = {...Object.fromEntries(new FormData($form).entries()), ...{{ field_ref_mapping }}}\n\n {{ on_submit_event_chain }}\n\n if ({{ reset_on_submit }}) {\n $form.reset()\n }\n })\n "
|
||||
)
|
||||
|
||||
class Form(ChakraLayoutComponent):
|
||||
class Form(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -15,13 +15,7 @@ from reflex.utils import imports
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseInput(ChakraComponent):
|
||||
"""The base class for all Chakra input components."""
|
||||
|
||||
library = "@chakra-ui/input@2.1.2"
|
||||
|
||||
|
||||
class Input(BaseInput):
|
||||
class Input(ChakraComponent):
|
||||
"""The Input component is a component that is used to get user input in a text field."""
|
||||
|
||||
tag = "Input"
|
||||
@ -109,7 +103,7 @@ class Input(BaseInput):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class InputGroup(BaseInput):
|
||||
class InputGroup(ChakraComponent):
|
||||
"""The InputGroup component is a component that is used to group a set of inputs."""
|
||||
|
||||
tag = "InputGroup"
|
||||
@ -117,25 +111,25 @@ class InputGroup(BaseInput):
|
||||
_memoization_mode = MemoizationMode(recursive=False)
|
||||
|
||||
|
||||
class InputLeftAddon(BaseInput):
|
||||
class InputLeftAddon(ChakraComponent):
|
||||
"""The InputLeftAddon component is a component that is used to add an addon to the left of an input."""
|
||||
|
||||
tag = "InputLeftAddon"
|
||||
|
||||
|
||||
class InputRightAddon(BaseInput):
|
||||
class InputRightAddon(ChakraComponent):
|
||||
"""The InputRightAddon component is a component that is used to add an addon to the right of an input."""
|
||||
|
||||
tag = "InputRightAddon"
|
||||
|
||||
|
||||
class InputLeftElement(BaseInput):
|
||||
class InputLeftElement(ChakraComponent):
|
||||
"""The InputLeftElement component is a component that is used to add an element to the left of an input."""
|
||||
|
||||
tag = "InputLeftElement"
|
||||
|
||||
|
||||
class InputRightElement(BaseInput):
|
||||
class InputRightElement(ChakraComponent):
|
||||
"""The InputRightElement component is a component that is used to add an element to the right of an input."""
|
||||
|
||||
tag = "InputRightElement"
|
||||
|
@ -20,86 +20,7 @@ from reflex.constants import EventTriggers, MemoizationMode
|
||||
from reflex.utils import imports
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseInput(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseInput":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Input(BaseInput):
|
||||
class Input(ChakraComponent):
|
||||
def get_event_triggers(self) -> Dict[str, Any]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
@ -271,7 +192,7 @@ class Input(BaseInput):
|
||||
"""
|
||||
...
|
||||
|
||||
class InputGroup(BaseInput):
|
||||
class InputGroup(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -350,7 +271,7 @@ class InputGroup(BaseInput):
|
||||
"""
|
||||
...
|
||||
|
||||
class InputLeftAddon(BaseInput):
|
||||
class InputLeftAddon(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -429,7 +350,7 @@ class InputLeftAddon(BaseInput):
|
||||
"""
|
||||
...
|
||||
|
||||
class InputRightAddon(BaseInput):
|
||||
class InputRightAddon(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -508,7 +429,7 @@ class InputRightAddon(BaseInput):
|
||||
"""
|
||||
...
|
||||
|
||||
class InputLeftElement(BaseInput):
|
||||
class InputLeftElement(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -587,7 +508,7 @@ class InputLeftElement(BaseInput):
|
||||
"""
|
||||
...
|
||||
|
||||
class InputRightElement(BaseInput):
|
||||
class InputRightElement(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -13,13 +13,7 @@ from reflex.constants import EventTriggers
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseNumberInput(ChakraComponent):
|
||||
"""Base number input component."""
|
||||
|
||||
library = "@chakra-ui/number-input@2.1.2"
|
||||
|
||||
|
||||
class NumberInput(BaseNumberInput):
|
||||
class NumberInput(ChakraComponent):
|
||||
"""The wrapper that provides context and logic to the components."""
|
||||
|
||||
tag = "NumberInput"
|
||||
@ -119,25 +113,25 @@ class NumberInput(BaseNumberInput):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class NumberInputField(BaseNumberInput):
|
||||
class NumberInputField(ChakraComponent):
|
||||
"""The input field itself."""
|
||||
|
||||
tag = "NumberInputField"
|
||||
|
||||
|
||||
class NumberInputStepper(BaseNumberInput):
|
||||
class NumberInputStepper(ChakraComponent):
|
||||
"""The wrapper for the input's stepper buttons."""
|
||||
|
||||
tag = "NumberInputStepper"
|
||||
|
||||
|
||||
class NumberIncrementStepper(BaseNumberInput):
|
||||
class NumberIncrementStepper(ChakraComponent):
|
||||
"""The button to increment the value of the input."""
|
||||
|
||||
tag = "NumberIncrementStepper"
|
||||
|
||||
|
||||
class NumberDecrementStepper(BaseNumberInput):
|
||||
class NumberDecrementStepper(ChakraComponent):
|
||||
"""The button to decrement the value of the input."""
|
||||
|
||||
tag = "NumberDecrementStepper"
|
||||
|
@ -18,86 +18,7 @@ from reflex.components.component import Component
|
||||
from reflex.constants import EventTriggers
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseNumberInput(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseNumberInput":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class NumberInput(BaseNumberInput):
|
||||
class NumberInput(ChakraComponent):
|
||||
def get_event_triggers(self) -> Dict[str, Any]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
@ -222,7 +143,7 @@ class NumberInput(BaseNumberInput):
|
||||
"""
|
||||
...
|
||||
|
||||
class NumberInputField(BaseNumberInput):
|
||||
class NumberInputField(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -301,7 +222,7 @@ class NumberInputField(BaseNumberInput):
|
||||
"""
|
||||
...
|
||||
|
||||
class NumberInputStepper(BaseNumberInput):
|
||||
class NumberInputStepper(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -380,7 +301,7 @@ class NumberInputStepper(BaseNumberInput):
|
||||
"""
|
||||
...
|
||||
|
||||
class NumberIncrementStepper(BaseNumberInput):
|
||||
class NumberIncrementStepper(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -459,7 +380,7 @@ class NumberIncrementStepper(BaseNumberInput):
|
||||
"""
|
||||
...
|
||||
|
||||
class NumberDecrementStepper(BaseNumberInput):
|
||||
class NumberDecrementStepper(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -12,13 +12,7 @@ from reflex.utils.imports import ImportDict, merge_imports
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BasePinInput(ChakraComponent):
|
||||
"""The base chakra pin input component."""
|
||||
|
||||
library = "@chakra-ui/pin-input@2.1.0"
|
||||
|
||||
|
||||
class PinInput(BasePinInput):
|
||||
class PinInput(ChakraComponent):
|
||||
"""The component that provides context to all the pin-input fields."""
|
||||
|
||||
tag = "PinInput"
|
||||
@ -167,7 +161,7 @@ class PinInput(BasePinInput):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class PinInputField(BasePinInput):
|
||||
class PinInputField(ChakraComponent):
|
||||
"""The text field that user types in - must be a direct child of PinInput."""
|
||||
|
||||
tag = "PinInputField"
|
||||
|
@ -16,86 +16,7 @@ from reflex.utils import format
|
||||
from reflex.utils.imports import ImportDict, merge_imports
|
||||
from reflex.vars import Var
|
||||
|
||||
class BasePinInput(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BasePinInput":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class PinInput(BasePinInput):
|
||||
class PinInput(ChakraComponent):
|
||||
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||
def get_ref(self) -> str | None: ...
|
||||
@overload
|
||||
@ -217,7 +138,7 @@ class PinInput(BasePinInput):
|
||||
"""
|
||||
...
|
||||
|
||||
class PinInputField(BasePinInput):
|
||||
class PinInputField(ChakraComponent):
|
||||
@classmethod
|
||||
def for_length(cls, length: Var | int, **props) -> Var: ...
|
||||
def get_ref(self): ...
|
||||
|
@ -15,8 +15,6 @@ from reflex.vars import Var
|
||||
class RadioGroup(ChakraComponent):
|
||||
"""A grouping of individual radio options."""
|
||||
|
||||
library = "@chakra-ui/radio@2.1.2"
|
||||
|
||||
tag = "RadioGroup"
|
||||
|
||||
# State var to bind the the input.
|
||||
@ -64,8 +62,6 @@ class RadioGroup(ChakraComponent):
|
||||
class Radio(Text):
|
||||
"""Radios are used when only one choice may be selected in a series of options."""
|
||||
|
||||
library = "@chakra-ui/radio@2.1.2"
|
||||
|
||||
tag = "Radio"
|
||||
|
||||
# Value of radio.
|
||||
|
@ -10,13 +10,7 @@ from reflex.utils import format
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseRangeSlider(ChakraComponent):
|
||||
"""Base componemt of all chakra range sliders."""
|
||||
|
||||
library = "@chakra-ui/slider@2.1.0"
|
||||
|
||||
|
||||
class RangeSlider(BaseRangeSlider):
|
||||
class RangeSlider(ChakraComponent):
|
||||
"""The RangeSlider is a multi thumb slider used to select a range of related values. A common use-case of this component is a price range picker that allows a user to set the minimum and maximum price."""
|
||||
|
||||
tag = "RangeSlider"
|
||||
@ -124,19 +118,19 @@ class RangeSlider(BaseRangeSlider):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class RangeSliderTrack(BaseRangeSlider):
|
||||
class RangeSliderTrack(ChakraComponent):
|
||||
"""A range slider track."""
|
||||
|
||||
tag = "RangeSliderTrack"
|
||||
|
||||
|
||||
class RangeSliderFilledTrack(BaseRangeSlider):
|
||||
class RangeSliderFilledTrack(ChakraComponent):
|
||||
"""A filled range slider track."""
|
||||
|
||||
tag = "RangeSliderFilledTrack"
|
||||
|
||||
|
||||
class RangeSliderThumb(BaseRangeSlider):
|
||||
class RangeSliderThumb(ChakraComponent):
|
||||
"""A range slider thumb."""
|
||||
|
||||
tag = "RangeSliderThumb"
|
||||
|
@ -14,86 +14,7 @@ from reflex.constants import EventTriggers
|
||||
from reflex.utils import format
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseRangeSlider(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseRangeSlider":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class RangeSlider(BaseRangeSlider):
|
||||
class RangeSlider(ChakraComponent):
|
||||
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||
def get_ref(self): ...
|
||||
@overload
|
||||
@ -206,7 +127,7 @@ class RangeSlider(BaseRangeSlider):
|
||||
"""
|
||||
...
|
||||
|
||||
class RangeSliderTrack(BaseRangeSlider):
|
||||
class RangeSliderTrack(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -285,7 +206,7 @@ class RangeSliderTrack(BaseRangeSlider):
|
||||
"""
|
||||
...
|
||||
|
||||
class RangeSliderFilledTrack(BaseRangeSlider):
|
||||
class RangeSliderFilledTrack(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -364,7 +285,7 @@ class RangeSliderFilledTrack(BaseRangeSlider):
|
||||
"""
|
||||
...
|
||||
|
||||
class RangeSliderThumb(BaseRangeSlider):
|
||||
class RangeSliderThumb(ChakraComponent):
|
||||
def get_ref(self): ...
|
||||
@overload
|
||||
@classmethod
|
||||
|
@ -14,8 +14,6 @@ from reflex.vars import Var
|
||||
class Select(ChakraComponent):
|
||||
"""Select component is a component that allows users pick a value from predefined options. Ideally, it should be used when there are more than 5 options, otherwise you might consider using a radio group instead."""
|
||||
|
||||
library = "@chakra-ui/select@2.1.2"
|
||||
|
||||
tag = "Select"
|
||||
|
||||
# State var to bind the select.
|
||||
|
@ -11,13 +11,7 @@ from reflex.vars import Var
|
||||
LiteralLayout = Literal["horizontal", "vertical"]
|
||||
|
||||
|
||||
class BaseSlider(ChakraComponent):
|
||||
"""Base componemt of all chakra sliders."""
|
||||
|
||||
library = "@chakra-ui/slider@2.1.0"
|
||||
|
||||
|
||||
class Slider(BaseSlider):
|
||||
class Slider(ChakraComponent):
|
||||
"""The wrapper that provides context and functionality for all children."""
|
||||
|
||||
tag = "Slider"
|
||||
@ -112,19 +106,19 @@ class Slider(BaseSlider):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class SliderTrack(BaseSlider):
|
||||
class SliderTrack(ChakraComponent):
|
||||
"""The empty part of the slider that shows the track."""
|
||||
|
||||
tag = "SliderTrack"
|
||||
|
||||
|
||||
class SliderFilledTrack(BaseSlider):
|
||||
class SliderFilledTrack(ChakraComponent):
|
||||
"""The filled part of the slider."""
|
||||
|
||||
tag = "SliderFilledTrack"
|
||||
|
||||
|
||||
class SliderThumb(BaseSlider):
|
||||
class SliderThumb(ChakraComponent):
|
||||
"""The handle that's used to change the slider value."""
|
||||
|
||||
tag = "SliderThumb"
|
||||
@ -133,7 +127,7 @@ class SliderThumb(BaseSlider):
|
||||
box_size: Var[str]
|
||||
|
||||
|
||||
class SliderMark(BaseSlider):
|
||||
class SliderMark(ChakraComponent):
|
||||
"""The label or mark that shows names for specific slider values."""
|
||||
|
||||
tag = "SliderMark"
|
||||
|
@ -15,86 +15,7 @@ from reflex.vars import Var
|
||||
|
||||
LiteralLayout = Literal["horizontal", "vertical"]
|
||||
|
||||
class BaseSlider(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseSlider":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Slider(BaseSlider):
|
||||
class Slider(ChakraComponent):
|
||||
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
@ -225,7 +146,7 @@ class Slider(BaseSlider):
|
||||
"""
|
||||
...
|
||||
|
||||
class SliderTrack(BaseSlider):
|
||||
class SliderTrack(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -304,7 +225,7 @@ class SliderTrack(BaseSlider):
|
||||
"""
|
||||
...
|
||||
|
||||
class SliderFilledTrack(BaseSlider):
|
||||
class SliderFilledTrack(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -383,7 +304,7 @@ class SliderFilledTrack(BaseSlider):
|
||||
"""
|
||||
...
|
||||
|
||||
class SliderThumb(BaseSlider):
|
||||
class SliderThumb(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -464,7 +385,7 @@ class SliderThumb(BaseSlider):
|
||||
"""
|
||||
...
|
||||
|
||||
class SliderMark(BaseSlider):
|
||||
class SliderMark(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -11,8 +11,6 @@ from reflex.vars import Var
|
||||
class Switch(ChakraComponent):
|
||||
"""Toggleable switch component."""
|
||||
|
||||
library = "@chakra-ui/switch@2.1.2"
|
||||
|
||||
tag = "Switch"
|
||||
|
||||
# If true, the switch will be checked. You'll need to set an on_change event handler to update its value (since it is now controlled)
|
||||
|
@ -13,8 +13,6 @@ from reflex.vars import Var
|
||||
class TextArea(ChakraComponent):
|
||||
"""A text area component."""
|
||||
|
||||
library = "@chakra-ui/textarea@2.1.2"
|
||||
|
||||
tag = "Textarea"
|
||||
|
||||
# State var to bind the input.
|
||||
|
@ -1,10 +1,10 @@
|
||||
"""A AspectRatio component."""
|
||||
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class AspectRatio(ChakraLayoutComponent):
|
||||
class AspectRatio(ChakraComponent):
|
||||
"""AspectRatio component is used to embed responsive videos and maps, etc."""
|
||||
|
||||
tag = "AspectRatio"
|
||||
|
@ -7,10 +7,10 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
class AspectRatio(ChakraLayoutComponent):
|
||||
class AspectRatio(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -1,9 +0,0 @@
|
||||
"""The base class for all Chakra layout components."""
|
||||
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
|
||||
|
||||
class ChakraLayoutComponent(ChakraComponent):
|
||||
"""A component that wraps a Chakra component."""
|
||||
|
||||
library = "@chakra-ui/layout@2.3.1"
|
@ -1,89 +0,0 @@
|
||||
"""Stub file for reflex/components/chakra/layout/base.py"""
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `scripts/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
|
||||
class ChakraLayoutComponent(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "ChakraLayoutComponent":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
@ -1,12 +1,11 @@
|
||||
"""A box component that can contain other components."""
|
||||
|
||||
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.components.tags import Tag
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class Box(ChakraLayoutComponent):
|
||||
class Box(ChakraComponent):
|
||||
"""A generic container component that can contain other components."""
|
||||
|
||||
tag = "Box"
|
||||
|
@ -7,11 +7,11 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.components.tags import Tag
|
||||
from reflex.vars import Var
|
||||
|
||||
class Box(ChakraLayoutComponent):
|
||||
class Box(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -12,31 +12,25 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseCard(ChakraComponent):
|
||||
"""The base class for all Chakra Card components."""
|
||||
|
||||
library = "@chakra-ui/card@2.2.0"
|
||||
|
||||
|
||||
class CardHeader(BaseCard):
|
||||
class CardHeader(ChakraComponent):
|
||||
"""The wrapper that contains a card's header."""
|
||||
|
||||
tag = "CardHeader"
|
||||
|
||||
|
||||
class CardBody(BaseCard):
|
||||
class CardBody(ChakraComponent):
|
||||
"""The wrapper that houses the card's main content."""
|
||||
|
||||
tag = "CardBody"
|
||||
|
||||
|
||||
class CardFooter(BaseCard):
|
||||
class CardFooter(ChakraComponent):
|
||||
"""The footer that houses the card actions."""
|
||||
|
||||
tag = "CardFooter"
|
||||
|
||||
|
||||
class Card(BaseCard):
|
||||
class Card(ChakraComponent):
|
||||
"""The parent wrapper that provides context for its children."""
|
||||
|
||||
tag = "Card"
|
||||
|
@ -17,86 +17,7 @@ from reflex.components.chakra import (
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseCard(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseCard":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class CardHeader(BaseCard):
|
||||
class CardHeader(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -175,7 +96,7 @@ class CardHeader(BaseCard):
|
||||
"""
|
||||
...
|
||||
|
||||
class CardBody(BaseCard):
|
||||
class CardBody(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -254,7 +175,7 @@ class CardBody(BaseCard):
|
||||
"""
|
||||
...
|
||||
|
||||
class CardFooter(BaseCard):
|
||||
class CardFooter(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -333,7 +254,7 @@ class CardFooter(BaseCard):
|
||||
"""
|
||||
...
|
||||
|
||||
class Card(BaseCard):
|
||||
class Card(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -1,21 +1,21 @@
|
||||
"""A box that centers its contents."""
|
||||
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
|
||||
|
||||
class Center(ChakraLayoutComponent):
|
||||
class Center(ChakraComponent):
|
||||
"""A box that centers its contents."""
|
||||
|
||||
tag = "Center"
|
||||
|
||||
|
||||
class Square(ChakraLayoutComponent):
|
||||
class Square(ChakraComponent):
|
||||
"""A centered square container."""
|
||||
|
||||
tag = "Square"
|
||||
|
||||
|
||||
class Circle(ChakraLayoutComponent):
|
||||
class Circle(ChakraComponent):
|
||||
"""A square container with round border-radius."""
|
||||
|
||||
tag = "Circle"
|
||||
|
@ -7,9 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
|
||||
class Center(ChakraLayoutComponent):
|
||||
class Center(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -88,7 +88,7 @@ class Center(ChakraLayoutComponent):
|
||||
"""
|
||||
...
|
||||
|
||||
class Square(ChakraLayoutComponent):
|
||||
class Square(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -167,7 +167,7 @@ class Square(ChakraLayoutComponent):
|
||||
"""
|
||||
...
|
||||
|
||||
class Circle(ChakraLayoutComponent):
|
||||
class Circle(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -1,11 +1,10 @@
|
||||
"""A flexbox container."""
|
||||
|
||||
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class Container(ChakraLayoutComponent):
|
||||
class Container(ChakraComponent):
|
||||
"""A flexbox container that centers its children and sets a max width."""
|
||||
|
||||
tag = "Container"
|
||||
|
@ -7,10 +7,10 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
class Container(ChakraLayoutComponent):
|
||||
class Container(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
from typing import List, Union
|
||||
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class Flex(ChakraLayoutComponent):
|
||||
class Flex(ChakraComponent):
|
||||
"""A reflexive container component."""
|
||||
|
||||
tag = "Flex"
|
||||
|
@ -8,10 +8,10 @@ from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from typing import List, Union
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
class Flex(ChakraLayoutComponent):
|
||||
class Flex(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
from typing import List
|
||||
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class Grid(ChakraLayoutComponent):
|
||||
class Grid(ChakraComponent):
|
||||
"""A grid component."""
|
||||
|
||||
tag = "Grid"
|
||||
@ -41,7 +41,7 @@ class Grid(ChakraLayoutComponent):
|
||||
template_rows: Var[str]
|
||||
|
||||
|
||||
class GridItem(ChakraLayoutComponent):
|
||||
class GridItem(ChakraComponent):
|
||||
"""Used as a child of Grid to control the span, and start positions within the grid."""
|
||||
|
||||
tag = "GridItem"
|
||||
@ -71,7 +71,7 @@ class GridItem(ChakraLayoutComponent):
|
||||
row_span: Var[int]
|
||||
|
||||
|
||||
class ResponsiveGrid(ChakraLayoutComponent):
|
||||
class ResponsiveGrid(ChakraComponent):
|
||||
"""A responsive grid component."""
|
||||
|
||||
tag = "SimpleGrid"
|
||||
|
@ -8,10 +8,10 @@ from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from typing import List
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.vars import Var
|
||||
|
||||
class Grid(ChakraLayoutComponent):
|
||||
class Grid(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -104,7 +104,7 @@ class Grid(ChakraLayoutComponent):
|
||||
"""
|
||||
...
|
||||
|
||||
class GridItem(ChakraLayoutComponent):
|
||||
class GridItem(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -197,7 +197,7 @@ class GridItem(ChakraLayoutComponent):
|
||||
"""
|
||||
...
|
||||
|
||||
class ResponsiveGrid(ChakraLayoutComponent):
|
||||
class ResponsiveGrid(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -1,10 +1,9 @@
|
||||
"""A flexible space component."""
|
||||
|
||||
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
|
||||
|
||||
class Spacer(ChakraLayoutComponent):
|
||||
class Spacer(ChakraComponent):
|
||||
"""A flexible space component."""
|
||||
|
||||
tag = "Spacer"
|
||||
|
@ -7,9 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
|
||||
class Spacer(ChakraLayoutComponent):
|
||||
class Spacer(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -2,12 +2,11 @@
|
||||
|
||||
from typing import List, Union
|
||||
|
||||
from reflex.components.chakra import LiteralStackDirection
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent, LiteralStackDirection
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class Stack(ChakraLayoutComponent):
|
||||
class Stack(ChakraComponent):
|
||||
"""Container to stack elements with spacing."""
|
||||
|
||||
tag = "Stack"
|
||||
|
@ -8,11 +8,10 @@ from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from typing import List, Union
|
||||
from reflex.components.chakra import LiteralStackDirection
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent, LiteralStackDirection
|
||||
from reflex.vars import Var
|
||||
|
||||
class Stack(ChakraLayoutComponent):
|
||||
class Stack(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -1,11 +1,11 @@
|
||||
"""Container to stack elements with spacing."""
|
||||
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class Wrap(ChakraLayoutComponent):
|
||||
class Wrap(ChakraComponent):
|
||||
"""Layout component used to add space between elements and wrap automatically if there isn't enough space."""
|
||||
|
||||
tag = "Wrap"
|
||||
@ -51,7 +51,7 @@ class Wrap(ChakraLayoutComponent):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class WrapItem(ChakraLayoutComponent):
|
||||
class WrapItem(ChakraComponent):
|
||||
"""Item of the Wrap component."""
|
||||
|
||||
tag = "WrapItem"
|
||||
|
@ -7,11 +7,11 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from reflex.components.chakra.layout.base import ChakraLayoutComponent
|
||||
from reflex.components.chakra import ChakraComponent
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class Wrap(ChakraLayoutComponent):
|
||||
class Wrap(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -103,7 +103,7 @@ class Wrap(ChakraLayoutComponent):
|
||||
"""
|
||||
...
|
||||
|
||||
class WrapItem(ChakraLayoutComponent):
|
||||
class WrapItem(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -7,13 +7,7 @@ from reflex.components.chakra import ChakraComponent, LiteralAvatarSize
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseAvatar(ChakraComponent):
|
||||
"""Base avatar component."""
|
||||
|
||||
library = "@chakra-ui/avatar@2.1.0"
|
||||
|
||||
|
||||
class Avatar(BaseAvatar):
|
||||
class Avatar(ChakraComponent):
|
||||
"""The image that represents the user."""
|
||||
|
||||
tag = "Avatar"
|
||||
@ -54,13 +48,13 @@ class Avatar(BaseAvatar):
|
||||
}
|
||||
|
||||
|
||||
class AvatarBadge(BaseAvatar):
|
||||
class AvatarBadge(ChakraComponent):
|
||||
"""A wrapper that displays its content on the right corner of the avatar."""
|
||||
|
||||
tag = "AvatarBadge"
|
||||
|
||||
|
||||
class AvatarGroup(BaseAvatar):
|
||||
class AvatarGroup(ChakraComponent):
|
||||
"""A wrapper to stack multiple Avatars together."""
|
||||
|
||||
tag = "AvatarGroup"
|
||||
|
@ -11,86 +11,7 @@ from typing import Any, Union
|
||||
from reflex.components.chakra import ChakraComponent, LiteralAvatarSize
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseAvatar(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseAvatar":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Avatar(BaseAvatar):
|
||||
class Avatar(ChakraComponent):
|
||||
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
@ -194,7 +115,7 @@ class Avatar(BaseAvatar):
|
||||
"""
|
||||
...
|
||||
|
||||
class AvatarBadge(BaseAvatar):
|
||||
class AvatarBadge(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -273,7 +194,7 @@ class AvatarBadge(BaseAvatar):
|
||||
"""
|
||||
...
|
||||
|
||||
class AvatarGroup(BaseAvatar):
|
||||
class AvatarGroup(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -11,10 +11,7 @@ from reflex.vars import Var
|
||||
class Image(ChakraComponent):
|
||||
"""Display an image."""
|
||||
|
||||
library = "@chakra-ui/image@2.1.0"
|
||||
|
||||
tag = "Image"
|
||||
|
||||
alias = "ChakraImage"
|
||||
# How to align the image within its bounds. It maps to css `object-position` property.
|
||||
align: Var[str]
|
||||
|
@ -7,13 +7,7 @@ from reflex.components.core.foreach import Foreach
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseBreadcrumb(ChakraComponent):
|
||||
"""The base class for all Chakra breadcrumb components."""
|
||||
|
||||
library = "@chakra-ui/breadcrumb@2.2.0"
|
||||
|
||||
|
||||
class Breadcrumb(BaseBreadcrumb):
|
||||
class Breadcrumb(ChakraComponent):
|
||||
"""The parent container for breadcrumbs."""
|
||||
|
||||
tag = "Breadcrumb"
|
||||
@ -54,7 +48,7 @@ class Breadcrumb(BaseBreadcrumb):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class BreadcrumbItem(BaseBreadcrumb):
|
||||
class BreadcrumbItem(ChakraComponent):
|
||||
"""Individual breadcrumb element containing a link and a divider."""
|
||||
|
||||
tag = "BreadcrumbItem"
|
||||
@ -89,7 +83,7 @@ class BreadcrumbItem(BaseBreadcrumb):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class BreadcrumbSeparator(BaseBreadcrumb):
|
||||
class BreadcrumbSeparator(ChakraComponent):
|
||||
"""The visual separator between each breadcrumb."""
|
||||
|
||||
tag = "BreadcrumbSeparator"
|
||||
@ -100,7 +94,5 @@ class BreadcrumbLink(Link):
|
||||
|
||||
tag = "BreadcrumbLink"
|
||||
|
||||
library = "@chakra-ui/breadcrumb@2.2.0"
|
||||
|
||||
# Is the current page of the breadcrumb.
|
||||
is_current_page: Var[bool]
|
||||
|
@ -13,86 +13,7 @@ from reflex.components.component import Component
|
||||
from reflex.components.core.foreach import Foreach
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseBreadcrumb(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseBreadcrumb":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Breadcrumb(BaseBreadcrumb):
|
||||
class Breadcrumb(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -176,7 +97,7 @@ class Breadcrumb(BaseBreadcrumb):
|
||||
"""
|
||||
...
|
||||
|
||||
class BreadcrumbItem(BaseBreadcrumb):
|
||||
class BreadcrumbItem(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -264,7 +185,7 @@ class BreadcrumbItem(BaseBreadcrumb):
|
||||
"""
|
||||
...
|
||||
|
||||
class BreadcrumbSeparator(BaseBreadcrumb):
|
||||
class BreadcrumbSeparator(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -7,13 +7,7 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseStepper(ChakraComponent):
|
||||
"""The base class for all Chakra stepper components."""
|
||||
|
||||
library = "@chakra-ui/stepper@2.3.1"
|
||||
|
||||
|
||||
class Stepper(BaseStepper):
|
||||
class Stepper(ChakraComponent):
|
||||
"""The parent container for a stepper."""
|
||||
|
||||
tag = "Stepper"
|
||||
@ -61,43 +55,43 @@ class Stepper(BaseStepper):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class Step(BaseStepper):
|
||||
class Step(ChakraComponent):
|
||||
"""A component for an individual step in the stepper."""
|
||||
|
||||
tag = "Step"
|
||||
|
||||
|
||||
class StepDescription(BaseStepper):
|
||||
class StepDescription(ChakraComponent):
|
||||
"""The description text for a step component."""
|
||||
|
||||
tag = "StepDescription"
|
||||
|
||||
|
||||
class StepIcon(BaseStepper):
|
||||
class StepIcon(ChakraComponent):
|
||||
"""The icon displayed in a step indicator component."""
|
||||
|
||||
tag = "StepIcon"
|
||||
|
||||
|
||||
class StepIndicator(BaseStepper):
|
||||
class StepIndicator(ChakraComponent):
|
||||
"""The component displaying the status of a step."""
|
||||
|
||||
tag = "StepIndicator"
|
||||
|
||||
|
||||
class StepNumber(BaseStepper):
|
||||
class StepNumber(ChakraComponent):
|
||||
"""The number of a step displayed in a step indicator component."""
|
||||
|
||||
tag = "StepNumber"
|
||||
|
||||
|
||||
class StepSeparator(BaseStepper):
|
||||
class StepSeparator(ChakraComponent):
|
||||
"""The component separting steps."""
|
||||
|
||||
tag = "StepSeparator"
|
||||
|
||||
|
||||
class StepStatus(BaseStepper):
|
||||
class StepStatus(ChakraComponent):
|
||||
"""A component that displays a number or icon based on the status of a step."""
|
||||
|
||||
# [not working yet]
|
||||
@ -113,7 +107,7 @@ class StepStatus(BaseStepper):
|
||||
tag = "StepStatus"
|
||||
|
||||
|
||||
class StepTitle(BaseStepper):
|
||||
class StepTitle(ChakraComponent):
|
||||
"""The title text for a step component."""
|
||||
|
||||
tag = "StepTitle"
|
||||
|
@ -12,86 +12,7 @@ from reflex.components.chakra import ChakraComponent, LiteralColorScheme
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseStepper(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseStepper":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Stepper(BaseStepper):
|
||||
class Stepper(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -230,7 +151,7 @@ class Stepper(BaseStepper):
|
||||
"""
|
||||
...
|
||||
|
||||
class Step(BaseStepper):
|
||||
class Step(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -309,7 +230,7 @@ class Step(BaseStepper):
|
||||
"""
|
||||
...
|
||||
|
||||
class StepDescription(BaseStepper):
|
||||
class StepDescription(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -388,7 +309,7 @@ class StepDescription(BaseStepper):
|
||||
"""
|
||||
...
|
||||
|
||||
class StepIcon(BaseStepper):
|
||||
class StepIcon(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -467,7 +388,7 @@ class StepIcon(BaseStepper):
|
||||
"""
|
||||
...
|
||||
|
||||
class StepIndicator(BaseStepper):
|
||||
class StepIndicator(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -546,7 +467,7 @@ class StepIndicator(BaseStepper):
|
||||
"""
|
||||
...
|
||||
|
||||
class StepNumber(BaseStepper):
|
||||
class StepNumber(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -625,7 +546,7 @@ class StepNumber(BaseStepper):
|
||||
"""
|
||||
...
|
||||
|
||||
class StepSeparator(BaseStepper):
|
||||
class StepSeparator(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -704,7 +625,7 @@ class StepSeparator(BaseStepper):
|
||||
"""
|
||||
...
|
||||
|
||||
class StepStatus(BaseStepper):
|
||||
class StepStatus(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -787,7 +708,7 @@ class StepStatus(BaseStepper):
|
||||
"""
|
||||
...
|
||||
|
||||
class StepTitle(BaseStepper):
|
||||
class StepTitle(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -9,13 +9,7 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseAlertDialog(ChakraComponent):
|
||||
"""The base class for all alert dialog components."""
|
||||
|
||||
library = "@chakra-ui/modal@2.3.1"
|
||||
|
||||
|
||||
class AlertDialog(BaseAlertDialog):
|
||||
class AlertDialog(ChakraComponent):
|
||||
"""Provides context and state for the dialog."""
|
||||
|
||||
tag = "AlertDialog"
|
||||
@ -125,37 +119,37 @@ class AlertDialog(BaseAlertDialog):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class AlertDialogBody(BaseAlertDialog):
|
||||
class AlertDialogBody(ChakraComponent):
|
||||
"""Should contain the description announced by screen readers."""
|
||||
|
||||
tag = "AlertDialogBody"
|
||||
|
||||
|
||||
class AlertDialogHeader(BaseAlertDialog):
|
||||
class AlertDialogHeader(ChakraComponent):
|
||||
"""Should contain the title announced by screen readers."""
|
||||
|
||||
tag = "AlertDialogHeader"
|
||||
|
||||
|
||||
class AlertDialogFooter(BaseAlertDialog):
|
||||
class AlertDialogFooter(ChakraComponent):
|
||||
"""Should contain the events of the dialog."""
|
||||
|
||||
tag = "AlertDialogFooter"
|
||||
|
||||
|
||||
class AlertDialogContent(BaseAlertDialog):
|
||||
class AlertDialogContent(ChakraComponent):
|
||||
"""The wrapper for the alert dialog's content."""
|
||||
|
||||
tag = "AlertDialogContent"
|
||||
|
||||
|
||||
class AlertDialogOverlay(BaseAlertDialog):
|
||||
class AlertDialogOverlay(ChakraComponent):
|
||||
"""The dimmed overlay behind the dialog."""
|
||||
|
||||
tag = "AlertDialogOverlay"
|
||||
|
||||
|
||||
class AlertDialogCloseButton(BaseAlertDialog):
|
||||
class AlertDialogCloseButton(ChakraComponent):
|
||||
"""The button that closes the dialog."""
|
||||
|
||||
tag = "AlertDialogCloseButton"
|
||||
|
@ -13,86 +13,7 @@ from reflex.components.chakra.media.icon import Icon
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseAlertDialog(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseAlertDialog":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class AlertDialog(BaseAlertDialog):
|
||||
class AlertDialog(ChakraComponent):
|
||||
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
@ -238,7 +159,7 @@ class AlertDialog(BaseAlertDialog):
|
||||
"""
|
||||
...
|
||||
|
||||
class AlertDialogBody(BaseAlertDialog):
|
||||
class AlertDialogBody(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -317,7 +238,7 @@ class AlertDialogBody(BaseAlertDialog):
|
||||
"""
|
||||
...
|
||||
|
||||
class AlertDialogHeader(BaseAlertDialog):
|
||||
class AlertDialogHeader(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -396,7 +317,7 @@ class AlertDialogHeader(BaseAlertDialog):
|
||||
"""
|
||||
...
|
||||
|
||||
class AlertDialogFooter(BaseAlertDialog):
|
||||
class AlertDialogFooter(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -475,7 +396,7 @@ class AlertDialogFooter(BaseAlertDialog):
|
||||
"""
|
||||
...
|
||||
|
||||
class AlertDialogContent(BaseAlertDialog):
|
||||
class AlertDialogContent(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -554,7 +475,7 @@ class AlertDialogContent(BaseAlertDialog):
|
||||
"""
|
||||
...
|
||||
|
||||
class AlertDialogOverlay(BaseAlertDialog):
|
||||
class AlertDialogOverlay(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -633,7 +554,7 @@ class AlertDialogOverlay(BaseAlertDialog):
|
||||
"""
|
||||
...
|
||||
|
||||
class AlertDialogCloseButton(BaseAlertDialog):
|
||||
class AlertDialogCloseButton(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -14,13 +14,7 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BaseMenu(ChakraComponent):
|
||||
"""The base class for all Chakra menu components."""
|
||||
|
||||
library = "@chakra-ui/menu@2.2.1"
|
||||
|
||||
|
||||
class Menu(BaseMenu):
|
||||
class Menu(ChakraComponent):
|
||||
"""The wrapper component provides context, state, and focus management."""
|
||||
|
||||
tag = "Menu"
|
||||
@ -118,7 +112,7 @@ class Menu(BaseMenu):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class MenuButton(BaseMenu):
|
||||
class MenuButton(ChakraComponent):
|
||||
"""The trigger for the menu list. Must be a direct child of Menu."""
|
||||
|
||||
tag = "MenuButton"
|
||||
@ -133,7 +127,7 @@ class MenuButton(BaseMenu):
|
||||
as_: Var[str]
|
||||
|
||||
|
||||
class MenuList(BaseMenu):
|
||||
class MenuList(ChakraComponent):
|
||||
"""The wrapper for the menu items. Must be a direct child of Menu."""
|
||||
|
||||
tag = "MenuList"
|
||||
@ -160,7 +154,7 @@ class MenuList(BaseMenu):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class MenuItem(BaseMenu):
|
||||
class MenuItem(ChakraComponent):
|
||||
"""The trigger that handles menu selection. Must be a direct child of a MenuList."""
|
||||
|
||||
tag = "MenuItem"
|
||||
@ -181,7 +175,7 @@ class MenuItem(BaseMenu):
|
||||
is_focusable: Var[bool]
|
||||
|
||||
|
||||
class MenuItemOption(BaseMenu):
|
||||
class MenuItemOption(ChakraComponent):
|
||||
"""The checkable menu item, to be used with MenuOptionGroup."""
|
||||
|
||||
tag = "MenuItemOption"
|
||||
@ -211,13 +205,13 @@ class MenuItemOption(BaseMenu):
|
||||
value: Var[str]
|
||||
|
||||
|
||||
class MenuGroup(BaseMenu):
|
||||
class MenuGroup(ChakraComponent):
|
||||
"""A wrapper to group related menu items."""
|
||||
|
||||
tag = "MenuGroup"
|
||||
|
||||
|
||||
class MenuOptionGroup(BaseMenu):
|
||||
class MenuOptionGroup(ChakraComponent):
|
||||
"""A wrapper for checkable menu items (radio and checkbox)."""
|
||||
|
||||
tag = "MenuOptionGroup"
|
||||
@ -229,7 +223,7 @@ class MenuOptionGroup(BaseMenu):
|
||||
value: Var[str]
|
||||
|
||||
|
||||
class MenuDivider(BaseMenu):
|
||||
class MenuDivider(ChakraComponent):
|
||||
"""A visual separator for menu items and groups."""
|
||||
|
||||
tag = "MenuDivider"
|
||||
|
@ -18,86 +18,7 @@ from reflex.components.chakra.forms.button import Button
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BaseMenu(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseMenu":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Menu(BaseMenu):
|
||||
class Menu(ChakraComponent):
|
||||
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
@ -220,7 +141,7 @@ class Menu(BaseMenu):
|
||||
"""
|
||||
...
|
||||
|
||||
class MenuButton(BaseMenu):
|
||||
class MenuButton(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -303,7 +224,7 @@ class MenuButton(BaseMenu):
|
||||
"""
|
||||
...
|
||||
|
||||
class MenuList(BaseMenu):
|
||||
class MenuList(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -381,7 +302,7 @@ class MenuList(BaseMenu):
|
||||
"""
|
||||
...
|
||||
|
||||
class MenuItem(BaseMenu):
|
||||
class MenuItem(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -470,7 +391,7 @@ class MenuItem(BaseMenu):
|
||||
"""
|
||||
...
|
||||
|
||||
class MenuItemOption(BaseMenu):
|
||||
class MenuItemOption(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -567,7 +488,7 @@ class MenuItemOption(BaseMenu):
|
||||
"""
|
||||
...
|
||||
|
||||
class MenuGroup(BaseMenu):
|
||||
class MenuGroup(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -646,7 +567,7 @@ class MenuGroup(BaseMenu):
|
||||
"""
|
||||
...
|
||||
|
||||
class MenuOptionGroup(BaseMenu):
|
||||
class MenuOptionGroup(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -731,7 +652,7 @@ class MenuOptionGroup(BaseMenu):
|
||||
"""
|
||||
...
|
||||
|
||||
class MenuDivider(BaseMenu):
|
||||
class MenuDivider(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -11,13 +11,7 @@ from reflex.vars import Var
|
||||
ModalSizes = Literal["xs", "sm", "md", "lg", "xl", "full"]
|
||||
|
||||
|
||||
class BaseModal(ChakraComponent):
|
||||
"""The base class for all Chakra modal components."""
|
||||
|
||||
library = "@chakra-ui/modal@2.3.1"
|
||||
|
||||
|
||||
class Modal(BaseModal):
|
||||
class Modal(ChakraComponent):
|
||||
"""The wrapper that provides context for its children."""
|
||||
|
||||
tag = "Modal"
|
||||
@ -136,37 +130,37 @@ class Modal(BaseModal):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class ModalOverlay(BaseModal):
|
||||
class ModalOverlay(ChakraComponent):
|
||||
"""The dimmed overlay behind the modal dialog."""
|
||||
|
||||
tag = "ModalOverlay"
|
||||
|
||||
|
||||
class ModalHeader(BaseModal):
|
||||
class ModalHeader(ChakraComponent):
|
||||
"""The header that labels the modal dialog."""
|
||||
|
||||
tag = "ModalHeader"
|
||||
|
||||
|
||||
class ModalFooter(BaseModal):
|
||||
class ModalFooter(ChakraComponent):
|
||||
"""The footer that houses the modal events."""
|
||||
|
||||
tag = "ModalFooter"
|
||||
|
||||
|
||||
class ModalContent(BaseModal):
|
||||
class ModalContent(ChakraComponent):
|
||||
"""The container for the modal dialog's content."""
|
||||
|
||||
tag = "ModalContent"
|
||||
|
||||
|
||||
class ModalBody(BaseModal):
|
||||
class ModalBody(ChakraComponent):
|
||||
"""The wrapper that houses the modal's main content."""
|
||||
|
||||
tag = "ModalBody"
|
||||
|
||||
|
||||
class ModalCloseButton(BaseModal):
|
||||
class ModalCloseButton(ChakraComponent):
|
||||
"""The button that closes the modal."""
|
||||
|
||||
tag = "ModalCloseButton"
|
||||
|
@ -15,86 +15,7 @@ from reflex.vars import Var
|
||||
|
||||
ModalSizes = Literal["xs", "sm", "md", "lg", "xl", "full"]
|
||||
|
||||
class BaseModal(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseModal":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Modal(BaseModal):
|
||||
class Modal(ChakraComponent):
|
||||
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
@ -225,7 +146,7 @@ class Modal(BaseModal):
|
||||
"""
|
||||
...
|
||||
|
||||
class ModalOverlay(BaseModal):
|
||||
class ModalOverlay(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -304,7 +225,7 @@ class ModalOverlay(BaseModal):
|
||||
"""
|
||||
...
|
||||
|
||||
class ModalHeader(BaseModal):
|
||||
class ModalHeader(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -383,7 +304,7 @@ class ModalHeader(BaseModal):
|
||||
"""
|
||||
...
|
||||
|
||||
class ModalFooter(BaseModal):
|
||||
class ModalFooter(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -462,7 +383,7 @@ class ModalFooter(BaseModal):
|
||||
"""
|
||||
...
|
||||
|
||||
class ModalContent(BaseModal):
|
||||
class ModalContent(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -541,7 +462,7 @@ class ModalContent(BaseModal):
|
||||
"""
|
||||
...
|
||||
|
||||
class ModalBody(BaseModal):
|
||||
class ModalBody(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -620,7 +541,7 @@ class ModalBody(BaseModal):
|
||||
"""
|
||||
...
|
||||
|
||||
class ModalCloseButton(BaseModal):
|
||||
class ModalCloseButton(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -13,13 +13,7 @@ from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class BasePopover(ChakraComponent):
|
||||
"""The base class for all Chakra popover components."""
|
||||
|
||||
library = "@chakra-ui/popover@2.2.1"
|
||||
|
||||
|
||||
class Popover(BasePopover):
|
||||
class Popover(ChakraComponent):
|
||||
"""The wrapper that provides props, state, and context to its children."""
|
||||
|
||||
tag = "Popover"
|
||||
@ -147,49 +141,49 @@ class Popover(BasePopover):
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
class PopoverContent(BasePopover):
|
||||
class PopoverContent(ChakraComponent):
|
||||
"""The popover itself."""
|
||||
|
||||
tag = "PopoverContent"
|
||||
|
||||
|
||||
class PopoverHeader(BasePopover):
|
||||
class PopoverHeader(ChakraComponent):
|
||||
"""The header of the popover."""
|
||||
|
||||
tag = "PopoverHeader"
|
||||
|
||||
|
||||
class PopoverFooter(BasePopover):
|
||||
class PopoverFooter(ChakraComponent):
|
||||
"""Display a popover footer."""
|
||||
|
||||
tag = "PopoverFooter"
|
||||
|
||||
|
||||
class PopoverBody(BasePopover):
|
||||
class PopoverBody(ChakraComponent):
|
||||
"""The body of the popover."""
|
||||
|
||||
tag = "PopoverBody"
|
||||
|
||||
|
||||
class PopoverArrow(BasePopover):
|
||||
class PopoverArrow(ChakraComponent):
|
||||
"""A visual arrow that points to the reference (or trigger)."""
|
||||
|
||||
tag = "PopoverArrow"
|
||||
|
||||
|
||||
class PopoverCloseButton(BasePopover):
|
||||
class PopoverCloseButton(ChakraComponent):
|
||||
"""A button to close the popover."""
|
||||
|
||||
tag = "PopoverCloseButton"
|
||||
|
||||
|
||||
class PopoverAnchor(BasePopover):
|
||||
class PopoverAnchor(ChakraComponent):
|
||||
"""Used to wrap the position-reference element."""
|
||||
|
||||
tag = "PopoverAnchor"
|
||||
|
||||
|
||||
class PopoverTrigger(BasePopover):
|
||||
class PopoverTrigger(ChakraComponent):
|
||||
"""Used to wrap the reference (or trigger) element."""
|
||||
|
||||
tag = "PopoverTrigger"
|
||||
|
@ -17,86 +17,7 @@ from reflex.components.chakra import (
|
||||
from reflex.components.component import Component
|
||||
from reflex.vars import Var
|
||||
|
||||
class BasePopover(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BasePopover":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Popover(BasePopover):
|
||||
class Popover(ChakraComponent):
|
||||
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
@ -233,7 +154,7 @@ class Popover(BasePopover):
|
||||
"""
|
||||
...
|
||||
|
||||
class PopoverContent(BasePopover):
|
||||
class PopoverContent(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -312,7 +233,7 @@ class PopoverContent(BasePopover):
|
||||
"""
|
||||
...
|
||||
|
||||
class PopoverHeader(BasePopover):
|
||||
class PopoverHeader(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -391,7 +312,7 @@ class PopoverHeader(BasePopover):
|
||||
"""
|
||||
...
|
||||
|
||||
class PopoverFooter(BasePopover):
|
||||
class PopoverFooter(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -470,7 +391,7 @@ class PopoverFooter(BasePopover):
|
||||
"""
|
||||
...
|
||||
|
||||
class PopoverBody(BasePopover):
|
||||
class PopoverBody(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -549,7 +470,7 @@ class PopoverBody(BasePopover):
|
||||
"""
|
||||
...
|
||||
|
||||
class PopoverArrow(BasePopover):
|
||||
class PopoverArrow(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -628,7 +549,7 @@ class PopoverArrow(BasePopover):
|
||||
"""
|
||||
...
|
||||
|
||||
class PopoverCloseButton(BasePopover):
|
||||
class PopoverCloseButton(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -707,7 +628,7 @@ class PopoverCloseButton(BasePopover):
|
||||
"""
|
||||
...
|
||||
|
||||
class PopoverAnchor(BasePopover):
|
||||
class PopoverAnchor(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
@ -786,7 +707,7 @@ class PopoverAnchor(BasePopover):
|
||||
"""
|
||||
...
|
||||
|
||||
class PopoverTrigger(BasePopover):
|
||||
class PopoverTrigger(ChakraComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
|
@ -10,8 +10,6 @@ from reflex.vars import Var
|
||||
class Tooltip(ChakraComponent):
|
||||
"""A tooltip message to appear."""
|
||||
|
||||
library = "@chakra-ui/tooltip@2.3.1"
|
||||
|
||||
tag = "Tooltip"
|
||||
|
||||
# The padding required to prevent the arrow from reaching the very edge of the popper.
|
||||
|
@ -8,8 +8,6 @@ from reflex.vars import Var
|
||||
class Heading(ChakraComponent):
|
||||
"""A page heading."""
|
||||
|
||||
library = "@chakra-ui/layout@2.3.1"
|
||||
|
||||
tag = "Heading"
|
||||
|
||||
# Override the tag. The default tag is `<h2>`.
|
||||
|
@ -10,8 +10,6 @@ from reflex.vars import Var
|
||||
class Highlight(ChakraComponent):
|
||||
"""Highlights a specific part of a string."""
|
||||
|
||||
library = "@chakra-ui/layout@2.3.1"
|
||||
|
||||
tag = "Highlight"
|
||||
|
||||
# A query for the text to highlight. Can be a string or a list of strings.
|
||||
|
@ -8,8 +8,6 @@ from reflex.vars import Var
|
||||
class Span(ChakraComponent):
|
||||
"""Render an inline span of text."""
|
||||
|
||||
library = "@chakra-ui/layout@2.3.1"
|
||||
|
||||
tag = "Text"
|
||||
|
||||
# Override the tag. The default tag is `<span>`.
|
||||
|
@ -8,8 +8,6 @@ from reflex.vars import Var
|
||||
class Text(ChakraComponent):
|
||||
"""Render a paragraph of text."""
|
||||
|
||||
library = "@chakra-ui/layout@2.3.1"
|
||||
|
||||
tag = "Text"
|
||||
|
||||
# Override the tag. The default tag is `<p>`.
|
||||
|
@ -1251,7 +1251,7 @@ def test_app_wrap_priority(compilable_app):
|
||||
tag = "Fragment2"
|
||||
|
||||
def _get_app_wrap_components(self) -> dict[tuple[int, str], Component]:
|
||||
return {(45, "Text"): Text.create()}
|
||||
return {(50, "Text"): Text.create()}
|
||||
|
||||
class Fragment3(Component):
|
||||
tag = "Fragment3"
|
||||
|
Loading…
Reference in New Issue
Block a user