Merge 42fd69a93a
into c2917d46d5
This commit is contained in:
commit
907024f5af
@ -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
|
||||||
|
@ -25,12 +25,8 @@ from typing import (
|
|||||||
Callable,
|
Callable,
|
||||||
Coroutine,
|
Coroutine,
|
||||||
Dict,
|
Dict,
|
||||||
List,
|
|
||||||
MutableMapping,
|
MutableMapping,
|
||||||
Optional,
|
|
||||||
Set,
|
|
||||||
Type,
|
Type,
|
||||||
Union,
|
|
||||||
get_args,
|
get_args,
|
||||||
get_type_hints,
|
get_type_hints,
|
||||||
)
|
)
|
||||||
@ -169,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:
|
||||||
@ -252,16 +248,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:
|
||||||
@ -271,7 +267,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:
|
||||||
@ -292,13 +288,13 @@ 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: EventType[()] | None
|
||||||
meta: List[Dict[str, str]]
|
meta: list[dict[str, str]]
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass()
|
@dataclasses.dataclass()
|
||||||
@ -324,7 +320,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")
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -332,18 +328,18 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
style: ComponentStyle = dataclasses.field(default_factory=dict)
|
style: ComponentStyle = dataclasses.field(default_factory=dict)
|
||||||
|
|
||||||
# A list of URLs to [stylesheets](https://reflex.dev/docs/styling/custom-stylesheets/) to include in the app.
|
# A list of URLs to [stylesheets](https://reflex.dev/docs/styling/custom-stylesheets/) to include in the app.
|
||||||
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"): (
|
||||||
@ -358,24 +354,24 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Components to add to the head of every page.
|
# Components to add to the head of every page.
|
||||||
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: dict[str, str] | None = None
|
||||||
|
|
||||||
# A map from a route to an unevaluated page.
|
# A map from a route to an unevaluated page.
|
||||||
_unevaluated_pages: Dict[str, UnevaluatedPage] = dataclasses.field(
|
_unevaluated_pages: dict[str, UnevaluatedPage] = dataclasses.field(
|
||||||
default_factory=dict
|
default_factory=dict
|
||||||
)
|
)
|
||||||
|
|
||||||
# A map from a page route to the component to render. Users should use `add_page`.
|
# A map from a page route to the component to render. Users should use `add_page`.
|
||||||
_pages: Dict[str, Component] = dataclasses.field(default_factory=dict)
|
_pages: dict[str, Component] = dataclasses.field(default_factory=dict)
|
||||||
|
|
||||||
# A mapping of pages which created states as they were being evaluated.
|
# A mapping of pages which created states as they were being evaluated.
|
||||||
_stateful_pages: Dict[str, None] = dataclasses.field(default_factory=dict)
|
_stateful_pages: Dict[str, None] = dataclasses.field(default_factory=dict)
|
||||||
@ -384,24 +380,24 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
_api: FastAPI | None = None
|
_api: FastAPI | None = None
|
||||||
|
|
||||||
# The state class to use for the app.
|
# The state class to use for the app.
|
||||||
_state: Optional[Type[BaseState]] = None
|
_state: Type[BaseState] | None = 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(
|
||||||
default_factory=dict
|
default_factory=dict
|
||||||
)
|
)
|
||||||
|
|
||||||
# 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)
|
||||||
|
|
||||||
# Frontend Error Handler Function
|
# Frontend Error Handler Function
|
||||||
frontend_exception_handler: Callable[[Exception], None] = (
|
frontend_exception_handler: Callable[[Exception], None] = (
|
||||||
@ -410,7 +406,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
|
|
||||||
# Backend Error Handler Function
|
# Backend Error Handler Function
|
||||||
backend_exception_handler: Callable[
|
backend_exception_handler: Callable[
|
||||||
[Exception], Union[EventSpec, List[EventSpec], None]
|
[Exception], EventSpec | list[EventSpec] | None
|
||||||
] = default_backend_exception_handler
|
] = default_backend_exception_handler
|
||||||
|
|
||||||
# Put the toast provider in the app wrap.
|
# Put the toast provider in the app wrap.
|
||||||
@ -897,7 +893,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
|
|
||||||
admin.mount_to(self.api)
|
admin.mount_to(self.api)
|
||||||
|
|
||||||
def _get_frontend_packages(self, imports: Dict[str, set[ImportVar]]):
|
def _get_frontend_packages(self, imports: dict[str, set[ImportVar]]):
|
||||||
"""Gets the frontend packages to be installed and filters out the unnecessary ones.
|
"""Gets the frontend packages to be installed and filters out the unnecessary ones.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1008,9 +1004,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
for render, kwargs in DECORATED_PAGES[get_config().app_name]:
|
for render, kwargs in DECORATED_PAGES[get_config().app_name]:
|
||||||
self.add_page(render, **kwargs)
|
self.add_page(render, **kwargs)
|
||||||
|
|
||||||
def _validate_var_dependencies(
|
def _validate_var_dependencies(self, state: Type[BaseState] | None = None) -> None:
|
||||||
self, state: Optional[Type[BaseState]] = None
|
|
||||||
) -> None:
|
|
||||||
"""Validate the dependencies of the vars in the app.
|
"""Validate the dependencies of the vars in the app.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1082,7 +1076,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
self.style = evaluate_style_namespaces(self.style)
|
self.style = evaluate_style_namespaces(self.style)
|
||||||
|
|
||||||
# Add the app wrappers.
|
# Add the app wrappers.
|
||||||
app_wrappers: Dict[tuple[int, str], Component] = {
|
app_wrappers: dict[tuple[int, str], Component] = {
|
||||||
# Default app wrap component renders {children}
|
# Default app wrap component renders {children}
|
||||||
(0, "AppWrap"): AppWrap.create()
|
(0, "AppWrap"): AppWrap.create()
|
||||||
}
|
}
|
||||||
@ -1550,8 +1544,8 @@ 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
|
||||||
)
|
)
|
||||||
@ -1559,7 +1553,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
if not valid:
|
if not valid:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Provided custom {handler_domain} exception handler `{_fn_name}` has the wrong return type."
|
f"Provided custom {handler_domain} exception handler `{_fn_name}` has the wrong return type."
|
||||||
f"Expected `Union[EventSpec, List[EventSpec], None]` but got `{return_type}`"
|
f"Expected `EventSpec | list[EventSpec] | None` but got `{return_type}`"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -1699,7 +1693,7 @@ def upload(app: App):
|
|||||||
The upload function.
|
The upload function.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
async def upload_file(request: Request, files: List[FastAPIUploadFile]):
|
async def upload_file(request: Request, files: list[FastAPIUploadFile]):
|
||||||
"""Upload a file.
|
"""Upload a file.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1739,7 +1733,7 @@ def upload(app: App):
|
|||||||
# get handler function
|
# get handler function
|
||||||
func = getattr(type(current_state), handler.split(".")[-1])
|
func = getattr(type(current_state), handler.split(".")[-1])
|
||||||
|
|
||||||
# check if there exists any handler args with annotation, List[UploadFile]
|
# check if there exists any handler args with annotation, list[UploadFile]
|
||||||
if isinstance(func, EventHandler):
|
if isinstance(func, EventHandler):
|
||||||
if func.is_background:
|
if func.is_background:
|
||||||
raise UploadTypeError(
|
raise UploadTypeError(
|
||||||
@ -1759,7 +1753,7 @@ def upload(app: App):
|
|||||||
if not handler_upload_param:
|
if not handler_upload_param:
|
||||||
raise UploadValueError(
|
raise UploadValueError(
|
||||||
f"`{handler}` handler should have a parameter annotated as "
|
f"`{handler}` handler should have a parameter annotated as "
|
||||||
"List[rx.UploadFile]"
|
"list[rx.UploadFile]"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Make a copy of the files as they are closed after the request.
|
# Make a copy of the files as they are closed after the request.
|
||||||
|
@ -7,7 +7,7 @@ import contextlib
|
|||||||
import dataclasses
|
import dataclasses
|
||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
from typing import Callable, Coroutine, Set, 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
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import dataclasses
|
import dataclasses
|
||||||
from typing import List
|
|
||||||
|
|
||||||
from reflex.event import Event
|
from reflex.event import Event
|
||||||
from reflex.middleware import HydrateMiddleware, Middleware
|
from reflex.middleware import HydrateMiddleware, Middleware
|
||||||
@ -18,7 +17,7 @@ class MiddlewareMixin(AppMixin):
|
|||||||
"""Middleware Mixin that allow to add middleware to the app."""
|
"""Middleware Mixin that allow to add middleware to the app."""
|
||||||
|
|
||||||
# Middleware to add to the app. Users should use `add_middleware`. PRIVATE.
|
# Middleware to add to the app. Users should use `add_middleware`. PRIVATE.
|
||||||
middleware: List[Middleware] = dataclasses.field(default_factory=list)
|
middleware: list[Middleware] = dataclasses.field(default_factory=list)
|
||||||
|
|
||||||
def _init_mixin(self):
|
def _init_mixin(self):
|
||||||
self.middleware.append(HydrateMiddleware())
|
self.middleware.append(HydrateMiddleware())
|
||||||
|
@ -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.
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from typing import TYPE_CHECKING, Any, List, Type
|
from typing import TYPE_CHECKING, Any, Type
|
||||||
|
|
||||||
import pydantic.v1.main as pydantic_main
|
import pydantic.v1.main as pydantic_main
|
||||||
from pydantic.v1 import BaseModel
|
from pydantic.v1 import BaseModel
|
||||||
from pydantic.v1.fields import ModelField
|
from pydantic.v1.fields import ModelField
|
||||||
|
|
||||||
|
|
||||||
def validate_field_name(bases: List[Type["BaseModel"]], field_name: str) -> None:
|
def validate_field_name(bases: list[Type["BaseModel"]], field_name: str) -> None:
|
||||||
"""Ensure that the field's name does not shadow an existing attribute of the model.
|
"""Ensure that the field's name does not shadow an existing attribute of the model.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -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, Dict, Iterable, Optional, Sequence, Tuple, Type, Union
|
from typing import TYPE_CHECKING, Iterable, Sequence, Type
|
||||||
|
|
||||||
from reflex import constants
|
from reflex import constants
|
||||||
from reflex.compiler import templates, utils
|
from reflex.compiler import templates, utils
|
||||||
@ -94,7 +94,7 @@ def _compile_theme(theme: str) -> str:
|
|||||||
return templates.THEME.render(theme=theme)
|
return templates.THEME.render(theme=theme)
|
||||||
|
|
||||||
|
|
||||||
def _compile_contexts(state: Optional[Type[BaseState]], theme: Component | None) -> str:
|
def _compile_contexts(state: Type[BaseState] | None, theme: Component | None) -> str:
|
||||||
"""Compile the initial state and contexts.
|
"""Compile the initial state and contexts.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -219,7 +219,7 @@ def _compile_component(component: Component | StatefulComponent) -> str:
|
|||||||
|
|
||||||
def _compile_components(
|
def _compile_components(
|
||||||
components: set[CustomComponent],
|
components: set[CustomComponent],
|
||||||
) -> tuple[str, Dict[str, list[ImportVar]]]:
|
) -> tuple[str, dict[str, list[ImportVar]]]:
|
||||||
"""Compile the components.
|
"""Compile the components.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -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: dict[str, Var | str] | None = None,
|
||||||
) -> tuple[str, str]:
|
) -> tuple[str, str]:
|
||||||
"""Compile the document root.
|
"""Compile the document root.
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ def compile_theme(style: ComponentStyle) -> tuple[str, str]:
|
|||||||
|
|
||||||
|
|
||||||
def compile_contexts(
|
def compile_contexts(
|
||||||
state: Optional[Type[BaseState]],
|
state: Type[BaseState] | None,
|
||||||
theme: Component | None,
|
theme: Component | None,
|
||||||
) -> tuple[str, str]:
|
) -> tuple[str, str]:
|
||||||
"""Compile the initial state / context.
|
"""Compile the initial state / context.
|
||||||
@ -456,7 +456,7 @@ def compile_page(
|
|||||||
|
|
||||||
def compile_components(
|
def compile_components(
|
||||||
components: set[CustomComponent],
|
components: set[CustomComponent],
|
||||||
) -> tuple[str, str, Dict[str, list[ImportVar]]]:
|
) -> tuple[str, str, dict[str, list[ImportVar]]]:
|
||||||
"""Compile the custom components.
|
"""Compile the custom components.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -594,7 +594,7 @@ def compile_unevaluated_page(
|
|||||||
state: Type[BaseState] | None = None,
|
state: Type[BaseState] | None = None,
|
||||||
style: ComponentStyle | None = None,
|
style: ComponentStyle | None = None,
|
||||||
theme: Component | None = None,
|
theme: Component | None = None,
|
||||||
) -> Tuple[Component, bool]:
|
) -> tuple[Component, bool]:
|
||||||
"""Compiles an uncompiled page into a component and adds meta information.
|
"""Compiles an uncompiled page into a component and adds meta information.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -679,9 +679,9 @@ class ExecutorSafeFunctions:
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
COMPONENTS: Dict[str, BaseComponent] = {}
|
COMPONENTS: dict[str, BaseComponent] = {}
|
||||||
UNCOMPILED_PAGES: Dict[str, UnevaluatedPage] = {}
|
UNCOMPILED_PAGES: dict[str, UnevaluatedPage] = {}
|
||||||
STATE: Optional[Type[BaseState]] = None
|
STATE: Type[BaseState] | None = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def compile_page(cls, route: str) -> tuple[str, str]:
|
def compile_page(cls, route: str) -> tuple[str, str]:
|
||||||
|
@ -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, Dict, Optional, Type, Union
|
from typing import Any, Callable, 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: dict[str, Var | str] | None = None,
|
||||||
) -> Component:
|
) -> Component:
|
||||||
"""Create the document root.
|
"""Create the document root.
|
||||||
|
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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):
|
||||||
|
@ -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, 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,
|
||||||
@ -62,13 +62,13 @@ class Html(NextDocumentLib):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
lang: Optional[str] = None,
|
lang: 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,
|
||||||
@ -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,
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Dict, Tuple
|
|
||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.datadisplay.logo import svg_logo
|
from reflex.components.datadisplay.logo import svg_logo
|
||||||
from reflex.components.el import a, button, details, div, h2, hr, p, pre, summary
|
from reflex.components.el import a, button, details, div, h2, hr, p, pre, summary
|
||||||
@ -15,8 +13,8 @@ from reflex.vars.object import ObjectVar
|
|||||||
|
|
||||||
|
|
||||||
def on_error_spec(
|
def on_error_spec(
|
||||||
error: ObjectVar[Dict[str, str]], info: ObjectVar[Dict[str, str]]
|
error: ObjectVar[dict[str, str]], info: ObjectVar[dict[str, str]]
|
||||||
) -> Tuple[Var[str], Var[str]]:
|
) -> tuple[Var[str], Var[str]]:
|
||||||
"""The spec for the on_error event handler.
|
"""The spec for the on_error event handler.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -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, Optional, Tuple, 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
|
||||||
@ -12,8 +12,8 @@ from reflex.vars.base import Var
|
|||||||
from reflex.vars.object import ObjectVar
|
from reflex.vars.object import ObjectVar
|
||||||
|
|
||||||
def on_error_spec(
|
def on_error_spec(
|
||||||
error: ObjectVar[Dict[str, str]], info: ObjectVar[Dict[str, str]]
|
error: ObjectVar[dict[str, str]], info: ObjectVar[dict[str, str]]
|
||||||
) -> Tuple[Var[str], Var[str]]: ...
|
) -> tuple[Var[str], Var[str]]: ...
|
||||||
|
|
||||||
class ErrorBoundary(Component):
|
class ErrorBoundary(Component):
|
||||||
@overload
|
@overload
|
||||||
@ -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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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):
|
||||||
|
@ -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, 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,
|
||||||
@ -63,17 +63,17 @@ class Meta(Component):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
char_set: Optional[str] = None,
|
char_set: str | None = None,
|
||||||
content: Optional[str] = None,
|
content: str | None = None,
|
||||||
name: Optional[str] = None,
|
name: str | None = None,
|
||||||
property: Optional[str] = None,
|
property: str | None = None,
|
||||||
http_equiv: Optional[str] = None,
|
http_equiv: 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,
|
||||||
@ -119,17 +119,17 @@ class Description(Meta):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
name: Optional[str] = None,
|
name: str | None = None,
|
||||||
char_set: Optional[str] = None,
|
char_set: str | None = None,
|
||||||
content: Optional[str] = None,
|
content: str | None = None,
|
||||||
property: Optional[str] = None,
|
property: str | None = None,
|
||||||
http_equiv: Optional[str] = None,
|
http_equiv: 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,
|
||||||
@ -175,17 +175,17 @@ class Image(Meta):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
property: Optional[str] = None,
|
property: str | None = None,
|
||||||
char_set: Optional[str] = None,
|
char_set: str | None = None,
|
||||||
content: Optional[str] = None,
|
content: str | None = None,
|
||||||
name: Optional[str] = None,
|
name: str | None = None,
|
||||||
http_equiv: Optional[str] = None,
|
http_equiv: 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -14,10 +14,8 @@ from typing import (
|
|||||||
Any,
|
Any,
|
||||||
Callable,
|
Callable,
|
||||||
ClassVar,
|
ClassVar,
|
||||||
Dict,
|
|
||||||
Iterator,
|
Iterator,
|
||||||
List,
|
List,
|
||||||
Optional,
|
|
||||||
Sequence,
|
Sequence,
|
||||||
Set,
|
Set,
|
||||||
Type,
|
Type,
|
||||||
@ -76,19 +74,19 @@ class BaseComponent(Base, ABC):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# The children nested within the component.
|
# The children nested within the component.
|
||||||
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] = []
|
||||||
|
|
||||||
# List here the dependencies that need to be transpiled by Next.js
|
# List here the dependencies that need to be transpiled by Next.js
|
||||||
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:
|
||||||
@ -175,10 +173,8 @@ def evaluate_style_namespaces(style: ComponentStyle) -> dict:
|
|||||||
|
|
||||||
|
|
||||||
# Map from component to styling.
|
# Map from component to styling.
|
||||||
ComponentStyle = Dict[
|
ComponentStyle = dict[str | Type[BaseComponent] | Callable | ComponentNamespace, Any]
|
||||||
Union[str, Type[BaseComponent], Callable, ComponentNamespace], Any
|
ComponentChild = types.PrimitiveType | Var | BaseComponent
|
||||||
]
|
|
||||||
ComponentChild = Union[types.PrimitiveType, Var, BaseComponent]
|
|
||||||
ComponentChildTypes = (*types.PrimitiveTypes, Var, BaseComponent)
|
ComponentChildTypes = (*types.PrimitiveTypes, Var, BaseComponent)
|
||||||
|
|
||||||
|
|
||||||
@ -221,13 +217,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
|
||||||
@ -239,31 +235,31 @@ class Component(BaseComponent, ABC):
|
|||||||
class_name: Any = None
|
class_name: Any = None
|
||||||
|
|
||||||
# Special component props.
|
# Special component props.
|
||||||
special_props: List[Var] = []
|
special_props: list[Var] = []
|
||||||
|
|
||||||
# Whether the component should take the focus once the page is loaded
|
# Whether the component should take the focus once the page is loaded
|
||||||
autofocus: bool = False
|
autofocus: bool = False
|
||||||
|
|
||||||
# components that cannot be children
|
# components that cannot be children
|
||||||
_invalid_children: List[str] = []
|
_invalid_children: list[str] = []
|
||||||
|
|
||||||
# only components that are allowed as children
|
# only components that are allowed as children
|
||||||
_valid_children: List[str] = []
|
_valid_children: list[str] = []
|
||||||
|
|
||||||
# only components that are allowed as parent
|
# only components that are allowed as parent
|
||||||
_valid_parents: List[str] = []
|
_valid_parents: list[str] = []
|
||||||
|
|
||||||
# props to change the name of
|
# props to change the name of
|
||||||
_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()
|
||||||
|
|
||||||
# State class associated with this component instance
|
# State class associated with this component instance
|
||||||
State: Optional[Type[reflex.state.State]] = None
|
State: Type[reflex.state.State] | None = None
|
||||||
|
|
||||||
def add_imports(self) -> ImportDict | list[ImportDict]:
|
def add_imports(self) -> ImportDict | list[ImportDict]:
|
||||||
"""Add imports for the component.
|
"""Add imports for the component.
|
||||||
@ -550,7 +546,7 @@ class Component(BaseComponent, ABC):
|
|||||||
if isinstance(class_name, (List, tuple)):
|
if isinstance(class_name, (List, tuple)):
|
||||||
if any(isinstance(c, Var) for c in class_name):
|
if any(isinstance(c, Var) for c in class_name):
|
||||||
kwargs["class_name"] = LiteralArrayVar.create(
|
kwargs["class_name"] = LiteralArrayVar.create(
|
||||||
class_name, _var_type=List[str]
|
class_name, _var_type=list[str]
|
||||||
).join(" ")
|
).join(" ")
|
||||||
else:
|
else:
|
||||||
kwargs["class_name"] = " ".join(class_name)
|
kwargs["class_name"] = " ".join(class_name)
|
||||||
@ -560,13 +556,13 @@ class Component(BaseComponent, ABC):
|
|||||||
|
|
||||||
def get_event_triggers(
|
def get_event_triggers(
|
||||||
self,
|
self,
|
||||||
) -> Dict[str, types.ArgsSpec | Sequence[types.ArgsSpec]]:
|
) -> dict[str, types.ArgsSpec | Sequence[types.ArgsSpec]]:
|
||||||
"""Get the event triggers for the component.
|
"""Get the event triggers for the component.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The event triggers.
|
The event triggers.
|
||||||
"""
|
"""
|
||||||
default_triggers: Dict[str, types.ArgsSpec | Sequence[types.ArgsSpec]] = {
|
default_triggers: dict[str, types.ArgsSpec | Sequence[types.ArgsSpec]] = {
|
||||||
EventTriggers.ON_FOCUS: no_args_event_spec,
|
EventTriggers.ON_FOCUS: no_args_event_spec,
|
||||||
EventTriggers.ON_BLUR: no_args_event_spec,
|
EventTriggers.ON_BLUR: no_args_event_spec,
|
||||||
EventTriggers.ON_CLICK: no_args_event_spec,
|
EventTriggers.ON_CLICK: no_args_event_spec,
|
||||||
@ -670,7 +666,7 @@ class Component(BaseComponent, ABC):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@lru_cache(maxsize=None)
|
@lru_cache(maxsize=None)
|
||||||
def get_props(cls) -> Set[str]:
|
def get_props(cls) -> set[str]:
|
||||||
"""Get the unique fields for the component.
|
"""Get the unique fields for the component.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -680,7 +676,7 @@ class Component(BaseComponent, ABC):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@lru_cache(maxsize=None)
|
@lru_cache(maxsize=None)
|
||||||
def get_initial_props(cls) -> Set[str]:
|
def get_initial_props(cls) -> set[str]:
|
||||||
"""Get the initial props to set for the component.
|
"""Get the initial props to set for the component.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -829,7 +825,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.
|
||||||
|
|
||||||
@ -928,7 +924,7 @@ class Component(BaseComponent, ABC):
|
|||||||
if prop.startswith(old_prop):
|
if prop.startswith(old_prop):
|
||||||
rendered_dict["props"][ix] = prop.replace(old_prop, new_prop, 1)
|
rendered_dict["props"][ix] = prop.replace(old_prop, new_prop, 1)
|
||||||
|
|
||||||
def _validate_component_children(self, children: List[Component]):
|
def _validate_component_children(self, children: list[Component]):
|
||||||
"""Validate the children components.
|
"""Validate the children components.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1038,7 +1034,7 @@ class Component(BaseComponent, ABC):
|
|||||||
Each var referenced by the component (props, styles, event handlers).
|
Each var referenced by the component (props, styles, event handlers).
|
||||||
"""
|
"""
|
||||||
ignore_ids = ignore_ids or set()
|
ignore_ids = ignore_ids or set()
|
||||||
vars: List[Var] | None = getattr(self, "__vars", None)
|
vars: list[Var] | None = getattr(self, "__vars", None)
|
||||||
if vars is not None:
|
if vars is not None:
|
||||||
yield from vars
|
yield from vars
|
||||||
vars = self.__vars = []
|
vars = self.__vars = []
|
||||||
@ -1211,7 +1207,7 @@ class Component(BaseComponent, ABC):
|
|||||||
"""
|
"""
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def _get_all_dynamic_imports(self) -> Set[str]:
|
def _get_all_dynamic_imports(self) -> set[str]:
|
||||||
"""Get dynamic imports for the component and its children.
|
"""Get dynamic imports for the component and its children.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -1578,7 +1574,7 @@ class Component(BaseComponent, ABC):
|
|||||||
|
|
||||||
def _get_all_custom_components(
|
def _get_all_custom_components(
|
||||||
self, seen: set[str] | None = None
|
self, seen: set[str] | None = None
|
||||||
) -> Set[CustomComponent]:
|
) -> set[CustomComponent]:
|
||||||
"""Get all the custom components used by the component.
|
"""Get all the custom components used by the component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1661,7 +1657,7 @@ class CustomComponent(Component):
|
|||||||
component_fn: Callable[..., Component] = Component.create
|
component_fn: Callable[..., Component] = Component.create
|
||||||
|
|
||||||
# The props of the component.
|
# The props of the component.
|
||||||
props: Dict[str, Any] = {}
|
props: dict[str, Any] = {}
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
"""Initialize the custom component.
|
"""Initialize the custom component.
|
||||||
@ -1780,7 +1776,7 @@ class CustomComponent(Component):
|
|||||||
return hash(self.tag)
|
return hash(self.tag)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_props(cls) -> Set[str]:
|
def get_props(cls) -> set[str]:
|
||||||
"""Get the props for the component.
|
"""Get the props for the component.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -1790,7 +1786,7 @@ class CustomComponent(Component):
|
|||||||
|
|
||||||
def _get_all_custom_components(
|
def _get_all_custom_components(
|
||||||
self, seen: set[str] | None = None
|
self, seen: set[str] | None = None
|
||||||
) -> Set[CustomComponent]:
|
) -> set[CustomComponent]:
|
||||||
"""Get all the custom components used by the component.
|
"""Get all the custom components used by the component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1942,7 +1938,7 @@ class StatefulComponent(BaseComponent):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# A lookup table to caching memoized component instances.
|
# A lookup table to caching memoized component instances.
|
||||||
tag_to_stateful_component: ClassVar[Dict[str, StatefulComponent]] = {}
|
tag_to_stateful_component: ClassVar[dict[str, StatefulComponent]] = {}
|
||||||
|
|
||||||
# Reference to the original component that was memoized into this component.
|
# Reference to the original component that was memoized into this component.
|
||||||
component: Component
|
component: Component
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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
|
||||||
@ -197,7 +195,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:
|
||||||
@ -227,7 +225,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:
|
||||||
|
@ -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, 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,
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Dict, Tuple, TypeVar, Union
|
from typing import TypeVar
|
||||||
|
|
||||||
breakpoints_values = ["30em", "48em", "62em", "80em", "96em"]
|
breakpoints_values = ["30em", "48em", "62em", "80em", "96em"]
|
||||||
breakpoint_names = ["xs", "sm", "md", "lg", "xl"]
|
breakpoint_names = ["xs", "sm", "md", "lg", "xl"]
|
||||||
|
|
||||||
|
|
||||||
def set_breakpoints(values: Tuple[str, str, str, str, str]):
|
def set_breakpoints(values: tuple[str, str, str, str, str]):
|
||||||
"""Overwrite default breakpoint values.
|
"""Overwrite default breakpoint values.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -22,7 +22,7 @@ K = TypeVar("K", bound=str)
|
|||||||
V = TypeVar("V")
|
V = TypeVar("V")
|
||||||
|
|
||||||
|
|
||||||
class Breakpoints(Dict[K, V]):
|
class Breakpoints(dict[K, V]):
|
||||||
"""A responsive styling helper."""
|
"""A responsive styling helper."""
|
||||||
|
|
||||||
def factorize(self):
|
def factorize(self):
|
||||||
@ -46,7 +46,7 @@ class Breakpoints(Dict[K, V]):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def create(
|
def create(
|
||||||
cls,
|
cls,
|
||||||
custom: Dict[K, V] | None = None,
|
custom: dict[K, V] | None = None,
|
||||||
initial: V | None = None,
|
initial: V | None = None,
|
||||||
xs: V | None = None,
|
xs: V | None = None,
|
||||||
sm: V | None = None,
|
sm: V | None = None,
|
||||||
@ -94,4 +94,4 @@ breakpoints = Breakpoints.create
|
|||||||
|
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
Responsive = Union[T, Breakpoints[str, T]]
|
Responsive = T | Breakpoints[str, T]
|
||||||
|
@ -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, 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,
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Dict, List, Tuple, 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
|
||||||
@ -18,13 +16,13 @@ class Clipboard(Fragment):
|
|||||||
"""Clipboard component."""
|
"""Clipboard component."""
|
||||||
|
|
||||||
# The element ids to attach the event listener to. Defaults to all child components or the document.
|
# The element ids to attach the event listener to. Defaults to all child components or the document.
|
||||||
targets: Var[List[str]]
|
targets: Var[list[str]]
|
||||||
|
|
||||||
# Called when the user pastes data into the document. Data is a list of tuples of (mime_type, data). Binary types will be base64 encoded as a data uri.
|
# Called when the user pastes data into the document. Data is a list of tuples of (mime_type, data). Binary types will be base64 encoded as a data uri.
|
||||||
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):
|
||||||
|
@ -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, 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[List[str], Var[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[Dict[str, Union[bool, int]], Var[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,
|
||||||
|
@ -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.
|
||||||
|
|
||||||
|
@ -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]
|
||||||
|
@ -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, 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,
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
"""A html component."""
|
"""A html component."""
|
||||||
|
|
||||||
from typing import Dict
|
|
||||||
|
|
||||||
from reflex.components.el.elements.typography import Div
|
from reflex.components.el.elements.typography import Div
|
||||||
from reflex.vars.base import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
@ -14,7 +12,7 @@ class Html(Div):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# The HTML to render.
|
# The HTML to render.
|
||||||
dangerouslySetInnerHTML: Var[Dict[str, str]] # noqa: N815
|
dangerouslySetInnerHTML: Var[dict[str, str]] # noqa: N815
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, *children, **props):
|
def create(cls, *children, **props):
|
||||||
|
@ -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, 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[Dict[str, str], Var[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,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"""rx.match."""
|
"""rx.match."""
|
||||||
|
|
||||||
import textwrap
|
import textwrap
|
||||||
from typing import Any, Dict, List, Optional, Tuple, 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
|
||||||
@ -21,13 +21,13 @@ class Match(MemoizationLeaf):
|
|||||||
cond: Var[Any]
|
cond: Var[Any]
|
||||||
|
|
||||||
# The list of match cases to be matched.
|
# The list of match cases to be matched.
|
||||||
match_cases: List[Any] = []
|
match_cases: list[Any] = []
|
||||||
|
|
||||||
# The catchall case to match.
|
# The catchall case to match.
|
||||||
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:
|
||||||
@ -125,7 +123,7 @@ class Match(MemoizationLeaf):
|
|||||||
return case_element
|
return case_element
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _process_match_cases(cls, cases: List) -> List[List[Var]]:
|
def _process_match_cases(cls, cases: List) -> list[list[Var]]:
|
||||||
"""Process the individual match cases.
|
"""Process the individual match cases.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -166,7 +164,7 @@ class Match(MemoizationLeaf):
|
|||||||
return match_cases
|
return match_cases
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _validate_return_types(cls, match_cases: List[List[Var]]) -> None:
|
def _validate_return_types(cls, match_cases: list[list[Var]]) -> None:
|
||||||
"""Validate that match cases have the same return types.
|
"""Validate that match cases have the same return types.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -195,9 +193,9 @@ class Match(MemoizationLeaf):
|
|||||||
def _create_match_cond_var_or_component(
|
def _create_match_cond_var_or_component(
|
||||||
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:
|
||||||
|
@ -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, 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,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Callable, ClassVar, Dict, List, Optional, Tuple
|
from typing import Any, Callable, ClassVar, List
|
||||||
|
|
||||||
from reflex.components.base.fragment import Fragment
|
from reflex.components.base.fragment import Fragment
|
||||||
from reflex.components.component import (
|
from reflex.components.component import (
|
||||||
@ -86,7 +86,7 @@ def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> Var:
|
|||||||
id_var = LiteralStringVar.create(id_)
|
id_var = LiteralStringVar.create(id_)
|
||||||
return Var(
|
return Var(
|
||||||
_js_expr=f"(filesById[{id_var!s}] ? filesById[{id_var!s}].map((f) => (f.path || f.name)) : [])",
|
_js_expr=f"(filesById[{id_var!s}] ? filesById[{id_var!s}].map((f) => (f.path || f.name)) : [])",
|
||||||
_var_type=List[str],
|
_var_type=list[str],
|
||||||
_var_data=VarData.merge(
|
_var_data=VarData.merge(
|
||||||
upload_files_context_var_data, id_var._get_all_var_data()
|
upload_files_context_var_data, id_var._get_all_var_data()
|
||||||
),
|
),
|
||||||
@ -161,7 +161,7 @@ def get_upload_url(file_path: str | Var[str]) -> Var[str]:
|
|||||||
return Var.create(f"{uploaded_files_url_prefix}/{file_path}")
|
return Var.create(f"{uploaded_files_url_prefix}/{file_path}")
|
||||||
|
|
||||||
|
|
||||||
def _on_drop_spec(files: Var) -> Tuple[Var[Any]]:
|
def _on_drop_spec(files: Var) -> tuple[Var[Any]]:
|
||||||
"""Args spec for the on_drop event trigger.
|
"""Args spec for the on_drop event trigger.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -197,7 +197,7 @@ class Upload(MemoizationLeaf):
|
|||||||
# The list of accepted file types. This should be a dictionary of MIME types as keys and array of file formats as
|
# The list of accepted file types. This should be a dictionary of MIME types as keys and array of file formats as
|
||||||
# values.
|
# values.
|
||||||
# supported MIME types: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
# supported MIME types: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
||||||
accept: Var[Optional[Dict[str, List]]]
|
accept: Var[dict[str, List] | None]
|
||||||
|
|
||||||
# Whether the dropzone is disabled.
|
# Whether the dropzone is disabled.
|
||||||
disabled: Var[bool]
|
disabled: Var[bool]
|
||||||
|
@ -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, Dict, 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[Dict[str, List], Var[Optional[Dict[str, List]]]]] = None,
|
accept: Var[dict[str, List] | None] | 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[Dict[str, List], Var[Optional[Dict[str, List]]]]] = None,
|
accept: Var[dict[str, List] | None] | 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[Dict[str, List], Var[Optional[Dict[str, List]]]]] = None,
|
accept: Var[dict[str, List] | None] | 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,
|
||||||
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import typing
|
import typing
|
||||||
from typing import ClassVar, Dict, 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(
|
||||||
|
@ -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, Dict, 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[Dict[str, str], Var[Dict[str, str]]]] = None,
|
code_tag_props: Var[dict[str, str]] | dict[str, str] | 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,
|
||||||
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[Dict[str, str], Var[Dict[str, str]]]] = None,
|
code_tag_props: Var[dict[str, str]] | dict[str, str] | 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,
|
||||||
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,
|
||||||
|
@ -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, List, Literal, Optional, Tuple, TypedDict, Union
|
from typing import Any, Dict, Literal, 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
|
||||||
|
|
||||||
@ -148,14 +148,14 @@ class GroupHeaderClickedEventArgs(TypedDict):
|
|||||||
class GridCell(TypedDict):
|
class GridCell(TypedDict):
|
||||||
"""The grid cell."""
|
"""The grid cell."""
|
||||||
|
|
||||||
span: Optional[List[int]]
|
span: list[int] | None
|
||||||
|
|
||||||
|
|
||||||
class GridColumn(TypedDict):
|
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):
|
||||||
@ -164,7 +164,7 @@ class DataEditor(NoSSRComponent):
|
|||||||
tag = "DataEditor"
|
tag = "DataEditor"
|
||||||
is_default = True
|
is_default = True
|
||||||
library: str | None = "@glideapps/glide-data-grid@^6.0.3"
|
library: str | None = "@glideapps/glide-data-grid@^6.0.3"
|
||||||
lib_dependencies: List[str] = [
|
lib_dependencies: list[str] = [
|
||||||
"lodash@^4.17.21",
|
"lodash@^4.17.21",
|
||||||
"react-responsive-carousel@^3.2.7",
|
"react-responsive-carousel@^3.2.7",
|
||||||
]
|
]
|
||||||
@ -173,10 +173,10 @@ class DataEditor(NoSSRComponent):
|
|||||||
rows: Var[int]
|
rows: Var[int]
|
||||||
|
|
||||||
# Headers of the columns for the data grid.
|
# Headers of the columns for the data grid.
|
||||||
columns: Var[List[Dict[str, Any]]]
|
columns: Var[list[dict[str, Any]]]
|
||||||
|
|
||||||
# The data.
|
# The data.
|
||||||
data: Var[List[List[Any]]]
|
data: Var[list[list[Any]]]
|
||||||
|
|
||||||
# The name of the callback used to find the data to display.
|
# The name of the callback used to find the data to display.
|
||||||
get_cell_content: Var[str]
|
get_cell_content: Var[str]
|
||||||
@ -257,23 +257,23 @@ 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])]
|
||||||
|
|
||||||
# Fired when a cell is clicked.
|
# Fired when a cell is clicked.
|
||||||
on_cell_clicked: EventHandler[passthrough_event_spec(Tuple[int, int])]
|
on_cell_clicked: EventHandler[passthrough_event_spec(tuple[int, int])]
|
||||||
|
|
||||||
# Fired when a cell is right-clicked.
|
# Fired when a cell is right-clicked.
|
||||||
on_cell_context_menu: EventHandler[passthrough_event_spec(Tuple[int, int])]
|
on_cell_context_menu: EventHandler[passthrough_event_spec(tuple[int, int])]
|
||||||
|
|
||||||
# Fired when a cell is edited.
|
# Fired when a cell is edited.
|
||||||
on_cell_edited: EventHandler[passthrough_event_spec(Tuple[int, int], GridCell)]
|
on_cell_edited: EventHandler[passthrough_event_spec(tuple[int, int], GridCell)]
|
||||||
|
|
||||||
# Fired when a group header is clicked.
|
# Fired when a group header is clicked.
|
||||||
on_group_header_clicked: EventHandler[
|
on_group_header_clicked: EventHandler[
|
||||||
passthrough_event_spec(Tuple[int, int], GridCell)
|
passthrough_event_spec(tuple[int, int], GridCell)
|
||||||
]
|
]
|
||||||
|
|
||||||
# Fired when a group header is right-clicked.
|
# Fired when a group header is right-clicked.
|
||||||
@ -285,23 +285,23 @@ class DataEditor(NoSSRComponent):
|
|||||||
on_group_header_renamed: EventHandler[passthrough_event_spec(str, str)]
|
on_group_header_renamed: EventHandler[passthrough_event_spec(str, str)]
|
||||||
|
|
||||||
# Fired when a header is clicked.
|
# Fired when a header is clicked.
|
||||||
on_header_clicked: EventHandler[passthrough_event_spec(Tuple[int, int])]
|
on_header_clicked: EventHandler[passthrough_event_spec(tuple[int, int])]
|
||||||
|
|
||||||
# Fired when a header is right-clicked.
|
# Fired when a header is right-clicked.
|
||||||
on_header_context_menu: EventHandler[passthrough_event_spec(Tuple[int, int])]
|
on_header_context_menu: EventHandler[passthrough_event_spec(tuple[int, int])]
|
||||||
|
|
||||||
# Fired when a header menu item is clicked.
|
# Fired when a header menu item is clicked.
|
||||||
on_header_menu_click: EventHandler[passthrough_event_spec(int, Rectangle)]
|
on_header_menu_click: EventHandler[passthrough_event_spec(int, Rectangle)]
|
||||||
|
|
||||||
# Fired when an item is hovered.
|
# Fired when an item is hovered.
|
||||||
on_item_hovered: EventHandler[passthrough_event_spec(Tuple[int, int])]
|
on_item_hovered: EventHandler[passthrough_event_spec(tuple[int, int])]
|
||||||
|
|
||||||
# Fired when a selection is deleted.
|
# Fired when a selection is deleted.
|
||||||
on_delete: EventHandler[passthrough_event_spec(GridSelection)]
|
on_delete: EventHandler[passthrough_event_spec(GridSelection)]
|
||||||
|
|
||||||
# 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.
|
||||||
|
@ -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 enum import Enum
|
from enum import Enum
|
||||||
from typing import Any, Dict, List, Literal, Optional, TypedDict, Union, overload
|
from typing import Any, Dict, Literal, Optional, TypedDict, Union, overload
|
||||||
|
|
||||||
from reflex.base import Base
|
from reflex.base import Base
|
||||||
from reflex.components.component import NoSSRComponent
|
from reflex.components.component import NoSSRComponent
|
||||||
@ -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
|
||||||
|
|
||||||
@ -118,11 +118,11 @@ class GroupHeaderClickedEventArgs(TypedDict):
|
|||||||
scrollEdge: tuple[int, int]
|
scrollEdge: tuple[int, int]
|
||||||
|
|
||||||
class GridCell(TypedDict):
|
class GridCell(TypedDict):
|
||||||
span: Optional[List[int]]
|
span: list[int] | None
|
||||||
|
|
||||||
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[List[Dict[str, Any]], Var[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[List[List[Any]], Var[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,
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
"""A Reflex logo component."""
|
"""A Reflex logo component."""
|
||||||
|
|
||||||
from typing import Union
|
|
||||||
|
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
|
|
||||||
|
|
||||||
def svg_logo(
|
def svg_logo(
|
||||||
color: Union[str, rx.Var[str]] = rx.color_mode_cond("#110F1F", "white"),
|
color: str | rx.Var[str] = rx.color_mode_cond("#110F1F", "white"),
|
||||||
**props,
|
**props,
|
||||||
):
|
):
|
||||||
"""A Reflex logo SVG.
|
"""A Reflex logo SVG.
|
||||||
|
@ -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
|
||||||
|
|
||||||
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
|
||||||
@ -547,15 +547,13 @@ class ShikiCodeBlock(Component, MarkdownComponentMap):
|
|||||||
theme: Var[LiteralCodeTheme] = Var.create("one-light")
|
theme: Var[LiteralCodeTheme] = Var.create("one-light")
|
||||||
|
|
||||||
# The set of themes to use for different modes.
|
# The set of themes to use for different modes.
|
||||||
themes: Var[Union[list[dict[str, Any]], dict[str, str]]]
|
themes: Var[list[dict[str, Any]] | dict[str, str]]
|
||||||
|
|
||||||
# The code to display.
|
# The code to display.
|
||||||
code: Var[str]
|
code: Var[str]
|
||||||
|
|
||||||
# The transformers to use for the syntax highlighter.
|
# The transformers to use for the syntax highlighter.
|
||||||
transformers: Var[list[Union[ShikiBaseTransformers, dict[str, Any]]]] = Var.create(
|
transformers: Var[list[ShikiBaseTransformers | dict[str, Any]]] = Var.create([])
|
||||||
[]
|
|
||||||
)
|
|
||||||
|
|
||||||
# The decorations to use for the syntax highlighter.
|
# The decorations to use for the syntax highlighter.
|
||||||
decorations: Var[list[ShikiDecorations]] = Var.create([])
|
decorations: Var[list[ShikiDecorations]] = Var.create([])
|
||||||
@ -717,7 +715,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(
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
from typing import Any, Dict, Iterator, Literal, Set, Tuple, 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):
|
||||||
@ -104,7 +104,7 @@ class Fieldset(Element):
|
|||||||
name: Var[str]
|
name: Var[str]
|
||||||
|
|
||||||
|
|
||||||
def on_submit_event_spec() -> Tuple[Var[dict[str, Any]]]:
|
def on_submit_event_spec() -> tuple[Var[dict[str, Any]]]:
|
||||||
"""Event handler spec for the on_submit event.
|
"""Event handler spec for the on_submit event.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -113,7 +113,7 @@ def on_submit_event_spec() -> Tuple[Var[dict[str, Any]]]:
|
|||||||
return (FORM_DATA,)
|
return (FORM_DATA,)
|
||||||
|
|
||||||
|
|
||||||
def on_submit_string_event_spec() -> Tuple[Var[dict[str, str]]]:
|
def on_submit_string_event_spec() -> tuple[Var[dict[str, str]]]:
|
||||||
"""Event handler spec for the on_submit event.
|
"""Event handler spec for the on_submit event.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -232,7 +232,7 @@ class Form(BaseHTML):
|
|||||||
)
|
)
|
||||||
return render_tag
|
return render_tag
|
||||||
|
|
||||||
def _get_form_refs(self) -> Dict[str, Any]:
|
def _get_form_refs(self) -> dict[str, Any]:
|
||||||
# Send all the input refs to the handler.
|
# Send all the input refs to the handler.
|
||||||
form_refs = {}
|
form_refs = {}
|
||||||
for ref in self._get_all_refs():
|
for ref in self._get_all_refs():
|
||||||
@ -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):
|
||||||
@ -720,7 +720,7 @@ class Textarea(BaseHTML):
|
|||||||
"enter_key_submit",
|
"enter_key_submit",
|
||||||
]
|
]
|
||||||
|
|
||||||
def _get_all_custom_code(self) -> Set[str]:
|
def _get_all_custom_code(self) -> set[str]:
|
||||||
"""Include the custom code for auto_height and enter_key_submit functionality.
|
"""Include the custom code for auto_height and enter_key_submit functionality.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
"""Inline classes."""
|
"""Inline classes."""
|
||||||
|
|
||||||
from typing import Literal, Union
|
from typing import Literal
|
||||||
|
|
||||||
from reflex.vars.base import Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
@ -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]
|
||||||
@ -46,7 +46,7 @@ class A(BaseHTML): # Inherits common attributes from BaseMeta
|
|||||||
rel: Var[str]
|
rel: Var[str]
|
||||||
|
|
||||||
# Specifies where to open the linked document
|
# Specifies where to open the linked document
|
||||||
target: Var[Union[str, Literal["_self", "_blank", "_parent", "_top"]]]
|
target: Var[str | Literal["_self", "_blank", "_parent", "_top"]]
|
||||||
|
|
||||||
|
|
||||||
class Abbr(BaseHTML):
|
class Abbr(BaseHTML):
|
||||||
@ -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
@ -1,6 +1,6 @@
|
|||||||
"""Media classes."""
|
"""Media classes."""
|
||||||
|
|
||||||
from typing import Any, Literal, Union
|
from typing import Any, Literal
|
||||||
|
|
||||||
from reflex import Component, ComponentNamespace
|
from reflex import Component, ComponentNamespace
|
||||||
from reflex.components.el.elements.inline import ReferrerPolicy
|
from reflex.components.el.elements.inline import ReferrerPolicy
|
||||||
@ -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,13 +466,13 @@ 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[str | float | int | bool]
|
||||||
|
|
||||||
|
|
||||||
class Path(BaseHTML):
|
class Path(BaseHTML):
|
||||||
@ -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
@ -1,7 +1,5 @@
|
|||||||
"""Metadata classes."""
|
"""Metadata classes."""
|
||||||
|
|
||||||
from typing import List
|
|
||||||
|
|
||||||
from reflex.components.el.element import Element
|
from reflex.components.el.element import Element
|
||||||
from reflex.components.el.elements.inline import ReferrerPolicy
|
from reflex.components.el.elements.inline import ReferrerPolicy
|
||||||
from reflex.components.el.elements.media import CrossOrigin
|
from reflex.components.el.elements.media import CrossOrigin
|
||||||
@ -91,7 +89,7 @@ class StyleEl(Element):
|
|||||||
|
|
||||||
media: Var[str]
|
media: Var[str]
|
||||||
|
|
||||||
special_props: List[Var] = [Var(_js_expr="suppressHydrationWarning")]
|
special_props: list[Var] = [Var(_js_expr="suppressHydrationWarning")]
|
||||||
|
|
||||||
|
|
||||||
base = Base.create
|
base = Base.create
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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
@ -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
|
||||||
@ -17,7 +17,7 @@ class Gridjs(Component):
|
|||||||
|
|
||||||
library = "gridjs-react@6.1.1"
|
library = "gridjs-react@6.1.1"
|
||||||
|
|
||||||
lib_dependencies: List[str] = ["gridjs@6.2.0"]
|
lib_dependencies: list[str] = ["gridjs@6.2.0"]
|
||||||
|
|
||||||
|
|
||||||
class DataTable(Gridjs):
|
class DataTable(Gridjs):
|
||||||
@ -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):
|
||||||
@ -115,11 +115,11 @@ class DataTable(Gridjs):
|
|||||||
if isinstance(self.data, Var) and types.is_dataframe(self.data._var_type):
|
if isinstance(self.data, Var) and types.is_dataframe(self.data._var_type):
|
||||||
self.columns = self.data._replace(
|
self.columns = self.data._replace(
|
||||||
_js_expr=f"{self.data._js_expr}.columns",
|
_js_expr=f"{self.data._js_expr}.columns",
|
||||||
_var_type=List[Any],
|
_var_type=list[Any],
|
||||||
)
|
)
|
||||||
self.data = self.data._replace(
|
self.data = self.data._replace(
|
||||||
_js_expr=f"{self.data._js_expr}.data",
|
_js_expr=f"{self.data._js_expr}.data",
|
||||||
_var_type=List[List[Any]],
|
_var_type=list[list[Any]],
|
||||||
)
|
)
|
||||||
if types.is_dataframe(type(self.data)):
|
if types.is_dataframe(type(self.data)):
|
||||||
# If given a pandas df break up the data and columns
|
# If given a pandas df break up the data and columns
|
||||||
|
@ -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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -6,7 +6,7 @@ import dataclasses
|
|||||||
import textwrap
|
import textwrap
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
from typing import Any, Callable, Dict, Sequence
|
from typing import Any, Callable, Sequence
|
||||||
|
|
||||||
from reflex.components.component import BaseComponent, Component, CustomComponent
|
from reflex.components.component import BaseComponent, Component, CustomComponent
|
||||||
from reflex.components.tags.tag import Tag
|
from reflex.components.tags.tag import Tag
|
||||||
@ -149,7 +149,7 @@ class Markdown(Component):
|
|||||||
is_default = True
|
is_default = True
|
||||||
|
|
||||||
# The component map from a tag to a lambda that creates a component.
|
# The component map from a tag to a lambda that creates a component.
|
||||||
component_map: Dict[str, Any] = {}
|
component_map: dict[str, Any] = {}
|
||||||
|
|
||||||
# The hash of the component map, generated at create() time.
|
# The hash of the component map, generated at create() time.
|
||||||
component_map_hash: str = ""
|
component_map_hash: str = ""
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# ------------------------------------------------------
|
# ------------------------------------------------------
|
||||||
import dataclasses
|
import dataclasses
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from typing import Any, Callable, Dict, 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,
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
from datetime import date, datetime, time, timedelta
|
from datetime import date, datetime, time, timedelta
|
||||||
from typing import List, Optional, 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 +13,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):
|
||||||
@ -31,7 +30,7 @@ class Moment(NoSSRComponent):
|
|||||||
tag: str | None = "Moment"
|
tag: str | None = "Moment"
|
||||||
is_default = True
|
is_default = True
|
||||||
library: str | None = "react-moment"
|
library: str | None = "react-moment"
|
||||||
lib_dependencies: List[str] = ["moment"]
|
lib_dependencies: list[str] = ["moment"]
|
||||||
|
|
||||||
# How often the date update (how often time update / 0 to disable).
|
# How often the date update (how often time update / 0 to disable).
|
||||||
interval: Var[int]
|
interval: Var[int]
|
||||||
@ -79,7 +78,7 @@ class Moment(NoSSRComponent):
|
|||||||
duration: Var[str]
|
duration: Var[str]
|
||||||
|
|
||||||
# The date to display (also work if passed as children).
|
# The date to display (also work if passed as children).
|
||||||
date: Var[Union[str, datetime, date, time, timedelta]]
|
date: Var[str | datetime | date | time | timedelta]
|
||||||
|
|
||||||
# Shows the duration (elapsed time) between now and the provided datetime.
|
# Shows the duration (elapsed time) between now and the provided datetime.
|
||||||
duration_from_now: Var[bool]
|
duration_from_now: Var[bool]
|
||||||
|
@ -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, Dict, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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.
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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:
|
||||||
|
@ -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, 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_: 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,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any, Dict, List, Tuple, TypedDict, TypeVar, Union
|
from typing import Any, Dict, TypedDict, TypeVar
|
||||||
|
|
||||||
from reflex.components.component import Component, NoSSRComponent
|
from reflex.components.component import Component, NoSSRComponent
|
||||||
from reflex.components.core.cond import color_mode_cond
|
from reflex.components.core.cond import color_mode_cond
|
||||||
@ -21,7 +21,7 @@ except ImportError:
|
|||||||
Template = Any
|
Template = Any
|
||||||
|
|
||||||
|
|
||||||
def _event_points_data_signature(e0: Var) -> Tuple[Var[List[Point]]]:
|
def _event_points_data_signature(e0: Var) -> tuple[Var[list[Point]]]:
|
||||||
"""For plotly events with event data containing a point array.
|
"""For plotly events with event data containing a point array.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -35,58 +35,35 @@ def _event_points_data_signature(e0: Var) -> Tuple[Var[List[Point]]]:
|
|||||||
|
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
ItemOrList = Union[T, List[T]]
|
ItemOrList = 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: list[int] | None
|
||||||
pointIndex: Union[int, None]
|
pointIndex: int | None
|
||||||
markerColor: Union[
|
markerColor: ItemOrList[ItemOrList[float | int | str | None]] | None
|
||||||
ItemOrList[
|
markerSize: ItemOrList[ItemOrList[float | int | None,]] | None
|
||||||
ItemOrList[
|
bbox: BBox | None
|
||||||
Union[
|
|
||||||
float,
|
|
||||||
int,
|
|
||||||
str,
|
|
||||||
None,
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
None,
|
|
||||||
]
|
|
||||||
markerSize: Union[
|
|
||||||
ItemOrList[
|
|
||||||
ItemOrList[
|
|
||||||
Union[
|
|
||||||
float,
|
|
||||||
int,
|
|
||||||
None,
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
None,
|
|
||||||
]
|
|
||||||
bbox: Union[BBox, None]
|
|
||||||
|
|
||||||
|
|
||||||
class Plotly(NoSSRComponent):
|
class Plotly(NoSSRComponent):
|
||||||
@ -94,7 +71,7 @@ class Plotly(NoSSRComponent):
|
|||||||
|
|
||||||
library = "react-plotly.js@2.6.0"
|
library = "react-plotly.js@2.6.0"
|
||||||
|
|
||||||
lib_dependencies: List[str] = ["plotly.js@2.35.3"]
|
lib_dependencies: list[str] = ["plotly.js@2.35.3"]
|
||||||
|
|
||||||
tag = "Plot"
|
tag = "Plot"
|
||||||
|
|
||||||
|
@ -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, TypedDict, TypeVar, Union, overload
|
from typing import Any, Dict, Optional, TypedDict, TypeVar, overload
|
||||||
|
|
||||||
from reflex.components.component import NoSSRComponent
|
from reflex.components.component import NoSSRComponent
|
||||||
from reflex.event import EventType
|
from reflex.event import EventType
|
||||||
@ -21,29 +21,29 @@ except ImportError:
|
|||||||
Figure = Any
|
Figure = Any
|
||||||
Template = Any
|
Template = Any
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
ItemOrList = Union[T, List[T]]
|
ItemOrList = 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: list[int] | None
|
||||||
pointIndex: Union[int, None]
|
pointIndex: int | None
|
||||||
markerColor: Union[ItemOrList[ItemOrList[Union[float, int, str, None]]], None]
|
markerColor: ItemOrList[ItemOrList[float | int | str | None]] | None
|
||||||
markerSize: Union[ItemOrList[ItemOrList[Union[float, int, None]]], None]
|
markerSize: ItemOrList[ItemOrList[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":
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any, List, Literal, Tuple, Union
|
from typing import Any, Literal
|
||||||
|
|
||||||
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
|
||||||
@ -72,7 +72,7 @@ class AccordionComponent(RadixPrimitiveComponent):
|
|||||||
return ["color_scheme", "variant"]
|
return ["color_scheme", "variant"]
|
||||||
|
|
||||||
|
|
||||||
def on_value_change(value: Var[str | List[str]]) -> Tuple[Var[str | List[str]]]:
|
def on_value_change(value: Var[str | list[str]]) -> tuple[Var[str | list[str]]]:
|
||||||
"""Handle the on_value_change event.
|
"""Handle the on_value_change event.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -95,10 +95,10 @@ class AccordionRoot(AccordionComponent):
|
|||||||
type: Var[LiteralAccordionType]
|
type: Var[LiteralAccordionType]
|
||||||
|
|
||||||
# The value of the item to expand.
|
# The value of the item to expand.
|
||||||
value: Var[Union[str, List[str]]]
|
value: Var[str | list[str]]
|
||||||
|
|
||||||
# The default value of the item to expand.
|
# The default value of the item to expand.
|
||||||
default_value: Var[Union[str, List[str]]]
|
default_value: Var[str | list[str]]
|
||||||
|
|
||||||
# Whether or not the accordion is collapsible.
|
# Whether or not the accordion is collapsible.
|
||||||
collapsible: Var[bool]
|
collapsible: Var[bool]
|
||||||
@ -124,7 +124,7 @@ class AccordionRoot(AccordionComponent):
|
|||||||
# Whether to show divider lines between items.
|
# Whether to show divider lines between items.
|
||||||
show_dividers: Var[bool]
|
show_dividers: Var[bool]
|
||||||
|
|
||||||
_valid_children: List[str] = ["AccordionItem"]
|
_valid_children: list[str] = ["AccordionItem"]
|
||||||
|
|
||||||
# Fired when the opened the accordions changes.
|
# Fired when the opened the accordions changes.
|
||||||
on_value_change: EventHandler[on_value_change]
|
on_value_change: EventHandler[on_value_change]
|
||||||
@ -196,18 +196,18 @@ 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",
|
||||||
"AccordionTrigger",
|
"AccordionTrigger",
|
||||||
"AccordionContent",
|
"AccordionContent",
|
||||||
]
|
]
|
||||||
|
|
||||||
_valid_parents: List[str] = ["AccordionRoot"]
|
_valid_parents: list[str] = ["AccordionRoot"]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(
|
def create(
|
||||||
|
@ -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, Literal, Optional, Tuple, 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,
|
||||||
@ -138,7 +132,7 @@ class AccordionComponent(RadixPrimitiveComponent):
|
|||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
def on_value_change(value: Var[str | List[str]]) -> Tuple[Var[str | List[str]]]: ...
|
def on_value_change(value: Var[str | list[str]]) -> tuple[Var[str | list[str]]]: ...
|
||||||
|
|
||||||
class AccordionRoot(AccordionComponent):
|
class AccordionRoot(AccordionComponent):
|
||||||
def add_style(self): ...
|
def add_style(self): ...
|
||||||
@ -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[List[str], Var[Union[List[str], 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[List[str], Var[Union[List[str], 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,
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
"""The base component for Radix primitives."""
|
"""The base component for Radix primitives."""
|
||||||
|
|
||||||
from typing import List
|
|
||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.tags.tag import Tag
|
from reflex.components.tags.tag import Tag
|
||||||
from reflex.utils import format
|
from reflex.utils import format
|
||||||
@ -14,7 +12,7 @@ class RadixPrimitiveComponent(Component):
|
|||||||
# Change the default rendered element for the one passed as a child.
|
# Change the default rendered element for the one passed as a child.
|
||||||
as_child: Var[bool]
|
as_child: Var[bool]
|
||||||
|
|
||||||
lib_dependencies: List[str] = ["@emotion/react@^11.11.1"]
|
lib_dependencies: list[str] = ["@emotion/react@^11.11.1"]
|
||||||
|
|
||||||
|
|
||||||
class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
|
class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, List, Literal, Optional, Union
|
from typing import Any, Literal
|
||||||
|
|
||||||
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
|
||||||
@ -20,7 +20,7 @@ class DrawerComponent(RadixPrimitiveComponent):
|
|||||||
|
|
||||||
library = "vaul"
|
library = "vaul"
|
||||||
|
|
||||||
lib_dependencies: List[str] = ["@radix-ui/react-dialog@^1.0.5"]
|
lib_dependencies: list[str] = ["@radix-ui/react-dialog@^1.0.5"]
|
||||||
|
|
||||||
|
|
||||||
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
|
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
|
||||||
@ -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: list[str | float] | None
|
||||||
|
|
||||||
# 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]
|
||||||
|
@ -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, 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: list[float | str] | None = 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: list[float | str] | None = 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,
|
||||||
|
@ -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, Literal, Optional, Union, overload
|
from typing import Any, Literal, Optional, Union, overload
|
||||||
|
|
||||||
from reflex.components.component import ComponentNamespace
|
from reflex.components.component import ComponentNamespace
|
||||||
from reflex.components.el.elements.forms import Form as HTMLForm
|
from reflex.components.el.elements.forms import Form as HTMLForm
|
||||||
@ -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,
|
||||||
|
@ -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:
|
||||||
|
@ -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, 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[int | None] | int | None = None,
|
||||||
max: Optional[Union[Var[Optional[int]], int]] = None,
|
max: Var[int | None] | 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[int | None] | int | None = None,
|
||||||
max: Optional[Union[Var[Optional[int]], int]] = None,
|
max: Var[int | None] | 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[int | None] | int | None = None,
|
||||||
max: Optional[Union[Var[Optional[int]], int]] = None,
|
max: Var[int | None] | 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,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any, List, Literal, Tuple
|
from typing import Any, Literal
|
||||||
|
|
||||||
from reflex.components.component import Component, ComponentNamespace
|
from reflex.components.component import Component, ComponentNamespace
|
||||||
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
||||||
@ -20,8 +20,8 @@ class SliderComponent(RadixPrimitiveComponentWithClassName):
|
|||||||
|
|
||||||
|
|
||||||
def on_value_event_spec(
|
def on_value_event_spec(
|
||||||
value: Var[List[int]],
|
value: Var[list[int]],
|
||||||
) -> Tuple[Var[List[int]]]:
|
) -> tuple[Var[list[int]]]:
|
||||||
"""Event handler spec for the value event.
|
"""Event handler spec for the value event.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -39,9 +39,9 @@ class SliderRoot(SliderComponent):
|
|||||||
tag = "Root"
|
tag = "Root"
|
||||||
alias = "RadixSliderRoot"
|
alias = "RadixSliderRoot"
|
||||||
|
|
||||||
default_value: Var[List[int]]
|
default_value: Var[list[int]]
|
||||||
|
|
||||||
value: Var[List[int]]
|
value: Var[list[int]]
|
||||||
|
|
||||||
name: Var[str]
|
name: Var[str]
|
||||||
|
|
||||||
|
@ -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, Literal, Optional, Tuple, 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,
|
||||||
@ -62,7 +62,7 @@ class SliderComponent(RadixPrimitiveComponentWithClassName):
|
|||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
def on_value_event_spec(value: Var[List[int]]) -> Tuple[Var[List[int]]]: ...
|
def on_value_event_spec(value: Var[list[int]]) -> tuple[Var[list[int]]]: ...
|
||||||
|
|
||||||
class SliderRoot(SliderComponent):
|
class SliderRoot(SliderComponent):
|
||||||
def add_style(self) -> dict[str, Any] | None: ...
|
def add_style(self) -> dict[str, Any] | None: ...
|
||||||
@ -71,29 +71,26 @@ class SliderRoot(SliderComponent):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
default_value: Optional[Union[List[int], Var[List[int]]]] = None,
|
default_value: Var[list[int]] | list[int] | None = None,
|
||||||
value: Optional[Union[List[int], Var[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,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Literal
|
||||||
|
|
||||||
from reflex.components import Component
|
from reflex.components import Component
|
||||||
from reflex.components.core.breakpoints import Responsive
|
from reflex.components.core.breakpoints import Responsive
|
||||||
@ -116,7 +116,7 @@ class RadixThemesComponent(Component):
|
|||||||
library = library + " && <3.1.5"
|
library = library + " && <3.1.5"
|
||||||
|
|
||||||
# "Fake" prop color_scheme is used to avoid shadowing CSS prop "color".
|
# "Fake" prop color_scheme is used to avoid shadowing CSS prop "color".
|
||||||
_rename_props: Dict[str, str] = {"colorScheme": "color"}
|
_rename_props: dict[str, str] = {"colorScheme": "color"}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(
|
def create(
|
||||||
|
@ -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, 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,
|
||||||
@ -460,18 +369,13 @@ class Theme(RadixThemesComponent):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
color_mode: Optional[Literal["dark", "inherit", "light"]] = None,
|
color_mode: Literal["dark", "inherit", "light"] | None = 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,
|
||||||
|
@ -17,7 +17,7 @@ rx.text(
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any, Dict, List, Literal, Optional, Union, get_args
|
from typing import Any, Literal, get_args
|
||||||
|
|
||||||
from reflex.components.component import BaseComponent
|
from reflex.components.component import BaseComponent
|
||||||
from reflex.components.core.cond import Cond, color_mode_cond, cond
|
from reflex.components.core.cond import Cond, color_mode_cond, cond
|
||||||
@ -66,9 +66,9 @@ class ColorModeIcon(Cond):
|
|||||||
|
|
||||||
LiteralPosition = Literal["top-left", "top-right", "bottom-left", "bottom-right"]
|
LiteralPosition = Literal["top-left", "top-right", "bottom-left", "bottom-right"]
|
||||||
|
|
||||||
position_values: List[str] = list(get_args(LiteralPosition))
|
position_values: list[str] = list(get_args(LiteralPosition))
|
||||||
|
|
||||||
position_map: Dict[str, List[str]] = {
|
position_map: dict[str, list[str]] = {
|
||||||
"position": position_values,
|
"position": position_values,
|
||||||
"left": ["top-left", "bottom-left"],
|
"left": ["top-left", "bottom-left"],
|
||||||
"right": ["top-right", "bottom-right"],
|
"right": ["top-right", "bottom-right"],
|
||||||
@ -78,7 +78,7 @@ position_map: Dict[str, List[str]] = {
|
|||||||
|
|
||||||
|
|
||||||
# needed to inverse contains for find
|
# needed to inverse contains for find
|
||||||
def _find(const: List[str], var: Any):
|
def _find(const: list[str], var: Any):
|
||||||
return LiteralArrayVar.create(const).contains(var)
|
return LiteralArrayVar.create(const).contains(var)
|
||||||
|
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ class ColorModeIconButton(IconButton):
|
|||||||
"""Icon Button for toggling light / dark mode via toggle_color_mode."""
|
"""Icon Button for toggling light / dark mode via toggle_color_mode."""
|
||||||
|
|
||||||
# The position of the icon button. Follow document flow if None.
|
# The position of the icon button. Follow document flow if None.
|
||||||
position: Optional[Union[LiteralPosition, Var[LiteralPosition]]] = None
|
position: LiteralPosition | Var[LiteralPosition] | None = None
|
||||||
|
|
||||||
# Allow picking the "system" value for the color mode.
|
# Allow picking the "system" value for the color mode.
|
||||||
allow_system: bool = False
|
allow_system: bool = False
|
||||||
|
@ -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, 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: BaseComponent | None = None,
|
||||||
comp2: Optional[BaseComponent] = None,
|
comp2: BaseComponent | 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,
|
||||||
@ -63,8 +63,8 @@ class ColorModeIcon(Cond):
|
|||||||
...
|
...
|
||||||
|
|
||||||
LiteralPosition = Literal["top-left", "top-right", "bottom-left", "bottom-right"]
|
LiteralPosition = Literal["top-left", "top-right", "bottom-left", "bottom-right"]
|
||||||
position_values: List[str]
|
position_values: list[str]
|
||||||
position_map: Dict[str, List[str]]
|
position_map: dict[str, list[str]]
|
||||||
|
|
||||||
class ColorModeIconButton(IconButton):
|
class ColorModeIconButton(IconButton):
|
||||||
@overload
|
@overload
|
||||||
@ -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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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
|
||||||
|
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
from reflex.components.component import Component, ComponentNamespace
|
from reflex.components.component import Component, ComponentNamespace
|
||||||
@ -57,7 +57,7 @@ class Callout(CalloutRoot):
|
|||||||
icon: Var[str]
|
icon: Var[str]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, text: Union[str, Var[str]], **props) -> Component:
|
def create(cls, text: str | Var[str], **props) -> Component:
|
||||||
"""Create a callout component.
|
"""Create a callout component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
@ -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, 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,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user