remove a bunch of union and optional

This commit is contained in:
Khaleel Al-Adhami 2025-02-18 15:20:10 -08:00
parent 236af4e67c
commit 035e6a0bbf
195 changed files with 46697 additions and 53727 deletions

View File

@ -1,7 +1,6 @@
"""The Reflex Admin Dashboard.""" """The Reflex Admin Dashboard."""
from dataclasses import dataclass, field from dataclasses import dataclass, field
from typing import Optional
from starlette_admin.base import BaseAdmin as Admin from starlette_admin.base import BaseAdmin as Admin
@ -12,4 +11,4 @@ class AdminDash:
models: list = field(default_factory=list) models: list = field(default_factory=list)
view_overrides: dict = field(default_factory=dict) view_overrides: dict = field(default_factory=dict)
admin: Optional[Admin] = None admin: Admin | None = None

View File

@ -165,7 +165,7 @@ def default_backend_exception_handler(exception: Exception) -> EventSpec:
return window_alert("\n".join(error_message)) return window_alert("\n".join(error_message))
def extra_overlay_function() -> Optional[Component]: def extra_overlay_function() -> Component | None:
"""Extra overlay function to add to the overlay component. """Extra overlay function to add to the overlay component.
Returns: Returns:
@ -245,16 +245,16 @@ class UploadFile(StarletteUploadFile):
file: BinaryIO file: BinaryIO
path: Optional[Path] = dataclasses.field(default=None) path: Path | None = dataclasses.field(default=None)
_deprecated_filename: Optional[str] = dataclasses.field(default=None) _deprecated_filename: str | None = dataclasses.field(default=None)
size: Optional[int] = dataclasses.field(default=None) size: int | None = dataclasses.field(default=None)
headers: Headers = dataclasses.field(default_factory=Headers) headers: Headers = dataclasses.field(default_factory=Headers)
@property @property
def name(self) -> Optional[str]: def name(self) -> str | None:
"""Get the name of the uploaded file. """Get the name of the uploaded file.
Returns: Returns:
@ -264,7 +264,7 @@ class UploadFile(StarletteUploadFile):
return self.path.name return self.path.name
@property @property
def filename(self) -> Optional[str]: def filename(self) -> str | None:
"""Get the filename of the uploaded file. """Get the filename of the uploaded file.
Returns: Returns:
@ -285,10 +285,10 @@ class UploadFile(StarletteUploadFile):
class UnevaluatedPage: class UnevaluatedPage:
"""An uncompiled page.""" """An uncompiled page."""
component: Union[Component, ComponentCallable] component: Component | ComponentCallable
route: str route: str
title: Union[Var, str, None] title: Var | str | None
description: Union[Var, str, None] description: Var | str | None
image: str image: str
on_load: Union[EventType[()], None] on_load: Union[EventType[()], None]
meta: list[dict[str, str]] meta: list[dict[str, str]]
@ -317,7 +317,7 @@ class App(MiddlewareMixin, LifespanMixin):
""" """
# The global [theme](https://reflex.dev/docs/styling/theming/#theme) for the entire app. # The global [theme](https://reflex.dev/docs/styling/theming/#theme) for the entire app.
theme: Optional[Component] = dataclasses.field( theme: Component | None = dataclasses.field(
default_factory=lambda: themes.theme(accent_color="blue") default_factory=lambda: themes.theme(accent_color="blue")
) )
@ -328,15 +328,15 @@ class App(MiddlewareMixin, LifespanMixin):
stylesheets: list[str] = dataclasses.field(default_factory=list) stylesheets: list[str] = dataclasses.field(default_factory=list)
# A component that is present on every page (defaults to the Connection Error banner). # A component that is present on every page (defaults to the Connection Error banner).
overlay_component: Optional[Union[Component, ComponentCallable]] = ( overlay_component: Component | ComponentCallable | None = dataclasses.field(
dataclasses.field(default=None) default=None
) )
# Error boundary component to wrap the app with. # Error boundary component to wrap the app with.
error_boundary: Optional[ComponentCallable] = dataclasses.field(default=None) error_boundary: ComponentCallable | None = dataclasses.field(default=None)
# App wraps to be applied to the whole app. Expected to be a dictionary of (order, name) to a function that takes whether the state is enabled and optionally returns a component. # App wraps to be applied to the whole app. Expected to be a dictionary of (order, name) to a function that takes whether the state is enabled and optionally returns a component.
app_wraps: dict[tuple[int, str], Callable[[bool], Optional[Component]]] = ( app_wraps: dict[tuple[int, str], Callable[[bool], Component | None]] = (
dataclasses.field( dataclasses.field(
default_factory=lambda: { default_factory=lambda: {
(55, "ErrorBoundary"): ( (55, "ErrorBoundary"): (
@ -354,10 +354,10 @@ class App(MiddlewareMixin, LifespanMixin):
head_components: list[Component] = dataclasses.field(default_factory=list) head_components: list[Component] = dataclasses.field(default_factory=list)
# The Socket.IO AsyncServer instance. # The Socket.IO AsyncServer instance.
sio: Optional[AsyncServer] = None sio: AsyncServer | None = None
# The language to add to the html root tag of every page. # The language to add to the html root tag of every page.
html_lang: Optional[str] = None html_lang: str | None = None
# Attributes to add to the html root tag of every page. # Attributes to add to the html root tag of every page.
html_custom_attrs: Optional[dict[str, str]] = None html_custom_attrs: Optional[dict[str, str]] = None
@ -377,7 +377,7 @@ class App(MiddlewareMixin, LifespanMixin):
_state: Optional[Type[BaseState]] = None _state: Optional[Type[BaseState]] = None
# Class to manage many client states. # Class to manage many client states.
_state_manager: Optional[StateManager] = None _state_manager: StateManager | None = None
# Mapping from a route to event handlers to trigger when the page loads. # Mapping from a route to event handlers to trigger when the page loads.
_load_events: dict[str, list[IndividualEventType[()]]] = dataclasses.field( _load_events: dict[str, list[IndividualEventType[()]]] = dataclasses.field(
@ -385,10 +385,10 @@ class App(MiddlewareMixin, LifespanMixin):
) )
# Admin dashboard to view and manage the database. # Admin dashboard to view and manage the database.
admin_dash: Optional[AdminDash] = None admin_dash: AdminDash | None = None
# The async server name space. # The async server name space.
_event_namespace: Optional[EventNamespace] = None _event_namespace: EventNamespace | None = None
# Background tasks that are currently running. # Background tasks that are currently running.
_background_tasks: set[asyncio.Task] = dataclasses.field(default_factory=set) _background_tasks: set[asyncio.Task] = dataclasses.field(default_factory=set)
@ -1485,7 +1485,7 @@ class App(MiddlewareMixin, LifespanMixin):
valid = bool( valid = bool(
return_type == EventSpec return_type == EventSpec
or return_type == Optional[EventSpec] or return_type == EventSpec | None
or return_type == list[EventSpec] or return_type == list[EventSpec]
or return_type == inspect.Signature.empty or return_type == inspect.Signature.empty
or return_type is None or return_type is None

View File

@ -7,7 +7,7 @@ import contextlib
import dataclasses import dataclasses
import functools import functools
import inspect import inspect
from typing import Callable, Coroutine, Union from typing import Callable, Coroutine
from fastapi import FastAPI from fastapi import FastAPI
@ -22,7 +22,7 @@ class LifespanMixin(AppMixin):
"""A Mixin that allow tasks to run during the whole app lifespan.""" """A Mixin that allow tasks to run during the whole app lifespan."""
# Lifespan tasks that are planned to run. # Lifespan tasks that are planned to run.
lifespan_tasks: set[Union[asyncio.Task, Callable]] = dataclasses.field( lifespan_tasks: set[asyncio.Task | Callable] = dataclasses.field(
default_factory=set default_factory=set
) )

View File

@ -2,7 +2,6 @@
import inspect import inspect
from pathlib import Path from pathlib import Path
from typing import Optional
from reflex import constants from reflex import constants
from reflex.config import EnvironmentVariables from reflex.config import EnvironmentVariables
@ -11,7 +10,7 @@ from reflex.config import EnvironmentVariables
def asset( def asset(
path: str, path: str,
shared: bool = False, shared: bool = False,
subfolder: Optional[str] = None, subfolder: str | None = None,
_stack_level: int = 1, _stack_level: int = 1,
) -> str: ) -> str:
"""Add an asset to the app, either shared as a symlink or local. """Add an asset to the app, either shared as a symlink or local.

View File

@ -4,7 +4,7 @@ from __future__ import annotations
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
from typing import TYPE_CHECKING, Iterable, Optional, Sequence, Type, Union from typing import TYPE_CHECKING, Iterable, Optional, Sequence, Type
from reflex import constants from reflex import constants
from reflex.compiler import templates, utils from reflex.compiler import templates, utils
@ -352,8 +352,8 @@ 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: str | None = None,
html_custom_attrs: Optional[dict[str, Union[Var, str]]] = None, html_custom_attrs: Optional[dict[str, Var | str]] = None,
) -> tuple[str, str]: ) -> tuple[str, str]:
"""Compile the document root. """Compile the document root.

View File

@ -7,7 +7,7 @@ import concurrent.futures
import traceback import traceback
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
from typing import Any, Callable, Optional, Type, Union from typing import Any, Callable, Optional, Type
from urllib.parse import urlparse from urllib.parse import urlparse
from pydantic.v1.fields import ModelField from pydantic.v1.fields import ModelField
@ -345,8 +345,8 @@ 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: str | None = None,
html_custom_attrs: Optional[dict[str, Union[Var, str]]] = None, html_custom_attrs: Optional[dict[str, Var | str]] = None,
) -> Component: ) -> Component:
"""Create the document root. """Create the document root.

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.base.fragment import Fragment from reflex.components.base.fragment import Fragment
from reflex.event import EventType from reflex.event import EventType
@ -16,12 +16,12 @@ class AppWrap(Fragment):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -16,12 +16,12 @@ class Body(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -1,7 +1,5 @@
"""Document components.""" """Document components."""
from typing import Optional
from reflex.components.component import Component from reflex.components.component import Component
@ -16,7 +14,7 @@ class Html(NextDocumentLib):
tag = "Html" tag = "Html"
lang: Optional[str] lang: str | None
class DocumentHead(NextDocumentLib): class DocumentHead(NextDocumentLib):

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -16,12 +16,12 @@ class NextDocumentLib(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -63,12 +63,12 @@ class Html(NextDocumentLib):
cls, cls,
*children, *children,
lang: Optional[str] = None, lang: Optional[str] = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -109,12 +109,12 @@ class DocumentHead(NextDocumentLib):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -155,12 +155,12 @@ class Main(NextDocumentLib):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -201,12 +201,12 @@ class NextScript(NextDocumentLib):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -21,20 +21,18 @@ class ErrorBoundary(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
fallback_render: Optional[Union[Component, Var[Component]]] = None, fallback_render: Component | Var[Component] | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_error: Optional[ on_error: Optional[EventType[()] | EventType[str] | EventType[str, str]] = None,
Union[EventType[()], EventType[str], EventType[str, str]]
] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -16,12 +16,12 @@ class Fragment(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component, MemoizationLeaf from reflex.components.component import Component, MemoizationLeaf
from reflex.event import EventType from reflex.event import EventType
@ -16,12 +16,12 @@ class NextHeadLib(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -62,12 +62,12 @@ class Head(NextHeadLib, MemoizationLeaf):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -16,14 +16,14 @@ class RawLink(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
href: Optional[Union[Var[str], str]] = None, href: Var[str] | str | None = None,
rel: Optional[Union[Var[str], str]] = None, rel: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -66,19 +66,19 @@ class ScriptTag(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
type_: Optional[Union[Var[str], str]] = None, type_: Var[str] | str | None = None,
source: Optional[Union[Var[str], str]] = None, source: Var[str] | str | None = None,
integrity: Optional[Union[Var[str], str]] = None, integrity: Var[str] | str | None = None,
crossorigin: Optional[Union[Var[str], str]] = None, crossorigin: Var[str] | str | None = None,
referrer_policy: Optional[Union[Var[str], str]] = None, referrer_policy: Var[str] | str | None = None,
is_async: Optional[Union[Var[bool], bool]] = None, is_async: Var[bool] | bool | None = None,
defer: Optional[Union[Var[bool], bool]] = None, defer: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -2,8 +2,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional
from reflex.components.base.bare import Bare from reflex.components.base.bare import Bare
from reflex.components.component import Component from reflex.components.component import Component
@ -34,19 +32,19 @@ class Meta(Component):
tag = "meta" tag = "meta"
# The description of character encoding. # The description of character encoding.
char_set: Optional[str] = None char_set: str | None = None
# The value of meta. # The value of meta.
content: Optional[str] = None content: str | None = None
# The name of metadata. # The name of metadata.
name: Optional[str] = None name: str | None = None
# The type of metadata value. # The type of metadata value.
property: Optional[str] = None property: str | None = None
# The type of metadata value. # The type of metadata value.
http_equiv: Optional[str] = None http_equiv: str | None = None
class Description(Meta): class Description(Meta):

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -17,12 +17,12 @@ class Title(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -68,12 +68,12 @@ class Meta(Component):
name: Optional[str] = None, name: Optional[str] = None,
property: Optional[str] = None, property: Optional[str] = None,
http_equiv: Optional[str] = None, http_equiv: Optional[str] = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -124,12 +124,12 @@ class Description(Meta):
content: Optional[str] = None, content: Optional[str] = None,
property: Optional[str] = None, property: Optional[str] = None,
http_equiv: Optional[str] = None, http_equiv: Optional[str] = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -180,12 +180,12 @@ class Image(Meta):
content: Optional[str] = None, content: Optional[str] = None,
name: Optional[str] = None, name: Optional[str] = None,
http_equiv: Optional[str] = None, http_equiv: Optional[str] = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -16,19 +16,16 @@ class Script(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
src: Optional[Union[Var[str], str]] = None, src: Var[str] | str | None = None,
strategy: Optional[ strategy: Literal["afterInteractive", "beforeInteractive", "lazyOnload"]
Union[ | Var[Literal["afterInteractive", "beforeInteractive", "lazyOnload"]]
Literal["afterInteractive", "beforeInteractive", "lazyOnload"], | None = None,
Var[Literal["afterInteractive", "beforeInteractive", "lazyOnload"]], style: Style | None = None,
] key: Any | None = None,
] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -16,12 +16,12 @@ class StrictMode(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -73,7 +73,7 @@ class BaseComponent(Base, ABC):
children: list[BaseComponent] = [] children: list[BaseComponent] = []
# The library that the component is based on. # The library that the component is based on.
library: Optional[str] = None library: str | None = None
# List here the non-react dependency needed by `library` # List here the non-react dependency needed by `library`
lib_dependencies: list[str] = [] lib_dependencies: list[str] = []
@ -82,7 +82,7 @@ class BaseComponent(Base, ABC):
transpile_packages: list[str] = [] transpile_packages: list[str] = []
# The tag to use when rendering the component. # The tag to use when rendering the component.
tag: Optional[str] = None tag: str | None = None
@abstractmethod @abstractmethod
def render(self) -> dict: def render(self) -> dict:
@ -172,7 +172,7 @@ def evaluate_style_namespaces(style: ComponentStyle) -> dict:
ComponentStyle = dict[ ComponentStyle = dict[
Union[str, Type[BaseComponent], Callable, ComponentNamespace], Any Union[str, Type[BaseComponent], Callable, ComponentNamespace], Any
] ]
ComponentChild = Union[types.PrimitiveType, Var, BaseComponent] ComponentChild = types.PrimitiveType | Var | BaseComponent
ComponentChildTypes = (*types.PrimitiveTypes, Var, BaseComponent) ComponentChildTypes = (*types.PrimitiveTypes, Var, BaseComponent)
@ -196,13 +196,13 @@ 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, Var]] = {} event_triggers: dict[str, EventChain | Var] = {}
# The alias for the tag. # The alias for the tag.
alias: Optional[str] = None alias: str | None = None
# Whether the import is default or named. # Whether the import is default or named.
is_default: Optional[bool] = False is_default: bool | None = False
# A unique key for the component. # A unique key for the component.
key: Any = None key: Any = None
@ -232,7 +232,7 @@ class Component(BaseComponent, ABC):
_rename_props: dict[str, str] = {} _rename_props: dict[str, str] = {}
# custom attribute # custom attribute
custom_attrs: dict[str, Union[Var, Any]] = {} custom_attrs: dict[str, Var | Any] = {}
# When to memoize this component and its children. # When to memoize this component and its children.
_memoization_mode: MemoizationMode = MemoizationMode() _memoization_mode: MemoizationMode = MemoizationMode()
@ -775,7 +775,7 @@ class Component(BaseComponent, ABC):
return component_style return component_style
def _add_style_recursive( def _add_style_recursive(
self, style: ComponentStyle, theme: Optional[Component] = None self, style: ComponentStyle, theme: Component | None = None
) -> Component: ) -> Component:
"""Add additional style to the component and its children. """Add additional style to the component and its children.

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.el.elements.typography import Div from reflex.components.el.elements.typography import Div
from reflex.event import EventType from reflex.event import EventType
@ -17,62 +17,36 @@ class AutoScroll(Div):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -142,8 +116,8 @@ class AutoScroll(Div):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -215,19 +189,18 @@ class AutoScroll(Div):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -2,8 +2,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional
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
@ -167,7 +165,7 @@ class ConnectionBanner(Component):
"""A connection banner component.""" """A connection banner component."""
@classmethod @classmethod
def create(cls, comp: Optional[Component] = None) -> Component: def create(cls, comp: Component | None = None) -> Component:
"""Create a connection banner component. """Create a connection banner component.
Args: Args:
@ -197,7 +195,7 @@ class ConnectionModal(Component):
"""A connection status modal window.""" """A connection status modal window."""
@classmethod @classmethod
def create(cls, comp: Optional[Component] = None) -> Component: def create(cls, comp: Component | None = None) -> Component:
"""Create a connection banner component. """Create a connection banner component.
Args: Args:

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.components.el.elements.typography import Div from reflex.components.el.elements.typography import Div
@ -48,21 +48,19 @@ class ConnectionToaster(Toaster):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
theme: Optional[Union[Var[str], str]] = None, theme: Var[str] | str | None = None,
rich_colors: Optional[Union[Var[bool], bool]] = None, rich_colors: Var[bool] | bool | None = None,
expand: Optional[Union[Var[bool], bool]] = None, expand: Var[bool] | bool | None = None,
visible_toasts: Optional[Union[Var[int], int]] = None, visible_toasts: Var[int] | int | None = None,
position: Optional[ position: Literal[
Union[
Literal[
"bottom-center", "bottom-center",
"bottom-left", "bottom-left",
"bottom-right", "bottom-right",
"top-center", "top-center",
"top-left", "top-left",
"top-right", "top-right",
], ]
Var[ | Var[
Literal[ Literal[
"bottom-center", "bottom-center",
"bottom-left", "bottom-left",
@ -71,24 +69,23 @@ class ConnectionToaster(Toaster):
"top-left", "top-left",
"top-right", "top-right",
] ]
],
] ]
] = None, | None = None,
close_button: Optional[Union[Var[bool], bool]] = None, close_button: Var[bool] | bool | None = None,
offset: Optional[Union[Var[str], str]] = None, offset: Var[str] | str | None = None,
dir: Optional[Union[Var[str], str]] = None, dir: Var[str] | str | None = None,
hotkey: Optional[Union[Var[str], str]] = None, hotkey: Var[str] | str | None = None,
invert: Optional[Union[Var[bool], bool]] = None, invert: Var[bool] | bool | None = None,
toast_options: Optional[Union[ToastProps, Var[ToastProps]]] = None, toast_options: ToastProps | Var[ToastProps] | None = None,
gap: Optional[Union[Var[int], int]] = None, gap: Var[int] | int | None = None,
loading_icon: Optional[Union[Icon, Var[Icon]]] = None, loading_icon: Icon | Var[Icon] | None = None,
pause_when_page_is_hidden: Optional[Union[Var[bool], bool]] = None, pause_when_page_is_hidden: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -143,12 +140,12 @@ class ConnectionBanner(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -182,12 +179,12 @@ class ConnectionModal(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -221,13 +218,13 @@ class WifiOffPulse(Icon):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
size: Optional[Union[Var[int], int]] = None, size: Var[int] | int | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -271,62 +268,36 @@ class ConnectionPulser(Div):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -396,8 +367,8 @@ class ConnectionPulser(Div):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -469,19 +440,18 @@ class ConnectionPulser(Div):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -537,62 +507,36 @@ class BackendDisabled(Div):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -662,8 +606,8 @@ class BackendDisabled(Div):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -735,19 +679,18 @@ class BackendDisabled(Div):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -20,12 +20,12 @@ class ClientSideRouting(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -68,13 +68,13 @@ class Default404Page(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
status_code: Optional[Union[Var[int], int]] = None, status_code: Var[int] | int | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -2,8 +2,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union
from reflex.components.base.fragment import Fragment from reflex.components.base.fragment import Fragment
from reflex.components.tags.tag import Tag from reflex.components.tags.tag import Tag
from reflex.constants.compiler import Hooks from reflex.constants.compiler import Hooks
@ -24,7 +22,7 @@ class Clipboard(Fragment):
on_paste: EventHandler[passthrough_event_spec(list[tuple[str, str]])] on_paste: EventHandler[passthrough_event_spec(list[tuple[str, str]])]
# Save the original event actions for the on_paste event. # Save the original event actions for the on_paste event.
on_paste_event_actions: Var[dict[str, Union[bool, int]]] on_paste_event_actions: Var[dict[str, bool | int]]
@classmethod @classmethod
def create(cls, *children, **props): def create(cls, *children, **props):

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.base.fragment import Fragment from reflex.components.base.fragment import Fragment
from reflex.event import EventType from reflex.event import EventType
@ -17,16 +17,16 @@ 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: Var[list[str]] | list[str] | None = None,
on_paste_event_actions: Optional[ on_paste_event_actions: Var[dict[str, bool | int]]
Union[Var[dict[str, Union[bool, int]]], dict[str, Union[bool, int]]] | dict[str, bool | int]
] = None, | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -40,9 +40,7 @@ class Clipboard(Fragment):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_paste: Optional[ on_paste: Optional[EventType[()] | EventType[list[tuple[str, str]]]] = None,
Union[EventType[()], EventType[list[tuple[str, str]]]]
] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,

View File

@ -2,7 +2,7 @@
from __future__ import annotations from __future__ import annotations
from typing import Any, Dict, Optional, overload from typing import Any, Dict, overload
from reflex.components.base.fragment import Fragment from reflex.components.base.fragment import Fragment
from reflex.components.component import BaseComponent, Component, MemoizationLeaf from reflex.components.component import BaseComponent, Component, MemoizationLeaf
@ -35,7 +35,7 @@ class Cond(MemoizationLeaf):
cls, cls,
cond: Var, cond: Var,
comp1: BaseComponent, comp1: BaseComponent,
comp2: Optional[BaseComponent] = None, comp2: BaseComponent | None = None,
) -> Component: ) -> Component:
"""Create a conditional component. """Create a conditional component.

View File

@ -2,7 +2,7 @@
from __future__ import annotations from __future__ import annotations
from typing import Any, Type, Union from typing import Any, Type
from reflex.components.component import Component from reflex.components.component import Component
from reflex.constants import EventTriggers from reflex.constants import EventTriggers
@ -37,7 +37,7 @@ class DebounceInput(Component):
force_notify_on_blur: Var[bool] force_notify_on_blur: Var[bool]
# If provided, create a fully-controlled input # If provided, create a fully-controlled input
value: Var[Union[str, int, float]] value: Var[str | int | float]
# The ref to attach to the created input # The ref to attach to the created input
input_ref: Var[str] input_ref: Var[str]

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Type, Union, overload from typing import Any, Optional, Type, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -18,19 +18,19 @@ class DebounceInput(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
min_length: Optional[Union[Var[int], int]] = None, min_length: Var[int] | int | None = None,
debounce_timeout: Optional[Union[Var[int], int]] = None, debounce_timeout: Var[int] | int | None = None,
force_notify_by_enter: Optional[Union[Var[bool], bool]] = None, force_notify_by_enter: Var[bool] | bool | None = None,
force_notify_on_blur: Optional[Union[Var[bool], bool]] = None, force_notify_on_blur: Var[bool] | bool | None = None,
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, value: Var[float | int | str] | float | int | str | None = None,
input_ref: Optional[Union[Var[str], str]] = None, input_ref: Var[str] | str | None = None,
element: Optional[Union[Type[Component], Var[Type[Component]]]] = None, element: Type[Component] | Var[Type[Component]] | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_change: Optional[EventType[()]] = None, on_change: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.el.elements.typography import Div from reflex.components.el.elements.typography import Div
from reflex.event import EventType from reflex.event import EventType
@ -16,65 +16,37 @@ class Html(Div):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
dangerouslySetInnerHTML: Optional[ dangerouslySetInnerHTML: Var[dict[str, str]] | dict[str, str] | None = None,
Union[Var[dict[str, str]], dict[str, str]] access_key: Var[str] | str | None = None,
] = None, auto_capitalize: Literal[
access_key: Optional[Union[Var[str], str]] = None, "characters", "none", "off", "on", "sentences", "words"
auto_capitalize: Optional[
Union[
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -144,8 +116,8 @@ class Html(Div):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -217,19 +189,18 @@ class Html(Div):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -1,7 +1,7 @@
"""rx.match.""" """rx.match."""
import textwrap import textwrap
from typing import Any, Dict, List, Optional, Union from typing import Any, Dict, List
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
@ -27,7 +27,7 @@ class Match(MemoizationLeaf):
default: Any default: Any
@classmethod @classmethod
def create(cls, cond: Any, *cases) -> Union[Component, Var]: def create(cls, cond: Any, *cases) -> Component | Var:
"""Create a Match Component. """Create a Match Component.
Args: Args:
@ -75,9 +75,7 @@ class Match(MemoizationLeaf):
return match_cond_var return match_cond_var
@classmethod @classmethod
def _process_cases( def _process_cases(cls, cases: List) -> tuple[List, Var | BaseComponent | None]:
cls, cases: List
) -> 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:
@ -196,8 +194,8 @@ class Match(MemoizationLeaf):
cls, cls,
match_cond_var: Var, match_cond_var: Var,
match_cases: list[list[Var]], match_cases: list[list[Var]],
default: Optional[Union[Var, BaseComponent]], default: Var | BaseComponent | None,
) -> Union[Component, Var]: ) -> Component | Var:
"""Create and return the match condition var or component. """Create and return the match condition var or component.
Args: Args:

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import ComponentNamespace from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
@ -20,65 +20,39 @@ class StickyLogo(Svg):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
width: Optional[Union[Var[Union[int, str]], int, str]] = None, width: Var[int | str] | int | str | None = None,
height: Optional[Union[Var[Union[int, str]], int, str]] = None, height: Var[int | str] | int | str | None = None,
xmlns: Optional[Union[Var[str], str]] = None, xmlns: Var[str] | str | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -148,8 +122,8 @@ class StickyLogo(Svg):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -221,19 +195,18 @@ class StickyLogo(Svg):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -266,10 +239,8 @@ class StickyLabel(Text):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
as_: Optional[ as_: Literal[
Union[
Literal[
"abbr", "abbr",
"b", "b",
"cite", "cite",
@ -288,8 +259,8 @@ class StickyLabel(Text):
"sub", "sub",
"sup", "sup",
"u", "u",
], ]
Var[ | Var[
Literal[ Literal[
"abbr", "abbr",
"b", "b",
@ -310,62 +281,37 @@ class StickyLabel(Text):
"sup", "sup",
"u", "u",
] ]
],
] ]
] = None, | None = None,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Union[ | Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], | Var[
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Var[ | Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
Union[
Breakpoints[
str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
],
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
] ]
], | None = None,
weight: Breakpoints[str, Literal["bold", "light", "medium", "regular"]]
| Literal["bold", "light", "medium", "regular"]
| Var[
Breakpoints[str, Literal["bold", "light", "medium", "regular"]]
| Literal["bold", "light", "medium", "regular"]
] ]
] = None, | None = None,
weight: Optional[ align: Breakpoints[str, Literal["center", "left", "right"]]
Union[ | Literal["center", "left", "right"]
Breakpoints[str, Literal["bold", "light", "medium", "regular"]], | Var[
Literal["bold", "light", "medium", "regular"], Breakpoints[str, Literal["center", "left", "right"]]
Var[ | Literal["center", "left", "right"]
Union[
Breakpoints[str, Literal["bold", "light", "medium", "regular"]],
Literal["bold", "light", "medium", "regular"],
] ]
], | None = None,
trim: Breakpoints[str, Literal["both", "end", "normal", "start"]]
| Literal["both", "end", "normal", "start"]
| Var[
Breakpoints[str, Literal["both", "end", "normal", "start"]]
| Literal["both", "end", "normal", "start"]
] ]
] = None, | None = None,
align: Optional[ color_scheme: Literal[
Union[
Breakpoints[str, Literal["center", "left", "right"]],
Literal["center", "left", "right"],
Var[
Union[
Breakpoints[str, Literal["center", "left", "right"]],
Literal["center", "left", "right"],
]
],
]
] = None,
trim: Optional[
Union[
Breakpoints[str, Literal["both", "end", "normal", "start"]],
Literal["both", "end", "normal", "start"],
Var[
Union[
Breakpoints[str, Literal["both", "end", "normal", "start"]],
Literal["both", "end", "normal", "start"],
]
],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -392,8 +338,8 @@ class StickyLabel(Text):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -422,66 +368,39 @@ class StickyLabel(Text):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -551,8 +470,8 @@ class StickyLabel(Text):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -624,19 +543,18 @@ class StickyLabel(Text):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -669,14 +587,12 @@ class StickyBadge(A):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
download: Optional[Union[Var[Union[bool, str]], bool, str]] = None, download: Var[bool | str] | bool | str | None = None,
href: Optional[Union[Var[str], str]] = None, href: Var[str] | str | None = None,
href_lang: Optional[Union[Var[str], str]] = None, href_lang: Var[str] | str | None = None,
media: Optional[Union[Var[str], str]] = None, media: Var[str] | str | None = None,
ping: Optional[Union[Var[str], str]] = None, ping: Var[str] | str | None = None,
referrer_policy: Optional[ referrer_policy: Literal[
Union[
Literal[
"", "",
"no-referrer", "no-referrer",
"no-referrer-when-downgrade", "no-referrer-when-downgrade",
@ -686,8 +602,8 @@ class StickyBadge(A):
"strict-origin", "strict-origin",
"strict-origin-when-cross-origin", "strict-origin-when-cross-origin",
"unsafe-url", "unsafe-url",
], ]
Var[ | Var[
Literal[ Literal[
"", "",
"no-referrer", "no-referrer",
@ -699,73 +615,43 @@ class StickyBadge(A):
"strict-origin-when-cross-origin", "strict-origin-when-cross-origin",
"unsafe-url", "unsafe-url",
] ]
],
] ]
] = None, | None = None,
rel: Optional[Union[Var[str], str]] = None, rel: Var[str] | str | None = None,
target: Optional[ target: Literal["_blank", "_parent", "_self", "_top"]
Union[ | Var[Literal["_blank", "_parent", "_self", "_top"] | str]
Literal["_blank", "_parent", "_self", "_top"], | str
Var[Union[Literal["_blank", "_parent", "_self", "_top"], str]], | None = None,
str, access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
access_key: Optional[Union[Var[str], str]] = None, | None = None,
auto_capitalize: Optional[ content_editable: Literal["inherit", "plaintext-only", False, True]
Union[ | Var[Literal["inherit", "plaintext-only", False, True]]
Literal["characters", "none", "off", "on", "sentences", "words"], | None = None,
Var[Literal["characters", "none", "off", "on", "sentences", "words"]], context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
content_editable: Optional[ | None = None,
Union[ hidden: Var[bool] | bool | None = None,
Literal["inherit", "plaintext-only", False, True], input_mode: Literal[
Var[Literal["inherit", "plaintext-only", False, True]], "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
] ]
] = None, | Var[
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -835,8 +721,8 @@ class StickyBadge(A):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -908,19 +794,18 @@ class StickyBadge(A):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -954,14 +839,12 @@ class StickyNamespace(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
download: Optional[Union[Var[Union[bool, str]], bool, str]] = None, download: Var[bool | str] | bool | str | None = None,
href: Optional[Union[Var[str], str]] = None, href: Var[str] | str | None = None,
href_lang: Optional[Union[Var[str], str]] = None, href_lang: Var[str] | str | None = None,
media: Optional[Union[Var[str], str]] = None, media: Var[str] | str | None = None,
ping: Optional[Union[Var[str], str]] = None, ping: Var[str] | str | None = None,
referrer_policy: Optional[ referrer_policy: Literal[
Union[
Literal[
"", "",
"no-referrer", "no-referrer",
"no-referrer-when-downgrade", "no-referrer-when-downgrade",
@ -971,8 +854,8 @@ class StickyNamespace(ComponentNamespace):
"strict-origin", "strict-origin",
"strict-origin-when-cross-origin", "strict-origin-when-cross-origin",
"unsafe-url", "unsafe-url",
], ]
Var[ | Var[
Literal[ Literal[
"", "",
"no-referrer", "no-referrer",
@ -984,73 +867,43 @@ class StickyNamespace(ComponentNamespace):
"strict-origin-when-cross-origin", "strict-origin-when-cross-origin",
"unsafe-url", "unsafe-url",
] ]
],
] ]
] = None, | None = None,
rel: Optional[Union[Var[str], str]] = None, rel: Var[str] | str | None = None,
target: Optional[ target: Literal["_blank", "_parent", "_self", "_top"]
Union[ | Var[Literal["_blank", "_parent", "_self", "_top"] | str]
Literal["_blank", "_parent", "_self", "_top"], | str
Var[Union[Literal["_blank", "_parent", "_self", "_top"], str]], | None = None,
str, access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
access_key: Optional[Union[Var[str], str]] = None, | None = None,
auto_capitalize: Optional[ content_editable: Literal["inherit", "plaintext-only", False, True]
Union[ | Var[Literal["inherit", "plaintext-only", False, True]]
Literal["characters", "none", "off", "on", "sentences", "words"], | None = None,
Var[Literal["characters", "none", "off", "on", "sentences", "words"]], context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
content_editable: Optional[ | None = None,
Union[ hidden: Var[bool] | bool | None = None,
Literal["inherit", "plaintext-only", False, True], input_mode: Literal[
Var[Literal["inherit", "plaintext-only", False, True]], "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
] ]
] = None, | Var[
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -1120,8 +973,8 @@ class StickyNamespace(ComponentNamespace):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -1193,19 +1046,18 @@ class StickyNamespace(ComponentNamespace):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -4,7 +4,7 @@
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from pathlib import Path from pathlib import Path
from typing import Any, ClassVar, List, Optional, Union, overload from typing import Any, ClassVar, List, Optional, overload
from reflex.components.base.fragment import Fragment from reflex.components.base.fragment import Fragment
from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf
@ -43,12 +43,12 @@ class UploadFilesProvider(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -89,17 +89,17 @@ class GhostUpload(Fragment):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_drop: Optional[Union[EventType[()], EventType[Any]]] = None, on_drop: Optional[EventType[()] | EventType[Any]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
@ -139,26 +139,26 @@ 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: Var[Optional[dict[str, List]]] | dict[str, List] | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
max_files: Optional[Union[Var[int], int]] = None, max_files: Var[int] | int | None = None,
max_size: Optional[Union[Var[int], int]] = None, max_size: Var[int] | int | None = None,
min_size: Optional[Union[Var[int], int]] = None, min_size: Var[int] | int | None = None,
multiple: Optional[Union[Var[bool], bool]] = None, multiple: Var[bool] | bool | None = None,
no_click: Optional[Union[Var[bool], bool]] = None, no_click: Var[bool] | bool | None = None,
no_drag: Optional[Union[Var[bool], bool]] = None, no_drag: Var[bool] | bool | None = None,
no_keyboard: Optional[Union[Var[bool], bool]] = None, no_keyboard: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_drop: Optional[Union[EventType[()], EventType[Any]]] = None, on_drop: Optional[EventType[()] | EventType[Any]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
@ -205,26 +205,26 @@ 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: Var[Optional[dict[str, List]]] | dict[str, List] | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
max_files: Optional[Union[Var[int], int]] = None, max_files: Var[int] | int | None = None,
max_size: Optional[Union[Var[int], int]] = None, max_size: Var[int] | int | None = None,
min_size: Optional[Union[Var[int], int]] = None, min_size: Var[int] | int | None = None,
multiple: Optional[Union[Var[bool], bool]] = None, multiple: Var[bool] | bool | None = None,
no_click: Optional[Union[Var[bool], bool]] = None, no_click: Var[bool] | bool | None = None,
no_drag: Optional[Union[Var[bool], bool]] = None, no_drag: Var[bool] | bool | None = None,
no_keyboard: Optional[Union[Var[bool], bool]] = None, no_keyboard: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_drop: Optional[Union[EventType[()], EventType[Any]]] = None, on_drop: Optional[EventType[()] | EventType[Any]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
@ -271,26 +271,26 @@ class UploadNamespace(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
accept: Optional[Union[Var[Optional[dict[str, List]]], dict[str, List]]] = None, accept: Var[Optional[dict[str, List]]] | dict[str, List] | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
max_files: Optional[Union[Var[int], int]] = None, max_files: Var[int] | int | None = None,
max_size: Optional[Union[Var[int], int]] = None, max_size: Var[int] | int | None = None,
min_size: Optional[Union[Var[int], int]] = None, min_size: Var[int] | int | None = None,
multiple: Optional[Union[Var[bool], bool]] = None, multiple: Var[bool] | bool | None = None,
no_click: Optional[Union[Var[bool], bool]] = None, no_click: Var[bool] | bool | None = None,
no_drag: Optional[Union[Var[bool], bool]] = None, no_drag: Var[bool] | bool | None = None,
no_keyboard: Optional[Union[Var[bool], bool]] = None, no_keyboard: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_drop: Optional[Union[EventType[()], EventType[Any]]] = None, on_drop: Optional[EventType[()] | EventType[Any]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,

View File

@ -4,7 +4,7 @@ from __future__ import annotations
import dataclasses import dataclasses
import typing import typing
from typing import ClassVar, Literal, Optional, Union from typing import ClassVar, Literal
from reflex.components.component import Component, ComponentNamespace from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import color_mode_cond from reflex.components.core.cond import color_mode_cond
@ -390,7 +390,7 @@ class CodeBlock(Component, MarkdownComponentMap):
alias = "SyntaxHighlighter" alias = "SyntaxHighlighter"
# The theme to use ("light" or "dark"). # The theme to use ("light" or "dark").
theme: Var[Union[Theme, str]] = Theme.one_light theme: Var[Theme | str] = Theme.one_light
# The language to use. # The language to use.
language: Var[LiteralCodeLanguage] = Var.create("python") language: Var[LiteralCodeLanguage] = Var.create("python")
@ -408,16 +408,16 @@ class CodeBlock(Component, MarkdownComponentMap):
wrap_long_lines: Var[bool] wrap_long_lines: Var[bool]
# A custom style for the code block. # A custom style for the code block.
custom_style: dict[str, Union[str, Var, Color]] = {} custom_style: dict[str, str | Var | Color] = {}
# Props passed down to the code tag. # Props passed down to the code tag.
code_tag_props: Var[dict[str, str]] code_tag_props: Var[dict[str, str]]
# Whether a copy button should appear. # Whether a copy button should appear.
can_copy: Optional[bool] = False can_copy: bool | None = False
# A custom copy button to override the default one. # A custom copy button to override the default one.
copy_button: Optional[Union[bool, Component]] = None copy_button: bool | Component | None = None
@classmethod @classmethod
def create( def create(

View File

@ -4,7 +4,7 @@
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
import dataclasses import dataclasses
from typing import Any, ClassVar, Literal, Optional, Union, overload from typing import Any, ClassVar, Literal, Optional, overload
from reflex.components.component import Component, ComponentNamespace from reflex.components.component import Component, ComponentNamespace
from reflex.components.markdown.markdown import MarkdownComponentMap from reflex.components.markdown.markdown import MarkdownComponentMap
@ -355,10 +355,8 @@ class CodeBlock(Component, MarkdownComponentMap):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
theme: Optional[Union[Theme, Var[Union[Theme, str]], str]] = None, theme: Theme | Var[Theme | str] | str | None = None,
language: Optional[ language: Literal[
Union[
Literal[
"abap", "abap",
"abnf", "abnf",
"actionscript", "actionscript",
@ -638,8 +636,8 @@ class CodeBlock(Component, MarkdownComponentMap):
"yaml", "yaml",
"yang", "yang",
"zig", "zig",
], ]
Var[ | Var[
Literal[ Literal[
"abap", "abap",
"abnf", "abnf",
@ -921,23 +919,22 @@ class CodeBlock(Component, MarkdownComponentMap):
"yang", "yang",
"zig", "zig",
] ]
],
] ]
] = None, | None = None,
code: Optional[Union[Var[str], str]] = None, code: Var[str] | str | None = None,
show_line_numbers: Optional[Union[Var[bool], bool]] = None, show_line_numbers: Var[bool] | bool | None = None,
starting_line_number: Optional[Union[Var[int], int]] = None, starting_line_number: Var[int] | int | None = None,
wrap_long_lines: Optional[Union[Var[bool], bool]] = None, wrap_long_lines: Var[bool] | bool | None = None,
custom_style: Optional[dict[str, Union[str, Var, Color]]] = None, custom_style: dict[str, str | Var | Color] | None = None,
code_tag_props: Optional[Union[Var[dict[str, str]], dict[str, str]]] = None, code_tag_props: Var[dict[str, str]] | dict[str, str] | None = None,
can_copy: Optional[bool] = None, can_copy: Optional[bool] = None,
copy_button: Optional[Union[Component, bool]] = None, copy_button: Component | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -993,10 +990,8 @@ class CodeblockNamespace(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
theme: Optional[Union[Theme, Var[Union[Theme, str]], str]] = None, theme: Theme | Var[Theme | str] | str | None = None,
language: Optional[ language: Literal[
Union[
Literal[
"abap", "abap",
"abnf", "abnf",
"actionscript", "actionscript",
@ -1276,8 +1271,8 @@ class CodeblockNamespace(ComponentNamespace):
"yaml", "yaml",
"yang", "yang",
"zig", "zig",
], ]
Var[ | Var[
Literal[ Literal[
"abap", "abap",
"abnf", "abnf",
@ -1559,23 +1554,22 @@ class CodeblockNamespace(ComponentNamespace):
"yang", "yang",
"zig", "zig",
] ]
],
] ]
] = None, | None = None,
code: Optional[Union[Var[str], str]] = None, code: Var[str] | str | None = None,
show_line_numbers: Optional[Union[Var[bool], bool]] = None, show_line_numbers: Var[bool] | bool | None = None,
starting_line_number: Optional[Union[Var[int], int]] = None, starting_line_number: Var[int] | int | None = None,
wrap_long_lines: Optional[Union[Var[bool], bool]] = None, wrap_long_lines: Var[bool] | bool | None = None,
custom_style: Optional[dict[str, Union[str, Var, Color]]] = None, custom_style: dict[str, str | Var | Color] | None = None,
code_tag_props: Optional[Union[Var[dict[str, str]], dict[str, str]]] = None, code_tag_props: Var[dict[str, str]] | dict[str, str] | None = None,
can_copy: Optional[bool] = None, can_copy: Optional[bool] = None,
copy_button: Optional[Union[Component, bool]] = None, copy_button: Component | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
from __future__ import annotations from __future__ import annotations
from enum import Enum from enum import Enum
from typing import Any, Dict, Literal, Optional, TypedDict, Union from typing import Any, Dict, Literal, Optional, TypedDict
from reflex.base import Base from reflex.base import Base
from reflex.components.component import Component, NoSSRComponent from reflex.components.component import Component, NoSSRComponent
@ -52,38 +52,38 @@ class GridColumnIcons(Enum):
class DataEditorTheme(Base): class DataEditorTheme(Base):
"""The theme for the DataEditor component.""" """The theme for the DataEditor component."""
accent_color: Optional[str] = None accent_color: str | None = None
accent_fg: Optional[str] = None accent_fg: str | None = None
accent_light: Optional[str] = None accent_light: str | None = None
base_font_style: Optional[str] = None base_font_style: str | None = None
bg_bubble: Optional[str] = None bg_bubble: str | None = None
bg_bubble_selected: Optional[str] = None bg_bubble_selected: str | None = None
bg_cell: Optional[str] = None bg_cell: str | None = None
bg_cell_medium: Optional[str] = None bg_cell_medium: str | None = None
bg_header: Optional[str] = None bg_header: str | None = None
bg_header_has_focus: Optional[str] = None bg_header_has_focus: str | None = None
bg_header_hovered: Optional[str] = None bg_header_hovered: str | None = None
bg_icon_header: Optional[str] = None bg_icon_header: str | None = None
bg_search_result: Optional[str] = None bg_search_result: str | None = None
border_color: Optional[str] = None border_color: str | None = None
cell_horizontal_padding: Optional[int] = None cell_horizontal_padding: int | None = None
cell_vertical_padding: Optional[int] = None cell_vertical_padding: int | None = None
drilldown_border: Optional[str] = None drilldown_border: str | None = None
editor_font_size: Optional[str] = None editor_font_size: str | None = None
fg_icon_header: Optional[str] = None fg_icon_header: str | None = None
font_family: Optional[str] = None font_family: str | None = None
header_bottom_border_color: Optional[str] = None header_bottom_border_color: str | None = None
header_font_style: Optional[str] = None header_font_style: str | None = None
horizontal_border_color: Optional[str] = None horizontal_border_color: str | None = None
line_height: Optional[int] = None line_height: int | None = None
link_color: Optional[str] = None link_color: str | None = None
text_bubble: Optional[str] = None text_bubble: str | None = None
text_dark: Optional[str] = None text_dark: str | None = None
text_group_header: Optional[str] = None text_group_header: str | None = None
text_header: Optional[str] = None text_header: str | None = None
text_header_selected: Optional[str] = None text_header_selected: str | None = None
text_light: Optional[str] = None text_light: str | None = None
text_medium: Optional[str] = None text_medium: str | None = None
class Bounds(TypedDict): class Bounds(TypedDict):
@ -121,7 +121,7 @@ class GridSelectionCurrent(TypedDict):
class GridSelection(TypedDict): class GridSelection(TypedDict):
"""The grid selection.""" """The grid selection."""
current: Optional[GridSelectionCurrent] current: GridSelectionCurrent | None
columns: CompatSelection columns: CompatSelection
rows: CompatSelection rows: CompatSelection
@ -155,7 +155,7 @@ class GridColumn(TypedDict):
"""The grid column.""" """The grid column."""
title: str title: str
group: Optional[str] group: str | None
class DataEditor(NoSSRComponent): class DataEditor(NoSSRComponent):
@ -257,7 +257,7 @@ class DataEditor(NoSSRComponent):
scroll_offset_y: Var[int] scroll_offset_y: Var[int]
# global theme # global theme
theme: Var[Union[DataEditorTheme, Dict]] theme: Var[DataEditorTheme | Dict]
# Fired when a cell is activated. # Fired when a cell is activated.
on_cell_activated: EventHandler[passthrough_event_spec(tuple[int, int])] on_cell_activated: EventHandler[passthrough_event_spec(tuple[int, int])]
@ -301,7 +301,7 @@ class DataEditor(NoSSRComponent):
# Fired when editing is finished. # Fired when editing is finished.
on_finished_editing: EventHandler[ on_finished_editing: EventHandler[
passthrough_event_spec(Union[GridCell, None], tuple[int, int]) passthrough_event_spec(GridCell | None, tuple[int, int])
] ]
# Fired when a row is appended. # Fired when a row is appended.

View File

@ -43,38 +43,38 @@ class GridColumnIcons(Enum):
VideoUri = "video_uri" VideoUri = "video_uri"
class DataEditorTheme(Base): class DataEditorTheme(Base):
accent_color: Optional[str] accent_color: str | None
accent_fg: Optional[str] accent_fg: str | None
accent_light: Optional[str] accent_light: str | None
base_font_style: Optional[str] base_font_style: str | None
bg_bubble: Optional[str] bg_bubble: str | None
bg_bubble_selected: Optional[str] bg_bubble_selected: str | None
bg_cell: Optional[str] bg_cell: str | None
bg_cell_medium: Optional[str] bg_cell_medium: str | None
bg_header: Optional[str] bg_header: str | None
bg_header_has_focus: Optional[str] bg_header_has_focus: str | None
bg_header_hovered: Optional[str] bg_header_hovered: str | None
bg_icon_header: Optional[str] bg_icon_header: str | None
bg_search_result: Optional[str] bg_search_result: str | None
border_color: Optional[str] border_color: str | None
cell_horizontal_padding: Optional[int] cell_horizontal_padding: int | None
cell_vertical_padding: Optional[int] cell_vertical_padding: int | None
drilldown_border: Optional[str] drilldown_border: str | None
editor_font_size: Optional[str] editor_font_size: str | None
fg_icon_header: Optional[str] fg_icon_header: str | None
font_family: Optional[str] font_family: str | None
header_bottom_border_color: Optional[str] header_bottom_border_color: str | None
header_font_style: Optional[str] header_font_style: str | None
horizontal_border_color: Optional[str] horizontal_border_color: str | None
line_height: Optional[int] line_height: int | None
link_color: Optional[str] link_color: str | None
text_bubble: Optional[str] text_bubble: str | None
text_dark: Optional[str] text_dark: str | None
text_group_header: Optional[str] text_group_header: str | None
text_header: Optional[str] text_header: str | None
text_header_selected: Optional[str] text_header_selected: str | None
text_light: Optional[str] text_light: str | None
text_medium: Optional[str] text_medium: str | None
class Bounds(TypedDict): class Bounds(TypedDict):
x: int x: int
@ -97,7 +97,7 @@ class GridSelectionCurrent(TypedDict):
rangeStack: list[Rectangle] rangeStack: list[Rectangle]
class GridSelection(TypedDict): class GridSelection(TypedDict):
current: Optional[GridSelectionCurrent] current: GridSelectionCurrent | None
columns: CompatSelection columns: CompatSelection
rows: CompatSelection rows: CompatSelection
@ -122,7 +122,7 @@ class GridCell(TypedDict):
class GridColumn(TypedDict): class GridColumn(TypedDict):
title: str title: str
group: Optional[str] group: str | None
class DataEditor(NoSSRComponent): class DataEditor(NoSSRComponent):
def add_imports(self) -> ImportDict: ... def add_imports(self) -> ImportDict: ...
@ -132,116 +132,88 @@ class DataEditor(NoSSRComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
rows: Optional[Union[Var[int], int]] = None, rows: Var[int] | int | None = None,
columns: Optional[ columns: Var[list[dict[str, Any]]] | list[dict[str, Any]] | None = None,
Union[Var[list[dict[str, Any]]], list[dict[str, Any]]] data: Var[list[list[Any]]] | list[list[Any]] | None = None,
] = None, get_cell_content: Var[str] | str | None = None,
data: Optional[Union[Var[list[list[Any]]], list[list[Any]]]] = None, get_cells_for_selection: Var[bool] | bool | None = None,
get_cell_content: Optional[Union[Var[str], str]] = None, on_paste: Var[bool] | bool | None = None,
get_cells_for_selection: Optional[Union[Var[bool], bool]] = None, draw_focus_ring: Var[bool] | bool | None = None,
on_paste: Optional[Union[Var[bool], bool]] = None, fixed_shadow_x: Var[bool] | bool | None = None,
draw_focus_ring: Optional[Union[Var[bool], bool]] = None, fixed_shadow_y: Var[bool] | bool | None = None,
fixed_shadow_x: Optional[Union[Var[bool], bool]] = None, freeze_columns: Var[int] | int | None = None,
fixed_shadow_y: Optional[Union[Var[bool], bool]] = None, group_header_height: Var[int] | int | None = None,
freeze_columns: Optional[Union[Var[int], int]] = None, header_height: Var[int] | int | None = None,
group_header_height: Optional[Union[Var[int], int]] = None, max_column_auto_width: Var[int] | int | None = None,
header_height: Optional[Union[Var[int], int]] = None, max_column_width: Var[int] | int | None = None,
max_column_auto_width: Optional[Union[Var[int], int]] = None, min_column_width: Var[int] | int | None = None,
max_column_width: Optional[Union[Var[int], int]] = None, row_height: Var[int] | int | None = None,
min_column_width: Optional[Union[Var[int], int]] = None, row_markers: Literal["both", "checkbox", "clickable-number", "none", "number"]
row_height: Optional[Union[Var[int], int]] = None, | Var[Literal["both", "checkbox", "clickable-number", "none", "number"]]
row_markers: Optional[ | None = None,
Union[ row_marker_start_index: Var[int] | int | None = None,
Literal["both", "checkbox", "clickable-number", "none", "number"], row_marker_width: Var[int] | int | None = None,
Var[Literal["both", "checkbox", "clickable-number", "none", "number"]], smooth_scroll_x: Var[bool] | bool | None = None,
] smooth_scroll_y: Var[bool] | bool | None = None,
] = None, vertical_border: Var[bool] | bool | None = None,
row_marker_start_index: Optional[Union[Var[int], int]] = None, column_select: Literal["multi", "none", "single"]
row_marker_width: Optional[Union[Var[int], int]] = None, | Var[Literal["multi", "none", "single"]]
smooth_scroll_x: Optional[Union[Var[bool], bool]] = None, | None = None,
smooth_scroll_y: Optional[Union[Var[bool], bool]] = None, prevent_diagonal_scrolling: Var[bool] | bool | None = None,
vertical_border: Optional[Union[Var[bool], bool]] = None, overscroll_x: Var[int] | int | None = None,
column_select: Optional[ overscroll_y: Var[int] | int | None = None,
Union[ scroll_offset_x: Var[int] | int | None = None,
Literal["multi", "none", "single"], scroll_offset_y: Var[int] | int | None = None,
Var[Literal["multi", "none", "single"]], theme: DataEditorTheme | Dict | Var[DataEditorTheme | Dict] | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
prevent_diagonal_scrolling: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
overscroll_x: Optional[Union[Var[int], int]] = None, class_name: Any | None = None,
overscroll_y: Optional[Union[Var[int], int]] = None, autofocus: bool | None = None,
scroll_offset_x: Optional[Union[Var[int], int]] = None, custom_attrs: dict[str, Var | Any] | None = None,
scroll_offset_y: Optional[Union[Var[int], int]] = None,
theme: Optional[
Union[DataEditorTheme, Dict, Var[Union[DataEditorTheme, Dict]]]
] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_cell_activated: Optional[ on_cell_activated: Optional[EventType[()] | EventType[tuple[int, int]]] = None,
Union[EventType[()], EventType[tuple[int, int]]] on_cell_clicked: Optional[EventType[()] | EventType[tuple[int, int]]] = None,
] = None,
on_cell_clicked: Optional[
Union[EventType[()], EventType[tuple[int, int]]]
] = None,
on_cell_context_menu: Optional[ on_cell_context_menu: Optional[
Union[EventType[()], EventType[tuple[int, int]]] EventType[()] | EventType[tuple[int, int]]
] = None, ] = None,
on_cell_edited: Optional[ on_cell_edited: Optional[
Union[ EventType[()]
EventType[()], | EventType[tuple[int, int]]
EventType[tuple[int, int]], | EventType[tuple[int, int], GridCell]
EventType[tuple[int, int], GridCell],
]
] = None, ] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_column_resize: Optional[ on_column_resize: Optional[
Union[EventType[()], EventType[GridColumn], EventType[GridColumn, int]] EventType[()] | EventType[GridColumn] | EventType[GridColumn, int]
] = None, ] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_delete: Optional[Union[EventType[()], EventType[GridSelection]]] = None, on_delete: Optional[EventType[()] | EventType[GridSelection]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_finished_editing: Optional[ on_finished_editing: Optional[
Union[ EventType[()]
EventType[()], | EventType[Union[GridCell, None]]
EventType[Union[GridCell, None]], | EventType[Union[GridCell, None], tuple[int, int]]
EventType[Union[GridCell, None], tuple[int, int]],
]
] = None, ] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_group_header_clicked: Optional[ on_group_header_clicked: Optional[
Union[ EventType[()]
EventType[()], | EventType[tuple[int, int]]
EventType[tuple[int, int]], | EventType[tuple[int, int], GridCell]
EventType[tuple[int, int], GridCell],
]
] = None, ] = None,
on_group_header_context_menu: Optional[ on_group_header_context_menu: Optional[
Union[ EventType[()] | EventType[int] | EventType[int, GroupHeaderClickedEventArgs]
EventType[()],
EventType[int],
EventType[int, GroupHeaderClickedEventArgs],
]
] = None, ] = None,
on_group_header_renamed: Optional[ on_group_header_renamed: Optional[
Union[EventType[()], EventType[str], EventType[str, str]] EventType[()] | EventType[str] | EventType[str, str]
] = None,
on_header_clicked: Optional[
Union[EventType[()], EventType[tuple[int, int]]]
] = None, ] = None,
on_header_clicked: Optional[EventType[()] | EventType[tuple[int, int]]] = None,
on_header_context_menu: Optional[ on_header_context_menu: Optional[
Union[EventType[()], EventType[tuple[int, int]]] EventType[()] | EventType[tuple[int, int]]
] = None, ] = None,
on_header_menu_click: Optional[ on_header_menu_click: Optional[
Union[EventType[()], EventType[int], EventType[int, Rectangle]] EventType[()] | EventType[int] | EventType[int, Rectangle]
] = None,
on_item_hovered: Optional[
Union[EventType[()], EventType[tuple[int, int]]]
] = None, ] = None,
on_item_hovered: Optional[EventType[()] | EventType[tuple[int, int]]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
on_mouse_enter: Optional[EventType[()]] = None, on_mouse_enter: Optional[EventType[()]] = None,

View File

@ -4,7 +4,7 @@ from __future__ import annotations
import re import re
from collections import defaultdict from collections import defaultdict
from typing import Any, Literal, Optional, Union from typing import Any, Literal, Union
from reflex.base import Base from reflex.base import Base
from reflex.components.component import Component, ComponentNamespace from reflex.components.component import Component, ComponentNamespace
@ -403,8 +403,8 @@ class Position(NoExtrasAllowedProps):
class ShikiDecorations(NoExtrasAllowedProps): class ShikiDecorations(NoExtrasAllowedProps):
"""Decorations for the code block.""" """Decorations for the code block."""
start: Union[int, Position] start: int | Position
end: Union[int, Position] end: int | Position
tag_name: str = "span" tag_name: str = "span"
properties: dict[str, Any] = {} properties: dict[str, Any] = {}
always_wrap: bool = False always_wrap: bool = False
@ -415,7 +415,7 @@ class ShikiBaseTransformers(Base):
library: str library: str
fns: list[FunctionStringVar] fns: list[FunctionStringVar]
style: Optional[Style] style: Style | None
class ShikiJsTransformer(ShikiBaseTransformers): class ShikiJsTransformer(ShikiBaseTransformers):
@ -425,7 +425,7 @@ class ShikiJsTransformer(ShikiBaseTransformers):
fns: list[FunctionStringVar] = [ fns: list[FunctionStringVar] = [
FunctionStringVar.create(fn) for fn in SHIKIJS_TRANSFORMER_FNS FunctionStringVar.create(fn) for fn in SHIKIJS_TRANSFORMER_FNS
] ]
style: Optional[Style] = Style( style: Style | None = Style(
{ {
"code": {"line-height": "1.7", "font-size": "0.875em", "display": "grid"}, "code": {"line-height": "1.7", "font-size": "0.875em", "display": "grid"},
# Diffs # Diffs
@ -717,7 +717,7 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
can_copy: bool = False can_copy: bool = False
# copy_button: A custom copy button to override the default one. # copy_button: A custom copy button to override the default one.
copy_button: Optional[Union[Component, bool]] = None copy_button: Component | bool | None = None
@classmethod @classmethod
def create( def create(

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.base import Base from reflex.base import Base
from reflex.components.component import Component, ComponentNamespace from reflex.components.component import Component, ComponentNamespace
@ -335,8 +335,8 @@ class Position(NoExtrasAllowedProps):
character: int character: int
class ShikiDecorations(NoExtrasAllowedProps): class ShikiDecorations(NoExtrasAllowedProps):
start: Union[int, Position] start: int | Position
end: Union[int, Position] end: int | Position
tag_name: str tag_name: str
properties: dict[str, Any] properties: dict[str, Any]
always_wrap: bool always_wrap: bool
@ -344,12 +344,12 @@ class ShikiDecorations(NoExtrasAllowedProps):
class ShikiBaseTransformers(Base): class ShikiBaseTransformers(Base):
library: str library: str
fns: list[FunctionStringVar] fns: list[FunctionStringVar]
style: Optional[Style] style: Style | None
class ShikiJsTransformer(ShikiBaseTransformers): class ShikiJsTransformer(ShikiBaseTransformers):
library: str library: str
fns: list[FunctionStringVar] fns: list[FunctionStringVar]
style: Optional[Style] style: Style | None
class ShikiCodeBlock(Component, MarkdownComponentMap): class ShikiCodeBlock(Component, MarkdownComponentMap):
@overload @overload
@ -357,9 +357,7 @@ class ShikiCodeBlock(Component, MarkdownComponentMap):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
language: Optional[ language: Literal[
Union[
Literal[
"abap", "abap",
"actionscript-3", "actionscript-3",
"ada", "ada",
@ -573,8 +571,8 @@ class ShikiCodeBlock(Component, MarkdownComponentMap):
"yaml", "yaml",
"zenscript", "zenscript",
"zig", "zig",
], ]
Var[ | Var[
Literal[ Literal[
"abap", "abap",
"actionscript-3", "actionscript-3",
@ -790,12 +788,9 @@ class ShikiCodeBlock(Component, MarkdownComponentMap):
"zenscript", "zenscript",
"zig", "zig",
] ]
],
] ]
] = None, | None = None,
theme: Optional[ theme: Literal[
Union[
Literal[
"andromeeda", "andromeeda",
"aurora-x", "aurora-x",
"ayu-dark", "ayu-dark",
@ -847,8 +842,8 @@ class ShikiCodeBlock(Component, MarkdownComponentMap):
"vitesse-black", "vitesse-black",
"vitesse-dark", "vitesse-dark",
"vitesse-light", "vitesse-light",
], ]
Var[ | Var[
Literal[ Literal[
"andromeeda", "andromeeda",
"aurora-x", "aurora-x",
@ -902,32 +897,23 @@ class ShikiCodeBlock(Component, MarkdownComponentMap):
"vitesse-dark", "vitesse-dark",
"vitesse-light", "vitesse-light",
] ]
],
] ]
] = None, | None = None,
themes: Optional[ themes: Var[dict[str, str] | list[dict[str, Any]]]
Union[ | dict[str, str]
Var[Union[dict[str, str], list[dict[str, Any]]]], | list[dict[str, Any]]
dict[str, str], | None = None,
list[dict[str, Any]], code: Var[str] | str | None = None,
] transformers: Var[list[ShikiBaseTransformers | dict[str, Any]]]
] = None, | list[ShikiBaseTransformers | dict[str, Any]]
code: Optional[Union[Var[str], str]] = None, | None = None,
transformers: Optional[ decorations: Var[list[ShikiDecorations]] | list[ShikiDecorations] | None = None,
Union[ style: Style | None = None,
Var[list[Union[ShikiBaseTransformers, dict[str, Any]]]], key: Any | None = None,
list[Union[ShikiBaseTransformers, dict[str, Any]]], id: Any | None = None,
] class_name: Any | None = None,
] = None, autofocus: bool | None = None,
decorations: Optional[ custom_attrs: dict[str, Var | Any] | None = None,
Union[Var[list[ShikiDecorations]], list[ShikiDecorations]]
] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -980,13 +966,11 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
use_transformers: Optional[Union[Var[bool], bool]] = None, use_transformers: Var[bool] | bool | None = None,
show_line_numbers: Optional[Union[Var[bool], bool]] = None, show_line_numbers: Var[bool] | bool | None = None,
can_copy: Optional[bool] = None, can_copy: bool | None = None,
copy_button: Optional[Union[Component, bool]] = None, copy_button: Component | bool | None = None,
language: Optional[ language: Literal[
Union[
Literal[
"abap", "abap",
"actionscript-3", "actionscript-3",
"ada", "ada",
@ -1200,8 +1184,8 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
"yaml", "yaml",
"zenscript", "zenscript",
"zig", "zig",
], ]
Var[ | Var[
Literal[ Literal[
"abap", "abap",
"actionscript-3", "actionscript-3",
@ -1417,12 +1401,9 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
"zenscript", "zenscript",
"zig", "zig",
] ]
],
] ]
] = None, | None = None,
theme: Optional[ theme: Literal[
Union[
Literal[
"andromeeda", "andromeeda",
"aurora-x", "aurora-x",
"ayu-dark", "ayu-dark",
@ -1474,8 +1455,8 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
"vitesse-black", "vitesse-black",
"vitesse-dark", "vitesse-dark",
"vitesse-light", "vitesse-light",
], ]
Var[ | Var[
Literal[ Literal[
"andromeeda", "andromeeda",
"aurora-x", "aurora-x",
@ -1529,32 +1510,23 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
"vitesse-dark", "vitesse-dark",
"vitesse-light", "vitesse-light",
] ]
],
] ]
] = None, | None = None,
themes: Optional[ themes: Var[dict[str, str] | list[dict[str, Any]]]
Union[ | dict[str, str]
Var[Union[dict[str, str], list[dict[str, Any]]]], | list[dict[str, Any]]
dict[str, str], | None = None,
list[dict[str, Any]], code: Var[str] | str | None = None,
] transformers: Var[list[ShikiBaseTransformers | dict[str, Any]]]
] = None, | list[ShikiBaseTransformers | dict[str, Any]]
code: Optional[Union[Var[str], str]] = None, | None = None,
transformers: Optional[ decorations: Var[list[ShikiDecorations]] | list[ShikiDecorations] | None = None,
Union[ style: Style | None = None,
Var[list[Union[ShikiBaseTransformers, dict[str, Any]]]], key: Any | None = None,
list[Union[ShikiBaseTransformers, dict[str, Any]]], id: Any | None = None,
] class_name: Any | None = None,
] = None, autofocus: bool | None = None,
decorations: Optional[ custom_attrs: dict[str, Var | Any] | None = None,
Union[Var[list[ShikiDecorations]], list[ShikiDecorations]]
] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -1610,13 +1582,11 @@ class CodeblockNamespace(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
use_transformers: Optional[Union[Var[bool], bool]] = None, use_transformers: Var[bool] | bool | None = None,
show_line_numbers: Optional[Union[Var[bool], bool]] = None, show_line_numbers: Var[bool] | bool | None = None,
can_copy: Optional[bool] = None, can_copy: bool | None = None,
copy_button: Optional[Union[Component, bool]] = None, copy_button: Component | bool | None = None,
language: Optional[ language: Literal[
Union[
Literal[
"abap", "abap",
"actionscript-3", "actionscript-3",
"ada", "ada",
@ -1830,8 +1800,8 @@ class CodeblockNamespace(ComponentNamespace):
"yaml", "yaml",
"zenscript", "zenscript",
"zig", "zig",
], ]
Var[ | Var[
Literal[ Literal[
"abap", "abap",
"actionscript-3", "actionscript-3",
@ -2047,12 +2017,9 @@ class CodeblockNamespace(ComponentNamespace):
"zenscript", "zenscript",
"zig", "zig",
] ]
],
] ]
] = None, | None = None,
theme: Optional[ theme: Literal[
Union[
Literal[
"andromeeda", "andromeeda",
"aurora-x", "aurora-x",
"ayu-dark", "ayu-dark",
@ -2104,8 +2071,8 @@ class CodeblockNamespace(ComponentNamespace):
"vitesse-black", "vitesse-black",
"vitesse-dark", "vitesse-dark",
"vitesse-light", "vitesse-light",
], ]
Var[ | Var[
Literal[ Literal[
"andromeeda", "andromeeda",
"aurora-x", "aurora-x",
@ -2159,32 +2126,23 @@ class CodeblockNamespace(ComponentNamespace):
"vitesse-dark", "vitesse-dark",
"vitesse-light", "vitesse-light",
] ]
],
] ]
] = None, | None = None,
themes: Optional[ themes: Var[dict[str, str] | list[dict[str, Any]]]
Union[ | dict[str, str]
Var[Union[dict[str, str], list[dict[str, Any]]]], | list[dict[str, Any]]
dict[str, str], | None = None,
list[dict[str, Any]], code: Var[str] | str | None = None,
] transformers: Var[list[ShikiBaseTransformers | dict[str, Any]]]
] = None, | list[ShikiBaseTransformers | dict[str, Any]]
code: Optional[Union[Var[str], str]] = None, | None = None,
transformers: Optional[ decorations: Var[list[ShikiDecorations]] | list[ShikiDecorations] | None = None,
Union[ style: Style | None = None,
Var[list[Union[ShikiBaseTransformers, dict[str, Any]]]], key: Any | None = None,
list[Union[ShikiBaseTransformers, dict[str, Any]]], id: Any | None = None,
] class_name: Any | None = None,
] = None, autofocus: bool | None = None,
decorations: Optional[ custom_attrs: dict[str, Var | Any] | None = None,
Union[Var[list[ShikiDecorations]], list[ShikiDecorations]]
] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -16,12 +16,12 @@ class Element(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.el.element import Element from reflex.components.el.element import Element
from reflex.event import EventType from reflex.event import EventType
@ -94,62 +94,36 @@ class BaseHTML(Element):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -219,8 +193,8 @@ class BaseHTML(Element):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -292,19 +266,18 @@ class BaseHTML(Element):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
from __future__ import annotations from __future__ import annotations
from hashlib import md5 from hashlib import md5
from typing import Any, Iterator, Literal, Union from typing import Any, Iterator, Literal
from jinja2 import Environment from jinja2 import Environment
@ -80,7 +80,7 @@ class Button(BaseHTML):
type: Var[ButtonType] type: Var[ButtonType]
# Value of the button, used when sending form data # Value of the button, used when sending form data
value: Var[Union[str, int, float]] value: Var[str | int | float]
class Datalist(BaseHTML): class Datalist(BaseHTML):
@ -321,7 +321,7 @@ class Input(BaseHTML):
default_checked: Var[bool] default_checked: Var[bool]
# The initial value for a text field # The initial value for a text field
default_value: Var[Union[str, int, float]] default_value: Var[str | int | float]
# Disables the input # Disables the input
disabled: Var[bool] disabled: Var[bool]
@ -348,16 +348,16 @@ class Input(BaseHTML):
list: Var[str] list: Var[str]
# Specifies the maximum value for the input # Specifies the maximum value for the input
max: Var[Union[str, int, float]] max: Var[str | int | float]
# Specifies the maximum number of characters allowed in the input # Specifies the maximum number of characters allowed in the input
max_length: Var[Union[int, float]] max_length: Var[int | float]
# Specifies the minimum number of characters required in the input # Specifies the minimum number of characters required in the input
min_length: Var[Union[int, float]] min_length: Var[int | float]
# Specifies the minimum value for the input # Specifies the minimum value for the input
min: Var[Union[str, int, float]] min: Var[str | int | float]
# Indicates whether multiple values can be entered in an input of the type email or file # Indicates whether multiple values can be entered in an input of the type email or file
multiple: Var[bool] multiple: Var[bool]
@ -378,19 +378,19 @@ class Input(BaseHTML):
required: Var[bool] required: Var[bool]
# Specifies the visible width of a text control # Specifies the visible width of a text control
size: Var[Union[int, float]] size: Var[int | float]
# URL for image inputs # URL for image inputs
src: Var[str] src: Var[str]
# Specifies the legal number intervals for an input # Specifies the legal number intervals for an input
step: Var[Union[str, int, float]] step: Var[str | int | float]
# Specifies the type of input # Specifies the type of input
type: Var[HTMLInputTypeAttribute] type: Var[HTMLInputTypeAttribute]
# Value of the input # Value of the input
value: Var[Union[str, int, float]] value: Var[str | int | float]
# Fired when the input value changes # Fired when the input value changes
on_change: EventHandler[input_event] on_change: EventHandler[input_event]
@ -462,22 +462,22 @@ class Meter(BaseHTML):
form: Var[str] form: Var[str]
# High limit of range (above this is considered high value) # High limit of range (above this is considered high value)
high: Var[Union[int, float]] high: Var[int | float]
# Low limit of range (below this is considered low value) # Low limit of range (below this is considered low value)
low: Var[Union[int, float]] low: Var[int | float]
# Maximum value of the range # Maximum value of the range
max: Var[Union[int, float]] max: Var[int | float]
# Minimum value of the range # Minimum value of the range
min: Var[Union[int, float]] min: Var[int | float]
# Optimum value in the range # Optimum value in the range
optimum: Var[Union[int, float]] optimum: Var[int | float]
# Current value of the meter # Current value of the meter
value: Var[Union[int, float]] value: Var[int | float]
class Optgroup(BaseHTML): class Optgroup(BaseHTML):
@ -507,7 +507,7 @@ class Option(BaseHTML):
selected: Var[bool] selected: Var[bool]
# Value to be sent as form data # Value to be sent as form data
value: Var[Union[str, int, float]] value: Var[str | int | float]
class Output(BaseHTML): class Output(BaseHTML):
@ -534,10 +534,10 @@ class Progress(BaseHTML):
form: Var[str] form: Var[str]
# Maximum value of the progress indicator # Maximum value of the progress indicator
max: Var[Union[str, int, float]] max: Var[str | int | float]
# Current value of the progress indicator # Current value of the progress indicator
value: Var[Union[str, int, float]] value: Var[str | int | float]
class Select(BaseHTML): class Select(BaseHTML):

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@ class A(BaseHTML): # Inherits common attributes from BaseMeta
tag = "a" tag = "a"
# Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink. # Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink.
download: Var[Union[str, bool]] download: Var[str | bool]
# Specifies the URL of the page the link goes to # Specifies the URL of the page the link goes to
href: Var[str] href: Var[str]
@ -97,7 +97,7 @@ class Data(BaseHTML):
tag = "data" tag = "data"
# Specifies the machine-readable translation of the data element. # Specifies the machine-readable translation of the data element.
value: Var[Union[str, int, float]] value: Var[str | int | float]
class Dfn(BaseHTML): class Dfn(BaseHTML):

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@ class Area(BaseHTML):
coords: Var[str] coords: Var[str]
# Specifies that the target will be downloaded when clicked # Specifies that the target will be downloaded when clicked
download: Var[Union[str, bool]] download: Var[str | bool]
# Hyperlink reference for the area # Hyperlink reference for the area
href: Var[str] href: Var[str]
@ -291,9 +291,9 @@ class Svg(BaseHTML):
tag = "svg" tag = "svg"
# The width of the svg. # The width of the svg.
width: Var[Union[str, int]] width: Var[str | int]
# The height of the svg. # The height of the svg.
height: Var[Union[str, int]] height: Var[str | int]
# The XML namespace declaration. # The XML namespace declaration.
xmlns: Var[str] xmlns: Var[str]
@ -303,19 +303,19 @@ class Text(BaseHTML):
tag = "text" tag = "text"
# The x coordinate of the starting point of the text baseline. # The x coordinate of the starting point of the text baseline.
x: Var[Union[str, int]] x: Var[str | int]
# The y coordinate of the starting point of the text baseline. # The y coordinate of the starting point of the text baseline.
y: Var[Union[str, int]] y: Var[str | int]
# Shifts the text position horizontally from a previous text element. # Shifts the text position horizontally from a previous text element.
dx: Var[Union[str, int]] dx: Var[str | int]
# Shifts the text position vertically from a previous text element. # Shifts the text position vertically from a previous text element.
dy: Var[Union[str, int]] dy: Var[str | int]
# Rotates orientation of each individual glyph. # Rotates orientation of each individual glyph.
rotate: Var[Union[str, int]] rotate: Var[str | int]
# How the text is stretched or compressed to fit the width defined by the text_length attribute. # How the text is stretched or compressed to fit the width defined by the text_length attribute.
length_adjust: Var[str] length_adjust: Var[str]
# A width that the text should be scaled to fit. # A width that the text should be scaled to fit.
text_length: Var[Union[str, int]] text_length: Var[str | int]
class Line(BaseHTML): class Line(BaseHTML):
@ -323,13 +323,13 @@ class Line(BaseHTML):
tag = "line" tag = "line"
# The x-axis coordinate of the line starting point. # The x-axis coordinate of the line starting point.
x1: Var[Union[str, int]] x1: Var[str | int]
# The x-axis coordinate of the the line ending point. # The x-axis coordinate of the the line ending point.
x2: Var[Union[str, int]] x2: Var[str | int]
# The y-axis coordinate of the line starting point. # The y-axis coordinate of the line starting point.
y1: Var[Union[str, int]] y1: Var[str | int]
# The y-axis coordinate of the the line ending point. # The y-axis coordinate of the the line ending point.
y2: Var[Union[str, int]] y2: Var[str | int]
# The total path length, in user units. # The total path length, in user units.
path_length: Var[int] path_length: Var[int]
@ -339,11 +339,11 @@ class Circle(BaseHTML):
tag = "circle" tag = "circle"
# The x-axis coordinate of the center of the circle. # The x-axis coordinate of the center of the circle.
cx: Var[Union[str, int]] cx: Var[str | int]
# The y-axis coordinate of the center of the circle. # The y-axis coordinate of the center of the circle.
cy: Var[Union[str, int]] cy: Var[str | int]
# The radius of the circle. # The radius of the circle.
r: Var[Union[str, int]] r: Var[str | int]
# The total length for the circle's circumference, in user units. # The total length for the circle's circumference, in user units.
path_length: Var[int] path_length: Var[int]
@ -353,13 +353,13 @@ class Ellipse(BaseHTML):
tag = "ellipse" tag = "ellipse"
# The x position of the center of the ellipse. # The x position of the center of the ellipse.
cx: Var[Union[str, int]] cx: Var[str | int]
# The y position of the center of the ellipse. # The y position of the center of the ellipse.
cy: Var[Union[str, int]] cy: Var[str | int]
# The radius of the ellipse on the x axis. # The radius of the ellipse on the x axis.
rx: Var[Union[str, int]] rx: Var[str | int]
# The radius of the ellipse on the y axis. # The radius of the ellipse on the y axis.
ry: Var[Union[str, int]] ry: Var[str | int]
# The total length for the ellipse's circumference, in user units. # The total length for the ellipse's circumference, in user units.
path_length: Var[int] path_length: Var[int]
@ -369,17 +369,17 @@ class Rect(BaseHTML):
tag = "rect" tag = "rect"
# The x coordinate of the rect. # The x coordinate of the rect.
x: Var[Union[str, int]] x: Var[str | int]
# The y coordinate of the rect. # The y coordinate of the rect.
y: Var[Union[str, int]] y: Var[str | int]
# The width of the rect # The width of the rect
width: Var[Union[str, int]] width: Var[str | int]
# The height of the rect. # The height of the rect.
height: Var[Union[str, int]] height: Var[str | int]
# The horizontal corner radius of the rect. Defaults to ry if it is specified. # The horizontal corner radius of the rect. Defaults to ry if it is specified.
rx: Var[Union[str, int]] rx: Var[str | int]
# The vertical corner radius of the rect. Defaults to rx if it is specified. # The vertical corner radius of the rect. Defaults to rx if it is specified.
ry: Var[Union[str, int]] ry: Var[str | int]
# The total length of the rectangle's perimeter, in user units. # The total length of the rectangle's perimeter, in user units.
path_length: Var[int] path_length: Var[int]
@ -406,25 +406,25 @@ class LinearGradient(BaseHTML):
tag = "linearGradient" tag = "linearGradient"
# Units for the gradient. # Units for the gradient.
gradient_units: Var[Union[str, bool]] gradient_units: Var[str | bool]
# Transform applied to the gradient. # Transform applied to the gradient.
gradient_transform: Var[Union[str, bool]] gradient_transform: Var[str | bool]
# Method used to spread the gradient. # Method used to spread the gradient.
spread_method: Var[Union[str, bool]] spread_method: Var[str | bool]
# X coordinate of the starting point of the gradient. # X coordinate of the starting point of the gradient.
x1: Var[Union[str, int, float]] x1: Var[str | int | float]
# X coordinate of the ending point of the gradient. # X coordinate of the ending point of the gradient.
x2: Var[Union[str, int, float]] x2: Var[str | int | float]
# Y coordinate of the starting point of the gradient. # Y coordinate of the starting point of the gradient.
y1: Var[Union[str, int, float]] y1: Var[str | int | float]
# Y coordinate of the ending point of the gradient. # Y coordinate of the ending point of the gradient.
y2: Var[Union[str, int, float]] y2: Var[str | int | float]
class RadialGradient(BaseHTML): class RadialGradient(BaseHTML):
@ -433,31 +433,31 @@ class RadialGradient(BaseHTML):
tag = "radialGradient" tag = "radialGradient"
# The x coordinate of the end circle of the radial gradient. # The x coordinate of the end circle of the radial gradient.
cx: Var[Union[str, int, float]] cx: Var[str | int | float]
# The y coordinate of the end circle of the radial gradient. # The y coordinate of the end circle of the radial gradient.
cy: Var[Union[str, int, float]] cy: Var[str | int | float]
# The radius of the start circle of the radial gradient. # The radius of the start circle of the radial gradient.
fr: Var[Union[str, int, float]] fr: Var[str | int | float]
# The x coordinate of the start circle of the radial gradient. # The x coordinate of the start circle of the radial gradient.
fx: Var[Union[str, int, float]] fx: Var[str | int | float]
# The y coordinate of the start circle of the radial gradient. # The y coordinate of the start circle of the radial gradient.
fy: Var[Union[str, int, float]] fy: Var[str | int | float]
# Units for the gradient. # Units for the gradient.
gradient_units: Var[Union[str, bool]] gradient_units: Var[str | bool]
# Transform applied to the gradient. # Transform applied to the gradient.
gradient_transform: Var[Union[str, bool]] gradient_transform: Var[str | bool]
# The radius of the end circle of the radial gradient. # The radius of the end circle of the radial gradient.
r: Var[Union[str, int, float]] r: Var[str | int | float]
# Method used to spread the gradient. # Method used to spread the gradient.
spread_method: Var[Union[str, bool]] spread_method: Var[str | bool]
class Stop(BaseHTML): class Stop(BaseHTML):
@ -466,10 +466,10 @@ class Stop(BaseHTML):
tag = "stop" tag = "stop"
# Offset of the gradient stop. # Offset of the gradient stop.
offset: Var[Union[str, float, int]] offset: Var[str | float | int]
# Color of the gradient stop. # Color of the gradient stop.
stop_color: Var[Union[str, Color, bool]] stop_color: Var[str | Color | bool]
# Opacity of the gradient stop. # Opacity of the gradient stop.
stop_opacity: Var[Union[str, float, int, bool]] stop_opacity: Var[Union[str, float, int, bool]]
@ -481,7 +481,7 @@ class Path(BaseHTML):
tag = "path" tag = "path"
# Defines the shape of the path. # Defines the shape of the path.
d: Var[Union[str, int, float]] d: Var[str | int | float]
class SVG(ComponentNamespace): class SVG(ComponentNamespace):

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.el.element import Element from reflex.components.el.element import Element
from reflex.event import EventType from reflex.event import EventType
@ -18,64 +18,38 @@ class Base(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
href: Optional[Union[Var[str], str]] = None, href: Var[str] | str | None = None,
target: Optional[Union[Var[str], str]] = None, target: Var[str] | str | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -145,8 +119,8 @@ class Base(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -218,19 +192,18 @@ class Base(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -287,62 +260,36 @@ class Head(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -412,8 +359,8 @@ class Head(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -485,19 +432,18 @@ class Head(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -554,19 +500,14 @@ class Link(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
cross_origin: Optional[ cross_origin: Literal["", "anonymous", "use-credentials"]
Union[ | Var[Literal["", "anonymous", "use-credentials"]]
Literal["", "anonymous", "use-credentials"], | None = None,
Var[Literal["", "anonymous", "use-credentials"]], href: Var[str] | str | None = None,
] href_lang: Var[str] | str | None = None,
] = None, integrity: Var[str] | str | None = None,
href: Optional[Union[Var[str], str]] = None, media: Var[str] | str | None = None,
href_lang: Optional[Union[Var[str], str]] = None, referrer_policy: Literal[
integrity: Optional[Union[Var[str], str]] = None,
media: Optional[Union[Var[str], str]] = None,
referrer_policy: Optional[
Union[
Literal[
"", "",
"no-referrer", "no-referrer",
"no-referrer-when-downgrade", "no-referrer-when-downgrade",
@ -576,8 +517,8 @@ class Link(BaseHTML):
"strict-origin", "strict-origin",
"strict-origin-when-cross-origin", "strict-origin-when-cross-origin",
"unsafe-url", "unsafe-url",
], ]
Var[ | Var[
Literal[ Literal[
"", "",
"no-referrer", "no-referrer",
@ -589,68 +530,41 @@ class Link(BaseHTML):
"strict-origin-when-cross-origin", "strict-origin-when-cross-origin",
"unsafe-url", "unsafe-url",
] ]
],
] ]
] = None, | None = None,
rel: Optional[Union[Var[str], str]] = None, rel: Var[str] | str | None = None,
sizes: Optional[Union[Var[str], str]] = None, sizes: Var[str] | str | None = None,
type: Optional[Union[Var[str], str]] = None, type: Var[str] | str | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -720,8 +634,8 @@ class Link(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -793,19 +707,18 @@ class Link(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -871,66 +784,40 @@ class Meta(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
char_set: Optional[Union[Var[str], str]] = None, char_set: Var[str] | str | None = None,
content: Optional[Union[Var[str], str]] = None, content: Var[str] | str | None = None,
http_equiv: Optional[Union[Var[str], str]] = None, http_equiv: Var[str] | str | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -1000,8 +887,8 @@ class Meta(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -1073,19 +960,18 @@ class Meta(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -1146,12 +1032,12 @@ class Title(Element):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -1192,13 +1078,13 @@ class StyleEl(Element):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
media: Optional[Union[Var[str], str]] = None, media: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.event import EventType from reflex.event import EventType
from reflex.style import Style from reflex.style import Style
@ -17,63 +17,37 @@ class Details(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -143,8 +117,8 @@ class Details(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -216,19 +190,18 @@ class Details(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -286,63 +259,37 @@ class Dialog(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -412,8 +359,8 @@ class Dialog(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -485,19 +432,18 @@ class Dialog(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -555,62 +501,36 @@ class Summary(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -680,8 +600,8 @@ class Summary(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -753,19 +673,18 @@ class Summary(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -822,62 +741,36 @@ class Slot(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -947,8 +840,8 @@ class Slot(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -1020,19 +913,18 @@ class Slot(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -1089,62 +981,36 @@ class Template(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -1214,8 +1080,8 @@ class Template(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -1287,19 +1153,18 @@ class Template(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -1356,62 +1221,36 @@ class Math(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -1481,8 +1320,8 @@ class Math(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -1554,19 +1393,18 @@ class Math(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -1623,63 +1461,37 @@ class Html(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
manifest: Optional[Union[Var[str], str]] = None, manifest: Var[str] | str | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -1749,8 +1561,8 @@ class Html(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -1822,19 +1634,18 @@ class Html(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.event import EventType from reflex.event import EventType
from reflex.style import Style from reflex.style import Style
@ -17,62 +17,36 @@ class Canvas(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -142,8 +116,8 @@ class Canvas(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -215,19 +189,18 @@ class Canvas(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -284,62 +257,36 @@ class Noscript(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -409,8 +356,8 @@ class Noscript(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -482,19 +429,18 @@ class Noscript(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -551,19 +497,14 @@ class Script(BaseHTML):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
async_: Optional[Union[Var[bool], bool]] = None, async_: Var[bool] | bool | None = None,
char_set: Optional[Union[Var[str], str]] = None, char_set: Var[str] | str | None = None,
cross_origin: Optional[ cross_origin: Literal["", "anonymous", "use-credentials"]
Union[ | Var[Literal["", "anonymous", "use-credentials"]]
Literal["", "anonymous", "use-credentials"], | None = None,
Var[Literal["", "anonymous", "use-credentials"]], defer: Var[bool] | bool | None = None,
] integrity: Var[str] | str | None = None,
] = None, referrer_policy: Literal[
defer: Optional[Union[Var[bool], bool]] = None,
integrity: Optional[Union[Var[str], str]] = None,
referrer_policy: Optional[
Union[
Literal[
"", "",
"no-referrer", "no-referrer",
"no-referrer-when-downgrade", "no-referrer-when-downgrade",
@ -573,8 +514,8 @@ class Script(BaseHTML):
"strict-origin", "strict-origin",
"strict-origin-when-cross-origin", "strict-origin-when-cross-origin",
"unsafe-url", "unsafe-url",
], ]
Var[ | Var[
Literal[ Literal[
"", "",
"no-referrer", "no-referrer",
@ -586,67 +527,40 @@ class Script(BaseHTML):
"strict-origin-when-cross-origin", "strict-origin-when-cross-origin",
"unsafe-url", "unsafe-url",
] ]
],
] ]
] = None, | None = None,
src: Optional[Union[Var[str], str]] = None, src: Var[str] | str | None = None,
type: Optional[Union[Var[str], str]] = None, type: Var[str] | str | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -716,8 +630,8 @@ class Script(BaseHTML):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -789,19 +703,18 @@ class Script(BaseHTML):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
from __future__ import annotations from __future__ import annotations
from typing import Any, Dict, List, Union from typing import Any, Dict, List
from reflex.components.component import Component from reflex.components.component import Component
from reflex.components.tags import Tag from reflex.components.tags import Tag
@ -44,7 +44,7 @@ class DataTable(Gridjs):
resizable: Var[bool] resizable: Var[bool]
# Enable pagination. # Enable pagination.
pagination: Var[Union[bool, Dict]] pagination: Var[bool | Dict]
@classmethod @classmethod
def create(cls, *children, **props): def create(cls, *children, **props):

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Dict, List, Optional, Union, overload from typing import Any, Dict, List, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -17,12 +17,12 @@ class Gridjs(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -63,18 +63,18 @@ class DataTable(Gridjs):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
data: Optional[Any] = None, data: Any | None = None,
columns: Optional[Union[List, Var[List]]] = None, columns: List | Var[List] | None = None,
search: Optional[Union[Var[bool], bool]] = None, search: Var[bool] | bool | None = None,
sort: Optional[Union[Var[bool], bool]] = None, sort: Var[bool] | bool | None = None,
resizable: Optional[Union[Var[bool], bool]] = None, resizable: Var[bool] | bool | None = None,
pagination: Optional[Union[Dict, Var[Union[Dict, bool]], bool]] = None, pagination: Dict | Var[Dict | bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -16,12 +16,12 @@ class LucideIconComponent(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -62,13 +62,13 @@ class Icon(LucideIconComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
size: Optional[Union[Var[int], int]] = None, size: Var[int] | int | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -117,13 +117,13 @@ class DynamicIcon(LucideIconComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -5,7 +5,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
import dataclasses import dataclasses
from functools import lru_cache from functools import lru_cache
from typing import Any, Callable, Optional, Sequence, Union, overload from typing import Any, Callable, Optional, Sequence, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -52,14 +52,14 @@ class Markdown(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
component_map: Optional[dict[str, Any]] = None, component_map: dict[str, Any] | None = None,
component_map_hash: Optional[str] = None, component_map_hash: str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -2,7 +2,7 @@
import dataclasses import dataclasses
from datetime import date, datetime, time, timedelta from datetime import date, datetime, time, timedelta
from typing import Optional, Union from typing import Union
from reflex.components.component import NoSSRComponent from reflex.components.component import NoSSRComponent
from reflex.event import EventHandler, passthrough_event_spec from reflex.event import EventHandler, passthrough_event_spec
@ -14,15 +14,15 @@ from reflex.vars.base import LiteralVar, Var
class MomentDelta: class MomentDelta:
"""A delta used for add/subtract prop in Moment.""" """A delta used for add/subtract prop in Moment."""
years: Optional[int] = dataclasses.field(default=None) years: int | None = dataclasses.field(default=None)
quarters: Optional[int] = dataclasses.field(default=None) quarters: int | None = dataclasses.field(default=None)
months: Optional[int] = dataclasses.field(default=None) months: int | None = dataclasses.field(default=None)
weeks: Optional[int] = dataclasses.field(default=None) weeks: int | None = dataclasses.field(default=None)
days: Optional[int] = dataclasses.field(default=None) days: int | None = dataclasses.field(default=None)
hours: Optional[int] = dataclasses.field(default=None) hours: int | None = dataclasses.field(default=None)
minutes: Optional[int] = dataclasses.field(default=None) minutes: int | None = dataclasses.field(default=None)
seconds: Optional[int] = dataclasses.field(default=None) seconds: int | None = dataclasses.field(default=None)
milliseconds: Optional[int] = dataclasses.field(default=None) milliseconds: int | None = dataclasses.field(default=None)
class Moment(NoSSRComponent): class Moment(NoSSRComponent):

View File

@ -5,7 +5,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
import dataclasses import dataclasses
from datetime import date, datetime, time, timedelta from datetime import date, datetime, time, timedelta
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import NoSSRComponent from reflex.components.component import NoSSRComponent
from reflex.event import EventType from reflex.event import EventType
@ -15,15 +15,15 @@ from reflex.vars.base import Var
@dataclasses.dataclass(frozen=True) @dataclasses.dataclass(frozen=True)
class MomentDelta: class MomentDelta:
years: Optional[int] years: int | None
quarters: Optional[int] quarters: int | None
months: Optional[int] months: int | None
weeks: Optional[int] weeks: int | None
days: Optional[int] days: int | None
hours: Optional[int] hours: int | None
minutes: Optional[int] minutes: int | None
seconds: Optional[int] seconds: int | None
milliseconds: Optional[int] milliseconds: int | None
class Moment(NoSSRComponent): class Moment(NoSSRComponent):
def add_imports(self) -> ImportDict: ... def add_imports(self) -> ImportDict: ...
@ -32,44 +32,41 @@ class Moment(NoSSRComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
interval: Optional[Union[Var[int], int]] = None, interval: Var[int] | int | None = None,
format: Optional[Union[Var[str], str]] = None, format: Var[str] | str | None = None,
trim: Optional[Union[Var[bool], bool]] = None, trim: Var[bool] | bool | None = None,
parse: Optional[Union[Var[str], str]] = None, parse: Var[str] | str | None = None,
add: Optional[Union[MomentDelta, Var[MomentDelta]]] = None, add: MomentDelta | Var[MomentDelta] | None = None,
subtract: Optional[Union[MomentDelta, Var[MomentDelta]]] = None, subtract: MomentDelta | Var[MomentDelta] | None = None,
from_now: Optional[Union[Var[bool], bool]] = None, from_now: Var[bool] | bool | None = None,
from_now_during: Optional[Union[Var[int], int]] = None, from_now_during: Var[int] | int | None = None,
to_now: Optional[Union[Var[bool], bool]] = None, to_now: Var[bool] | bool | None = None,
with_title: Optional[Union[Var[bool], bool]] = None, with_title: Var[bool] | bool | None = None,
title_format: Optional[Union[Var[str], str]] = None, title_format: Var[str] | str | None = None,
diff: Optional[Union[Var[str], str]] = None, diff: Var[str] | str | None = None,
decimal: Optional[Union[Var[bool], bool]] = None, decimal: Var[bool] | bool | None = None,
unit: Optional[Union[Var[str], str]] = None, unit: Var[str] | str | None = None,
duration: Optional[Union[Var[str], str]] = None, duration: Var[str] | str | None = None,
date: Optional[ date: Var[date | datetime | str | time | timedelta]
Union[ | date
Var[Union[date, datetime, str, time, timedelta]], | datetime
date, | str
datetime, | time
str, | timedelta
time, | None = None,
timedelta, duration_from_now: Var[bool] | bool | None = None,
] unix: Var[bool] | bool | None = None,
] = None, local: Var[bool] | bool | None = None,
duration_from_now: Optional[Union[Var[bool], bool]] = None, tz: Var[str] | str | None = None,
unix: Optional[Union[Var[bool], bool]] = None, locale: Var[str] | str | None = None,
local: Optional[Union[Var[bool], bool]] = None, style: Style | None = None,
tz: Optional[Union[Var[str], str]] = None, key: Any | None = None,
locale: Optional[Union[Var[str], str]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_change: Optional[Union[EventType[()], EventType[str]]] = None, on_change: Optional[EventType[()] | EventType[str]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -18,12 +18,12 @@ class NextComponent(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -2,7 +2,7 @@
from __future__ import annotations from __future__ import annotations
from typing import Any, Literal, Optional, Union from typing import Any, Literal
from reflex.event import EventHandler, no_args_event_spec from reflex.event import EventHandler, no_args_event_spec
from reflex.utils import console, types from reflex.utils import console, types
@ -69,8 +69,8 @@ class Image(NextComponent):
def create( def create(
cls, cls,
*children, *children,
width: Optional[Union[int, str]] = None, width: int | str | None = None,
height: Optional[Union[int, str]] = None, height: int | str | None = None,
**props, **props,
): ):
"""Create an Image component from next/image. """Create an Image component from next/image.

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.event import EventType from reflex.event import EventType
from reflex.style import Style from reflex.style import Style
@ -19,26 +19,24 @@ class Image(NextComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
width: Optional[Union[int, str]] = None, width: int | str | None = None,
height: Optional[Union[int, str]] = None, height: int | str | None = None,
src: Optional[Union[Any, Var[Any]]] = None, src: Any | Var[Any] | None = None,
alt: Optional[Union[Var[str], str]] = None, alt: Var[str] | str | None = None,
loader: Optional[Union[Any, Var[Any]]] = None, loader: Any | Var[Any] | None = None,
fill: Optional[Union[Var[bool], bool]] = None, fill: Var[bool] | bool | None = None,
sizes: Optional[Union[Var[str], str]] = None, sizes: Var[str] | str | None = None,
quality: Optional[Union[Var[int], int]] = None, quality: Var[int] | int | None = None,
priority: Optional[Union[Var[bool], bool]] = None, priority: Var[bool] | bool | None = None,
placeholder: Optional[Union[Var[str], str]] = None, placeholder: Var[str] | str | None = None,
loading: Optional[ loading: Literal["eager", "lazy"] | Var[Literal["eager", "lazy"]] | None = None,
Union[Literal["eager", "lazy"], Var[Literal["eager", "lazy"]]] blur_data_url: Var[str] | str | None = None,
] = None, style: Style | None = None,
blur_data_url: Optional[Union[Var[str], str]] = None, key: Any | None = None,
style: Optional[Style] = None, id: Any | None = None,
key: Optional[Any] = None, class_name: Any | None = None,
id: Optional[Any] = None, autofocus: bool | None = None,
class_name: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -16,14 +16,14 @@ class NextLink(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
href: Optional[Union[Var[str], str]] = None, href: Var[str] | str | None = None,
pass_href: Optional[Union[Var[bool], bool]] = None, pass_href: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -1,7 +1,5 @@
"""Wrapping of the next-video component.""" """Wrapping of the next-video component."""
from typing import Optional
from reflex.components.component import Component from reflex.components.component import Component
from reflex.vars.base import Var from reflex.vars.base import Var
@ -17,7 +15,7 @@ class Video(NextComponent):
# the URL # the URL
src: Var[str] src: Var[str]
as_: Optional[Component] as_: Component | None
@classmethod @classmethod
def create(cls, *children, **props) -> NextComponent: def create(cls, *children, **props) -> NextComponent:

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -18,14 +18,14 @@ class Video(NextComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
src: Optional[Union[Var[str], str]] = None, src: Var[str] | str | None = None,
as_: Optional[Component] = None, as_: Optional[Component] = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -41,26 +41,26 @@ ItemOrList = Union[T, list[T]]
class BBox(TypedDict): class BBox(TypedDict):
"""Bounding box for a point in a plotly graph.""" """Bounding box for a point in a plotly graph."""
x0: Union[float, int, None] x0: float | int | None
x1: Union[float, int, None] x1: float | int | None
y0: Union[float, int, None] y0: float | int | None
y1: Union[float, int, None] y1: float | int | None
z0: Union[float, int, None] z0: float | int | None
z1: Union[float, int, None] z1: float | int | None
class Point(TypedDict): class Point(TypedDict):
"""A point in a plotly graph.""" """A point in a plotly graph."""
x: Union[float, int, None] x: float | int | None
y: Union[float, int, None] y: float | int | None
z: Union[float, int, None] z: float | int | None
lat: Union[float, int, None] lat: float | int | None
lon: Union[float, int, None] lon: float | int | None
curveNumber: Union[int, None] curveNumber: int | None
pointNumber: Union[int, None] pointNumber: int | None
pointNumbers: Union[list[int], None] pointNumbers: Union[list[int], None]
pointIndex: Union[int, None] pointIndex: int | None
markerColor: Union[ markerColor: Union[
ItemOrList[ ItemOrList[
ItemOrList[ ItemOrList[
@ -86,7 +86,7 @@ class Point(TypedDict):
], ],
None, None,
] ]
bbox: Union[BBox, None] bbox: BBox | None
class Plotly(NoSSRComponent): class Plotly(NoSSRComponent):

View File

@ -24,26 +24,26 @@ T = TypeVar("T")
ItemOrList = Union[T, list[T]] ItemOrList = Union[T, list[T]]
class BBox(TypedDict): class BBox(TypedDict):
x0: Union[float, int, None] x0: float | int | None
x1: Union[float, int, None] x1: float | int | None
y0: Union[float, int, None] y0: float | int | None
y1: Union[float, int, None] y1: float | int | None
z0: Union[float, int, None] z0: float | int | None
z1: Union[float, int, None] z1: float | int | None
class Point(TypedDict): class Point(TypedDict):
x: Union[float, int, None] x: float | int | None
y: Union[float, int, None] y: float | int | None
z: Union[float, int, None] z: float | int | None
lat: Union[float, int, None] lat: float | int | None
lon: Union[float, int, None] lon: float | int | None
curveNumber: Union[int, None] curveNumber: int | None
pointNumber: Union[int, None] pointNumber: int | None
pointNumbers: Union[list[int], None] pointNumbers: Union[list[int], None]
pointIndex: Union[int, None] pointIndex: int | None
markerColor: Union[ItemOrList[ItemOrList[Union[float, int, str, None]]], None] markerColor: Union[ItemOrList[ItemOrList[Union[float, int, str, None]]], None]
markerSize: Union[ItemOrList[ItemOrList[Union[float, int, None]]], None] markerSize: Union[ItemOrList[ItemOrList[Union[float, int, None]]], None]
bbox: Union[BBox, None] bbox: BBox | None
class Plotly(NoSSRComponent): class Plotly(NoSSRComponent):
def add_imports(self) -> dict[str, str]: ... def add_imports(self) -> dict[str, str]: ...
@ -53,17 +53,17 @@ class Plotly(NoSSRComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore data: Figure | Var[Figure] | None = None, # type: ignore
layout: Optional[Union[Dict, Var[Dict]]] = None, layout: Dict | Var[Dict] | None = None,
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore template: Template | Var[Template] | None = None, # type: ignore
config: Optional[Union[Dict, Var[Dict]]] = None, config: Dict | Var[Dict] | None = None,
use_resize_handler: Optional[Union[Var[bool], bool]] = None, use_resize_handler: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_after_plot: Optional[EventType[()]] = None, on_after_plot: Optional[EventType[()]] = None,
on_animated: Optional[EventType[()]] = None, on_animated: Optional[EventType[()]] = None,
on_animating_frame: Optional[EventType[()]] = None, on_animating_frame: Optional[EventType[()]] = None,
@ -72,12 +72,12 @@ class Plotly(NoSSRComponent):
on_before_hover: Optional[EventType[()]] = None, on_before_hover: Optional[EventType[()]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_button_clicked: Optional[EventType[()]] = None, on_button_clicked: Optional[EventType[()]] = None,
on_click: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_deselect: Optional[EventType[()]] = None, on_deselect: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_hover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
on_mouse_enter: Optional[EventType[()]] = None, on_mouse_enter: Optional[EventType[()]] = None,
@ -91,11 +91,11 @@ class Plotly(NoSSRComponent):
on_relayouting: Optional[EventType[()]] = None, on_relayouting: Optional[EventType[()]] = None,
on_restyle: Optional[EventType[()]] = None, on_restyle: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_selected: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
on_selecting: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
on_transition_interrupted: Optional[EventType[()]] = None, on_transition_interrupted: Optional[EventType[()]] = None,
on_transitioning: Optional[EventType[()]] = None, on_transitioning: Optional[EventType[()]] = None,
on_unhover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
) -> "Plotly": ) -> "Plotly":
@ -152,17 +152,17 @@ class PlotlyBasic(Plotly):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore data: Figure | Var[Figure] | None = None, # type: ignore
layout: Optional[Union[Dict, Var[Dict]]] = None, layout: Dict | Var[Dict] | None = None,
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore template: Template | Var[Template] | None = None, # type: ignore
config: Optional[Union[Dict, Var[Dict]]] = None, config: Dict | Var[Dict] | None = None,
use_resize_handler: Optional[Union[Var[bool], bool]] = None, use_resize_handler: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_after_plot: Optional[EventType[()]] = None, on_after_plot: Optional[EventType[()]] = None,
on_animated: Optional[EventType[()]] = None, on_animated: Optional[EventType[()]] = None,
on_animating_frame: Optional[EventType[()]] = None, on_animating_frame: Optional[EventType[()]] = None,
@ -171,12 +171,12 @@ class PlotlyBasic(Plotly):
on_before_hover: Optional[EventType[()]] = None, on_before_hover: Optional[EventType[()]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_button_clicked: Optional[EventType[()]] = None, on_button_clicked: Optional[EventType[()]] = None,
on_click: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_deselect: Optional[EventType[()]] = None, on_deselect: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_hover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
on_mouse_enter: Optional[EventType[()]] = None, on_mouse_enter: Optional[EventType[()]] = None,
@ -190,11 +190,11 @@ class PlotlyBasic(Plotly):
on_relayouting: Optional[EventType[()]] = None, on_relayouting: Optional[EventType[()]] = None,
on_restyle: Optional[EventType[()]] = None, on_restyle: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_selected: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
on_selecting: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
on_transition_interrupted: Optional[EventType[()]] = None, on_transition_interrupted: Optional[EventType[()]] = None,
on_transitioning: Optional[EventType[()]] = None, on_transitioning: Optional[EventType[()]] = None,
on_unhover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
) -> "PlotlyBasic": ) -> "PlotlyBasic":
@ -247,17 +247,17 @@ class PlotlyCartesian(Plotly):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore data: Figure | Var[Figure] | None = None, # type: ignore
layout: Optional[Union[Dict, Var[Dict]]] = None, layout: Dict | Var[Dict] | None = None,
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore template: Template | Var[Template] | None = None, # type: ignore
config: Optional[Union[Dict, Var[Dict]]] = None, config: Dict | Var[Dict] | None = None,
use_resize_handler: Optional[Union[Var[bool], bool]] = None, use_resize_handler: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_after_plot: Optional[EventType[()]] = None, on_after_plot: Optional[EventType[()]] = None,
on_animated: Optional[EventType[()]] = None, on_animated: Optional[EventType[()]] = None,
on_animating_frame: Optional[EventType[()]] = None, on_animating_frame: Optional[EventType[()]] = None,
@ -266,12 +266,12 @@ class PlotlyCartesian(Plotly):
on_before_hover: Optional[EventType[()]] = None, on_before_hover: Optional[EventType[()]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_button_clicked: Optional[EventType[()]] = None, on_button_clicked: Optional[EventType[()]] = None,
on_click: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_deselect: Optional[EventType[()]] = None, on_deselect: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_hover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
on_mouse_enter: Optional[EventType[()]] = None, on_mouse_enter: Optional[EventType[()]] = None,
@ -285,11 +285,11 @@ class PlotlyCartesian(Plotly):
on_relayouting: Optional[EventType[()]] = None, on_relayouting: Optional[EventType[()]] = None,
on_restyle: Optional[EventType[()]] = None, on_restyle: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_selected: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
on_selecting: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
on_transition_interrupted: Optional[EventType[()]] = None, on_transition_interrupted: Optional[EventType[()]] = None,
on_transitioning: Optional[EventType[()]] = None, on_transitioning: Optional[EventType[()]] = None,
on_unhover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
) -> "PlotlyCartesian": ) -> "PlotlyCartesian":
@ -342,17 +342,17 @@ class PlotlyGeo(Plotly):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore data: Figure | Var[Figure] | None = None, # type: ignore
layout: Optional[Union[Dict, Var[Dict]]] = None, layout: Dict | Var[Dict] | None = None,
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore template: Template | Var[Template] | None = None, # type: ignore
config: Optional[Union[Dict, Var[Dict]]] = None, config: Dict | Var[Dict] | None = None,
use_resize_handler: Optional[Union[Var[bool], bool]] = None, use_resize_handler: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_after_plot: Optional[EventType[()]] = None, on_after_plot: Optional[EventType[()]] = None,
on_animated: Optional[EventType[()]] = None, on_animated: Optional[EventType[()]] = None,
on_animating_frame: Optional[EventType[()]] = None, on_animating_frame: Optional[EventType[()]] = None,
@ -361,12 +361,12 @@ class PlotlyGeo(Plotly):
on_before_hover: Optional[EventType[()]] = None, on_before_hover: Optional[EventType[()]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_button_clicked: Optional[EventType[()]] = None, on_button_clicked: Optional[EventType[()]] = None,
on_click: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_deselect: Optional[EventType[()]] = None, on_deselect: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_hover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
on_mouse_enter: Optional[EventType[()]] = None, on_mouse_enter: Optional[EventType[()]] = None,
@ -380,11 +380,11 @@ class PlotlyGeo(Plotly):
on_relayouting: Optional[EventType[()]] = None, on_relayouting: Optional[EventType[()]] = None,
on_restyle: Optional[EventType[()]] = None, on_restyle: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_selected: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
on_selecting: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
on_transition_interrupted: Optional[EventType[()]] = None, on_transition_interrupted: Optional[EventType[()]] = None,
on_transitioning: Optional[EventType[()]] = None, on_transitioning: Optional[EventType[()]] = None,
on_unhover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
) -> "PlotlyGeo": ) -> "PlotlyGeo":
@ -437,17 +437,17 @@ class PlotlyGl3d(Plotly):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore data: Figure | Var[Figure] | None = None, # type: ignore
layout: Optional[Union[Dict, Var[Dict]]] = None, layout: Dict | Var[Dict] | None = None,
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore template: Template | Var[Template] | None = None, # type: ignore
config: Optional[Union[Dict, Var[Dict]]] = None, config: Dict | Var[Dict] | None = None,
use_resize_handler: Optional[Union[Var[bool], bool]] = None, use_resize_handler: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_after_plot: Optional[EventType[()]] = None, on_after_plot: Optional[EventType[()]] = None,
on_animated: Optional[EventType[()]] = None, on_animated: Optional[EventType[()]] = None,
on_animating_frame: Optional[EventType[()]] = None, on_animating_frame: Optional[EventType[()]] = None,
@ -456,12 +456,12 @@ class PlotlyGl3d(Plotly):
on_before_hover: Optional[EventType[()]] = None, on_before_hover: Optional[EventType[()]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_button_clicked: Optional[EventType[()]] = None, on_button_clicked: Optional[EventType[()]] = None,
on_click: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_deselect: Optional[EventType[()]] = None, on_deselect: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_hover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
on_mouse_enter: Optional[EventType[()]] = None, on_mouse_enter: Optional[EventType[()]] = None,
@ -475,11 +475,11 @@ class PlotlyGl3d(Plotly):
on_relayouting: Optional[EventType[()]] = None, on_relayouting: Optional[EventType[()]] = None,
on_restyle: Optional[EventType[()]] = None, on_restyle: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_selected: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
on_selecting: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
on_transition_interrupted: Optional[EventType[()]] = None, on_transition_interrupted: Optional[EventType[()]] = None,
on_transitioning: Optional[EventType[()]] = None, on_transitioning: Optional[EventType[()]] = None,
on_unhover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
) -> "PlotlyGl3d": ) -> "PlotlyGl3d":
@ -532,17 +532,17 @@ class PlotlyGl2d(Plotly):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore data: Figure | Var[Figure] | None = None, # type: ignore
layout: Optional[Union[Dict, Var[Dict]]] = None, layout: Dict | Var[Dict] | None = None,
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore template: Template | Var[Template] | None = None, # type: ignore
config: Optional[Union[Dict, Var[Dict]]] = None, config: Dict | Var[Dict] | None = None,
use_resize_handler: Optional[Union[Var[bool], bool]] = None, use_resize_handler: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_after_plot: Optional[EventType[()]] = None, on_after_plot: Optional[EventType[()]] = None,
on_animated: Optional[EventType[()]] = None, on_animated: Optional[EventType[()]] = None,
on_animating_frame: Optional[EventType[()]] = None, on_animating_frame: Optional[EventType[()]] = None,
@ -551,12 +551,12 @@ class PlotlyGl2d(Plotly):
on_before_hover: Optional[EventType[()]] = None, on_before_hover: Optional[EventType[()]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_button_clicked: Optional[EventType[()]] = None, on_button_clicked: Optional[EventType[()]] = None,
on_click: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_deselect: Optional[EventType[()]] = None, on_deselect: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_hover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
on_mouse_enter: Optional[EventType[()]] = None, on_mouse_enter: Optional[EventType[()]] = None,
@ -570,11 +570,11 @@ class PlotlyGl2d(Plotly):
on_relayouting: Optional[EventType[()]] = None, on_relayouting: Optional[EventType[()]] = None,
on_restyle: Optional[EventType[()]] = None, on_restyle: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_selected: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
on_selecting: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
on_transition_interrupted: Optional[EventType[()]] = None, on_transition_interrupted: Optional[EventType[()]] = None,
on_transitioning: Optional[EventType[()]] = None, on_transitioning: Optional[EventType[()]] = None,
on_unhover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
) -> "PlotlyGl2d": ) -> "PlotlyGl2d":
@ -627,17 +627,17 @@ class PlotlyMapbox(Plotly):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore data: Figure | Var[Figure] | None = None, # type: ignore
layout: Optional[Union[Dict, Var[Dict]]] = None, layout: Dict | Var[Dict] | None = None,
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore template: Template | Var[Template] | None = None, # type: ignore
config: Optional[Union[Dict, Var[Dict]]] = None, config: Dict | Var[Dict] | None = None,
use_resize_handler: Optional[Union[Var[bool], bool]] = None, use_resize_handler: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_after_plot: Optional[EventType[()]] = None, on_after_plot: Optional[EventType[()]] = None,
on_animated: Optional[EventType[()]] = None, on_animated: Optional[EventType[()]] = None,
on_animating_frame: Optional[EventType[()]] = None, on_animating_frame: Optional[EventType[()]] = None,
@ -646,12 +646,12 @@ class PlotlyMapbox(Plotly):
on_before_hover: Optional[EventType[()]] = None, on_before_hover: Optional[EventType[()]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_button_clicked: Optional[EventType[()]] = None, on_button_clicked: Optional[EventType[()]] = None,
on_click: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_deselect: Optional[EventType[()]] = None, on_deselect: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_hover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
on_mouse_enter: Optional[EventType[()]] = None, on_mouse_enter: Optional[EventType[()]] = None,
@ -665,11 +665,11 @@ class PlotlyMapbox(Plotly):
on_relayouting: Optional[EventType[()]] = None, on_relayouting: Optional[EventType[()]] = None,
on_restyle: Optional[EventType[()]] = None, on_restyle: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_selected: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
on_selecting: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
on_transition_interrupted: Optional[EventType[()]] = None, on_transition_interrupted: Optional[EventType[()]] = None,
on_transitioning: Optional[EventType[()]] = None, on_transitioning: Optional[EventType[()]] = None,
on_unhover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
) -> "PlotlyMapbox": ) -> "PlotlyMapbox":
@ -722,17 +722,17 @@ class PlotlyFinance(Plotly):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore data: Figure | Var[Figure] | None = None, # type: ignore
layout: Optional[Union[Dict, Var[Dict]]] = None, layout: Dict | Var[Dict] | None = None,
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore template: Template | Var[Template] | None = None, # type: ignore
config: Optional[Union[Dict, Var[Dict]]] = None, config: Dict | Var[Dict] | None = None,
use_resize_handler: Optional[Union[Var[bool], bool]] = None, use_resize_handler: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_after_plot: Optional[EventType[()]] = None, on_after_plot: Optional[EventType[()]] = None,
on_animated: Optional[EventType[()]] = None, on_animated: Optional[EventType[()]] = None,
on_animating_frame: Optional[EventType[()]] = None, on_animating_frame: Optional[EventType[()]] = None,
@ -741,12 +741,12 @@ class PlotlyFinance(Plotly):
on_before_hover: Optional[EventType[()]] = None, on_before_hover: Optional[EventType[()]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_button_clicked: Optional[EventType[()]] = None, on_button_clicked: Optional[EventType[()]] = None,
on_click: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_deselect: Optional[EventType[()]] = None, on_deselect: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_hover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
on_mouse_enter: Optional[EventType[()]] = None, on_mouse_enter: Optional[EventType[()]] = None,
@ -760,11 +760,11 @@ class PlotlyFinance(Plotly):
on_relayouting: Optional[EventType[()]] = None, on_relayouting: Optional[EventType[()]] = None,
on_restyle: Optional[EventType[()]] = None, on_restyle: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_selected: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
on_selecting: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
on_transition_interrupted: Optional[EventType[()]] = None, on_transition_interrupted: Optional[EventType[()]] = None,
on_transitioning: Optional[EventType[()]] = None, on_transitioning: Optional[EventType[()]] = None,
on_unhover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
) -> "PlotlyFinance": ) -> "PlotlyFinance":
@ -817,17 +817,17 @@ class PlotlyStrict(Plotly):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore data: Figure | Var[Figure] | None = None, # type: ignore
layout: Optional[Union[Dict, Var[Dict]]] = None, layout: Dict | Var[Dict] | None = None,
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore template: Template | Var[Template] | None = None, # type: ignore
config: Optional[Union[Dict, Var[Dict]]] = None, config: Dict | Var[Dict] | None = None,
use_resize_handler: Optional[Union[Var[bool], bool]] = None, use_resize_handler: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_after_plot: Optional[EventType[()]] = None, on_after_plot: Optional[EventType[()]] = None,
on_animated: Optional[EventType[()]] = None, on_animated: Optional[EventType[()]] = None,
on_animating_frame: Optional[EventType[()]] = None, on_animating_frame: Optional[EventType[()]] = None,
@ -836,12 +836,12 @@ class PlotlyStrict(Plotly):
on_before_hover: Optional[EventType[()]] = None, on_before_hover: Optional[EventType[()]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_button_clicked: Optional[EventType[()]] = None, on_button_clicked: Optional[EventType[()]] = None,
on_click: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_deselect: Optional[EventType[()]] = None, on_deselect: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
on_focus: Optional[EventType[()]] = None, on_focus: Optional[EventType[()]] = None,
on_hover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_mount: Optional[EventType[()]] = None, on_mount: Optional[EventType[()]] = None,
on_mouse_down: Optional[EventType[()]] = None, on_mouse_down: Optional[EventType[()]] = None,
on_mouse_enter: Optional[EventType[()]] = None, on_mouse_enter: Optional[EventType[()]] = None,
@ -855,11 +855,11 @@ class PlotlyStrict(Plotly):
on_relayouting: Optional[EventType[()]] = None, on_relayouting: Optional[EventType[()]] = None,
on_restyle: Optional[EventType[()]] = None, on_restyle: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_selected: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
on_selecting: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
on_transition_interrupted: Optional[EventType[()]] = None, on_transition_interrupted: Optional[EventType[()]] = None,
on_transitioning: Optional[EventType[()]] = None, on_transitioning: Optional[EventType[()]] = None,
on_unhover: Optional[Union[EventType[()], EventType[list[Point]]]] = None, on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
) -> "PlotlyStrict": ) -> "PlotlyStrict":

View File

@ -196,10 +196,10 @@ class AccordionItem(AccordionComponent):
disabled: Var[bool] disabled: Var[bool]
# The header of the accordion item. # The header of the accordion item.
header: Var[Union[Component, str]] header: Var[Component | str]
# The content of the accordion item. # The content of the accordion item.
content: Var[Union[Component, str, None]] = Var.create(None) content: Var[Component | str | None] = Var.create(None)
_valid_children: list[str] = [ _valid_children: list[str] = [
"AccordionHeader", "AccordionHeader",

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import Component, ComponentNamespace from reflex.components.component import Component, ComponentNamespace
from reflex.components.lucide.icon import Icon from reflex.components.lucide.icon import Icon
@ -26,9 +26,7 @@ class AccordionComponent(RadixPrimitiveComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
color_scheme: Optional[ color_scheme: Literal[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -55,8 +53,8 @@ class AccordionComponent(RadixPrimitiveComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -85,22 +83,18 @@ class AccordionComponent(RadixPrimitiveComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
variant: Optional[ variant: Literal["classic", "ghost", "outline", "soft", "surface"]
Union[ | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
Literal["classic", "ghost", "outline", "soft", "surface"], | None = None,
Var[Literal["classic", "ghost", "outline", "soft", "surface"]], as_child: Var[bool] | bool | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -147,34 +141,24 @@ class AccordionRoot(AccordionComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
type: Optional[ type: Literal["multiple", "single"]
Union[Literal["multiple", "single"], Var[Literal["multiple", "single"]]] | Var[Literal["multiple", "single"]]
] = None, | None = None,
value: Optional[Union[Var[Union[list[str], str]], list[str], str]] = None, value: Var[list[str] | str] | list[str] | str | None = None,
default_value: Optional[ default_value: Var[list[str] | str] | list[str] | str | None = None,
Union[Var[Union[list[str], str]], list[str], str] collapsible: Var[bool] | bool | None = None,
] = None, disabled: Var[bool] | bool | None = None,
collapsible: Optional[Union[Var[bool], bool]] = None, dir: Literal["ltr", "rtl"] | Var[Literal["ltr", "rtl"]] | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, orientation: Literal["horizontal", "vertical"]
dir: Optional[Union[Literal["ltr", "rtl"], Var[Literal["ltr", "rtl"]]]] = None, | Var[Literal["horizontal", "vertical"]]
orientation: Optional[ | None = None,
Union[ radius: Literal["full", "large", "medium", "none", "small"]
Literal["horizontal", "vertical"], | Var[Literal["full", "large", "medium", "none", "small"]]
Var[Literal["horizontal", "vertical"]], | None = None,
] duration: Var[int] | int | None = None,
] = None, easing: Var[str] | str | None = None,
radius: Optional[ show_dividers: Var[bool] | bool | None = None,
Union[ color_scheme: Literal[
Literal["full", "large", "medium", "none", "small"],
Var[Literal["full", "large", "medium", "none", "small"]],
]
] = None,
duration: Optional[Union[Var[int], int]] = None,
easing: Optional[Union[Var[str], str]] = None,
show_dividers: Optional[Union[Var[bool], bool]] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -201,8 +185,8 @@ class AccordionRoot(AccordionComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -231,22 +215,18 @@ class AccordionRoot(AccordionComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
variant: Optional[ variant: Literal["classic", "ghost", "outline", "soft", "surface"]
Union[ | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
Literal["classic", "ghost", "outline", "soft", "surface"], | None = None,
Var[Literal["classic", "ghost", "outline", "soft", "surface"]], as_child: Var[bool] | bool | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -262,9 +242,7 @@ class AccordionRoot(AccordionComponent):
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
on_value_change: Optional[ on_value_change: Optional[EventType[()] | EventType[str | list[str]]] = None,
Union[EventType[()], EventType[str | list[str]]]
] = None,
**props, **props,
) -> "AccordionRoot": ) -> "AccordionRoot":
"""Create the component. """Create the component.
@ -305,15 +283,11 @@ class AccordionItem(AccordionComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
value: Optional[Union[Var[str], str]] = None, value: Var[str] | str | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
header: Optional[Union[Component, Var[Union[Component, str]], str]] = None, header: Component | Var[Component | str] | str | None = None,
content: Optional[ content: Component | Var[Component | str | None] | str | None = None,
Union[Component, Var[Optional[Union[Component, str]]], str] color_scheme: Literal[
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -340,8 +314,8 @@ class AccordionItem(AccordionComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -370,22 +344,18 @@ class AccordionItem(AccordionComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
variant: Optional[ variant: Literal["classic", "ghost", "outline", "soft", "surface"]
Union[ | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
Literal["classic", "ghost", "outline", "soft", "surface"], | None = None,
Var[Literal["classic", "ghost", "outline", "soft", "surface"]], as_child: Var[bool] | bool | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -435,9 +405,7 @@ class AccordionHeader(AccordionComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
color_scheme: Optional[ color_scheme: Literal[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -464,8 +432,8 @@ class AccordionHeader(AccordionComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -494,22 +462,18 @@ class AccordionHeader(AccordionComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
variant: Optional[ variant: Literal["classic", "ghost", "outline", "soft", "surface"]
Union[ | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
Literal["classic", "ghost", "outline", "soft", "surface"], | None = None,
Var[Literal["classic", "ghost", "outline", "soft", "surface"]], as_child: Var[bool] | bool | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -555,9 +519,7 @@ class AccordionTrigger(AccordionComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
color_scheme: Optional[ color_scheme: Literal[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -584,8 +546,8 @@ class AccordionTrigger(AccordionComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -614,22 +576,18 @@ class AccordionTrigger(AccordionComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
variant: Optional[ variant: Literal["classic", "ghost", "outline", "soft", "surface"]
Union[ | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
Literal["classic", "ghost", "outline", "soft", "surface"], | None = None,
Var[Literal["classic", "ghost", "outline", "soft", "surface"]], as_child: Var[bool] | bool | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -675,13 +633,13 @@ class AccordionIcon(Icon):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
size: Optional[Union[Var[int], int]] = None, size: Var[int] | int | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -724,9 +682,7 @@ class AccordionContent(AccordionComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
color_scheme: Optional[ color_scheme: Literal[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -753,8 +709,8 @@ class AccordionContent(AccordionComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -783,22 +739,18 @@ class AccordionContent(AccordionComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
variant: Optional[ variant: Literal["classic", "ghost", "outline", "soft", "surface"]
Union[ | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
Literal["classic", "ghost", "outline", "soft", "surface"], | None = None,
Var[Literal["classic", "ghost", "outline", "soft", "surface"]], as_child: Var[bool] | bool | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.components.component import Component from reflex.components.component import Component
from reflex.event import EventType from reflex.event import EventType
@ -16,13 +16,13 @@ class RadixPrimitiveComponent(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -64,13 +64,13 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -4,7 +4,7 @@
# Style based on https://ui.shadcn.com/docs/components/drawer # Style based on https://ui.shadcn.com/docs/components/drawer
from __future__ import annotations from __future__ import annotations
from typing import Any, Literal, Optional, Union from typing import Any, Literal, Optional
from reflex.components.component import Component, ComponentNamespace from reflex.components.component import Component, ComponentNamespace
from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.components.radix.primitives.base import RadixPrimitiveComponent
@ -58,7 +58,7 @@ class DrawerRoot(DrawerComponent):
handle_only: Var[bool] handle_only: Var[bool]
# Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account. # Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account.
snap_points: Optional[list[Union[str, float]]] snap_points: Optional[list[str | float]]
# Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point. # Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point.
fade_from_index: Var[int] fade_from_index: Var[int]

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, 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
@ -17,13 +17,13 @@ class DrawerComponent(RadixPrimitiveComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -67,31 +67,28 @@ class DrawerRoot(DrawerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
modal: Optional[Union[Var[bool], bool]] = None, modal: Var[bool] | bool | None = None,
direction: Optional[ direction: Literal["bottom", "left", "right", "top"]
Union[ | Var[Literal["bottom", "left", "right", "top"]]
Literal["bottom", "left", "right", "top"], | None = None,
Var[Literal["bottom", "left", "right", "top"]], dismissible: Var[bool] | bool | None = None,
] handle_only: Var[bool] | bool | None = None,
] = None, snap_points: Optional[list[float | str]] = None,
dismissible: Optional[Union[Var[bool], bool]] = None, fade_from_index: Var[int] | int | None = None,
handle_only: Optional[Union[Var[bool], bool]] = None, scroll_lock_timeout: Var[int] | int | None = None,
snap_points: Optional[list[Union[float, str]]] = None, prevent_scroll_restoration: Var[bool] | bool | None = None,
fade_from_index: Optional[Union[Var[int], int]] = None, should_scale_background: Var[bool] | bool | None = None,
scroll_lock_timeout: Optional[Union[Var[int], int]] = None, close_threshold: Var[float] | float | None = None,
prevent_scroll_restoration: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
should_scale_background: Optional[Union[Var[bool], bool]] = None, style: Style | None = None,
close_threshold: Optional[Union[Var[float], float]] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None, on_animation_end: Optional[EventType[()] | EventType[bool]] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_animation_end: Optional[Union[EventType[()], EventType[bool]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -105,7 +102,7 @@ class DrawerRoot(DrawerComponent):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
@ -148,13 +145,13 @@ class DrawerTrigger(DrawerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -196,13 +193,13 @@ class DrawerPortal(DrawerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -244,13 +241,13 @@ class DrawerContent(DrawerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_close_auto_focus: Optional[EventType[()]] = None, on_close_auto_focus: Optional[EventType[()]] = None,
@ -301,13 +298,13 @@ class DrawerOverlay(DrawerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -349,13 +346,13 @@ class DrawerClose(DrawerTrigger):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -397,13 +394,13 @@ class DrawerTitle(DrawerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -445,13 +442,13 @@ class DrawerDescription(DrawerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -493,13 +490,13 @@ class DrawerHandle(DrawerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -549,31 +546,28 @@ class Drawer(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
modal: Optional[Union[Var[bool], bool]] = None, modal: Var[bool] | bool | None = None,
direction: Optional[ direction: Literal["bottom", "left", "right", "top"]
Union[ | Var[Literal["bottom", "left", "right", "top"]]
Literal["bottom", "left", "right", "top"], | None = None,
Var[Literal["bottom", "left", "right", "top"]], dismissible: Var[bool] | bool | None = None,
] handle_only: Var[bool] | bool | None = None,
] = None, snap_points: Optional[list[float | str]] = None,
dismissible: Optional[Union[Var[bool], bool]] = None, fade_from_index: Var[int] | int | None = None,
handle_only: Optional[Union[Var[bool], bool]] = None, scroll_lock_timeout: Var[int] | int | None = None,
snap_points: Optional[list[Union[float, str]]] = None, prevent_scroll_restoration: Var[bool] | bool | None = None,
fade_from_index: Optional[Union[Var[int], int]] = None, should_scale_background: Var[bool] | bool | None = None,
scroll_lock_timeout: Optional[Union[Var[int], int]] = None, close_threshold: Var[float] | float | None = None,
prevent_scroll_restoration: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
should_scale_background: Optional[Union[Var[bool], bool]] = None, style: Style | None = None,
close_threshold: Optional[Union[Var[float], float]] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None, on_animation_end: Optional[EventType[()] | EventType[bool]] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_animation_end: Optional[Union[EventType[()], EventType[bool]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -587,7 +581,7 @@ class Drawer(ComponentNamespace):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,

View File

@ -19,13 +19,13 @@ class FormComponent(RadixPrimitiveComponentWithClassName):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -68,74 +68,48 @@ class FormRoot(FormComponent, HTMLForm):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
accept: Optional[Union[Var[str], str]] = None, accept: Var[str] | str | None = None,
accept_charset: Optional[Union[Var[str], str]] = None, accept_charset: Var[str] | str | None = None,
action: Optional[Union[Var[str], str]] = None, action: Var[str] | str | None = None,
auto_complete: Optional[Union[Var[str], str]] = None, auto_complete: Var[str] | str | None = None,
enc_type: Optional[Union[Var[str], str]] = None, enc_type: Var[str] | str | None = None,
method: Optional[Union[Var[str], str]] = None, method: Var[str] | str | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
no_validate: Optional[Union[Var[bool], bool]] = None, no_validate: Var[bool] | bool | None = None,
target: Optional[Union[Var[str], str]] = None, target: Var[str] | str | None = None,
reset_on_submit: Optional[Union[Var[bool], bool]] = None, reset_on_submit: Var[bool] | bool | None = None,
handle_submit_unique_name: Optional[Union[Var[str], str]] = None, handle_submit_unique_name: Var[str] | str | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -205,8 +179,8 @@ class FormRoot(FormComponent, HTMLForm):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -278,19 +252,18 @@ class FormRoot(FormComponent, HTMLForm):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_clear_server_errors: Optional[EventType[()]] = None, on_clear_server_errors: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
@ -308,8 +281,8 @@ class FormRoot(FormComponent, HTMLForm):
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_submit: Optional[ on_submit: Optional[
Union[ Union[
Union[EventType[()], EventType[dict[str, Any]]], EventType[()] | EventType[dict[str, Any]],
Union[EventType[()], EventType[dict[str, str]]], EventType[()] | EventType[dict[str, str]],
] ]
] = None, ] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
@ -369,15 +342,15 @@ class FormField(FormComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
server_invalid: Optional[Union[Var[bool], bool]] = None, server_invalid: Var[bool] | bool | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -422,13 +395,13 @@ class FormLabel(FormComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -470,13 +443,13 @@ class FormControl(FormComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -536,10 +509,8 @@ class FormMessage(FormComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
match: Optional[ match: Literal[
Union[
Literal[
"badInput", "badInput",
"patternMismatch", "patternMismatch",
"rangeOverflow", "rangeOverflow",
@ -550,8 +521,8 @@ class FormMessage(FormComponent):
"typeMismatch", "typeMismatch",
"valid", "valid",
"valueMissing", "valueMissing",
], ]
Var[ | Var[
Literal[ Literal[
"badInput", "badInput",
"patternMismatch", "patternMismatch",
@ -564,17 +535,16 @@ class FormMessage(FormComponent):
"valid", "valid",
"valueMissing", "valueMissing",
] ]
],
] ]
] = None, | None = None,
force_match: Optional[Union[Var[bool], bool]] = None, force_match: Var[bool] | bool | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -619,13 +589,13 @@ class FormValidityState(FormComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -667,13 +637,13 @@ class FormSubmit(FormComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -717,74 +687,48 @@ class Form(FormRoot):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
accept: Optional[Union[Var[str], str]] = None, accept: Var[str] | str | None = None,
accept_charset: Optional[Union[Var[str], str]] = None, accept_charset: Var[str] | str | None = None,
action: Optional[Union[Var[str], str]] = None, action: Var[str] | str | None = None,
auto_complete: Optional[Union[Var[str], str]] = None, auto_complete: Var[str] | str | None = None,
enc_type: Optional[Union[Var[str], str]] = None, enc_type: Var[str] | str | None = None,
method: Optional[Union[Var[str], str]] = None, method: Var[str] | str | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
no_validate: Optional[Union[Var[bool], bool]] = None, no_validate: Var[bool] | bool | None = None,
target: Optional[Union[Var[str], str]] = None, target: Var[str] | str | None = None,
reset_on_submit: Optional[Union[Var[bool], bool]] = None, reset_on_submit: Var[bool] | bool | None = None,
handle_submit_unique_name: Optional[Union[Var[str], str]] = None, handle_submit_unique_name: Var[str] | str | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -854,8 +798,8 @@ class Form(FormRoot):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -927,19 +871,18 @@ class Form(FormRoot):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_clear_server_errors: Optional[EventType[()]] = None, on_clear_server_errors: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
@ -957,8 +900,8 @@ class Form(FormRoot):
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_submit: Optional[ on_submit: Optional[
Union[ Union[
Union[EventType[()], EventType[dict[str, Any]]], EventType[()] | EventType[dict[str, Any]],
Union[EventType[()], EventType[dict[str, str]]], EventType[()] | EventType[dict[str, str]],
] ]
] = None, ] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
@ -1023,74 +966,48 @@ class FormNamespace(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
accept: Optional[Union[Var[str], str]] = None, accept: Var[str] | str | None = None,
accept_charset: Optional[Union[Var[str], str]] = None, accept_charset: Var[str] | str | None = None,
action: Optional[Union[Var[str], str]] = None, action: Var[str] | str | None = None,
auto_complete: Optional[Union[Var[str], str]] = None, auto_complete: Var[str] | str | None = None,
enc_type: Optional[Union[Var[str], str]] = None, enc_type: Var[str] | str | None = None,
method: Optional[Union[Var[str], str]] = None, method: Var[str] | str | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
no_validate: Optional[Union[Var[bool], bool]] = None, no_validate: Var[bool] | bool | None = None,
target: Optional[Union[Var[str], str]] = None, target: Var[str] | str | None = None,
reset_on_submit: Optional[Union[Var[bool], bool]] = None, reset_on_submit: Var[bool] | bool | None = None,
handle_submit_unique_name: Optional[Union[Var[str], str]] = None, handle_submit_unique_name: Var[str] | str | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -1160,8 +1077,8 @@ class FormNamespace(ComponentNamespace):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -1233,19 +1150,18 @@ class FormNamespace(ComponentNamespace):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_clear_server_errors: Optional[EventType[()]] = None, on_clear_server_errors: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
@ -1263,8 +1179,8 @@ class FormNamespace(ComponentNamespace):
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_submit: Optional[ on_submit: Optional[
Union[ Union[
Union[EventType[()], EventType[dict[str, Any]]], EventType[()] | EventType[dict[str, Any]],
Union[EventType[()], EventType[dict[str, str]]], EventType[()] | EventType[dict[str, str]],
] ]
] = None, ] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,

View File

@ -2,7 +2,7 @@
from __future__ import annotations from __future__ import annotations
from typing import Any, Optional from typing import Any
from reflex.components.component import Component, ComponentNamespace from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.colors import color from reflex.components.core.colors import color
@ -58,10 +58,10 @@ class ProgressIndicator(ProgressComponent):
alias = "RadixProgressIndicator" alias = "RadixProgressIndicator"
# The current progress value. # The current progress value.
value: Var[Optional[int]] value: Var[int | None]
# The maximum progress value. # The maximum progress value.
max: Var[Optional[int]] max: Var[int | None]
# The color scheme of the progress indicator. # The color scheme of the progress indicator.
color_scheme: Var[LiteralAccentColor] color_scheme: Var[LiteralAccentColor]
@ -98,10 +98,10 @@ class Progress(ProgressRoot):
color_scheme: Var[LiteralAccentColor] color_scheme: Var[LiteralAccentColor]
# The current progress value. # The current progress value.
value: Var[Optional[int]] value: Var[int | None]
# The maximum progress value. # The maximum progress value.
max: Var[Optional[int]] max: Var[int | None]
@classmethod @classmethod
def create(cls, **props) -> Component: def create(cls, **props) -> Component:

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, 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
@ -17,13 +17,13 @@ class ProgressComponent(RadixPrimitiveComponentWithClassName):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -66,19 +66,16 @@ class ProgressRoot(ProgressComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
radius: Optional[ radius: Literal["full", "large", "medium", "none", "small"]
Union[ | Var[Literal["full", "large", "medium", "none", "small"]]
Literal["full", "large", "medium", "none", "small"], | None = None,
Var[Literal["full", "large", "medium", "none", "small"]], as_child: Var[bool] | bool | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -122,11 +119,9 @@ class ProgressIndicator(ProgressComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
value: Optional[Union[Var[Optional[int]], int]] = None, value: Var[Optional[int]] | int | None = None,
max: Optional[Union[Var[Optional[int]], int]] = None, max: Var[Optional[int]] | int | None = None,
color_scheme: Optional[ color_scheme: Literal[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -153,8 +148,8 @@ class ProgressIndicator(ProgressComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -183,16 +178,15 @@ class ProgressIndicator(ProgressComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -237,9 +231,7 @@ class Progress(ProgressRoot):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
color_scheme: Optional[ color_scheme: Literal[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -266,8 +258,8 @@ class Progress(ProgressRoot):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -296,24 +288,20 @@ class Progress(ProgressRoot):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
value: Optional[Union[Var[Optional[int]], int]] = None, value: Var[Optional[int]] | int | None = None,
max: Optional[Union[Var[Optional[int]], int]] = None, max: Var[Optional[int]] | int | None = None,
radius: Optional[ radius: Literal["full", "large", "medium", "none", "small"]
Union[ | Var[Literal["full", "large", "medium", "none", "small"]]
Literal["full", "large", "medium", "none", "small"], | None = None,
Var[Literal["full", "large", "medium", "none", "small"]], as_child: Var[bool] | bool | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -359,9 +347,7 @@ class ProgressNamespace(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
color_scheme: Optional[ color_scheme: Literal[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -388,8 +374,8 @@ class ProgressNamespace(ComponentNamespace):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -418,24 +404,20 @@ class ProgressNamespace(ComponentNamespace):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
value: Optional[Union[Var[Optional[int]], int]] = None, value: Var[Optional[int]] | int | None = None,
max: Optional[Union[Var[Optional[int]], int]] = None, max: Var[Optional[int]] | int | None = None,
radius: Optional[ radius: Literal["full", "large", "medium", "none", "small"]
Union[ | Var[Literal["full", "large", "medium", "none", "small"]]
Literal["full", "large", "medium", "none", "small"], | None = None,
Var[Literal["full", "large", "medium", "none", "small"]], as_child: Var[bool] | bool | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, 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
@ -20,13 +20,13 @@ class SliderComponent(RadixPrimitiveComponentWithClassName):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -71,29 +71,26 @@ 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: Var[list[int]] | list[int] | None = None,
value: Optional[Union[Var[list[int]], list[int]]] = None, value: Var[list[int]] | list[int] | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
orientation: Optional[ orientation: Literal["horizontal", "vertical"]
Union[ | Var[Literal["horizontal", "vertical"]]
Literal["horizontal", "vertical"], | None = None,
Var[Literal["horizontal", "vertical"]], dir: Literal["ltr", "rtl"] | Var[Literal["ltr", "rtl"]] | None = None,
] inverted: Var[bool] | bool | None = None,
] = None, min: Var[int] | int | None = None,
dir: Optional[Union[Literal["ltr", "rtl"], Var[Literal["ltr", "rtl"]]]] = None, max: Var[int] | int | None = None,
inverted: Optional[Union[Var[bool], bool]] = None, step: Var[int] | int | None = None,
min: Optional[Union[Var[int], int]] = None, min_steps_between_thumbs: Var[int] | int | None = None,
max: Optional[Union[Var[int], int]] = None, as_child: Var[bool] | bool | None = None,
step: Optional[Union[Var[int], int]] = None, style: Style | None = None,
min_steps_between_thumbs: Optional[Union[Var[int], int]] = None, key: Any | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -109,8 +106,8 @@ class SliderRoot(SliderComponent):
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
on_value_change: Optional[Union[EventType[()], EventType[list[int]]]] = None, on_value_change: Optional[EventType[()] | EventType[list[int]]] = None,
on_value_commit: Optional[Union[EventType[()], EventType[list[int]]]] = None, on_value_commit: Optional[EventType[()] | EventType[list[int]]] = None,
**props, **props,
) -> "SliderRoot": ) -> "SliderRoot":
"""Create the component. """Create the component.
@ -140,13 +137,13 @@ class SliderTrack(SliderComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -189,13 +186,13 @@ class SliderRange(SliderComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -238,13 +235,13 @@ class SliderThumb(SliderComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components import Component from reflex.components import Component
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
@ -56,54 +56,33 @@ class CommonMarginProps(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
m: Optional[ m: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Union[ | Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], | None = None,
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], mx: 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 = None,
mx: Optional[ my: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Union[ | Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], | None = None,
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], mt: 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 = None,
my: Optional[ mr: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Union[ | Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], | None = None,
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], mb: 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 = None,
mt: Optional[ ml: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Union[ | Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], | None = None,
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], style: Style | None = None,
] key: Any | None = None,
] = None, id: Any | None = None,
mr: Optional[ class_name: Any | None = None,
Union[ autofocus: bool | None = None,
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], custom_attrs: dict[str, Var | Any] | None = None,
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
]
] = None,
mb: Optional[
Union[
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
]
] = None,
ml: Optional[
Union[
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
]
] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -151,131 +130,61 @@ class CommonPaddingProps(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
p: Optional[ p: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Union[ | Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Breakpoints[ | Var[
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] Breakpoints[str, 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[
Union[
Breakpoints[
str,
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
] ]
], | None = None,
px: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
| Var[
Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
] ]
] = None, | None = None,
px: Optional[ py: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Union[ | Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Breakpoints[ | Var[
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] Breakpoints[str, 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[
Union[
Breakpoints[
str,
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
] ]
], | None = None,
pt: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
| Var[
Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
] ]
] = None, | None = None,
py: Optional[ pr: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Union[ | Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Breakpoints[ | Var[
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] Breakpoints[str, 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[
Union[
Breakpoints[
str,
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
] ]
], | None = None,
pb: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
| Var[
Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
] ]
] = None, | None = None,
pt: Optional[ pl: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Union[ | Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Breakpoints[ | Var[
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] Breakpoints[str, 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[
Union[
Breakpoints[
str,
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
] ]
], | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
pr: Optional[ id: Any | None = None,
Union[ class_name: Any | None = None,
Breakpoints[ autofocus: bool | None = None,
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] custom_attrs: dict[str, Var | Any] | None = None,
],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
Var[
Union[
Breakpoints[
str,
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
],
]
] = None,
pb: Optional[
Union[
Breakpoints[
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
Var[
Union[
Breakpoints[
str,
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
],
]
] = None,
pl: Optional[
Union[
Breakpoints[
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
Var[
Union[
Breakpoints[
str,
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
],
]
] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -323,13 +232,13 @@ class RadixLoadingProp(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
loading: Optional[Union[Var[bool], bool]] = None, loading: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -371,12 +280,12 @@ class RadixThemesComponent(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -420,12 +329,12 @@ class RadixThemesTriggerComponent(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -461,17 +370,12 @@ class Theme(RadixThemesComponent):
cls, cls,
*children, *children,
color_mode: Optional[Literal["dark", "inherit", "light"]] = None, color_mode: Optional[Literal["dark", "inherit", "light"]] = None,
theme_panel: Optional[bool] = False, theme_panel: bool | None = False,
has_background: Optional[Union[Var[bool], bool]] = None, has_background: Var[bool] | bool | None = None,
appearance: Optional[ appearance: Literal["dark", "inherit", "light"]
Union[ | Var[Literal["dark", "inherit", "light"]]
Literal["dark", "inherit", "light"], | None = None,
Var[Literal["dark", "inherit", "light"]], accent_color: Literal[
]
] = None,
accent_color: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -498,8 +402,8 @@ class Theme(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -528,36 +432,26 @@ class Theme(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
gray_color: Optional[ gray_color: Literal["auto", "gray", "mauve", "olive", "sage", "sand", "slate"]
Union[ | Var[Literal["auto", "gray", "mauve", "olive", "sage", "sand", "slate"]]
Literal["auto", "gray", "mauve", "olive", "sage", "sand", "slate"], | None = None,
Var[Literal["auto", "gray", "mauve", "olive", "sage", "sand", "slate"]], panel_background: Literal["solid", "translucent"]
] | Var[Literal["solid", "translucent"]]
] = None, | None = None,
panel_background: Optional[ radius: Literal["full", "large", "medium", "none", "small"]
Union[Literal["solid", "translucent"], Var[Literal["solid", "translucent"]]] | Var[Literal["full", "large", "medium", "none", "small"]]
] = None, | None = None,
radius: Optional[ scaling: Literal["100%", "105%", "110%", "90%", "95%"]
Union[ | Var[Literal["100%", "105%", "110%", "90%", "95%"]]
Literal["full", "large", "medium", "none", "small"], | None = None,
Var[Literal["full", "large", "medium", "none", "small"]], style: Style | None = None,
] key: Any | None = None,
] = None, id: Any | None = None,
scaling: Optional[ class_name: Any | None = None,
Union[ autofocus: bool | None = None,
Literal["100%", "105%", "110%", "90%", "95%"], custom_attrs: dict[str, Var | Any] | None = None,
Var[Literal["100%", "105%", "110%", "90%", "95%"]],
]
] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -610,13 +504,13 @@ class ThemePanel(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -661,12 +555,12 @@ class RadixThemesColorModeProvider(Component):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import BaseComponent from reflex.components.component import BaseComponent
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
@ -25,15 +25,15 @@ class ColorModeIcon(Cond):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
cond: Optional[Union[Any, Var[Any]]] = None, cond: Any | Var[Any] | None = None,
comp1: Optional[BaseComponent] = None, comp1: Optional[BaseComponent] = None,
comp2: Optional[BaseComponent] = None, comp2: Optional[BaseComponent] = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -72,40 +72,22 @@ class ColorModeIconButton(IconButton):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
position: Optional[ position: Literal["bottom-left", "bottom-right", "top-left", "top-right"]
Union[ | Literal["bottom-left", "bottom-right", "top-left", "top-right"]
Literal["bottom-left", "bottom-right", "top-left", "top-right"], | Var[Literal["bottom-left", "bottom-right", "top-left", "top-right"]]
Union[ | None = None,
Literal["bottom-left", "bottom-right", "top-left", "top-right"], allow_system: bool | None = None,
Var[ as_child: Var[bool] | bool | None = None,
Literal["bottom-left", "bottom-right", "top-left", "top-right"] size: Breakpoints[str, Literal["1", "2", "3", "4"]]
], | Literal["1", "2", "3", "4"]
], | Var[
Breakpoints[str, Literal["1", "2", "3", "4"]] | Literal["1", "2", "3", "4"]
] ]
] = None, | None = None,
allow_system: Optional[bool] = None, variant: Literal["classic", "ghost", "outline", "soft", "solid", "surface"]
as_child: Optional[Union[Var[bool], bool]] = None, | Var[Literal["classic", "ghost", "outline", "soft", "solid", "surface"]]
size: Optional[ | None = None,
Union[ color_scheme: Literal[
Breakpoints[str, Literal["1", "2", "3", "4"]],
Literal["1", "2", "3", "4"],
Var[
Union[
Breakpoints[str, Literal["1", "2", "3", "4"]],
Literal["1", "2", "3", "4"],
]
],
]
] = None,
variant: Optional[
Union[
Literal["classic", "ghost", "outline", "soft", "solid", "surface"],
Var[Literal["classic", "ghost", "outline", "soft", "solid", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -132,8 +114,8 @@ class ColorModeIconButton(IconButton):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -162,88 +144,55 @@ class ColorModeIconButton(IconButton):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
radius: Optional[ radius: Literal["full", "large", "medium", "none", "small"]
Union[ | Var[Literal["full", "large", "medium", "none", "small"]]
Literal["full", "large", "medium", "none", "small"], | None = None,
Var[Literal["full", "large", "medium", "none", "small"]], auto_focus: Var[bool] | bool | None = None,
disabled: Var[bool] | bool | None = None,
form: Var[str] | str | None = None,
form_action: Var[str] | str | None = None,
form_enc_type: Var[str] | str | None = None,
form_method: Var[str] | str | None = None,
form_no_validate: Var[bool] | bool | None = None,
form_target: Var[str] | str | None = None,
name: Var[str] | str | None = None,
type: Literal["button", "reset", "submit"]
| Var[Literal["button", "reset", "submit"]]
| None = None,
value: Var[float | int | str] | float | int | str | None = None,
access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
auto_focus: Optional[Union[Var[bool], bool]] = None, | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, content_editable: Literal["inherit", "plaintext-only", False, True]
form: Optional[Union[Var[str], str]] = None, | Var[Literal["inherit", "plaintext-only", False, True]]
form_action: Optional[Union[Var[str], str]] = None, | None = None,
form_enc_type: Optional[Union[Var[str], str]] = None, context_menu: Var[str] | str | None = None,
form_method: Optional[Union[Var[str], str]] = None, dir: Var[str] | str | None = None,
form_no_validate: Optional[Union[Var[bool], bool]] = None, draggable: Var[bool] | bool | None = None,
form_target: Optional[Union[Var[str], str]] = None, enter_key_hint: Literal[
name: Optional[Union[Var[str], str]] = None, "done", "enter", "go", "next", "previous", "search", "send"
type: Optional[
Union[
Literal["button", "reset", "submit"],
Var[Literal["button", "reset", "submit"]],
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, | None = None,
access_key: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
auto_capitalize: Optional[ input_mode: Literal[
Union[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[
content_editable: Optional[
Union[
Literal["inherit", "plaintext-only", False, True],
Var[Literal["inherit", "plaintext-only", False, True]],
]
] = None,
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -313,8 +262,8 @@ class ColorModeIconButton(IconButton):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -386,20 +335,19 @@ class ColorModeIconButton(IconButton):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
loading: Optional[Union[Var[bool], bool]] = None, loading: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -475,33 +423,21 @@ class ColorModeSwitch(Switch):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
default_checked: Optional[Union[Var[bool], bool]] = None, default_checked: Var[bool] | bool | None = None,
checked: Optional[Union[Var[bool], bool]] = None, checked: Var[bool] | bool | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
required: Optional[Union[Var[bool], bool]] = None, required: Var[bool] | bool | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
value: Optional[Union[Var[str], str]] = None, value: Var[str] | str | None = None,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3"]]
Union[ | Literal["1", "2", "3"]
Breakpoints[str, Literal["1", "2", "3"]], | Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
Literal["1", "2", "3"], | None = None,
Var[ variant: Literal["classic", "soft", "surface"]
Union[ | Var[Literal["classic", "soft", "surface"]]
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"] | None = None,
] color_scheme: Literal[
],
]
] = None,
variant: Optional[
Union[
Literal["classic", "soft", "surface"],
Var[Literal["classic", "soft", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -528,8 +464,8 @@ class ColorModeSwitch(Switch):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -558,23 +494,20 @@ class ColorModeSwitch(Switch):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
radius: Optional[ radius: Literal["full", "none", "small"]
Union[ | Var[Literal["full", "none", "small"]]
Literal["full", "none", "small"], Var[Literal["full", "none", "small"]] | None = None,
] style: Style | None = None,
] = None, key: Any | None = None,
style: Optional[Style] = None, id: Any | None = None,
key: Optional[Any] = None, class_name: Any | None = None,
id: Optional[Any] = None, autofocus: bool | None = None,
class_name: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_change: Optional[EventType[()] | EventType[bool]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import ComponentNamespace from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
@ -22,14 +22,14 @@ class AlertDialogRoot(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -43,7 +43,7 @@ class AlertDialogRoot(RadixThemesComponent):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
@ -77,12 +77,12 @@ class AlertDialogTrigger(RadixThemesTriggerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -117,75 +117,43 @@ class AlertDialogContent(elements.Div, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3", "4"]]
Union[ | Literal["1", "2", "3", "4"]
Breakpoints[str, Literal["1", "2", "3", "4"]], | Var[
Literal["1", "2", "3", "4"], Breakpoints[str, Literal["1", "2", "3", "4"]] | Literal["1", "2", "3", "4"]
Var[
Union[
Breakpoints[str, Literal["1", "2", "3", "4"]],
Literal["1", "2", "3", "4"],
] ]
], | None = None,
force_mount: Var[bool] | bool | None = None,
access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
force_mount: Optional[Union[Var[bool], bool]] = None, | None = None,
access_key: Optional[Union[Var[str], str]] = None, content_editable: Literal["inherit", "plaintext-only", False, True]
auto_capitalize: Optional[ | Var[Literal["inherit", "plaintext-only", False, True]]
Union[ | None = None,
Literal["characters", "none", "off", "on", "sentences", "words"], context_menu: Var[str] | str | None = None,
Var[Literal["characters", "none", "off", "on", "sentences", "words"]], dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
content_editable: Optional[ | None = None,
Union[ hidden: Var[bool] | bool | None = None,
Literal["inherit", "plaintext-only", False, True], input_mode: Literal[
Var[Literal["inherit", "plaintext-only", False, True]], "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
] ]
] = None, | Var[
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -255,8 +223,8 @@ class AlertDialogContent(elements.Div, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -328,19 +296,18 @@ class AlertDialogContent(elements.Div, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_close_auto_focus: Optional[EventType[()]] = None, on_close_auto_focus: Optional[EventType[()]] = None,
@ -408,12 +375,12 @@ class AlertDialogTitle(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -457,12 +424,12 @@ class AlertDialogDescription(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -506,12 +473,12 @@ class AlertDialogAction(RadixThemesTriggerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -546,12 +513,12 @@ class AlertDialogCancel(RadixThemesTriggerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -1,7 +1,5 @@
"""Interactive components provided by @radix-ui/themes.""" """Interactive components provided by @radix-ui/themes."""
from typing import Union
from reflex.vars.base import Var from reflex.vars.base import Var
from ..base import RadixThemesComponent from ..base import RadixThemesComponent
@ -13,7 +11,7 @@ class AspectRatio(RadixThemesComponent):
tag = "AspectRatio" tag = "AspectRatio"
# The ratio of the width to the height of the element # The ratio of the width to the height of the element
ratio: Var[Union[float, int]] ratio: Var[float | int]
aspect_ratio = AspectRatio.create aspect_ratio = AspectRatio.create

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Optional, Union, overload from typing import Any, Optional, overload
from reflex.event import EventType from reflex.event import EventType
from reflex.style import Style from reflex.style import Style
@ -17,13 +17,13 @@ class AspectRatio(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
ratio: Optional[Union[Var[Union[float, int]], float, int]] = None, ratio: Var[float | int] | float | int | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
from reflex.event import EventType from reflex.event import EventType
@ -20,26 +20,15 @@ class Avatar(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
variant: Optional[ variant: Literal["soft", "solid"] | Var[Literal["soft", "solid"]] | None = None,
Union[Literal["soft", "solid"], Var[Literal["soft", "solid"]]] size: Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]]
] = None, | Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
size: Optional[ | Var[
Union[ Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], | Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
Var[
Union[
Breakpoints[
str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
],
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
] ]
], | None = None,
] color_scheme: Literal[
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -66,8 +55,8 @@ class Avatar(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -96,24 +85,20 @@ class Avatar(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
radius: Optional[ radius: Literal["full", "large", "medium", "none", "small"]
Union[ | Var[Literal["full", "large", "medium", "none", "small"]]
Literal["full", "large", "medium", "none", "small"], | None = None,
Var[Literal["full", "large", "medium", "none", "small"]], src: Var[str] | str | None = None,
] fallback: Var[str] | str | None = None,
] = None, style: Style | None = None,
src: Optional[Union[Var[str], str]] = None, key: Any | None = None,
fallback: Optional[Union[Var[str], str]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
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
@ -19,26 +19,14 @@ class Badge(elements.Span, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
variant: Optional[ variant: Literal["outline", "soft", "solid", "surface"]
Union[ | Var[Literal["outline", "soft", "solid", "surface"]]
Literal["outline", "soft", "solid", "surface"], | None = None,
Var[Literal["outline", "soft", "solid", "surface"]], size: Breakpoints[str, Literal["1", "2", "3"]]
] | Literal["1", "2", "3"]
] = None, | Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
size: Optional[ | None = None,
Union[ color_scheme: Literal[
Breakpoints[str, Literal["1", "2", "3"]],
Literal["1", "2", "3"],
Var[
Union[
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"]
]
],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -65,8 +53,8 @@ class Badge(elements.Span, RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -95,72 +83,42 @@ class Badge(elements.Span, RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
radius: Optional[ radius: Literal["full", "large", "medium", "none", "small"]
Union[ | Var[Literal["full", "large", "medium", "none", "small"]]
Literal["full", "large", "medium", "none", "small"], | None = None,
Var[Literal["full", "large", "medium", "none", "small"]], access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
access_key: Optional[Union[Var[str], str]] = None, | None = None,
auto_capitalize: Optional[ content_editable: Literal["inherit", "plaintext-only", False, True]
Union[ | Var[Literal["inherit", "plaintext-only", False, True]]
Literal["characters", "none", "off", "on", "sentences", "words"], | None = None,
Var[Literal["characters", "none", "off", "on", "sentences", "words"]], context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
content_editable: Optional[ | None = None,
Union[ hidden: Var[bool] | bool | None = None,
Literal["inherit", "plaintext-only", False, True], input_mode: Literal[
Var[Literal["inherit", "plaintext-only", False, True]], "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
] ]
] = None, | Var[
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -230,8 +188,8 @@ class Badge(elements.Span, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -303,19 +261,18 @@ class Badge(elements.Span, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
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
@ -21,28 +21,17 @@ class Button(elements.Button, RadixLoadingProp, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3", "4"]]
Union[ | Literal["1", "2", "3", "4"]
Breakpoints[str, Literal["1", "2", "3", "4"]], | Var[
Literal["1", "2", "3", "4"], Breakpoints[str, Literal["1", "2", "3", "4"]] | Literal["1", "2", "3", "4"]
Var[
Union[
Breakpoints[str, Literal["1", "2", "3", "4"]],
Literal["1", "2", "3", "4"],
] ]
], | None = None,
] variant: Literal["classic", "ghost", "outline", "soft", "solid", "surface"]
] = None, | Var[Literal["classic", "ghost", "outline", "soft", "solid", "surface"]]
variant: Optional[ | None = None,
Union[ color_scheme: Literal[
Literal["classic", "ghost", "outline", "soft", "solid", "surface"],
Var[Literal["classic", "ghost", "outline", "soft", "solid", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -69,8 +58,8 @@ class Button(elements.Button, RadixLoadingProp, RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -99,88 +88,55 @@ class Button(elements.Button, RadixLoadingProp, RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
radius: Optional[ radius: Literal["full", "large", "medium", "none", "small"]
Union[ | Var[Literal["full", "large", "medium", "none", "small"]]
Literal["full", "large", "medium", "none", "small"], | None = None,
Var[Literal["full", "large", "medium", "none", "small"]], auto_focus: Var[bool] | bool | None = None,
disabled: Var[bool] | bool | None = None,
form: Var[str] | str | None = None,
form_action: Var[str] | str | None = None,
form_enc_type: Var[str] | str | None = None,
form_method: Var[str] | str | None = None,
form_no_validate: Var[bool] | bool | None = None,
form_target: Var[str] | str | None = None,
name: Var[str] | str | None = None,
type: Literal["button", "reset", "submit"]
| Var[Literal["button", "reset", "submit"]]
| None = None,
value: Var[float | int | str] | float | int | str | None = None,
access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
auto_focus: Optional[Union[Var[bool], bool]] = None, | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, content_editable: Literal["inherit", "plaintext-only", False, True]
form: Optional[Union[Var[str], str]] = None, | Var[Literal["inherit", "plaintext-only", False, True]]
form_action: Optional[Union[Var[str], str]] = None, | None = None,
form_enc_type: Optional[Union[Var[str], str]] = None, context_menu: Var[str] | str | None = None,
form_method: Optional[Union[Var[str], str]] = None, dir: Var[str] | str | None = None,
form_no_validate: Optional[Union[Var[bool], bool]] = None, draggable: Var[bool] | bool | None = None,
form_target: Optional[Union[Var[str], str]] = None, enter_key_hint: Literal[
name: Optional[Union[Var[str], str]] = None, "done", "enter", "go", "next", "previous", "search", "send"
type: Optional[
Union[
Literal["button", "reset", "submit"],
Var[Literal["button", "reset", "submit"]],
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, | None = None,
access_key: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
auto_capitalize: Optional[ input_mode: Literal[
Union[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[
content_editable: Optional[
Union[
Literal["inherit", "plaintext-only", False, True],
Var[Literal["inherit", "plaintext-only", False, True]],
]
] = None,
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -250,8 +206,8 @@ class Button(elements.Button, RadixLoadingProp, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -323,20 +279,19 @@ class Button(elements.Button, RadixLoadingProp, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
loading: Optional[Union[Var[bool], bool]] = None, loading: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import ComponentNamespace from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
@ -22,27 +22,15 @@ class CalloutRoot(elements.Div, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3"]]
Union[ | Literal["1", "2", "3"]
Breakpoints[str, Literal["1", "2", "3"]], | Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
Literal["1", "2", "3"], | None = None,
Var[ variant: Literal["outline", "soft", "surface"]
Union[ | Var[Literal["outline", "soft", "surface"]]
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"] | None = None,
] color_scheme: Literal[
],
]
] = None,
variant: Optional[
Union[
Literal["outline", "soft", "surface"],
Var[Literal["outline", "soft", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -69,8 +57,8 @@ class CalloutRoot(elements.Div, RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -99,66 +87,39 @@ class CalloutRoot(elements.Div, RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -228,8 +189,8 @@ class CalloutRoot(elements.Div, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -301,19 +262,18 @@ class CalloutRoot(elements.Div, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -378,62 +338,36 @@ class CalloutIcon(elements.Div, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -503,8 +437,8 @@ class CalloutIcon(elements.Div, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -576,19 +510,18 @@ class CalloutIcon(elements.Div, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -648,62 +581,36 @@ class CalloutText(elements.P, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -773,8 +680,8 @@ class CalloutText(elements.P, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -846,19 +753,18 @@ class CalloutText(elements.P, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -918,29 +824,17 @@ class Callout(CalloutRoot):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
text: Optional[Union[Var[str], str]] = None, text: Var[str] | str | None = None,
icon: Optional[Union[Var[str], str]] = None, icon: Var[str] | str | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3"]]
Union[ | Literal["1", "2", "3"]
Breakpoints[str, Literal["1", "2", "3"]], | Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
Literal["1", "2", "3"], | None = None,
Var[ variant: Literal["outline", "soft", "surface"]
Union[ | Var[Literal["outline", "soft", "surface"]]
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"] | None = None,
] color_scheme: Literal[
],
]
] = None,
variant: Optional[
Union[
Literal["outline", "soft", "surface"],
Var[Literal["outline", "soft", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -967,8 +861,8 @@ class Callout(CalloutRoot):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -997,66 +891,39 @@ class Callout(CalloutRoot):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -1126,8 +993,8 @@ class Callout(CalloutRoot):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -1199,19 +1066,18 @@ class Callout(CalloutRoot):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -1277,29 +1143,17 @@ class CalloutNamespace(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
text: Optional[Union[Var[str], str]] = None, text: Var[str] | str | None = None,
icon: Optional[Union[Var[str], str]] = None, icon: Var[str] | str | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3"]]
Union[ | Literal["1", "2", "3"]
Breakpoints[str, Literal["1", "2", "3"]], | Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
Literal["1", "2", "3"], | None = None,
Var[ variant: Literal["outline", "soft", "surface"]
Union[ | Var[Literal["outline", "soft", "surface"]]
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"] | None = None,
] color_scheme: Literal[
],
]
] = None,
variant: Optional[
Union[
Literal["outline", "soft", "surface"],
Var[Literal["outline", "soft", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -1326,8 +1180,8 @@ class CalloutNamespace(ComponentNamespace):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -1356,66 +1210,39 @@ class CalloutNamespace(ComponentNamespace):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
access_key: Optional[Union[Var[str], str]] = None, access_key: Var[str] | str | None = None,
auto_capitalize: Optional[ auto_capitalize: Literal[
Union[ "characters", "none", "off", "on", "sentences", "words"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
content_editable: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["inherit", "plaintext-only", False, True], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["inherit", "plaintext-only", False, True]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
context_menu: Optional[Union[Var[str], str]] = None, | None = None,
dir: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
draggable: Optional[Union[Var[bool], bool]] = None, input_mode: Literal[
enter_key_hint: Optional[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
] ]
] = None, | Var[
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -1485,8 +1312,8 @@ class CalloutNamespace(ComponentNamespace):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -1558,19 +1385,18 @@ class CalloutNamespace(ComponentNamespace):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
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
@ -19,81 +19,47 @@ class Card(elements.Div, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3", "4", "5"]]
Union[ | Literal["1", "2", "3", "4", "5"]
Breakpoints[str, Literal["1", "2", "3", "4", "5"]], | Var[
Literal["1", "2", "3", "4", "5"], Breakpoints[str, Literal["1", "2", "3", "4", "5"]]
Var[ | Literal["1", "2", "3", "4", "5"]
Union[
Breakpoints[str, Literal["1", "2", "3", "4", "5"]],
Literal["1", "2", "3", "4", "5"],
] ]
], | None = None,
variant: Literal["classic", "ghost", "surface"]
| Var[Literal["classic", "ghost", "surface"]]
| None = None,
access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
variant: Optional[ | None = None,
Union[ content_editable: Literal["inherit", "plaintext-only", False, True]
Literal["classic", "ghost", "surface"], | Var[Literal["inherit", "plaintext-only", False, True]]
Var[Literal["classic", "ghost", "surface"]], | None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
access_key: Optional[Union[Var[str], str]] = None, | None = None,
auto_capitalize: Optional[ hidden: Var[bool] | bool | None = None,
Union[ input_mode: Literal[
Literal["characters", "none", "off", "on", "sentences", "words"], "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[
content_editable: Optional[
Union[
Literal["inherit", "plaintext-only", False, True],
Var[Literal["inherit", "plaintext-only", False, True]],
]
] = None,
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -163,8 +129,8 @@ class Card(elements.Div, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -236,19 +202,18 @@ class Card(elements.Div, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import ComponentNamespace from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
@ -22,27 +22,15 @@ class Checkbox(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3"]]
Union[ | Literal["1", "2", "3"]
Breakpoints[str, Literal["1", "2", "3"]], | Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
Literal["1", "2", "3"], | None = None,
Var[ variant: Literal["classic", "soft", "surface"]
Union[ | Var[Literal["classic", "soft", "surface"]]
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"] | None = None,
] color_scheme: Literal[
],
]
] = None,
variant: Optional[
Union[
Literal["classic", "soft", "surface"],
Var[Literal["classic", "soft", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -69,8 +57,8 @@ class Checkbox(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -99,24 +87,23 @@ class Checkbox(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
default_checked: Optional[Union[Var[bool], bool]] = None, default_checked: Var[bool] | bool | None = None,
checked: Optional[Union[Var[bool], bool]] = None, checked: Var[bool] | bool | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
required: Optional[Union[Var[bool], bool]] = None, required: Var[bool] | bool | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
value: Optional[Union[Var[str], str]] = None, value: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_change: Optional[EventType[()] | EventType[bool]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
@ -171,26 +158,16 @@ class HighLevelCheckbox(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
text: Optional[Union[Var[str], str]] = None, text: Var[str] | str | None = None,
spacing: Optional[ spacing: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Union[ | Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], | None = None,
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], size: Literal["1", "2", "3"] | Var[Literal["1", "2", "3"]] | None = None,
] as_child: Var[bool] | bool | None = None,
] = None, variant: Literal["classic", "soft", "surface"]
size: Optional[ | Var[Literal["classic", "soft", "surface"]]
Union[Literal["1", "2", "3"], Var[Literal["1", "2", "3"]]] | None = None,
] = None, color_scheme: Literal[
as_child: Optional[Union[Var[bool], bool]] = None,
variant: Optional[
Union[
Literal["classic", "soft", "surface"],
Var[Literal["classic", "soft", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -217,8 +194,8 @@ class HighLevelCheckbox(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -247,24 +224,23 @@ class HighLevelCheckbox(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
default_checked: Optional[Union[Var[bool], bool]] = None, default_checked: Var[bool] | bool | None = None,
checked: Optional[Union[Var[bool], bool]] = None, checked: Var[bool] | bool | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
required: Optional[Union[Var[bool], bool]] = None, required: Var[bool] | bool | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
value: Optional[Union[Var[str], str]] = None, value: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_change: Optional[EventType[()] | EventType[bool]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,
@ -316,26 +292,16 @@ class CheckboxNamespace(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
text: Optional[Union[Var[str], str]] = None, text: Var[str] | str | None = None,
spacing: Optional[ spacing: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Union[ | Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], | None = None,
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], size: Literal["1", "2", "3"] | Var[Literal["1", "2", "3"]] | None = None,
] as_child: Var[bool] | bool | None = None,
] = None, variant: Literal["classic", "soft", "surface"]
size: Optional[ | Var[Literal["classic", "soft", "surface"]]
Union[Literal["1", "2", "3"], Var[Literal["1", "2", "3"]]] | None = None,
] = None, color_scheme: Literal[
as_child: Optional[Union[Var[bool], bool]] = None,
variant: Optional[
Union[
Literal["classic", "soft", "surface"],
Var[Literal["classic", "soft", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -362,8 +328,8 @@ class CheckboxNamespace(ComponentNamespace):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -392,24 +358,23 @@ class CheckboxNamespace(ComponentNamespace):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
default_checked: Optional[Union[Var[bool], bool]] = None, default_checked: Var[bool] | bool | None = None,
checked: Optional[Union[Var[bool], bool]] = None, checked: Var[bool] | bool | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
required: Optional[Union[Var[bool], bool]] = None, required: Var[bool] | bool | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
value: Optional[Union[Var[str], str]] = None, value: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_change: Optional[EventType[()] | EventType[bool]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,

View File

@ -4,7 +4,7 @@
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from types import SimpleNamespace from types import SimpleNamespace
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
from reflex.event import EventType from reflex.event import EventType
@ -19,23 +19,14 @@ class CheckboxCardsRoot(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3"]]
Union[ | Literal["1", "2", "3"]
Breakpoints[str, Literal["1", "2", "3"]], | Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
Literal["1", "2", "3"], | None = None,
Var[ variant: Literal["classic", "surface"]
Union[ | Var[Literal["classic", "surface"]]
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"] | None = None,
] color_scheme: Literal[
],
]
] = None,
variant: Optional[
Union[Literal["classic", "surface"], Var[Literal["classic", "surface"]]]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -62,8 +53,8 @@ class CheckboxCardsRoot(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -92,62 +83,37 @@ class CheckboxCardsRoot(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
columns: Optional[ columns: Breakpoints[
Union[ str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] | str
Breakpoints[
str,
Union[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], str],
],
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
Var[
Union[
Breakpoints[
str,
Union[
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
str,
],
],
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
str,
] ]
], | Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
str, | Var[
Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] | str]
| Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
| str
] ]
] = None, | str
gap: Optional[ | None = None,
Union[ gap: Breakpoints[
Breakpoints[ str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] | str
str,
Union[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], str],
],
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
Var[
Union[
Breakpoints[
str,
Union[
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
str,
],
],
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
str,
] ]
], | Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
str, | Var[
Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] | str]
| Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
| str
] ]
] = None, | str
style: Optional[Style] = None, | None = None,
key: Optional[Any] = None, style: Style | None = None,
id: Optional[Any] = None, key: Any | None = None,
class_name: Optional[Any] = None, id: Any | None = None,
autofocus: Optional[bool] = None, class_name: Any | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, autofocus: bool | None = None,
custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -197,12 +163,12 @@ class CheckboxCardsItem(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -4,7 +4,7 @@
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from types import SimpleNamespace from types import SimpleNamespace
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
from reflex.event import EventType from reflex.event import EventType
@ -19,26 +19,14 @@ class CheckboxGroupRoot(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3"]]
Union[ | Literal["1", "2", "3"]
Breakpoints[str, Literal["1", "2", "3"]], | Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
Literal["1", "2", "3"], | None = None,
Var[ variant: Literal["classic", "soft", "surface"]
Union[ | Var[Literal["classic", "soft", "surface"]]
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"] | None = None,
] color_scheme: Literal[
],
]
] = None,
variant: Optional[
Union[
Literal["classic", "soft", "surface"],
Var[Literal["classic", "soft", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -65,8 +53,8 @@ class CheckboxGroupRoot(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -95,18 +83,17 @@ class CheckboxGroupRoot(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
default_value: Optional[Union[Var[list[str]], list[str]]] = None, default_value: Var[list[str]] | list[str] | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -156,14 +143,14 @@ class CheckboxGroupItem(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
value: Optional[Union[Var[str], str]] = None, value: Var[str] | str | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -89,19 +89,19 @@ class ContextMenuContent(RadixThemesComponent):
side: Var[LiteralSideType] side: Var[LiteralSideType]
# The distance in pixels from the trigger. Defaults to 0. # The distance in pixels from the trigger. Defaults to 0.
side_offset: Var[Union[float, int]] side_offset: Var[float | int]
# The preferred alignment against the trigger. May change when collisions occur. Defaults to "center". # The preferred alignment against the trigger. May change when collisions occur. Defaults to "center".
align: Var[LiteralAlignType] align: Var[LiteralAlignType]
# An offset in pixels from the "start" or "end" alignment options. # An offset in pixels from the "start" or "end" alignment options.
align_offset: Var[Union[float, int]] align_offset: Var[float | int]
# When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True. # When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True.
avoid_collisions: Var[bool] avoid_collisions: Var[bool]
# The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0. # The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
collision_padding: Var[Union[float, int, dict[str, Union[float, int]]]] collision_padding: Var[Union[float, int, dict[str, float | int]]]
# The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial". # The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
sticky: Var[LiteralStickyType] sticky: Var[LiteralStickyType]
@ -174,16 +174,16 @@ class ContextMenuSubContent(RadixThemesComponent):
force_mount: Var[bool] force_mount: Var[bool]
# The distance in pixels from the trigger. Defaults to 0. # The distance in pixels from the trigger. Defaults to 0.
side_offset: Var[Union[float, int]] side_offset: Var[float | int]
# An offset in pixels from the "start" or "end" alignment options. # An offset in pixels from the "start" or "end" alignment options.
align_offset: Var[Union[float, int]] align_offset: Var[float | int]
# When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True. # When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True.
avoid_collisions: Var[bool] avoid_collisions: Var[bool]
# The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0. # The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
collision_padding: Var[Union[float, int, dict[str, Union[float, int]]]] collision_padding: Var[Union[float, int, dict[str, float | int]]]
# The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial". # The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
sticky: Var[LiteralStickyType] sticky: Var[LiteralStickyType]

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import ComponentNamespace from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
@ -27,14 +27,14 @@ class ContextMenuRoot(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
modal: Optional[Union[Var[bool], bool]] = None, modal: Var[bool] | bool | None = None,
dir: Optional[Union[Literal["ltr", "rtl"], Var[Literal["ltr", "rtl"]]]] = None, dir: Literal["ltr", "rtl"] | Var[Literal["ltr", "rtl"]] | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -48,7 +48,7 @@ class ContextMenuRoot(RadixThemesComponent):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
@ -82,13 +82,13 @@ class ContextMenuTrigger(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -133,19 +133,12 @@ class ContextMenuContent(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
size: Optional[ size: Breakpoints[str, Literal["1", "2"]]
Union[ | Literal["1", "2"]
Breakpoints[str, Literal["1", "2"]], | Var[Breakpoints[str, Literal["1", "2"]] | Literal["1", "2"]]
Literal["1", "2"], | None = None,
Var[Union[Breakpoints[str, Literal["1", "2"]], Literal["1", "2"]]], variant: Literal["soft", "solid"] | Var[Literal["soft", "solid"]] | None = None,
] color_scheme: Literal[
] = None,
variant: Optional[
Union[Literal["soft", "solid"], Var[Literal["soft", "solid"]]]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -172,8 +165,8 @@ class ContextMenuContent(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -202,46 +195,36 @@ class ContextMenuContent(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
loop: Optional[Union[Var[bool], bool]] = None, loop: Var[bool] | bool | None = None,
force_mount: Optional[Union[Var[bool], bool]] = None, force_mount: Var[bool] | bool | None = None,
side: Optional[ side: Literal["bottom", "left", "right", "top"]
Union[ | Var[Literal["bottom", "left", "right", "top"]]
Literal["bottom", "left", "right", "top"], | None = None,
Var[Literal["bottom", "left", "right", "top"]], side_offset: Var[float | int] | float | int | None = None,
] align: Literal["center", "end", "start"]
] = None, | Var[Literal["center", "end", "start"]]
side_offset: Optional[Union[Var[Union[float, int]], float, int]] = None, | None = None,
align: Optional[ align_offset: Var[float | int] | float | int | None = None,
Union[ avoid_collisions: Var[bool] | bool | None = None,
Literal["center", "end", "start"], collision_padding: Var[dict[str, float | int] | float | int]
Var[Literal["center", "end", "start"]], | dict[str, float | int]
] | float
] = None, | int
align_offset: Optional[Union[Var[Union[float, int]], float, int]] = None, | None = None,
avoid_collisions: Optional[Union[Var[bool], bool]] = None, sticky: Literal["always", "partial"]
collision_padding: Optional[ | Var[Literal["always", "partial"]]
Union[ | None = None,
Var[Union[dict[str, Union[float, int]], float, int]], hide_when_detached: Var[bool] | bool | None = None,
dict[str, Union[float, int]], style: Style | None = None,
float, key: Any | None = None,
int, id: Any | None = None,
] class_name: Any | None = None,
] = None, autofocus: bool | None = None,
sticky: Optional[ custom_attrs: dict[str, Var | Any] | None = None,
Union[Literal["always", "partial"], Var[Literal["always", "partial"]]]
] = None,
hide_when_detached: Optional[Union[Var[bool], bool]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_close_auto_focus: Optional[EventType[()]] = None, on_close_auto_focus: Optional[EventType[()]] = None,
@ -310,14 +293,14 @@ class ContextMenuSub(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -331,7 +314,7 @@ class ContextMenuSub(RadixThemesComponent):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
@ -365,15 +348,15 @@ class ContextMenuSubTrigger(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
text_value: Optional[Union[Var[str], str]] = None, text_value: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -420,30 +403,27 @@ class ContextMenuSubContent(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
loop: Optional[Union[Var[bool], bool]] = None, loop: Var[bool] | bool | None = None,
force_mount: Optional[Union[Var[bool], bool]] = None, force_mount: Var[bool] | bool | None = None,
side_offset: Optional[Union[Var[Union[float, int]], float, int]] = None, side_offset: Var[float | int] | float | int | None = None,
align_offset: Optional[Union[Var[Union[float, int]], float, int]] = None, align_offset: Var[float | int] | float | int | None = None,
avoid_collisions: Optional[Union[Var[bool], bool]] = None, avoid_collisions: Var[bool] | bool | None = None,
collision_padding: Optional[ collision_padding: Var[dict[str, float | int] | float | int]
Union[ | dict[str, float | int]
Var[Union[dict[str, Union[float, int]], float, int]], | float
dict[str, Union[float, int]], | int
float, | None = None,
int, sticky: Literal["always", "partial"]
] | Var[Literal["always", "partial"]]
] = None, | None = None,
sticky: Optional[ hide_when_detached: Var[bool] | bool | None = None,
Union[Literal["always", "partial"], Var[Literal["always", "partial"]]] style: Style | None = None,
] = None, key: Any | None = None,
hide_when_detached: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -504,9 +484,7 @@ class ContextMenuItem(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
color_scheme: Optional[ color_scheme: Literal[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -533,8 +511,8 @@ class ContextMenuItem(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -563,19 +541,18 @@ class ContextMenuItem(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
shortcut: Optional[Union[Var[str], str]] = None, shortcut: Var[str] | str | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
text_value: Optional[Union[Var[str], str]] = None, text_value: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -626,12 +603,12 @@ class ContextMenuSeparator(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -675,28 +652,16 @@ class ContextMenuCheckbox(Checkbox):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
shortcut: Optional[Union[Var[str], str]] = None, shortcut: Var[str] | str | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3"]]
Union[ | Literal["1", "2", "3"]
Breakpoints[str, Literal["1", "2", "3"]], | Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
Literal["1", "2", "3"], | None = None,
Var[ variant: Literal["classic", "soft", "surface"]
Union[ | Var[Literal["classic", "soft", "surface"]]
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"] | None = None,
] color_scheme: Literal[
],
]
] = None,
variant: Optional[
Union[
Literal["classic", "soft", "surface"],
Var[Literal["classic", "soft", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -723,8 +688,8 @@ class ContextMenuCheckbox(Checkbox):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -753,24 +718,23 @@ class ContextMenuCheckbox(Checkbox):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
default_checked: Optional[Union[Var[bool], bool]] = None, default_checked: Var[bool] | bool | None = None,
checked: Optional[Union[Var[bool], bool]] = None, checked: Var[bool] | bool | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
required: Optional[Union[Var[bool], bool]] = None, required: Var[bool] | bool | None = None,
name: Optional[Union[Var[str], str]] = None, name: Var[str] | str | None = None,
value: Optional[Union[Var[str], str]] = None, value: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_change: Optional[EventType[()] | EventType[bool]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
on_double_click: Optional[EventType[()]] = None, on_double_click: Optional[EventType[()]] = None,

View File

@ -4,7 +4,7 @@
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from types import SimpleNamespace from types import SimpleNamespace
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
from reflex.event import EventType from reflex.event import EventType
@ -19,47 +19,30 @@ class DataListRoot(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
orientation: Optional[ orientation: Breakpoints[str, Literal["horizontal", "vertical"]]
Union[ | Literal["horizontal", "vertical"]
Breakpoints[str, Literal["horizontal", "vertical"]], | Var[
Literal["horizontal", "vertical"], Breakpoints[str, Literal["horizontal", "vertical"]]
Var[ | Literal["horizontal", "vertical"]
Union[
Breakpoints[str, Literal["horizontal", "vertical"]],
Literal["horizontal", "vertical"],
] ]
], | None = None,
size: Breakpoints[str, Literal["1", "2", "3"]]
| Literal["1", "2", "3"]
| Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
| None = None,
trim: Breakpoints[str, Literal["both", "end", "normal", "start"]]
| Literal["both", "end", "normal", "start"]
| Var[
Breakpoints[str, Literal["both", "end", "normal", "start"]]
| Literal["both", "end", "normal", "start"]
] ]
] = None, | None = None,
size: Optional[ style: Style | None = None,
Union[ key: Any | None = None,
Breakpoints[str, Literal["1", "2", "3"]], id: Any | None = None,
Literal["1", "2", "3"], class_name: Any | None = None,
Var[ autofocus: bool | None = None,
Union[ custom_attrs: dict[str, Var | Any] | None = None,
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"]
]
],
]
] = None,
trim: Optional[
Union[
Breakpoints[str, Literal["both", "end", "normal", "start"]],
Literal["both", "end", "normal", "start"],
Var[
Union[
Breakpoints[str, Literal["both", "end", "normal", "start"]],
Literal["both", "end", "normal", "start"],
]
],
]
] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -106,29 +89,21 @@ class DataListItem(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
align: Optional[ align: Breakpoints[
Union[
Breakpoints[
str, Literal["baseline", "center", "end", "start", "stretch"] str, Literal["baseline", "center", "end", "start", "stretch"]
],
Literal["baseline", "center", "end", "start", "stretch"],
Var[
Union[
Breakpoints[
str,
Literal["baseline", "center", "end", "start", "stretch"],
],
Literal["baseline", "center", "end", "start", "stretch"],
] ]
], | Literal["baseline", "center", "end", "start", "stretch"]
| Var[
Breakpoints[str, Literal["baseline", "center", "end", "start", "stretch"]]
| Literal["baseline", "center", "end", "start", "stretch"]
] ]
] = None, | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -173,18 +148,19 @@ class DataListLabel(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
width: Optional[ width: Breakpoints[str, str]
Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str] | Var[Breakpoints[str, str] | str]
] = None, | str
min_width: Optional[ | None = None,
Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str] min_width: Breakpoints[str, str]
] = None, | Var[Breakpoints[str, str] | str]
max_width: Optional[ | str
Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str] | None = None,
] = None, max_width: Breakpoints[str, str]
color_scheme: Optional[ | Var[Breakpoints[str, str] | str]
Union[ | str
Literal[ | None = None,
color_scheme: Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -211,8 +187,8 @@ class DataListLabel(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -241,15 +217,14 @@ class DataListLabel(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -297,12 +272,12 @@ class DataListValue(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import ComponentNamespace from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
@ -20,14 +20,14 @@ class DialogRoot(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -41,7 +41,7 @@ class DialogRoot(RadixThemesComponent):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
@ -75,12 +75,12 @@ class DialogTrigger(RadixThemesTriggerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -115,12 +115,12 @@ class DialogTitle(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -164,74 +164,42 @@ class DialogContent(elements.Div, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3", "4"]]
Union[ | Literal["1", "2", "3", "4"]
Breakpoints[str, Literal["1", "2", "3", "4"]], | Var[
Literal["1", "2", "3", "4"], Breakpoints[str, Literal["1", "2", "3", "4"]] | Literal["1", "2", "3", "4"]
Var[
Union[
Breakpoints[str, Literal["1", "2", "3", "4"]],
Literal["1", "2", "3", "4"],
] ]
], | None = None,
access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
access_key: Optional[Union[Var[str], str]] = None, | None = None,
auto_capitalize: Optional[ content_editable: Literal["inherit", "plaintext-only", False, True]
Union[ | Var[Literal["inherit", "plaintext-only", False, True]]
Literal["characters", "none", "off", "on", "sentences", "words"], | None = None,
Var[Literal["characters", "none", "off", "on", "sentences", "words"]], context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
content_editable: Optional[ | None = None,
Union[ hidden: Var[bool] | bool | None = None,
Literal["inherit", "plaintext-only", False, True], input_mode: Literal[
Var[Literal["inherit", "plaintext-only", False, True]], "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
] ]
] = None, | Var[
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -301,8 +269,8 @@ class DialogContent(elements.Div, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -374,19 +342,18 @@ class DialogContent(elements.Div, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_close_auto_focus: Optional[EventType[()]] = None, on_close_auto_focus: Optional[EventType[()]] = None,
@ -457,12 +424,12 @@ class DialogDescription(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -506,12 +473,12 @@ class DialogClose(RadixThemesTriggerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -551,14 +518,14 @@ class Dialog(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -572,7 +539,7 @@ class Dialog(ComponentNamespace):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,

View File

@ -94,19 +94,19 @@ class DropdownMenuContent(RadixThemesComponent):
side: Var[LiteralSideType] side: Var[LiteralSideType]
# The distance in pixels from the trigger. Defaults to 0. # The distance in pixels from the trigger. Defaults to 0.
side_offset: Var[Union[float, int]] side_offset: Var[float | int]
# The preferred alignment against the trigger. May change when collisions occur. Defaults to "center". # The preferred alignment against the trigger. May change when collisions occur. Defaults to "center".
align: Var[LiteralAlignType] align: Var[LiteralAlignType]
# An offset in pixels from the "start" or "end" alignment options. # An offset in pixels from the "start" or "end" alignment options.
align_offset: Var[Union[float, int]] align_offset: Var[float | int]
# When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True. # When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True.
avoid_collisions: Var[bool] avoid_collisions: Var[bool]
# The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0. # The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
collision_padding: Var[Union[float, int, dict[str, Union[float, int]]]] collision_padding: Var[Union[float, int, dict[str, float | int]]]
# The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial". # The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
sticky: Var[LiteralStickyType] sticky: Var[LiteralStickyType]
@ -179,16 +179,16 @@ class DropdownMenuSubContent(RadixThemesComponent):
force_mount: Var[bool] force_mount: Var[bool]
# The distance in pixels from the trigger. Defaults to 0. # The distance in pixels from the trigger. Defaults to 0.
side_offset: Var[Union[float, int]] side_offset: Var[float | int]
# An offset in pixels from the "start" or "end" alignment options. # An offset in pixels from the "start" or "end" alignment options.
align_offset: Var[Union[float, int]] align_offset: Var[float | int]
# When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True. # When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True.
avoid_collisions: Var[bool] avoid_collisions: Var[bool]
# The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0. # The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
collision_padding: Var[Union[float, int, dict[str, Union[float, int]]]] collision_padding: Var[Union[float, int, dict[str, float | int]]]
# The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial". # The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
sticky: Var[LiteralStickyType] sticky: Var[LiteralStickyType]

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import ComponentNamespace from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
@ -26,16 +26,16 @@ class DropdownMenuRoot(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
modal: Optional[Union[Var[bool], bool]] = None, modal: Var[bool] | bool | None = None,
dir: Optional[Union[Literal["ltr", "rtl"], Var[Literal["ltr", "rtl"]]]] = None, dir: Literal["ltr", "rtl"] | Var[Literal["ltr", "rtl"]] | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -49,7 +49,7 @@ class DropdownMenuRoot(RadixThemesComponent):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
@ -85,13 +85,13 @@ class DropdownMenuTrigger(RadixThemesTriggerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -126,19 +126,12 @@ class DropdownMenuContent(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
size: Optional[ size: Breakpoints[str, Literal["1", "2"]]
Union[ | Literal["1", "2"]
Breakpoints[str, Literal["1", "2"]], | Var[Breakpoints[str, Literal["1", "2"]] | Literal["1", "2"]]
Literal["1", "2"], | None = None,
Var[Union[Breakpoints[str, Literal["1", "2"]], Literal["1", "2"]]], variant: Literal["soft", "solid"] | Var[Literal["soft", "solid"]] | None = None,
] color_scheme: Literal[
] = None,
variant: Optional[
Union[Literal["soft", "solid"], Var[Literal["soft", "solid"]]]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -165,8 +158,8 @@ class DropdownMenuContent(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -195,46 +188,36 @@ class DropdownMenuContent(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
loop: Optional[Union[Var[bool], bool]] = None, loop: Var[bool] | bool | None = None,
force_mount: Optional[Union[Var[bool], bool]] = None, force_mount: Var[bool] | bool | None = None,
side: Optional[ side: Literal["bottom", "left", "right", "top"]
Union[ | Var[Literal["bottom", "left", "right", "top"]]
Literal["bottom", "left", "right", "top"], | None = None,
Var[Literal["bottom", "left", "right", "top"]], side_offset: Var[float | int] | float | int | None = None,
] align: Literal["center", "end", "start"]
] = None, | Var[Literal["center", "end", "start"]]
side_offset: Optional[Union[Var[Union[float, int]], float, int]] = None, | None = None,
align: Optional[ align_offset: Var[float | int] | float | int | None = None,
Union[ avoid_collisions: Var[bool] | bool | None = None,
Literal["center", "end", "start"], collision_padding: Var[dict[str, float | int] | float | int]
Var[Literal["center", "end", "start"]], | dict[str, float | int]
] | float
] = None, | int
align_offset: Optional[Union[Var[Union[float, int]], float, int]] = None, | None = None,
avoid_collisions: Optional[Union[Var[bool], bool]] = None, sticky: Literal["always", "partial"]
collision_padding: Optional[ | Var[Literal["always", "partial"]]
Union[ | None = None,
Var[Union[dict[str, Union[float, int]], float, int]], hide_when_detached: Var[bool] | bool | None = None,
dict[str, Union[float, int]], style: Style | None = None,
float, key: Any | None = None,
int, id: Any | None = None,
] class_name: Any | None = None,
] = None, autofocus: bool | None = None,
sticky: Optional[ custom_attrs: dict[str, Var | Any] | None = None,
Union[Literal["always", "partial"], Var[Literal["always", "partial"]]]
] = None,
hide_when_detached: Optional[Union[Var[bool], bool]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_close_auto_focus: Optional[EventType[()]] = None, on_close_auto_focus: Optional[EventType[()]] = None,
@ -303,15 +286,15 @@ class DropdownMenuSubTrigger(RadixThemesTriggerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
text_value: Optional[Union[Var[str], str]] = None, text_value: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -346,14 +329,14 @@ class DropdownMenuSub(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -367,7 +350,7 @@ class DropdownMenuSub(RadixThemesComponent):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
@ -401,30 +384,27 @@ class DropdownMenuSubContent(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
loop: Optional[Union[Var[bool], bool]] = None, loop: Var[bool] | bool | None = None,
force_mount: Optional[Union[Var[bool], bool]] = None, force_mount: Var[bool] | bool | None = None,
side_offset: Optional[Union[Var[Union[float, int]], float, int]] = None, side_offset: Var[float | int] | float | int | None = None,
align_offset: Optional[Union[Var[Union[float, int]], float, int]] = None, align_offset: Var[float | int] | float | int | None = None,
avoid_collisions: Optional[Union[Var[bool], bool]] = None, avoid_collisions: Var[bool] | bool | None = None,
collision_padding: Optional[ collision_padding: Var[dict[str, float | int] | float | int]
Union[ | dict[str, float | int]
Var[Union[dict[str, Union[float, int]], float, int]], | float
dict[str, Union[float, int]], | int
float, | None = None,
int, sticky: Literal["always", "partial"]
] | Var[Literal["always", "partial"]]
] = None, | None = None,
sticky: Optional[ hide_when_detached: Var[bool] | bool | None = None,
Union[Literal["always", "partial"], Var[Literal["always", "partial"]]] style: Style | None = None,
] = None, key: Any | None = None,
hide_when_detached: Optional[Union[Var[bool], bool]] = None, id: Any | None = None,
style: Optional[Style] = None, class_name: Any | None = None,
key: Optional[Any] = None, autofocus: bool | None = None,
id: Optional[Any] = None, custom_attrs: dict[str, Var | Any] | None = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -485,9 +465,7 @@ class DropdownMenuItem(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
color_scheme: Optional[ color_scheme: Literal[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -514,8 +492,8 @@ class DropdownMenuItem(RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -544,19 +522,18 @@ class DropdownMenuItem(RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
shortcut: Optional[Union[Var[str], str]] = None, shortcut: Var[str] | str | None = None,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, disabled: Var[bool] | bool | None = None,
text_value: Optional[Union[Var[str], str]] = None, text_value: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -607,12 +584,12 @@ class DropdownMenuSeparator(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -62,7 +62,7 @@ class HoverCardContent(elements.Div, RadixThemesComponent):
avoid_collisions: Var[bool] avoid_collisions: Var[bool]
# The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { top: 20, left: 20 }. # The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { top: 20, left: 20 }.
collision_padding: Var[Union[float, int, dict[str, Union[float, int]]]] collision_padding: Var[Union[float, int, dict[str, float | int]]]
# The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless # The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless
sticky: Var[Literal["partial", "always"]] sticky: Var[Literal["partial", "always"]]

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
from reflex.components.component import ComponentNamespace from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints from reflex.components.core.breakpoints import Breakpoints
@ -20,16 +20,16 @@ class HoverCardRoot(RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
open_delay: Optional[Union[Var[int], int]] = None, open_delay: Var[int] | int | None = None,
close_delay: Optional[Union[Var[int], int]] = None, close_delay: Var[int] | int | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -43,7 +43,7 @@ class HoverCardRoot(RadixThemesComponent):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,
@ -79,12 +79,12 @@ class HoverCardTrigger(RadixThemesTriggerComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -119,106 +119,62 @@ class HoverCardContent(elements.Div, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
side: Optional[ side: Breakpoints[str, Literal["bottom", "left", "right", "top"]]
Union[ | Literal["bottom", "left", "right", "top"]
Breakpoints[str, Literal["bottom", "left", "right", "top"]], | Var[
Literal["bottom", "left", "right", "top"], Breakpoints[str, Literal["bottom", "left", "right", "top"]]
Var[ | Literal["bottom", "left", "right", "top"]
Union[
Breakpoints[str, Literal["bottom", "left", "right", "top"]],
Literal["bottom", "left", "right", "top"],
] ]
], | None = None,
side_offset: Var[int] | int | None = None,
align: Literal["center", "end", "start"]
| Var[Literal["center", "end", "start"]]
| None = None,
align_offset: Var[int] | int | None = None,
avoid_collisions: Var[bool] | bool | None = None,
collision_padding: Var[dict[str, float | int] | float | int]
| dict[str, float | int]
| float
| int
| None = None,
sticky: Literal["always", "partial"]
| Var[Literal["always", "partial"]]
| None = None,
hide_when_detached: Var[bool] | bool | None = None,
size: Breakpoints[str, Literal["1", "2", "3"]]
| Literal["1", "2", "3"]
| Var[Breakpoints[str, Literal["1", "2", "3"]] | Literal["1", "2", "3"]]
| None = None,
access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
side_offset: Optional[Union[Var[int], int]] = None, | None = None,
align: Optional[ content_editable: Literal["inherit", "plaintext-only", False, True]
Union[ | Var[Literal["inherit", "plaintext-only", False, True]]
Literal["center", "end", "start"], | None = None,
Var[Literal["center", "end", "start"]], context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
align_offset: Optional[Union[Var[int], int]] = None, | None = None,
avoid_collisions: Optional[Union[Var[bool], bool]] = None, hidden: Var[bool] | bool | None = None,
collision_padding: Optional[ input_mode: Literal[
Union[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Var[Union[dict[str, Union[float, int]], float, int]],
dict[str, Union[float, int]],
float,
int,
] ]
] = None, | Var[
sticky: Optional[
Union[Literal["always", "partial"], Var[Literal["always", "partial"]]]
] = None,
hide_when_detached: Optional[Union[Var[bool], bool]] = None,
size: Optional[
Union[
Breakpoints[str, Literal["1", "2", "3"]],
Literal["1", "2", "3"],
Var[
Union[
Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"]
]
],
]
] = None,
access_key: Optional[Union[Var[str], str]] = None,
auto_capitalize: Optional[
Union[
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
]
] = None,
content_editable: Optional[
Union[
Literal["inherit", "plaintext-only", False, True],
Var[Literal["inherit", "plaintext-only", False, True]],
]
] = None,
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -288,8 +244,8 @@ class HoverCardContent(elements.Div, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -361,19 +317,18 @@ class HoverCardContent(elements.Div, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -444,16 +399,16 @@ class HoverCard(ComponentNamespace):
@staticmethod @staticmethod
def __call__( def __call__(
*children, *children,
default_open: Optional[Union[Var[bool], bool]] = None, default_open: Var[bool] | bool | None = None,
open: Optional[Union[Var[bool], bool]] = None, open: Var[bool] | bool | None = None,
open_delay: Optional[Union[Var[int], int]] = None, open_delay: Var[int] | int | None = None,
close_delay: Optional[Union[Var[int], int]] = None, close_delay: Var[int] | int | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,
@ -467,7 +422,7 @@ class HoverCard(ComponentNamespace):
on_mouse_out: Optional[EventType[()]] = None, on_mouse_out: Optional[EventType[()]] = None,
on_mouse_over: Optional[EventType[()]] = None, on_mouse_over: Optional[EventType[()]] = None,
on_mouse_up: Optional[EventType[()]] = None, on_mouse_up: Optional[EventType[()]] = None,
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None, on_open_change: Optional[EventType[()] | EventType[bool]] = None,
on_scroll: Optional[EventType[()]] = None, on_scroll: Optional[EventType[()]] = None,
on_unmount: Optional[EventType[()]] = None, on_unmount: Optional[EventType[()]] = None,
**props, **props,

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
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
@ -22,28 +22,17 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
as_child: Optional[Union[Var[bool], bool]] = None, as_child: Var[bool] | bool | None = None,
size: Optional[ size: Breakpoints[str, Literal["1", "2", "3", "4"]]
Union[ | Literal["1", "2", "3", "4"]
Breakpoints[str, Literal["1", "2", "3", "4"]], | Var[
Literal["1", "2", "3", "4"], Breakpoints[str, Literal["1", "2", "3", "4"]] | Literal["1", "2", "3", "4"]
Var[
Union[
Breakpoints[str, Literal["1", "2", "3", "4"]],
Literal["1", "2", "3", "4"],
] ]
], | None = None,
] variant: Literal["classic", "ghost", "outline", "soft", "solid", "surface"]
] = None, | Var[Literal["classic", "ghost", "outline", "soft", "solid", "surface"]]
variant: Optional[ | None = None,
Union[ color_scheme: Literal[
Literal["classic", "ghost", "outline", "soft", "solid", "surface"],
Var[Literal["classic", "ghost", "outline", "soft", "solid", "surface"]],
]
] = None,
color_scheme: Optional[
Union[
Literal[
"amber", "amber",
"blue", "blue",
"bronze", "bronze",
@ -70,8 +59,8 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
"tomato", "tomato",
"violet", "violet",
"yellow", "yellow",
], ]
Var[ | Var[
Literal[ Literal[
"amber", "amber",
"blue", "blue",
@ -100,88 +89,55 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
"violet", "violet",
"yellow", "yellow",
] ]
],
] ]
] = None, | None = None,
high_contrast: Optional[Union[Var[bool], bool]] = None, high_contrast: Var[bool] | bool | None = None,
radius: Optional[ radius: Literal["full", "large", "medium", "none", "small"]
Union[ | Var[Literal["full", "large", "medium", "none", "small"]]
Literal["full", "large", "medium", "none", "small"], | None = None,
Var[Literal["full", "large", "medium", "none", "small"]], auto_focus: Var[bool] | bool | None = None,
disabled: Var[bool] | bool | None = None,
form: Var[str] | str | None = None,
form_action: Var[str] | str | None = None,
form_enc_type: Var[str] | str | None = None,
form_method: Var[str] | str | None = None,
form_no_validate: Var[bool] | bool | None = None,
form_target: Var[str] | str | None = None,
name: Var[str] | str | None = None,
type: Literal["button", "reset", "submit"]
| Var[Literal["button", "reset", "submit"]]
| None = None,
value: Var[float | int | str] | float | int | str | None = None,
access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
] = None, | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
auto_focus: Optional[Union[Var[bool], bool]] = None, | None = None,
disabled: Optional[Union[Var[bool], bool]] = None, content_editable: Literal["inherit", "plaintext-only", False, True]
form: Optional[Union[Var[str], str]] = None, | Var[Literal["inherit", "plaintext-only", False, True]]
form_action: Optional[Union[Var[str], str]] = None, | None = None,
form_enc_type: Optional[Union[Var[str], str]] = None, context_menu: Var[str] | str | None = None,
form_method: Optional[Union[Var[str], str]] = None, dir: Var[str] | str | None = None,
form_no_validate: Optional[Union[Var[bool], bool]] = None, draggable: Var[bool] | bool | None = None,
form_target: Optional[Union[Var[str], str]] = None, enter_key_hint: Literal[
name: Optional[Union[Var[str], str]] = None, "done", "enter", "go", "next", "previous", "search", "send"
type: Optional[
Union[
Literal["button", "reset", "submit"],
Var[Literal["button", "reset", "submit"]],
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None, | None = None,
access_key: Optional[Union[Var[str], str]] = None, hidden: Var[bool] | bool | None = None,
auto_capitalize: Optional[ input_mode: Literal[
Union[ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
] ]
] = None, | Var[
content_editable: Optional[
Union[
Literal["inherit", "plaintext-only", False, True],
Var[Literal["inherit", "plaintext-only", False, True]],
]
] = None,
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -251,8 +207,8 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -324,20 +280,19 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
loading: Optional[Union[Var[bool], bool]] = None, loading: Var[bool] | bool | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -1,6 +1,6 @@
"""Interactive components provided by @radix-ui/themes.""" """Interactive components provided by @radix-ui/themes."""
from typing import Literal, Union from typing import Literal
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
@ -23,25 +23,25 @@ class Inset(elements.Div, RadixThemesComponent):
clip: Var[Responsive[Literal["border-box", "padding-box"]]] clip: Var[Responsive[Literal["border-box", "padding-box"]]]
# Padding # Padding
p: Var[Responsive[Union[int, str]]] p: Var[Responsive[int | str]]
# Padding on the x axis # Padding on the x axis
px: Var[Responsive[Union[int, str]]] px: Var[Responsive[int | str]]
# Padding on the y axis # Padding on the y axis
py: Var[Responsive[Union[int, str]]] py: Var[Responsive[int | str]]
# Padding on the top # Padding on the top
pt: Var[Responsive[Union[int, str]]] pt: Var[Responsive[int | str]]
# Padding on the right # Padding on the right
pr: Var[Responsive[Union[int, str]]] pr: Var[Responsive[int | str]]
# Padding on the bottom # Padding on the bottom
pb: Var[Responsive[Union[int, str]]] pb: Var[Responsive[int | str]]
# Padding on the left # Padding on the left
pl: Var[Responsive[Union[int, str]]] pl: Var[Responsive[int | str]]
inset = Inset.create inset = Inset.create

View File

@ -3,7 +3,7 @@
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------ # ------------------------------------------------------
from typing import Any, Literal, Optional, Union, overload from typing import Any, Literal, Optional, overload
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
@ -21,144 +21,85 @@ class Inset(elements.Div, RadixThemesComponent):
def create( # type: ignore def create( # type: ignore
cls, cls,
*children, *children,
side: Optional[ side: Breakpoints[str, Literal["bottom", "left", "right", "top", "x", "y"]]
Union[ | Literal["bottom", "left", "right", "top", "x", "y"]
Breakpoints[str, Literal["bottom", "left", "right", "top", "x", "y"]], | Var[
Literal["bottom", "left", "right", "top", "x", "y"], Breakpoints[str, Literal["bottom", "left", "right", "top", "x", "y"]]
Var[ | Literal["bottom", "left", "right", "top", "x", "y"]
Union[
Breakpoints[
str, Literal["bottom", "left", "right", "top", "x", "y"]
],
Literal["bottom", "left", "right", "top", "x", "y"],
] ]
], | None = None,
clip: Breakpoints[str, Literal["border-box", "padding-box"]]
| Literal["border-box", "padding-box"]
| Var[
Breakpoints[str, Literal["border-box", "padding-box"]]
| Literal["border-box", "padding-box"]
] ]
] = None, | None = None,
clip: Optional[ p: Breakpoints[str, int | str]
Union[ | Var[Breakpoints[str, int | str] | int | str]
Breakpoints[str, Literal["border-box", "padding-box"]], | int
Literal["border-box", "padding-box"], | str
Var[ | None = None,
Union[ px: Breakpoints[str, int | str]
Breakpoints[str, Literal["border-box", "padding-box"]], | Var[Breakpoints[str, int | str] | int | str]
Literal["border-box", "padding-box"], | int
| str
| None = None,
py: Breakpoints[str, int | str]
| Var[Breakpoints[str, int | str] | int | str]
| int
| str
| None = None,
pt: Breakpoints[str, int | str]
| Var[Breakpoints[str, int | str] | int | str]
| int
| str
| None = None,
pr: Breakpoints[str, int | str]
| Var[Breakpoints[str, int | str] | int | str]
| int
| str
| None = None,
pb: Breakpoints[str, int | str]
| Var[Breakpoints[str, int | str] | int | str]
| int
| str
| None = None,
pl: Breakpoints[str, int | str]
| Var[Breakpoints[str, int | str] | int | str]
| int
| str
| None = None,
access_key: Var[str] | str | None = None,
auto_capitalize: Literal[
"characters", "none", "off", "on", "sentences", "words"
] ]
], | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
| None = None,
content_editable: Literal["inherit", "plaintext-only", False, True]
| Var[Literal["inherit", "plaintext-only", False, True]]
| None = None,
context_menu: Var[str] | str | None = None,
dir: Var[str] | str | None = None,
draggable: Var[bool] | bool | None = None,
enter_key_hint: Literal[
"done", "enter", "go", "next", "previous", "search", "send"
] ]
] = None, | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
p: Optional[ | None = None,
Union[ hidden: Var[bool] | bool | None = None,
Breakpoints[str, Union[int, str]], input_mode: Literal[
Var[Union[Breakpoints[str, Union[int, str]], int, str]], "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
int,
str,
] ]
] = None, | Var[
px: Optional[
Union[
Breakpoints[str, Union[int, str]],
Var[Union[Breakpoints[str, Union[int, str]], int, str]],
int,
str,
]
] = None,
py: Optional[
Union[
Breakpoints[str, Union[int, str]],
Var[Union[Breakpoints[str, Union[int, str]], int, str]],
int,
str,
]
] = None,
pt: Optional[
Union[
Breakpoints[str, Union[int, str]],
Var[Union[Breakpoints[str, Union[int, str]], int, str]],
int,
str,
]
] = None,
pr: Optional[
Union[
Breakpoints[str, Union[int, str]],
Var[Union[Breakpoints[str, Union[int, str]], int, str]],
int,
str,
]
] = None,
pb: Optional[
Union[
Breakpoints[str, Union[int, str]],
Var[Union[Breakpoints[str, Union[int, str]], int, str]],
int,
str,
]
] = None,
pl: Optional[
Union[
Breakpoints[str, Union[int, str]],
Var[Union[Breakpoints[str, Union[int, str]], int, str]],
int,
str,
]
] = None,
access_key: Optional[Union[Var[str], str]] = None,
auto_capitalize: Optional[
Union[
Literal["characters", "none", "off", "on", "sentences", "words"],
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
]
] = None,
content_editable: Optional[
Union[
Literal["inherit", "plaintext-only", False, True],
Var[Literal["inherit", "plaintext-only", False, True]],
]
] = None,
context_menu: Optional[Union[Var[str], str]] = None,
dir: Optional[Union[Var[str], str]] = None,
draggable: Optional[Union[Var[bool], bool]] = None,
enter_key_hint: Optional[
Union[
Literal["done", "enter", "go", "next", "previous", "search", "send"],
Var[
Literal["done", "enter", "go", "next", "previous", "search", "send"]
],
]
] = None,
hidden: Optional[Union[Var[bool], bool]] = None,
input_mode: Optional[
Union[
Literal[ Literal[
"decimal", "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
],
Var[
Literal[
"decimal",
"email",
"none",
"numeric",
"search",
"tel",
"text",
"url",
] ]
],
] ]
] = None, | None = None,
item_prop: Optional[Union[Var[str], str]] = None, item_prop: Var[str] | str | None = None,
lang: Optional[Union[Var[str], str]] = None, lang: Var[str] | str | None = None,
role: Optional[ role: Literal[
Union[
Literal[
"alert", "alert",
"alertdialog", "alertdialog",
"application", "application",
@ -228,8 +169,8 @@ class Inset(elements.Div, RadixThemesComponent):
"tree", "tree",
"treegrid", "treegrid",
"treeitem", "treeitem",
], ]
Var[ | Var[
Literal[ Literal[
"alert", "alert",
"alertdialog", "alertdialog",
@ -301,19 +242,18 @@ class Inset(elements.Div, RadixThemesComponent):
"treegrid", "treegrid",
"treeitem", "treeitem",
] ]
],
] ]
] = None, | None = None,
slot: Optional[Union[Var[str], str]] = None, slot: Var[str] | str | None = None,
spell_check: Optional[Union[Var[bool], bool]] = None, spell_check: Var[bool] | bool | None = None,
tab_index: Optional[Union[Var[int], int]] = None, tab_index: Var[int] | int | None = None,
title: Optional[Union[Var[str], str]] = None, title: Var[str] | str | None = None,
style: Optional[Style] = None, style: Style | None = None,
key: Optional[Any] = None, key: Any | None = None,
id: Optional[Any] = None, id: Any | None = None,
class_name: Optional[Any] = None, class_name: Any | None = None,
autofocus: Optional[bool] = None, autofocus: bool | None = None,
custom_attrs: Optional[dict[str, Union[Var, Any]]] = None, custom_attrs: dict[str, Var | Any] | None = None,
on_blur: Optional[EventType[()]] = None, on_blur: Optional[EventType[()]] = None,
on_click: Optional[EventType[()]] = None, on_click: Optional[EventType[()]] = None,
on_context_menu: Optional[EventType[()]] = None, on_context_menu: Optional[EventType[()]] = None,

View File

@ -62,7 +62,7 @@ class PopoverContent(elements.Div, RadixThemesComponent):
avoid_collisions: Var[bool] avoid_collisions: Var[bool]
# The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0. # The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
collision_padding: Var[Union[float, int, dict[str, Union[float, int]]]] collision_padding: Var[Union[float, int, dict[str, float | int]]]
# The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial". # The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
sticky: Var[Literal["partial", "always"]] sticky: Var[Literal["partial", "always"]]

Some files were not shown because too many files have changed in this diff Show More