replace old var system with immutable one (#3916)
* delete most references to varr * [REF-3562][REF-3563] Replace chakra usage (#3872) * only one mention of var * delete vars.py why not * remove reflex.vars * rename immutable var to var * rename ivars to vars * add vars back smh * ruff * no more create_safe * reorder deprecated * remove raises * remove all Var.create * move to new api * fix unit tests * fix pyi hopefully * sort literals * fix event handler issues * update poetry * fix silly issues i'm very silly * add var_operation_return * rename immutable to not immutable * add str type * it's ruff out there --------- Co-authored-by: Elijah Ahianyo <elijahahianyo@gmail.com>
This commit is contained in:
parent
8f937f0417
commit
085b761f6b
@ -15,8 +15,8 @@ def VarOperations():
|
|||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
|
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
from reflex.ivars.base import LiteralVar
|
from reflex.vars.base import LiteralVar
|
||||||
from reflex.ivars.sequence import ArrayVar
|
from reflex.vars.sequence import ArrayVar
|
||||||
|
|
||||||
class Object(rx.Base):
|
class Object(rx.Base):
|
||||||
str: str = "hello"
|
str: str = "hello"
|
||||||
|
561
poetry.lock
generated
561
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -85,10 +85,10 @@
|
|||||||
{% macro render_match_tag(component) %}
|
{% macro render_match_tag(component) %}
|
||||||
{
|
{
|
||||||
(() => {
|
(() => {
|
||||||
switch (JSON.stringify({{ component.cond._var_name }})) {
|
switch (JSON.stringify({{ component.cond._js_expr }})) {
|
||||||
{% for case in component.match_cases %}
|
{% for case in component.match_cases %}
|
||||||
{% for condition in case[:-1] %}
|
{% for condition in case[:-1] %}
|
||||||
case JSON.stringify({{ condition._var_name }}):
|
case JSON.stringify({{ condition._js_expr }}):
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
return {{ case[-1] }};
|
return {{ case[-1] }};
|
||||||
break;
|
break;
|
||||||
|
@ -338,7 +338,6 @@ _SUBMODULES: set[str] = {
|
|||||||
"testing",
|
"testing",
|
||||||
"utils",
|
"utils",
|
||||||
"vars",
|
"vars",
|
||||||
"ivars",
|
|
||||||
"config",
|
"config",
|
||||||
"compiler",
|
"compiler",
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ from . import compiler as compiler
|
|||||||
from . import components as components
|
from . import components as components
|
||||||
from . import config as config
|
from . import config as config
|
||||||
from . import event as event
|
from . import event as event
|
||||||
from . import ivars as ivars
|
|
||||||
from . import model as model
|
from . import model as model
|
||||||
from . import style as style
|
from . import style as style
|
||||||
from . import testing as testing
|
from . import testing as testing
|
||||||
|
@ -824,7 +824,7 @@ class App(MiddlewareMixin, LifespanMixin, Base):
|
|||||||
for dep in deps:
|
for dep in deps:
|
||||||
if dep not in state.vars and dep not in state.backend_vars:
|
if dep not in state.vars and dep not in state.backend_vars:
|
||||||
raise exceptions.VarDependencyError(
|
raise exceptions.VarDependencyError(
|
||||||
f"ComputedVar {var._var_name} on state {state.__name__} has an invalid dependency {dep}"
|
f"ComputedVar {var._js_expr} on state {state.__name__} has an invalid dependency {dep}"
|
||||||
)
|
)
|
||||||
|
|
||||||
for substate in state.class_subclasses:
|
for substate in state.class_subclasses:
|
||||||
@ -1097,7 +1097,6 @@ class App(MiddlewareMixin, LifespanMixin, Base):
|
|||||||
if delta:
|
if delta:
|
||||||
# When the state is modified reset dirty status and emit the delta to the frontend.
|
# When the state is modified reset dirty status and emit the delta to the frontend.
|
||||||
state._clean()
|
state._clean()
|
||||||
print(dir(state.router))
|
|
||||||
await self.event_namespace.emit_update(
|
await self.event_namespace.emit_update(
|
||||||
update=StateUpdate(delta=delta),
|
update=StateUpdate(delta=delta),
|
||||||
sid=state.router.session.session_id,
|
sid=state.router.session.session_id,
|
||||||
|
@ -110,7 +110,7 @@ class Base(BaseModel): # pyright: ignore [reportUnboundVariable]
|
|||||||
var: The variable to add a pydantic field for.
|
var: The variable to add a pydantic field for.
|
||||||
default_value: The default value of the field
|
default_value: The default value of the field
|
||||||
"""
|
"""
|
||||||
var_name = var._var_name.split(".")[-1]
|
var_name = var._js_expr.split(".")[-1]
|
||||||
new_field = ModelField.infer(
|
new_field = ModelField.infer(
|
||||||
name=var_name,
|
name=var_name,
|
||||||
value=default_value,
|
value=default_value,
|
||||||
|
@ -17,12 +17,12 @@ from reflex.components.component import (
|
|||||||
StatefulComponent,
|
StatefulComponent,
|
||||||
)
|
)
|
||||||
from reflex.config import get_config
|
from reflex.config import get_config
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.state import BaseState
|
from reflex.state import BaseState
|
||||||
from reflex.style import SYSTEM_COLOR_MODE
|
from reflex.style import SYSTEM_COLOR_MODE
|
||||||
from reflex.utils.exec import is_prod_mode
|
from reflex.utils.exec import is_prod_mode
|
||||||
from reflex.utils.imports import ImportVar
|
from reflex.utils.imports import ImportVar
|
||||||
from reflex.utils.prerequisites import get_web_dir
|
from reflex.utils.prerequisites import get_web_dir
|
||||||
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
|
||||||
|
|
||||||
def _compile_document_root(root: Component) -> str:
|
def _compile_document_root(root: Component) -> str:
|
||||||
@ -320,7 +320,7 @@ def _compile_tailwind(
|
|||||||
def compile_document_root(
|
def compile_document_root(
|
||||||
head_components: list[Component],
|
head_components: list[Component],
|
||||||
html_lang: Optional[str] = None,
|
html_lang: Optional[str] = None,
|
||||||
html_custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
html_custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
) -> tuple[str, str]:
|
) -> tuple[str, str]:
|
||||||
"""Compile the document root.
|
"""Compile the document root.
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ from pathlib import Path
|
|||||||
from typing import Any, Callable, Dict, Optional, Type, Union
|
from typing import Any, Callable, Dict, Optional, Type, Union
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.utils.prerequisites import get_web_dir
|
from reflex.utils.prerequisites import get_web_dir
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from pydantic.v1.fields import ModelField
|
from pydantic.v1.fields import ModelField
|
||||||
@ -268,7 +268,7 @@ def compile_custom_component(
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Concatenate the props.
|
# Concatenate the props.
|
||||||
props = [prop._var_name for prop in component.get_prop_vars()]
|
props = [prop._js_expr for prop in component.get_prop_vars()]
|
||||||
|
|
||||||
# Compile the component.
|
# Compile the component.
|
||||||
return (
|
return (
|
||||||
@ -286,7 +286,7 @@ def compile_custom_component(
|
|||||||
def create_document_root(
|
def create_document_root(
|
||||||
head_components: list[Component] | None = None,
|
head_components: list[Component] | None = None,
|
||||||
html_lang: Optional[str] = None,
|
html_lang: Optional[str] = None,
|
||||||
html_custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
html_custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
) -> Component:
|
) -> Component:
|
||||||
"""Create the document root.
|
"""Create the document root.
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from reflex.components.base.fragment import Fragment
|
from reflex.components.base.fragment import Fragment
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.ivars.base import ImmutableVar
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
class AppWrap(Fragment):
|
class AppWrap(Fragment):
|
||||||
@ -15,4 +15,4 @@ class AppWrap(Fragment):
|
|||||||
Returns:
|
Returns:
|
||||||
A new AppWrap component containing {children}.
|
A new AppWrap component containing {children}.
|
||||||
"""
|
"""
|
||||||
return super().create(ImmutableVar.create("children"))
|
return super().create(Var(_js_expr="children"))
|
||||||
|
@ -7,8 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.base.fragment import Fragment
|
from reflex.components.base.fragment import Fragment
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class AppWrap(Fragment):
|
class AppWrap(Fragment):
|
||||||
@overload
|
@overload
|
||||||
@ -21,51 +21,41 @@ class AppWrap(Fragment):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "AppWrap":
|
) -> "AppWrap":
|
||||||
|
@ -7,8 +7,7 @@ from typing import Any, Iterator
|
|||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.tags import Tag
|
from reflex.components.tags import Tag
|
||||||
from reflex.components.tags.tagless import Tagless
|
from reflex.components.tags.tagless import Tagless
|
||||||
from reflex.ivars.base import ImmutableVar
|
from reflex.vars.base import Var
|
||||||
from reflex.vars import Var
|
|
||||||
|
|
||||||
|
|
||||||
class Bare(Component):
|
class Bare(Component):
|
||||||
@ -26,18 +25,18 @@ class Bare(Component):
|
|||||||
Returns:
|
Returns:
|
||||||
The component.
|
The component.
|
||||||
"""
|
"""
|
||||||
if isinstance(contents, ImmutableVar):
|
if isinstance(contents, Var):
|
||||||
return cls(contents=contents)
|
return cls(contents=contents)
|
||||||
else:
|
else:
|
||||||
contents = str(contents) if contents is not None else ""
|
contents = str(contents) if contents is not None else ""
|
||||||
return cls(contents=contents) # type: ignore
|
return cls(contents=contents) # type: ignore
|
||||||
|
|
||||||
def _render(self) -> Tag:
|
def _render(self) -> Tag:
|
||||||
if isinstance(self.contents, ImmutableVar):
|
if isinstance(self.contents, Var):
|
||||||
return Tagless(contents=f"{{{str(self.contents)}}}")
|
return Tagless(contents=f"{{{str(self.contents)}}}")
|
||||||
return Tagless(contents=str(self.contents))
|
return Tagless(contents=str(self.contents))
|
||||||
|
|
||||||
def _get_vars(self, include_children: bool = False) -> Iterator[ImmutableVar]:
|
def _get_vars(self, include_children: bool = False) -> Iterator[Var]:
|
||||||
"""Walk all Vars used in this component.
|
"""Walk all Vars used in this component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -7,8 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class Body(Component):
|
class Body(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -21,51 +21,41 @@ class Body(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Body":
|
) -> "Body":
|
||||||
|
@ -7,8 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class NextDocumentLib(Component):
|
class NextDocumentLib(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -21,51 +21,41 @@ class NextDocumentLib(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "NextDocumentLib":
|
) -> "NextDocumentLib":
|
||||||
@ -98,51 +88,41 @@ class Html(NextDocumentLib):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Html":
|
) -> "Html":
|
||||||
@ -174,51 +154,41 @@ class DocumentHead(NextDocumentLib):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DocumentHead":
|
) -> "DocumentHead":
|
||||||
@ -250,51 +220,41 @@ class Main(NextDocumentLib):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Main":
|
) -> "Main":
|
||||||
@ -326,51 +286,41 @@ class NextScript(NextDocumentLib):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "NextScript":
|
) -> "NextScript":
|
||||||
|
@ -9,10 +9,9 @@ from reflex.components.component import Component
|
|||||||
from reflex.components.el import div, p
|
from reflex.components.el import div, p
|
||||||
from reflex.constants import Hooks, Imports
|
from reflex.constants import Hooks, Imports
|
||||||
from reflex.event import EventChain, EventHandler
|
from reflex.event import EventChain, EventHandler
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.ivars.function import FunctionVar
|
|
||||||
from reflex.utils.imports import ImportVar
|
from reflex.utils.imports import ImportVar
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
from reflex.vars.function import FunctionVar
|
||||||
|
|
||||||
|
|
||||||
class ErrorBoundary(Component):
|
class ErrorBoundary(Component):
|
||||||
@ -22,12 +21,12 @@ class ErrorBoundary(Component):
|
|||||||
tag = "ErrorBoundary"
|
tag = "ErrorBoundary"
|
||||||
|
|
||||||
# Fired when the boundary catches an error.
|
# Fired when the boundary catches an error.
|
||||||
on_error: EventHandler[lambda error, info: [error, info]] = ImmutableVar( # type: ignore
|
on_error: EventHandler[lambda error, info: [error, info]] = Var( # type: ignore
|
||||||
"logFrontendError"
|
"logFrontendError"
|
||||||
).to(FunctionVar, EventChain)
|
).to(FunctionVar, EventChain)
|
||||||
|
|
||||||
# Rendered instead of the children when an error is caught.
|
# Rendered instead of the children when an error is caught.
|
||||||
Fallback_component: Var[Component] = ImmutableVar.create_safe("Fallback")._replace(
|
Fallback_component: Var[Component] = Var(_js_expr="Fallback")._replace(
|
||||||
_var_type=Component
|
_var_type=Component
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -39,7 +38,7 @@ class ErrorBoundary(Component):
|
|||||||
"""
|
"""
|
||||||
return Imports.EVENTS
|
return Imports.EVENTS
|
||||||
|
|
||||||
def add_hooks(self) -> List[str | ImmutableVar]:
|
def add_hooks(self) -> List[str | Var]:
|
||||||
"""Add hooks for the component.
|
"""Add hooks for the component.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -58,7 +57,7 @@ class ErrorBoundary(Component):
|
|||||||
fallback_container = div(
|
fallback_container = div(
|
||||||
p("Ooops...Unknown Reflex error has occured:"),
|
p("Ooops...Unknown Reflex error has occured:"),
|
||||||
p(
|
p(
|
||||||
ImmutableVar.create("error.message"),
|
Var(_js_expr="error.message"),
|
||||||
color="red",
|
color="red",
|
||||||
),
|
),
|
||||||
p("Please contact the support."),
|
p("Please contact the support."),
|
||||||
|
@ -7,74 +7,61 @@ from typing import Any, Callable, Dict, List, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils.imports import ImportVar
|
from reflex.utils.imports import ImportVar
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class ErrorBoundary(Component):
|
class ErrorBoundary(Component):
|
||||||
def add_imports(self) -> dict[str, list[ImportVar]]: ...
|
def add_imports(self) -> dict[str, list[ImportVar]]: ...
|
||||||
def add_hooks(self) -> List[str | ImmutableVar]: ...
|
def add_hooks(self) -> List[str | Var]: ...
|
||||||
def add_custom_code(self) -> List[str]: ...
|
def add_custom_code(self) -> List[str]: ...
|
||||||
@overload
|
@overload
|
||||||
@classmethod
|
@classmethod
|
||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
Fallback_component: Optional[Union[Var[Component], Component]] = None,
|
Fallback_component: Optional[Union[Component, Var[Component]]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_error: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ErrorBoundary":
|
) -> "ErrorBoundary":
|
||||||
|
@ -7,8 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class Fragment(Component):
|
class Fragment(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -21,51 +21,41 @@ class Fragment(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Fragment":
|
) -> "Fragment":
|
||||||
|
@ -7,8 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component, MemoizationLeaf
|
from reflex.components.component import Component, MemoizationLeaf
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class NextHeadLib(Component):
|
class NextHeadLib(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -21,51 +21,41 @@ class NextHeadLib(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "NextHeadLib":
|
) -> "NextHeadLib":
|
||||||
@ -97,51 +87,41 @@ class Head(NextHeadLib, MemoizationLeaf):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Head":
|
) -> "Head":
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"""Display the title of the current page."""
|
"""Display the title of the current page."""
|
||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
class RawLink(Component):
|
class RawLink(Component):
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class RawLink(Component):
|
class RawLink(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -24,51 +23,41 @@ class RawLink(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "RawLink":
|
) -> "RawLink":
|
||||||
@ -109,51 +98,41 @@ class ScriptTag(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ScriptTag":
|
) -> "ScriptTag":
|
||||||
|
@ -7,8 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class Title(Component):
|
class Title(Component):
|
||||||
def render(self) -> dict: ...
|
def render(self) -> dict: ...
|
||||||
@ -22,51 +22,41 @@ class Title(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Title":
|
) -> "Title":
|
||||||
@ -103,51 +93,41 @@ class Meta(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Meta":
|
) -> "Meta":
|
||||||
@ -189,51 +169,41 @@ class Description(Meta):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Description":
|
) -> "Description":
|
||||||
@ -275,51 +245,41 @@ class Image(Meta):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Image":
|
) -> "Image":
|
||||||
|
@ -9,8 +9,7 @@ from typing import Literal
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.ivars.base import LiteralVar
|
from reflex.vars.base import LiteralVar, Var
|
||||||
from reflex.vars import Var
|
|
||||||
|
|
||||||
|
|
||||||
class Script(Component):
|
class Script(Component):
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class Script(Component):
|
class Script(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -20,8 +19,8 @@ class Script(Component):
|
|||||||
src: Optional[Union[Var[str], str]] = None,
|
src: Optional[Union[Var[str], str]] = None,
|
||||||
strategy: Optional[
|
strategy: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["afterInteractive", "beforeInteractive", "lazyOnload"]],
|
|
||||||
Literal["afterInteractive", "beforeInteractive", "lazyOnload"],
|
Literal["afterInteractive", "beforeInteractive", "lazyOnload"],
|
||||||
|
Var[Literal["afterInteractive", "beforeInteractive", "lazyOnload"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
@ -29,60 +28,44 @@ class Script(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_error: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_load: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_load: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_ready: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_ready: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Script":
|
) -> "Script":
|
||||||
|
@ -44,7 +44,6 @@ from reflex.event import (
|
|||||||
call_event_handler,
|
call_event_handler,
|
||||||
get_handler_args,
|
get_handler_args,
|
||||||
)
|
)
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.style import Style, format_as_emotion
|
from reflex.style import Style, format_as_emotion
|
||||||
from reflex.utils import format, imports, types
|
from reflex.utils import format, imports, types
|
||||||
from reflex.utils.imports import (
|
from reflex.utils.imports import (
|
||||||
@ -55,7 +54,8 @@ from reflex.utils.imports import (
|
|||||||
parse_imports,
|
parse_imports,
|
||||||
)
|
)
|
||||||
from reflex.utils.serializers import serializer
|
from reflex.utils.serializers import serializer
|
||||||
from reflex.vars import Var, VarData
|
from reflex.vars import VarData
|
||||||
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
|
||||||
|
|
||||||
class BaseComponent(Base, ABC):
|
class BaseComponent(Base, ABC):
|
||||||
@ -180,7 +180,7 @@ class Component(BaseComponent, ABC):
|
|||||||
style: Style = Style()
|
style: Style = Style()
|
||||||
|
|
||||||
# A mapping from event triggers to event chains.
|
# A mapping from event triggers to event chains.
|
||||||
event_triggers: Dict[str, Union[EventChain, ImmutableVar]] = {}
|
event_triggers: Dict[str, Union[EventChain, Var]] = {}
|
||||||
|
|
||||||
# The alias for the tag.
|
# The alias for the tag.
|
||||||
alias: Optional[str] = None
|
alias: Optional[str] = None
|
||||||
@ -198,7 +198,7 @@ class Component(BaseComponent, ABC):
|
|||||||
class_name: Any = None
|
class_name: Any = None
|
||||||
|
|
||||||
# Special component props.
|
# Special component props.
|
||||||
special_props: List[ImmutableVar] = []
|
special_props: List[Var] = []
|
||||||
|
|
||||||
# Whether the component should take the focus once the page is loaded
|
# Whether the component should take the focus once the page is loaded
|
||||||
autofocus: bool = False
|
autofocus: bool = False
|
||||||
@ -216,7 +216,7 @@ class Component(BaseComponent, ABC):
|
|||||||
_rename_props: Dict[str, str] = {}
|
_rename_props: Dict[str, str] = {}
|
||||||
|
|
||||||
# custom attribute
|
# custom attribute
|
||||||
custom_attrs: Dict[str, Union[ImmutableVar, str]] = {}
|
custom_attrs: Dict[str, Union[Var, str]] = {}
|
||||||
|
|
||||||
# When to memoize this component and its children.
|
# When to memoize this component and its children.
|
||||||
_memoization_mode: MemoizationMode = MemoizationMode()
|
_memoization_mode: MemoizationMode = MemoizationMode()
|
||||||
@ -252,7 +252,7 @@ class Component(BaseComponent, ABC):
|
|||||||
"""
|
"""
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
def add_hooks(self) -> list[str | ImmutableVar]:
|
def add_hooks(self) -> list[str | Var]:
|
||||||
"""Add hooks inside the component function.
|
"""Add hooks inside the component function.
|
||||||
|
|
||||||
Hooks are pieces of literal Javascript code that is inserted inside the
|
Hooks are pieces of literal Javascript code that is inserted inside the
|
||||||
@ -407,7 +407,7 @@ class Component(BaseComponent, ABC):
|
|||||||
passed_types = None
|
passed_types = None
|
||||||
try:
|
try:
|
||||||
# Try to create a var from the value.
|
# Try to create a var from the value.
|
||||||
if isinstance(value, ImmutableVar):
|
if isinstance(value, Var):
|
||||||
kwargs[key] = value
|
kwargs[key] = value
|
||||||
else:
|
else:
|
||||||
kwargs[key] = LiteralVar.create(value)
|
kwargs[key] = LiteralVar.create(value)
|
||||||
@ -450,9 +450,7 @@ class Component(BaseComponent, ABC):
|
|||||||
not passed_types
|
not passed_types
|
||||||
and not types._issubclass(passed_type, expected_type, value)
|
and not types._issubclass(passed_type, expected_type, value)
|
||||||
):
|
):
|
||||||
value_name = (
|
value_name = value._js_expr if isinstance(value, Var) else value
|
||||||
value._var_name if isinstance(value, ImmutableVar) else value
|
|
||||||
)
|
|
||||||
raise TypeError(
|
raise TypeError(
|
||||||
f"Invalid var passed for prop {type(self).__name__}.{key}, expected type {expected_type}, got value {value_name} of type {passed_types or passed_type}."
|
f"Invalid var passed for prop {type(self).__name__}.{key}, expected type {expected_type}, got value {value_name} of type {passed_types or passed_type}."
|
||||||
)
|
)
|
||||||
@ -502,9 +500,13 @@ class Component(BaseComponent, ABC):
|
|||||||
self,
|
self,
|
||||||
args_spec: Any,
|
args_spec: Any,
|
||||||
value: Union[
|
value: Union[
|
||||||
Var, EventHandler, EventSpec, List[Union[EventHandler, EventSpec]], Callable
|
Var,
|
||||||
|
EventHandler,
|
||||||
|
EventSpec,
|
||||||
|
List[Union[EventHandler, EventSpec]],
|
||||||
|
Callable,
|
||||||
],
|
],
|
||||||
) -> Union[EventChain, ImmutableVar]:
|
) -> Union[EventChain, Var]:
|
||||||
"""Create an event chain from a variety of input types.
|
"""Create an event chain from a variety of input types.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -518,7 +520,7 @@ class Component(BaseComponent, ABC):
|
|||||||
ValueError: If the value is not a valid event chain.
|
ValueError: If the value is not a valid event chain.
|
||||||
"""
|
"""
|
||||||
# If it's an event chain var, return it.
|
# If it's an event chain var, return it.
|
||||||
if isinstance(value, ImmutableVar):
|
if isinstance(value, Var):
|
||||||
if value._var_type is not EventChain:
|
if value._var_type is not EventChain:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Invalid event chain: {repr(value)} of type {type(value)}"
|
f"Invalid event chain: {repr(value)} of type {type(value)}"
|
||||||
@ -542,7 +544,7 @@ class Component(BaseComponent, ABC):
|
|||||||
elif isinstance(v, Callable):
|
elif isinstance(v, Callable):
|
||||||
# Call the lambda to get the event chain.
|
# Call the lambda to get the event chain.
|
||||||
result = call_event_fn(v, args_spec)
|
result = call_event_fn(v, args_spec)
|
||||||
if isinstance(result, ImmutableVar):
|
if isinstance(result, Var):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Invalid event chain: {v}. Cannot use a Var-returning "
|
f"Invalid event chain: {v}. Cannot use a Var-returning "
|
||||||
"lambda inside an EventChain list."
|
"lambda inside an EventChain list."
|
||||||
@ -554,7 +556,7 @@ class Component(BaseComponent, ABC):
|
|||||||
# If the input is a callable, create an event chain.
|
# If the input is a callable, create an event chain.
|
||||||
elif isinstance(value, Callable):
|
elif isinstance(value, Callable):
|
||||||
result = call_event_fn(value, args_spec)
|
result = call_event_fn(value, args_spec)
|
||||||
if isinstance(result, ImmutableVar):
|
if isinstance(result, Var):
|
||||||
# Recursively call this function if the lambda returned an EventChain Var.
|
# Recursively call this function if the lambda returned an EventChain Var.
|
||||||
return self._create_event_chain(args_spec, result)
|
return self._create_event_chain(args_spec, result)
|
||||||
events = result
|
events = result
|
||||||
@ -572,7 +574,7 @@ class Component(BaseComponent, ABC):
|
|||||||
event_actions.update(e.event_actions)
|
event_actions.update(e.event_actions)
|
||||||
|
|
||||||
# Return the event chain.
|
# Return the event chain.
|
||||||
if isinstance(args_spec, ImmutableVar):
|
if isinstance(args_spec, Var):
|
||||||
return EventChain(
|
return EventChain(
|
||||||
events=events,
|
events=events,
|
||||||
args_spec=None,
|
args_spec=None,
|
||||||
@ -672,7 +674,7 @@ class Component(BaseComponent, ABC):
|
|||||||
# Add ref to element if `id` is not None.
|
# Add ref to element if `id` is not None.
|
||||||
ref = self.get_ref()
|
ref = self.get_ref()
|
||||||
if ref is not None:
|
if ref is not None:
|
||||||
props["ref"] = ImmutableVar.create(ref)
|
props["ref"] = Var(_js_expr=ref)
|
||||||
else:
|
else:
|
||||||
props = props.copy()
|
props = props.copy()
|
||||||
|
|
||||||
@ -885,7 +887,7 @@ class Component(BaseComponent, ABC):
|
|||||||
Returns:
|
Returns:
|
||||||
The dictionary of the component style as value and the style notation as key.
|
The dictionary of the component style as value and the style notation as key.
|
||||||
"""
|
"""
|
||||||
if isinstance(self.style, ImmutableVar):
|
if isinstance(self.style, Var):
|
||||||
return {"css": self.style}
|
return {"css": self.style}
|
||||||
emotion_style = format_as_emotion(self.style)
|
emotion_style = format_as_emotion(self.style)
|
||||||
return (
|
return (
|
||||||
@ -1001,8 +1003,8 @@ class Component(BaseComponent, ABC):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_vars_from_event_triggers(
|
def _get_vars_from_event_triggers(
|
||||||
event_triggers: dict[str, EventChain | ImmutableVar],
|
event_triggers: dict[str, EventChain | Var],
|
||||||
) -> Iterator[tuple[str, list[ImmutableVar]]]:
|
) -> Iterator[tuple[str, list[Var]]]:
|
||||||
"""Get the Vars associated with each event trigger.
|
"""Get the Vars associated with each event trigger.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1012,7 +1014,7 @@ class Component(BaseComponent, ABC):
|
|||||||
tuple of (event_name, event_vars)
|
tuple of (event_name, event_vars)
|
||||||
"""
|
"""
|
||||||
for event_trigger, event in event_triggers.items():
|
for event_trigger, event in event_triggers.items():
|
||||||
if isinstance(event, ImmutableVar):
|
if isinstance(event, Var):
|
||||||
yield event_trigger, [event]
|
yield event_trigger, [event]
|
||||||
elif isinstance(event, EventChain):
|
elif isinstance(event, EventChain):
|
||||||
event_args = []
|
event_args = []
|
||||||
@ -1021,7 +1023,7 @@ class Component(BaseComponent, ABC):
|
|||||||
event_args.extend(args)
|
event_args.extend(args)
|
||||||
yield event_trigger, event_args
|
yield event_trigger, event_args
|
||||||
|
|
||||||
def _get_vars(self, include_children: bool = False) -> list[ImmutableVar]:
|
def _get_vars(self, include_children: bool = False) -> list[Var]:
|
||||||
"""Walk all Vars used in this component.
|
"""Walk all Vars used in this component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1041,18 +1043,14 @@ class Component(BaseComponent, ABC):
|
|||||||
# Get Vars associated with component props.
|
# Get Vars associated with component props.
|
||||||
for prop in self.get_props():
|
for prop in self.get_props():
|
||||||
prop_var = getattr(self, prop)
|
prop_var = getattr(self, prop)
|
||||||
if isinstance(prop_var, ImmutableVar):
|
if isinstance(prop_var, Var):
|
||||||
vars.append(prop_var)
|
vars.append(prop_var)
|
||||||
|
|
||||||
# Style keeps track of its own VarData instance, so embed in a temp Var that is yielded.
|
# Style keeps track of its own VarData instance, so embed in a temp Var that is yielded.
|
||||||
if (
|
if isinstance(self.style, dict) and self.style or isinstance(self.style, Var):
|
||||||
isinstance(self.style, dict)
|
|
||||||
and self.style
|
|
||||||
or isinstance(self.style, ImmutableVar)
|
|
||||||
):
|
|
||||||
vars.append(
|
vars.append(
|
||||||
ImmutableVar(
|
Var(
|
||||||
_var_name="style",
|
_js_expr="style",
|
||||||
_var_type=str,
|
_var_type=str,
|
||||||
_var_data=VarData.merge(self.style._var_data),
|
_var_data=VarData.merge(self.style._var_data),
|
||||||
)
|
)
|
||||||
@ -1069,7 +1067,7 @@ class Component(BaseComponent, ABC):
|
|||||||
self.autofocus,
|
self.autofocus,
|
||||||
*self.custom_attrs.values(),
|
*self.custom_attrs.values(),
|
||||||
):
|
):
|
||||||
if isinstance(comp_prop, ImmutableVar):
|
if isinstance(comp_prop, Var):
|
||||||
vars.append(comp_prop)
|
vars.append(comp_prop)
|
||||||
elif isinstance(comp_prop, str):
|
elif isinstance(comp_prop, str):
|
||||||
# Collapse VarData encoded in f-strings.
|
# Collapse VarData encoded in f-strings.
|
||||||
@ -1098,7 +1096,7 @@ class Component(BaseComponent, ABC):
|
|||||||
for event in trigger.events:
|
for event in trigger.events:
|
||||||
if event.handler.state_full_name:
|
if event.handler.state_full_name:
|
||||||
return True
|
return True
|
||||||
elif isinstance(trigger, ImmutableVar) and trigger._var_state:
|
elif isinstance(trigger, Var) and trigger._var_state:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -1290,7 +1288,7 @@ class Component(BaseComponent, ABC):
|
|||||||
user_hooks = self._get_hooks()
|
user_hooks = self._get_hooks()
|
||||||
user_hooks_data = (
|
user_hooks_data = (
|
||||||
VarData.merge(user_hooks._get_all_var_data())
|
VarData.merge(user_hooks._get_all_var_data())
|
||||||
if user_hooks is not None and isinstance(user_hooks, ImmutableVar)
|
if user_hooks is not None and isinstance(user_hooks, Var)
|
||||||
else None
|
else None
|
||||||
)
|
)
|
||||||
if user_hooks_data is not None:
|
if user_hooks_data is not None:
|
||||||
@ -1393,7 +1391,7 @@ class Component(BaseComponent, ABC):
|
|||||||
"""
|
"""
|
||||||
ref = self.get_ref()
|
ref = self.get_ref()
|
||||||
if ref is not None:
|
if ref is not None:
|
||||||
return f"const {ref} = useRef(null); {str(ImmutableVar.create_safe(ref).as_ref())} = {ref};"
|
return f"const {ref} = useRef(null); {str(Var(_js_expr=ref).as_ref())} = {ref};"
|
||||||
|
|
||||||
def _get_vars_hooks(self) -> dict[str, None]:
|
def _get_vars_hooks(self) -> dict[str, None]:
|
||||||
"""Get the hooks required by vars referenced in this component.
|
"""Get the hooks required by vars referenced in this component.
|
||||||
@ -1456,7 +1454,7 @@ class Component(BaseComponent, ABC):
|
|||||||
"""
|
"""
|
||||||
code = {}
|
code = {}
|
||||||
|
|
||||||
def extract_var_hooks(hook: ImmutableVar):
|
def extract_var_hooks(hook: Var):
|
||||||
_imports = {}
|
_imports = {}
|
||||||
var_data = VarData.merge(hook._get_all_var_data())
|
var_data = VarData.merge(hook._get_all_var_data())
|
||||||
if var_data is not None:
|
if var_data is not None:
|
||||||
@ -1473,7 +1471,7 @@ class Component(BaseComponent, ABC):
|
|||||||
# the order of the hooks in the final output)
|
# the order of the hooks in the final output)
|
||||||
for clz in reversed(tuple(self._iter_parent_classes_with_method("add_hooks"))):
|
for clz in reversed(tuple(self._iter_parent_classes_with_method("add_hooks"))):
|
||||||
for hook in clz.add_hooks(self):
|
for hook in clz.add_hooks(self):
|
||||||
if isinstance(hook, ImmutableVar):
|
if isinstance(hook, Var):
|
||||||
extract_var_hooks(hook)
|
extract_var_hooks(hook)
|
||||||
else:
|
else:
|
||||||
code[hook] = {}
|
code[hook] = {}
|
||||||
@ -1534,7 +1532,7 @@ class Component(BaseComponent, ABC):
|
|||||||
The ref name.
|
The ref name.
|
||||||
"""
|
"""
|
||||||
# do not create a ref if the id is dynamic or unspecified
|
# do not create a ref if the id is dynamic or unspecified
|
||||||
if self.id is None or isinstance(self.id, ImmutableVar):
|
if self.id is None or isinstance(self.id, Var):
|
||||||
return None
|
return None
|
||||||
return format.format_ref(self.id)
|
return format.format_ref(self.id)
|
||||||
|
|
||||||
@ -1773,15 +1771,15 @@ class CustomComponent(Component):
|
|||||||
"""
|
"""
|
||||||
return super()._render(props=self.props)
|
return super()._render(props=self.props)
|
||||||
|
|
||||||
def get_prop_vars(self) -> List[ImmutableVar]:
|
def get_prop_vars(self) -> List[Var]:
|
||||||
"""Get the prop vars.
|
"""Get the prop vars.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The prop vars.
|
The prop vars.
|
||||||
"""
|
"""
|
||||||
return [
|
return [
|
||||||
ImmutableVar(
|
Var(
|
||||||
_var_name=name,
|
_js_expr=name,
|
||||||
_var_type=(
|
_var_type=(
|
||||||
prop._var_type if types._isinstance(prop, Var) else type(prop)
|
prop._var_type if types._isinstance(prop, Var) else type(prop)
|
||||||
),
|
),
|
||||||
@ -1789,7 +1787,7 @@ class CustomComponent(Component):
|
|||||||
for name, prop in self.props.items()
|
for name, prop in self.props.items()
|
||||||
]
|
]
|
||||||
|
|
||||||
def _get_vars(self, include_children: bool = False) -> list[ImmutableVar]:
|
def _get_vars(self, include_children: bool = False) -> list[Var]:
|
||||||
"""Walk all Vars used in this component.
|
"""Walk all Vars used in this component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1800,7 +1798,7 @@ class CustomComponent(Component):
|
|||||||
"""
|
"""
|
||||||
return (
|
return (
|
||||||
super()._get_vars(include_children=include_children)
|
super()._get_vars(include_children=include_children)
|
||||||
+ [prop for prop in self.props.values() if isinstance(prop, ImmutableVar)]
|
+ [prop for prop in self.props.values() if isinstance(prop, Var)]
|
||||||
+ self.get_component(self)._get_vars(include_children=include_children)
|
+ self.get_component(self)._get_vars(include_children=include_children)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1971,7 +1969,7 @@ class StatefulComponent(BaseComponent):
|
|||||||
should_memoize = True
|
should_memoize = True
|
||||||
break
|
break
|
||||||
child = cls._child_var(child)
|
child = cls._child_var(child)
|
||||||
if isinstance(child, ImmutableVar) and child._get_all_var_data():
|
if isinstance(child, Var) and child._get_all_var_data():
|
||||||
should_memoize = True
|
should_memoize = True
|
||||||
break
|
break
|
||||||
|
|
||||||
@ -2127,7 +2125,7 @@ class StatefulComponent(BaseComponent):
|
|||||||
def _get_memoized_event_triggers(
|
def _get_memoized_event_triggers(
|
||||||
cls,
|
cls,
|
||||||
component: Component,
|
component: Component,
|
||||||
) -> dict[str, tuple[ImmutableVar, str]]:
|
) -> dict[str, tuple[Var, str]]:
|
||||||
"""Memoize event handler functions with useCallback to avoid unnecessary re-renders.
|
"""Memoize event handler functions with useCallback to avoid unnecessary re-renders.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -2174,7 +2172,7 @@ class StatefulComponent(BaseComponent):
|
|||||||
|
|
||||||
# Store the memoized function name and hook code for this event trigger.
|
# Store the memoized function name and hook code for this event trigger.
|
||||||
trigger_memo[event_trigger] = (
|
trigger_memo[event_trigger] = (
|
||||||
ImmutableVar.create_safe(memo_name)._replace(
|
Var(_js_expr=memo_name)._replace(
|
||||||
_var_type=EventChain, merge_var_data=memo_var_data
|
_var_type=EventChain, merge_var_data=memo_var_data
|
||||||
),
|
),
|
||||||
f"const {memo_name} = useCallback({rendered_chain}, [{', '.join(var_deps)}])",
|
f"const {memo_name} = useCallback({rendered_chain}, [{', '.join(var_deps)}])",
|
||||||
|
@ -18,56 +18,52 @@ from reflex.components.radix.themes.typography.text import Text
|
|||||||
from reflex.components.sonner.toast import Toaster, ToastProps
|
from reflex.components.sonner.toast import Toaster, ToastProps
|
||||||
from reflex.constants import Dirs, Hooks, Imports
|
from reflex.constants import Dirs, Hooks, Imports
|
||||||
from reflex.constants.compiler import CompileVars
|
from reflex.constants.compiler import CompileVars
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.ivars.function import FunctionStringVar
|
|
||||||
from reflex.ivars.number import BooleanVar
|
|
||||||
from reflex.ivars.sequence import LiteralArrayVar
|
|
||||||
from reflex.utils.imports import ImportVar
|
from reflex.utils.imports import ImportVar
|
||||||
from reflex.vars import Var, VarData
|
from reflex.vars import VarData
|
||||||
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
from reflex.vars.function import FunctionStringVar
|
||||||
|
from reflex.vars.number import BooleanVar
|
||||||
|
from reflex.vars.sequence import LiteralArrayVar
|
||||||
|
|
||||||
connect_error_var_data: VarData = VarData( # type: ignore
|
connect_error_var_data: VarData = VarData( # type: ignore
|
||||||
imports=Imports.EVENTS,
|
imports=Imports.EVENTS,
|
||||||
hooks={Hooks.EVENTS: None},
|
hooks={Hooks.EVENTS: None},
|
||||||
)
|
)
|
||||||
|
|
||||||
connect_errors: Var = ImmutableVar.create_safe(
|
connect_errors = Var(
|
||||||
value=CompileVars.CONNECT_ERROR,
|
_js_expr=CompileVars.CONNECT_ERROR, _var_data=connect_error_var_data
|
||||||
|
)
|
||||||
|
|
||||||
|
connection_error = Var(
|
||||||
|
_js_expr="((connectErrors.length > 0) ? connectErrors[connectErrors.length - 1].message : '')",
|
||||||
_var_data=connect_error_var_data,
|
_var_data=connect_error_var_data,
|
||||||
)
|
)
|
||||||
|
|
||||||
connection_error: Var = ImmutableVar.create_safe(
|
connection_errors_count = Var(
|
||||||
value="((connectErrors.length > 0) ? connectErrors[connectErrors.length - 1].message : '')",
|
_js_expr="connectErrors.length", _var_data=connect_error_var_data
|
||||||
_var_data=connect_error_var_data,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
connection_errors_count: Var = ImmutableVar.create_safe(
|
has_connection_errors = Var(
|
||||||
value="connectErrors.length",
|
_js_expr="(connectErrors.length > 0)", _var_data=connect_error_var_data
|
||||||
_var_data=connect_error_var_data,
|
|
||||||
)
|
|
||||||
|
|
||||||
has_connection_errors: Var = ImmutableVar.create_safe(
|
|
||||||
value="(connectErrors.length > 0)",
|
|
||||||
_var_data=connect_error_var_data,
|
|
||||||
).to(BooleanVar)
|
).to(BooleanVar)
|
||||||
|
|
||||||
has_too_many_connection_errors: Var = ImmutableVar.create_safe(
|
has_too_many_connection_errors = Var(
|
||||||
value="(connectErrors.length >= 2)",
|
_js_expr="(connectErrors.length >= 2)", _var_data=connect_error_var_data
|
||||||
_var_data=connect_error_var_data,
|
|
||||||
).to(BooleanVar)
|
).to(BooleanVar)
|
||||||
|
|
||||||
|
|
||||||
class WebsocketTargetURL(ImmutableVar):
|
class WebsocketTargetURL(Var):
|
||||||
"""A component that renders the websocket target URL."""
|
"""A component that renders the websocket target URL."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls) -> ImmutableVar:
|
def create(cls) -> Var:
|
||||||
"""Create a websocket target URL component.
|
"""Create a websocket target URL component.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The websocket target URL component.
|
The websocket target URL component.
|
||||||
"""
|
"""
|
||||||
return ImmutableVar(
|
return Var(
|
||||||
_var_name="getBackendURL(env.EVENT).href",
|
_js_expr="getBackendURL(env.EVENT).href",
|
||||||
_var_data=VarData(
|
_var_data=VarData(
|
||||||
imports={
|
imports={
|
||||||
"/env.json": [ImportVar(tag="env", is_default=True)],
|
"/env.json": [ImportVar(tag="env", is_default=True)],
|
||||||
@ -95,7 +91,7 @@ def default_connection_error() -> list[str | Var | Component]:
|
|||||||
class ConnectionToaster(Toaster):
|
class ConnectionToaster(Toaster):
|
||||||
"""A connection toaster component."""
|
"""A connection toaster component."""
|
||||||
|
|
||||||
def add_hooks(self) -> list[str | ImmutableVar]:
|
def add_hooks(self) -> list[str | Var]:
|
||||||
"""Add the hooks for the connection toaster.
|
"""Add the hooks for the connection toaster.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -125,8 +121,8 @@ class ConnectionToaster(Toaster):
|
|||||||
),
|
),
|
||||||
).call(
|
).call(
|
||||||
# TODO: This breaks the assumption that Vars are JS expressions
|
# TODO: This breaks the assumption that Vars are JS expressions
|
||||||
ImmutableVar.create_safe(
|
Var(
|
||||||
f"""
|
_js_expr=f"""
|
||||||
() => {{
|
() => {{
|
||||||
if ({str(has_too_many_connection_errors)}) {{
|
if ({str(has_too_many_connection_errors)}) {{
|
||||||
if (!userDismissed) {{
|
if (!userDismissed) {{
|
||||||
@ -238,7 +234,7 @@ class WifiOffPulse(Icon):
|
|||||||
Returns:
|
Returns:
|
||||||
The icon component with default props applied.
|
The icon component with default props applied.
|
||||||
"""
|
"""
|
||||||
pulse_var = ImmutableVar.create("pulse")
|
pulse_var = Var(_js_expr="pulse")
|
||||||
return super().create(
|
return super().create(
|
||||||
"wifi_off",
|
"wifi_off",
|
||||||
color=props.pop("color", "crimson"),
|
color=props.pop("color", "crimson"),
|
||||||
|
@ -9,27 +9,40 @@ from reflex.components.component import Component
|
|||||||
from reflex.components.el.elements.typography import Div
|
from reflex.components.el.elements.typography import Div
|
||||||
from reflex.components.lucide.icon import Icon
|
from reflex.components.lucide.icon import Icon
|
||||||
from reflex.components.sonner.toast import Toaster, ToastProps
|
from reflex.components.sonner.toast import Toaster, ToastProps
|
||||||
|
from reflex.constants.compiler import CompileVars
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils.imports import ImportVar
|
from reflex.utils.imports import ImportVar
|
||||||
from reflex.vars import Var, VarData
|
from reflex.vars import VarData
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
from reflex.vars.number import BooleanVar
|
||||||
|
|
||||||
connect_error_var_data: VarData
|
connect_error_var_data: VarData
|
||||||
connect_errors: Var
|
connect_errors = Var(
|
||||||
connection_error: Var
|
_js_expr=CompileVars.CONNECT_ERROR, _var_data=connect_error_var_data
|
||||||
connection_errors_count: Var
|
)
|
||||||
has_connection_errors: Var
|
connection_error = Var(
|
||||||
has_too_many_connection_errors: Var
|
_js_expr="((connectErrors.length > 0) ? connectErrors[connectErrors.length - 1].message : '')",
|
||||||
|
_var_data=connect_error_var_data,
|
||||||
|
)
|
||||||
|
connection_errors_count = Var(
|
||||||
|
_js_expr="connectErrors.length", _var_data=connect_error_var_data
|
||||||
|
)
|
||||||
|
has_connection_errors = Var(
|
||||||
|
_js_expr="(connectErrors.length > 0)", _var_data=connect_error_var_data
|
||||||
|
).to(BooleanVar)
|
||||||
|
has_too_many_connection_errors = Var(
|
||||||
|
_js_expr="(connectErrors.length >= 2)", _var_data=connect_error_var_data
|
||||||
|
).to(BooleanVar)
|
||||||
|
|
||||||
class WebsocketTargetURL(ImmutableVar):
|
class WebsocketTargetURL(Var):
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls) -> ImmutableVar: ... # type: ignore
|
def create(cls) -> Var: ... # type: ignore
|
||||||
|
|
||||||
def default_connection_error() -> list[str | Var | Component]: ...
|
def default_connection_error() -> list[str | Var | Component]: ...
|
||||||
|
|
||||||
class ConnectionToaster(Toaster):
|
class ConnectionToaster(Toaster):
|
||||||
def add_hooks(self) -> list[str | ImmutableVar]: ...
|
def add_hooks(self) -> list[str | Var]: ...
|
||||||
@overload
|
@overload
|
||||||
@classmethod
|
@classmethod
|
||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
@ -41,24 +54,24 @@ class ConnectionToaster(Toaster):
|
|||||||
visible_toasts: Optional[Union[Var[int], int]] = None,
|
visible_toasts: Optional[Union[Var[int], int]] = None,
|
||||||
position: Optional[
|
position: Optional[
|
||||||
Union[
|
Union[
|
||||||
|
Literal[
|
||||||
|
"bottom-center",
|
||||||
|
"bottom-left",
|
||||||
|
"bottom-right",
|
||||||
|
"top-center",
|
||||||
|
"top-left",
|
||||||
|
"top-right",
|
||||||
|
],
|
||||||
Var[
|
Var[
|
||||||
Literal[
|
Literal[
|
||||||
"top-left",
|
|
||||||
"top-center",
|
|
||||||
"top-right",
|
|
||||||
"bottom-left",
|
|
||||||
"bottom-center",
|
"bottom-center",
|
||||||
|
"bottom-left",
|
||||||
"bottom-right",
|
"bottom-right",
|
||||||
|
"top-center",
|
||||||
|
"top-left",
|
||||||
|
"top-right",
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
Literal[
|
|
||||||
"top-left",
|
|
||||||
"top-center",
|
|
||||||
"top-right",
|
|
||||||
"bottom-left",
|
|
||||||
"bottom-center",
|
|
||||||
"bottom-right",
|
|
||||||
],
|
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
close_button: Optional[Union[Var[bool], bool]] = None,
|
close_button: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -66,60 +79,50 @@ class ConnectionToaster(Toaster):
|
|||||||
dir: Optional[Union[Var[str], str]] = None,
|
dir: Optional[Union[Var[str], str]] = None,
|
||||||
hotkey: Optional[Union[Var[str], str]] = None,
|
hotkey: Optional[Union[Var[str], str]] = None,
|
||||||
invert: Optional[Union[Var[bool], bool]] = None,
|
invert: Optional[Union[Var[bool], bool]] = None,
|
||||||
toast_options: Optional[Union[Var[ToastProps], ToastProps]] = None,
|
toast_options: Optional[Union[ToastProps, Var[ToastProps]]] = None,
|
||||||
gap: Optional[Union[Var[int], int]] = None,
|
gap: Optional[Union[Var[int], int]] = None,
|
||||||
loading_icon: Optional[Union[Var[Icon], Icon]] = None,
|
loading_icon: Optional[Union[Icon, Var[Icon]]] = None,
|
||||||
pause_when_page_is_hidden: Optional[Union[Var[bool], bool]] = None,
|
pause_when_page_is_hidden: Optional[Union[Var[bool], bool]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ConnectionToaster":
|
) -> "ConnectionToaster":
|
||||||
@ -165,51 +168,41 @@ class ConnectionBanner(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ConnectionBanner":
|
) -> "ConnectionBanner":
|
||||||
@ -234,51 +227,41 @@ class ConnectionModal(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ConnectionModal":
|
) -> "ConnectionModal":
|
||||||
@ -304,51 +287,41 @@ class WifiOffPulse(Icon):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "WifiOffPulse":
|
) -> "WifiOffPulse":
|
||||||
@ -378,80 +351,70 @@ class ConnectionPulser(Div):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ConnectionPulser":
|
) -> "ConnectionPulser":
|
||||||
|
@ -13,10 +13,9 @@ from __future__ import annotations
|
|||||||
from reflex import constants
|
from reflex import constants
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.core.cond import cond
|
from reflex.components.core.cond import cond
|
||||||
from reflex.ivars.base import ImmutableVar
|
from reflex.vars.base import Var
|
||||||
from reflex.vars import Var
|
|
||||||
|
|
||||||
route_not_found: Var = ImmutableVar.create_safe(constants.ROUTE_NOT_FOUND)
|
route_not_found: Var = Var(_js_expr=constants.ROUTE_NOT_FOUND)
|
||||||
|
|
||||||
|
|
||||||
class ClientSideRouting(Component):
|
class ClientSideRouting(Component):
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
route_not_found: Var
|
route_not_found: Var
|
||||||
|
|
||||||
@ -26,51 +25,41 @@ class ClientSideRouting(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ClientSideRouting":
|
) -> "ClientSideRouting":
|
||||||
@ -105,51 +94,41 @@ class Default404Page(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Default404Page":
|
) -> "Default404Page":
|
||||||
|
@ -9,7 +9,8 @@ from reflex.components.tags.tag import Tag
|
|||||||
from reflex.event import EventChain, EventHandler
|
from reflex.event import EventChain, EventHandler
|
||||||
from reflex.utils.format import format_prop, wrap
|
from reflex.utils.format import format_prop, wrap
|
||||||
from reflex.utils.imports import ImportVar
|
from reflex.utils.imports import ImportVar
|
||||||
from reflex.vars import Var, get_unique_variable_name
|
from reflex.vars import get_unique_variable_name
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
class Clipboard(Fragment):
|
class Clipboard(Fragment):
|
||||||
|
@ -7,10 +7,9 @@ from typing import Any, Callable, Dict, List, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.base.fragment import Fragment
|
from reflex.components.base.fragment import Fragment
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils.imports import ImportVar
|
from reflex.utils.imports import ImportVar
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class Clipboard(Fragment):
|
class Clipboard(Fragment):
|
||||||
@overload
|
@overload
|
||||||
@ -18,63 +17,51 @@ class Clipboard(Fragment):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
targets: Optional[Union[Var[List[str]], List[str]]] = None,
|
targets: Optional[Union[List[str], Var[List[str]]]] = None,
|
||||||
on_paste_event_actions: Optional[
|
on_paste_event_actions: Optional[
|
||||||
Union[Var[Dict[str, Union[bool, int]]], Dict[str, Union[bool, int]]]
|
Union[Dict[str, Union[bool, int]], Var[Dict[str, Union[bool, int]]]]
|
||||||
] = None,
|
] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_paste: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_paste: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Clipboard":
|
) -> "Clipboard":
|
||||||
|
@ -8,11 +8,11 @@ from reflex.components.base.fragment import Fragment
|
|||||||
from reflex.components.component import BaseComponent, Component, MemoizationLeaf
|
from reflex.components.component import BaseComponent, Component, MemoizationLeaf
|
||||||
from reflex.components.tags import CondTag, Tag
|
from reflex.components.tags import CondTag, Tag
|
||||||
from reflex.constants import Dirs
|
from reflex.constants import Dirs
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.ivars.number import ternary_operation
|
|
||||||
from reflex.style import LIGHT_COLOR_MODE, resolved_color_mode
|
from reflex.style import LIGHT_COLOR_MODE, resolved_color_mode
|
||||||
from reflex.utils.imports import ImportDict, ImportVar
|
from reflex.utils.imports import ImportDict, ImportVar
|
||||||
from reflex.vars import Var, VarData
|
from reflex.vars import VarData
|
||||||
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
from reflex.vars.number import ternary_operation
|
||||||
|
|
||||||
_IS_TRUE_IMPORT: ImportDict = {
|
_IS_TRUE_IMPORT: ImportDict = {
|
||||||
f"/{Dirs.STATE_PATH}": [ImportVar(tag="isTrue")],
|
f"/{Dirs.STATE_PATH}": [ImportVar(tag="isTrue")],
|
||||||
@ -119,10 +119,10 @@ def cond(condition: Any, c1: Component) -> Component: ...
|
|||||||
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def cond(condition: Any, c1: Any, c2: Any) -> ImmutableVar: ...
|
def cond(condition: Any, c1: Any, c2: Any) -> Var: ...
|
||||||
|
|
||||||
|
|
||||||
def cond(condition: Any, c1: Any, c2: Any = None) -> Component | ImmutableVar:
|
def cond(condition: Any, c1: Any, c2: Any = None) -> Component | Var:
|
||||||
"""Create a conditional component or Prop.
|
"""Create a conditional component or Prop.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -7,8 +7,8 @@ from typing import Any, Type, Union
|
|||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.constants import EventTriggers
|
from reflex.constants import EventTriggers
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.ivars.base import ImmutableVar
|
from reflex.vars import VarData
|
||||||
from reflex.vars import Var, VarData
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
DEFAULT_DEBOUNCE_TIMEOUT = 300
|
DEFAULT_DEBOUNCE_TIMEOUT = 300
|
||||||
|
|
||||||
@ -107,14 +107,14 @@ class DebounceInput(Component):
|
|||||||
props[field] = getattr(child, field)
|
props[field] = getattr(child, field)
|
||||||
child_ref = child.get_ref()
|
child_ref = child.get_ref()
|
||||||
if props.get("input_ref") is None and child_ref:
|
if props.get("input_ref") is None and child_ref:
|
||||||
props["input_ref"] = ImmutableVar.create_safe(child_ref)
|
props["input_ref"] = Var(_js_expr=child_ref, _var_type=str)
|
||||||
props["id"] = child.id
|
props["id"] = child.id
|
||||||
|
|
||||||
# Set the child element to wrap, including any imports/hooks from the child.
|
# Set the child element to wrap, including any imports/hooks from the child.
|
||||||
props.setdefault(
|
props.setdefault(
|
||||||
"element",
|
"element",
|
||||||
ImmutableVar(
|
Var(
|
||||||
_var_name=str(child.alias or child.tag),
|
_js_expr=str(child.alias or child.tag),
|
||||||
_var_type=Type[Component],
|
_var_type=Type[Component],
|
||||||
_var_data=VarData(
|
_var_data=VarData(
|
||||||
imports=child._get_imports(),
|
imports=child._get_imports(),
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Optional, Type, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
DEFAULT_DEBOUNCE_TIMEOUT = 300
|
DEFAULT_DEBOUNCE_TIMEOUT = 300
|
||||||
|
|
||||||
@ -23,62 +22,50 @@ class DebounceInput(Component):
|
|||||||
debounce_timeout: Optional[Union[Var[int], int]] = None,
|
debounce_timeout: Optional[Union[Var[int], int]] = None,
|
||||||
force_notify_by_enter: Optional[Union[Var[bool], bool]] = None,
|
force_notify_by_enter: Optional[Union[Var[bool], bool]] = None,
|
||||||
force_notify_on_blur: Optional[Union[Var[bool], bool]] = None,
|
force_notify_on_blur: Optional[Union[Var[bool], bool]] = None,
|
||||||
value: Optional[Union[Var[Union[float, int, str]], str, int, float]] = None,
|
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||||
input_ref: Optional[Union[Var[str], str]] = None,
|
input_ref: Optional[Union[Var[str], str]] = None,
|
||||||
element: Optional[Union[Var[Type[Component]], Type[Component]]] = None,
|
element: Optional[Union[Type[Component], Var[Type[Component]]]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_change: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DebounceInput":
|
) -> "DebounceInput":
|
||||||
|
@ -9,9 +9,8 @@ from reflex.components.base.fragment import Fragment
|
|||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.tags import IterTag
|
from reflex.components.tags import IterTag
|
||||||
from reflex.constants import MemoizationMode
|
from reflex.constants import MemoizationMode
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.state import ComponentState
|
from reflex.state import ComponentState
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
|
||||||
|
|
||||||
class ForeachVarError(TypeError):
|
class ForeachVarError(TypeError):
|
||||||
@ -52,7 +51,7 @@ class Foreach(Component):
|
|||||||
ForeachVarError: If the iterable is of type Any.
|
ForeachVarError: If the iterable is of type Any.
|
||||||
TypeError: If the render function is a ComponentState.
|
TypeError: If the render function is a ComponentState.
|
||||||
"""
|
"""
|
||||||
iterable = ImmutableVar.create_safe(iterable)
|
iterable = LiteralVar.create(iterable)
|
||||||
if iterable._var_type == Any:
|
if iterable._var_type == Any:
|
||||||
raise ForeachVarError(
|
raise ForeachVarError(
|
||||||
f"Could not foreach over var `{str(iterable)}` of type Any. "
|
f"Could not foreach over var `{str(iterable)}` of type Any. "
|
||||||
@ -130,7 +129,7 @@ class Foreach(Component):
|
|||||||
iterable_state=str(tag.iterable),
|
iterable_state=str(tag.iterable),
|
||||||
arg_name=tag.arg_var_name,
|
arg_name=tag.arg_var_name,
|
||||||
arg_index=tag.get_index_var_arg(),
|
arg_index=tag.get_index_var_arg(),
|
||||||
iterable_type=tag.iterable.upcast()._var_type.mro()[0].__name__,
|
iterable_type=tag.iterable._var_type.mro()[0].__name__,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from reflex.components.el.elements.typography import Div
|
from reflex.components.el.elements.typography import Div
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
class Html(Div):
|
class Html(Div):
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.el.elements.typography import Div
|
from reflex.components.el.elements.typography import Div
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class Html(Div):
|
class Html(Div):
|
||||||
@overload
|
@overload
|
||||||
@ -18,82 +17,72 @@ class Html(Div):
|
|||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
dangerouslySetInnerHTML: Optional[
|
dangerouslySetInnerHTML: Optional[
|
||||||
Union[Var[Dict[str, str]], Dict[str, str]]
|
Union[Dict[str, str], Var[Dict[str, str]]]
|
||||||
] = None,
|
] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Html":
|
) -> "Html":
|
||||||
|
@ -6,12 +6,12 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|||||||
from reflex.components.base import Fragment
|
from reflex.components.base import Fragment
|
||||||
from reflex.components.component import BaseComponent, Component, MemoizationLeaf
|
from reflex.components.component import BaseComponent, Component, MemoizationLeaf
|
||||||
from reflex.components.tags import MatchTag, Tag
|
from reflex.components.tags import MatchTag, Tag
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils import format, types
|
from reflex.utils import format, types
|
||||||
from reflex.utils.exceptions import MatchTypeError
|
from reflex.utils.exceptions import MatchTypeError
|
||||||
from reflex.utils.imports import ImportDict
|
from reflex.utils.imports import ImportDict
|
||||||
from reflex.vars import Var, VarData
|
from reflex.vars import VarData
|
||||||
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
|
||||||
|
|
||||||
class Match(MemoizationLeaf):
|
class Match(MemoizationLeaf):
|
||||||
@ -27,7 +27,7 @@ class Match(MemoizationLeaf):
|
|||||||
default: Any
|
default: Any
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, cond: Any, *cases) -> Union[Component, ImmutableVar]:
|
def create(cls, cond: Any, *cases) -> Union[Component, Var]:
|
||||||
"""Create a Match Component.
|
"""Create a Match Component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -56,7 +56,7 @@ class Match(MemoizationLeaf):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _create_condition_var(cls, cond: Any) -> ImmutableVar:
|
def _create_condition_var(cls, cond: Any) -> Var:
|
||||||
"""Convert the condition to a Var.
|
"""Convert the condition to a Var.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -77,7 +77,7 @@ class Match(MemoizationLeaf):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def _process_cases(
|
def _process_cases(
|
||||||
cls, cases: List
|
cls, cases: List
|
||||||
) -> Tuple[List, Optional[Union[ImmutableVar, BaseComponent]]]:
|
) -> Tuple[List, Optional[Union[Var, BaseComponent]]]:
|
||||||
"""Process the list of match cases and the catchall default case.
|
"""Process the list of match cases and the catchall default case.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -125,7 +125,7 @@ class Match(MemoizationLeaf):
|
|||||||
return case_element
|
return case_element
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _process_match_cases(cls, cases: List) -> List[List[ImmutableVar]]:
|
def _process_match_cases(cls, cases: List) -> List[List[Var]]:
|
||||||
"""Process the individual match cases.
|
"""Process the individual match cases.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -157,7 +157,7 @@ class Match(MemoizationLeaf):
|
|||||||
if not isinstance(element, BaseComponent)
|
if not isinstance(element, BaseComponent)
|
||||||
else element
|
else element
|
||||||
)
|
)
|
||||||
if not isinstance(el, (ImmutableVar, BaseComponent)):
|
if not isinstance(el, (Var, BaseComponent)):
|
||||||
raise ValueError("Case element must be a var or component")
|
raise ValueError("Case element must be a var or component")
|
||||||
case_list.append(el)
|
case_list.append(el)
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ class Match(MemoizationLeaf):
|
|||||||
return match_cases
|
return match_cases
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _validate_return_types(cls, match_cases: List[List[ImmutableVar]]) -> None:
|
def _validate_return_types(cls, match_cases: List[List[Var]]) -> None:
|
||||||
"""Validate that match cases have the same return types.
|
"""Validate that match cases have the same return types.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -180,24 +180,24 @@ class Match(MemoizationLeaf):
|
|||||||
|
|
||||||
if types._isinstance(first_case_return, BaseComponent):
|
if types._isinstance(first_case_return, BaseComponent):
|
||||||
return_type = BaseComponent
|
return_type = BaseComponent
|
||||||
elif types._isinstance(first_case_return, ImmutableVar):
|
elif types._isinstance(first_case_return, Var):
|
||||||
return_type = ImmutableVar
|
return_type = Var
|
||||||
|
|
||||||
for index, case in enumerate(match_cases):
|
for index, case in enumerate(match_cases):
|
||||||
if not types._issubclass(type(case[-1]), return_type):
|
if not types._issubclass(type(case[-1]), return_type):
|
||||||
raise MatchTypeError(
|
raise MatchTypeError(
|
||||||
f"Match cases should have the same return types. Case {index} with return "
|
f"Match cases should have the same return types. Case {index} with return "
|
||||||
f"value `{case[-1]._var_name if isinstance(case[-1], ImmutableVar) else textwrap.shorten(str(case[-1]), width=250)}`"
|
f"value `{case[-1]._js_expr if isinstance(case[-1], Var) else textwrap.shorten(str(case[-1]), width=250)}`"
|
||||||
f" of type {type(case[-1])!r} is not {return_type}"
|
f" of type {type(case[-1])!r} is not {return_type}"
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _create_match_cond_var_or_component(
|
def _create_match_cond_var_or_component(
|
||||||
cls,
|
cls,
|
||||||
match_cond_var: ImmutableVar,
|
match_cond_var: Var,
|
||||||
match_cases: List[List[ImmutableVar]],
|
match_cases: List[List[Var]],
|
||||||
default: Optional[Union[ImmutableVar, BaseComponent]],
|
default: Optional[Union[Var, BaseComponent]],
|
||||||
) -> Union[Component, ImmutableVar]:
|
) -> Union[Component, Var]:
|
||||||
"""Create and return the match condition var or component.
|
"""Create and return the match condition var or component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -232,8 +232,8 @@ class Match(MemoizationLeaf):
|
|||||||
) or not types._isinstance(default, Var):
|
) or not types._isinstance(default, Var):
|
||||||
raise ValueError("Return types of match cases should be Vars.")
|
raise ValueError("Return types of match cases should be Vars.")
|
||||||
|
|
||||||
return ImmutableVar(
|
return Var(
|
||||||
_var_name=format.format_match(
|
_js_expr=format.format_match(
|
||||||
cond=str(match_cond_var),
|
cond=str(match_cond_var),
|
||||||
match_cases=match_cases,
|
match_cases=match_cases,
|
||||||
default=default, # type: ignore
|
default=default, # type: ignore
|
||||||
|
@ -19,10 +19,10 @@ from reflex.event import (
|
|||||||
call_script,
|
call_script,
|
||||||
parse_args_spec,
|
parse_args_spec,
|
||||||
)
|
)
|
||||||
from reflex.ivars.base import ImmutableCallableVar, ImmutableVar, LiteralVar
|
|
||||||
from reflex.ivars.sequence import LiteralStringVar
|
|
||||||
from reflex.utils.imports import ImportVar
|
from reflex.utils.imports import ImportVar
|
||||||
from reflex.vars import Var, VarData
|
from reflex.vars import VarData
|
||||||
|
from reflex.vars.base import CallableVar, LiteralVar, Var
|
||||||
|
from reflex.vars.sequence import LiteralStringVar
|
||||||
|
|
||||||
DEFAULT_UPLOAD_ID: str = "default"
|
DEFAULT_UPLOAD_ID: str = "default"
|
||||||
|
|
||||||
@ -37,8 +37,8 @@ upload_files_context_var_data: VarData = VarData(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ImmutableCallableVar
|
@CallableVar
|
||||||
def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar:
|
def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> Var:
|
||||||
"""Get the file upload drop trigger.
|
"""Get the file upload drop trigger.
|
||||||
|
|
||||||
This var is passed to the dropzone component to update the file list when a
|
This var is passed to the dropzone component to update the file list when a
|
||||||
@ -58,8 +58,8 @@ def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar:
|
|||||||
}})
|
}})
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return ImmutableVar(
|
return Var(
|
||||||
_var_name=var_name,
|
_js_expr=var_name,
|
||||||
_var_type=EventChain,
|
_var_type=EventChain,
|
||||||
_var_data=VarData.merge(
|
_var_data=VarData.merge(
|
||||||
upload_files_context_var_data, id_var._get_all_var_data()
|
upload_files_context_var_data, id_var._get_all_var_data()
|
||||||
@ -67,8 +67,8 @@ def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ImmutableCallableVar
|
@CallableVar
|
||||||
def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar:
|
def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> Var:
|
||||||
"""Get the list of selected files.
|
"""Get the list of selected files.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -78,8 +78,8 @@ def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar:
|
|||||||
A var referencing the list of selected file paths.
|
A var referencing the list of selected file paths.
|
||||||
"""
|
"""
|
||||||
id_var = LiteralStringVar.create(id_)
|
id_var = LiteralStringVar.create(id_)
|
||||||
return ImmutableVar(
|
return Var(
|
||||||
_var_name=f"(filesById[{str(id_var)}] ? filesById[{str(id_var)}].map((f) => (f.path || f.name)) : [])",
|
_js_expr=f"(filesById[{str(id_var)}] ? filesById[{str(id_var)}].map((f) => (f.path || f.name)) : [])",
|
||||||
_var_type=List[str],
|
_var_type=List[str],
|
||||||
_var_data=VarData.merge(
|
_var_data=VarData.merge(
|
||||||
upload_files_context_var_data, id_var._get_all_var_data()
|
upload_files_context_var_data, id_var._get_all_var_data()
|
||||||
@ -132,8 +132,8 @@ def get_upload_dir() -> Path:
|
|||||||
return uploaded_files_dir
|
return uploaded_files_dir
|
||||||
|
|
||||||
|
|
||||||
uploaded_files_url_prefix = ImmutableVar(
|
uploaded_files_url_prefix = Var(
|
||||||
_var_name="getBackendURL(env.UPLOAD)",
|
_js_expr="getBackendURL(env.UPLOAD)",
|
||||||
_var_data=VarData(
|
_var_data=VarData(
|
||||||
imports={
|
imports={
|
||||||
f"/{Dirs.STATE_PATH}": "getBackendURL",
|
f"/{Dirs.STATE_PATH}": "getBackendURL",
|
||||||
@ -247,9 +247,7 @@ class Upload(MemoizationLeaf):
|
|||||||
}
|
}
|
||||||
# The file input to use.
|
# The file input to use.
|
||||||
upload = Input.create(type="file")
|
upload = Input.create(type="file")
|
||||||
upload.special_props = [
|
upload.special_props = [Var(_js_expr="{...getInputProps()}", _var_type=None)]
|
||||||
ImmutableVar(_var_name="{...getInputProps()}", _var_type=None)
|
|
||||||
]
|
|
||||||
|
|
||||||
# The dropzone to use.
|
# The dropzone to use.
|
||||||
zone = Box.create(
|
zone = Box.create(
|
||||||
@ -257,9 +255,7 @@ class Upload(MemoizationLeaf):
|
|||||||
*children,
|
*children,
|
||||||
**{k: v for k, v in props.items() if k not in supported_props},
|
**{k: v for k, v in props.items() if k not in supported_props},
|
||||||
)
|
)
|
||||||
zone.special_props = [
|
zone.special_props = [Var(_js_expr="{...getRootProps()}", _var_type=None)]
|
||||||
ImmutableVar(_var_name="{...getRootProps()}", _var_type=None)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Create the component.
|
# Create the component.
|
||||||
upload_props["id"] = props.get("id", DEFAULT_UPLOAD_ID)
|
upload_props["id"] = props.get("id", DEFAULT_UPLOAD_ID)
|
||||||
@ -287,9 +283,7 @@ class Upload(MemoizationLeaf):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _update_arg_tuple_for_on_drop(
|
def _update_arg_tuple_for_on_drop(cls, arg_value: tuple[Var, Var]):
|
||||||
cls, arg_value: tuple[ImmutableVar, ImmutableVar]
|
|
||||||
):
|
|
||||||
"""Helper to update caller-provided EventSpec args for direct use with on_drop.
|
"""Helper to update caller-provided EventSpec args for direct use with on_drop.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -298,7 +292,7 @@ class Upload(MemoizationLeaf):
|
|||||||
Returns:
|
Returns:
|
||||||
The updated arg_value tuple when arg is "files", otherwise the original arg_value.
|
The updated arg_value tuple when arg is "files", otherwise the original arg_value.
|
||||||
"""
|
"""
|
||||||
if arg_value[0]._var_name == "files":
|
if arg_value[0]._js_expr == "files":
|
||||||
placeholder = parse_args_spec(_on_drop_spec)[0]
|
placeholder = parse_args_spec(_on_drop_spec)[0]
|
||||||
return (arg_value[0], placeholder)
|
return (arg_value[0], placeholder)
|
||||||
return arg_value
|
return arg_value
|
||||||
|
@ -13,25 +13,25 @@ from reflex.event import (
|
|||||||
EventHandler,
|
EventHandler,
|
||||||
EventSpec,
|
EventSpec,
|
||||||
)
|
)
|
||||||
from reflex.ivars.base import ImmutableCallableVar, ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils.imports import ImportVar
|
from reflex.utils.imports import ImportVar
|
||||||
from reflex.vars import Var, VarData
|
from reflex.vars import VarData
|
||||||
|
from reflex.vars.base import CallableVar, Var
|
||||||
|
|
||||||
DEFAULT_UPLOAD_ID: str
|
DEFAULT_UPLOAD_ID: str
|
||||||
upload_files_context_var_data: VarData
|
upload_files_context_var_data: VarData
|
||||||
|
|
||||||
@ImmutableCallableVar
|
@CallableVar
|
||||||
def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar: ...
|
def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> Var: ...
|
||||||
@ImmutableCallableVar
|
@CallableVar
|
||||||
def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> ImmutableVar: ...
|
def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> Var: ...
|
||||||
@CallableEventSpec
|
@CallableEventSpec
|
||||||
def clear_selected_files(id_: str = DEFAULT_UPLOAD_ID) -> EventSpec: ...
|
def clear_selected_files(id_: str = DEFAULT_UPLOAD_ID) -> EventSpec: ...
|
||||||
def cancel_upload(upload_id: str) -> EventSpec: ...
|
def cancel_upload(upload_id: str) -> EventSpec: ...
|
||||||
def get_upload_dir() -> Path: ...
|
def get_upload_dir() -> Path: ...
|
||||||
|
|
||||||
uploaded_files_url_prefix = ImmutableVar(
|
uploaded_files_url_prefix = Var(
|
||||||
_var_name="getBackendURL(env.UPLOAD)",
|
_js_expr="getBackendURL(env.UPLOAD)",
|
||||||
_var_data=VarData(
|
_var_data=VarData(
|
||||||
imports={
|
imports={
|
||||||
f"/{Dirs.STATE_PATH}": "getBackendURL",
|
f"/{Dirs.STATE_PATH}": "getBackendURL",
|
||||||
@ -53,51 +53,41 @@ class UploadFilesProvider(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "UploadFilesProvider":
|
) -> "UploadFilesProvider":
|
||||||
@ -126,7 +116,7 @@ class Upload(MemoizationLeaf):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
accept: Optional[Union[Var[Optional[Dict[str, List]]], Dict[str, List]]] = None,
|
accept: Optional[Union[Dict[str, List], Var[Optional[Dict[str, List]]]]] = None,
|
||||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
max_files: Optional[Union[Var[int], int]] = None,
|
max_files: Optional[Union[Var[int], int]] = None,
|
||||||
max_size: Optional[Union[Var[int], int]] = None,
|
max_size: Optional[Union[Var[int], int]] = None,
|
||||||
@ -140,54 +130,42 @@ class Upload(MemoizationLeaf):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_drop: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_drop: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Upload":
|
) -> "Upload":
|
||||||
@ -223,7 +201,7 @@ class StyledUpload(Upload):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
accept: Optional[Union[Var[Optional[Dict[str, List]]], Dict[str, List]]] = None,
|
accept: Optional[Union[Dict[str, List], Var[Optional[Dict[str, List]]]]] = None,
|
||||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
max_files: Optional[Union[Var[int], int]] = None,
|
max_files: Optional[Union[Var[int], int]] = None,
|
||||||
max_size: Optional[Union[Var[int], int]] = None,
|
max_size: Optional[Union[Var[int], int]] = None,
|
||||||
@ -237,54 +215,42 @@ class StyledUpload(Upload):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_drop: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_drop: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "StyledUpload":
|
) -> "StyledUpload":
|
||||||
@ -320,7 +286,7 @@ class UploadNamespace(ComponentNamespace):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def __call__(
|
def __call__(
|
||||||
*children,
|
*children,
|
||||||
accept: Optional[Union[Var[Optional[Dict[str, List]]], Dict[str, List]]] = None,
|
accept: Optional[Union[Dict[str, List], Var[Optional[Dict[str, List]]]]] = None,
|
||||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
max_files: Optional[Union[Var[int], int]] = None,
|
max_files: Optional[Union[Var[int], int]] = None,
|
||||||
max_size: Optional[Union[Var[int], int]] = None,
|
max_size: Optional[Union[Var[int], int]] = None,
|
||||||
@ -334,54 +300,42 @@ class UploadNamespace(ComponentNamespace):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_drop: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_drop: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "StyledUpload":
|
) -> "StyledUpload":
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Dict, Literal, Optional, Union
|
from typing import Any, Dict, Literal, Optional, Union
|
||||||
|
|
||||||
from typing_extensions import get_args
|
from typing_extensions import get_args
|
||||||
|
|
||||||
@ -13,11 +13,10 @@ from reflex.components.radix.themes.components.button import Button
|
|||||||
from reflex.components.radix.themes.layout.box import Box
|
from reflex.components.radix.themes.layout.box import Box
|
||||||
from reflex.constants.colors import Color
|
from reflex.constants.colors import Color
|
||||||
from reflex.event import set_clipboard
|
from reflex.event import set_clipboard
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils import format
|
from reflex.utils import format
|
||||||
from reflex.utils.imports import ImportDict, ImportVar
|
from reflex.utils.imports import ImportDict, ImportVar
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
|
||||||
LiteralCodeBlockTheme = Literal[
|
LiteralCodeBlockTheme = Literal[
|
||||||
"a11y-dark",
|
"a11y-dark",
|
||||||
@ -375,7 +374,7 @@ class CodeBlock(Component):
|
|||||||
alias = "SyntaxHighlighter"
|
alias = "SyntaxHighlighter"
|
||||||
|
|
||||||
# The theme to use ("light" or "dark").
|
# The theme to use ("light" or "dark").
|
||||||
theme: Var[LiteralCodeBlockTheme] = "one-light" # type: ignore
|
theme: Var[Any] = "one-light" # type: ignore
|
||||||
|
|
||||||
# The language to use.
|
# The language to use.
|
||||||
language: Var[LiteralCodeLanguage] = "python" # type: ignore
|
language: Var[LiteralCodeLanguage] = "python" # type: ignore
|
||||||
@ -481,13 +480,13 @@ class CodeBlock(Component):
|
|||||||
if "theme" not in props:
|
if "theme" not in props:
|
||||||
# Default color scheme responds to global color mode.
|
# Default color scheme responds to global color mode.
|
||||||
props["theme"] = color_mode_cond(
|
props["theme"] = color_mode_cond(
|
||||||
light=ImmutableVar.create_safe("oneLight"),
|
light=Var(_js_expr="oneLight"),
|
||||||
dark=ImmutableVar.create_safe("oneDark"),
|
dark=Var(_js_expr="oneDark"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# react-syntax-highlighter doesnt have an explicit "light" or "dark" theme so we use one-light and one-dark
|
# react-syntax-highlighter doesnt have an explicit "light" or "dark" theme so we use one-light and one-dark
|
||||||
# themes respectively to ensure code compatibility.
|
# themes respectively to ensure code compatibility.
|
||||||
if "theme" in props and not isinstance(props["theme"], ImmutableVar):
|
if "theme" in props and not isinstance(props["theme"], Var):
|
||||||
props["theme"] = cls.convert_theme_name(props["theme"])
|
props["theme"] = cls.convert_theme_name(props["theme"])
|
||||||
|
|
||||||
if can_copy:
|
if can_copy:
|
||||||
@ -513,7 +512,7 @@ class CodeBlock(Component):
|
|||||||
# Carry the children (code) via props
|
# Carry the children (code) via props
|
||||||
if children:
|
if children:
|
||||||
props["code"] = children[0]
|
props["code"] = children[0]
|
||||||
if not isinstance(props["code"], ImmutableVar):
|
if not isinstance(props["code"], Var):
|
||||||
props["code"] = LiteralVar.create(props["code"])
|
props["code"] = LiteralVar.create(props["code"])
|
||||||
|
|
||||||
# Create the component.
|
# Create the component.
|
||||||
@ -534,8 +533,8 @@ class CodeBlock(Component):
|
|||||||
def _render(self):
|
def _render(self):
|
||||||
out = super()._render()
|
out = super()._render()
|
||||||
|
|
||||||
theme = self.theme.upcast()._replace(
|
theme = self.theme._replace(
|
||||||
_var_name=replace_quotes_with_camel_case(str(self.theme))
|
_js_expr=replace_quotes_with_camel_case(str(self.theme))
|
||||||
)
|
)
|
||||||
|
|
||||||
out.add_props(style=theme).remove_props("theme", "code").add_props(
|
out.add_props(style=theme).remove_props("theme", "code").add_props(
|
||||||
|
@ -8,10 +8,9 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.constants.colors import Color
|
from reflex.constants.colors import Color
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils.imports import ImportDict
|
from reflex.utils.imports import ImportDict
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
LiteralCodeBlockTheme = Literal[
|
LiteralCodeBlockTheme = Literal[
|
||||||
"a11y-dark",
|
"a11y-dark",
|
||||||
@ -353,108 +352,290 @@ class CodeBlock(Component):
|
|||||||
*children,
|
*children,
|
||||||
can_copy: Optional[bool] = False,
|
can_copy: Optional[bool] = False,
|
||||||
copy_button: Optional[Union[Component, bool]] = None,
|
copy_button: Optional[Union[Component, bool]] = None,
|
||||||
theme: Optional[
|
theme: Optional[Union[Any, Var[Any]]] = None,
|
||||||
Union[
|
|
||||||
Var[
|
|
||||||
Literal[
|
|
||||||
"a11y-dark",
|
|
||||||
"atom-dark",
|
|
||||||
"cb",
|
|
||||||
"coldark-cold",
|
|
||||||
"coldark-dark",
|
|
||||||
"coy",
|
|
||||||
"coy-without-shadows",
|
|
||||||
"darcula",
|
|
||||||
"dark",
|
|
||||||
"dracula",
|
|
||||||
"duotone-dark",
|
|
||||||
"duotone-earth",
|
|
||||||
"duotone-forest",
|
|
||||||
"duotone-light",
|
|
||||||
"duotone-sea",
|
|
||||||
"duotone-space",
|
|
||||||
"funky",
|
|
||||||
"ghcolors",
|
|
||||||
"gruvbox-dark",
|
|
||||||
"gruvbox-light",
|
|
||||||
"holi-theme",
|
|
||||||
"hopscotch",
|
|
||||||
"light",
|
|
||||||
"lucario",
|
|
||||||
"material-dark",
|
|
||||||
"material-light",
|
|
||||||
"material-oceanic",
|
|
||||||
"night-owl",
|
|
||||||
"nord",
|
|
||||||
"okaidia",
|
|
||||||
"one-dark",
|
|
||||||
"one-light",
|
|
||||||
"pojoaque",
|
|
||||||
"prism",
|
|
||||||
"shades-of-purple",
|
|
||||||
"solarized-dark-atom",
|
|
||||||
"solarizedlight",
|
|
||||||
"synthwave84",
|
|
||||||
"tomorrow",
|
|
||||||
"twilight",
|
|
||||||
"vs",
|
|
||||||
"vs-dark",
|
|
||||||
"vsc-dark-plus",
|
|
||||||
"xonokai",
|
|
||||||
"z-touch",
|
|
||||||
]
|
|
||||||
],
|
|
||||||
Literal[
|
|
||||||
"a11y-dark",
|
|
||||||
"atom-dark",
|
|
||||||
"cb",
|
|
||||||
"coldark-cold",
|
|
||||||
"coldark-dark",
|
|
||||||
"coy",
|
|
||||||
"coy-without-shadows",
|
|
||||||
"darcula",
|
|
||||||
"dark",
|
|
||||||
"dracula",
|
|
||||||
"duotone-dark",
|
|
||||||
"duotone-earth",
|
|
||||||
"duotone-forest",
|
|
||||||
"duotone-light",
|
|
||||||
"duotone-sea",
|
|
||||||
"duotone-space",
|
|
||||||
"funky",
|
|
||||||
"ghcolors",
|
|
||||||
"gruvbox-dark",
|
|
||||||
"gruvbox-light",
|
|
||||||
"holi-theme",
|
|
||||||
"hopscotch",
|
|
||||||
"light",
|
|
||||||
"lucario",
|
|
||||||
"material-dark",
|
|
||||||
"material-light",
|
|
||||||
"material-oceanic",
|
|
||||||
"night-owl",
|
|
||||||
"nord",
|
|
||||||
"okaidia",
|
|
||||||
"one-dark",
|
|
||||||
"one-light",
|
|
||||||
"pojoaque",
|
|
||||||
"prism",
|
|
||||||
"shades-of-purple",
|
|
||||||
"solarized-dark-atom",
|
|
||||||
"solarizedlight",
|
|
||||||
"synthwave84",
|
|
||||||
"tomorrow",
|
|
||||||
"twilight",
|
|
||||||
"vs",
|
|
||||||
"vs-dark",
|
|
||||||
"vsc-dark-plus",
|
|
||||||
"xonokai",
|
|
||||||
"z-touch",
|
|
||||||
],
|
|
||||||
]
|
|
||||||
] = None,
|
|
||||||
language: Optional[
|
language: Optional[
|
||||||
Union[
|
Union[
|
||||||
|
Literal[
|
||||||
|
"abap",
|
||||||
|
"abnf",
|
||||||
|
"actionscript",
|
||||||
|
"ada",
|
||||||
|
"agda",
|
||||||
|
"al",
|
||||||
|
"antlr4",
|
||||||
|
"apacheconf",
|
||||||
|
"apex",
|
||||||
|
"apl",
|
||||||
|
"applescript",
|
||||||
|
"aql",
|
||||||
|
"arduino",
|
||||||
|
"arff",
|
||||||
|
"asciidoc",
|
||||||
|
"asm6502",
|
||||||
|
"asmatmel",
|
||||||
|
"aspnet",
|
||||||
|
"autohotkey",
|
||||||
|
"autoit",
|
||||||
|
"avisynth",
|
||||||
|
"avro-idl",
|
||||||
|
"bash",
|
||||||
|
"basic",
|
||||||
|
"batch",
|
||||||
|
"bbcode",
|
||||||
|
"bicep",
|
||||||
|
"birb",
|
||||||
|
"bison",
|
||||||
|
"bnf",
|
||||||
|
"brainfuck",
|
||||||
|
"brightscript",
|
||||||
|
"bro",
|
||||||
|
"bsl",
|
||||||
|
"c",
|
||||||
|
"cfscript",
|
||||||
|
"chaiscript",
|
||||||
|
"cil",
|
||||||
|
"clike",
|
||||||
|
"clojure",
|
||||||
|
"cmake",
|
||||||
|
"cobol",
|
||||||
|
"coffeescript",
|
||||||
|
"concurnas",
|
||||||
|
"coq",
|
||||||
|
"core",
|
||||||
|
"cpp",
|
||||||
|
"crystal",
|
||||||
|
"csharp",
|
||||||
|
"cshtml",
|
||||||
|
"csp",
|
||||||
|
"css",
|
||||||
|
"css-extras",
|
||||||
|
"csv",
|
||||||
|
"cypher",
|
||||||
|
"d",
|
||||||
|
"dart",
|
||||||
|
"dataweave",
|
||||||
|
"dax",
|
||||||
|
"dhall",
|
||||||
|
"diff",
|
||||||
|
"django",
|
||||||
|
"dns-zone-file",
|
||||||
|
"docker",
|
||||||
|
"dot",
|
||||||
|
"ebnf",
|
||||||
|
"editorconfig",
|
||||||
|
"eiffel",
|
||||||
|
"ejs",
|
||||||
|
"elixir",
|
||||||
|
"elm",
|
||||||
|
"erb",
|
||||||
|
"erlang",
|
||||||
|
"etlua",
|
||||||
|
"excel-formula",
|
||||||
|
"factor",
|
||||||
|
"false",
|
||||||
|
"firestore-security-rules",
|
||||||
|
"flow",
|
||||||
|
"fortran",
|
||||||
|
"fsharp",
|
||||||
|
"ftl",
|
||||||
|
"gap",
|
||||||
|
"gcode",
|
||||||
|
"gdscript",
|
||||||
|
"gedcom",
|
||||||
|
"gherkin",
|
||||||
|
"git",
|
||||||
|
"glsl",
|
||||||
|
"gml",
|
||||||
|
"gn",
|
||||||
|
"go",
|
||||||
|
"go-module",
|
||||||
|
"graphql",
|
||||||
|
"groovy",
|
||||||
|
"haml",
|
||||||
|
"handlebars",
|
||||||
|
"haskell",
|
||||||
|
"haxe",
|
||||||
|
"hcl",
|
||||||
|
"hlsl",
|
||||||
|
"hoon",
|
||||||
|
"hpkp",
|
||||||
|
"hsts",
|
||||||
|
"http",
|
||||||
|
"ichigojam",
|
||||||
|
"icon",
|
||||||
|
"icu-message-format",
|
||||||
|
"idris",
|
||||||
|
"iecst",
|
||||||
|
"ignore",
|
||||||
|
"index",
|
||||||
|
"inform7",
|
||||||
|
"ini",
|
||||||
|
"io",
|
||||||
|
"j",
|
||||||
|
"java",
|
||||||
|
"javadoc",
|
||||||
|
"javadoclike",
|
||||||
|
"javascript",
|
||||||
|
"javastacktrace",
|
||||||
|
"jexl",
|
||||||
|
"jolie",
|
||||||
|
"jq",
|
||||||
|
"js-extras",
|
||||||
|
"js-templates",
|
||||||
|
"jsdoc",
|
||||||
|
"json",
|
||||||
|
"json5",
|
||||||
|
"jsonp",
|
||||||
|
"jsstacktrace",
|
||||||
|
"jsx",
|
||||||
|
"julia",
|
||||||
|
"keepalived",
|
||||||
|
"keyman",
|
||||||
|
"kotlin",
|
||||||
|
"kumir",
|
||||||
|
"kusto",
|
||||||
|
"latex",
|
||||||
|
"latte",
|
||||||
|
"less",
|
||||||
|
"lilypond",
|
||||||
|
"liquid",
|
||||||
|
"lisp",
|
||||||
|
"livescript",
|
||||||
|
"llvm",
|
||||||
|
"log",
|
||||||
|
"lolcode",
|
||||||
|
"lua",
|
||||||
|
"magma",
|
||||||
|
"makefile",
|
||||||
|
"markdown",
|
||||||
|
"markup",
|
||||||
|
"markup-templating",
|
||||||
|
"matlab",
|
||||||
|
"maxscript",
|
||||||
|
"mel",
|
||||||
|
"mermaid",
|
||||||
|
"mizar",
|
||||||
|
"mongodb",
|
||||||
|
"monkey",
|
||||||
|
"moonscript",
|
||||||
|
"n1ql",
|
||||||
|
"n4js",
|
||||||
|
"nand2tetris-hdl",
|
||||||
|
"naniscript",
|
||||||
|
"nasm",
|
||||||
|
"neon",
|
||||||
|
"nevod",
|
||||||
|
"nginx",
|
||||||
|
"nim",
|
||||||
|
"nix",
|
||||||
|
"nsis",
|
||||||
|
"objectivec",
|
||||||
|
"ocaml",
|
||||||
|
"opencl",
|
||||||
|
"openqasm",
|
||||||
|
"oz",
|
||||||
|
"parigp",
|
||||||
|
"parser",
|
||||||
|
"pascal",
|
||||||
|
"pascaligo",
|
||||||
|
"pcaxis",
|
||||||
|
"peoplecode",
|
||||||
|
"perl",
|
||||||
|
"php",
|
||||||
|
"php-extras",
|
||||||
|
"phpdoc",
|
||||||
|
"plsql",
|
||||||
|
"powerquery",
|
||||||
|
"powershell",
|
||||||
|
"processing",
|
||||||
|
"prolog",
|
||||||
|
"promql",
|
||||||
|
"properties",
|
||||||
|
"protobuf",
|
||||||
|
"psl",
|
||||||
|
"pug",
|
||||||
|
"puppet",
|
||||||
|
"pure",
|
||||||
|
"purebasic",
|
||||||
|
"purescript",
|
||||||
|
"python",
|
||||||
|
"q",
|
||||||
|
"qml",
|
||||||
|
"qore",
|
||||||
|
"qsharp",
|
||||||
|
"r",
|
||||||
|
"racket",
|
||||||
|
"reason",
|
||||||
|
"regex",
|
||||||
|
"rego",
|
||||||
|
"renpy",
|
||||||
|
"rest",
|
||||||
|
"rip",
|
||||||
|
"roboconf",
|
||||||
|
"robotframework",
|
||||||
|
"ruby",
|
||||||
|
"rust",
|
||||||
|
"sas",
|
||||||
|
"sass",
|
||||||
|
"scala",
|
||||||
|
"scheme",
|
||||||
|
"scss",
|
||||||
|
"shell-session",
|
||||||
|
"smali",
|
||||||
|
"smalltalk",
|
||||||
|
"smarty",
|
||||||
|
"sml",
|
||||||
|
"solidity",
|
||||||
|
"solution-file",
|
||||||
|
"soy",
|
||||||
|
"sparql",
|
||||||
|
"splunk-spl",
|
||||||
|
"sqf",
|
||||||
|
"sql",
|
||||||
|
"squirrel",
|
||||||
|
"stan",
|
||||||
|
"stylus",
|
||||||
|
"swift",
|
||||||
|
"systemd",
|
||||||
|
"t4-cs",
|
||||||
|
"t4-templating",
|
||||||
|
"t4-vb",
|
||||||
|
"tap",
|
||||||
|
"tcl",
|
||||||
|
"textile",
|
||||||
|
"toml",
|
||||||
|
"tremor",
|
||||||
|
"tsx",
|
||||||
|
"tt2",
|
||||||
|
"turtle",
|
||||||
|
"twig",
|
||||||
|
"typescript",
|
||||||
|
"typoscript",
|
||||||
|
"unrealscript",
|
||||||
|
"uorazor",
|
||||||
|
"uri",
|
||||||
|
"v",
|
||||||
|
"vala",
|
||||||
|
"vbnet",
|
||||||
|
"velocity",
|
||||||
|
"verilog",
|
||||||
|
"vhdl",
|
||||||
|
"vim",
|
||||||
|
"visual-basic",
|
||||||
|
"warpscript",
|
||||||
|
"wasm",
|
||||||
|
"web-idl",
|
||||||
|
"wiki",
|
||||||
|
"wolfram",
|
||||||
|
"wren",
|
||||||
|
"xeora",
|
||||||
|
"xml-doc",
|
||||||
|
"xojo",
|
||||||
|
"xquery",
|
||||||
|
"yaml",
|
||||||
|
"yang",
|
||||||
|
"zig",
|
||||||
|
],
|
||||||
Var[
|
Var[
|
||||||
Literal[
|
Literal[
|
||||||
"abap",
|
"abap",
|
||||||
@ -738,287 +919,6 @@ class CodeBlock(Component):
|
|||||||
"zig",
|
"zig",
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
Literal[
|
|
||||||
"abap",
|
|
||||||
"abnf",
|
|
||||||
"actionscript",
|
|
||||||
"ada",
|
|
||||||
"agda",
|
|
||||||
"al",
|
|
||||||
"antlr4",
|
|
||||||
"apacheconf",
|
|
||||||
"apex",
|
|
||||||
"apl",
|
|
||||||
"applescript",
|
|
||||||
"aql",
|
|
||||||
"arduino",
|
|
||||||
"arff",
|
|
||||||
"asciidoc",
|
|
||||||
"asm6502",
|
|
||||||
"asmatmel",
|
|
||||||
"aspnet",
|
|
||||||
"autohotkey",
|
|
||||||
"autoit",
|
|
||||||
"avisynth",
|
|
||||||
"avro-idl",
|
|
||||||
"bash",
|
|
||||||
"basic",
|
|
||||||
"batch",
|
|
||||||
"bbcode",
|
|
||||||
"bicep",
|
|
||||||
"birb",
|
|
||||||
"bison",
|
|
||||||
"bnf",
|
|
||||||
"brainfuck",
|
|
||||||
"brightscript",
|
|
||||||
"bro",
|
|
||||||
"bsl",
|
|
||||||
"c",
|
|
||||||
"cfscript",
|
|
||||||
"chaiscript",
|
|
||||||
"cil",
|
|
||||||
"clike",
|
|
||||||
"clojure",
|
|
||||||
"cmake",
|
|
||||||
"cobol",
|
|
||||||
"coffeescript",
|
|
||||||
"concurnas",
|
|
||||||
"coq",
|
|
||||||
"core",
|
|
||||||
"cpp",
|
|
||||||
"crystal",
|
|
||||||
"csharp",
|
|
||||||
"cshtml",
|
|
||||||
"csp",
|
|
||||||
"css",
|
|
||||||
"css-extras",
|
|
||||||
"csv",
|
|
||||||
"cypher",
|
|
||||||
"d",
|
|
||||||
"dart",
|
|
||||||
"dataweave",
|
|
||||||
"dax",
|
|
||||||
"dhall",
|
|
||||||
"diff",
|
|
||||||
"django",
|
|
||||||
"dns-zone-file",
|
|
||||||
"docker",
|
|
||||||
"dot",
|
|
||||||
"ebnf",
|
|
||||||
"editorconfig",
|
|
||||||
"eiffel",
|
|
||||||
"ejs",
|
|
||||||
"elixir",
|
|
||||||
"elm",
|
|
||||||
"erb",
|
|
||||||
"erlang",
|
|
||||||
"etlua",
|
|
||||||
"excel-formula",
|
|
||||||
"factor",
|
|
||||||
"false",
|
|
||||||
"firestore-security-rules",
|
|
||||||
"flow",
|
|
||||||
"fortran",
|
|
||||||
"fsharp",
|
|
||||||
"ftl",
|
|
||||||
"gap",
|
|
||||||
"gcode",
|
|
||||||
"gdscript",
|
|
||||||
"gedcom",
|
|
||||||
"gherkin",
|
|
||||||
"git",
|
|
||||||
"glsl",
|
|
||||||
"gml",
|
|
||||||
"gn",
|
|
||||||
"go",
|
|
||||||
"go-module",
|
|
||||||
"graphql",
|
|
||||||
"groovy",
|
|
||||||
"haml",
|
|
||||||
"handlebars",
|
|
||||||
"haskell",
|
|
||||||
"haxe",
|
|
||||||
"hcl",
|
|
||||||
"hlsl",
|
|
||||||
"hoon",
|
|
||||||
"hpkp",
|
|
||||||
"hsts",
|
|
||||||
"http",
|
|
||||||
"ichigojam",
|
|
||||||
"icon",
|
|
||||||
"icu-message-format",
|
|
||||||
"idris",
|
|
||||||
"iecst",
|
|
||||||
"ignore",
|
|
||||||
"index",
|
|
||||||
"inform7",
|
|
||||||
"ini",
|
|
||||||
"io",
|
|
||||||
"j",
|
|
||||||
"java",
|
|
||||||
"javadoc",
|
|
||||||
"javadoclike",
|
|
||||||
"javascript",
|
|
||||||
"javastacktrace",
|
|
||||||
"jexl",
|
|
||||||
"jolie",
|
|
||||||
"jq",
|
|
||||||
"js-extras",
|
|
||||||
"js-templates",
|
|
||||||
"jsdoc",
|
|
||||||
"json",
|
|
||||||
"json5",
|
|
||||||
"jsonp",
|
|
||||||
"jsstacktrace",
|
|
||||||
"jsx",
|
|
||||||
"julia",
|
|
||||||
"keepalived",
|
|
||||||
"keyman",
|
|
||||||
"kotlin",
|
|
||||||
"kumir",
|
|
||||||
"kusto",
|
|
||||||
"latex",
|
|
||||||
"latte",
|
|
||||||
"less",
|
|
||||||
"lilypond",
|
|
||||||
"liquid",
|
|
||||||
"lisp",
|
|
||||||
"livescript",
|
|
||||||
"llvm",
|
|
||||||
"log",
|
|
||||||
"lolcode",
|
|
||||||
"lua",
|
|
||||||
"magma",
|
|
||||||
"makefile",
|
|
||||||
"markdown",
|
|
||||||
"markup",
|
|
||||||
"markup-templating",
|
|
||||||
"matlab",
|
|
||||||
"maxscript",
|
|
||||||
"mel",
|
|
||||||
"mermaid",
|
|
||||||
"mizar",
|
|
||||||
"mongodb",
|
|
||||||
"monkey",
|
|
||||||
"moonscript",
|
|
||||||
"n1ql",
|
|
||||||
"n4js",
|
|
||||||
"nand2tetris-hdl",
|
|
||||||
"naniscript",
|
|
||||||
"nasm",
|
|
||||||
"neon",
|
|
||||||
"nevod",
|
|
||||||
"nginx",
|
|
||||||
"nim",
|
|
||||||
"nix",
|
|
||||||
"nsis",
|
|
||||||
"objectivec",
|
|
||||||
"ocaml",
|
|
||||||
"opencl",
|
|
||||||
"openqasm",
|
|
||||||
"oz",
|
|
||||||
"parigp",
|
|
||||||
"parser",
|
|
||||||
"pascal",
|
|
||||||
"pascaligo",
|
|
||||||
"pcaxis",
|
|
||||||
"peoplecode",
|
|
||||||
"perl",
|
|
||||||
"php",
|
|
||||||
"php-extras",
|
|
||||||
"phpdoc",
|
|
||||||
"plsql",
|
|
||||||
"powerquery",
|
|
||||||
"powershell",
|
|
||||||
"processing",
|
|
||||||
"prolog",
|
|
||||||
"promql",
|
|
||||||
"properties",
|
|
||||||
"protobuf",
|
|
||||||
"psl",
|
|
||||||
"pug",
|
|
||||||
"puppet",
|
|
||||||
"pure",
|
|
||||||
"purebasic",
|
|
||||||
"purescript",
|
|
||||||
"python",
|
|
||||||
"q",
|
|
||||||
"qml",
|
|
||||||
"qore",
|
|
||||||
"qsharp",
|
|
||||||
"r",
|
|
||||||
"racket",
|
|
||||||
"reason",
|
|
||||||
"regex",
|
|
||||||
"rego",
|
|
||||||
"renpy",
|
|
||||||
"rest",
|
|
||||||
"rip",
|
|
||||||
"roboconf",
|
|
||||||
"robotframework",
|
|
||||||
"ruby",
|
|
||||||
"rust",
|
|
||||||
"sas",
|
|
||||||
"sass",
|
|
||||||
"scala",
|
|
||||||
"scheme",
|
|
||||||
"scss",
|
|
||||||
"shell-session",
|
|
||||||
"smali",
|
|
||||||
"smalltalk",
|
|
||||||
"smarty",
|
|
||||||
"sml",
|
|
||||||
"solidity",
|
|
||||||
"solution-file",
|
|
||||||
"soy",
|
|
||||||
"sparql",
|
|
||||||
"splunk-spl",
|
|
||||||
"sqf",
|
|
||||||
"sql",
|
|
||||||
"squirrel",
|
|
||||||
"stan",
|
|
||||||
"stylus",
|
|
||||||
"swift",
|
|
||||||
"systemd",
|
|
||||||
"t4-cs",
|
|
||||||
"t4-templating",
|
|
||||||
"t4-vb",
|
|
||||||
"tap",
|
|
||||||
"tcl",
|
|
||||||
"textile",
|
|
||||||
"toml",
|
|
||||||
"tremor",
|
|
||||||
"tsx",
|
|
||||||
"tt2",
|
|
||||||
"turtle",
|
|
||||||
"twig",
|
|
||||||
"typescript",
|
|
||||||
"typoscript",
|
|
||||||
"unrealscript",
|
|
||||||
"uorazor",
|
|
||||||
"uri",
|
|
||||||
"v",
|
|
||||||
"vala",
|
|
||||||
"vbnet",
|
|
||||||
"velocity",
|
|
||||||
"verilog",
|
|
||||||
"vhdl",
|
|
||||||
"vim",
|
|
||||||
"visual-basic",
|
|
||||||
"warpscript",
|
|
||||||
"wasm",
|
|
||||||
"web-idl",
|
|
||||||
"wiki",
|
|
||||||
"wolfram",
|
|
||||||
"wren",
|
|
||||||
"xeora",
|
|
||||||
"xml-doc",
|
|
||||||
"xojo",
|
|
||||||
"xquery",
|
|
||||||
"yaml",
|
|
||||||
"yang",
|
|
||||||
"zig",
|
|
||||||
],
|
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
code: Optional[Union[Var[str], str]] = None,
|
code: Optional[Union[Var[str], str]] = None,
|
||||||
@ -1026,57 +926,47 @@ class CodeBlock(Component):
|
|||||||
starting_line_number: Optional[Union[Var[int], int]] = None,
|
starting_line_number: Optional[Union[Var[int], int]] = None,
|
||||||
wrap_long_lines: Optional[Union[Var[bool], bool]] = None,
|
wrap_long_lines: Optional[Union[Var[bool], bool]] = None,
|
||||||
custom_style: Optional[Dict[str, Union[str, Var, Color]]] = None,
|
custom_style: Optional[Dict[str, Union[str, Var, Color]]] = None,
|
||||||
code_tag_props: Optional[Union[Var[Dict[str, str]], Dict[str, str]]] = None,
|
code_tag_props: Optional[Union[Dict[str, str], Var[Dict[str, str]]]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "CodeBlock":
|
) -> "CodeBlock":
|
||||||
|
@ -9,12 +9,12 @@ from reflex.base import Base
|
|||||||
from reflex.components.component import Component, NoSSRComponent
|
from reflex.components.component import Component, NoSSRComponent
|
||||||
from reflex.components.literals import LiteralRowMarker
|
from reflex.components.literals import LiteralRowMarker
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.ivars.sequence import ArrayVar
|
|
||||||
from reflex.utils import console, format, types
|
from reflex.utils import console, format, types
|
||||||
from reflex.utils.imports import ImportDict, ImportVar
|
from reflex.utils.imports import ImportDict, ImportVar
|
||||||
from reflex.utils.serializers import serializer
|
from reflex.utils.serializers import serializer
|
||||||
from reflex.vars import Var, get_unique_variable_name
|
from reflex.vars import get_unique_variable_name
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
from reflex.vars.sequence import ArrayVar
|
||||||
|
|
||||||
|
|
||||||
# TODO: Fix the serialization issue for custom types.
|
# TODO: Fix the serialization issue for custom types.
|
||||||
@ -295,7 +295,7 @@ class DataEditor(NoSSRComponent):
|
|||||||
|
|
||||||
# Define the name of the getData callback associated with this component and assign to get_cell_content.
|
# Define the name of the getData callback associated with this component and assign to get_cell_content.
|
||||||
data_callback = f"getData_{editor_id}"
|
data_callback = f"getData_{editor_id}"
|
||||||
self.get_cell_content = ImmutableVar.create(data_callback) # type: ignore
|
self.get_cell_content = Var(_js_expr=data_callback) # type: ignore
|
||||||
|
|
||||||
code = [f"function {data_callback}([col, row])" "{"]
|
code = [f"function {data_callback}([col, row])" "{"]
|
||||||
|
|
||||||
@ -333,18 +333,16 @@ class DataEditor(NoSSRComponent):
|
|||||||
|
|
||||||
# If rows is not provided, determine from data.
|
# If rows is not provided, determine from data.
|
||||||
if rows is None:
|
if rows is None:
|
||||||
if isinstance(data, ImmutableVar) and not isinstance(data, ArrayVar):
|
if isinstance(data, Var) and not isinstance(data, ArrayVar):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"DataEditor data must be an ArrayVar if rows is not provided."
|
"DataEditor data must be an ArrayVar if rows is not provided."
|
||||||
)
|
)
|
||||||
props["rows"] = (
|
props["rows"] = data.length() if isinstance(data, Var) else len(data)
|
||||||
data.length() if isinstance(data, ImmutableVar) else len(data)
|
|
||||||
)
|
|
||||||
|
|
||||||
if not isinstance(columns, ImmutableVar) and len(columns):
|
if not isinstance(columns, Var) and len(columns):
|
||||||
if (
|
if (
|
||||||
types.is_dataframe(type(data))
|
types.is_dataframe(type(data))
|
||||||
or isinstance(data, ImmutableVar)
|
or isinstance(data, Var)
|
||||||
and types.is_dataframe(data._var_type)
|
and types.is_dataframe(data._var_type)
|
||||||
):
|
):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
|
@ -9,11 +9,10 @@ from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
|
|||||||
from reflex.base import Base
|
from reflex.base import Base
|
||||||
from reflex.components.component import NoSSRComponent
|
from reflex.components.component import NoSSRComponent
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils.imports import ImportDict
|
from reflex.utils.imports import ImportDict
|
||||||
from reflex.utils.serializers import serializer
|
from reflex.utils.serializers import serializer
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class GridColumnIcons(Enum):
|
class GridColumnIcons(Enum):
|
||||||
Array = "array"
|
Array = "array"
|
||||||
@ -89,9 +88,9 @@ class DataEditor(NoSSRComponent):
|
|||||||
*children,
|
*children,
|
||||||
rows: Optional[Union[Var[int], int]] = None,
|
rows: Optional[Union[Var[int], int]] = None,
|
||||||
columns: Optional[
|
columns: Optional[
|
||||||
Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]
|
Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]
|
||||||
] = None,
|
] = None,
|
||||||
data: Optional[Union[Var[List[List[Any]]], List[List[Any]]]] = None,
|
data: Optional[Union[List[List[Any]], Var[List[List[Any]]]]] = None,
|
||||||
get_cell_content: Optional[Union[Var[str], str]] = None,
|
get_cell_content: Optional[Union[Var[str], str]] = None,
|
||||||
get_cell_for_selection: Optional[Union[Var[bool], bool]] = None,
|
get_cell_for_selection: Optional[Union[Var[bool], bool]] = None,
|
||||||
on_paste: Optional[Union[Var[bool], bool]] = None,
|
on_paste: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -107,8 +106,8 @@ class DataEditor(NoSSRComponent):
|
|||||||
row_height: Optional[Union[Var[int], int]] = None,
|
row_height: Optional[Union[Var[int], int]] = None,
|
||||||
row_markers: Optional[
|
row_markers: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["none", "number", "checkbox", "both", "clickable-number"]],
|
Literal["both", "checkbox", "clickable-number", "none", "number"],
|
||||||
Literal["none", "number", "checkbox", "both", "clickable-number"],
|
Var[Literal["both", "checkbox", "clickable-number", "none", "number"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
row_marker_start_index: Optional[Union[Var[int], int]] = None,
|
row_marker_start_index: Optional[Union[Var[int], int]] = None,
|
||||||
@ -118,8 +117,8 @@ class DataEditor(NoSSRComponent):
|
|||||||
vertical_border: Optional[Union[Var[bool], bool]] = None,
|
vertical_border: Optional[Union[Var[bool], bool]] = None,
|
||||||
column_select: Optional[
|
column_select: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["none", "single", "multi"]],
|
Literal["multi", "none", "single"],
|
||||||
Literal["none", "single", "multi"],
|
Var[Literal["multi", "none", "single"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
prevent_diagonal_scrolling: Optional[Union[Var[bool], bool]] = None,
|
prevent_diagonal_scrolling: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -128,106 +127,94 @@ class DataEditor(NoSSRComponent):
|
|||||||
scroll_offset_x: Optional[Union[Var[int], int]] = None,
|
scroll_offset_x: Optional[Union[Var[int], int]] = None,
|
||||||
scroll_offset_y: Optional[Union[Var[int], int]] = None,
|
scroll_offset_y: Optional[Union[Var[int], int]] = None,
|
||||||
theme: Optional[
|
theme: Optional[
|
||||||
Union[Var[Union[DataEditorTheme, Dict]], DataEditorTheme, Dict]
|
Union[DataEditorTheme, Dict, Var[Union[DataEditorTheme, Dict]]]
|
||||||
] = None,
|
] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_cell_activated: Optional[
|
on_cell_activated: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_cell_clicked: Optional[
|
on_cell_clicked: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_cell_context_menu: Optional[
|
on_cell_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_cell_edited: Optional[
|
on_cell_edited: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_column_resize: Optional[
|
on_column_resize: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_delete: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_delete: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_finished_editing: Optional[
|
on_finished_editing: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_group_header_clicked: Optional[
|
on_group_header_clicked: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_group_header_context_menu: Optional[
|
on_group_header_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_group_header_renamed: Optional[
|
on_group_header_renamed: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_header_clicked: Optional[
|
on_header_clicked: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_header_context_menu: Optional[
|
on_header_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_header_menu_click: Optional[
|
on_header_menu_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_item_hovered: Optional[
|
on_item_hovered: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_row_appended: Optional[
|
on_row_appended: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_selection_cleared: Optional[
|
on_selection_cleared: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DataEditor":
|
) -> "DataEditor":
|
||||||
|
@ -7,8 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class Element(Component):
|
class Element(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -21,51 +21,41 @@ class Element(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Element":
|
) -> "Element":
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from reflex.components.el.element import Element
|
from reflex.components.el.element import Element
|
||||||
from reflex.vars import Var as Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
class BaseHTML(Element):
|
class BaseHTML(Element):
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.el.element import Element
|
from reflex.components.el.element import Element
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class BaseHTML(Element):
|
class BaseHTML(Element):
|
||||||
@overload
|
@overload
|
||||||
@ -17,80 +16,70 @@ class BaseHTML(Element):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "BaseHTML":
|
) -> "BaseHTML":
|
||||||
|
@ -11,13 +11,13 @@ from reflex.components.el.element import Element
|
|||||||
from reflex.components.tags.tag import Tag
|
from reflex.components.tags.tag import Tag
|
||||||
from reflex.constants import Dirs, EventTriggers
|
from reflex.constants import Dirs, EventTriggers
|
||||||
from reflex.event import EventChain, EventHandler
|
from reflex.event import EventChain, EventHandler
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.utils.imports import ImportDict
|
from reflex.utils.imports import ImportDict
|
||||||
from reflex.vars import Var, VarData
|
from reflex.vars import VarData
|
||||||
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
FORM_DATA = ImmutableVar.create("form_data")
|
FORM_DATA = Var(_js_expr="form_data")
|
||||||
HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
|
HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
|
||||||
"""
|
"""
|
||||||
const handleSubmit_{{ handle_submit_unique_name }} = useCallback((ev) => {
|
const handleSubmit_{{ handle_submit_unique_name }} = useCallback((ev) => {
|
||||||
@ -197,8 +197,8 @@ class Form(BaseHTML):
|
|||||||
if EventTriggers.ON_SUBMIT in self.event_triggers:
|
if EventTriggers.ON_SUBMIT in self.event_triggers:
|
||||||
render_tag.add_props(
|
render_tag.add_props(
|
||||||
**{
|
**{
|
||||||
EventTriggers.ON_SUBMIT: ImmutableVar(
|
EventTriggers.ON_SUBMIT: Var(
|
||||||
_var_name=f"handleSubmit_{self.handle_submit_unique_name}",
|
_js_expr=f"handleSubmit_{self.handle_submit_unique_name}",
|
||||||
_var_type=EventChain,
|
_var_type=EventChain,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -212,21 +212,21 @@ class Form(BaseHTML):
|
|||||||
# when ref start with refs_ it's an array of refs, so we need different method
|
# when ref start with refs_ it's an array of refs, so we need different method
|
||||||
# to collect data
|
# to collect data
|
||||||
if ref.startswith("refs_"):
|
if ref.startswith("refs_"):
|
||||||
ref_var = ImmutableVar.create_safe(ref[:-3]).as_ref()
|
ref_var = Var(_js_expr=ref[:-3]).as_ref()
|
||||||
form_refs[ref[len("refs_") : -3]] = ImmutableVar.create_safe(
|
form_refs[ref[len("refs_") : -3]] = Var(
|
||||||
f"getRefValues({str(ref_var)})",
|
_js_expr=f"getRefValues({str(ref_var)})",
|
||||||
_var_data=VarData.merge(ref_var._get_all_var_data()),
|
_var_data=VarData.merge(ref_var._get_all_var_data()),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
ref_var = ImmutableVar.create_safe(ref).as_ref()
|
ref_var = Var(_js_expr=ref).as_ref()
|
||||||
form_refs[ref[4:]] = ImmutableVar.create_safe(
|
form_refs[ref[4:]] = Var(
|
||||||
f"getRefValue({str(ref_var)})",
|
_js_expr=f"getRefValue({str(ref_var)})",
|
||||||
_var_data=VarData.merge(ref_var._get_all_var_data()),
|
_var_data=VarData.merge(ref_var._get_all_var_data()),
|
||||||
)
|
)
|
||||||
# print(repr(form_refs))
|
# print(repr(form_refs))
|
||||||
return form_refs
|
return form_refs
|
||||||
|
|
||||||
def _get_vars(self, include_children: bool = True) -> Iterator[ImmutableVar]:
|
def _get_vars(self, include_children: bool = True) -> Iterator[Var]:
|
||||||
yield from super()._get_vars(include_children=include_children)
|
yield from super()._get_vars(include_children=include_children)
|
||||||
yield from self._get_form_refs().values()
|
yield from self._get_form_refs().values()
|
||||||
|
|
||||||
@ -624,15 +624,15 @@ class Textarea(BaseHTML):
|
|||||||
"Cannot combine `enter_key_submit` with `on_key_down`.",
|
"Cannot combine `enter_key_submit` with `on_key_down`.",
|
||||||
)
|
)
|
||||||
tag.add_props(
|
tag.add_props(
|
||||||
on_key_down=ImmutableVar.create_safe(
|
on_key_down=Var(
|
||||||
f"(e) => enterKeySubmitOnKeyDown(e, {str(self.enter_key_submit)})",
|
_js_expr=f"(e) => enterKeySubmitOnKeyDown(e, {str(self.enter_key_submit)})",
|
||||||
_var_data=VarData.merge(self.enter_key_submit._get_all_var_data()),
|
_var_data=VarData.merge(self.enter_key_submit._get_all_var_data()),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if self.auto_height is not None:
|
if self.auto_height is not None:
|
||||||
tag.add_props(
|
tag.add_props(
|
||||||
on_input=ImmutableVar.create_safe(
|
on_input=Var(
|
||||||
f"(e) => autoHeightOnInput(e, {str(self.auto_height)})",
|
_js_expr=f"(e) => autoHeightOnInput(e, {str(self.auto_height)})",
|
||||||
_var_data=VarData.merge(self.auto_height._get_all_var_data()),
|
_var_data=VarData.merge(self.auto_height._get_all_var_data()),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ from typing import Any, Union
|
|||||||
|
|
||||||
from reflex import Component, ComponentNamespace
|
from reflex import Component, ComponentNamespace
|
||||||
from reflex.constants.colors import Color
|
from reflex.constants.colors import Color
|
||||||
from reflex.vars import Var as Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,7 @@
|
|||||||
from typing import List, Union
|
from typing import List, Union
|
||||||
|
|
||||||
from reflex.components.el.element import Element
|
from reflex.components.el.element import Element
|
||||||
from reflex.ivars.base import ImmutableVar
|
from reflex.vars.base import Var
|
||||||
from reflex.vars import Var as Var
|
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
@ -90,9 +89,7 @@ class StyleEl(Element): # noqa: E742
|
|||||||
|
|
||||||
media: Var[Union[str, int, bool]]
|
media: Var[Union[str, int, bool]]
|
||||||
|
|
||||||
special_props: List[ImmutableVar] = [
|
special_props: List[Var] = [Var(_js_expr="suppressHydrationWarning")]
|
||||||
ImmutableVar.create_safe("suppressHydrationWarning")
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
base = Base.create
|
base = Base.create
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.el.element import Element
|
from reflex.components.el.element import Element
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
@ -19,82 +18,72 @@ class Base(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
href: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
target: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Base":
|
) -> "Base":
|
||||||
@ -137,80 +126,70 @@ class Head(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Head":
|
) -> "Head":
|
||||||
@ -254,92 +233,82 @@ class Link(BaseHTML):
|
|||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
cross_origin: Optional[
|
cross_origin: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
href: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
href_lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
integrity: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
integrity: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
media: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
referrer_policy: Optional[
|
referrer_policy: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
rel: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
sizes: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
sizes: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Link":
|
) -> "Link":
|
||||||
@ -391,84 +360,74 @@ class Meta(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
char_set: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
char_set: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
content: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
content: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
http_equiv: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
http_equiv: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
name: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Meta":
|
) -> "Meta":
|
||||||
@ -520,51 +479,41 @@ class Title(Element):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Title":
|
) -> "Title":
|
||||||
@ -591,57 +540,47 @@ class StyleEl(Element):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
media: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "StyleEl":
|
) -> "StyleEl":
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from reflex.vars import Var as Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
from typing import Any, Callable, Dict, Optional, Union, overload
|
from typing import Any, Callable, Dict, Optional, Union, overload
|
||||||
|
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
@ -18,81 +17,71 @@ class Details(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
open: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
open: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Details":
|
) -> "Details":
|
||||||
@ -136,81 +125,71 @@ class Dialog(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
open: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
open: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Dialog":
|
) -> "Dialog":
|
||||||
@ -254,80 +233,70 @@ class Summary(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Summary":
|
) -> "Summary":
|
||||||
@ -370,80 +339,70 @@ class Slot(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Slot":
|
) -> "Slot":
|
||||||
@ -486,80 +445,70 @@ class Template(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Template":
|
) -> "Template":
|
||||||
@ -602,80 +551,70 @@ class Math(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Math":
|
) -> "Math":
|
||||||
@ -718,81 +657,71 @@ class Html(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
manifest: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
manifest: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Html":
|
) -> "Html":
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from reflex.vars import Var as Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
from typing import Any, Callable, Dict, Optional, Union, overload
|
from typing import Any, Callable, Dict, Optional, Union, overload
|
||||||
|
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
@ -18,80 +17,70 @@ class Canvas(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Canvas":
|
) -> "Canvas":
|
||||||
@ -134,80 +123,70 @@ class Noscript(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Noscript":
|
) -> "Noscript":
|
||||||
@ -250,93 +229,83 @@ class Script(BaseHTML):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
async_: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
async_: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
char_set: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
char_set: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
cross_origin: Optional[
|
cross_origin: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
defer: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
defer: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
integrity: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
integrity: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
language: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
language: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
referrer_policy: Optional[
|
referrer_policy: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
src: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Script":
|
) -> "Script":
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||||
|
|
||||||
from reflex.vars import Var as Var
|
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from reflex.vars import Var as Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from reflex.vars import Var as Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import BaseHTML
|
from .base import BaseHTML
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -6,11 +6,10 @@ from typing import Any, Dict, List, Union
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.tags import Tag
|
from reflex.components.tags import Tag
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar, is_computed_var
|
|
||||||
from reflex.utils import types
|
from reflex.utils import types
|
||||||
from reflex.utils.imports import ImportDict
|
from reflex.utils.imports import ImportDict
|
||||||
from reflex.utils.serializers import serialize
|
from reflex.utils.serializers import serialize
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import LiteralVar, Var, is_computed_var
|
||||||
|
|
||||||
|
|
||||||
class Gridjs(Component):
|
class Gridjs(Component):
|
||||||
@ -83,7 +82,7 @@ class DataTable(Gridjs):
|
|||||||
# If data is a pandas dataframe and columns are provided throw an error.
|
# If data is a pandas dataframe and columns are provided throw an error.
|
||||||
if (
|
if (
|
||||||
types.is_dataframe(type(data))
|
types.is_dataframe(type(data))
|
||||||
or (isinstance(data, ImmutableVar) and types.is_dataframe(data._var_type))
|
or (isinstance(data, Var) and types.is_dataframe(data._var_type))
|
||||||
) and columns is not None:
|
) and columns is not None:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Cannot pass in both a pandas dataframe and columns to the data_table component."
|
"Cannot pass in both a pandas dataframe and columns to the data_table component."
|
||||||
@ -91,7 +90,7 @@ class DataTable(Gridjs):
|
|||||||
|
|
||||||
# If data is a list and columns are not provided, throw an error
|
# If data is a list and columns are not provided, throw an error
|
||||||
if (
|
if (
|
||||||
(isinstance(data, ImmutableVar) and types._issubclass(data._var_type, List))
|
(isinstance(data, Var) and types._issubclass(data._var_type, List))
|
||||||
or issubclass(type(data), List)
|
or issubclass(type(data), List)
|
||||||
) and columns is None:
|
) and columns is None:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
@ -113,15 +112,13 @@ class DataTable(Gridjs):
|
|||||||
return {"": "gridjs/dist/theme/mermaid.css"}
|
return {"": "gridjs/dist/theme/mermaid.css"}
|
||||||
|
|
||||||
def _render(self) -> Tag:
|
def _render(self) -> Tag:
|
||||||
if isinstance(self.data, ImmutableVar) and types.is_dataframe(
|
if isinstance(self.data, Var) and types.is_dataframe(self.data._var_type):
|
||||||
self.data._var_type
|
|
||||||
):
|
|
||||||
self.columns = self.data._replace(
|
self.columns = self.data._replace(
|
||||||
_var_name=f"{self.data._var_name}.columns",
|
_js_expr=f"{self.data._js_expr}.columns",
|
||||||
_var_type=List[Any],
|
_var_type=List[Any],
|
||||||
)
|
)
|
||||||
self.data = self.data._replace(
|
self.data = self.data._replace(
|
||||||
_var_name=f"{self.data._var_name}.data",
|
_js_expr=f"{self.data._js_expr}.data",
|
||||||
_var_type=List[List[Any]],
|
_var_type=List[List[Any]],
|
||||||
)
|
)
|
||||||
if types.is_dataframe(type(self.data)):
|
if types.is_dataframe(type(self.data)):
|
||||||
|
@ -7,10 +7,9 @@ from typing import Any, Callable, Dict, List, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils.imports import ImportDict
|
from reflex.utils.imports import ImportDict
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class Gridjs(Component):
|
class Gridjs(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -23,51 +22,41 @@ class Gridjs(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Gridjs":
|
) -> "Gridjs":
|
||||||
@ -95,61 +84,51 @@ class DataTable(Gridjs):
|
|||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
data: Optional[Any] = None,
|
data: Optional[Any] = None,
|
||||||
columns: Optional[Union[Var[List], List]] = None,
|
columns: Optional[Union[List, Var[List]]] = None,
|
||||||
search: Optional[Union[Var[bool], bool]] = None,
|
search: Optional[Union[Var[bool], bool]] = None,
|
||||||
sort: Optional[Union[Var[bool], bool]] = None,
|
sort: Optional[Union[Var[bool], bool]] = None,
|
||||||
resizable: Optional[Union[Var[bool], bool]] = None,
|
resizable: Optional[Union[Var[bool], bool]] = None,
|
||||||
pagination: Optional[Union[Var[Union[Dict, bool]], bool, Dict]] = None,
|
pagination: Optional[Union[Dict, Var[Union[Dict, bool]], bool]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DataTable":
|
) -> "DataTable":
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.utils import format
|
from reflex.utils import format
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
class LucideIconComponent(Component):
|
class LucideIconComponent(Component):
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class LucideIconComponent(Component):
|
class LucideIconComponent(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -22,51 +21,41 @@ class LucideIconComponent(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "LucideIconComponent":
|
) -> "LucideIconComponent":
|
||||||
@ -99,51 +88,41 @@ class Icon(LucideIconComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Icon":
|
) -> "Icon":
|
||||||
|
@ -17,25 +17,25 @@ from reflex.components.radix.themes.typography.heading import Heading
|
|||||||
from reflex.components.radix.themes.typography.link import Link
|
from reflex.components.radix.themes.typography.link import Link
|
||||||
from reflex.components.radix.themes.typography.text import Text
|
from reflex.components.radix.themes.typography.text import Text
|
||||||
from reflex.components.tags.tag import Tag
|
from reflex.components.tags.tag import Tag
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.utils import types
|
from reflex.utils import types
|
||||||
from reflex.utils.imports import ImportDict, ImportVar
|
from reflex.utils.imports import ImportDict, ImportVar
|
||||||
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
|
||||||
# Special vars used in the component map.
|
# Special vars used in the component map.
|
||||||
_CHILDREN = ImmutableVar.create_safe("children")
|
_CHILDREN = Var(_js_expr="children", _var_type=str)
|
||||||
_PROPS = ImmutableVar.create_safe("...props")
|
_PROPS = Var(_js_expr="...props")
|
||||||
_PROPS_IN_TAG = ImmutableVar.create_safe("{...props}")
|
_PROPS_IN_TAG = Var(_js_expr="{...props}")
|
||||||
_MOCK_ARG = ImmutableVar.create_safe("")
|
_MOCK_ARG = Var(_js_expr="", _var_type=str)
|
||||||
|
|
||||||
# Special remark plugins.
|
# Special remark plugins.
|
||||||
_REMARK_MATH = ImmutableVar.create_safe("remarkMath")
|
_REMARK_MATH = Var(_js_expr="remarkMath")
|
||||||
_REMARK_GFM = ImmutableVar.create_safe("remarkGfm")
|
_REMARK_GFM = Var(_js_expr="remarkGfm")
|
||||||
_REMARK_UNWRAP_IMAGES = ImmutableVar.create_safe("remarkUnwrapImages")
|
_REMARK_UNWRAP_IMAGES = Var(_js_expr="remarkUnwrapImages")
|
||||||
_REMARK_PLUGINS = LiteralVar.create([_REMARK_MATH, _REMARK_GFM, _REMARK_UNWRAP_IMAGES])
|
_REMARK_PLUGINS = LiteralVar.create([_REMARK_MATH, _REMARK_GFM, _REMARK_UNWRAP_IMAGES])
|
||||||
|
|
||||||
# Special rehype plugins.
|
# Special rehype plugins.
|
||||||
_REHYPE_KATEX = ImmutableVar.create_safe("rehypeKatex")
|
_REHYPE_KATEX = Var(_js_expr="rehypeKatex")
|
||||||
_REHYPE_RAW = ImmutableVar.create_safe("rehypeRaw")
|
_REHYPE_RAW = Var(_js_expr="rehypeRaw")
|
||||||
_REHYPE_PLUGINS = LiteralVar.create([_REHYPE_KATEX, _REHYPE_RAW])
|
_REHYPE_PLUGINS = LiteralVar.create([_REHYPE_KATEX, _REHYPE_RAW])
|
||||||
|
|
||||||
# These tags do NOT get props passed to them
|
# These tags do NOT get props passed to them
|
||||||
@ -99,8 +99,7 @@ class Markdown(Component):
|
|||||||
The markdown component.
|
The markdown component.
|
||||||
"""
|
"""
|
||||||
assert (
|
assert (
|
||||||
len(children) == 1
|
len(children) == 1 and types._isinstance(children[0], Union[str, Var])
|
||||||
and types._isinstance(children[0], Union[str, ImmutableVar])
|
|
||||||
), "Markdown component must have exactly one child containing the markdown source."
|
), "Markdown component must have exactly one child containing the markdown source."
|
||||||
|
|
||||||
# Update the base component map with the custom component map.
|
# Update the base component map with the custom component map.
|
||||||
@ -155,19 +154,19 @@ class Markdown(Component):
|
|||||||
{
|
{
|
||||||
"": "katex/dist/katex.min.css",
|
"": "katex/dist/katex.min.css",
|
||||||
"remark-math@5.1.1": ImportVar(
|
"remark-math@5.1.1": ImportVar(
|
||||||
tag=_REMARK_MATH._var_name, is_default=True
|
tag=_REMARK_MATH._js_expr, is_default=True
|
||||||
),
|
),
|
||||||
"remark-gfm@3.0.1": ImportVar(
|
"remark-gfm@3.0.1": ImportVar(
|
||||||
tag=_REMARK_GFM._var_name, is_default=True
|
tag=_REMARK_GFM._js_expr, is_default=True
|
||||||
),
|
),
|
||||||
"remark-unwrap-images@4.0.0": ImportVar(
|
"remark-unwrap-images@4.0.0": ImportVar(
|
||||||
tag=_REMARK_UNWRAP_IMAGES._var_name, is_default=True
|
tag=_REMARK_UNWRAP_IMAGES._js_expr, is_default=True
|
||||||
),
|
),
|
||||||
"rehype-katex@6.0.3": ImportVar(
|
"rehype-katex@6.0.3": ImportVar(
|
||||||
tag=_REHYPE_KATEX._var_name, is_default=True
|
tag=_REHYPE_KATEX._js_expr, is_default=True
|
||||||
),
|
),
|
||||||
"rehype-raw@6.1.1": ImportVar(
|
"rehype-raw@6.1.1": ImportVar(
|
||||||
tag=_REHYPE_RAW._var_name, is_default=True
|
tag=_REHYPE_RAW._js_expr, is_default=True
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
*[
|
*[
|
||||||
@ -205,9 +204,7 @@ class Markdown(Component):
|
|||||||
# If the children are set as a prop, don't pass them as children.
|
# If the children are set as a prop, don't pass them as children.
|
||||||
children_prop = props.pop("children", None)
|
children_prop = props.pop("children", None)
|
||||||
if children_prop is not None:
|
if children_prop is not None:
|
||||||
special_props.append(
|
special_props.append(Var(_js_expr=f"children={{{str(children_prop)}}}"))
|
||||||
ImmutableVar.create_safe(f"children={{{str(children_prop)}}}")
|
|
||||||
)
|
|
||||||
children = []
|
children = []
|
||||||
# Get the component.
|
# Get the component.
|
||||||
component = self.component_map[tag](*children, **props).set(
|
component = self.component_map[tag](*children, **props).set(
|
||||||
@ -227,22 +224,22 @@ class Markdown(Component):
|
|||||||
"""
|
"""
|
||||||
return str(self.get_component(tag, **props)).replace("\n", "")
|
return str(self.get_component(tag, **props)).replace("\n", "")
|
||||||
|
|
||||||
def format_component_map(self) -> dict[str, ImmutableVar]:
|
def format_component_map(self) -> dict[str, Var]:
|
||||||
"""Format the component map for rendering.
|
"""Format the component map for rendering.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The formatted component map.
|
The formatted component map.
|
||||||
"""
|
"""
|
||||||
components = {
|
components = {
|
||||||
tag: ImmutableVar.create_safe(
|
tag: Var(
|
||||||
f"(({{node, {_CHILDREN._var_name}, {_PROPS._var_name}}}) => ({self.format_component(tag)}))"
|
_js_expr=f"(({{node, {_CHILDREN._js_expr}, {_PROPS._js_expr}}}) => ({self.format_component(tag)}))"
|
||||||
)
|
)
|
||||||
for tag in self.component_map
|
for tag in self.component_map
|
||||||
}
|
}
|
||||||
|
|
||||||
# Separate out inline code and code blocks.
|
# Separate out inline code and code blocks.
|
||||||
components["code"] = ImmutableVar.create_safe(
|
components["code"] = Var(
|
||||||
f"""(({{node, inline, className, {_CHILDREN._var_name}, {_PROPS._var_name}}}) => {{
|
_js_expr=f"""(({{node, inline, className, {_CHILDREN._js_expr}, {_PROPS._js_expr}}}) => {{
|
||||||
const match = (className || '').match(/language-(?<lang>.*)/);
|
const match = (className || '').match(/language-(?<lang>.*)/);
|
||||||
const language = match ? match[1] : '';
|
const language = match ? match[1] : '';
|
||||||
if (language) {{
|
if (language) {{
|
||||||
@ -258,7 +255,7 @@ class Markdown(Component):
|
|||||||
return inline ? (
|
return inline ? (
|
||||||
{self.format_component("code")}
|
{self.format_component("code")}
|
||||||
) : (
|
) : (
|
||||||
{self.format_component("codeblock", language=ImmutableVar.create_safe("language"))}
|
{self.format_component("codeblock", language=Var(_js_expr="language", _var_type=str))}
|
||||||
);
|
);
|
||||||
}})""".replace("\n", " ")
|
}})""".replace("\n", " ")
|
||||||
)
|
)
|
||||||
@ -298,9 +295,7 @@ class Markdown(Component):
|
|||||||
.add_props(
|
.add_props(
|
||||||
remark_plugins=_REMARK_PLUGINS,
|
remark_plugins=_REMARK_PLUGINS,
|
||||||
rehype_plugins=_REHYPE_PLUGINS,
|
rehype_plugins=_REHYPE_PLUGINS,
|
||||||
components=ImmutableVar.create_safe(
|
components=Var(_js_expr=f"{self._get_component_map_name()}()"),
|
||||||
f"{self._get_component_map_name()}()"
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
.remove_props("componentMap", "componentMapHash")
|
.remove_props("componentMap", "componentMapHash")
|
||||||
)
|
)
|
||||||
|
@ -8,20 +8,20 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils.imports import ImportDict
|
from reflex.utils.imports import ImportDict
|
||||||
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
|
||||||
_CHILDREN = ImmutableVar.create_safe("children")
|
_CHILDREN = Var(_js_expr="children", _var_type=str)
|
||||||
_PROPS = ImmutableVar.create_safe("...props")
|
_PROPS = Var(_js_expr="...props")
|
||||||
_PROPS_IN_TAG = ImmutableVar.create_safe("{...props}")
|
_PROPS_IN_TAG = Var(_js_expr="{...props}")
|
||||||
_MOCK_ARG = ImmutableVar.create_safe("")
|
_MOCK_ARG = Var(_js_expr="", _var_type=str)
|
||||||
_REMARK_MATH = ImmutableVar.create_safe("remarkMath")
|
_REMARK_MATH = Var(_js_expr="remarkMath")
|
||||||
_REMARK_GFM = ImmutableVar.create_safe("remarkGfm")
|
_REMARK_GFM = Var(_js_expr="remarkGfm")
|
||||||
_REMARK_UNWRAP_IMAGES = ImmutableVar.create_safe("remarkUnwrapImages")
|
_REMARK_UNWRAP_IMAGES = Var(_js_expr="remarkUnwrapImages")
|
||||||
_REMARK_PLUGINS = LiteralVar.create([_REMARK_MATH, _REMARK_GFM, _REMARK_UNWRAP_IMAGES])
|
_REMARK_PLUGINS = LiteralVar.create([_REMARK_MATH, _REMARK_GFM, _REMARK_UNWRAP_IMAGES])
|
||||||
_REHYPE_KATEX = ImmutableVar.create_safe("rehypeKatex")
|
_REHYPE_KATEX = Var(_js_expr="rehypeKatex")
|
||||||
_REHYPE_RAW = ImmutableVar.create_safe("rehypeRaw")
|
_REHYPE_RAW = Var(_js_expr="rehypeRaw")
|
||||||
_REHYPE_PLUGINS = LiteralVar.create([_REHYPE_KATEX, _REHYPE_RAW])
|
_REHYPE_PLUGINS = LiteralVar.create([_REHYPE_KATEX, _REHYPE_RAW])
|
||||||
NO_PROPS_TAGS = ("ul", "ol", "li")
|
NO_PROPS_TAGS = ("ul", "ol", "li")
|
||||||
|
|
||||||
@ -41,51 +41,41 @@ class Markdown(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Markdown":
|
) -> "Markdown":
|
||||||
@ -111,4 +101,4 @@ class Markdown(Component):
|
|||||||
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
||||||
def get_component(self, tag: str, **props) -> Component: ...
|
def get_component(self, tag: str, **props) -> Component: ...
|
||||||
def format_component(self, tag: str, **props) -> str: ...
|
def format_component(self, tag: str, **props) -> str: ...
|
||||||
def format_component_map(self) -> dict[str, ImmutableVar]: ...
|
def format_component_map(self) -> dict[str, Var]: ...
|
||||||
|
@ -6,7 +6,7 @@ from typing import List, Optional
|
|||||||
from reflex.components.component import Component, NoSSRComponent
|
from reflex.components.component import Component, NoSSRComponent
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.utils.imports import ImportDict
|
from reflex.utils.imports import ImportDict
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass(frozen=True)
|
@dataclasses.dataclass(frozen=True)
|
||||||
|
@ -8,10 +8,9 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import NoSSRComponent
|
from reflex.components.component import NoSSRComponent
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils.imports import ImportDict
|
from reflex.utils.imports import ImportDict
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
@dataclasses.dataclass(frozen=True)
|
@dataclasses.dataclass(frozen=True)
|
||||||
class MomentDelta:
|
class MomentDelta:
|
||||||
@ -36,8 +35,8 @@ class Moment(NoSSRComponent):
|
|||||||
format: Optional[Union[Var[str], str]] = None,
|
format: Optional[Union[Var[str], str]] = None,
|
||||||
trim: Optional[Union[Var[bool], bool]] = None,
|
trim: Optional[Union[Var[bool], bool]] = None,
|
||||||
parse: Optional[Union[Var[str], str]] = None,
|
parse: Optional[Union[Var[str], str]] = None,
|
||||||
add: Optional[Union[Var[MomentDelta], MomentDelta]] = None,
|
add: Optional[Union[MomentDelta, Var[MomentDelta]]] = None,
|
||||||
subtract: Optional[Union[Var[MomentDelta], MomentDelta]] = None,
|
subtract: Optional[Union[MomentDelta, Var[MomentDelta]]] = None,
|
||||||
from_now: Optional[Union[Var[bool], bool]] = None,
|
from_now: Optional[Union[Var[bool], bool]] = None,
|
||||||
from_now_during: Optional[Union[Var[int], int]] = None,
|
from_now_during: Optional[Union[Var[int], int]] = None,
|
||||||
to_now: Optional[Union[Var[bool], bool]] = None,
|
to_now: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -57,54 +56,42 @@ class Moment(NoSSRComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_change: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Moment":
|
) -> "Moment":
|
||||||
|
@ -7,8 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class NextComponent(Component):
|
class NextComponent(Component):
|
||||||
...
|
...
|
||||||
@ -23,51 +23,41 @@ class NextComponent(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "NextComponent":
|
) -> "NextComponent":
|
||||||
|
@ -4,7 +4,7 @@ from typing import Any, Literal, Optional, Union
|
|||||||
|
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.utils import types
|
from reflex.utils import types
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import NextComponent
|
from .base import NextComponent
|
||||||
|
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
from typing import Any, Callable, Dict, Literal, Optional, Union, overload
|
from typing import Any, Callable, Dict, Literal, Optional, Union, overload
|
||||||
|
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import NextComponent
|
from .base import NextComponent
|
||||||
|
|
||||||
@ -20,16 +19,16 @@ class Image(NextComponent):
|
|||||||
*children,
|
*children,
|
||||||
width: Optional[Union[int, str]] = None,
|
width: Optional[Union[int, str]] = None,
|
||||||
height: Optional[Union[int, str]] = None,
|
height: Optional[Union[int, str]] = None,
|
||||||
src: Optional[Union[Var[Any], Any]] = None,
|
src: Optional[Union[Any, Var[Any]]] = None,
|
||||||
alt: Optional[Union[Var[str], str]] = None,
|
alt: Optional[Union[Var[str], str]] = None,
|
||||||
loader: Optional[Union[Var[Any], Any]] = None,
|
loader: Optional[Union[Any, Var[Any]]] = None,
|
||||||
fill: Optional[Union[Var[bool], bool]] = None,
|
fill: Optional[Union[Var[bool], bool]] = None,
|
||||||
sizes: Optional[Union[Var[str], str]] = None,
|
sizes: Optional[Union[Var[str], str]] = None,
|
||||||
quality: Optional[Union[Var[int], int]] = None,
|
quality: Optional[Union[Var[int], int]] = None,
|
||||||
priority: Optional[Union[Var[bool], bool]] = None,
|
priority: Optional[Union[Var[bool], bool]] = None,
|
||||||
placeholder: Optional[Union[Var[str], str]] = None,
|
placeholder: Optional[Union[Var[str], str]] = None,
|
||||||
loading: Optional[
|
loading: Optional[
|
||||||
Union[Var[Literal["lazy", "eager"]], Literal["lazy", "eager"]]
|
Union[Literal["eager", "lazy"], Var[Literal["eager", "lazy"]]]
|
||||||
] = None,
|
] = None,
|
||||||
blurDataURL: Optional[Union[Var[str], str]] = None,
|
blurDataURL: Optional[Union[Var[str], str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
@ -37,57 +36,43 @@ class Image(NextComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_error: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_load: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_load: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Image":
|
) -> "Image":
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"""A link component."""
|
"""A link component."""
|
||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
class NextLink(Component):
|
class NextLink(Component):
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class NextLink(Component):
|
class NextLink(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -24,51 +23,41 @@ class NextLink(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "NextLink":
|
) -> "NextLink":
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import NextComponent
|
from .base import NextComponent
|
||||||
|
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import NextComponent
|
from .base import NextComponent
|
||||||
|
|
||||||
@ -26,51 +25,41 @@ class Video(NextComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Video":
|
) -> "Video":
|
||||||
|
@ -8,9 +8,8 @@ from reflex.base import Base
|
|||||||
from reflex.components.component import Component, NoSSRComponent
|
from reflex.components.component import Component, NoSSRComponent
|
||||||
from reflex.components.core.cond import color_mode_cond
|
from reflex.components.core.cond import color_mode_cond
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.utils import console
|
from reflex.utils import console
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from plotly.graph_objects import Figure, layout
|
from plotly.graph_objects import Figure, layout
|
||||||
@ -31,7 +30,7 @@ def _event_data_signature(e0: Var) -> List[Any]:
|
|||||||
Returns:
|
Returns:
|
||||||
The event key extracted from the event data (if defined).
|
The event key extracted from the event data (if defined).
|
||||||
"""
|
"""
|
||||||
return [ImmutableVar.create_safe(f"{e0}?.event")]
|
return [Var(_js_expr=f"{e0}?.event")]
|
||||||
|
|
||||||
|
|
||||||
def _event_points_data_signature(e0: Var) -> List[Any]:
|
def _event_points_data_signature(e0: Var) -> List[Any]:
|
||||||
@ -44,8 +43,8 @@ def _event_points_data_signature(e0: Var) -> List[Any]:
|
|||||||
The event data and the extracted points.
|
The event data and the extracted points.
|
||||||
"""
|
"""
|
||||||
return [
|
return [
|
||||||
ImmutableVar.create_safe(f"{e0}?.event"),
|
Var(_js_expr=f"{e0}?.event"),
|
||||||
ImmutableVar.create_safe(f"extractPoints({e0}?.points)"),
|
Var(_js_expr=f"extractPoints({e0}?.points)"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -102,13 +101,13 @@ class Plotly(NoSSRComponent):
|
|||||||
is_default = True
|
is_default = True
|
||||||
|
|
||||||
# The figure to display. This can be a plotly figure or a plotly data json.
|
# The figure to display. This can be a plotly figure or a plotly data json.
|
||||||
data: Var[Figure]
|
data: Var[Figure] # type: ignore
|
||||||
|
|
||||||
# The layout of the graph.
|
# The layout of the graph.
|
||||||
layout: Var[Dict]
|
layout: Var[Dict]
|
||||||
|
|
||||||
# The template for visual appearance of the graph.
|
# The template for visual appearance of the graph.
|
||||||
template: Var[Template]
|
template: Var[Template] # type: ignore
|
||||||
|
|
||||||
# The config of the graph.
|
# The config of the graph.
|
||||||
config: Var[Dict]
|
config: Var[Dict]
|
||||||
@ -243,7 +242,7 @@ const extractPoints = (points) => {
|
|||||||
light=LiteralVar.create(templates["plotly"]),
|
light=LiteralVar.create(templates["plotly"]),
|
||||||
dark=LiteralVar.create(templates["plotly_dark"]),
|
dark=LiteralVar.create(templates["plotly_dark"]),
|
||||||
)
|
)
|
||||||
if isinstance(responsive_template, ImmutableVar):
|
if isinstance(responsive_template, Var):
|
||||||
# Mark the conditional Var as a Template to avoid type mismatch
|
# Mark the conditional Var as a Template to avoid type mismatch
|
||||||
responsive_template = responsive_template.to(Template)
|
responsive_template = responsive_template.to(Template)
|
||||||
props.setdefault("template", responsive_template)
|
props.setdefault("template", responsive_template)
|
||||||
@ -255,7 +254,7 @@ const extractPoints = (points) => {
|
|||||||
|
|
||||||
def _render(self):
|
def _render(self):
|
||||||
tag = super()._render()
|
tag = super()._render()
|
||||||
figure = self.data.upcast().to(dict)
|
figure = self.data.to(dict)
|
||||||
merge_dicts = [] # Data will be merged and spread from these dict Vars
|
merge_dicts = [] # Data will be merged and spread from these dict Vars
|
||||||
if self.layout is not None:
|
if self.layout is not None:
|
||||||
# Why is this not a literal dict? Great question... it didn't work
|
# Why is this not a literal dict? Great question... it didn't work
|
||||||
@ -269,12 +268,12 @@ const extractPoints = (points) => {
|
|||||||
if merge_dicts:
|
if merge_dicts:
|
||||||
tag.special_props.append(
|
tag.special_props.append(
|
||||||
# Merge all dictionaries and spread the result over props.
|
# Merge all dictionaries and spread the result over props.
|
||||||
ImmutableVar.create_safe(
|
Var(
|
||||||
f"{{...mergician({str(figure)},"
|
_js_expr=f"{{...mergician({str(figure)},"
|
||||||
f"{','.join(str(md) for md in merge_dicts)})}}",
|
f"{','.join(str(md) for md in merge_dicts)})}}",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# Spread the figure dict over props, nothing to merge.
|
# Spread the figure dict over props, nothing to merge.
|
||||||
tag.special_props.append(ImmutableVar.create_safe(f"{{...{str(figure)}}}"))
|
tag.special_props.append(Var(_js_expr=f"{{...{str(figure)}}}"))
|
||||||
return tag
|
return tag
|
||||||
|
@ -8,10 +8,9 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
from reflex.base import Base
|
from reflex.base import Base
|
||||||
from reflex.components.component import NoSSRComponent
|
from reflex.components.component import NoSSRComponent
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils import console
|
from reflex.utils import console
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from plotly.graph_objects import Figure, layout
|
from plotly.graph_objects import Figure, layout
|
||||||
@ -35,115 +34,101 @@ class Plotly(NoSSRComponent):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
data: Optional[Union[Var[Figure], Figure]] = None, # type: ignore
|
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore
|
||||||
layout: Optional[Union[Var[Dict], Dict]] = None,
|
layout: Optional[Union[Dict, Var[Dict]]] = None,
|
||||||
template: Optional[Union[Var[Template], Template]] = None, # type: ignore
|
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore
|
||||||
config: Optional[Union[Var[Dict], Dict]] = None,
|
config: Optional[Union[Dict, Var[Dict]]] = None,
|
||||||
use_resize_handler: Optional[Union[Var[bool], bool]] = None,
|
use_resize_handler: Optional[Union[Var[bool], bool]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_after_plot: Optional[
|
on_after_plot: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_animated: Optional[
|
on_animated: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_animating_frame: Optional[
|
on_animating_frame: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_animation_interrupted: Optional[
|
on_animation_interrupted: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_autosize: Optional[
|
on_autosize: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_before_hover: Optional[
|
on_before_hover: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_blur: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_button_clicked: Optional[
|
on_button_clicked: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_deselect: Optional[
|
on_deselect: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_hover: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_hover: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_redraw: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_redraw: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_relayout: Optional[
|
on_relayout: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_relayouting: Optional[
|
on_relayouting: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_restyle: Optional[
|
on_restyle: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_selected: Optional[
|
on_selected: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_selecting: Optional[
|
on_selecting: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_transition_interrupted: Optional[
|
on_transition_interrupted: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_transitioning: Optional[
|
on_transitioning: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_unhover: Optional[
|
on_unhover: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Plotly":
|
) -> "Plotly":
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from reflex.base import Base
|
from reflex.base import Base
|
||||||
from reflex.ivars.object import LiteralObjectVar
|
|
||||||
from reflex.utils import format
|
from reflex.utils import format
|
||||||
|
from reflex.vars.object import LiteralObjectVar
|
||||||
|
|
||||||
|
|
||||||
class PropsBase(Base):
|
class PropsBase(Base):
|
||||||
|
@ -11,9 +11,9 @@ from reflex.components.lucide.icon import Icon
|
|||||||
from reflex.components.radix.primitives.base import RadixPrimitiveComponent
|
from reflex.components.radix.primitives.base import RadixPrimitiveComponent
|
||||||
from reflex.components.radix.themes.base import LiteralAccentColor, LiteralRadius
|
from reflex.components.radix.themes.base import LiteralAccentColor, LiteralRadius
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var, get_uuid_string_var
|
from reflex.vars import get_uuid_string_var
|
||||||
|
from reflex.vars.base import LiteralVar, Var
|
||||||
|
|
||||||
LiteralAccordionType = Literal["single", "multiple"]
|
LiteralAccordionType = Literal["single", "multiple"]
|
||||||
LiteralAccordionDir = Literal["ltr", "rtl"]
|
LiteralAccordionDir = Literal["ltr", "rtl"]
|
||||||
@ -193,8 +193,8 @@ class AccordionItem(AccordionComponent):
|
|||||||
def create(
|
def create(
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
header: Optional[Component | ImmutableVar] = None,
|
header: Optional[Component | Var] = None,
|
||||||
content: Optional[Component | ImmutableVar] = None,
|
content: Optional[Component | Var] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> Component:
|
) -> Component:
|
||||||
"""Create an accordion item.
|
"""Create an accordion item.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@ from typing import List
|
|||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.tags.tag import Tag
|
from reflex.components.tags.tag import Tag
|
||||||
from reflex.utils import format
|
from reflex.utils import format
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
class RadixPrimitiveComponent(Component):
|
class RadixPrimitiveComponent(Component):
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class RadixPrimitiveComponent(Component):
|
class RadixPrimitiveComponent(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -23,51 +22,41 @@ class RadixPrimitiveComponent(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "RadixPrimitiveComponent":
|
) -> "RadixPrimitiveComponent":
|
||||||
@ -101,51 +90,41 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "RadixPrimitiveComponentWithClassName":
|
) -> "RadixPrimitiveComponentWithClassName":
|
||||||
|
@ -11,7 +11,7 @@ from reflex.components.radix.primitives.base import RadixPrimitiveComponent
|
|||||||
from reflex.components.radix.themes.base import Theme
|
from reflex.components.radix.themes.base import Theme
|
||||||
from reflex.components.radix.themes.layout.flex import Flex
|
from reflex.components.radix.themes.layout.flex import Flex
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
class DrawerComponent(RadixPrimitiveComponent):
|
class DrawerComponent(RadixPrimitiveComponent):
|
||||||
|
@ -8,9 +8,8 @@ from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
|
|||||||
from reflex.components.component import ComponentNamespace
|
from reflex.components.component import ComponentNamespace
|
||||||
from reflex.components.radix.primitives.base import RadixPrimitiveComponent
|
from reflex.components.radix.primitives.base import RadixPrimitiveComponent
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class DrawerComponent(RadixPrimitiveComponent):
|
class DrawerComponent(RadixPrimitiveComponent):
|
||||||
@overload
|
@overload
|
||||||
@ -24,51 +23,41 @@ class DrawerComponent(RadixPrimitiveComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DrawerComponent":
|
) -> "DrawerComponent":
|
||||||
@ -107,8 +96,8 @@ class DrawerRoot(DrawerComponent):
|
|||||||
modal: Optional[Union[Var[bool], bool]] = None,
|
modal: Optional[Union[Var[bool], bool]] = None,
|
||||||
direction: Optional[
|
direction: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["top", "bottom", "left", "right"]],
|
Literal["bottom", "left", "right", "top"],
|
||||||
Literal["top", "bottom", "left", "right"],
|
Var[Literal["bottom", "left", "right", "top"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
preventScrollRestoration: Optional[Union[Var[bool], bool]] = None,
|
preventScrollRestoration: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -118,54 +107,44 @@ class DrawerRoot(DrawerComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_open_change: Optional[
|
on_open_change: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DrawerRoot":
|
) -> "DrawerRoot":
|
||||||
@ -208,51 +187,41 @@ class DrawerTrigger(DrawerComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DrawerTrigger":
|
) -> "DrawerTrigger":
|
||||||
@ -279,51 +248,41 @@ class DrawerPortal(DrawerComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DrawerPortal":
|
) -> "DrawerPortal":
|
||||||
@ -357,66 +316,56 @@ class DrawerContent(DrawerComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_close_auto_focus: Optional[
|
on_close_auto_focus: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_escape_key_down: Optional[
|
on_escape_key_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_interact_outside: Optional[
|
on_interact_outside: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_open_auto_focus: Optional[
|
on_open_auto_focus: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_pointer_down_outside: Optional[
|
on_pointer_down_outside: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DrawerContent":
|
) -> "DrawerContent":
|
||||||
@ -454,51 +403,41 @@ class DrawerOverlay(DrawerComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DrawerOverlay":
|
) -> "DrawerOverlay":
|
||||||
@ -532,51 +471,41 @@ class DrawerClose(DrawerTrigger):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DrawerClose":
|
) -> "DrawerClose":
|
||||||
@ -603,51 +532,41 @@ class DrawerTitle(DrawerComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DrawerTitle":
|
) -> "DrawerTitle":
|
||||||
@ -681,51 +600,41 @@ class DrawerDescription(DrawerComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DrawerDescription":
|
) -> "DrawerDescription":
|
||||||
@ -769,8 +678,8 @@ class Drawer(ComponentNamespace):
|
|||||||
modal: Optional[Union[Var[bool], bool]] = None,
|
modal: Optional[Union[Var[bool], bool]] = None,
|
||||||
direction: Optional[
|
direction: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["top", "bottom", "left", "right"]],
|
Literal["bottom", "left", "right", "top"],
|
||||||
Literal["top", "bottom", "left", "right"],
|
Var[Literal["bottom", "left", "right", "top"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
preventScrollRestoration: Optional[Union[Var[bool], bool]] = None,
|
preventScrollRestoration: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -780,54 +689,44 @@ class Drawer(ComponentNamespace):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_open_change: Optional[
|
on_open_change: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "DrawerRoot":
|
) -> "DrawerRoot":
|
||||||
|
@ -9,7 +9,7 @@ from reflex.components.core.debounce import DebounceInput
|
|||||||
from reflex.components.el.elements.forms import Form as HTMLForm
|
from reflex.components.el.elements.forms import Form as HTMLForm
|
||||||
from reflex.components.radix.themes.components.text_field import TextFieldRoot
|
from reflex.components.radix.themes.components.text_field import TextFieldRoot
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import RadixPrimitiveComponentWithClassName
|
from .base import RadixPrimitiveComponentWithClassName
|
||||||
|
|
||||||
|
@ -8,9 +8,8 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.components.component import ComponentNamespace
|
from reflex.components.component import ComponentNamespace
|
||||||
from reflex.components.el.elements.forms import Form as HTMLForm
|
from reflex.components.el.elements.forms import Form as HTMLForm
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .base import RadixPrimitiveComponentWithClassName
|
from .base import RadixPrimitiveComponentWithClassName
|
||||||
|
|
||||||
@ -26,51 +25,41 @@ class FormComponent(RadixPrimitiveComponentWithClassName):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "FormComponent":
|
) -> "FormComponent":
|
||||||
@ -100,101 +89,89 @@ class FormRoot(FormComponent, HTMLForm):
|
|||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
accept: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
accept_charset: Optional[
|
accept_charset: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
action: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_complete: Optional[
|
auto_complete: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
enc_type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
method: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
name: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
no_validate: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
target: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
reset_on_submit: Optional[Union[Var[bool], bool]] = None,
|
reset_on_submit: Optional[Union[Var[bool], bool]] = None,
|
||||||
handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
|
handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_clear_server_errors: Optional[
|
on_clear_server_errors: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_submit: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "FormRoot":
|
) -> "FormRoot":
|
||||||
@ -258,51 +235,41 @@ class FormField(FormComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "FormField":
|
) -> "FormField":
|
||||||
@ -339,51 +306,41 @@ class FormLabel(FormComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "FormLabel":
|
) -> "FormLabel":
|
||||||
@ -417,51 +374,41 @@ class FormControl(FormComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "FormControl":
|
) -> "FormControl":
|
||||||
@ -510,6 +457,18 @@ class FormMessage(FormComponent):
|
|||||||
name: Optional[Union[Var[str], str]] = None,
|
name: Optional[Union[Var[str], str]] = None,
|
||||||
match: Optional[
|
match: Optional[
|
||||||
Union[
|
Union[
|
||||||
|
Literal[
|
||||||
|
"badInput",
|
||||||
|
"patternMismatch",
|
||||||
|
"rangeOverflow",
|
||||||
|
"rangeUnderflow",
|
||||||
|
"stepMismatch",
|
||||||
|
"tooLong",
|
||||||
|
"tooShort",
|
||||||
|
"typeMismatch",
|
||||||
|
"valid",
|
||||||
|
"valueMissing",
|
||||||
|
],
|
||||||
Var[
|
Var[
|
||||||
Literal[
|
Literal[
|
||||||
"badInput",
|
"badInput",
|
||||||
@ -524,18 +483,6 @@ class FormMessage(FormComponent):
|
|||||||
"valueMissing",
|
"valueMissing",
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
Literal[
|
|
||||||
"badInput",
|
|
||||||
"patternMismatch",
|
|
||||||
"rangeOverflow",
|
|
||||||
"rangeUnderflow",
|
|
||||||
"stepMismatch",
|
|
||||||
"tooLong",
|
|
||||||
"tooShort",
|
|
||||||
"typeMismatch",
|
|
||||||
"valid",
|
|
||||||
"valueMissing",
|
|
||||||
],
|
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
force_match: Optional[Union[Var[bool], bool]] = None,
|
force_match: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -545,51 +492,41 @@ class FormMessage(FormComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "FormMessage":
|
) -> "FormMessage":
|
||||||
@ -626,51 +563,41 @@ class FormValidityState(FormComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "FormValidityState":
|
) -> "FormValidityState":
|
||||||
@ -704,51 +631,41 @@ class FormSubmit(FormComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "FormSubmit":
|
) -> "FormSubmit":
|
||||||
@ -779,101 +696,89 @@ class Form(FormRoot):
|
|||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
accept: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
accept_charset: Optional[
|
accept_charset: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
action: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_complete: Optional[
|
auto_complete: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
enc_type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
method: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
name: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
no_validate: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
target: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
reset_on_submit: Optional[Union[Var[bool], bool]] = None,
|
reset_on_submit: Optional[Union[Var[bool], bool]] = None,
|
||||||
handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
|
handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_clear_server_errors: Optional[
|
on_clear_server_errors: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_submit: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Form":
|
) -> "Form":
|
||||||
@ -935,101 +840,89 @@ class FormNamespace(ComponentNamespace):
|
|||||||
def __call__(
|
def __call__(
|
||||||
*children,
|
*children,
|
||||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
accept: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
accept_charset: Optional[
|
accept_charset: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
action: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_complete: Optional[
|
auto_complete: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
enc_type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
method: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
name: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
no_validate: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
target: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
reset_on_submit: Optional[Union[Var[bool], bool]] = None,
|
reset_on_submit: Optional[Union[Var[bool], bool]] = None,
|
||||||
handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
|
handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_clear_server_errors: Optional[
|
on_clear_server_errors: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_submit: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Form":
|
) -> "Form":
|
||||||
|
@ -9,7 +9,7 @@ from reflex.components.core.colors import color
|
|||||||
from reflex.components.radix.primitives.accordion import DEFAULT_ANIMATION_DURATION
|
from reflex.components.radix.primitives.accordion import DEFAULT_ANIMATION_DURATION
|
||||||
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
||||||
from reflex.components.radix.themes.base import LiteralAccentColor, LiteralRadius
|
from reflex.components.radix.themes.base import LiteralAccentColor, LiteralRadius
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
|
|
||||||
class ProgressComponent(RadixPrimitiveComponentWithClassName):
|
class ProgressComponent(RadixPrimitiveComponentWithClassName):
|
||||||
|
@ -8,9 +8,8 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.components.component import ComponentNamespace
|
from reflex.components.component import ComponentNamespace
|
||||||
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
class ProgressComponent(RadixPrimitiveComponentWithClassName):
|
class ProgressComponent(RadixPrimitiveComponentWithClassName):
|
||||||
@overload
|
@overload
|
||||||
@ -24,51 +23,41 @@ class ProgressComponent(RadixPrimitiveComponentWithClassName):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ProgressComponent":
|
) -> "ProgressComponent":
|
||||||
@ -99,8 +88,8 @@ class ProgressRoot(ProgressComponent):
|
|||||||
*children,
|
*children,
|
||||||
radius: Optional[
|
radius: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["none", "small", "medium", "large", "full"]],
|
Literal["full", "large", "medium", "none", "small"],
|
||||||
Literal["none", "small", "medium", "large", "full"],
|
Var[Literal["full", "large", "medium", "none", "small"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -109,51 +98,41 @@ class ProgressRoot(ProgressComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ProgressRoot":
|
) -> "ProgressRoot":
|
||||||
@ -187,63 +166,63 @@ class ProgressIndicator(ProgressComponent):
|
|||||||
max: Optional[Union[Var[Optional[int]], int]] = None,
|
max: Optional[Union[Var[Optional[int]], int]] = None,
|
||||||
color_scheme: Optional[
|
color_scheme: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[
|
|
||||||
Literal[
|
|
||||||
"tomato",
|
|
||||||
"red",
|
|
||||||
"ruby",
|
|
||||||
"crimson",
|
|
||||||
"pink",
|
|
||||||
"plum",
|
|
||||||
"purple",
|
|
||||||
"violet",
|
|
||||||
"iris",
|
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
|
||||||
"mint",
|
|
||||||
"lime",
|
|
||||||
"yellow",
|
|
||||||
"amber",
|
|
||||||
"gold",
|
|
||||||
"bronze",
|
|
||||||
"gray",
|
|
||||||
]
|
|
||||||
],
|
|
||||||
Literal[
|
Literal[
|
||||||
"tomato",
|
"amber",
|
||||||
"red",
|
"blue",
|
||||||
"ruby",
|
"bronze",
|
||||||
|
"brown",
|
||||||
"crimson",
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
"pink",
|
"pink",
|
||||||
"plum",
|
"plum",
|
||||||
"purple",
|
"purple",
|
||||||
"violet",
|
"red",
|
||||||
"iris",
|
"ruby",
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
"sky",
|
||||||
"mint",
|
"teal",
|
||||||
"lime",
|
"tomato",
|
||||||
|
"violet",
|
||||||
"yellow",
|
"yellow",
|
||||||
"amber",
|
],
|
||||||
"gold",
|
Var[
|
||||||
"bronze",
|
Literal[
|
||||||
"gray",
|
"amber",
|
||||||
|
"blue",
|
||||||
|
"bronze",
|
||||||
|
"brown",
|
||||||
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
|
"pink",
|
||||||
|
"plum",
|
||||||
|
"purple",
|
||||||
|
"red",
|
||||||
|
"ruby",
|
||||||
|
"sky",
|
||||||
|
"teal",
|
||||||
|
"tomato",
|
||||||
|
"violet",
|
||||||
|
"yellow",
|
||||||
|
]
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
@ -253,51 +232,41 @@ class ProgressIndicator(ProgressComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ProgressIndicator":
|
) -> "ProgressIndicator":
|
||||||
@ -330,63 +299,63 @@ class Progress(ProgressRoot):
|
|||||||
*children,
|
*children,
|
||||||
color_scheme: Optional[
|
color_scheme: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[
|
|
||||||
Literal[
|
|
||||||
"tomato",
|
|
||||||
"red",
|
|
||||||
"ruby",
|
|
||||||
"crimson",
|
|
||||||
"pink",
|
|
||||||
"plum",
|
|
||||||
"purple",
|
|
||||||
"violet",
|
|
||||||
"iris",
|
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
|
||||||
"mint",
|
|
||||||
"lime",
|
|
||||||
"yellow",
|
|
||||||
"amber",
|
|
||||||
"gold",
|
|
||||||
"bronze",
|
|
||||||
"gray",
|
|
||||||
]
|
|
||||||
],
|
|
||||||
Literal[
|
Literal[
|
||||||
"tomato",
|
"amber",
|
||||||
"red",
|
"blue",
|
||||||
"ruby",
|
"bronze",
|
||||||
|
"brown",
|
||||||
"crimson",
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
"pink",
|
"pink",
|
||||||
"plum",
|
"plum",
|
||||||
"purple",
|
"purple",
|
||||||
"violet",
|
"red",
|
||||||
"iris",
|
"ruby",
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
"sky",
|
||||||
"mint",
|
"teal",
|
||||||
"lime",
|
"tomato",
|
||||||
|
"violet",
|
||||||
"yellow",
|
"yellow",
|
||||||
"amber",
|
],
|
||||||
"gold",
|
Var[
|
||||||
"bronze",
|
Literal[
|
||||||
"gray",
|
"amber",
|
||||||
|
"blue",
|
||||||
|
"bronze",
|
||||||
|
"brown",
|
||||||
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
|
"pink",
|
||||||
|
"plum",
|
||||||
|
"purple",
|
||||||
|
"red",
|
||||||
|
"ruby",
|
||||||
|
"sky",
|
||||||
|
"teal",
|
||||||
|
"tomato",
|
||||||
|
"violet",
|
||||||
|
"yellow",
|
||||||
|
]
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
@ -394,8 +363,8 @@ class Progress(ProgressRoot):
|
|||||||
max: Optional[Union[Var[Optional[int]], int]] = None,
|
max: Optional[Union[Var[Optional[int]], int]] = None,
|
||||||
radius: Optional[
|
radius: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["none", "small", "medium", "large", "full"]],
|
Literal["full", "large", "medium", "none", "small"],
|
||||||
Literal["none", "small", "medium", "large", "full"],
|
Var[Literal["full", "large", "medium", "none", "small"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -404,51 +373,41 @@ class Progress(ProgressRoot):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Progress":
|
) -> "Progress":
|
||||||
@ -482,63 +441,63 @@ class ProgressNamespace(ComponentNamespace):
|
|||||||
*children,
|
*children,
|
||||||
color_scheme: Optional[
|
color_scheme: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[
|
|
||||||
Literal[
|
|
||||||
"tomato",
|
|
||||||
"red",
|
|
||||||
"ruby",
|
|
||||||
"crimson",
|
|
||||||
"pink",
|
|
||||||
"plum",
|
|
||||||
"purple",
|
|
||||||
"violet",
|
|
||||||
"iris",
|
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
|
||||||
"mint",
|
|
||||||
"lime",
|
|
||||||
"yellow",
|
|
||||||
"amber",
|
|
||||||
"gold",
|
|
||||||
"bronze",
|
|
||||||
"gray",
|
|
||||||
]
|
|
||||||
],
|
|
||||||
Literal[
|
Literal[
|
||||||
"tomato",
|
"amber",
|
||||||
"red",
|
"blue",
|
||||||
"ruby",
|
"bronze",
|
||||||
|
"brown",
|
||||||
"crimson",
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
"pink",
|
"pink",
|
||||||
"plum",
|
"plum",
|
||||||
"purple",
|
"purple",
|
||||||
"violet",
|
"red",
|
||||||
"iris",
|
"ruby",
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
"sky",
|
||||||
"mint",
|
"teal",
|
||||||
"lime",
|
"tomato",
|
||||||
|
"violet",
|
||||||
"yellow",
|
"yellow",
|
||||||
"amber",
|
],
|
||||||
"gold",
|
Var[
|
||||||
"bronze",
|
Literal[
|
||||||
"gray",
|
"amber",
|
||||||
|
"blue",
|
||||||
|
"bronze",
|
||||||
|
"brown",
|
||||||
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
|
"pink",
|
||||||
|
"plum",
|
||||||
|
"purple",
|
||||||
|
"red",
|
||||||
|
"ruby",
|
||||||
|
"sky",
|
||||||
|
"teal",
|
||||||
|
"tomato",
|
||||||
|
"violet",
|
||||||
|
"yellow",
|
||||||
|
]
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
@ -546,8 +505,8 @@ class ProgressNamespace(ComponentNamespace):
|
|||||||
max: Optional[Union[Var[Optional[int]], int]] = None,
|
max: Optional[Union[Var[Optional[int]], int]] = None,
|
||||||
radius: Optional[
|
radius: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["none", "small", "medium", "large", "full"]],
|
Literal["full", "large", "medium", "none", "small"],
|
||||||
Literal["none", "small", "medium", "large", "full"],
|
Var[Literal["full", "large", "medium", "none", "small"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -556,51 +515,41 @@ class ProgressNamespace(ComponentNamespace):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Progress":
|
) -> "Progress":
|
||||||
|
@ -7,7 +7,7 @@ from typing import Any, List, Literal
|
|||||||
from reflex.components.component import Component, ComponentNamespace
|
from reflex.components.component import Component, ComponentNamespace
|
||||||
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
LiteralSliderOrientation = Literal["horizontal", "vertical"]
|
LiteralSliderOrientation = Literal["horizontal", "vertical"]
|
||||||
LiteralSliderDir = Literal["ltr", "rtl"]
|
LiteralSliderDir = Literal["ltr", "rtl"]
|
||||||
|
@ -8,9 +8,8 @@ from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
|
|||||||
from reflex.components.component import Component, ComponentNamespace
|
from reflex.components.component import Component, ComponentNamespace
|
||||||
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
LiteralSliderOrientation = Literal["horizontal", "vertical"]
|
LiteralSliderOrientation = Literal["horizontal", "vertical"]
|
||||||
LiteralSliderDir = Literal["ltr", "rtl"]
|
LiteralSliderDir = Literal["ltr", "rtl"]
|
||||||
@ -27,51 +26,41 @@ class SliderComponent(RadixPrimitiveComponentWithClassName):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "SliderComponent":
|
) -> "SliderComponent":
|
||||||
@ -100,17 +89,17 @@ class SliderRoot(SliderComponent):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
default_value: Optional[Union[Var[List[int]], List[int]]] = None,
|
default_value: Optional[Union[List[int], Var[List[int]]]] = None,
|
||||||
value: Optional[Union[Var[List[int]], List[int]]] = None,
|
value: Optional[Union[List[int], Var[List[int]]]] = None,
|
||||||
name: Optional[Union[Var[str], str]] = None,
|
name: Optional[Union[Var[str], str]] = None,
|
||||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
orientation: Optional[
|
orientation: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["horizontal", "vertical"]],
|
|
||||||
Literal["horizontal", "vertical"],
|
Literal["horizontal", "vertical"],
|
||||||
|
Var[Literal["horizontal", "vertical"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None,
|
dir: Optional[Union[Literal["ltr", "rtl"], Var[Literal["ltr", "rtl"]]]] = None,
|
||||||
inverted: Optional[Union[Var[bool], bool]] = None,
|
inverted: Optional[Union[Var[bool], bool]] = None,
|
||||||
min: Optional[Union[Var[int], int]] = None,
|
min: Optional[Union[Var[int], int]] = None,
|
||||||
max: Optional[Union[Var[int], int]] = None,
|
max: Optional[Union[Var[int], int]] = None,
|
||||||
@ -122,57 +111,47 @@ class SliderRoot(SliderComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_value_change: Optional[
|
on_value_change: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_value_commit: Optional[
|
on_value_commit: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "SliderRoot":
|
) -> "SliderRoot":
|
||||||
@ -207,51 +186,41 @@ class SliderTrack(SliderComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "SliderTrack":
|
) -> "SliderTrack":
|
||||||
@ -286,51 +255,41 @@ class SliderRange(SliderComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "SliderRange":
|
) -> "SliderRange":
|
||||||
@ -365,51 +324,41 @@ class SliderThumb(SliderComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "SliderThumb":
|
) -> "SliderThumb":
|
||||||
|
@ -7,9 +7,8 @@ from typing import Any, Dict, Literal
|
|||||||
from reflex.components import Component
|
from reflex.components import Component
|
||||||
from reflex.components.tags import Tag
|
from reflex.components.tags import Tag
|
||||||
from reflex.config import get_config
|
from reflex.config import get_config
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.utils.imports import ImportDict, ImportVar
|
from reflex.utils.imports import ImportDict, ImportVar
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"]
|
LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"]
|
||||||
LiteralJustify = Literal["start", "center", "end", "between"]
|
LiteralJustify = Literal["start", "center", "end", "between"]
|
||||||
@ -236,8 +235,8 @@ class Theme(RadixThemesComponent):
|
|||||||
def _render(self, props: dict[str, Any] | None = None) -> Tag:
|
def _render(self, props: dict[str, Any] | None = None) -> Tag:
|
||||||
tag = super()._render(props)
|
tag = super()._render(props)
|
||||||
tag.add_props(
|
tag.add_props(
|
||||||
css=ImmutableVar.create(
|
css=Var(
|
||||||
f"{{...theme.styles.global[':root'], ...theme.styles.global.body}}"
|
_js_expr=f"{{...theme.styles.global[':root'], ...theme.styles.global.body}}"
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
return tag
|
return tag
|
||||||
|
@ -7,10 +7,9 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload
|
|||||||
|
|
||||||
from reflex.components import Component
|
from reflex.components import Component
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils.imports import ImportDict
|
from reflex.utils.imports import ImportDict
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"]
|
LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"]
|
||||||
LiteralJustify = Literal["start", "center", "end", "between"]
|
LiteralJustify = Literal["start", "center", "end", "between"]
|
||||||
@ -58,44 +57,44 @@ class CommonMarginProps(Component):
|
|||||||
*children,
|
*children,
|
||||||
m: Optional[
|
m: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
||||||
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
|
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
mx: Optional[
|
mx: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
||||||
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
|
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
my: Optional[
|
my: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
||||||
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
|
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
mt: Optional[
|
mt: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
||||||
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
|
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
mr: Optional[
|
mr: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
||||||
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
|
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
mb: Optional[
|
mb: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
||||||
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
|
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
ml: Optional[
|
ml: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
||||||
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
|
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
@ -103,51 +102,41 @@ class CommonMarginProps(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "CommonMarginProps":
|
) -> "CommonMarginProps":
|
||||||
@ -187,51 +176,41 @@ class RadixLoadingProp(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "RadixLoadingProp":
|
) -> "RadixLoadingProp":
|
||||||
@ -264,51 +243,41 @@ class RadixThemesComponent(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "RadixThemesComponent":
|
) -> "RadixThemesComponent":
|
||||||
@ -343,51 +312,41 @@ class RadixThemesTriggerComponent(RadixThemesComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "RadixThemesTriggerComponent":
|
) -> "RadixThemesTriggerComponent":
|
||||||
@ -408,96 +367,96 @@ class Theme(RadixThemesComponent):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
color_mode: Optional[Literal["inherit", "light", "dark"]] = None,
|
color_mode: Optional[Literal["dark", "inherit", "light"]] = None,
|
||||||
theme_panel: Optional[bool] = False,
|
theme_panel: Optional[bool] = False,
|
||||||
has_background: Optional[Union[Var[bool], bool]] = None,
|
has_background: Optional[Union[Var[bool], bool]] = None,
|
||||||
appearance: Optional[
|
appearance: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["inherit", "light", "dark"]],
|
Literal["dark", "inherit", "light"],
|
||||||
Literal["inherit", "light", "dark"],
|
Var[Literal["dark", "inherit", "light"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
accent_color: Optional[
|
accent_color: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[
|
|
||||||
Literal[
|
|
||||||
"tomato",
|
|
||||||
"red",
|
|
||||||
"ruby",
|
|
||||||
"crimson",
|
|
||||||
"pink",
|
|
||||||
"plum",
|
|
||||||
"purple",
|
|
||||||
"violet",
|
|
||||||
"iris",
|
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
|
||||||
"mint",
|
|
||||||
"lime",
|
|
||||||
"yellow",
|
|
||||||
"amber",
|
|
||||||
"gold",
|
|
||||||
"bronze",
|
|
||||||
"gray",
|
|
||||||
]
|
|
||||||
],
|
|
||||||
Literal[
|
Literal[
|
||||||
"tomato",
|
"amber",
|
||||||
"red",
|
"blue",
|
||||||
"ruby",
|
"bronze",
|
||||||
|
"brown",
|
||||||
"crimson",
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
"pink",
|
"pink",
|
||||||
"plum",
|
"plum",
|
||||||
"purple",
|
"purple",
|
||||||
"violet",
|
"red",
|
||||||
"iris",
|
"ruby",
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
"sky",
|
||||||
"mint",
|
"teal",
|
||||||
"lime",
|
"tomato",
|
||||||
|
"violet",
|
||||||
"yellow",
|
"yellow",
|
||||||
"amber",
|
],
|
||||||
"gold",
|
Var[
|
||||||
"bronze",
|
Literal[
|
||||||
"gray",
|
"amber",
|
||||||
|
"blue",
|
||||||
|
"bronze",
|
||||||
|
"brown",
|
||||||
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
|
"pink",
|
||||||
|
"plum",
|
||||||
|
"purple",
|
||||||
|
"red",
|
||||||
|
"ruby",
|
||||||
|
"sky",
|
||||||
|
"teal",
|
||||||
|
"tomato",
|
||||||
|
"violet",
|
||||||
|
"yellow",
|
||||||
|
]
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
gray_color: Optional[
|
gray_color: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"]],
|
Literal["auto", "gray", "mauve", "olive", "sage", "sand", "slate"],
|
||||||
Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"],
|
Var[Literal["auto", "gray", "mauve", "olive", "sage", "sand", "slate"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
panel_background: Optional[
|
panel_background: Optional[
|
||||||
Union[Var[Literal["solid", "translucent"]], Literal["solid", "translucent"]]
|
Union[Literal["solid", "translucent"], Var[Literal["solid", "translucent"]]]
|
||||||
] = None,
|
] = None,
|
||||||
radius: Optional[
|
radius: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["none", "small", "medium", "large", "full"]],
|
Literal["full", "large", "medium", "none", "small"],
|
||||||
Literal["none", "small", "medium", "large", "full"],
|
Var[Literal["full", "large", "medium", "none", "small"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
scaling: Optional[
|
scaling: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["90%", "95%", "100%", "105%", "110%"]],
|
Literal["100%", "105%", "110%", "90%", "95%"],
|
||||||
Literal["90%", "95%", "100%", "105%", "110%"],
|
Var[Literal["100%", "105%", "110%", "90%", "95%"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
@ -505,51 +464,41 @@ class Theme(RadixThemesComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "Theme":
|
) -> "Theme":
|
||||||
@ -594,51 +543,41 @@ class ThemePanel(RadixThemesComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ThemePanel":
|
) -> "ThemePanel":
|
||||||
@ -674,51 +613,41 @@ class RadixThemesColorModeProvider(Component):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "RadixThemesColorModeProvider":
|
) -> "RadixThemesColorModeProvider":
|
||||||
|
@ -24,8 +24,6 @@ from reflex.components.core.cond import Cond, color_mode_cond, cond
|
|||||||
from reflex.components.lucide.icon import Icon
|
from reflex.components.lucide.icon import Icon
|
||||||
from reflex.components.radix.themes.components.dropdown_menu import dropdown_menu
|
from reflex.components.radix.themes.components.dropdown_menu import dropdown_menu
|
||||||
from reflex.components.radix.themes.components.switch import Switch
|
from reflex.components.radix.themes.components.switch import Switch
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.ivars.sequence import LiteralArrayVar
|
|
||||||
from reflex.style import (
|
from reflex.style import (
|
||||||
LIGHT_COLOR_MODE,
|
LIGHT_COLOR_MODE,
|
||||||
color_mode,
|
color_mode,
|
||||||
@ -33,6 +31,8 @@ from reflex.style import (
|
|||||||
set_color_mode,
|
set_color_mode,
|
||||||
toggle_color_mode,
|
toggle_color_mode,
|
||||||
)
|
)
|
||||||
|
from reflex.vars.base import Var
|
||||||
|
from reflex.vars.sequence import LiteralArrayVar
|
||||||
|
|
||||||
from .components.icon_button import IconButton
|
from .components.icon_button import IconButton
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ class ColorModeIconButton(IconButton):
|
|||||||
The button component.
|
The button component.
|
||||||
"""
|
"""
|
||||||
# position is used to set nice defaults for positioning the icon button
|
# position is used to set nice defaults for positioning the icon button
|
||||||
if isinstance(position, ImmutableVar):
|
if isinstance(position, Var):
|
||||||
_set_var_default(props, position, "position", "fixed", position)
|
_set_var_default(props, position, "position", "fixed", position)
|
||||||
_set_var_default(props, position, "bottom", "2rem")
|
_set_var_default(props, position, "bottom", "2rem")
|
||||||
_set_var_default(props, position, "top", "2rem")
|
_set_var_default(props, position, "top", "2rem")
|
||||||
@ -184,7 +184,7 @@ class ColorModeSwitch(Switch):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class ColorModeNamespace(ImmutableVar):
|
class ColorModeNamespace(Var):
|
||||||
"""Namespace for color mode components."""
|
"""Namespace for color mode components."""
|
||||||
|
|
||||||
icon = staticmethod(ColorModeIcon.create)
|
icon = staticmethod(ColorModeIcon.create)
|
||||||
@ -193,7 +193,7 @@ class ColorModeNamespace(ImmutableVar):
|
|||||||
|
|
||||||
|
|
||||||
color_mode = color_mode_var_and_namespace = ColorModeNamespace(
|
color_mode = color_mode_var_and_namespace = ColorModeNamespace(
|
||||||
_var_name=color_mode._var_name,
|
_js_expr=color_mode._js_expr,
|
||||||
_var_type=color_mode._var_type,
|
_var_type=color_mode._var_type,
|
||||||
_var_data=color_mode.get_default_value(),
|
_var_data=color_mode.get_default_value(),
|
||||||
)
|
)
|
||||||
|
@ -20,12 +20,11 @@ from reflex.components.core.cond import Cond
|
|||||||
from reflex.components.lucide.icon import Icon
|
from reflex.components.lucide.icon import Icon
|
||||||
from reflex.components.radix.themes.components.switch import Switch
|
from reflex.components.radix.themes.components.switch import Switch
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import (
|
from reflex.style import (
|
||||||
Style,
|
Style,
|
||||||
color_mode,
|
color_mode,
|
||||||
)
|
)
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .components.icon_button import IconButton
|
from .components.icon_button import IconButton
|
||||||
|
|
||||||
@ -38,7 +37,7 @@ class ColorModeIcon(Cond):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
cond: Optional[Union[Var[Any], Any]] = None,
|
cond: Optional[Union[Any, Var[Any]]] = None,
|
||||||
comp1: Optional[BaseComponent] = None,
|
comp1: Optional[BaseComponent] = None,
|
||||||
comp2: Optional[BaseComponent] = None,
|
comp2: Optional[BaseComponent] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
@ -46,51 +45,41 @@ class ColorModeIcon(Cond):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ColorModeIcon":
|
) -> "ColorModeIcon":
|
||||||
@ -118,181 +107,171 @@ class ColorModeIconButton(IconButton):
|
|||||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
size: Optional[
|
size: Optional[
|
||||||
Union[
|
Union[
|
||||||
|
Breakpoints[str, Literal["1", "2", "3", "4"]],
|
||||||
|
Literal["1", "2", "3", "4"],
|
||||||
Var[
|
Var[
|
||||||
Union[
|
Union[
|
||||||
Breakpoints[str, Literal["1", "2", "3", "4"]],
|
Breakpoints[str, Literal["1", "2", "3", "4"]],
|
||||||
Literal["1", "2", "3", "4"],
|
Literal["1", "2", "3", "4"],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
Literal["1", "2", "3", "4"],
|
|
||||||
Breakpoints[str, Literal["1", "2", "3", "4"]],
|
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
variant: Optional[
|
variant: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]],
|
Literal["classic", "ghost", "outline", "soft", "solid", "surface"],
|
||||||
Literal["classic", "solid", "soft", "surface", "outline", "ghost"],
|
Var[Literal["classic", "ghost", "outline", "soft", "solid", "surface"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
color_scheme: Optional[
|
color_scheme: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[
|
|
||||||
Literal[
|
|
||||||
"tomato",
|
|
||||||
"red",
|
|
||||||
"ruby",
|
|
||||||
"crimson",
|
|
||||||
"pink",
|
|
||||||
"plum",
|
|
||||||
"purple",
|
|
||||||
"violet",
|
|
||||||
"iris",
|
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
|
||||||
"mint",
|
|
||||||
"lime",
|
|
||||||
"yellow",
|
|
||||||
"amber",
|
|
||||||
"gold",
|
|
||||||
"bronze",
|
|
||||||
"gray",
|
|
||||||
]
|
|
||||||
],
|
|
||||||
Literal[
|
Literal[
|
||||||
"tomato",
|
"amber",
|
||||||
"red",
|
"blue",
|
||||||
"ruby",
|
"bronze",
|
||||||
|
"brown",
|
||||||
"crimson",
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
"pink",
|
"pink",
|
||||||
"plum",
|
"plum",
|
||||||
"purple",
|
"purple",
|
||||||
"violet",
|
"red",
|
||||||
"iris",
|
"ruby",
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
"sky",
|
||||||
"mint",
|
"teal",
|
||||||
"lime",
|
"tomato",
|
||||||
|
"violet",
|
||||||
"yellow",
|
"yellow",
|
||||||
"amber",
|
],
|
||||||
"gold",
|
Var[
|
||||||
"bronze",
|
Literal[
|
||||||
"gray",
|
"amber",
|
||||||
|
"blue",
|
||||||
|
"bronze",
|
||||||
|
"brown",
|
||||||
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
|
"pink",
|
||||||
|
"plum",
|
||||||
|
"purple",
|
||||||
|
"red",
|
||||||
|
"ruby",
|
||||||
|
"sky",
|
||||||
|
"teal",
|
||||||
|
"tomato",
|
||||||
|
"violet",
|
||||||
|
"yellow",
|
||||||
|
]
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
||||||
radius: Optional[
|
radius: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["none", "small", "medium", "large", "full"]],
|
Literal["full", "large", "medium", "none", "small"],
|
||||||
Literal["none", "small", "medium", "large", "full"],
|
Var[Literal["full", "large", "medium", "none", "small"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
auto_focus: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
form: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
form_action: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
form_enc_type: Optional[
|
form_enc_type: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
form_method: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
form_no_validate: Optional[
|
form_no_validate: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
form_target: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
name: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
value: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
loading: Optional[Union[Var[bool], bool]] = None,
|
loading: Optional[Union[Var[bool], bool]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ColorModeIconButton":
|
) -> "ColorModeIconButton":
|
||||||
@ -363,87 +342,87 @@ class ColorModeSwitch(Switch):
|
|||||||
value: Optional[Union[Var[str], str]] = None,
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
size: Optional[
|
size: Optional[
|
||||||
Union[
|
Union[
|
||||||
|
Breakpoints[str, Literal["1", "2", "3"]],
|
||||||
|
Literal["1", "2", "3"],
|
||||||
Var[
|
Var[
|
||||||
Union[
|
Union[
|
||||||
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"]
|
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
Literal["1", "2", "3"],
|
|
||||||
Breakpoints[str, Literal["1", "2", "3"]],
|
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
variant: Optional[
|
variant: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["classic", "surface", "soft"]],
|
Literal["classic", "soft", "surface"],
|
||||||
Literal["classic", "surface", "soft"],
|
Var[Literal["classic", "soft", "surface"]],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
color_scheme: Optional[
|
color_scheme: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[
|
|
||||||
Literal[
|
|
||||||
"tomato",
|
|
||||||
"red",
|
|
||||||
"ruby",
|
|
||||||
"crimson",
|
|
||||||
"pink",
|
|
||||||
"plum",
|
|
||||||
"purple",
|
|
||||||
"violet",
|
|
||||||
"iris",
|
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
|
||||||
"mint",
|
|
||||||
"lime",
|
|
||||||
"yellow",
|
|
||||||
"amber",
|
|
||||||
"gold",
|
|
||||||
"bronze",
|
|
||||||
"gray",
|
|
||||||
]
|
|
||||||
],
|
|
||||||
Literal[
|
Literal[
|
||||||
"tomato",
|
"amber",
|
||||||
"red",
|
"blue",
|
||||||
"ruby",
|
"bronze",
|
||||||
|
"brown",
|
||||||
"crimson",
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
"pink",
|
"pink",
|
||||||
"plum",
|
"plum",
|
||||||
"purple",
|
"purple",
|
||||||
"violet",
|
"red",
|
||||||
"iris",
|
"ruby",
|
||||||
"indigo",
|
|
||||||
"blue",
|
|
||||||
"cyan",
|
|
||||||
"teal",
|
|
||||||
"jade",
|
|
||||||
"green",
|
|
||||||
"grass",
|
|
||||||
"brown",
|
|
||||||
"orange",
|
|
||||||
"sky",
|
"sky",
|
||||||
"mint",
|
"teal",
|
||||||
"lime",
|
"tomato",
|
||||||
|
"violet",
|
||||||
"yellow",
|
"yellow",
|
||||||
"amber",
|
],
|
||||||
"gold",
|
Var[
|
||||||
"bronze",
|
Literal[
|
||||||
"gray",
|
"amber",
|
||||||
|
"blue",
|
||||||
|
"bronze",
|
||||||
|
"brown",
|
||||||
|
"crimson",
|
||||||
|
"cyan",
|
||||||
|
"gold",
|
||||||
|
"grass",
|
||||||
|
"gray",
|
||||||
|
"green",
|
||||||
|
"indigo",
|
||||||
|
"iris",
|
||||||
|
"jade",
|
||||||
|
"lime",
|
||||||
|
"mint",
|
||||||
|
"orange",
|
||||||
|
"pink",
|
||||||
|
"plum",
|
||||||
|
"purple",
|
||||||
|
"red",
|
||||||
|
"ruby",
|
||||||
|
"sky",
|
||||||
|
"teal",
|
||||||
|
"tomato",
|
||||||
|
"violet",
|
||||||
|
"yellow",
|
||||||
|
]
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
||||||
radius: Optional[
|
radius: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["none", "small", "full"]], Literal["none", "small", "full"]
|
Literal["full", "none", "small"], Var[Literal["full", "none", "small"]]
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
@ -451,54 +430,42 @@ class ColorModeSwitch(Switch):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_change: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "ColorModeSwitch":
|
) -> "ColorModeSwitch":
|
||||||
@ -531,13 +498,13 @@ class ColorModeSwitch(Switch):
|
|||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
class ColorModeNamespace(ImmutableVar):
|
class ColorModeNamespace(Var):
|
||||||
icon = staticmethod(ColorModeIcon.create)
|
icon = staticmethod(ColorModeIcon.create)
|
||||||
button = staticmethod(ColorModeIconButton.create)
|
button = staticmethod(ColorModeIconButton.create)
|
||||||
switch = staticmethod(ColorModeSwitch.create)
|
switch = staticmethod(ColorModeSwitch.create)
|
||||||
|
|
||||||
color_mode = color_mode_var_and_namespace = ColorModeNamespace(
|
color_mode = color_mode_var_and_namespace = ColorModeNamespace(
|
||||||
_var_name=color_mode._var_name,
|
_js_expr=color_mode._js_expr,
|
||||||
_var_type=color_mode._var_type,
|
_var_type=color_mode._var_type,
|
||||||
_var_data=color_mode.get_default_value(),
|
_var_data=color_mode.get_default_value(),
|
||||||
)
|
)
|
||||||
|
@ -6,7 +6,7 @@ from reflex.components.component import ComponentNamespace
|
|||||||
from reflex.components.core.breakpoints import Responsive
|
from reflex.components.core.breakpoints import Responsive
|
||||||
from reflex.components.el import elements
|
from reflex.components.el import elements
|
||||||
from reflex.event import EventHandler
|
from reflex.event import EventHandler
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from ..base import RadixThemesComponent, RadixThemesTriggerComponent
|
from ..base import RadixThemesComponent, RadixThemesTriggerComponent
|
||||||
|
|
||||||
|
@ -9,9 +9,8 @@ from reflex.components.component import ComponentNamespace
|
|||||||
from reflex.components.core.breakpoints import Breakpoints
|
from reflex.components.core.breakpoints import Breakpoints
|
||||||
from reflex.components.el import elements
|
from reflex.components.el import elements
|
||||||
from reflex.event import EventHandler, EventSpec
|
from reflex.event import EventHandler, EventSpec
|
||||||
from reflex.ivars.base import ImmutableVar
|
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.vars import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from ..base import RadixThemesComponent, RadixThemesTriggerComponent
|
from ..base import RadixThemesComponent, RadixThemesTriggerComponent
|
||||||
|
|
||||||
@ -29,54 +28,44 @@ class AlertDialogRoot(RadixThemesComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_open_change: Optional[
|
on_open_change: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "AlertDialogRoot":
|
) -> "AlertDialogRoot":
|
||||||
@ -112,51 +101,41 @@ class AlertDialogTrigger(RadixThemesTriggerComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "AlertDialogTrigger":
|
) -> "AlertDialogTrigger":
|
||||||
@ -179,100 +158,90 @@ class AlertDialogContent(elements.Div, RadixThemesComponent):
|
|||||||
*children,
|
*children,
|
||||||
size: Optional[
|
size: Optional[
|
||||||
Union[
|
Union[
|
||||||
|
Breakpoints[str, Literal["1", "2", "3", "4"]],
|
||||||
|
Literal["1", "2", "3", "4"],
|
||||||
Var[
|
Var[
|
||||||
Union[
|
Union[
|
||||||
Breakpoints[str, Literal["1", "2", "3", "4"]],
|
Breakpoints[str, Literal["1", "2", "3", "4"]],
|
||||||
Literal["1", "2", "3", "4"],
|
Literal["1", "2", "3", "4"],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
Literal["1", "2", "3", "4"],
|
|
||||||
Breakpoints[str, Literal["1", "2", "3", "4"]],
|
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
force_mount: Optional[Union[Var[bool], bool]] = None,
|
force_mount: Optional[Union[Var[bool], bool]] = None,
|
||||||
access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
content_editable: Optional[
|
content_editable: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
context_menu: Optional[
|
context_menu: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
enter_key_hint: Optional[
|
enter_key_hint: Optional[
|
||||||
Union[Var[Union[bool, int, str]], str, int, bool]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
] = None,
|
] = None,
|
||||||
hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
|
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_close_auto_focus: Optional[
|
on_close_auto_focus: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_escape_key_down: Optional[
|
on_escape_key_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_open_auto_focus: Optional[
|
on_open_auto_focus: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "AlertDialogContent":
|
) -> "AlertDialogContent":
|
||||||
@ -325,51 +294,41 @@ class AlertDialogTitle(RadixThemesComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "AlertDialogTitle":
|
) -> "AlertDialogTitle":
|
||||||
@ -404,51 +363,41 @@ class AlertDialogDescription(RadixThemesComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "AlertDialogDescription":
|
) -> "AlertDialogDescription":
|
||||||
@ -483,51 +432,41 @@ class AlertDialogAction(RadixThemesTriggerComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "AlertDialogAction":
|
) -> "AlertDialogAction":
|
||||||
@ -553,51 +492,41 @@ class AlertDialogCancel(RadixThemesTriggerComponent):
|
|||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[
|
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
] = None,
|
|
||||||
on_click: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_context_menu: Optional[
|
on_context_menu: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_double_click: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_focus: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
|
||||||
on_mount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
|
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_mouse_down: Optional[
|
on_mouse_down: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_enter: Optional[
|
on_mouse_enter: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_leave: Optional[
|
on_mouse_leave: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_move: Optional[
|
on_mouse_move: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_out: Optional[
|
on_mouse_out: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_over: Optional[
|
on_mouse_over: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_mouse_up: Optional[
|
on_mouse_up: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
||||||
] = None,
|
] = None,
|
||||||
|
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
||||||
on_unmount: Optional[
|
on_unmount: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
) -> "AlertDialogCancel":
|
) -> "AlertDialogCancel":
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user