From 763c1c1f078c6561690caf856a711efb04e1f881 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 29 Jan 2024 17:34:18 -0800 Subject: [PATCH 01/68] pyi_generator: Generate stubs for `SimpleNamespace` classes If the namespace assigns `__call__` to an existing component `create` function, generate args and docstring for IDE integration. --- scripts/pyi_generator.py | 114 +++++++++++++++++++++++++++++++++++---- 1 file changed, 104 insertions(+), 10 deletions(-) diff --git a/scripts/pyi_generator.py b/scripts/pyi_generator.py index a6f55281d..d3b7d2e0a 100644 --- a/scripts/pyi_generator.py +++ b/scripts/pyi_generator.py @@ -13,7 +13,7 @@ import typing from inspect import getfullargspec from multiprocessing import Pool, cpu_count from pathlib import Path -from types import ModuleType +from types import ModuleType, SimpleNamespace from typing import Any, Callable, Iterable, Type, get_args import black @@ -94,7 +94,9 @@ def _relative_to_pwd(path: Path) -> Path: Returns: The relative path. """ - return path.relative_to(PWD) + if path.is_absolute(): + return path.relative_to(PWD) + return path def _git_diff(args: list[str]) -> str: @@ -403,7 +405,7 @@ def _get_parent_imports(func): def _generate_component_create_functiondef( node: ast.FunctionDef | None, - clz: type[Component], + clz: type[Component] | type[SimpleNamespace], type_hint_globals: dict[str, Any], ) -> ast.FunctionDef: """Generate the create function definition for a Component. @@ -415,7 +417,13 @@ def _generate_component_create_functiondef( Returns: The create functiondef node for the ast. + + Raises: + TypeError: If clz is not a subclass of Component. """ + if not issubclass(clz, Component): + raise TypeError(f"clz must be a subclass of Component, not {clz!r}") + # add the imports needed by get_type_hint later type_hint_globals.update( {name: getattr(typing, name) for name in DEFAULT_TYPING_IMPORTS} @@ -484,10 +492,58 @@ def _generate_component_create_functiondef( return definition +def _generate_namespace_call_functiondef( + clz_name: str, + classes: dict[str, type[Component] | type[SimpleNamespace]], + type_hint_globals: dict[str, Any], +) -> ast.FunctionDef | None: + """Generate the __call__ function definition for a SimpleNamespace. + + Args: + clz_name: The name of the SimpleNamespace class to generate the __call__ functiondef for. + classes: Map name to actual class definition. + type_hint_globals: The globals to use to resolving a type hint str. + + Returns: + The create functiondef node for the ast. + """ + # add the imports needed by get_type_hint later + type_hint_globals.update( + {name: getattr(typing, name) for name in DEFAULT_TYPING_IMPORTS} + ) + + clz = classes[clz_name] + + # Determine which class is wrapped by the namespace __call__ method + component_class_name, dot, func_name = clz.__call__.__func__.__qualname__.partition( + "." + ) + component_clz = classes[component_class_name] + + # Only generate for create functions + if func_name != "create": + return None + + definition = _generate_component_create_functiondef( + node=None, + clz=component_clz, + type_hint_globals=type_hint_globals, + ) + definition.name = "__call__" + + # Turn the definition into a staticmethod + del definition.args.args[0] # remove `cls` arg + definition.decorator_list = [ast.Name(id="staticmethod")] + + return definition + + class StubGenerator(ast.NodeTransformer): """A node transformer that will generate the stubs for a given module.""" - def __init__(self, module: ModuleType, classes: dict[str, Type[Component]]): + def __init__( + self, module: ModuleType, classes: dict[str, Type[Component | SimpleNamespace]] + ): """Initialize the stub generator. Args: @@ -528,6 +584,18 @@ class StubGenerator(ast.NodeTransformer): node.body.pop(0) return node + def _current_class_is_component(self) -> bool: + """Check if the current class is a Component. + + Returns: + Whether the current class is a Component. + """ + return ( + self.current_class is not None + and self.current_class in self.classes + and issubclass(self.classes[self.current_class], Component) + ) + def visit_Module(self, node: ast.Module) -> ast.Module: """Visit a Module node and remove docstring from body. @@ -591,6 +659,27 @@ class StubGenerator(ast.NodeTransformer): exec("\n".join(self.import_statements), self.type_hint_globals) self.current_class = node.name self._remove_docstring(node) + + # Define `__call__` as a real function so the docstring appears in the stub. + call_definition = None + for child in node.body[:]: + found_call = False + if isinstance(child, ast.Assign): + for target in child.targets[:]: + if isinstance(target, ast.Name) and target.id == "__call__": + child.targets.remove(target) + found_call = True + if not found_call: + continue + if not child.targets[:]: + node.body.remove(child) + call_definition = _generate_namespace_call_functiondef( + self.current_class, + self.classes, + type_hint_globals=self.type_hint_globals, + ) + break + self.generic_visit(node) # Visit child nodes. if ( @@ -598,7 +687,7 @@ class StubGenerator(ast.NodeTransformer): isinstance(child, ast.FunctionDef) and child.name == "create" for child in node.body ) - and self.current_class in self.classes + and self._current_class_is_component() ): # Add a new .create FunctionDef since one does not exist. node.body.append( @@ -608,6 +697,8 @@ class StubGenerator(ast.NodeTransformer): type_hint_globals=self.type_hint_globals, ) ) + if call_definition is not None: + node.body.append(call_definition) if not node.body: # We should never return an empty body. node.body.append(ast.Expr(value=ast.Ellipsis())) @@ -634,11 +725,12 @@ class StubGenerator(ast.NodeTransformer): node, self.classes[self.current_class], self.type_hint_globals ) else: - if node.name.startswith("_"): + if node.name.startswith("_") and node.name != "__call__": return None # remove private methods - # Blank out the function body for public functions. - node.body = [ast.Expr(value=ast.Ellipsis())] + if node.body[-1] != ast.Expr(value=ast.Ellipsis()): + # Blank out the function body for public functions. + node.body = [ast.Expr(value=ast.Ellipsis())] return node def visit_Assign(self, node: ast.Assign) -> ast.Assign | None: @@ -657,9 +749,11 @@ class StubGenerator(ast.NodeTransformer): and node.value.id == "Any" ): return node - if self.current_class in self.classes: + + if self._current_class_is_component(): # Remove annotated assignments in Component classes (props) return None + return node def visit_AnnAssign(self, node: ast.AnnAssign) -> ast.AnnAssign | None: @@ -738,7 +832,7 @@ class PyiGenerator: name: obj for name, obj in vars(module).items() if inspect.isclass(obj) - and issubclass(obj, Component) + and (issubclass(obj, Component) or issubclass(obj, SimpleNamespace)) and obj != Component and inspect.getmodule(obj) == module } From bd9d6e678979d7f98959aeb46c194af2d4ed727b Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 29 Jan 2024 17:37:41 -0800 Subject: [PATCH 02/68] Radix Primitive Component Namespaces Expose subcomponents of radix primitives wrapped in a SimpleNamespace with a __call__ method that points to the high-level API entry point. --- .../components/radix/primitives/__init__.py | 25 +--- .../components/radix/primitives/accordion.py | 14 ++ .../components/radix/primitives/accordion.pyi | 124 ++++++++++++++++++ reflex/components/radix/primitives/form.py | 23 ++-- reflex/components/radix/primitives/form.pyi | 105 +++++++++++++-- .../components/radix/primitives/progress.py | 37 +++--- .../components/radix/primitives/progress.pyi | 11 +- reflex/components/radix/primitives/slider.py | 63 +++++---- reflex/components/radix/primitives/slider.pyi | 15 ++- 9 files changed, 323 insertions(+), 94 deletions(-) diff --git a/reflex/components/radix/primitives/__init__.py b/reflex/components/radix/primitives/__init__.py index da5749f30..e836bc305 100644 --- a/reflex/components/radix/primitives/__init__.py +++ b/reflex/components/radix/primitives/__init__.py @@ -1,27 +1,6 @@ """Radix primitive components (https://www.radix-ui.com/primitives).""" -from .accordion import ( - AccordionContent, - AccordionHeader, - AccordionRoot, - AccordionTrigger, - accordion_item, -) -from .form import ( - form_control, - form_field, - form_label, - form_message, - form_root, - form_submit, - form_validity_state, -) +from .accordion import accordion +from .form import form from .progress import progress from .slider import slider - -# accordion -accordion = AccordionRoot.create -accordion_root = AccordionRoot.create -accordion_header = AccordionHeader.create -accordion_trigger = AccordionTrigger.create -accordion_content = AccordionContent.create diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index cdb019807..14dcf3929 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -2,6 +2,7 @@ from __future__ import annotations +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.components.component import Component @@ -618,3 +619,16 @@ def accordion_item(header: Component, content: Component, **props) -> Component: **props, class_name="AccordionItem", ) + + +class Accordion(SimpleNamespace): + """Accordion component.""" + + content = staticmethod(AccordionContent.create) + header = staticmethod(AccordionHeader.create) + item = staticmethod(accordion_item) + root = __call__ = staticmethod(AccordionRoot.create) + trigger = staticmethod(AccordionTrigger.create) + + +accordion = Accordion() diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 8f8459283..21be22be8 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.components.component import Component from reflex.components.core import cond, match @@ -565,3 +566,126 @@ class AccordionContent(AccordionComponent): ... def accordion_item(header: Component, content: Component, **props) -> Component: ... + +class Accordion(SimpleNamespace): + content = staticmethod(AccordionContent.create) + header = staticmethod(AccordionHeader.create) + item = staticmethod(accordion_item) + root = staticmethod(AccordionRoot.create) + trigger = staticmethod(AccordionTrigger.create) + + @staticmethod + def __call__( + *children, + type_: Optional[ + Union[Var[Literal["single", "multiple"]], Literal["single", "multiple"]] + ] = None, + value: Optional[Union[Var[str], str]] = None, + default_value: Optional[Union[Var[str], str]] = None, + collapsible: Optional[Union[Var[bool], bool]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None, + orientation: Optional[ + Union[ + Var[Literal["vertical", "horizontal"]], + Literal["vertical", "horizontal"], + ] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "soft", "surface", "outline", "ghost"]], + Literal["classic", "soft", "surface", "outline", "ghost"], + ] + ] = None, + color_scheme: Optional[ + Union[Var[Literal["primary", "accent"]], Literal["primary", "accent"]] + ] = None, + _dynamic_themes: Optional[Union[Var[dict], dict]] = None, + _var_data: Optional[VarData] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_value_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AccordionRoot": + """Create the Accordion root component. + + Args: + *children: The children of the component. + type_: The type of accordion (single or multiple). + value: The value of the item to expand. + default_value: The default value of the item to expand. + collapsible: Whether or not the accordion is collapsible. + disabled: Whether or not the accordion is disabled. + dir: The reading direction of the accordion when applicable. + orientation: The orientation of the accordion. + variant: The variant of the accordion. + color_scheme: The color scheme of the accordion. + _dynamic_themes: dynamic themes of the accordion generated at compile time. + _var_data: The var_data associated with the component. + as_child: Change the default rendered element for the one passed as a child. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The Accordion root Component. + """ + ... + +accordion = Accordion() diff --git a/reflex/components/radix/primitives/form.py b/reflex/components/radix/primitives/form.py index 97c9ebf53..38219b69f 100644 --- a/reflex/components/radix/primitives/form.py +++ b/reflex/components/radix/primitives/form.py @@ -3,6 +3,7 @@ from __future__ import annotations from hashlib import md5 +from types import SimpleNamespace from typing import Any, Dict, Iterator, Literal from jinja2 import Environment @@ -289,14 +290,16 @@ class FormSubmit(FormComponent): alias = "RadixFormSubmit" -# High Level API -Form = FormRoot +class Form(SimpleNamespace): + """Form components.""" -form_root = FormRoot.create -form_field = FormField.create -form_label = FormLabel.create -form_control = FormControl.create -form_message = FormMessage.create -form_validity_state = FormValidityState.create -form_submit = FormSubmit.create -form = Form.create + control = staticmethod(FormControl.create) + field = staticmethod(FormField.create) + label = staticmethod(FormLabel.create) + message = staticmethod(FormMessage.create) + root = __call__ = staticmethod(FormRoot.create) + submit = staticmethod(FormSubmit.create) + validity_state = staticmethod(FormValidityState.create) + + +form = Form() diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index 777154300..7ee209c52 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -8,6 +8,7 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from hashlib import md5 +from types import SimpleNamespace from typing import Any, Dict, Iterator, Literal from jinja2 import Environment from reflex.components.component import Component @@ -735,12 +736,98 @@ class FormSubmit(FormComponent): """ ... -Form = FormRoot -form_root = FormRoot.create -form_field = FormField.create -form_label = FormLabel.create -form_control = FormControl.create -form_message = FormMessage.create -form_validity_state = FormValidityState.create -form_submit = FormSubmit.create -form = Form.create +class Form(SimpleNamespace): + control = staticmethod(FormControl.create) + field = staticmethod(FormField.create) + label = staticmethod(FormLabel.create) + message = staticmethod(FormMessage.create) + root = staticmethod(FormRoot.create) + submit = staticmethod(FormSubmit.create) + validity_state = staticmethod(FormValidityState.create) + + @staticmethod + def __call__( + *children, + reset_on_submit: Optional[Union[Var[bool], bool]] = None, + handle_submit_unique_name: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_clear_server_errors: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_submit: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "FormRoot": + """Create a form component. + + Args: + *children: The children of the form. + reset_on_submit: If true, the form will be cleared after submit. + handle_submit_unique_name: The name used to make this form's submit handler function unique. + as_child: Change the default rendered element for the one passed as a child. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the form. + + Returns: + The form component. + """ + ... + +form = Form() diff --git a/reflex/components/radix/primitives/progress.py b/reflex/components/radix/primitives/progress.py index a4c0fa738..8ba58652f 100644 --- a/reflex/components/radix/primitives/progress.py +++ b/reflex/components/radix/primitives/progress.py @@ -2,6 +2,7 @@ from __future__ import annotations +from types import SimpleNamespace from typing import Optional from reflex.components.component import Component @@ -67,20 +68,26 @@ class ProgressIndicator(ProgressComponent): ) -progress_root = ProgressRoot.create -progress_indicator = ProgressIndicator.create +class Progress(SimpleNamespace): + """High level API for progress bar.""" + + root = staticmethod(ProgressRoot.create) + indicator = staticmethod(ProgressIndicator.create) + + @staticmethod + def __call__(**props) -> Component: + """High level API for progress bar. + + Args: + **props: The props of the progress bar + + Returns: + The progress bar. + """ + return ProgressRoot.create( + ProgressIndicator.create(value=props.get("value")), + **props, + ) -def progress(**props): - """High level API for progress bar. - - Args: - **props: The props of the progress bar - - Returns: - The progress bar. - """ - return progress_root( - progress_indicator(value=props.get("value")), - **props, - ) +progress = Progress() diff --git a/reflex/components/radix/primitives/progress.pyi b/reflex/components/radix/primitives/progress.pyi index 4d4544ecc..7919d5d21 100644 --- a/reflex/components/radix/primitives/progress.pyi +++ b/reflex/components/radix/primitives/progress.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Optional from reflex.components.component import Component from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName @@ -262,7 +263,11 @@ class ProgressIndicator(ProgressComponent): """ ... -progress_root = ProgressRoot.create -progress_indicator = ProgressIndicator.create +class Progress(SimpleNamespace): + root = staticmethod(ProgressRoot.create) + indicator = staticmethod(ProgressIndicator.create) -def progress(**props): ... + @staticmethod + def __call__(**props) -> Component: ... + +progress = Progress() diff --git a/reflex/components/radix/primitives/slider.py b/reflex/components/radix/primitives/slider.py index 384b58f90..c4e82ba88 100644 --- a/reflex/components/radix/primitives/slider.py +++ b/reflex/components/radix/primitives/slider.py @@ -2,6 +2,7 @@ from __future__ import annotations +from types import SimpleNamespace from typing import Any, Dict, List, Literal from reflex.components.component import Component @@ -148,34 +149,38 @@ class SliderThumb(SliderComponent): ) -slider_root = SliderRoot.create -slider_track = SliderTrack.create -slider_range = SliderRange.create -slider_thumb = SliderThumb.create +class Slider(SimpleNamespace): + """High level API for slider.""" + + root = staticmethod(SliderRoot.create) + track = staticmethod(SliderTrack.create) + range = staticmethod(SliderRange.create) + thumb = staticmethod(SliderThumb.create) + + @staticmethod + def __call__(**props) -> Component: + """High level API for slider. + + Args: + **props: The props of the slider. + + Returns: + A slider component. + """ + track = SliderTrack.create(SliderRange.create()) + # if default_value is not set, the thumbs will not render properly but the slider will still work + if "default_value" in props: + children = [ + track, + *[SliderThumb.create() for _ in props.get("default_value", [])], + ] + else: + children = [ + track, + # Foreach.create(props.get("value"), lambda e: SliderThumb.create()), # foreach doesn't render Thumbs properly + ] + + return SliderRoot.create(*children, **props) -def slider( - **props, -) -> Component: - """High level API for slider. - - Args: - **props: The props of the slider. - - Returns: - A slider component. - """ - track = SliderTrack.create(SliderRange.create()) - # if default_value is not set, the thumbs will not render properly but the slider will still work - if "default_value" in props: - children = [ - track, - *[SliderThumb.create() for _ in props.get("default_value", [])], - ] - else: - children = [ - track, - # Foreach.create(props.get("value"), lambda e: SliderThumb.create()), # foreach doesn't render Thumbs properly - ] - - return slider_root(*children, **props) +slider = Slider() diff --git a/reflex/components/radix/primitives/slider.pyi b/reflex/components/radix/primitives/slider.pyi index 0bc094c21..da2228c90 100644 --- a/reflex/components/radix/primitives/slider.pyi +++ b/reflex/components/radix/primitives/slider.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, List, Literal from reflex.components.component import Component from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName @@ -444,9 +445,13 @@ class SliderThumb(SliderComponent): """ ... -slider_root = SliderRoot.create -slider_track = SliderTrack.create -slider_range = SliderRange.create -slider_thumb = SliderThumb.create +class Slider(SimpleNamespace): + root = staticmethod(SliderRoot.create) + track = staticmethod(SliderTrack.create) + range = staticmethod(SliderRange.create) + thumb = staticmethod(SliderThumb.create) -def slider(**props) -> Component: ... + @staticmethod + def __call__(**props) -> Component: ... + +slider = Slider() From a5302f1866cda697f7401effb6984366659a49a8 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 31 Jan 2024 11:39:13 -0800 Subject: [PATCH 03/68] [0.4.0] Namespace the Drawer primitive subcomponents (#2492) --- .../components/radix/primitives/__init__.py | 11 +- reflex/components/radix/primitives/drawer.py | 23 ++-- reflex/components/radix/primitives/drawer.pyi | 124 ++++++++++++++++-- scripts/pyi_generator.py | 9 +- 4 files changed, 135 insertions(+), 32 deletions(-) diff --git a/reflex/components/radix/primitives/__init__.py b/reflex/components/radix/primitives/__init__.py index e23c09d47..23070044e 100644 --- a/reflex/components/radix/primitives/__init__.py +++ b/reflex/components/radix/primitives/__init__.py @@ -1,16 +1,7 @@ """Radix primitive components (https://www.radix-ui.com/primitives).""" from .accordion import accordion +from .drawer import drawer from .form import form -from .drawer import ( - drawer_close, - drawer_content, - drawer_description, - drawer_overlay, - drawer_portal, - drawer_root, - drawer_title, - drawer_trigger, -) from .progress import progress from .slider import slider diff --git a/reflex/components/radix/primitives/drawer.py b/reflex/components/radix/primitives/drawer.py index 6b310a25f..b9223c1f2 100644 --- a/reflex/components/radix/primitives/drawer.py +++ b/reflex/components/radix/primitives/drawer.py @@ -3,6 +3,7 @@ # Style based on https://ui.shadcn.com/docs/components/drawer from __future__ import annotations +from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName @@ -230,11 +231,17 @@ class DrawerDescription(DrawerComponent): return self.style -drawer_root = DrawerRoot.create -drawer_trigger = DrawerTrigger.create -drawer_portal = DrawerPortal.create -drawer_content = DrawerContent.create -drawer_overlay = DrawerOverlay.create -drawer_close = DrawerClose.create -drawer_title = DrawerTitle.create -drawer_description = DrawerDescription.create +class Drawer(SimpleNamespace): + """A namespace for Drawer components.""" + + root = __call__ = staticmethod(DrawerRoot.create) + trigger = staticmethod(DrawerTrigger.create) + portal = staticmethod(DrawerPortal.create) + content = staticmethod(DrawerContent.create) + overlay = staticmethod(DrawerOverlay.create) + close = staticmethod(DrawerClose.create) + title = staticmethod(DrawerTitle.create) + description = staticmethod(DrawerDescription.create) + + +drawer = Drawer() diff --git a/reflex/components/radix/primitives/drawer.pyi b/reflex/components/radix/primitives/drawer.pyi index 73b1df355..352460f87 100644 --- a/reflex/components/radix/primitives/drawer.pyi +++ b/reflex/components/radix/primitives/drawer.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName from reflex.constants import EventTriggers @@ -786,11 +787,118 @@ class DrawerDescription(DrawerComponent): """ ... -drawer_root = DrawerRoot.create -drawer_trigger = DrawerTrigger.create -drawer_portal = DrawerPortal.create -drawer_content = DrawerContent.create -drawer_overlay = DrawerOverlay.create -drawer_close = DrawerClose.create -drawer_title = DrawerTitle.create -drawer_description = DrawerDescription.create +class Drawer(SimpleNamespace): + root = staticmethod(DrawerRoot.create) + trigger = staticmethod(DrawerTrigger.create) + portal = staticmethod(DrawerPortal.create) + content = staticmethod(DrawerContent.create) + overlay = staticmethod(DrawerOverlay.create) + close = staticmethod(DrawerClose.create) + title = staticmethod(DrawerTitle.create) + description = staticmethod(DrawerDescription.create) + + @staticmethod + def __call__( + *children, + open: Optional[Union[Var[bool], bool]] = None, + should_scale_background: Optional[Union[Var[bool], bool]] = None, + close_threshold: Optional[Union[Var[float], float]] = None, + snap_points: Optional[List[Union[str, float]]] = None, + fade_from_index: Optional[Union[Var[int], int]] = None, + scroll_lock_timeout: Optional[Union[Var[int], int]] = None, + modal: Optional[Union[Var[bool], bool]] = None, + direction: Optional[ + Union[ + Var[Literal["top", "bottom", "left", "right"]], + Literal["top", "bottom", "left", "right"], + ] + ] = None, + preventScrollRestoration: Optional[Union[Var[bool], bool]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DrawerRoot": + """Create the component. + + Args: + *children: The children of the component. + open: Whether the drawer is open or not. + should_scale_background: Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background. + close_threshold: Number between 0 and 1 that determines when the drawer should be closed. + snap_points: 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. + fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point. TODO: will it accept -1 then? + scroll_lock_timeout: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms + modal: When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`. + direction: Direction of the drawer. Defaults to `"bottom"` + preventScrollRestoration: When `True`, it prevents scroll restoration when the drawer is closed after a navigation happens inside of it. Defaults to `True`. + as_child: Change the default rendered element for the one passed as a child. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The props of the component. + + Returns: + The component. + + Raises: + TypeError: If an invalid child is passed. + """ + ... + +drawer = Drawer() diff --git a/scripts/pyi_generator.py b/scripts/pyi_generator.py index 8bdf3fcd8..51dbdb463 100644 --- a/scripts/pyi_generator.py +++ b/scripts/pyi_generator.py @@ -516,18 +516,15 @@ def _generate_namespace_call_functiondef( clz = classes[clz_name] # Determine which class is wrapped by the namespace __call__ method - component_class_name, dot, func_name = clz.__call__.__func__.__qualname__.partition( - "." - ) - component_clz = classes[component_class_name] + component_clz = clz.__call__.__self__ # Only generate for create functions - if func_name != "create": + if clz.__call__.__func__.__name__ != "create": return None definition = _generate_component_create_functiondef( node=None, - clz=component_clz, + clz=component_clz, # type: ignore type_hint_globals=type_hint_globals, ) definition.name = "__call__" From 9c086163dfec19c1f4c86c7a80e2cbd7b79f5f78 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 31 Jan 2024 15:32:17 -0800 Subject: [PATCH 04/68] [REF-1631] Clean up the rx.radix namespace (#2501) --- reflex/components/radix/__init__.py | 3 +- reflex/components/radix/themes/__init__.py | 6 +- reflex/components/radix/themes/base.py | 4 + reflex/components/radix/themes/base.pyi | 3 + .../radix/themes/components/__init__.py | 269 ++++-------------- .../radix/themes/components/alertdialog.py | 16 ++ .../radix/themes/components/alertdialog.pyi | 158 ++++++++++ .../radix/themes/components/aspectratio.py | 3 + .../radix/themes/components/aspectratio.pyi | 2 + .../radix/themes/components/avatar.py | 3 + .../radix/themes/components/avatar.pyi | 2 + .../radix/themes/components/badge.py | 3 + .../radix/themes/components/badge.pyi | 2 + .../radix/themes/components/button.py | 3 + .../radix/themes/components/button.pyi | 2 + .../radix/themes/components/callout.py | 13 + .../radix/themes/components/callout.pyi | 223 +++++++++++++++ .../radix/themes/components/card.py | 3 + .../radix/themes/components/card.pyi | 2 + .../radix/themes/components/checkbox.py | 11 + .../radix/themes/components/checkbox.pyi | 181 ++++++++++++ .../radix/themes/components/contextmenu.py | 17 ++ .../radix/themes/components/contextmenu.pyi | 159 +++++++++++ .../radix/themes/components/dialog.py | 15 + .../radix/themes/components/dialog.pyi | 157 ++++++++++ .../radix/themes/components/dropdownmenu.py | 17 ++ .../radix/themes/components/dropdownmenu.pyi | 161 +++++++++++ .../radix/themes/components/hovercard.py | 12 + .../radix/themes/components/hovercard.pyi | 160 +++++++++++ .../radix/themes/components/iconbutton.py | 3 + .../radix/themes/components/iconbutton.pyi | 2 + .../radix/themes/components/icons.py | 3 + .../radix/themes/components/icons.pyi | 1 + .../radix/themes/components/inset.py | 3 + .../radix/themes/components/inset.pyi | 2 + .../radix/themes/components/popover.py | 13 + .../radix/themes/components/popover.pyi | 157 ++++++++++ .../radix/themes/components/radiogroup.py | 12 + .../radix/themes/components/radiogroup.pyi | 194 +++++++++++++ .../radix/themes/components/scrollarea.py | 3 + .../radix/themes/components/scrollarea.pyi | 2 + .../radix/themes/components/select.py | 17 ++ .../radix/themes/components/select.pyi | 196 +++++++++++++ .../radix/themes/components/separator.py | 3 + .../radix/themes/components/separator.pyi | 2 + .../radix/themes/components/slider.py | 3 + .../radix/themes/components/slider.pyi | 2 + .../radix/themes/components/switch.py | 3 + .../radix/themes/components/switch.pyi | 2 + .../radix/themes/components/table.py | 16 ++ .../radix/themes/components/table.pyi | 241 ++++++++++++++++ .../radix/themes/components/tabs.py | 13 + .../radix/themes/components/tabs.pyi | 168 +++++++++++ .../radix/themes/components/textarea.py | 3 + .../radix/themes/components/textarea.pyi | 2 + .../radix/themes/components/textfield.py | 13 + .../radix/themes/components/textfield.pyi | 190 +++++++++++++ .../radix/themes/components/tooltip.py | 3 + .../radix/themes/components/tooltip.pyi | 2 + .../radix/themes/layout/__init__.py | 12 + .../radix/themes/typography/__init__.py | 12 + 61 files changed, 2690 insertions(+), 218 deletions(-) diff --git a/reflex/components/radix/__init__.py b/reflex/components/radix/__init__.py index ee7c2ec7a..08d1dcfef 100644 --- a/reflex/components/radix/__init__.py +++ b/reflex/components/radix/__init__.py @@ -1,3 +1,4 @@ """Namespace for components provided by @radix-ui packages.""" -from . import primitives, themes +from .primitives import * +from .themes import * diff --git a/reflex/components/radix/themes/__init__.py b/reflex/components/radix/themes/__init__.py index 7ecdfb749..ec02436b1 100644 --- a/reflex/components/radix/themes/__init__.py +++ b/reflex/components/radix/themes/__init__.py @@ -1,8 +1,6 @@ """Namespace for components provided by the @radix-ui/themes library.""" -from .base import Theme, ThemePanel +from .base import theme as theme +from .base import theme_panel as theme_panel from .components import * from .layout import * from .typography import * - -theme = Theme.create -theme_panel = ThemePanel.create diff --git a/reflex/components/radix/themes/base.py b/reflex/components/radix/themes/base.py index cc572d662..d7bed2d41 100644 --- a/reflex/components/radix/themes/base.py +++ b/reflex/components/radix/themes/base.py @@ -210,3 +210,7 @@ class RadixThemesColorModeProvider(Component): library = "/components/reflex/radix_themes_color_mode_provider.js" tag = "RadixThemesColorModeProvider" is_default = True + + +theme = Theme.create +theme_panel = ThemePanel.create diff --git a/reflex/components/radix/themes/base.pyi b/reflex/components/radix/themes/base.pyi index fcfb4732a..5e3725e9c 100644 --- a/reflex/components/radix/themes/base.pyi +++ b/reflex/components/radix/themes/base.pyi @@ -789,3 +789,6 @@ class RadixThemesColorModeProvider(Component): TypeError: If an invalid child is passed. """ ... + +theme = Theme.create +theme_panel = ThemePanel.create diff --git a/reflex/components/radix/themes/components/__init__.py b/reflex/components/radix/themes/components/__init__.py index 12b1105eb..c4beba8f1 100644 --- a/reflex/components/radix/themes/components/__init__.py +++ b/reflex/components/radix/themes/components/__init__.py @@ -1,216 +1,59 @@ """Radix themes components.""" -from .alertdialog import ( - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogRoot, - AlertDialogTitle, - AlertDialogTrigger, -) -from .aspectratio import AspectRatio -from .avatar import Avatar -from .badge import Badge -from .button import Button -from .callout import Callout, CalloutIcon, CalloutRoot, CalloutText -from .card import Card -from .checkbox import Checkbox, HighLevelCheckbox -from .contextmenu import ( - ContextMenuContent, - ContextMenuItem, - ContextMenuRoot, - ContextMenuSeparator, - ContextMenuSub, - ContextMenuSubContent, - ContextMenuSubTrigger, - ContextMenuTrigger, -) -from .dialog import ( - DialogClose, - DialogContent, - DialogDescription, - DialogRoot, - DialogTitle, - DialogTrigger, -) -from .dropdownmenu import ( - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuRoot, - DropdownMenuSeparator, - DropdownMenuSub, - DropdownMenuSubContent, - DropdownMenuSubTrigger, - DropdownMenuTrigger, -) -from .hovercard import HoverCardContent, HoverCardRoot, HoverCardTrigger -from .iconbutton import IconButton -from .icons import Icon -from .inset import Inset -from .popover import PopoverClose, PopoverContent, PopoverRoot, PopoverTrigger -from .radiogroup import HighLevelRadioGroup, RadioGroupItem, RadioGroupRoot -from .scrollarea import ScrollArea -from .select import ( - HighLevelSelect, - SelectContent, - SelectGroup, - SelectItem, - SelectLabel, - SelectRoot, - SelectSeparator, - SelectTrigger, -) -from .separator import Separator -from .slider import Slider -from .switch import Switch -from .table import ( - TableBody, - TableCell, - TableColumnHeaderCell, - TableHeader, - TableRoot, - TableRow, - TableRowHeaderCell, -) -from .tabs import TabsContent, TabsList, TabsRoot, TabsTrigger -from .textarea import TextArea -from .textfield import Input, TextFieldInput, TextFieldRoot, TextFieldSlot -from .tooltip import Tooltip +from .alertdialog import alert_dialog as alert_dialog +from .aspectratio import aspect_ratio as aspect_ratio +from .avatar import avatar as avatar +from .badge import badge as badge +from .button import button as button +from .callout import callout as callout +from .card import card as card +from .checkbox import checkbox as checkbox +from .contextmenu import context_menu as context_menu +from .dialog import dialog as dialog +from .dropdownmenu import dropdown_menu as dropdown_menu +from .hovercard import hover_card as hover_card +from .iconbutton import icon_button as icon_button +from .icons import icon as icon +from .inset import inset as inset +from .popover import popover as popover +from .radiogroup import radio_group as radio_group +from .scrollarea import scroll_area as scroll_area +from .select import select as select +from .separator import separator as separator +from .slider import slider as slider +from .switch import switch as switch +from .table import table as table +from .tabs import tabs as tabs +from .textarea import text_area as text_area +from .textfield import text_field as text_field +from .tooltip import tooltip as tooltip -# Alert Dialog -alertdialog_root = AlertDialogRoot.create -alertdialog_trigger = AlertDialogTrigger.create -alertdialog_content = AlertDialogContent.create -alertdialog_title = AlertDialogTitle.create -alertdialog_description = AlertDialogDescription.create -alertdialog_action = AlertDialogAction.create -alertdialog_cancel = AlertDialogCancel.create - -# Aspect Ratio -aspect_ratio = AspectRatio.create - -# Avatar -avatar = Avatar.create - -# Badge -badge = Badge.create - -# Button -button = Button.create - -# Callout -callout_root = CalloutRoot.create -callout_icon = CalloutIcon.create -callout_text = CalloutText.create -callout = Callout.create - -# Card -card = Card.create - -# Checkbox -checkbox = Checkbox.create -checkbox_hl = HighLevelCheckbox.create - -# Context Menu -contextmenu_root = ContextMenuRoot.create -contextmenu_sub = ContextMenuSub.create -contextmenu_trigger = ContextMenuTrigger.create -contextmenu_content = ContextMenuContent.create -contextmenu_sub_content = ContextMenuSubContent.create -contextmenu_sub_trigger = ContextMenuSubTrigger.create -contextmenu_item = ContextMenuItem.create -contextmenu_separator = ContextMenuSeparator.create - - -# Dialog -dialog_root = DialogRoot.create -dialog_trigger = DialogTrigger.create -dialog_content = DialogContent.create -dialog_title = DialogTitle.create -dialog_description = DialogDescription.create -dialog_close = DialogClose.create - -# Dropdown Menu -dropdownmenu_root = DropdownMenuRoot.create -dropdownmenu_trigger = DropdownMenuTrigger.create -dropdownmenu_content = DropdownMenuContent.create -dropdownmenu_sub = DropdownMenuSub.create -dropdownmenu_sub_content = DropdownMenuSubContent.create -dropdownmenu_sub_trigger = DropdownMenuSubTrigger.create -dropdownmenu_item = DropdownMenuItem.create -dropdownmenu_separator = DropdownMenuSeparator.create - -# Hover Card -hovercard_root = HoverCardRoot.create -hovercard_trigger = HoverCardTrigger.create -hovercard_content = HoverCardContent.create - -# Icon -icon = Icon.create - -# Icon Button -icon_button = IconButton.create - -# Inset -inset = Inset.create - -# Popover -popover_root = PopoverRoot.create -popover_trigger = PopoverTrigger.create -popover_content = PopoverContent.create -popover_close = PopoverClose.create - -# Radio Group -radio_group_root = RadioGroupRoot.create -radio_group_item = RadioGroupItem.create -radio_group = HighLevelRadioGroup.create - -# Scroll Area -scroll_area = ScrollArea.create - -# Select -select_root = SelectRoot.create -select_trigger = SelectTrigger.create -select_content = SelectContent.create -select_item = SelectItem.create -select_separator = SelectSeparator.create -select_group = SelectGroup.create -select_label = SelectLabel.create -select = HighLevelSelect.create - -# Separator -separator = Separator.create - -# Slider -slider = Slider.create - -# Switch -switch = Switch.create - -# Table -table_root = TableRoot.create -table_header = TableHeader.create -table_body = TableBody.create -table_row = TableRow.create -table_cell = TableCell.create -table_column_header_cell = TableColumnHeaderCell.create -table_row_header_cell = TableRowHeaderCell.create - -# Tabs -tabs_root = TabsRoot.create -tabs_list = TabsList.create -tabs_trigger = TabsTrigger.create -tabs_content = TabsContent.create - -# Text Area -textarea = TextArea.create - -# Text Field -textfield_root = TextFieldRoot.create -textfield_input = TextFieldInput.create -textfield_slot = TextFieldSlot.create -input = Input.create - -# Tooltip -tooltip = Tooltip.create +__all__ = [ + "alert_dialog", + "aspect_ratio", + "avatar", + "badge", + "button", + "callout", + "card", + "checkbox", + "context_menu", + "dialog", + "dropdown_menu", + "hover_card", + "icon_button", + "icon", + "inset", + "popover", + "radio_group", + "scroll_area", + "select", + "separator", + "slider", + "switch", + "table", + "tabs", + "text_area", + "text_field", + "tooltip", +] diff --git a/reflex/components/radix/themes/components/alertdialog.py b/reflex/components/radix/themes/components/alertdialog.py index 7a9edc8c6..221ab92e5 100644 --- a/reflex/components/radix/themes/components/alertdialog.py +++ b/reflex/components/radix/themes/components/alertdialog.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el @@ -91,3 +92,18 @@ class AlertDialogCancel(RadixThemesComponent): """ tag = "AlertDialog.Cancel" + + +class AlertDialog(SimpleNamespace): + """AlertDialog components namespace.""" + + root = __call__ = staticmethod(AlertDialogRoot.create) + trigger = staticmethod(AlertDialogTrigger.create) + content = staticmethod(AlertDialogContent.create) + title = staticmethod(AlertDialogTitle.create) + description = staticmethod(AlertDialogDescription.create) + action = staticmethod(AlertDialogAction.create) + cancel = staticmethod(AlertDialogCancel.create) + + +alert_dialog = AlertDialog() diff --git a/reflex/components/radix/themes/components/alertdialog.pyi b/reflex/components/radix/themes/components/alertdialog.pyi index c6c634a07..630fa894a 100644 --- a/reflex/components/radix/themes/components/alertdialog.pyi +++ b/reflex/components/radix/themes/components/alertdialog.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el from reflex.vars import Var @@ -1106,3 +1107,160 @@ class AlertDialogCancel(RadixThemesComponent): A new component instance. """ ... + +class AlertDialog(SimpleNamespace): + root = staticmethod(AlertDialogRoot.create) + trigger = staticmethod(AlertDialogTrigger.create) + content = staticmethod(AlertDialogContent.create) + title = staticmethod(AlertDialogTitle.create) + description = staticmethod(AlertDialogDescription.create) + action = staticmethod(AlertDialogAction.create) + cancel = staticmethod(AlertDialogCancel.create) + + @staticmethod + def __call__( + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + open: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AlertDialogRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + open: The controlled open state of the dialog. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +alert_dialog = AlertDialog() diff --git a/reflex/components/radix/themes/components/aspectratio.py b/reflex/components/radix/themes/components/aspectratio.py index 556666605..1b6847a18 100644 --- a/reflex/components/radix/themes/components/aspectratio.py +++ b/reflex/components/radix/themes/components/aspectratio.py @@ -13,3 +13,6 @@ class AspectRatio(RadixThemesComponent): # The ratio of the width to the height of the element ratio: Var[Union[float, int]] + + +aspect_ratio = AspectRatio.create diff --git a/reflex/components/radix/themes/components/aspectratio.pyi b/reflex/components/radix/themes/components/aspectratio.pyi index b67bb9d09..4e73d8674 100644 --- a/reflex/components/radix/themes/components/aspectratio.pyi +++ b/reflex/components/radix/themes/components/aspectratio.pyi @@ -156,3 +156,5 @@ class AspectRatio(RadixThemesComponent): A new component instance. """ ... + +aspect_ratio = AspectRatio.create diff --git a/reflex/components/radix/themes/components/avatar.py b/reflex/components/radix/themes/components/avatar.py index 35664f4c6..2029c7ef1 100644 --- a/reflex/components/radix/themes/components/avatar.py +++ b/reflex/components/radix/themes/components/avatar.py @@ -36,3 +36,6 @@ class Avatar(RadixThemesComponent): # The rendered fallback text fallback: Var[str] + + +avatar = Avatar.create diff --git a/reflex/components/radix/themes/components/avatar.pyi b/reflex/components/radix/themes/components/avatar.pyi index 635cea11e..5b8722d74 100644 --- a/reflex/components/radix/themes/components/avatar.pyi +++ b/reflex/components/radix/themes/components/avatar.pyi @@ -178,3 +178,5 @@ class Avatar(RadixThemesComponent): A new component instance. """ ... + +avatar = Avatar.create diff --git a/reflex/components/radix/themes/components/badge.py b/reflex/components/radix/themes/components/badge.py index 98145c3d0..f279ee0cf 100644 --- a/reflex/components/radix/themes/components/badge.py +++ b/reflex/components/radix/themes/components/badge.py @@ -30,3 +30,6 @@ class Badge(el.Span, RadixThemesComponent): # Override theme radius for badge: "none" | "small" | "medium" | "large" | "full" radius: Var[LiteralRadius] + + +badge = Badge.create diff --git a/reflex/components/radix/themes/components/badge.pyi b/reflex/components/radix/themes/components/badge.pyi index 07b75e5a3..a60d397d2 100644 --- a/reflex/components/radix/themes/components/badge.pyi +++ b/reflex/components/radix/themes/components/badge.pyi @@ -233,3 +233,5 @@ class Badge(el.Span, RadixThemesComponent): A new component instance. """ ... + +badge = Badge.create diff --git a/reflex/components/radix/themes/components/button.py b/reflex/components/radix/themes/components/button.py index 4e17ee2d7..a9d681f8e 100644 --- a/reflex/components/radix/themes/components/button.py +++ b/reflex/components/radix/themes/components/button.py @@ -36,3 +36,6 @@ class Button(el.Button, RadixThemesComponent): # Override theme radius for button: "none" | "small" | "medium" | "large" | "full" radius: Var[LiteralRadius] + + +button = Button.create diff --git a/reflex/components/radix/themes/components/button.pyi b/reflex/components/radix/themes/components/button.pyi index b72a0acfc..c1ece4f15 100644 --- a/reflex/components/radix/themes/components/button.pyi +++ b/reflex/components/radix/themes/components/button.pyi @@ -282,3 +282,5 @@ class Button(el.Button, RadixThemesComponent): A new component instance. """ ... + +button = Button.create diff --git a/reflex/components/radix/themes/components/callout.py b/reflex/components/radix/themes/components/callout.py index 884f55905..a388f423e 100644 --- a/reflex/components/radix/themes/components/callout.py +++ b/reflex/components/radix/themes/components/callout.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Literal, Union import reflex as rx @@ -75,3 +76,15 @@ class Callout(CalloutRoot): CalloutText.create(text), **props, ) + + +class CalloutNamespace(SimpleNamespace): + """Callout components namespace.""" + + root = staticmethod(CalloutRoot.create) + icon = staticmethod(CalloutIcon.create) + text = staticmethod(CalloutText.create) + __call__ = staticmethod(Callout.create) + + +callout = CalloutNamespace() diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index 262816d37..c60377016 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Literal, Union import reflex as rx from reflex import el @@ -861,3 +862,225 @@ class Callout(CalloutRoot): The callout component. """ ... + +class CalloutNamespace(SimpleNamespace): + root = staticmethod(CalloutRoot.create) + icon = staticmethod(CalloutIcon.create) + text = staticmethod(CalloutText.create) + + @staticmethod + def __call__( + *children, + text: Optional[Union[Var[str], str]] = None, + icon: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["soft", "surface", "outline"]], + Literal["soft", "surface", "outline"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + translate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Callout": + """Create a callout component. + + Args: + text: The text of the callout. + text: The text of the callout. + icon: The icon of the callout. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. + size: Size "1" - "3" + variant: Variant of button: "soft" | "surface" | "outline" + color_scheme: Override theme color for button + high_contrast: Whether to render the button with higher contrast color against background + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + translate: Specifies whether the content of an element should be translated or not. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The callout component. + """ + ... + +callout = CalloutNamespace() diff --git a/reflex/components/radix/themes/components/card.py b/reflex/components/radix/themes/components/card.py index 068004b3a..ab4cf2b88 100644 --- a/reflex/components/radix/themes/components/card.py +++ b/reflex/components/radix/themes/components/card.py @@ -22,3 +22,6 @@ class Card(el.Div, RadixThemesComponent): # Variant of Card: "solid" | "soft" | "outline" | "ghost" variant: Var[Literal["surface", "classic", "ghost"]] + + +card = Card.create diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi index 0c6457ff8..cf6f669a3 100644 --- a/reflex/components/radix/themes/components/card.pyi +++ b/reflex/components/radix/themes/components/card.pyi @@ -230,3 +230,5 @@ class Card(el.Div, RadixThemesComponent): A new component instance. """ ... + +card = Card.create diff --git a/reflex/components/radix/themes/components/checkbox.py b/reflex/components/radix/themes/components/checkbox.py index 97a69be00..aefa80458 100644 --- a/reflex/components/radix/themes/components/checkbox.py +++ b/reflex/components/radix/themes/components/checkbox.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.components.component import Component @@ -101,3 +102,13 @@ class HighLevelCheckbox(Checkbox): as_="label", size=size, ) + + +class CheckboxNamespace(SimpleNamespace): + """Checkbox components namespace.""" + + root = staticmethod(Checkbox.create) + __call__ = staticmethod(HighLevelCheckbox.create) + + +checkbox = CheckboxNamespace() diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index c6d17a650..815366c06 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.components.component import Component from reflex.components.radix.themes.layout.flex import Flex @@ -368,3 +369,183 @@ class HighLevelCheckbox(Checkbox): The checkbox component with a label. """ ... + +class CheckboxNamespace(SimpleNamespace): + root = staticmethod(Checkbox.create) + + @staticmethod + def __call__( + *children, + text: Optional[Union[Var[str], str]] = None, + gap: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + default_checked: Optional[Union[Var[bool], bool]] = None, + checked: Optional[Union[Var[bool], bool]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + required: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + value: Optional[Union[Var[str], str]] = 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, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_checked_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "HighLevelCheckbox": + """Create a checkbox with a label. + + Args: + text: The text of the label. + text: The text label for the checkbox. + gap: The gap between the checkbox and the label. + size: Button size "1" - "3" + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. + variant: Variant of button: "solid" | "soft" | "outline" | "ghost" + color_scheme: Override theme color for button + high_contrast: Whether to render the button with higher contrast color against background + default_checked: Whether the checkbox is checked by default + checked: Whether the checkbox is checked + disabled: Whether the checkbox is disabled + required: Whether the checkbox is required + name: The name of the checkbox control when submitting the form. + value: The value of the checkbox control when submitting the form. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Additional properties to apply to the checkbox item. + + Returns: + The checkbox component with a label. + """ + ... + +checkbox = CheckboxNamespace() diff --git a/reflex/components/radix/themes/components/contextmenu.py b/reflex/components/radix/themes/components/contextmenu.py index 0eb67a72d..a8a0b0f2c 100644 --- a/reflex/components/radix/themes/components/contextmenu.py +++ b/reflex/components/radix/themes/components/contextmenu.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.vars import Var @@ -131,3 +132,19 @@ class ContextMenuSeparator(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "ContextMenu.Separator" + + +class ContextMenu(SimpleNamespace): + """ContextMenu components namespace.""" + + root = __call__ = staticmethod(ContextMenuRoot.create) + trigger = staticmethod(ContextMenuTrigger.create) + content = staticmethod(ContextMenuContent.create) + sub = staticmethod(ContextMenuSub.create) + sub_trigger = staticmethod(ContextMenuSubTrigger.create) + sub_content = staticmethod(ContextMenuSubContent.create) + item = staticmethod(ContextMenuItem.create) + separator = staticmethod(ContextMenuSeparator.create) + + +context_menu = ContextMenu() diff --git a/reflex/components/radix/themes/components/contextmenu.pyi b/reflex/components/radix/themes/components/contextmenu.pyi index 3b346da51..25d9d5967 100644 --- a/reflex/components/radix/themes/components/contextmenu.pyi +++ b/reflex/components/radix/themes/components/contextmenu.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.vars import Var from ..base import LiteralAccentColor, RadixThemesComponent @@ -1217,3 +1218,161 @@ class ContextMenuSeparator(RadixThemesComponent): A new component instance. """ ... + +class ContextMenu(SimpleNamespace): + root = staticmethod(ContextMenuRoot.create) + trigger = staticmethod(ContextMenuTrigger.create) + content = staticmethod(ContextMenuContent.create) + sub = staticmethod(ContextMenuSub.create) + sub_trigger = staticmethod(ContextMenuSubTrigger.create) + sub_content = staticmethod(ContextMenuSubContent.create) + item = staticmethod(ContextMenuItem.create) + separator = staticmethod(ContextMenuSeparator.create) + + @staticmethod + def __call__( + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + modal: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ContextMenuRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + modal: The modality of the context menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +context_menu = ContextMenu() diff --git a/reflex/components/radix/themes/components/dialog.py b/reflex/components/radix/themes/components/dialog.py index 8cb3ef4ec..9d7042abc 100644 --- a/reflex/components/radix/themes/components/dialog.py +++ b/reflex/components/radix/themes/components/dialog.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el @@ -75,3 +76,17 @@ class DialogClose(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Dialog.Close" + + +class Dialog(SimpleNamespace): + """Dialog components namespace.""" + + root = __call__ = staticmethod(DialogRoot.create) + trigger = staticmethod(DialogTrigger.create) + title = staticmethod(DialogTitle.create) + content = staticmethod(DialogContent.create) + description = staticmethod(DialogDescription.create) + close = staticmethod(DialogClose.create) + + +dialog = Dialog() diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi index c0b7d38ed..aa039234a 100644 --- a/reflex/components/radix/themes/components/dialog.pyi +++ b/reflex/components/radix/themes/components/dialog.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el from reflex.vars import Var @@ -959,3 +960,159 @@ class DialogClose(RadixThemesComponent): A new component instance. """ ... + +class Dialog(SimpleNamespace): + root = staticmethod(DialogRoot.create) + trigger = staticmethod(DialogTrigger.create) + title = staticmethod(DialogTitle.create) + content = staticmethod(DialogContent.create) + description = staticmethod(DialogDescription.create) + close = staticmethod(DialogClose.create) + + @staticmethod + def __call__( + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + open: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DialogRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + open: The controlled open state of the dialog. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +dialog = Dialog() diff --git a/reflex/components/radix/themes/components/dropdownmenu.py b/reflex/components/radix/themes/components/dropdownmenu.py index 92fa410f3..f5dd6c7ef 100644 --- a/reflex/components/radix/themes/components/dropdownmenu.py +++ b/reflex/components/radix/themes/components/dropdownmenu.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.vars import Var @@ -104,3 +105,19 @@ class DropdownMenuSeparator(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "DropdownMenu.Separator" + + +class DropdownMenu(SimpleNamespace): + """DropdownMenu components namespace.""" + + root = __call__ = staticmethod(DropdownMenuRoot.create) + trigger = staticmethod(DropdownMenuTrigger.create) + content = staticmethod(DropdownMenuContent.create) + sub_trigger = staticmethod(DropdownMenuSubTrigger.create) + sub = staticmethod(DropdownMenuSub.create) + sub_content = staticmethod(DropdownMenuSubContent.create) + item = staticmethod(DropdownMenuItem.create) + separator = staticmethod(DropdownMenuSeparator.create) + + +dropdown_menu = DropdownMenu() diff --git a/reflex/components/radix/themes/components/dropdownmenu.pyi b/reflex/components/radix/themes/components/dropdownmenu.pyi index d97301515..95c72ff22 100644 --- a/reflex/components/radix/themes/components/dropdownmenu.pyi +++ b/reflex/components/radix/themes/components/dropdownmenu.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.vars import Var from ..base import LiteralAccentColor, RadixThemesComponent @@ -1193,3 +1194,163 @@ class DropdownMenuSeparator(RadixThemesComponent): A new component instance. """ ... + +class DropdownMenu(SimpleNamespace): + root = staticmethod(DropdownMenuRoot.create) + trigger = staticmethod(DropdownMenuTrigger.create) + content = staticmethod(DropdownMenuContent.create) + sub_trigger = staticmethod(DropdownMenuSubTrigger.create) + sub = staticmethod(DropdownMenuSub.create) + sub_content = staticmethod(DropdownMenuSubContent.create) + item = staticmethod(DropdownMenuItem.create) + separator = staticmethod(DropdownMenuSeparator.create) + + @staticmethod + def __call__( + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + open: Optional[Union[Var[bool], bool]] = None, + modal: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DropdownMenuRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + open: The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange. + modal: The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +dropdown_menu = DropdownMenu() diff --git a/reflex/components/radix/themes/components/hovercard.py b/reflex/components/radix/themes/components/hovercard.py index c16c03024..faf0afa3f 100644 --- a/reflex/components/radix/themes/components/hovercard.py +++ b/reflex/components/radix/themes/components/hovercard.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el @@ -60,3 +61,14 @@ class HoverCardContent(el.Div, RadixThemesComponent): # Whether or not the hover card should avoid collisions with its trigger. avoid_collisions: Var[bool] + + +class HoverCard(SimpleNamespace): + """HoverCard components namespace.""" + + root = __call__ = staticmethod(HoverCardRoot.create) + trigger = staticmethod(HoverCardTrigger.create) + content = staticmethod(HoverCardContent.create) + + +hover_card = HoverCard() diff --git a/reflex/components/radix/themes/components/hovercard.pyi b/reflex/components/radix/themes/components/hovercard.pyi index 962118ac5..f78f82ec2 100644 --- a/reflex/components/radix/themes/components/hovercard.pyi +++ b/reflex/components/radix/themes/components/hovercard.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el from reflex.vars import Var @@ -533,3 +534,162 @@ class HoverCardContent(el.Div, RadixThemesComponent): A new component instance. """ ... + +class HoverCard(SimpleNamespace): + root = staticmethod(HoverCardRoot.create) + trigger = staticmethod(HoverCardTrigger.create) + content = staticmethod(HoverCardContent.create) + + @staticmethod + def __call__( + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + default_open: Optional[Union[Var[bool], bool]] = None, + open: Optional[Union[Var[bool], bool]] = None, + open_delay: Optional[Union[Var[int], int]] = None, + close_delay: Optional[Union[Var[int], int]] = 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, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "HoverCardRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state. + open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange. + open_delay: The duration from when the mouse enters the trigger until the hover card opens. + close_delay: The duration from when the mouse leaves the trigger until the hover card closes. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +hover_card = HoverCard() diff --git a/reflex/components/radix/themes/components/iconbutton.py b/reflex/components/radix/themes/components/iconbutton.py index 43b990167..eec3e21ab 100644 --- a/reflex/components/radix/themes/components/iconbutton.py +++ b/reflex/components/radix/themes/components/iconbutton.py @@ -36,3 +36,6 @@ class IconButton(el.Button, RadixThemesComponent): # Override theme radius for button: "none" | "small" | "medium" | "large" | "full" radius: Var[LiteralRadius] + + +icon_button = IconButton.create diff --git a/reflex/components/radix/themes/components/iconbutton.pyi b/reflex/components/radix/themes/components/iconbutton.pyi index 1f512ca17..5f058d099 100644 --- a/reflex/components/radix/themes/components/iconbutton.pyi +++ b/reflex/components/radix/themes/components/iconbutton.pyi @@ -282,3 +282,5 @@ class IconButton(el.Button, RadixThemesComponent): A new component instance. """ ... + +icon_button = IconButton.create diff --git a/reflex/components/radix/themes/components/icons.py b/reflex/components/radix/themes/components/icons.py index b2e5dee97..05f7cf5ca 100644 --- a/reflex/components/radix/themes/components/icons.py +++ b/reflex/components/radix/themes/components/icons.py @@ -50,6 +50,9 @@ class Icon(RadixIconComponent): return super().create(*children, **props) +icon = Icon.create + + ICON_ABSTRACT: List[str] = [ "hamburger_menu", "cross_1", diff --git a/reflex/components/radix/themes/components/icons.pyi b/reflex/components/radix/themes/components/icons.pyi index 2002f9b0f..52d355401 100644 --- a/reflex/components/radix/themes/components/icons.pyi +++ b/reflex/components/radix/themes/components/icons.pyi @@ -172,6 +172,7 @@ class Icon(RadixIconComponent): """ ... +icon = Icon.create ICON_ABSTRACT: List[str] ICON_ALIGNS: List[str] ICON_ARROWS: List[str] diff --git a/reflex/components/radix/themes/components/inset.py b/reflex/components/radix/themes/components/inset.py index 572609bd1..8c0fd1e5c 100644 --- a/reflex/components/radix/themes/components/inset.py +++ b/reflex/components/radix/themes/components/inset.py @@ -42,3 +42,6 @@ class Inset(el.Div, RadixThemesComponent): # Padding on the left pl: Var[Union[int, str]] + + +inset = Inset.create diff --git a/reflex/components/radix/themes/components/inset.pyi b/reflex/components/radix/themes/components/inset.pyi index 9c6ae4a36..54ddfd696 100644 --- a/reflex/components/radix/themes/components/inset.pyi +++ b/reflex/components/radix/themes/components/inset.pyi @@ -245,3 +245,5 @@ class Inset(el.Div, RadixThemesComponent): A new component instance. """ ... + +inset = Inset.create diff --git a/reflex/components/radix/themes/components/popover.py b/reflex/components/radix/themes/components/popover.py index fa8ce6b59..6bb015920 100644 --- a/reflex/components/radix/themes/components/popover.py +++ b/reflex/components/radix/themes/components/popover.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el @@ -82,3 +83,15 @@ class PopoverClose(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Popover.Close" + + +class Popover(SimpleNamespace): + """Popover components namespace.""" + + root = __call__ = staticmethod(PopoverRoot.create) + trigger = staticmethod(PopoverTrigger.create) + content = staticmethod(PopoverContent.create) + close = staticmethod(PopoverClose.create) + + +popover = Popover() diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index d90f3f046..25e4c2926 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el from reflex.vars import Var @@ -696,3 +697,159 @@ class PopoverClose(RadixThemesComponent): A new component instance. """ ... + +class Popover(SimpleNamespace): + root = staticmethod(PopoverRoot.create) + trigger = staticmethod(PopoverTrigger.create) + content = staticmethod(PopoverContent.create) + close = staticmethod(PopoverClose.create) + + @staticmethod + def __call__( + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + open: Optional[Union[Var[bool], bool]] = None, + modal: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "PopoverRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + open: The controlled open state of the popover. + modal: The modality of the popover. When set to true, interaction with outside elements will be disabled and only popover content will be visible to screen readers. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +popover = Popover() diff --git a/reflex/components/radix/themes/components/radiogroup.py b/reflex/components/radix/themes/components/radiogroup.py index 099a7c287..9e31dfffc 100644 --- a/reflex/components/radix/themes/components/radiogroup.py +++ b/reflex/components/radix/themes/components/radiogroup.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union import reflex as rx @@ -160,3 +161,14 @@ class HighLevelRadioGroup(RadioGroupRoot): default_value=default_value, **props, ) + + +class RadioGroup(SimpleNamespace): + """RadioGroup components namespace.""" + + root = staticmethod(RadioGroupRoot.create) + item = staticmethod(RadioGroupItem.create) + __call__ = staticmethod(HighLevelRadioGroup.create) + + +radio_group = RadioGroup() diff --git a/reflex/components/radix/themes/components/radiogroup.pyi b/reflex/components/radix/themes/components/radiogroup.pyi index 8f4b0a15c..e2a2135a9 100644 --- a/reflex/components/radix/themes/components/radiogroup.pyi +++ b/reflex/components/radix/themes/components/radiogroup.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union import reflex as rx from reflex.components.component import Component @@ -536,3 +537,196 @@ class HighLevelRadioGroup(RadioGroupRoot): The created radio group component. """ ... + +class RadioGroup(SimpleNamespace): + root = staticmethod(RadioGroupRoot.create) + item = staticmethod(RadioGroupItem.create) + + @staticmethod + def __call__( + *children, + items: Optional[Union[Var[List[str]], List[str]]] = None, + direction: Optional[ + Union[ + Var[Literal["row", "column", "row-reverse", "column-reverse"]], + Literal["row", "column", "row-reverse", "column-reverse"], + ] + ] = None, + gap: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + value: Optional[Union[Var[str], str]] = None, + default_value: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + required: Optional[Union[Var[bool], bool]] = None, + orientation: Optional[ + Union[ + Var[Literal["horizontal", "vertical"]], + Literal["horizontal", "vertical"], + ] + ] = None, + loop: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_value_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "HighLevelRadioGroup": + """Create a radio group component. + + Args: + items: The items of the radio group. + items: The items of the radio group. + direction: The direction of the radio group. + gap: The gap between the items of the radio group. + size: The size of the radio group: "1" | "2" | "3" + variant: The variant of the radio group + color_scheme: The color of the radio group + high_contrast: Whether to render the radio group with higher contrast color against background + value: The controlled value of the radio item to check. Should be used in conjunction with on_value_change. + default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange. + disabled: Whether the radio group is disabled + name: The name of the group. Submitted with its owning form as part of a name/value pair. + required: Whether the radio group is required + orientation: The orientation of the component. + loop: When true, keyboard navigation will loop from last item to first, and vice versa. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Additional properties to apply to the accordion item. + + Returns: + The created radio group component. + """ + ... + +radio_group = RadioGroup() diff --git a/reflex/components/radix/themes/components/scrollarea.py b/reflex/components/radix/themes/components/scrollarea.py index 77fa190ee..911cda1a8 100644 --- a/reflex/components/radix/themes/components/scrollarea.py +++ b/reflex/components/radix/themes/components/scrollarea.py @@ -28,3 +28,6 @@ class ScrollArea(RadixThemesComponent): # If type is set to either "scroll" or "hover", this prop determines the length of time, in milliseconds, before the scrollbars are hidden after the user stops interacting with scrollbars. scroll_hide_delay: Var[int] + + +scroll_area = ScrollArea.create diff --git a/reflex/components/radix/themes/components/scrollarea.pyi b/reflex/components/radix/themes/components/scrollarea.pyi index b51b35ca9..3744965d1 100644 --- a/reflex/components/radix/themes/components/scrollarea.pyi +++ b/reflex/components/radix/themes/components/scrollarea.pyi @@ -179,3 +179,5 @@ class ScrollArea(RadixThemesComponent): A new component instance. """ ... + +scroll_area = ScrollArea.create diff --git a/reflex/components/radix/themes/components/select.py b/reflex/components/radix/themes/components/select.py index 57388e625..a053a59fd 100644 --- a/reflex/components/radix/themes/components/select.py +++ b/reflex/components/radix/themes/components/select.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, List, Literal, Union import reflex as rx @@ -223,3 +224,19 @@ class HighLevelSelect(SelectRoot): ), **props, ) + + +class Select(SimpleNamespace): + """Select components namespace.""" + + root = staticmethod(SelectRoot.create) + trigger = staticmethod(SelectTrigger.create) + content = staticmethod(SelectContent.create) + group = staticmethod(SelectGroup.create) + item = staticmethod(SelectItem.create) + separator = staticmethod(SelectSeparator.create) + label = staticmethod(SelectLabel.create) + __call__ = staticmethod(HighLevelSelect.create) + + +select = Select() diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi index d13d675d2..1db16617f 100644 --- a/reflex/components/radix/themes/components/select.pyi +++ b/reflex/components/radix/themes/components/select.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, List, Literal, Union import reflex as rx from reflex.components.component import Component @@ -1295,3 +1296,198 @@ class HighLevelSelect(SelectRoot): The select component. """ ... + +class Select(SimpleNamespace): + root = staticmethod(SelectRoot.create) + trigger = staticmethod(SelectTrigger.create) + content = staticmethod(SelectContent.create) + group = staticmethod(SelectGroup.create) + item = staticmethod(SelectItem.create) + separator = staticmethod(SelectSeparator.create) + label = staticmethod(SelectLabel.create) + + @staticmethod + def __call__( + *children, + items: Optional[Union[Var[List[str]], List[str]]] = None, + placeholder: Optional[Union[Var[str], str]] = None, + label: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft", "ghost"]], + Literal["classic", "surface", "soft", "ghost"], + ] + ] = None, + radius: Optional[ + Union[ + Var[Literal["none", "small", "medium", "large", "full"]], + Literal["none", "small", "medium", "large", "full"], + ] + ] = None, + width: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + default_value: Optional[Union[Var[str], str]] = None, + value: Optional[Union[Var[str], str]] = None, + default_open: Optional[Union[Var[bool], bool]] = None, + open: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + required: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_value_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "HighLevelSelect": + """Create a select component. + + Args: + items: The items of the select. + items: The items of the select. + placeholder: The placeholder of the select. + label: The label of the select. + color_scheme: The color of the select. + high_contrast: Whether to render the select with higher contrast color against background. + variant: The variant of the select. + radius: The radius of the select. + width: The width of the select. + size: The size of the select: "1" | "2" | "3" + default_value: The value of the select when initially rendered. Use when you do not need to control the state of the select. + value: The controlled value of the select. Should be used in conjunction with on_value_change. + default_open: The open state of the select when it is initially rendered. Use when you do not need to control its open state. + open: The controlled open state of the select. Must be used in conjunction with on_open_change. + name: The name of the select control when submitting the form. + disabled: When True, prevents the user from interacting with select. + required: When True, indicates that the user must select a value before the owning form can be submitted. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Additional properties to apply to the select component. + + Returns: + The select component. + """ + ... + +select = Select() diff --git a/reflex/components/radix/themes/components/separator.py b/reflex/components/radix/themes/components/separator.py index 80d369f04..08a147ca1 100644 --- a/reflex/components/radix/themes/components/separator.py +++ b/reflex/components/radix/themes/components/separator.py @@ -27,3 +27,6 @@ class Separator(RadixThemesComponent): # When true, signifies that it is purely visual, carries no semantic meaning, and ensures it is not present in the accessibility tree. decorative: Var[bool] + + +separator = Separator.create diff --git a/reflex/components/radix/themes/components/separator.pyi b/reflex/components/radix/themes/components/separator.pyi index 680cc13cf..01dadf3e2 100644 --- a/reflex/components/radix/themes/components/separator.pyi +++ b/reflex/components/radix/themes/components/separator.pyi @@ -169,3 +169,5 @@ class Separator(RadixThemesComponent): A new component instance. """ ... + +separator = Separator.create diff --git a/reflex/components/radix/themes/components/slider.py b/reflex/components/radix/themes/components/slider.py index e8cda4b6d..611883ecd 100644 --- a/reflex/components/radix/themes/components/slider.py +++ b/reflex/components/radix/themes/components/slider.py @@ -68,3 +68,6 @@ class Slider(RadixThemesComponent): "on_value_change": lambda e0: [e0], "on_value_commit": lambda e0: [e0], } + + +slider = Slider.create diff --git a/reflex/components/radix/themes/components/slider.pyi b/reflex/components/radix/themes/components/slider.pyi index 6564834a4..a847b1c45 100644 --- a/reflex/components/radix/themes/components/slider.pyi +++ b/reflex/components/radix/themes/components/slider.pyi @@ -208,3 +208,5 @@ class Slider(RadixThemesComponent): A new component instance. """ ... + +slider = Slider.create diff --git a/reflex/components/radix/themes/components/switch.py b/reflex/components/radix/themes/components/switch.py index dc5132ce1..8e5de69e9 100644 --- a/reflex/components/radix/themes/components/switch.py +++ b/reflex/components/radix/themes/components/switch.py @@ -65,3 +65,6 @@ class Switch(RadixThemesComponent): **super().get_event_triggers(), EventTriggers.ON_CHECKED_CHANGE: lambda checked: [checked], } + + +switch = Switch.create diff --git a/reflex/components/radix/themes/components/switch.pyi b/reflex/components/radix/themes/components/switch.pyi index 3414c5078..08fce2e3a 100644 --- a/reflex/components/radix/themes/components/switch.pyi +++ b/reflex/components/radix/themes/components/switch.pyi @@ -200,3 +200,5 @@ class Switch(RadixThemesComponent): A new component instance. """ ... + +switch = Switch.create diff --git a/reflex/components/radix/themes/components/table.py b/reflex/components/radix/themes/components/table.py index 4f67a2a2c..042318f03 100644 --- a/reflex/components/radix/themes/components/table.py +++ b/reflex/components/radix/themes/components/table.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Literal, Union from reflex import el @@ -76,3 +77,18 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): # width of the column width: Var[Union[str, int]] + + +class Table(SimpleNamespace): + """Table components namespace.""" + + root = __call__ = staticmethod(TableRoot.create) + header = staticmethod(TableHeader.create) + body = staticmethod(TableBody.create) + row = staticmethod(TableRow.create) + cell = staticmethod(TableCell.create) + column_header_cell = staticmethod(TableColumnHeaderCell.create) + row_header_cell = staticmethod(TableRowHeaderCell.create) + + +table = Table() diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index 4e348c9af..126ba7e5c 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Literal, Union from reflex import el from reflex.vars import Var @@ -1597,3 +1598,243 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): A new component instance. """ ... + +class Table(SimpleNamespace): + root = staticmethod(TableRoot.create) + header = staticmethod(TableHeader.create) + body = staticmethod(TableBody.create) + row = staticmethod(TableRow.create) + cell = staticmethod(TableCell.create) + column_header_cell = staticmethod(TableColumnHeaderCell.create) + row_header_cell = staticmethod(TableRowHeaderCell.create) + + @staticmethod + def __call__( + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[Var[Literal["surface", "ghost"]], Literal["surface", "ghost"]] + ] = None, + align: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + background: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + bgcolor: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + border: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + summary: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + translate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "TableRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + size: The size of the table: "1" | "2" | "3" + variant: The variant of the table + align: Alignment of the table + background: Background image for the table + bgcolor: Background color of the table + border: Specifies the width of the border around the table + summary: Provides a summary of the table's purpose and structure + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + translate: Specifies whether the content of an element should be translated or not. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +table = Table() diff --git a/reflex/components/radix/themes/components/tabs.py b/reflex/components/radix/themes/components/tabs.py index c371edf20..d709c50ab 100644 --- a/reflex/components/radix/themes/components/tabs.py +++ b/reflex/components/radix/themes/components/tabs.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.vars import Var @@ -62,3 +63,15 @@ class TabsContent(RadixThemesComponent): # The value of the tab. Must be unique for each tab. value: Var[str] + + +class Tabs(SimpleNamespace): + """Tabs components namespace.""" + + root = __call__ = staticmethod(TabsRoot.create) + list = staticmethod(TabsList.create) + trigger = staticmethod(TabsTrigger.create) + content = staticmethod(TabsContent.create) + + +tabs = Tabs() diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi index ba33bed05..f394a0e25 100644 --- a/reflex/components/radix/themes/components/tabs.pyi +++ b/reflex/components/radix/themes/components/tabs.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.vars import Var from ..base import RadixThemesComponent @@ -611,3 +612,170 @@ class TabsContent(RadixThemesComponent): A new component instance. """ ... + +class Tabs(SimpleNamespace): + root = staticmethod(TabsRoot.create) + list = staticmethod(TabsList.create) + trigger = staticmethod(TabsTrigger.create) + content = staticmethod(TabsContent.create) + + @staticmethod + def __call__( + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + variant: Optional[ + Union[Var[Literal["surface", "ghost"]], Literal["surface", "ghost"]] + ] = None, + default_value: Optional[Union[Var[str], str]] = None, + value: Optional[Union[Var[str], str]] = None, + orientation: Optional[ + Union[ + Var[Literal["horizontal", "vertical"]], + Literal["horizontal", "vertical"], + ] + ] = 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, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_value_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "TabsRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + variant: The variant of the tab + default_value: The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. + value: The controlled value of the tab that should be active. Use when you need to control the state of the tabs. + orientation: The orientation of the tabs. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +tabs = Tabs() diff --git a/reflex/components/radix/themes/components/textarea.py b/reflex/components/radix/themes/components/textarea.py index 0fe0ca575..13b5ee308 100644 --- a/reflex/components/radix/themes/components/textarea.py +++ b/reflex/components/radix/themes/components/textarea.py @@ -65,3 +65,6 @@ class TextArea(RadixThemesComponent, el.Textarea): EventTriggers.ON_KEY_DOWN: lambda e0: [e0.key], EventTriggers.ON_KEY_UP: lambda e0: [e0.key], } + + +text_area = TextArea.create diff --git a/reflex/components/radix/themes/components/textarea.pyi b/reflex/components/radix/themes/components/textarea.pyi index 02badfd6e..7c35ad5f1 100644 --- a/reflex/components/radix/themes/components/textarea.pyi +++ b/reflex/components/radix/themes/components/textarea.pyi @@ -286,3 +286,5 @@ class TextArea(RadixThemesComponent, el.Textarea): """ ... def get_event_triggers(self) -> Dict[str, Any]: ... + +text_area = TextArea.create diff --git a/reflex/components/radix/themes/components/textfield.py b/reflex/components/radix/themes/components/textfield.py index 1b840cd74..63d0bdfed 100644 --- a/reflex/components/radix/themes/components/textfield.py +++ b/reflex/components/radix/themes/components/textfield.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" +from types import SimpleNamespace from typing import Any, Dict, Literal import reflex as rx @@ -191,3 +192,15 @@ class Input(RadixThemesComponent): EventTriggers.ON_KEY_DOWN: lambda e0: [e0.key], EventTriggers.ON_KEY_UP: lambda e0: [e0.key], } + + +class TextField(SimpleNamespace): + """TextField components namespace.""" + + root = staticmethod(TextFieldRoot.create) + input = staticmethod(TextFieldInput.create) + slot = staticmethod(TextFieldSlot.create) + __call__ = staticmethod(Input.create) + + +text_field = TextField() diff --git a/reflex/components/radix/themes/components/textfield.pyi b/reflex/components/radix/themes/components/textfield.pyi index 8b81af8ec..c9123cbd0 100644 --- a/reflex/components/radix/themes/components/textfield.pyi +++ b/reflex/components/radix/themes/components/textfield.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Any, Dict, Literal import reflex as rx from reflex.components import el @@ -913,3 +914,192 @@ class Input(RadixThemesComponent): """ ... def get_event_triggers(self) -> Dict[str, Any]: ... + +class TextField(SimpleNamespace): + root = staticmethod(TextFieldRoot.create) + input = staticmethod(TextFieldInput.create) + slot = staticmethod(TextFieldSlot.create) + + @staticmethod + def __call__( + *children, + icon: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + radius: Optional[ + Union[ + Var[Literal["none", "small", "medium", "large", "full"]], + Literal["none", "small", "medium", "large", "full"], + ] + ] = None, + auto_complete: Optional[Union[Var[bool], bool]] = None, + default_value: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + max_length: Optional[Union[Var[str], str]] = None, + min_length: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + placeholder: Optional[Union[Var[str], str]] = None, + required: Optional[Union[Var[bool], bool]] = None, + value: Optional[Union[Var[str], str]] = 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, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_key_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_key_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Input": + """Create an Input component. + + Args: + icon: The icon to render before the input. + size: Text field size "1" - "3" + variant: Variant of text field: "classic" | "surface" | "soft" + color_scheme: Override theme color for text field + radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full" + auto_complete: Whether the input should have autocomplete enabled + default_value: The value of the input when initially rendered. + disabled: Disables the input + max_length: Specifies the maximum number of characters allowed in the input + min_length: Specifies the minimum number of characters required in the input + name: Name of the input, used when sending form data + placeholder: Placeholder text in the input + required: Indicates that the input is required + value: Value of the input + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The component. + """ + ... + +text_field = TextField() diff --git a/reflex/components/radix/themes/components/tooltip.py b/reflex/components/radix/themes/components/tooltip.py index 3cf60df56..e9ea61e92 100644 --- a/reflex/components/radix/themes/components/tooltip.py +++ b/reflex/components/radix/themes/components/tooltip.py @@ -13,3 +13,6 @@ class Tooltip(RadixThemesComponent): # The content of the tooltip. content: Var[str] + + +tooltip = Tooltip.create diff --git a/reflex/components/radix/themes/components/tooltip.pyi b/reflex/components/radix/themes/components/tooltip.pyi index f609b1605..f123ee6fa 100644 --- a/reflex/components/radix/themes/components/tooltip.pyi +++ b/reflex/components/radix/themes/components/tooltip.pyi @@ -155,3 +155,5 @@ class Tooltip(RadixThemesComponent): A new component instance. """ ... + +tooltip = Tooltip.create diff --git a/reflex/components/radix/themes/layout/__init__.py b/reflex/components/radix/themes/layout/__init__.py index 78e7a828f..ae8688460 100644 --- a/reflex/components/radix/themes/layout/__init__.py +++ b/reflex/components/radix/themes/layout/__init__.py @@ -18,3 +18,15 @@ section = Section.create spacer = Spacer.create hstack = HStack.create vstack = VStack.create + +__all__ = [ + "box", + "center", + "container", + "flex", + "grid", + "section", + "spacer", + "hstack", + "vstack", +] diff --git a/reflex/components/radix/themes/typography/__init__.py b/reflex/components/radix/themes/typography/__init__.py index 1d47a44fa..bcd41399c 100644 --- a/reflex/components/radix/themes/typography/__init__.py +++ b/reflex/components/radix/themes/typography/__init__.py @@ -19,3 +19,15 @@ link = Link.create quote = Quote.create strong = Strong.create text = Text.create + +__all__ = [ + "blockquote", + "code", + "em", + "heading", + "kbd", + "link", + "quote", + "strong", + "text", +] From aa4bdf53d5a085f756b2232706f2eddc77566894 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 31 Jan 2024 16:06:04 -0800 Subject: [PATCH 05/68] enable CI on reflex-0.4.0 branch (#2502) --- .github/workflows/check_generated_pyi.yml | 4 ++-- .github/workflows/integration_app_harness.yml | 4 ++-- .github/workflows/integration_tests.yml | 6 +++--- .github/workflows/integration_tests_wsl.yml | 4 ++-- .github/workflows/pre-commit.yml | 4 ++-- .github/workflows/reflex_init_in_docker_test.yml | 2 +- .github/workflows/unit_tests.yml | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/check_generated_pyi.yml b/.github/workflows/check_generated_pyi.yml index 0d283c8b0..9fa8ea1fc 100644 --- a/.github/workflows/check_generated_pyi.yml +++ b/.github/workflows/check_generated_pyi.yml @@ -2,14 +2,14 @@ name: check-generated-pyi on: push: - branches: [ "main" ] + branches: [ "main", "reflex-0.4.0" ] # We don't just trigger on pyi_generator.py and the components dir, because # there are other things that can change the generator output # e.g. black version, reflex.Component, reflex.Var. paths-ignore: - '**/*.md' pull_request: - branches: [ "main" ] + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' diff --git a/.github/workflows/integration_app_harness.yml b/.github/workflows/integration_app_harness.yml index 25ef6a155..4b76a0515 100644 --- a/.github/workflows/integration_app_harness.yml +++ b/.github/workflows/integration_app_harness.yml @@ -2,11 +2,11 @@ name: integration-app-harness on: push: - branches: [ "main" ] + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' pull_request: - branches: [ "main" ] + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 0e4e627e5..5a460cd39 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -2,11 +2,11 @@ name: integration-tests on: push: - branches: [ main ] + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' pull_request: - branches: [ main ] + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' @@ -125,7 +125,7 @@ jobs: uses: actions/checkout@v4 with: repository: reflex-dev/reflex-web - ref: main + ref: reflex-0.4.0 path: reflex-web - name: Install Requirements for reflex-web diff --git a/.github/workflows/integration_tests_wsl.yml b/.github/workflows/integration_tests_wsl.yml index be035ebba..bf51748a4 100644 --- a/.github/workflows/integration_tests_wsl.yml +++ b/.github/workflows/integration_tests_wsl.yml @@ -2,11 +2,11 @@ name: integration-tests-wsl on: push: - branches: [ "main" ] + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' pull_request: - branches: [ main ] + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 612092652..c035b4f1d 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -2,12 +2,12 @@ name: pre-commit on: pull_request: - branches: [main] + branches: [ "main", "reflex-0.4.0" ] push: # Note even though this job is called "pre-commit" and runs "pre-commit", this job will run # also POST-commit on main also! In case there are mishandled merge conflicts / bad auto-resolves # when merging into main branch. - branches: [main] + branches: [ "main", "reflex-0.4.0" ] jobs: pre-commit: diff --git a/.github/workflows/reflex_init_in_docker_test.yml b/.github/workflows/reflex_init_in_docker_test.yml index a60c278a9..bbe45c6c1 100644 --- a/.github/workflows/reflex_init_in_docker_test.yml +++ b/.github/workflows/reflex_init_in_docker_test.yml @@ -2,7 +2,7 @@ name: reflex-init-in-docker-test on: push: - branches: [ "main" ] + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' pull_request: diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 0f8110295..865bfe630 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -2,11 +2,11 @@ name: unit-tests on: push: - branches: [ "main" ] + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' pull_request: - branches: [ "main" ] + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' From 2f70e3e43a3bb2fcfda9ce1477a762a6e227c445 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 2 Feb 2024 12:16:59 -0800 Subject: [PATCH 06/68] [REF-1839] Reserve top-level __call__ for a future high level API (#2518) * Reserve top-level __call__ for a future high level API Instead of aliasing the top-level `__call__` to `.root`, require users to explicitly call `.root` to avoid breakage when a future high level API gets implemented and takes over the top-level `__call__` Fix REF-1839 * alertdialog: forgot this one --- .../components/radix/primitives/accordion.py | 2 +- .../components/radix/primitives/accordion.pyi | 116 --------- reflex/components/radix/primitives/form.py | 2 +- reflex/components/radix/primitives/form.pyi | 87 ------- .../radix/themes/components/alertdialog.py | 2 +- .../radix/themes/components/alertdialog.pyi | 148 ----------- .../radix/themes/components/checkbox.py | 1 - .../radix/themes/components/checkbox.pyi | 2 - .../radix/themes/components/contextmenu.py | 2 +- .../radix/themes/components/contextmenu.pyi | 148 ----------- .../radix/themes/components/dropdownmenu.py | 2 +- .../radix/themes/components/dropdownmenu.pyi | 150 ------------ .../radix/themes/components/popover.py | 2 +- .../radix/themes/components/popover.pyi | 150 ------------ .../radix/themes/components/table.py | 2 +- .../radix/themes/components/table.pyi | 231 ------------------ 16 files changed, 7 insertions(+), 1040 deletions(-) diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index b7fb04d40..aa012da00 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -627,7 +627,7 @@ class Accordion(SimpleNamespace): content = staticmethod(AccordionContent.create) header = staticmethod(AccordionHeader.create) item = staticmethod(accordion_item) - root = __call__ = staticmethod(AccordionRoot.create) + root = staticmethod(AccordionRoot.create) trigger = staticmethod(AccordionTrigger.create) diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 64a985b63..56488e4b6 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -586,120 +586,4 @@ class Accordion(SimpleNamespace): root = staticmethod(AccordionRoot.create) trigger = staticmethod(AccordionTrigger.create) - @staticmethod - def __call__( - *children, - type_: Optional[ - Union[Var[Literal["single", "multiple"]], Literal["single", "multiple"]] - ] = None, - value: Optional[Union[Var[str], str]] = None, - default_value: Optional[Union[Var[str], str]] = None, - collapsible: Optional[Union[Var[bool], bool]] = None, - disabled: Optional[Union[Var[bool], bool]] = None, - dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None, - orientation: Optional[ - Union[ - Var[Literal["vertical", "horizontal"]], - Literal["vertical", "horizontal"], - ] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "soft", "surface", "outline", "ghost"]], - Literal["classic", "soft", "surface", "outline", "ghost"], - ] - ] = None, - color_scheme: Optional[ - Union[Var[Literal["primary", "accent"]], Literal["primary", "accent"]] - ] = None, - _dynamic_themes: Optional[Union[Var[dict], dict]] = None, - _var_data: Optional[VarData] = None, - as_child: Optional[Union[Var[bool], bool]] = None, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_value_change: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - **props - ) -> "AccordionRoot": - """Create the Accordion root component. - - Args: - *children: The children of the component. - type_: The type of accordion (single or multiple). - value: The value of the item to expand. - default_value: The default value of the item to expand. - collapsible: Whether or not the accordion is collapsible. - disabled: Whether or not the accordion is disabled. - dir: The reading direction of the accordion when applicable. - orientation: The orientation of the accordion. - variant: The variant of the accordion. - color_scheme: The color scheme of the accordion. - _dynamic_themes: dynamic themes of the accordion generated at compile time. - _var_data: The var_data associated with the component. - as_child: Change the default rendered element for the one passed as a child. - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of - custom_attrs: custom attribute - **props: The properties of the component. - - Returns: - The Accordion root Component. - """ - ... - accordion = Accordion() diff --git a/reflex/components/radix/primitives/form.py b/reflex/components/radix/primitives/form.py index 5e267413d..655fd34d5 100644 --- a/reflex/components/radix/primitives/form.py +++ b/reflex/components/radix/primitives/form.py @@ -297,7 +297,7 @@ class Form(SimpleNamespace): field = staticmethod(FormField.create) label = staticmethod(FormLabel.create) message = staticmethod(FormMessage.create) - root = __call__ = staticmethod(FormRoot.create) + root = staticmethod(FormRoot.create) submit = staticmethod(FormSubmit.create) validity_state = staticmethod(FormValidityState.create) diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index 220b4e7cd..5c29918ab 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -761,91 +761,4 @@ class Form(SimpleNamespace): submit = staticmethod(FormSubmit.create) validity_state = staticmethod(FormValidityState.create) - @staticmethod - def __call__( - *children, - reset_on_submit: Optional[Union[Var[bool], bool]] = None, - handle_submit_unique_name: Optional[Union[Var[str], str]] = None, - as_child: Optional[Union[Var[bool], bool]] = None, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_clear_server_errors: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_submit: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - **props - ) -> "FormRoot": - """Create a form component. - - Args: - *children: The children of the form. - reset_on_submit: If true, the form will be cleared after submit. - handle_submit_unique_name: The name used to make this form's submit handler function unique. - as_child: Change the default rendered element for the one passed as a child. - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of - custom_attrs: custom attribute - **props: The properties of the form. - - Returns: - The form component. - """ - ... - form = Form() diff --git a/reflex/components/radix/themes/components/alertdialog.py b/reflex/components/radix/themes/components/alertdialog.py index f087d0aea..943ac31e8 100644 --- a/reflex/components/radix/themes/components/alertdialog.py +++ b/reflex/components/radix/themes/components/alertdialog.py @@ -98,7 +98,7 @@ class AlertDialogCancel(RadixThemesComponent): class AlertDialog(SimpleNamespace): """AlertDialog components namespace.""" - root = __call__ = staticmethod(AlertDialogRoot.create) + root = staticmethod(AlertDialogRoot.create) trigger = staticmethod(AlertDialogTrigger.create) content = staticmethod(AlertDialogContent.create) title = staticmethod(AlertDialogTitle.create) diff --git a/reflex/components/radix/themes/components/alertdialog.pyi b/reflex/components/radix/themes/components/alertdialog.pyi index 2eb2b41bc..6815e584a 100644 --- a/reflex/components/radix/themes/components/alertdialog.pyi +++ b/reflex/components/radix/themes/components/alertdialog.pyi @@ -1132,152 +1132,4 @@ class AlertDialog(SimpleNamespace): action = staticmethod(AlertDialogAction.create) cancel = staticmethod(AlertDialogCancel.create) - @staticmethod - def __call__( - *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, - open: Optional[Union[Var[bool], bool]] = None, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_open_change: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - **props - ) -> "AlertDialogRoot": - """Create a new component instance. - - Will prepend "RadixThemes" to the component tag to avoid conflicts with - other UI libraries for common names, like Text and Button. - - Args: - *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. - open: The controlled open state of the dialog. - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of - custom_attrs: custom attribute - **props: Component properties. - - Returns: - A new component instance. - """ - ... - alert_dialog = AlertDialog() diff --git a/reflex/components/radix/themes/components/checkbox.py b/reflex/components/radix/themes/components/checkbox.py index 532bb2b77..455b92530 100644 --- a/reflex/components/radix/themes/components/checkbox.py +++ b/reflex/components/radix/themes/components/checkbox.py @@ -114,7 +114,6 @@ class HighLevelCheckbox(Checkbox): class CheckboxNamespace(SimpleNamespace): """Checkbox components namespace.""" - root = staticmethod(Checkbox.create) __call__ = staticmethod(HighLevelCheckbox.create) diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index 9ab393959..42a57ef86 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -376,8 +376,6 @@ class HighLevelCheckbox(Checkbox): ... class CheckboxNamespace(SimpleNamespace): - root = staticmethod(Checkbox.create) - @staticmethod def __call__( *children, diff --git a/reflex/components/radix/themes/components/contextmenu.py b/reflex/components/radix/themes/components/contextmenu.py index 5355cba4b..46465b202 100644 --- a/reflex/components/radix/themes/components/contextmenu.py +++ b/reflex/components/radix/themes/components/contextmenu.py @@ -138,7 +138,7 @@ class ContextMenuSeparator(RadixThemesComponent): class ContextMenu(SimpleNamespace): """ContextMenu components namespace.""" - root = __call__ = staticmethod(ContextMenuRoot.create) + root = staticmethod(ContextMenuRoot.create) trigger = staticmethod(ContextMenuTrigger.create) content = staticmethod(ContextMenuContent.create) sub = staticmethod(ContextMenuSub.create) diff --git a/reflex/components/radix/themes/components/contextmenu.pyi b/reflex/components/radix/themes/components/contextmenu.pyi index d98e867e2..d18956e4b 100644 --- a/reflex/components/radix/themes/components/contextmenu.pyi +++ b/reflex/components/radix/themes/components/contextmenu.pyi @@ -1246,152 +1246,4 @@ class ContextMenu(SimpleNamespace): item = staticmethod(ContextMenuItem.create) separator = staticmethod(ContextMenuSeparator.create) - @staticmethod - def __call__( - *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, - modal: Optional[Union[Var[bool], bool]] = None, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_open_change: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - **props - ) -> "ContextMenuRoot": - """Create a new component instance. - - Will prepend "RadixThemes" to the component tag to avoid conflicts with - other UI libraries for common names, like Text and Button. - - Args: - *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. - modal: The modality of the context menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of - custom_attrs: custom attribute - **props: Component properties. - - Returns: - A new component instance. - """ - ... - context_menu = ContextMenu() diff --git a/reflex/components/radix/themes/components/dropdownmenu.py b/reflex/components/radix/themes/components/dropdownmenu.py index 0c7276e51..b80eb79b5 100644 --- a/reflex/components/radix/themes/components/dropdownmenu.py +++ b/reflex/components/radix/themes/components/dropdownmenu.py @@ -111,7 +111,7 @@ class DropdownMenuSeparator(RadixThemesComponent): class DropdownMenu(SimpleNamespace): """DropdownMenu components namespace.""" - root = __call__ = staticmethod(DropdownMenuRoot.create) + root = staticmethod(DropdownMenuRoot.create) trigger = staticmethod(DropdownMenuTrigger.create) content = staticmethod(DropdownMenuContent.create) sub_trigger = staticmethod(DropdownMenuSubTrigger.create) diff --git a/reflex/components/radix/themes/components/dropdownmenu.pyi b/reflex/components/radix/themes/components/dropdownmenu.pyi index fda7390f9..637c8ae55 100644 --- a/reflex/components/radix/themes/components/dropdownmenu.pyi +++ b/reflex/components/radix/themes/components/dropdownmenu.pyi @@ -1222,154 +1222,4 @@ class DropdownMenu(SimpleNamespace): item = staticmethod(DropdownMenuItem.create) separator = staticmethod(DropdownMenuSeparator.create) - @staticmethod - def __call__( - *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, - open: Optional[Union[Var[bool], bool]] = None, - modal: Optional[Union[Var[bool], bool]] = None, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_open_change: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - **props - ) -> "DropdownMenuRoot": - """Create a new component instance. - - Will prepend "RadixThemes" to the component tag to avoid conflicts with - other UI libraries for common names, like Text and Button. - - Args: - *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. - open: The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange. - modal: The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of - custom_attrs: custom attribute - **props: Component properties. - - Returns: - A new component instance. - """ - ... - dropdown_menu = DropdownMenu() diff --git a/reflex/components/radix/themes/components/popover.py b/reflex/components/radix/themes/components/popover.py index a1730c64c..238e592ef 100644 --- a/reflex/components/radix/themes/components/popover.py +++ b/reflex/components/radix/themes/components/popover.py @@ -89,7 +89,7 @@ class PopoverClose(RadixThemesComponent): class Popover(SimpleNamespace): """Popover components namespace.""" - root = __call__ = staticmethod(PopoverRoot.create) + root = staticmethod(PopoverRoot.create) trigger = staticmethod(PopoverTrigger.create) content = staticmethod(PopoverContent.create) close = staticmethod(PopoverClose.create) diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index a3a40b397..b69cc0fb3 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -713,154 +713,4 @@ class Popover(SimpleNamespace): content = staticmethod(PopoverContent.create) close = staticmethod(PopoverClose.create) - @staticmethod - def __call__( - *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, - open: Optional[Union[Var[bool], bool]] = None, - modal: Optional[Union[Var[bool], bool]] = None, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_open_change: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - **props - ) -> "PopoverRoot": - """Create a new component instance. - - Will prepend "RadixThemes" to the component tag to avoid conflicts with - other UI libraries for common names, like Text and Button. - - Args: - *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. - open: The controlled open state of the popover. - modal: The modality of the popover. When set to true, interaction with outside elements will be disabled and only popover content will be visible to screen readers. - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of - custom_attrs: custom attribute - **props: Component properties. - - Returns: - A new component instance. - """ - ... - popover = Popover() diff --git a/reflex/components/radix/themes/components/table.py b/reflex/components/radix/themes/components/table.py index 042318f03..5fe67ae0d 100644 --- a/reflex/components/radix/themes/components/table.py +++ b/reflex/components/radix/themes/components/table.py @@ -82,7 +82,7 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): class Table(SimpleNamespace): """Table components namespace.""" - root = __call__ = staticmethod(TableRoot.create) + root = staticmethod(TableRoot.create) header = staticmethod(TableHeader.create) body = staticmethod(TableBody.create) row = staticmethod(TableRow.create) diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index 32a4e8086..8918332ea 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -1622,235 +1622,4 @@ class Table(SimpleNamespace): column_header_cell = staticmethod(TableColumnHeaderCell.create) row_header_cell = staticmethod(TableRowHeaderCell.create) - @staticmethod - def __call__( - *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] - ] = None, - variant: Optional[ - Union[Var[Literal["surface", "ghost"]], Literal["surface", "ghost"]] - ] = None, - align: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - background: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - border: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - summary: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - access_key: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - auto_capitalize: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - content_editable: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - context_menu: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, - draggable: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - enter_key_hint: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - hidden: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - input_mode: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - item_prop: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, - role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, - slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, - spell_check: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - tab_index: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - title: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - **props - ) -> "TableRoot": - """Create a new component instance. - - Will prepend "RadixThemes" to the component tag to avoid conflicts with - other UI libraries for common names, like Text and Button. - - Args: - *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. - size: The size of the table: "1" | "2" | "3" - variant: The variant of the table - align: Alignment of the table - background: Background image for the table - bgcolor: Background color of the table - border: Specifies the width of the border around the table - summary: Provides a summary of the table's purpose and structure - access_key: Provides a hint for generating a keyboard shortcut for the current element. - auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. - content_editable: Indicates whether the element's content is editable. - context_menu: Defines the ID of a element which will serve as the element's context menu. - dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) - draggable: Defines whether the element can be dragged. - enter_key_hint: Hints what media types the media element is able to play. - hidden: Defines whether the element is hidden. - input_mode: Defines the type of the element. - item_prop: Defines the name of the element for metadata purposes. - lang: Defines the language used in the element. - role: Defines the role of the element. - slot: Assigns a slot in a shadow DOM shadow tree to an element. - spell_check: Defines whether the element may be checked for spelling errors. - tab_index: Defines the position of the current element in the tabbing order. - title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of - custom_attrs: custom attribute - **props: Component properties. - - Returns: - A new component instance. - """ - ... - table = Table() From 05d1be21823c620d0bfc20d28cd541d53faf3ab0 Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Sat, 3 Feb 2024 05:26:46 +0700 Subject: [PATCH 07/68] Move core components to radix namespace (#2506) --- .coveragerc | 4 +- integration/test_background_task.py | 4 +- integration/test_call_script.py | 6 +- integration/test_client_storage.py | 6 +- integration/test_dynamic_routes.py | 12 +- integration/test_event_actions.py | 6 +- integration/test_event_chain.py | 6 +- integration/test_form_submit.py | 62 +-- integration/test_input.py | 8 +- integration/test_login_flow.py | 2 +- integration/test_server_side_event.py | 8 +- integration/test_state_inheritance.py | 2 +- integration/test_table.py | 52 +- integration/test_tailwind.py | 2 +- integration/test_upload.py | 6 +- integration/test_var_operations.py | 9 +- reflex/.templates/web/utils/state.js | 7 +- reflex/__init__.py | 310 ++++-------- reflex/__init__.pyi | 471 ++---------------- reflex/components/__init__.py | 5 +- reflex/components/chakra/__init__.py | 1 - reflex/components/chakra/layout/__init__.py | 1 - reflex/components/core/__init__.py | 2 + .../{chakra/layout => core}/html.py | 4 +- .../{chakra/layout => core}/html.pyi | 72 ++- tests/components/forms/test_debounce.py | 6 +- tests/components/forms/test_uploads.py | 4 +- tests/components/layout/test_match.py | 22 +- tests/components/test_component.py | 12 +- tests/components/typography/test_markdown.py | 2 +- tests/test_app.py | 17 +- 31 files changed, 350 insertions(+), 781 deletions(-) rename reflex/components/{chakra/layout => core}/html.py (92%) rename reflex/components/{chakra/layout => core}/html.pyi (50%) diff --git a/.coveragerc b/.coveragerc index afd851874..8c3df0fa4 100644 --- a/.coveragerc +++ b/.coveragerc @@ -5,7 +5,7 @@ branch = true [report] show_missing = true # TODO bump back to 79 -fail_under = 70 +fail_under = 69 precision = 2 # Regexes for lines to exclude from consideration @@ -28,4 +28,4 @@ exclude_also = ignore_errors = True [html] -directory = coverage_html_report \ No newline at end of file +directory = coverage_html_report diff --git a/integration/test_background_task.py b/integration/test_background_task.py index 799d68c2f..619efa6cf 100644 --- a/integration/test_background_task.py +++ b/integration/test_background_task.py @@ -59,11 +59,11 @@ def BackgroundTask(): def index() -> rx.Component: return rx.vstack( - rx.input( + rx.chakra.input( id="token", value=State.router.session.client_token, is_read_only=True ), rx.heading(State.counter, id="counter"), - rx.input( + rx.chakra.input( id="iterations", placeholder="Iterations", value=State.iterations.to_string(), # type: ignore diff --git a/integration/test_call_script.py b/integration/test_call_script.py index c3a364306..97f995487 100644 --- a/integration/test_call_script.py +++ b/integration/test_call_script.py @@ -142,17 +142,17 @@ def CallScript(): @app.add_page def index(): return rx.vstack( - rx.input( + rx.chakra.input( value=CallScriptState.router.session.client_token, is_read_only=True, id="token", ), - rx.input( + rx.chakra.input( value=CallScriptState.inline_counter.to(str), # type: ignore id="inline_counter", is_read_only=True, ), - rx.input( + rx.chakra.input( value=CallScriptState.external_counter.to(str), # type: ignore id="external_counter", is_read_only=True, diff --git a/integration/test_client_storage.py b/integration/test_client_storage.py index 2678f3d52..0452e7cab 100644 --- a/integration/test_client_storage.py +++ b/integration/test_client_storage.py @@ -55,18 +55,18 @@ def ClientSide(): def index(): return rx.fragment( - rx.input( + rx.chakra.input( value=ClientSideState.router.session.client_token, is_read_only=True, id="token", ), - rx.input( + rx.chakra.input( placeholder="state var", value=ClientSideState.state_var, on_change=ClientSideState.set_state_var, # type: ignore id="state_var", ), - rx.input( + rx.chakra.input( placeholder="input value", value=ClientSideState.input_value, on_change=ClientSideState.set_input_value, # type: ignore diff --git a/integration/test_dynamic_routes.py b/integration/test_dynamic_routes.py index 7cb64754f..9fa597d2b 100644 --- a/integration/test_dynamic_routes.py +++ b/integration/test_dynamic_routes.py @@ -35,13 +35,15 @@ def DynamicRoute(): def index(): return rx.fragment( - rx.input( + rx.chakra.input( value=DynamicState.router.session.client_token, is_read_only=True, id="token", ), - rx.input(value=DynamicState.page_id, is_read_only=True, id="page_id"), - rx.input( + rx.chakra.input( + value=DynamicState.page_id, is_read_only=True, id="page_id" + ), + rx.chakra.input( value=DynamicState.router.page.raw_path, is_read_only=True, id="raw_path", @@ -52,8 +54,8 @@ def DynamicRoute(): "next", href="/page/" + DynamicState.next_page, id="link_page_next" # type: ignore ), rx.link("missing", href="/missing", id="link_missing"), - rx.list( - rx.foreach(DynamicState.order, lambda i: rx.list_item(rx.text(i))), # type: ignore + rx.chakra.list( + rx.foreach(DynamicState.order, lambda i: rx.chakra.list_item(rx.text(i))), # type: ignore ), ) diff --git a/integration/test_event_actions.py b/integration/test_event_actions.py index 89c8ece22..05e333f3c 100644 --- a/integration/test_event_actions.py +++ b/integration/test_event_actions.py @@ -42,7 +42,7 @@ def TestEventAction(): def index(): return rx.vstack( - rx.input( + rx.chakra.input( value=EventActionState.router.session.client_token, is_read_only=True, id="token", @@ -121,10 +121,10 @@ def TestEventAction(): "custom-prevent-default" ).prevent_default, ), - rx.list( + rx.chakra.list( rx.foreach( EventActionState.order, # type: ignore - rx.list_item, + rx.chakra.list_item, ), ), on_click=EventActionState.on_click("outer"), # type: ignore diff --git a/integration/test_event_chain.py b/integration/test_event_chain.py index ec3f125b4..587e0f63d 100644 --- a/integration/test_event_chain.py +++ b/integration/test_event_chain.py @@ -124,7 +124,7 @@ def EventChain(): app = rx.App(state=rx.State) - token_input = rx.input( + token_input = rx.chakra.input( value=State.router.session.client_token, is_read_only=True, id="token" ) @@ -132,7 +132,9 @@ def EventChain(): def index(): return rx.fragment( token_input, - rx.input(value=State.interim_value, is_read_only=True, id="interim_value"), + rx.chakra.input( + value=State.interim_value, is_read_only=True, id="interim_value" + ), rx.button( "Return Event", id="return_event", diff --git a/integration/test_form_submit.py b/integration/test_form_submit.py index b64846c1b..8f7792eff 100644 --- a/integration/test_form_submit.py +++ b/integration/test_form_submit.py @@ -27,28 +27,28 @@ def FormSubmit(): @app.add_page def index(): return rx.vstack( - rx.input( + rx.chakra.input( value=FormState.router.session.client_token, is_read_only=True, id="token", ), - rx.form( + rx.form.root( rx.vstack( - rx.input(id="name_input"), - rx.hstack(rx.pin_input(length=4, id="pin_input")), - rx.number_input(id="number_input"), + rx.chakra.input(id="name_input"), + rx.hstack(rx.chakra.pin_input(length=4, id="pin_input")), + rx.chakra.number_input(id="number_input"), rx.checkbox(id="bool_input"), rx.switch(id="bool_input2"), rx.checkbox(id="bool_input3"), rx.switch(id="bool_input4"), - rx.slider(id="slider_input"), - rx.range_slider(id="range_input"), + rx.slider(id="slider_input", default_value=[50], width="100%"), + rx.chakra.range_slider(id="range_input"), rx.radio_group(["option1", "option2"], id="radio_input"), rx.radio_group(FormState.var_options, id="radio_input_var"), - rx.select(["option1", "option2"], id="select_input"), - rx.select(FormState.var_options, id="select_input_var"), + rx.chakra.select(["option1", "option2"], id="select_input"), + rx.chakra.select(FormState.var_options, id="select_input_var"), rx.text_area(id="text_area_input"), - rx.input( + rx.chakra.input( id="debounce_input", debounce_timeout=0, on_change=rx.console_log, @@ -80,37 +80,41 @@ def FormSubmitName(): @app.add_page def index(): return rx.vstack( - rx.input( + rx.chakra.input( value=FormState.router.session.client_token, is_read_only=True, id="token", ), - rx.form( + rx.form.root( rx.vstack( - rx.input(name="name_input"), - rx.hstack(rx.pin_input(length=4, name="pin_input")), - rx.number_input(name="number_input"), + rx.chakra.input(name="name_input"), + rx.hstack(rx.chakra.pin_input(length=4, name="pin_input")), + rx.chakra.number_input(name="number_input"), rx.checkbox(name="bool_input"), rx.switch(name="bool_input2"), rx.checkbox(name="bool_input3"), rx.switch(name="bool_input4"), - rx.slider(name="slider_input"), - rx.range_slider(name="range_input"), + rx.slider(name="slider_input", default_value=[50], width="100%"), + rx.chakra.range_slider(name="range_input"), rx.radio_group(FormState.options, name="radio_input"), - rx.select(FormState.options, name="select_input"), + rx.select( + FormState.options, + name="select_input", + default_value=FormState.options[0], + ), rx.text_area(name="text_area_input"), - rx.input_group( - rx.input_left_element(rx.icon(tag="chevron_right")), - rx.input( + rx.chakra.input_group( + rx.chakra.input_left_element(rx.icon(tag="chevron_right")), + rx.chakra.input( name="debounce_input", debounce_timeout=0, on_change=rx.console_log, ), - rx.input_right_element(rx.icon(tag="chevron_left")), + rx.chakra.input_right_element(rx.icon(tag="chevron_left")), ), - rx.button_group( + rx.chakra.button_group( rx.button("Submit", type_="submit"), - rx.icon_button(FormState.val, icon=rx.icon(tag="add")), + rx.icon_button(FormState.val, icon=rx.icon(tag="plus")), variant="outline", is_attached=True, ), @@ -194,16 +198,16 @@ async def test_submit(driver, form_submit: AppHarness): for _ in range(3): buttons[1].click() - checkbox_input = driver.find_element(By.CLASS_NAME, "chakra-checkbox__control") + checkbox_input = driver.find_element(By.XPATH, "//button[@role='checkbox']") checkbox_input.click() - switch_input = driver.find_element(By.CLASS_NAME, "chakra-switch__track") + switch_input = driver.find_element(By.XPATH, "//button[@role='switch']") switch_input.click() - radio_buttons = driver.find_elements(By.CLASS_NAME, "chakra-radio__control") + radio_buttons = driver.find_elements(By.XPATH, "//button[@role='radio']") radio_buttons[1].click() - textarea_input = driver.find_element(By.CLASS_NAME, "chakra-textarea") + textarea_input = driver.find_element(By.TAG_NAME, "textarea") textarea_input.send_keys("Some", Keys.ENTER, "Text") debounce_input = driver.find_element(by, "debounce_input") @@ -213,7 +217,7 @@ async def test_submit(driver, form_submit: AppHarness): prev_url = driver.current_url - submit_input = driver.find_element(By.CLASS_NAME, "chakra-button") + submit_input = driver.find_element(By.CLASS_NAME, "rt-Button") submit_input.click() async def get_form_data(): diff --git a/integration/test_input.py b/integration/test_input.py index 111124349..cbb12de24 100644 --- a/integration/test_input.py +++ b/integration/test_input.py @@ -21,16 +21,16 @@ def FullyControlledInput(): @app.add_page def index(): return rx.fragment( - rx.input( + rx.chakra.input( value=State.router.session.client_token, is_read_only=True, id="token" ), - rx.input( + rx.chakra.input( id="debounce_input_input", on_change=State.set_text, # type: ignore value=State.text, ), - rx.input(value=State.text, id="value_input", is_read_only=True), - rx.input(on_change=State.set_text, id="on_change_input"), # type: ignore + rx.chakra.input(value=State.text, id="value_input", is_read_only=True), + rx.chakra.input(on_change=State.set_text, id="on_change_input"), # type: ignore rx.el.input( value=State.text, id="plain_value_input", diff --git a/integration/test_login_flow.py b/integration/test_login_flow.py index a4272fe39..209459322 100644 --- a/integration/test_login_flow.py +++ b/integration/test_login_flow.py @@ -28,7 +28,7 @@ def LoginSample(): yield rx.redirect("/") def index(): - return rx.Cond.create( + return rx.cond( State.is_hydrated & State.auth_token, # type: ignore rx.vstack( rx.heading(State.auth_token, id="auth-token"), diff --git a/integration/test_server_side_event.py b/integration/test_server_side_event.py index b8e8d21c0..f461131a0 100644 --- a/integration/test_server_side_event.py +++ b/integration/test_server_side_event.py @@ -38,12 +38,12 @@ def ServerSideEvent(): @app.add_page def index(): return rx.fragment( - rx.input( + rx.chakra.input( id="token", value=SSState.router.session.client_token, is_read_only=True ), - rx.input(default_value="a", id="a"), - rx.input(default_value="b", id="b"), - rx.input(default_value="c", id="c"), + rx.chakra.input(default_value="a", id="a"), + rx.chakra.input(default_value="b", id="b"), + rx.chakra.input(default_value="c", id="c"), rx.button( "Clear Immediate", id="clear_immediate", diff --git a/integration/test_state_inheritance.py b/integration/test_state_inheritance.py index 9ceafa228..5aed07ae2 100644 --- a/integration/test_state_inheritance.py +++ b/integration/test_state_inheritance.py @@ -62,7 +62,7 @@ def StateInheritance(): def index() -> rx.Component: return rx.vstack( - rx.input( + rx.chakra.input( id="token", value=Base1.router.session.client_token, is_read_only=True ), rx.heading(Base1.computed_mixin, id="base1-computed_mixin"), diff --git a/integration/test_table.py b/integration/test_table.py index 560d70b94..0a6153c2b 100644 --- a/integration/test_table.py +++ b/integration/test_table.py @@ -31,13 +31,13 @@ def Table(): @app.add_page def index(): return rx.center( - rx.input( + rx.chakra.input( id="token", value=TableState.router.session.client_token, is_read_only=True, ), - rx.table_container( - rx.table( + rx.chakra.table_container( + rx.chakra.table( headers=TableState.headers, rows=TableState.rows, footers=TableState.footers, @@ -52,36 +52,36 @@ def Table(): @app.add_page def another(): return rx.center( - rx.table_container( - rx.table( # type: ignore - rx.thead( # type: ignore - rx.tr( # type: ignore - rx.th("Name"), - rx.th("Age"), - rx.th("Location"), + rx.chakra.table_container( + rx.chakra.table( # type: ignore + rx.chakra.thead( # type: ignore + rx.chakra.tr( # type: ignore + rx.chakra.th("Name"), + rx.chakra.th("Age"), + rx.chakra.th("Location"), ) ), - rx.tbody( # type: ignore - rx.tr( # type: ignore - rx.td("John"), - rx.td(30), - rx.td("New York"), + rx.chakra.tbody( # type: ignore + rx.chakra.tr( # type: ignore + rx.chakra.td("John"), + rx.chakra.td(30), + rx.chakra.td("New York"), ), - rx.tr( # type: ignore - rx.td("Jane"), - rx.td(31), - rx.td("San Francisco"), + rx.chakra.tr( # type: ignore + rx.chakra.td("Jane"), + rx.chakra.td(31), + rx.chakra.td("San Francisco"), ), - rx.tr( # type: ignore - rx.td("Joe"), - rx.td(32), - rx.td("Los Angeles"), + rx.chakra.tr( # type: ignore + rx.chakra.td("Joe"), + rx.chakra.td(32), + rx.chakra.td("Los Angeles"), ), ), - rx.tfoot( # type: ignore - rx.tr(rx.td("footer1"), rx.td("footer2"), rx.td("footer3")) # type: ignore + rx.chakra.tfoot( # type: ignore + rx.chakra.tr(rx.chakra.td("footer1"), rx.chakra.td("footer2"), rx.chakra.td("footer3")) # type: ignore ), - rx.table_caption("random caption"), + rx.chakra.table_caption("random caption"), variant="striped", color_scheme="teal", ) diff --git a/integration/test_tailwind.py b/integration/test_tailwind.py index 71079fc0e..d5fe764d1 100644 --- a/integration/test_tailwind.py +++ b/integration/test_tailwind.py @@ -30,7 +30,7 @@ def TailwindApp( def index(): return rx.el.div( - rx.text(paragraph_text, class_name=paragraph_class_name), + rx.chakra.text(paragraph_text, class_name=paragraph_class_name), rx.el.p(paragraph_text, class_name=paragraph_class_name), rdxt.text(paragraph_text, as_="p", class_name=paragraph_class_name), id="p-content", diff --git a/integration/test_upload.py b/integration/test_upload.py index c832f5acf..f498c6dd4 100644 --- a/integration/test_upload.py +++ b/integration/test_upload.py @@ -41,7 +41,7 @@ def UploadFile(): def index(): return rx.vstack( - rx.input( + rx.chakra.input( value=UploadState.router.session.client_token, is_read_only=True, id="token", @@ -61,7 +61,7 @@ def UploadFile(): rx.box( rx.foreach( rx.selected_files, - lambda f: rx.text(f), + lambda f: rx.text(f, as_="p"), ), id="selected_files", ), @@ -91,7 +91,7 @@ def UploadFile(): rx.box( rx.foreach( rx.selected_files("secondary"), - lambda f: rx.text(f), + lambda f: rx.text(f, as_="p"), ), id="selected_files_secondary", ), diff --git a/integration/test_var_operations.py b/integration/test_var_operations.py index 4c56c01f5..f0f53ab83 100644 --- a/integration/test_var_operations.py +++ b/integration/test_var_operations.py @@ -532,7 +532,7 @@ def VarOperations(): VarOperationState.html_str, id="html_str", ), - rx.highlight( + rx.chakra.highlight( "second", query=[VarOperationState.str_var2], ), @@ -542,14 +542,15 @@ def VarOperations(): rx.text(rx.Var.range(0, 3).join(","), id="list_join_range4"), rx.box( rx.foreach( - rx.Var.range(0, 2), lambda x: rx.text(VarOperationState.list1[x]) + rx.Var.range(0, 2), + lambda x: rx.text(VarOperationState.list1[x], as_="p"), ), id="foreach_list_arg", ), rx.box( rx.foreach( rx.Var.range(0, 2), - lambda x, ix: rx.text(VarOperationState.list1[ix]), + lambda x, ix: rx.text(VarOperationState.list1[ix], as_="p"), ), id="foreach_list_ix", ), @@ -558,7 +559,7 @@ def VarOperations(): rx.Var.create_safe(list(range(0, 3))).to(list[int]), lambda x: rx.foreach( rx.Var.range(x), - lambda y: rx.text(VarOperationState.list1[y]), + lambda y: rx.text(VarOperationState.list1[y], as_="p"), ), ), id="foreach_list_nested", diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index 8015bbc1b..c4411864e 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -594,7 +594,12 @@ export const getRefValue = (ref) => { return; } if (ref.current.type == "checkbox") { - return ref.current.checked; + return ref.current.checked; // chakra + } else if (ref.current.className.includes("rt-CheckboxButton") || ref.current.className.includes("rt-SwitchButton")) { + return ref.current.ariaChecked == "true"; // radix + } else if (ref.current.className.includes("rt-SliderRoot")) { + // find the actual slider + return ref.current.querySelector(".rt-SliderThumb").ariaValueNow; } else { //querySelector(":checked") is needed to get value from radio_group return ref.current.value || (ref.current.querySelector(':checked') && ref.current.querySelector(':checked').value); diff --git a/reflex/__init__.py b/reflex/__init__.py index 87280b130..d9f638c34 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -15,235 +15,93 @@ from reflex.utils import console from reflex.utils.format import to_snake_case _ALL_COMPONENTS = [ - "Accordion", - "AccordionButton", - "AccordionIcon", - "AccordionItem", - "AccordionPanel", - "Alert", - "AlertDescription", - "AlertDialog", - "AlertDialogBody", - "AlertDialogContent", - "AlertDialogFooter", - "AlertDialogHeader", - "AlertDialogOverlay", - "AlertIcon", - "AlertTitle", - "AspectRatio", - "Audio", - "Avatar", - "AvatarBadge", - "AvatarGroup", - "Badge", - "Box", - "Breadcrumb", - "BreadcrumbItem", - "BreadcrumbLink", - "BreadcrumbSeparator", - "Button", - "ButtonGroup", - "Card", - "CardBody", - "CardFooter", - "CardHeader", - "Center", - "Checkbox", - "CheckboxGroup", - "CircularProgress", - "CircularProgressLabel", - "Circle", - "Code", - "CodeBlock", - "Collapse", - "ColorModeButton", - "ColorModeIcon", - "ColorModeSwitch", - "Component", - "Cond", - "ConnectionBanner", - "ConnectionModal", - "Container", - "DataTable", - "DataEditor", - "DataEditorTheme", - "DatePicker", - "DateTimePicker", - "DebounceInput", - "Divider", - "Drawer", - "DrawerBody", - "DrawerCloseButton", - "DrawerContent", - "DrawerFooter", - "DrawerHeader", - "DrawerOverlay", - "Editable", - "EditableInput", - "EditablePreview", - "EditableTextarea", - "Editor", - "Email", - "Fade", - "Flex", - "Foreach", - "Form", - "FormControl", - "FormErrorMessage", - "FormHelperText", - "FormLabel", - "Fragment", - "Grid", - "GridItem", - "Heading", - "Highlight", - "Hstack", - "Html", - "Icon", - "IconButton", - "Image", - "Input", - "InputGroup", - "InputLeftAddon", - "InputLeftElement", - "InputRightAddon", - "InputRightElement", - "Kbd", - "Link", - "LinkBox", - "LinkOverlay", - "List", - "ListItem", - "Markdown", - "Match", - "Menu", - "MenuButton", - "MenuDivider", - "MenuGroup", - "MenuItem", - "MenuItemOption", - "MenuList", - "MenuOptionGroup", - "Modal", - "ModalBody", - "ModalCloseButton", - "ModalContent", - "ModalFooter", - "ModalHeader", - "ModalOverlay", - "Moment", - "MultiSelect", - "MultiSelectOption", - "NextLink", - "NumberDecrementStepper", - "NumberIncrementStepper", - "NumberInput", - "NumberInputField", - "NumberInputStepper", - "Option", - "OrderedList", - "Password", - "PinInput", - "PinInputField", - "Plotly", - "Popover", - "PopoverAnchor", - "PopoverArrow", - "PopoverBody", - "PopoverCloseButton", - "PopoverContent", - "PopoverFooter", - "PopoverHeader", - "PopoverTrigger", - "Progress", - "Radio", - "RadioGroup", - "RangeSlider", - "RangeSliderFilledTrack", - "RangeSliderThumb", - "RangeSliderTrack", - "ResponsiveGrid", - "ScaleFade", - "Script", - "Select", - "Skeleton", - "SkeletonCircle", - "SkeletonText", - "Slide", - "SlideFade", - "Slider", - "SliderFilledTrack", - "SliderMark", - "SliderThumb", - "SliderTrack", - "Spacer", - "Span", - "Spinner", - "Square", - "Stack", - "Stat", - "StatArrow", - "StatGroup", - "StatHelpText", - "StatLabel", - "StatNumber", - "Step", - "StepDescription", - "StepIcon", - "StepIndicator", - "StepNumber", - "StepSeparator", - "StepStatus", - "StepTitle", - "Stepper", - "Switch", - "Tab", - "TabList", - "TabPanel", - "TabPanels", - "Table", - "TableCaption", - "TableContainer", - "Tabs", - "Tag", - "TagCloseButton", - "TagLabel", - "TagLeftIcon", - "TagRightIcon", - "Tbody", - "Td", - "Text", - "TextArea", - "Tfoot", - "Th", - "Thead", - "TimePicker", - "Tooltip", - "Tr", - "UnorderedList", - "Upload", - "Video", - "VisuallyHidden", - "Vstack", - "Wrap", - "WrapItem", -] - -_ALL_COMPONENTS += [to_snake_case(component) for component in _ALL_COMPONENTS] -_ALL_COMPONENTS += [ - "cancel_upload", - "components", - "color_mode_cond", + # Core + "cond", + "foreach", + "html", + "match", + # "color_mode_cond", + "connection_banner", + "connection_modal", + "debounce_input", + # Base + "fragment", + "image", + "script", + # Responsive "desktop_only", - "mobile_only", - "tablet_only", "mobile_and_tablet", + "mobile_only", "tablet_and_desktop", - "selected_files", + "tablet_only", + # Upload + "cancel_upload", "clear_selected_files", + "selected_files", + "upload", + # Radix + "accordion", + "alert_dialog", + "aspect_ratio", + "avatar", + "badge", + "blockquote", + "box", + "button", + "callout", + "card", + "center", + "checkbox", + "code", + "container", + "context_menu", + "dialog", + "drawer", + "dropdown_menu", + # "bold" (em) + "flex", + "form", + "grid", + "heading", + "hover_card", + "hstack", + # "icon" (lucide) + "icon_button", + "inset", + "kbd", + "link", + "popover", + "progress", + # "quote", + "radio_group", + "scroll_area", + "section", + "select", + "separator", + # "separator" (divider?), + "slider", + "spacer", + # "strong" (bold?) + "switch", + "table", + "tabs", + "text", + "text_area", + # "text_field" (input) + "theme", + "theme_panel", + "tooltip", + "vstack", + # Other + "data_editor", + "data_editor_theme", + "plotly", + "audio", + "video", + "editor", "EditorButtonList", "EditorOptions", - "NoSSRComponent", + "icon", ] _MAPPING = { @@ -252,10 +110,10 @@ _MAPPING = { "reflex.base": ["base", "Base"], "reflex.compiler": ["compiler"], "reflex.compiler.utils": ["get_asset_path"], - "reflex.components": _ALL_COMPONENTS + ["chakra", "next"], - "reflex.components.component": ["memo"], + "reflex.components": _ALL_COMPONENTS, + "reflex.components.component": ["Component", "NoSSRComponent", "memo"], + "reflex.components.chakra": ["chakra"], "reflex.components.el": ["el"], - "reflex.components.lucide": ["lucide"], "reflex.components.radix": ["radix"], "reflex.components.recharts": ["recharts"], "reflex.components.moment.moment": ["MomentDelta"], diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index 251e8d34f..d69fe5012 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -7,448 +7,85 @@ from reflex import base as base from reflex.base import Base as Base from reflex import compiler as compiler from reflex.compiler.utils import get_asset_path as get_asset_path -from reflex.components import Accordion as Accordion -from reflex.components import AccordionButton as AccordionButton -from reflex.components import AccordionIcon as AccordionIcon -from reflex.components import AccordionItem as AccordionItem -from reflex.components import AccordionPanel as AccordionPanel -from reflex.components import Alert as Alert -from reflex.components import AlertDescription as AlertDescription -from reflex.components import AlertDialog as AlertDialog -from reflex.components import AlertDialogBody as AlertDialogBody -from reflex.components import AlertDialogContent as AlertDialogContent -from reflex.components import AlertDialogFooter as AlertDialogFooter -from reflex.components import AlertDialogHeader as AlertDialogHeader -from reflex.components import AlertDialogOverlay as AlertDialogOverlay -from reflex.components import AlertIcon as AlertIcon -from reflex.components import AlertTitle as AlertTitle -from reflex.components import AspectRatio as AspectRatio -from reflex.components import Audio as Audio -from reflex.components import Avatar as Avatar -from reflex.components import AvatarBadge as AvatarBadge -from reflex.components import AvatarGroup as AvatarGroup -from reflex.components import Badge as Badge -from reflex.components import Box as Box -from reflex.components import Breadcrumb as Breadcrumb -from reflex.components import BreadcrumbItem as BreadcrumbItem -from reflex.components import BreadcrumbLink as BreadcrumbLink -from reflex.components import BreadcrumbSeparator as BreadcrumbSeparator -from reflex.components import Button as Button -from reflex.components import ButtonGroup as ButtonGroup -from reflex.components import Card as Card -from reflex.components import CardBody as CardBody -from reflex.components import CardFooter as CardFooter -from reflex.components import CardHeader as CardHeader -from reflex.components import Center as Center -from reflex.components import Checkbox as Checkbox -from reflex.components import CheckboxGroup as CheckboxGroup -from reflex.components import CircularProgress as CircularProgress -from reflex.components import CircularProgressLabel as CircularProgressLabel -from reflex.components import Circle as Circle -from reflex.components import Code as Code -from reflex.components import CodeBlock as CodeBlock -from reflex.components import Collapse as Collapse -from reflex.components import ColorModeButton as ColorModeButton -from reflex.components import ColorModeIcon as ColorModeIcon -from reflex.components import ColorModeSwitch as ColorModeSwitch -from reflex.components import Component as Component -from reflex.components import Cond as Cond -from reflex.components import ConnectionBanner as ConnectionBanner -from reflex.components import ConnectionModal as ConnectionModal -from reflex.components import Container as Container -from reflex.components import DataTable as DataTable -from reflex.components import DataEditor as DataEditor -from reflex.components import DataEditorTheme as DataEditorTheme -from reflex.components import DatePicker as DatePicker -from reflex.components import DateTimePicker as DateTimePicker -from reflex.components import DebounceInput as DebounceInput -from reflex.components import Divider as Divider -from reflex.components import Drawer as Drawer -from reflex.components import DrawerBody as DrawerBody -from reflex.components import DrawerCloseButton as DrawerCloseButton -from reflex.components import DrawerContent as DrawerContent -from reflex.components import DrawerFooter as DrawerFooter -from reflex.components import DrawerHeader as DrawerHeader -from reflex.components import DrawerOverlay as DrawerOverlay -from reflex.components import Editable as Editable -from reflex.components import EditableInput as EditableInput -from reflex.components import EditablePreview as EditablePreview -from reflex.components import EditableTextarea as EditableTextarea -from reflex.components import Editor as Editor -from reflex.components import Email as Email -from reflex.components import Fade as Fade -from reflex.components import Flex as Flex -from reflex.components import Foreach as Foreach -from reflex.components import Form as Form -from reflex.components import FormControl as FormControl -from reflex.components import FormErrorMessage as FormErrorMessage -from reflex.components import FormHelperText as FormHelperText -from reflex.components import FormLabel as FormLabel -from reflex.components import Fragment as Fragment -from reflex.components import Grid as Grid -from reflex.components import GridItem as GridItem -from reflex.components import Heading as Heading -from reflex.components import Highlight as Highlight -from reflex.components import Hstack as Hstack -from reflex.components import Html as Html -from reflex.components import Icon as Icon -from reflex.components import IconButton as IconButton -from reflex.components import Image as Image -from reflex.components import Input as Input -from reflex.components import InputGroup as InputGroup -from reflex.components import InputLeftAddon as InputLeftAddon -from reflex.components import InputLeftElement as InputLeftElement -from reflex.components import InputRightAddon as InputRightAddon -from reflex.components import InputRightElement as InputRightElement -from reflex.components import Kbd as Kbd -from reflex.components import Link as Link -from reflex.components import LinkBox as LinkBox -from reflex.components import LinkOverlay as LinkOverlay -from reflex.components import List as List -from reflex.components import ListItem as ListItem -from reflex.components import Markdown as Markdown -from reflex.components import Match as Match -from reflex.components import Menu as Menu -from reflex.components import MenuButton as MenuButton -from reflex.components import MenuDivider as MenuDivider -from reflex.components import MenuGroup as MenuGroup -from reflex.components import MenuItem as MenuItem -from reflex.components import MenuItemOption as MenuItemOption -from reflex.components import MenuList as MenuList -from reflex.components import MenuOptionGroup as MenuOptionGroup -from reflex.components import Modal as Modal -from reflex.components import ModalBody as ModalBody -from reflex.components import ModalCloseButton as ModalCloseButton -from reflex.components import ModalContent as ModalContent -from reflex.components import ModalFooter as ModalFooter -from reflex.components import ModalHeader as ModalHeader -from reflex.components import ModalOverlay as ModalOverlay -from reflex.components import Moment as Moment -from reflex.components import MultiSelect as MultiSelect -from reflex.components import MultiSelectOption as MultiSelectOption -from reflex.components import NextLink as NextLink -from reflex.components import NumberDecrementStepper as NumberDecrementStepper -from reflex.components import NumberIncrementStepper as NumberIncrementStepper -from reflex.components import NumberInput as NumberInput -from reflex.components import NumberInputField as NumberInputField -from reflex.components import NumberInputStepper as NumberInputStepper -from reflex.components import Option as Option -from reflex.components import OrderedList as OrderedList -from reflex.components import Password as Password -from reflex.components import PinInput as PinInput -from reflex.components import PinInputField as PinInputField -from reflex.components import Plotly as Plotly -from reflex.components import Popover as Popover -from reflex.components import PopoverAnchor as PopoverAnchor -from reflex.components import PopoverArrow as PopoverArrow -from reflex.components import PopoverBody as PopoverBody -from reflex.components import PopoverCloseButton as PopoverCloseButton -from reflex.components import PopoverContent as PopoverContent -from reflex.components import PopoverFooter as PopoverFooter -from reflex.components import PopoverHeader as PopoverHeader -from reflex.components import PopoverTrigger as PopoverTrigger -from reflex.components import Progress as Progress -from reflex.components import Radio as Radio -from reflex.components import RadioGroup as RadioGroup -from reflex.components import RangeSlider as RangeSlider -from reflex.components import RangeSliderFilledTrack as RangeSliderFilledTrack -from reflex.components import RangeSliderThumb as RangeSliderThumb -from reflex.components import RangeSliderTrack as RangeSliderTrack -from reflex.components import ResponsiveGrid as ResponsiveGrid -from reflex.components import ScaleFade as ScaleFade -from reflex.components import Script as Script -from reflex.components import Select as Select -from reflex.components import Skeleton as Skeleton -from reflex.components import SkeletonCircle as SkeletonCircle -from reflex.components import SkeletonText as SkeletonText -from reflex.components import Slide as Slide -from reflex.components import SlideFade as SlideFade -from reflex.components import Slider as Slider -from reflex.components import SliderFilledTrack as SliderFilledTrack -from reflex.components import SliderMark as SliderMark -from reflex.components import SliderThumb as SliderThumb -from reflex.components import SliderTrack as SliderTrack -from reflex.components import Spacer as Spacer -from reflex.components import Span as Span -from reflex.components import Spinner as Spinner -from reflex.components import Square as Square -from reflex.components import Stack as Stack -from reflex.components import Stat as Stat -from reflex.components import StatArrow as StatArrow -from reflex.components import StatGroup as StatGroup -from reflex.components import StatHelpText as StatHelpText -from reflex.components import StatLabel as StatLabel -from reflex.components import StatNumber as StatNumber -from reflex.components import Step as Step -from reflex.components import StepDescription as StepDescription -from reflex.components import StepIcon as StepIcon -from reflex.components import StepIndicator as StepIndicator -from reflex.components import StepNumber as StepNumber -from reflex.components import StepSeparator as StepSeparator -from reflex.components import StepStatus as StepStatus -from reflex.components import StepTitle as StepTitle -from reflex.components import Stepper as Stepper -from reflex.components import Switch as Switch -from reflex.components import Tab as Tab -from reflex.components import TabList as TabList -from reflex.components import TabPanel as TabPanel -from reflex.components import TabPanels as TabPanels -from reflex.components import Table as Table -from reflex.components import TableCaption as TableCaption -from reflex.components import TableContainer as TableContainer -from reflex.components import Tabs as Tabs -from reflex.components import Tag as Tag -from reflex.components import TagCloseButton as TagCloseButton -from reflex.components import TagLabel as TagLabel -from reflex.components import TagLeftIcon as TagLeftIcon -from reflex.components import TagRightIcon as TagRightIcon -from reflex.components import Tbody as Tbody -from reflex.components import Td as Td -from reflex.components import Text as Text -from reflex.components import TextArea as TextArea -from reflex.components import Tfoot as Tfoot -from reflex.components import Th as Th -from reflex.components import Thead as Thead -from reflex.components import TimePicker as TimePicker -from reflex.components import Tooltip as Tooltip -from reflex.components import Tr as Tr -from reflex.components import UnorderedList as UnorderedList -from reflex.components import Upload as Upload -from reflex.components import Video as Video -from reflex.components import VisuallyHidden as VisuallyHidden -from reflex.components import Vstack as Vstack -from reflex.components import Wrap as Wrap -from reflex.components import WrapItem as WrapItem -from reflex.components import accordion as accordion -from reflex.components import accordion_button as accordion_button -from reflex.components import accordion_icon as accordion_icon -from reflex.components import accordion_item as accordion_item -from reflex.components import accordion_panel as accordion_panel -from reflex.components import alert as alert -from reflex.components import alert_description as alert_description -from reflex.components import alert_dialog as alert_dialog -from reflex.components import alert_dialog_body as alert_dialog_body -from reflex.components import alert_dialog_content as alert_dialog_content -from reflex.components import alert_dialog_footer as alert_dialog_footer -from reflex.components import alert_dialog_header as alert_dialog_header -from reflex.components import alert_dialog_overlay as alert_dialog_overlay -from reflex.components import alert_icon as alert_icon -from reflex.components import alert_title as alert_title -from reflex.components import aspect_ratio as aspect_ratio -from reflex.components import audio as audio -from reflex.components import avatar as avatar -from reflex.components import avatar_badge as avatar_badge -from reflex.components import avatar_group as avatar_group -from reflex.components import badge as badge -from reflex.components import box as box -from reflex.components import breadcrumb as breadcrumb -from reflex.components import breadcrumb_item as breadcrumb_item -from reflex.components import breadcrumb_link as breadcrumb_link -from reflex.components import breadcrumb_separator as breadcrumb_separator -from reflex.components import button as button -from reflex.components import button_group as button_group -from reflex.components import card as card -from reflex.components import card_body as card_body -from reflex.components import card_footer as card_footer -from reflex.components import card_header as card_header -from reflex.components import center as center -from reflex.components import checkbox as checkbox -from reflex.components import checkbox_group as checkbox_group -from reflex.components import circular_progress as circular_progress -from reflex.components import circular_progress_label as circular_progress_label -from reflex.components import circle as circle -from reflex.components import code as code -from reflex.components import code_block as code_block -from reflex.components import collapse as collapse -from reflex.components import color_mode_button as color_mode_button -from reflex.components import color_mode_icon as color_mode_icon -from reflex.components import color_mode_switch as color_mode_switch -from reflex.components import component as component from reflex.components import cond as cond +from reflex.components import foreach as foreach +from reflex.components import html as html +from reflex.components import match as match from reflex.components import connection_banner as connection_banner from reflex.components import connection_modal as connection_modal -from reflex.components import container as container -from reflex.components import data_table as data_table -from reflex.components import data_editor as data_editor -from reflex.components import data_editor_theme as data_editor_theme -from reflex.components import date_picker as date_picker -from reflex.components import date_time_picker as date_time_picker from reflex.components import debounce_input as debounce_input -from reflex.components import divider as divider -from reflex.components import drawer as drawer -from reflex.components import drawer_body as drawer_body -from reflex.components import drawer_close_button as drawer_close_button -from reflex.components import drawer_content as drawer_content -from reflex.components import drawer_footer as drawer_footer -from reflex.components import drawer_header as drawer_header -from reflex.components import drawer_overlay as drawer_overlay -from reflex.components import editable as editable -from reflex.components import editable_input as editable_input -from reflex.components import editable_preview as editable_preview -from reflex.components import editable_textarea as editable_textarea -from reflex.components import editor as editor -from reflex.components import email as email -from reflex.components import fade as fade -from reflex.components import flex as flex -from reflex.components import foreach as foreach -from reflex.components import form as form -from reflex.components import form_control as form_control -from reflex.components import form_error_message as form_error_message -from reflex.components import form_helper_text as form_helper_text -from reflex.components import form_label as form_label from reflex.components import fragment as fragment -from reflex.components import grid as grid -from reflex.components import grid_item as grid_item -from reflex.components import heading as heading -from reflex.components import highlight as highlight -from reflex.components import hstack as hstack -from reflex.components import html as html -from reflex.components import icon as icon -from reflex.components import icon_button as icon_button from reflex.components import image as image -from reflex.components import input as input -from reflex.components import input_group as input_group -from reflex.components import input_left_addon as input_left_addon -from reflex.components import input_left_element as input_left_element -from reflex.components import input_right_addon as input_right_addon -from reflex.components import input_right_element as input_right_element +from reflex.components import script as script +from reflex.components import desktop_only as desktop_only +from reflex.components import mobile_and_tablet as mobile_and_tablet +from reflex.components import mobile_only as mobile_only +from reflex.components import tablet_and_desktop as tablet_and_desktop +from reflex.components import tablet_only as tablet_only +from reflex.components import cancel_upload as cancel_upload +from reflex.components import clear_selected_files as clear_selected_files +from reflex.components import selected_files as selected_files +from reflex.components import upload as upload +from reflex.components import accordion as accordion +from reflex.components import alert_dialog as alert_dialog +from reflex.components import aspect_ratio as aspect_ratio +from reflex.components import avatar as avatar +from reflex.components import badge as badge +from reflex.components import blockquote as blockquote +from reflex.components import box as box +from reflex.components import button as button +from reflex.components import callout as callout +from reflex.components import card as card +from reflex.components import center as center +from reflex.components import checkbox as checkbox +from reflex.components import code as code +from reflex.components import container as container +from reflex.components import context_menu as context_menu +from reflex.components import dialog as dialog +from reflex.components import drawer as drawer +from reflex.components import dropdown_menu as dropdown_menu +from reflex.components import flex as flex +from reflex.components import form as form +from reflex.components import grid as grid +from reflex.components import heading as heading +from reflex.components import hover_card as hover_card +from reflex.components import hstack as hstack +from reflex.components import icon_button as icon_button +from reflex.components import inset as inset from reflex.components import kbd as kbd from reflex.components import link as link -from reflex.components import link_box as link_box -from reflex.components import link_overlay as link_overlay -from reflex.components import list as list -from reflex.components import list_item as list_item -from reflex.components import markdown as markdown -from reflex.components import match as match -from reflex.components import menu as menu -from reflex.components import menu_button as menu_button -from reflex.components import menu_divider as menu_divider -from reflex.components import menu_group as menu_group -from reflex.components import menu_item as menu_item -from reflex.components import menu_item_option as menu_item_option -from reflex.components import menu_list as menu_list -from reflex.components import menu_option_group as menu_option_group -from reflex.components import modal as modal -from reflex.components import modal_body as modal_body -from reflex.components import modal_close_button as modal_close_button -from reflex.components import modal_content as modal_content -from reflex.components import modal_footer as modal_footer -from reflex.components import modal_header as modal_header -from reflex.components import modal_overlay as modal_overlay -from reflex.components import moment as moment -from reflex.components import multi_select as multi_select -from reflex.components import multi_select_option as multi_select_option -from reflex.components import next_link as next_link -from reflex.components import number_decrement_stepper as number_decrement_stepper -from reflex.components import number_increment_stepper as number_increment_stepper -from reflex.components import number_input as number_input -from reflex.components import number_input_field as number_input_field -from reflex.components import number_input_stepper as number_input_stepper -from reflex.components import option as option -from reflex.components import ordered_list as ordered_list -from reflex.components import password as password -from reflex.components import pin_input as pin_input -from reflex.components import pin_input_field as pin_input_field -from reflex.components import plotly as plotly from reflex.components import popover as popover -from reflex.components import popover_anchor as popover_anchor -from reflex.components import popover_arrow as popover_arrow -from reflex.components import popover_body as popover_body -from reflex.components import popover_close_button as popover_close_button -from reflex.components import popover_content as popover_content -from reflex.components import popover_footer as popover_footer -from reflex.components import popover_header as popover_header -from reflex.components import popover_trigger as popover_trigger from reflex.components import progress as progress -from reflex.components import radio as radio from reflex.components import radio_group as radio_group -from reflex.components import range_slider as range_slider -from reflex.components import range_slider_filled_track as range_slider_filled_track -from reflex.components import range_slider_thumb as range_slider_thumb -from reflex.components import range_slider_track as range_slider_track -from reflex.components import responsive_grid as responsive_grid -from reflex.components import scale_fade as scale_fade -from reflex.components import script as script +from reflex.components import scroll_area as scroll_area +from reflex.components import section as section from reflex.components import select as select -from reflex.components import skeleton as skeleton -from reflex.components import skeleton_circle as skeleton_circle -from reflex.components import skeleton_text as skeleton_text -from reflex.components import slide as slide -from reflex.components import slide_fade as slide_fade +from reflex.components import separator as separator from reflex.components import slider as slider -from reflex.components import slider_filled_track as slider_filled_track -from reflex.components import slider_mark as slider_mark -from reflex.components import slider_thumb as slider_thumb -from reflex.components import slider_track as slider_track from reflex.components import spacer as spacer -from reflex.components import span as span -from reflex.components import spinner as spinner -from reflex.components import square as square -from reflex.components import stack as stack -from reflex.components import stat as stat -from reflex.components import stat_arrow as stat_arrow -from reflex.components import stat_group as stat_group -from reflex.components import stat_help_text as stat_help_text -from reflex.components import stat_label as stat_label -from reflex.components import stat_number as stat_number -from reflex.components import step as step -from reflex.components import step_description as step_description -from reflex.components import step_icon as step_icon -from reflex.components import step_indicator as step_indicator -from reflex.components import step_number as step_number -from reflex.components import step_separator as step_separator -from reflex.components import step_status as step_status -from reflex.components import step_title as step_title -from reflex.components import stepper as stepper from reflex.components import switch as switch -from reflex.components import tab as tab -from reflex.components import tab_list as tab_list -from reflex.components import tab_panel as tab_panel -from reflex.components import tab_panels as tab_panels from reflex.components import table as table -from reflex.components import table_caption as table_caption -from reflex.components import table_container as table_container from reflex.components import tabs as tabs -from reflex.components import tag as tag -from reflex.components import tag_close_button as tag_close_button -from reflex.components import tag_label as tag_label -from reflex.components import tag_left_icon as tag_left_icon -from reflex.components import tag_right_icon as tag_right_icon -from reflex.components import tbody as tbody -from reflex.components import td as td from reflex.components import text as text from reflex.components import text_area as text_area -from reflex.components import tfoot as tfoot -from reflex.components import th as th -from reflex.components import thead as thead -from reflex.components import time_picker as time_picker +from reflex.components import theme as theme +from reflex.components import theme_panel as theme_panel from reflex.components import tooltip as tooltip -from reflex.components import tr as tr -from reflex.components import unordered_list as unordered_list -from reflex.components import upload as upload -from reflex.components import video as video -from reflex.components import visually_hidden as visually_hidden from reflex.components import vstack as vstack -from reflex.components import wrap as wrap -from reflex.components import wrap_item as wrap_item -from reflex.components import cancel_upload as cancel_upload -from reflex import components as components -from reflex.components import color_mode_cond as color_mode_cond -from reflex.components import desktop_only as desktop_only -from reflex.components import mobile_only as mobile_only -from reflex.components import tablet_only as tablet_only -from reflex.components import mobile_and_tablet as mobile_and_tablet -from reflex.components import tablet_and_desktop as tablet_and_desktop -from reflex.components import selected_files as selected_files -from reflex.components import clear_selected_files as clear_selected_files +from reflex.components import data_editor as data_editor +from reflex.components import data_editor_theme as data_editor_theme +from reflex.components import plotly as plotly +from reflex.components import audio as audio +from reflex.components import video as video +from reflex.components import editor as editor from reflex.components import EditorButtonList as EditorButtonList from reflex.components import EditorOptions as EditorOptions -from reflex.components import NoSSRComponent as NoSSRComponent -from reflex.components import chakra as chakra -from reflex.components import next as next +from reflex.components import icon as icon +from reflex.components.component import Component as Component +from reflex.components.component import NoSSRComponent as NoSSRComponent from reflex.components.component import memo as memo +from reflex.components import chakra as chakra from reflex.components import el as el -from reflex.components import lucide as lucide from reflex.components import radix as radix from reflex.components import recharts as recharts from reflex.components.moment.moment import MomentDelta as MomentDelta diff --git a/reflex/components/__init__.py b/reflex/components/__init__.py index 8dbf5c406..872a267d3 100644 --- a/reflex/components/__init__.py +++ b/reflex/components/__init__.py @@ -2,15 +2,16 @@ from __future__ import annotations from .base import Fragment, Script, fragment, script -from .chakra import * from .component import Component from .component import NoSSRComponent as NoSSRComponent from .core import * from .datadisplay import * from .gridjs import * +from .lucide import icon from .markdown import * from .moment import * -from .next import NextLink, next_link +from .next import NextLink, image, next_link from .plotly import * +from .radix import * from .react_player import * from .suneditor import * diff --git a/reflex/components/chakra/__init__.py b/reflex/components/chakra/__init__.py index 697126854..f1b2e7440 100644 --- a/reflex/components/chakra/__init__.py +++ b/reflex/components/chakra/__init__.py @@ -83,7 +83,6 @@ grid_item = GridItem.create heading = Heading.create highlight = Highlight.create hstack = Hstack.create -html = Html.create icon = Icon.create icon_button = IconButton.create image = Image.create diff --git a/reflex/components/chakra/layout/__init__.py b/reflex/components/chakra/layout/__init__.py index 1f49d98ea..13c28fdd4 100644 --- a/reflex/components/chakra/layout/__init__.py +++ b/reflex/components/chakra/layout/__init__.py @@ -7,7 +7,6 @@ from .center import Center, Circle, Square from .container import Container from .flex import Flex from .grid import Grid, GridItem, ResponsiveGrid -from .html import Html from .spacer import Spacer from .stack import Hstack, Stack, Vstack from .wrap import Wrap, WrapItem diff --git a/reflex/components/core/__init__.py b/reflex/components/core/__init__.py index 4df12bef4..122eeacfe 100644 --- a/reflex/components/core/__init__.py +++ b/reflex/components/core/__init__.py @@ -5,6 +5,7 @@ from .banner import ConnectionBanner, ConnectionModal from .cond import Cond, cond from .debounce import DebounceInput from .foreach import Foreach +from .html import Html from .match import Match from .responsive import ( desktop_only, @@ -19,5 +20,6 @@ connection_banner = ConnectionBanner.create connection_modal = ConnectionModal.create debounce_input = DebounceInput.create foreach = Foreach.create +html = Html.create match = Match.create upload = Upload.create diff --git a/reflex/components/chakra/layout/html.py b/reflex/components/core/html.py similarity index 92% rename from reflex/components/chakra/layout/html.py rename to reflex/components/core/html.py index 1069bc7e5..987d216a3 100644 --- a/reflex/components/chakra/layout/html.py +++ b/reflex/components/core/html.py @@ -1,11 +1,11 @@ """A html component.""" from typing import Dict -from reflex.components.chakra.layout.box import Box +from reflex.components.el.elements.typography import Div from reflex.vars import Var -class Html(Box): +class Html(Div): """Render the html. Returns: diff --git a/reflex/components/chakra/layout/html.pyi b/reflex/components/core/html.pyi similarity index 50% rename from reflex/components/chakra/layout/html.pyi rename to reflex/components/core/html.pyi index ba5016307..48d6e37ed 100644 --- a/reflex/components/chakra/layout/html.pyi +++ b/reflex/components/core/html.pyi @@ -1,4 +1,4 @@ -"""Stub file for reflex/components/chakra/layout/html.py""" +"""Stub file for reflex/components/core/html.py""" # ------------------- DO NOT EDIT ---------------------- # This file was generated by `scripts/pyi_generator.py`! # ------------------------------------------------------ @@ -8,10 +8,10 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Dict -from reflex.components.chakra.layout.box import Box +from reflex.components.el.elements.typography import Div from reflex.vars import Var -class Html(Box): +class Html(Div): @overload @classmethod def create( # type: ignore @@ -20,9 +20,49 @@ class Html(Box): dangerouslySetInnerHTML: Optional[ Union[Var[Dict[str, str]], Dict[str, str]] ] = None, - element: Optional[Union[Var[str], str]] = None, - src: Optional[Union[Var[str], str]] = None, - alt: Optional[Union[Var[str], str]] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + translate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -82,9 +122,23 @@ class Html(Box): Args: *children: The children of the component. dangerouslySetInnerHTML: The HTML to render. - element: The type element to render. You can specify an image, video, or any other HTML element such as iframe. - src: The source of the content. - alt: The alt text of the content. + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/tests/components/forms/test_debounce.py b/tests/components/forms/test_debounce.py index 97cfa8648..b4fca6566 100644 --- a/tests/components/forms/test_debounce.py +++ b/tests/components/forms/test_debounce.py @@ -43,7 +43,7 @@ class S(BaseState): def test_render_child_props(): """DebounceInput should render props from child component.""" tag = rx.debounce_input( - rx.input( + rx.chakra.input( foo="bar", baz="quuc", value="real", @@ -71,7 +71,7 @@ def test_render_child_props_recursive(): rx.debounce_input( rx.debounce_input( rx.debounce_input( - rx.input( + rx.chakra.input( foo="bar", baz="quuc", value="real", @@ -103,7 +103,7 @@ def test_render_child_props_recursive(): def test_full_control_implicit_debounce(): """DebounceInput is used when value and on_change are used together.""" - tag = rx.input( + tag = rx.chakra.input( value=S.value, on_change=S.on_change, )._render() diff --git a/tests/components/forms/test_uploads.py b/tests/components/forms/test_uploads.py index c3ca14cfb..5bf212219 100644 --- a/tests/components/forms/test_uploads.py +++ b/tests/components/forms/test_uploads.py @@ -72,10 +72,10 @@ def test_upload_component_render(upload_component): assert input["name"] == "Input" assert input["props"] == ["type={`file`}", "{...getInputProps()}"] - assert button["name"] == "Button" + assert button["name"] == "RadixThemesButton" assert button["children"][0]["contents"] == "{`select file`}" - assert text["name"] == "Text" + assert text["name"] == "RadixThemesText" assert ( text["children"][0]["contents"] == "{`Drag and drop files here or click to select files`}" diff --git a/tests/components/layout/test_match.py b/tests/components/layout/test_match.py index 233e9c643..4a1783024 100644 --- a/tests/components/layout/test_match.py +++ b/tests/components/layout/test_match.py @@ -43,7 +43,7 @@ def test_match_components(): assert match_cases[0][0]._var_name == "1" assert match_cases[0][0]._var_type == int first_return_value_render = match_cases[0][1].render() - assert first_return_value_render["name"] == "Text" + assert first_return_value_render["name"] == "RadixThemesText" assert first_return_value_render["children"][0]["contents"] == "{`first value`}" assert match_cases[1][0]._var_name == "2" @@ -51,36 +51,36 @@ def test_match_components(): assert match_cases[1][1]._var_name == "3" assert match_cases[1][1]._var_type == int second_return_value_render = match_cases[1][2].render() - assert second_return_value_render["name"] == "Text" + assert second_return_value_render["name"] == "RadixThemesText" assert second_return_value_render["children"][0]["contents"] == "{`second value`}" assert match_cases[2][0]._var_name == "[1, 2]" assert match_cases[2][0]._var_type == list third_return_value_render = match_cases[2][1].render() - assert third_return_value_render["name"] == "Text" + assert third_return_value_render["name"] == "RadixThemesText" assert third_return_value_render["children"][0]["contents"] == "{`third value`}" assert match_cases[3][0]._var_name == "random" assert match_cases[3][0]._var_type == str fourth_return_value_render = match_cases[3][1].render() - assert fourth_return_value_render["name"] == "Text" + assert fourth_return_value_render["name"] == "RadixThemesText" assert fourth_return_value_render["children"][0]["contents"] == "{`fourth value`}" assert match_cases[4][0]._var_name == '{"foo": "bar"}' assert match_cases[4][0]._var_type == dict fifth_return_value_render = match_cases[4][1].render() - assert fifth_return_value_render["name"] == "Text" + assert fifth_return_value_render["name"] == "RadixThemesText" assert fifth_return_value_render["children"][0]["contents"] == "{`fifth value`}" assert match_cases[5][0]._var_name == "(match_state.num + 1)" assert match_cases[5][0]._var_type == int fifth_return_value_render = match_cases[5][1].render() - assert fifth_return_value_render["name"] == "Text" + assert fifth_return_value_render["name"] == "RadixThemesText" assert fifth_return_value_render["children"][0]["contents"] == "{`sixth value`}" default = match_child["default"].render() - assert default["name"] == "Text" + assert default["name"] == "RadixThemesText" assert default["children"][0]["contents"] == "{`default value`}" @@ -143,6 +143,8 @@ def test_match_on_component_without_default(): """Test that matching cases with return values as components returns a Fragment as the default case if not provided. """ + from reflex.components.base.fragment import Fragment + match_case_tuples = ( (1, rx.text("first value")), (2, 3, rx.text("second value")), @@ -151,7 +153,7 @@ def test_match_on_component_without_default(): match_comp = Match.create(MatchState.value, *match_case_tuples) default = match_comp.render()["children"][0]["default"] # type: ignore - assert isinstance(default, rx.Fragment) + assert isinstance(default, Fragment) def test_match_on_var_no_default(): @@ -258,8 +260,8 @@ def test_match_case_tuple_elements(match_case): ([1, 2], rx.text("third value")), rx.text("default value"), ), - "Match cases should have the same return types. Case 3 with return value ` {`first value`} ` " - "of type is not ", + "Match cases should have the same return types. Case 3 with return value ` {`first value`} ` " + "of type is not ", ), ], ) diff --git a/tests/components/test_component.py b/tests/components/test_component.py index fb9479979..50243e51b 100644 --- a/tests/components/test_component.py +++ b/tests/components/test_component.py @@ -488,12 +488,14 @@ def test_custom_component_wrapper(): color=color, ) + from reflex.components.radix.themes.typography.text import Text + ccomponent = my_component( rx.text("child"), width=Var.create(1), color=Var.create("red") ) assert isinstance(ccomponent, CustomComponent) assert len(ccomponent.children) == 1 - assert isinstance(ccomponent.children[0], rx.Text) + assert isinstance(ccomponent.children[0], Text) component = ccomponent.get_component(ccomponent) assert isinstance(component, Box) @@ -595,7 +597,7 @@ def test_unsupported_parent_components(component5): component5: component with valid parent of "Text" only """ with pytest.raises(ValueError) as err: - rx.Box(children=[component5.create()]) + rx.box(component5.create()) assert ( err.value.args[0] == f"The component `{component5.__name__}` can only be a child of the components: `{component5._valid_parents[0]}`. Got `Box` instead." @@ -625,10 +627,10 @@ def test_component_with_only_valid_children(fixture, request): @pytest.mark.parametrize( "component,rendered", [ - (rx.text("hi"), "\n {`hi`}\n"), + (rx.text("hi"), "\n {`hi`}\n"), ( - rx.box(rx.heading("test", size="md")), - "\n \n {`test`}\n\n", + rx.box(rx.chakra.heading("test", size="md")), + "\n \n {`test`}\n\n", ), ], ) diff --git a/tests/components/typography/test_markdown.py b/tests/components/typography/test_markdown.py index 69c8e4a0c..3ce9a830c 100644 --- a/tests/components/typography/test_markdown.py +++ b/tests/components/typography/test_markdown.py @@ -37,7 +37,7 @@ def test_set_component_map(): """Test setting the component map.""" component_map = { "h1": lambda value: rx.box( - rx.heading(value, as_="h1", size="2xl"), padding="1em" + rx.chakra.heading(value, as_="h1", size="2xl"), padding="1em" ), "p": lambda value: rx.box(rx.text(value), padding="1em"), } diff --git a/tests/test_app.py b/tests/test_app.py index b9a018434..f6581e626 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -15,7 +15,7 @@ from starlette_admin.auth import AuthProvider from starlette_admin.contrib.sqla.admin import Admin from starlette_admin.contrib.sqla.view import ModelView -import reflex.components.radix.themes as rdxt +import reflex as rx from reflex import AdminDash, constants from reflex.app import ( App, @@ -24,7 +24,8 @@ from reflex.app import ( process, upload, ) -from reflex.components import Box, Component, Cond, Fragment, Text +from reflex.components import Component, Cond, Fragment +from reflex.components.radix.themes.typography.text import Text from reflex.event import Event from reflex.middleware import HydrateMiddleware from reflex.model import Model @@ -58,7 +59,7 @@ def index_page(): """ def index(): - return Box.create("Index") + return rx.box("Index") return index @@ -72,7 +73,7 @@ def about_page(): """ def about(): - return Box.create("About") + return rx.box("About") return about @@ -1172,7 +1173,7 @@ def test_overlay_component( exp_page_child, ) - app.add_page(Box.create("Index"), route="/test") + app.add_page(rx.box("Index"), route="/test") page = app.pages["test"] if exp_page_child is not None: assert len(page.children) == 3 @@ -1212,7 +1213,7 @@ def test_app_wrap_compile_theme(compilable_app): compilable_app: compilable_app fixture. """ app, web_dir = compilable_app - app.theme = rdxt.theme(accent_color="plum") + app.theme = rx.theme(accent_color="plum") app.compile_() app_js_contents = (web_dir / "pages" / "_app.js").read_text() app_js_lines = [ @@ -1245,13 +1246,13 @@ def test_app_wrap_priority(compilable_app): tag = "Fragment1" def _get_app_wrap_components(self) -> dict[tuple[int, str], Component]: - return {(99, "Box"): Box.create()} + return {(99, "Box"): rx.chakra.box()} class Fragment2(Component): tag = "Fragment2" def _get_app_wrap_components(self) -> dict[tuple[int, str], Component]: - return {(50, "Text"): Text.create()} + return {(50, "Text"): rx.chakra.text()} class Fragment3(Component): tag = "Fragment3" From f99c48806ac09e8cd13102332c64d11e82e804bd Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 5 Feb 2024 11:14:02 -0800 Subject: [PATCH 08/68] Top-level namespace tweaks (#2523) * pyi_generator: always ignore files starting with `tests` * Move CodeBlock out of chakra namespace * Expose additional names in the top-level namespace * code pyi fixup * expose input and quote at the top-level * add text_field to top-level namespace (maybe) * fixup chakra code.pyi * Remove `text_field` from top level namespace * Remove top-level big C Cond * fixup top level pyi --- reflex/__init__.py | 9 +- reflex/__init__.pyi | 7 + reflex/components/__init__.py | 4 +- reflex/components/chakra/__init__.py | 1 - .../components/chakra/datadisplay/__init__.py | 4 +- reflex/components/chakra/datadisplay/code.py | 511 -------- reflex/components/chakra/datadisplay/code.pyi | 1104 ---------------- reflex/components/datadisplay/__init__.py | 4 + reflex/components/datadisplay/code.py | 512 ++++++++ reflex/components/datadisplay/code.pyi | 1113 +++++++++++++++++ reflex/components/markdown/markdown.py | 6 +- .../radix/themes/components/__init__.py | 3 + .../radix/themes/layout/__init__.py | 4 +- scripts/pyi_generator.py | 6 +- tests/components/datadisplay/test_code.py | 2 +- 15 files changed, 1663 insertions(+), 1627 deletions(-) create mode 100644 reflex/components/datadisplay/code.py create mode 100644 reflex/components/datadisplay/code.pyi diff --git a/reflex/__init__.py b/reflex/__init__.py index d9f638c34..554057357 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -26,6 +26,7 @@ _ALL_COMPONENTS = [ "debounce_input", # Base "fragment", + "Fragment", "image", "script", # Responsive @@ -68,11 +69,12 @@ _ALL_COMPONENTS = [ # "icon" (lucide) "icon_button", "inset", + "input", "kbd", "link", "popover", "progress", - # "quote", + "quote", "radio_group", "scroll_area", "section", @@ -82,19 +84,21 @@ _ALL_COMPONENTS = [ "slider", "spacer", # "strong" (bold?) + "stack", "switch", "table", "tabs", "text", "text_area", - # "text_field" (input) "theme", "theme_panel", "tooltip", "vstack", # Other + "code_block", "data_editor", "data_editor_theme", + "data_table", "plotly", "audio", "video", @@ -102,6 +106,7 @@ _ALL_COMPONENTS = [ "EditorButtonList", "EditorOptions", "icon", + "markdown", ] _MAPPING = { diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index d69fe5012..1794abbc6 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -15,6 +15,7 @@ from reflex.components import connection_banner as connection_banner from reflex.components import connection_modal as connection_modal from reflex.components import debounce_input as debounce_input from reflex.components import fragment as fragment +from reflex.components import Fragment as Fragment from reflex.components import image as image from reflex.components import script as script from reflex.components import desktop_only as desktop_only @@ -52,10 +53,12 @@ from reflex.components import hover_card as hover_card from reflex.components import hstack as hstack from reflex.components import icon_button as icon_button from reflex.components import inset as inset +from reflex.components import input as input from reflex.components import kbd as kbd from reflex.components import link as link from reflex.components import popover as popover from reflex.components import progress as progress +from reflex.components import quote as quote from reflex.components import radio_group as radio_group from reflex.components import scroll_area as scroll_area from reflex.components import section as section @@ -63,6 +66,7 @@ from reflex.components import select as select from reflex.components import separator as separator from reflex.components import slider as slider from reflex.components import spacer as spacer +from reflex.components import stack as stack from reflex.components import switch as switch from reflex.components import table as table from reflex.components import tabs as tabs @@ -72,8 +76,10 @@ from reflex.components import theme as theme from reflex.components import theme_panel as theme_panel from reflex.components import tooltip as tooltip from reflex.components import vstack as vstack +from reflex.components import code_block as code_block from reflex.components import data_editor as data_editor from reflex.components import data_editor_theme as data_editor_theme +from reflex.components import data_table as data_table from reflex.components import plotly as plotly from reflex.components import audio as audio from reflex.components import video as video @@ -81,6 +87,7 @@ from reflex.components import editor as editor from reflex.components import EditorButtonList as EditorButtonList from reflex.components import EditorOptions as EditorOptions from reflex.components import icon as icon +from reflex.components import markdown as markdown from reflex.components.component import Component as Component from reflex.components.component import NoSSRComponent as NoSSRComponent from reflex.components.component import memo as memo diff --git a/reflex/components/__init__.py b/reflex/components/__init__.py index 872a267d3..ca6c8b0cd 100644 --- a/reflex/components/__init__.py +++ b/reflex/components/__init__.py @@ -1,13 +1,13 @@ """Import all the components.""" from __future__ import annotations +from . import lucide from .base import Fragment, Script, fragment, script from .component import Component from .component import NoSSRComponent as NoSSRComponent from .core import * from .datadisplay import * from .gridjs import * -from .lucide import icon from .markdown import * from .moment import * from .next import NextLink, image, next_link @@ -15,3 +15,5 @@ from .plotly import * from .radix import * from .react_player import * from .suneditor import * + +icon = lucide.icon diff --git a/reflex/components/chakra/__init__.py b/reflex/components/chakra/__init__.py index f1b2e7440..ea0976f8c 100644 --- a/reflex/components/chakra/__init__.py +++ b/reflex/components/chakra/__init__.py @@ -49,7 +49,6 @@ circle = Circle.create circular_progress = CircularProgress.create circular_progress_label = CircularProgressLabel.create code = Code.create -code_block = CodeBlock.create collapse = Collapse.create color_mode_button = ColorModeButton.create color_mode_icon = ColorModeIcon.create diff --git a/reflex/components/chakra/datadisplay/__init__.py b/reflex/components/chakra/datadisplay/__init__.py index 64d0d370d..b20d17248 100644 --- a/reflex/components/chakra/datadisplay/__init__.py +++ b/reflex/components/chakra/datadisplay/__init__.py @@ -1,9 +1,7 @@ """Data display components.""" from .badge import Badge -from .code import Code, CodeBlock -from .code import LiteralCodeBlockTheme as LiteralCodeBlockTheme -from .code import LiteralCodeLanguage as LiteralCodeLanguage +from .code import Code from .divider import Divider from .keyboard_key import KeyboardKey as Kbd from .list import List, ListItem, OrderedList, UnorderedList diff --git a/reflex/components/chakra/datadisplay/code.py b/reflex/components/chakra/datadisplay/code.py index 9bec7271f..fe1016b7a 100644 --- a/reflex/components/chakra/datadisplay/code.py +++ b/reflex/components/chakra/datadisplay/code.py @@ -1,518 +1,7 @@ """A code component.""" -import re -from typing import Dict, Literal, Optional, Union - from reflex.components.chakra import ( ChakraComponent, ) -from reflex.components.chakra.forms import Button, color_mode_cond -from reflex.components.chakra.layout import Box -from reflex.components.chakra.media import Icon -from reflex.components.component import Component -from reflex.event import set_clipboard -from reflex.style import Style -from reflex.utils import format, imports -from reflex.utils.imports import ImportVar -from reflex.vars import Var - -LiteralCodeBlockTheme = Literal[ - "a11y-dark", - "atom-dark", - "cb", - "coldark-cold", - "coldark-dark", - "coy", - "coy-without-shadows", - "darcula", - "dark", - "dracula", - "duotone-dark", - "duotone-earth", - "duotone-forest", - "duotone-light", - "duotone-sea", - "duotone-space", - "funky", - "ghcolors", - "gruvbox-dark", - "gruvbox-light", - "holi-theme", - "hopscotch", - "light", # not present in react-syntax-highlighter styles - "lucario", - "material-dark", - "material-light", - "material-oceanic", - "night-owl", - "nord", - "okaidia", - "one-dark", - "one-light", - "pojoaque", - "prism", - "shades-of-purple", - "solarized-dark-atom", - "solarizedlight", - "synthwave84", - "tomorrow", - "twilight", - "vs", - "vs-dark", - "vsc-dark-plus", - "xonokai", - "z-touch", -] - - -LiteralCodeLanguage = Literal[ - "abap", - "abnf", - "actionscript", - "ada", - "agda", - "al", - "antlr4", - "apacheconf", - "apex", - "apl", - "applescript", - "aql", - "arduino", - "arff", - "asciidoc", - "asm6502", - "asmatmel", - "aspnet", - "autohotkey", - "autoit", - "avisynth", - "avro-idl", - "bash", - "basic", - "batch", - "bbcode", - "bicep", - "birb", - "bison", - "bnf", - "brainfuck", - "brightscript", - "bro", - "bsl", - "c", - "cfscript", - "chaiscript", - "cil", - "clike", - "clojure", - "cmake", - "cobol", - "coffeescript", - "concurnas", - "coq", - "core", - "cpp", - "crystal", - "csharp", - "cshtml", - "csp", - "css", - "css-extras", - "csv", - "cypher", - "d", - "dart", - "dataweave", - "dax", - "dhall", - "diff", - "django", - "dns-zone-file", - "docker", - "dot", - "ebnf", - "editorconfig", - "eiffel", - "ejs", - "elixir", - "elm", - "erb", - "erlang", - "etlua", - "excel-formula", - "factor", - "false", - "firestore-security-rules", - "flow", - "fortran", - "fsharp", - "ftl", - "gap", - "gcode", - "gdscript", - "gedcom", - "gherkin", - "git", - "glsl", - "gml", - "gn", - "go", - "go-module", - "graphql", - "groovy", - "haml", - "handlebars", - "haskell", - "haxe", - "hcl", - "hlsl", - "hoon", - "hpkp", - "hsts", - "http", - "ichigojam", - "icon", - "icu-message-format", - "idris", - "iecst", - "ignore", - "index", - "inform7", - "ini", - "io", - "j", - "java", - "javadoc", - "javadoclike", - "javascript", - "javastacktrace", - "jexl", - "jolie", - "jq", - "js-extras", - "js-templates", - "jsdoc", - "json", - "json5", - "jsonp", - "jsstacktrace", - "jsx", - "julia", - "keepalived", - "keyman", - "kotlin", - "kumir", - "kusto", - "latex", - "latte", - "less", - "lilypond", - "liquid", - "lisp", - "livescript", - "llvm", - "log", - "lolcode", - "lua", - "magma", - "makefile", - "markdown", - "markup", - "markup-templating", - "matlab", - "maxscript", - "mel", - "mermaid", - "mizar", - "mongodb", - "monkey", - "moonscript", - "n1ql", - "n4js", - "nand2tetris-hdl", - "naniscript", - "nasm", - "neon", - "nevod", - "nginx", - "nim", - "nix", - "nsis", - "objectivec", - "ocaml", - "opencl", - "openqasm", - "oz", - "parigp", - "parser", - "pascal", - "pascaligo", - "pcaxis", - "peoplecode", - "perl", - "php", - "php-extras", - "phpdoc", - "plsql", - "powerquery", - "powershell", - "processing", - "prolog", - "promql", - "properties", - "protobuf", - "psl", - "pug", - "puppet", - "pure", - "purebasic", - "purescript", - "python", - "q", - "qml", - "qore", - "qsharp", - "r", - "racket", - "reason", - "regex", - "rego", - "renpy", - "rest", - "rip", - "roboconf", - "robotframework", - "ruby", - "rust", - "sas", - "sass", - "scala", - "scheme", - "scss", - "shell-session", - "smali", - "smalltalk", - "smarty", - "sml", - "solidity", - "solution-file", - "soy", - "sparql", - "splunk-spl", - "sqf", - "sql", - "squirrel", - "stan", - "stylus", - "swift", - "systemd", - "t4-cs", - "t4-templating", - "t4-vb", - "tap", - "tcl", - "textile", - "toml", - "tremor", - "tsx", - "tt2", - "turtle", - "twig", - "typescript", - "typoscript", - "unrealscript", - "uorazor", - "uri", - "v", - "vala", - "vbnet", - "velocity", - "verilog", - "vhdl", - "vim", - "visual-basic", - "warpscript", - "wasm", - "web-idl", - "wiki", - "wolfram", - "wren", - "xeora", - "xml-doc", - "xojo", - "xquery", - "yaml", - "yang", - "zig", -] - - -class CodeBlock(Component): - """A code block.""" - - library = "react-syntax-highlighter@15.5.0" - - tag = "PrismAsyncLight" - - alias = "SyntaxHighlighter" - - # The theme to use ("light" or "dark"). - theme: Var[LiteralCodeBlockTheme] = "one-light" # type: ignore - - # The language to use. - language: Var[LiteralCodeLanguage] = "python" # type: ignore - - # The code to display. - code: Var[str] - - # If this is enabled line numbers will be shown next to the code block. - show_line_numbers: Var[bool] - - # The starting line number to use. - starting_line_number: Var[int] - - # Whether to wrap long lines. - wrap_long_lines: Var[bool] - - # A custom style for the code block. - custom_style: Dict[str, str] = {} - - # Props passed down to the code tag. - code_tag_props: Var[Dict[str, str]] - - def _get_imports(self) -> imports.ImportDict: - merged_imports = super()._get_imports() - # Get all themes from a cond literal - themes = re.findall(r"`(.*?)`", self.theme._var_name) - if not themes: - themes = [self.theme._var_name] - merged_imports = imports.merge_imports( - merged_imports, - { - f"react-syntax-highlighter/dist/cjs/styles/prism/{theme}": { - ImportVar( - tag=format.to_camel_case(theme), - is_default=True, - install=False, - ) - } - for theme in themes - }, - ) - if ( - self.language is not None - and self.language._var_name in LiteralCodeLanguage.__args__ # type: ignore - ): - merged_imports = imports.merge_imports( - merged_imports, - { - f"react-syntax-highlighter/dist/cjs/languages/prism/{self.language._var_name}": { - ImportVar( - tag=format.to_camel_case(self.language._var_name), - is_default=True, - install=False, - ) - } - }, - ) - return merged_imports - - def _get_custom_code(self) -> Optional[str]: - if ( - self.language is not None - and self.language._var_name in LiteralCodeLanguage.__args__ # type: ignore - ): - return f"{self.alias}.registerLanguage('{self.language._var_name}', {format.to_camel_case(self.language._var_name)})" - - @classmethod - def create( - cls, - *children, - can_copy: Optional[bool] = False, - copy_button: Optional[Union[bool, Component]] = None, - **props, - ): - """Create a text component. - - Args: - *children: The children of the component. - can_copy: Whether a copy button should appears. - copy_button: A custom copy button to override the default one. - **props: The props to pass to the component. - - Returns: - The text component. - """ - # This component handles style in a special prop. - custom_style = props.pop("custom_style", {}) - - if "theme" not in props: - # Default color scheme responds to global color mode. - props["theme"] = color_mode_cond(light="one-light", dark="one-dark") - - # react-syntax-highlighter doesnt have an explicit "light" or "dark" theme so we use one-light and one-dark - # themes respectively to ensure code compatibility. - if "theme" in props and not isinstance(props["theme"], Var): - props["theme"] = ( - "one-light" - if props["theme"] == "light" - else "one-dark" - if props["theme"] == "dark" - else props["theme"] - ) - - if can_copy: - code = children[0] - copy_button = ( # type: ignore - copy_button - if copy_button is not None - else Button.create( - Icon.create(tag="copy"), - on_click=set_clipboard(code), - style=Style({"position": "absolute", "top": "0.5em", "right": "0"}), - ) - ) - custom_style.update({"padding": "1em 3.2em 1em 1em"}) - else: - copy_button = None - - # Transfer style props to the custom style prop. - for key, value in props.items(): - if key not in cls.get_fields(): - custom_style[key] = value - - # Carry the children (code) via props - if children: - props["code"] = children[0] - if not isinstance(props["code"], Var): - props["code"] = Var.create(props["code"], _var_is_string=True) - - # Create the component. - code_block = super().create( - **props, - custom_style=Style(custom_style), - ) - - if copy_button: - return Box.create(code_block, copy_button, position="relative") - else: - return code_block - - def _add_style(self, style): - self.custom_style.update(style) # type: ignore - - def _render(self): - out = super()._render() - predicate, qmark, value = self.theme._var_name.partition("?") - out.add_props( - style=Var.create( - format.to_camel_case(f"{predicate}{qmark}{value.replace('`', '')}"), - _var_is_local=False, - ) - ).remove_props("theme", "code") - if self.code is not None: - out.special_props.add(Var.create_safe(f"children={str(self.code)}")) - return out class Code(ChakraComponent): diff --git a/reflex/components/chakra/datadisplay/code.pyi b/reflex/components/chakra/datadisplay/code.pyi index 0c13fe0e9..6252eafc6 100644 --- a/reflex/components/chakra/datadisplay/code.pyi +++ b/reflex/components/chakra/datadisplay/code.pyi @@ -7,1111 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -import re -from typing import Dict, Literal, Optional, Union from reflex.components.chakra import ChakraComponent -from reflex.components.chakra.forms import Button, color_mode_cond -from reflex.components.chakra.layout import Box -from reflex.components.chakra.media import Icon -from reflex.components.component import Component -from reflex.event import set_clipboard -from reflex.style import Style -from reflex.utils import format, imports -from reflex.utils.imports import ImportVar -from reflex.vars import Var - -LiteralCodeBlockTheme = Literal[ - "a11y-dark", - "atom-dark", - "cb", - "coldark-cold", - "coldark-dark", - "coy", - "coy-without-shadows", - "darcula", - "dark", - "dracula", - "duotone-dark", - "duotone-earth", - "duotone-forest", - "duotone-light", - "duotone-sea", - "duotone-space", - "funky", - "ghcolors", - "gruvbox-dark", - "gruvbox-light", - "holi-theme", - "hopscotch", - "light", - "lucario", - "material-dark", - "material-light", - "material-oceanic", - "night-owl", - "nord", - "okaidia", - "one-dark", - "one-light", - "pojoaque", - "prism", - "shades-of-purple", - "solarized-dark-atom", - "solarizedlight", - "synthwave84", - "tomorrow", - "twilight", - "vs", - "vs-dark", - "vsc-dark-plus", - "xonokai", - "z-touch", -] -LiteralCodeLanguage = Literal[ - "abap", - "abnf", - "actionscript", - "ada", - "agda", - "al", - "antlr4", - "apacheconf", - "apex", - "apl", - "applescript", - "aql", - "arduino", - "arff", - "asciidoc", - "asm6502", - "asmatmel", - "aspnet", - "autohotkey", - "autoit", - "avisynth", - "avro-idl", - "bash", - "basic", - "batch", - "bbcode", - "bicep", - "birb", - "bison", - "bnf", - "brainfuck", - "brightscript", - "bro", - "bsl", - "c", - "cfscript", - "chaiscript", - "cil", - "clike", - "clojure", - "cmake", - "cobol", - "coffeescript", - "concurnas", - "coq", - "core", - "cpp", - "crystal", - "csharp", - "cshtml", - "csp", - "css", - "css-extras", - "csv", - "cypher", - "d", - "dart", - "dataweave", - "dax", - "dhall", - "diff", - "django", - "dns-zone-file", - "docker", - "dot", - "ebnf", - "editorconfig", - "eiffel", - "ejs", - "elixir", - "elm", - "erb", - "erlang", - "etlua", - "excel-formula", - "factor", - "false", - "firestore-security-rules", - "flow", - "fortran", - "fsharp", - "ftl", - "gap", - "gcode", - "gdscript", - "gedcom", - "gherkin", - "git", - "glsl", - "gml", - "gn", - "go", - "go-module", - "graphql", - "groovy", - "haml", - "handlebars", - "haskell", - "haxe", - "hcl", - "hlsl", - "hoon", - "hpkp", - "hsts", - "http", - "ichigojam", - "icon", - "icu-message-format", - "idris", - "iecst", - "ignore", - "index", - "inform7", - "ini", - "io", - "j", - "java", - "javadoc", - "javadoclike", - "javascript", - "javastacktrace", - "jexl", - "jolie", - "jq", - "js-extras", - "js-templates", - "jsdoc", - "json", - "json5", - "jsonp", - "jsstacktrace", - "jsx", - "julia", - "keepalived", - "keyman", - "kotlin", - "kumir", - "kusto", - "latex", - "latte", - "less", - "lilypond", - "liquid", - "lisp", - "livescript", - "llvm", - "log", - "lolcode", - "lua", - "magma", - "makefile", - "markdown", - "markup", - "markup-templating", - "matlab", - "maxscript", - "mel", - "mermaid", - "mizar", - "mongodb", - "monkey", - "moonscript", - "n1ql", - "n4js", - "nand2tetris-hdl", - "naniscript", - "nasm", - "neon", - "nevod", - "nginx", - "nim", - "nix", - "nsis", - "objectivec", - "ocaml", - "opencl", - "openqasm", - "oz", - "parigp", - "parser", - "pascal", - "pascaligo", - "pcaxis", - "peoplecode", - "perl", - "php", - "php-extras", - "phpdoc", - "plsql", - "powerquery", - "powershell", - "processing", - "prolog", - "promql", - "properties", - "protobuf", - "psl", - "pug", - "puppet", - "pure", - "purebasic", - "purescript", - "python", - "q", - "qml", - "qore", - "qsharp", - "r", - "racket", - "reason", - "regex", - "rego", - "renpy", - "rest", - "rip", - "roboconf", - "robotframework", - "ruby", - "rust", - "sas", - "sass", - "scala", - "scheme", - "scss", - "shell-session", - "smali", - "smalltalk", - "smarty", - "sml", - "solidity", - "solution-file", - "soy", - "sparql", - "splunk-spl", - "sqf", - "sql", - "squirrel", - "stan", - "stylus", - "swift", - "systemd", - "t4-cs", - "t4-templating", - "t4-vb", - "tap", - "tcl", - "textile", - "toml", - "tremor", - "tsx", - "tt2", - "turtle", - "twig", - "typescript", - "typoscript", - "unrealscript", - "uorazor", - "uri", - "v", - "vala", - "vbnet", - "velocity", - "verilog", - "vhdl", - "vim", - "visual-basic", - "warpscript", - "wasm", - "web-idl", - "wiki", - "wolfram", - "wren", - "xeora", - "xml-doc", - "xojo", - "xquery", - "yaml", - "yang", - "zig", -] - -class CodeBlock(Component): - @overload - @classmethod - def create( # type: ignore - cls, - *children, - can_copy: Optional[bool] = False, - copy_button: Optional[Union[bool, Component]] = None, - theme: Optional[ - Union[ - Var[ - Literal[ - "a11y-dark", - "atom-dark", - "cb", - "coldark-cold", - "coldark-dark", - "coy", - "coy-without-shadows", - "darcula", - "dark", - "dracula", - "duotone-dark", - "duotone-earth", - "duotone-forest", - "duotone-light", - "duotone-sea", - "duotone-space", - "funky", - "ghcolors", - "gruvbox-dark", - "gruvbox-light", - "holi-theme", - "hopscotch", - "light", - "lucario", - "material-dark", - "material-light", - "material-oceanic", - "night-owl", - "nord", - "okaidia", - "one-dark", - "one-light", - "pojoaque", - "prism", - "shades-of-purple", - "solarized-dark-atom", - "solarizedlight", - "synthwave84", - "tomorrow", - "twilight", - "vs", - "vs-dark", - "vsc-dark-plus", - "xonokai", - "z-touch", - ] - ], - Literal[ - "a11y-dark", - "atom-dark", - "cb", - "coldark-cold", - "coldark-dark", - "coy", - "coy-without-shadows", - "darcula", - "dark", - "dracula", - "duotone-dark", - "duotone-earth", - "duotone-forest", - "duotone-light", - "duotone-sea", - "duotone-space", - "funky", - "ghcolors", - "gruvbox-dark", - "gruvbox-light", - "holi-theme", - "hopscotch", - "light", - "lucario", - "material-dark", - "material-light", - "material-oceanic", - "night-owl", - "nord", - "okaidia", - "one-dark", - "one-light", - "pojoaque", - "prism", - "shades-of-purple", - "solarized-dark-atom", - "solarizedlight", - "synthwave84", - "tomorrow", - "twilight", - "vs", - "vs-dark", - "vsc-dark-plus", - "xonokai", - "z-touch", - ], - ] - ] = None, - language: Optional[ - Union[ - Var[ - Literal[ - "abap", - "abnf", - "actionscript", - "ada", - "agda", - "al", - "antlr4", - "apacheconf", - "apex", - "apl", - "applescript", - "aql", - "arduino", - "arff", - "asciidoc", - "asm6502", - "asmatmel", - "aspnet", - "autohotkey", - "autoit", - "avisynth", - "avro-idl", - "bash", - "basic", - "batch", - "bbcode", - "bicep", - "birb", - "bison", - "bnf", - "brainfuck", - "brightscript", - "bro", - "bsl", - "c", - "cfscript", - "chaiscript", - "cil", - "clike", - "clojure", - "cmake", - "cobol", - "coffeescript", - "concurnas", - "coq", - "core", - "cpp", - "crystal", - "csharp", - "cshtml", - "csp", - "css", - "css-extras", - "csv", - "cypher", - "d", - "dart", - "dataweave", - "dax", - "dhall", - "diff", - "django", - "dns-zone-file", - "docker", - "dot", - "ebnf", - "editorconfig", - "eiffel", - "ejs", - "elixir", - "elm", - "erb", - "erlang", - "etlua", - "excel-formula", - "factor", - "false", - "firestore-security-rules", - "flow", - "fortran", - "fsharp", - "ftl", - "gap", - "gcode", - "gdscript", - "gedcom", - "gherkin", - "git", - "glsl", - "gml", - "gn", - "go", - "go-module", - "graphql", - "groovy", - "haml", - "handlebars", - "haskell", - "haxe", - "hcl", - "hlsl", - "hoon", - "hpkp", - "hsts", - "http", - "ichigojam", - "icon", - "icu-message-format", - "idris", - "iecst", - "ignore", - "index", - "inform7", - "ini", - "io", - "j", - "java", - "javadoc", - "javadoclike", - "javascript", - "javastacktrace", - "jexl", - "jolie", - "jq", - "js-extras", - "js-templates", - "jsdoc", - "json", - "json5", - "jsonp", - "jsstacktrace", - "jsx", - "julia", - "keepalived", - "keyman", - "kotlin", - "kumir", - "kusto", - "latex", - "latte", - "less", - "lilypond", - "liquid", - "lisp", - "livescript", - "llvm", - "log", - "lolcode", - "lua", - "magma", - "makefile", - "markdown", - "markup", - "markup-templating", - "matlab", - "maxscript", - "mel", - "mermaid", - "mizar", - "mongodb", - "monkey", - "moonscript", - "n1ql", - "n4js", - "nand2tetris-hdl", - "naniscript", - "nasm", - "neon", - "nevod", - "nginx", - "nim", - "nix", - "nsis", - "objectivec", - "ocaml", - "opencl", - "openqasm", - "oz", - "parigp", - "parser", - "pascal", - "pascaligo", - "pcaxis", - "peoplecode", - "perl", - "php", - "php-extras", - "phpdoc", - "plsql", - "powerquery", - "powershell", - "processing", - "prolog", - "promql", - "properties", - "protobuf", - "psl", - "pug", - "puppet", - "pure", - "purebasic", - "purescript", - "python", - "q", - "qml", - "qore", - "qsharp", - "r", - "racket", - "reason", - "regex", - "rego", - "renpy", - "rest", - "rip", - "roboconf", - "robotframework", - "ruby", - "rust", - "sas", - "sass", - "scala", - "scheme", - "scss", - "shell-session", - "smali", - "smalltalk", - "smarty", - "sml", - "solidity", - "solution-file", - "soy", - "sparql", - "splunk-spl", - "sqf", - "sql", - "squirrel", - "stan", - "stylus", - "swift", - "systemd", - "t4-cs", - "t4-templating", - "t4-vb", - "tap", - "tcl", - "textile", - "toml", - "tremor", - "tsx", - "tt2", - "turtle", - "twig", - "typescript", - "typoscript", - "unrealscript", - "uorazor", - "uri", - "v", - "vala", - "vbnet", - "velocity", - "verilog", - "vhdl", - "vim", - "visual-basic", - "warpscript", - "wasm", - "web-idl", - "wiki", - "wolfram", - "wren", - "xeora", - "xml-doc", - "xojo", - "xquery", - "yaml", - "yang", - "zig", - ] - ], - Literal[ - "abap", - "abnf", - "actionscript", - "ada", - "agda", - "al", - "antlr4", - "apacheconf", - "apex", - "apl", - "applescript", - "aql", - "arduino", - "arff", - "asciidoc", - "asm6502", - "asmatmel", - "aspnet", - "autohotkey", - "autoit", - "avisynth", - "avro-idl", - "bash", - "basic", - "batch", - "bbcode", - "bicep", - "birb", - "bison", - "bnf", - "brainfuck", - "brightscript", - "bro", - "bsl", - "c", - "cfscript", - "chaiscript", - "cil", - "clike", - "clojure", - "cmake", - "cobol", - "coffeescript", - "concurnas", - "coq", - "core", - "cpp", - "crystal", - "csharp", - "cshtml", - "csp", - "css", - "css-extras", - "csv", - "cypher", - "d", - "dart", - "dataweave", - "dax", - "dhall", - "diff", - "django", - "dns-zone-file", - "docker", - "dot", - "ebnf", - "editorconfig", - "eiffel", - "ejs", - "elixir", - "elm", - "erb", - "erlang", - "etlua", - "excel-formula", - "factor", - "false", - "firestore-security-rules", - "flow", - "fortran", - "fsharp", - "ftl", - "gap", - "gcode", - "gdscript", - "gedcom", - "gherkin", - "git", - "glsl", - "gml", - "gn", - "go", - "go-module", - "graphql", - "groovy", - "haml", - "handlebars", - "haskell", - "haxe", - "hcl", - "hlsl", - "hoon", - "hpkp", - "hsts", - "http", - "ichigojam", - "icon", - "icu-message-format", - "idris", - "iecst", - "ignore", - "index", - "inform7", - "ini", - "io", - "j", - "java", - "javadoc", - "javadoclike", - "javascript", - "javastacktrace", - "jexl", - "jolie", - "jq", - "js-extras", - "js-templates", - "jsdoc", - "json", - "json5", - "jsonp", - "jsstacktrace", - "jsx", - "julia", - "keepalived", - "keyman", - "kotlin", - "kumir", - "kusto", - "latex", - "latte", - "less", - "lilypond", - "liquid", - "lisp", - "livescript", - "llvm", - "log", - "lolcode", - "lua", - "magma", - "makefile", - "markdown", - "markup", - "markup-templating", - "matlab", - "maxscript", - "mel", - "mermaid", - "mizar", - "mongodb", - "monkey", - "moonscript", - "n1ql", - "n4js", - "nand2tetris-hdl", - "naniscript", - "nasm", - "neon", - "nevod", - "nginx", - "nim", - "nix", - "nsis", - "objectivec", - "ocaml", - "opencl", - "openqasm", - "oz", - "parigp", - "parser", - "pascal", - "pascaligo", - "pcaxis", - "peoplecode", - "perl", - "php", - "php-extras", - "phpdoc", - "plsql", - "powerquery", - "powershell", - "processing", - "prolog", - "promql", - "properties", - "protobuf", - "psl", - "pug", - "puppet", - "pure", - "purebasic", - "purescript", - "python", - "q", - "qml", - "qore", - "qsharp", - "r", - "racket", - "reason", - "regex", - "rego", - "renpy", - "rest", - "rip", - "roboconf", - "robotframework", - "ruby", - "rust", - "sas", - "sass", - "scala", - "scheme", - "scss", - "shell-session", - "smali", - "smalltalk", - "smarty", - "sml", - "solidity", - "solution-file", - "soy", - "sparql", - "splunk-spl", - "sqf", - "sql", - "squirrel", - "stan", - "stylus", - "swift", - "systemd", - "t4-cs", - "t4-templating", - "t4-vb", - "tap", - "tcl", - "textile", - "toml", - "tremor", - "tsx", - "tt2", - "turtle", - "twig", - "typescript", - "typoscript", - "unrealscript", - "uorazor", - "uri", - "v", - "vala", - "vbnet", - "velocity", - "verilog", - "vhdl", - "vim", - "visual-basic", - "warpscript", - "wasm", - "web-idl", - "wiki", - "wolfram", - "wren", - "xeora", - "xml-doc", - "xojo", - "xquery", - "yaml", - "yang", - "zig", - ], - ] - ] = None, - code: Optional[Union[Var[str], str]] = None, - show_line_numbers: Optional[Union[Var[bool], bool]] = None, - starting_line_number: Optional[Union[Var[int], int]] = None, - wrap_long_lines: Optional[Union[Var[bool], bool]] = None, - custom_style: Optional[Dict[str, str]] = None, - code_tag_props: Optional[Union[Var[Dict[str, str]], Dict[str, str]]] = None, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - **props - ) -> "CodeBlock": - """Create a text component. - - Args: - *children: The children of the component. - can_copy: Whether a copy button should appears. - copy_button: A custom copy button to override the default one. - theme: The theme to use ("light" or "dark"). - language: The language to use. - code: The code to display. - show_line_numbers: If this is enabled line numbers will be shown next to the code block. - starting_line_number: The starting line number to use. - wrap_long_lines: Whether to wrap long lines. - custom_style: A custom style for the code block. - code_tag_props: Props passed down to the code tag. - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of - custom_attrs: custom attribute - **props: The props to pass to the component. - - Returns: - The text component. - """ - ... class Code(ChakraComponent): @overload diff --git a/reflex/components/datadisplay/__init__.py b/reflex/components/datadisplay/__init__.py index 0ef1619d1..ba40d9f59 100644 --- a/reflex/components/datadisplay/__init__.py +++ b/reflex/components/datadisplay/__init__.py @@ -1,6 +1,10 @@ """Data grid components.""" +from .code import CodeBlock +from .code import LiteralCodeBlockTheme as LiteralCodeBlockTheme +from .code import LiteralCodeLanguage as LiteralCodeLanguage from .dataeditor import DataEditor, DataEditorTheme +code_block = CodeBlock.create data_editor = DataEditor.create data_editor_theme = DataEditorTheme diff --git a/reflex/components/datadisplay/code.py b/reflex/components/datadisplay/code.py new file mode 100644 index 000000000..ec9633399 --- /dev/null +++ b/reflex/components/datadisplay/code.py @@ -0,0 +1,512 @@ +"""A code component.""" +import re +from typing import Dict, Literal, Optional, Union + +from reflex.components.chakra.forms import Button, color_mode_cond +from reflex.components.chakra.layout import Box +from reflex.components.chakra.media import Icon +from reflex.components.component import Component +from reflex.event import set_clipboard +from reflex.style import Style +from reflex.utils import format, imports +from reflex.utils.imports import ImportVar +from reflex.vars import Var + +LiteralCodeBlockTheme = Literal[ + "a11y-dark", + "atom-dark", + "cb", + "coldark-cold", + "coldark-dark", + "coy", + "coy-without-shadows", + "darcula", + "dark", + "dracula", + "duotone-dark", + "duotone-earth", + "duotone-forest", + "duotone-light", + "duotone-sea", + "duotone-space", + "funky", + "ghcolors", + "gruvbox-dark", + "gruvbox-light", + "holi-theme", + "hopscotch", + "light", # not present in react-syntax-highlighter styles + "lucario", + "material-dark", + "material-light", + "material-oceanic", + "night-owl", + "nord", + "okaidia", + "one-dark", + "one-light", + "pojoaque", + "prism", + "shades-of-purple", + "solarized-dark-atom", + "solarizedlight", + "synthwave84", + "tomorrow", + "twilight", + "vs", + "vs-dark", + "vsc-dark-plus", + "xonokai", + "z-touch", +] + + +LiteralCodeLanguage = Literal[ + "abap", + "abnf", + "actionscript", + "ada", + "agda", + "al", + "antlr4", + "apacheconf", + "apex", + "apl", + "applescript", + "aql", + "arduino", + "arff", + "asciidoc", + "asm6502", + "asmatmel", + "aspnet", + "autohotkey", + "autoit", + "avisynth", + "avro-idl", + "bash", + "basic", + "batch", + "bbcode", + "bicep", + "birb", + "bison", + "bnf", + "brainfuck", + "brightscript", + "bro", + "bsl", + "c", + "cfscript", + "chaiscript", + "cil", + "clike", + "clojure", + "cmake", + "cobol", + "coffeescript", + "concurnas", + "coq", + "core", + "cpp", + "crystal", + "csharp", + "cshtml", + "csp", + "css", + "css-extras", + "csv", + "cypher", + "d", + "dart", + "dataweave", + "dax", + "dhall", + "diff", + "django", + "dns-zone-file", + "docker", + "dot", + "ebnf", + "editorconfig", + "eiffel", + "ejs", + "elixir", + "elm", + "erb", + "erlang", + "etlua", + "excel-formula", + "factor", + "false", + "firestore-security-rules", + "flow", + "fortran", + "fsharp", + "ftl", + "gap", + "gcode", + "gdscript", + "gedcom", + "gherkin", + "git", + "glsl", + "gml", + "gn", + "go", + "go-module", + "graphql", + "groovy", + "haml", + "handlebars", + "haskell", + "haxe", + "hcl", + "hlsl", + "hoon", + "hpkp", + "hsts", + "http", + "ichigojam", + "icon", + "icu-message-format", + "idris", + "iecst", + "ignore", + "index", + "inform7", + "ini", + "io", + "j", + "java", + "javadoc", + "javadoclike", + "javascript", + "javastacktrace", + "jexl", + "jolie", + "jq", + "js-extras", + "js-templates", + "jsdoc", + "json", + "json5", + "jsonp", + "jsstacktrace", + "jsx", + "julia", + "keepalived", + "keyman", + "kotlin", + "kumir", + "kusto", + "latex", + "latte", + "less", + "lilypond", + "liquid", + "lisp", + "livescript", + "llvm", + "log", + "lolcode", + "lua", + "magma", + "makefile", + "markdown", + "markup", + "markup-templating", + "matlab", + "maxscript", + "mel", + "mermaid", + "mizar", + "mongodb", + "monkey", + "moonscript", + "n1ql", + "n4js", + "nand2tetris-hdl", + "naniscript", + "nasm", + "neon", + "nevod", + "nginx", + "nim", + "nix", + "nsis", + "objectivec", + "ocaml", + "opencl", + "openqasm", + "oz", + "parigp", + "parser", + "pascal", + "pascaligo", + "pcaxis", + "peoplecode", + "perl", + "php", + "php-extras", + "phpdoc", + "plsql", + "powerquery", + "powershell", + "processing", + "prolog", + "promql", + "properties", + "protobuf", + "psl", + "pug", + "puppet", + "pure", + "purebasic", + "purescript", + "python", + "q", + "qml", + "qore", + "qsharp", + "r", + "racket", + "reason", + "regex", + "rego", + "renpy", + "rest", + "rip", + "roboconf", + "robotframework", + "ruby", + "rust", + "sas", + "sass", + "scala", + "scheme", + "scss", + "shell-session", + "smali", + "smalltalk", + "smarty", + "sml", + "solidity", + "solution-file", + "soy", + "sparql", + "splunk-spl", + "sqf", + "sql", + "squirrel", + "stan", + "stylus", + "swift", + "systemd", + "t4-cs", + "t4-templating", + "t4-vb", + "tap", + "tcl", + "textile", + "toml", + "tremor", + "tsx", + "tt2", + "turtle", + "twig", + "typescript", + "typoscript", + "unrealscript", + "uorazor", + "uri", + "v", + "vala", + "vbnet", + "velocity", + "verilog", + "vhdl", + "vim", + "visual-basic", + "warpscript", + "wasm", + "web-idl", + "wiki", + "wolfram", + "wren", + "xeora", + "xml-doc", + "xojo", + "xquery", + "yaml", + "yang", + "zig", +] + + +class CodeBlock(Component): + """A code block.""" + + library = "react-syntax-highlighter@15.5.0" + + tag = "PrismAsyncLight" + + alias = "SyntaxHighlighter" + + # The theme to use ("light" or "dark"). + theme: Var[LiteralCodeBlockTheme] = "one-light" # type: ignore + + # The language to use. + language: Var[LiteralCodeLanguage] = "python" # type: ignore + + # The code to display. + code: Var[str] + + # If this is enabled line numbers will be shown next to the code block. + show_line_numbers: Var[bool] + + # The starting line number to use. + starting_line_number: Var[int] + + # Whether to wrap long lines. + wrap_long_lines: Var[bool] + + # A custom style for the code block. + custom_style: Dict[str, str] = {} + + # Props passed down to the code tag. + code_tag_props: Var[Dict[str, str]] + + def _get_imports(self) -> imports.ImportDict: + merged_imports = super()._get_imports() + # Get all themes from a cond literal + themes = re.findall(r"`(.*?)`", self.theme._var_name) + if not themes: + themes = [self.theme._var_name] + merged_imports = imports.merge_imports( + merged_imports, + { + f"react-syntax-highlighter/dist/cjs/styles/prism/{theme}": { + ImportVar( + tag=format.to_camel_case(theme), + is_default=True, + install=False, + ) + } + for theme in themes + }, + ) + if ( + self.language is not None + and self.language._var_name in LiteralCodeLanguage.__args__ # type: ignore + ): + merged_imports = imports.merge_imports( + merged_imports, + { + f"react-syntax-highlighter/dist/cjs/languages/prism/{self.language._var_name}": { + ImportVar( + tag=format.to_camel_case(self.language._var_name), + is_default=True, + install=False, + ) + } + }, + ) + return merged_imports + + def _get_custom_code(self) -> Optional[str]: + if ( + self.language is not None + and self.language._var_name in LiteralCodeLanguage.__args__ # type: ignore + ): + return f"{self.alias}.registerLanguage('{self.language._var_name}', {format.to_camel_case(self.language._var_name)})" + + @classmethod + def create( + cls, + *children, + can_copy: Optional[bool] = False, + copy_button: Optional[Union[bool, Component]] = None, + **props, + ): + """Create a text component. + + Args: + *children: The children of the component. + can_copy: Whether a copy button should appears. + copy_button: A custom copy button to override the default one. + **props: The props to pass to the component. + + Returns: + The text component. + """ + # This component handles style in a special prop. + custom_style = props.pop("custom_style", {}) + + if "theme" not in props: + # Default color scheme responds to global color mode. + props["theme"] = color_mode_cond(light="one-light", dark="one-dark") + + # react-syntax-highlighter doesnt have an explicit "light" or "dark" theme so we use one-light and one-dark + # themes respectively to ensure code compatibility. + if "theme" in props and not isinstance(props["theme"], Var): + props["theme"] = ( + "one-light" + if props["theme"] == "light" + else "one-dark" + if props["theme"] == "dark" + else props["theme"] + ) + + if can_copy: + code = children[0] + copy_button = ( # type: ignore + copy_button + if copy_button is not None + else Button.create( + Icon.create(tag="copy"), + on_click=set_clipboard(code), + style=Style({"position": "absolute", "top": "0.5em", "right": "0"}), + ) + ) + custom_style.update({"padding": "1em 3.2em 1em 1em"}) + else: + copy_button = None + + # Transfer style props to the custom style prop. + for key, value in props.items(): + if key not in cls.get_fields(): + custom_style[key] = value + + # Carry the children (code) via props + if children: + props["code"] = children[0] + if not isinstance(props["code"], Var): + props["code"] = Var.create(props["code"], _var_is_string=True) + + # Create the component. + code_block = super().create( + **props, + custom_style=Style(custom_style), + ) + + if copy_button: + return Box.create(code_block, copy_button, position="relative") + else: + return code_block + + def _add_style(self, style): + self.custom_style.update(style) # type: ignore + + def _render(self): + out = super()._render() + predicate, qmark, value = self.theme._var_name.partition("?") + out.add_props( + style=Var.create( + format.to_camel_case(f"{predicate}{qmark}{value.replace('`', '')}"), + _var_is_local=False, + ) + ).remove_props("theme", "code") + if self.code is not None: + out.special_props.add(Var.create_safe(f"children={str(self.code)}")) + return out diff --git a/reflex/components/datadisplay/code.pyi b/reflex/components/datadisplay/code.pyi new file mode 100644 index 000000000..e398da463 --- /dev/null +++ b/reflex/components/datadisplay/code.pyi @@ -0,0 +1,1113 @@ +"""Stub file for reflex/components/datadisplay/code.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +import re +from typing import Dict, Literal, Optional, Union +from reflex.components.chakra.forms import Button, color_mode_cond +from reflex.components.chakra.layout import Box +from reflex.components.chakra.media import Icon +from reflex.components.component import Component +from reflex.event import set_clipboard +from reflex.style import Style +from reflex.utils import format, imports +from reflex.utils.imports import ImportVar +from reflex.vars import Var + +LiteralCodeBlockTheme = Literal[ + "a11y-dark", + "atom-dark", + "cb", + "coldark-cold", + "coldark-dark", + "coy", + "coy-without-shadows", + "darcula", + "dark", + "dracula", + "duotone-dark", + "duotone-earth", + "duotone-forest", + "duotone-light", + "duotone-sea", + "duotone-space", + "funky", + "ghcolors", + "gruvbox-dark", + "gruvbox-light", + "holi-theme", + "hopscotch", + "light", + "lucario", + "material-dark", + "material-light", + "material-oceanic", + "night-owl", + "nord", + "okaidia", + "one-dark", + "one-light", + "pojoaque", + "prism", + "shades-of-purple", + "solarized-dark-atom", + "solarizedlight", + "synthwave84", + "tomorrow", + "twilight", + "vs", + "vs-dark", + "vsc-dark-plus", + "xonokai", + "z-touch", +] +LiteralCodeLanguage = Literal[ + "abap", + "abnf", + "actionscript", + "ada", + "agda", + "al", + "antlr4", + "apacheconf", + "apex", + "apl", + "applescript", + "aql", + "arduino", + "arff", + "asciidoc", + "asm6502", + "asmatmel", + "aspnet", + "autohotkey", + "autoit", + "avisynth", + "avro-idl", + "bash", + "basic", + "batch", + "bbcode", + "bicep", + "birb", + "bison", + "bnf", + "brainfuck", + "brightscript", + "bro", + "bsl", + "c", + "cfscript", + "chaiscript", + "cil", + "clike", + "clojure", + "cmake", + "cobol", + "coffeescript", + "concurnas", + "coq", + "core", + "cpp", + "crystal", + "csharp", + "cshtml", + "csp", + "css", + "css-extras", + "csv", + "cypher", + "d", + "dart", + "dataweave", + "dax", + "dhall", + "diff", + "django", + "dns-zone-file", + "docker", + "dot", + "ebnf", + "editorconfig", + "eiffel", + "ejs", + "elixir", + "elm", + "erb", + "erlang", + "etlua", + "excel-formula", + "factor", + "false", + "firestore-security-rules", + "flow", + "fortran", + "fsharp", + "ftl", + "gap", + "gcode", + "gdscript", + "gedcom", + "gherkin", + "git", + "glsl", + "gml", + "gn", + "go", + "go-module", + "graphql", + "groovy", + "haml", + "handlebars", + "haskell", + "haxe", + "hcl", + "hlsl", + "hoon", + "hpkp", + "hsts", + "http", + "ichigojam", + "icon", + "icu-message-format", + "idris", + "iecst", + "ignore", + "index", + "inform7", + "ini", + "io", + "j", + "java", + "javadoc", + "javadoclike", + "javascript", + "javastacktrace", + "jexl", + "jolie", + "jq", + "js-extras", + "js-templates", + "jsdoc", + "json", + "json5", + "jsonp", + "jsstacktrace", + "jsx", + "julia", + "keepalived", + "keyman", + "kotlin", + "kumir", + "kusto", + "latex", + "latte", + "less", + "lilypond", + "liquid", + "lisp", + "livescript", + "llvm", + "log", + "lolcode", + "lua", + "magma", + "makefile", + "markdown", + "markup", + "markup-templating", + "matlab", + "maxscript", + "mel", + "mermaid", + "mizar", + "mongodb", + "monkey", + "moonscript", + "n1ql", + "n4js", + "nand2tetris-hdl", + "naniscript", + "nasm", + "neon", + "nevod", + "nginx", + "nim", + "nix", + "nsis", + "objectivec", + "ocaml", + "opencl", + "openqasm", + "oz", + "parigp", + "parser", + "pascal", + "pascaligo", + "pcaxis", + "peoplecode", + "perl", + "php", + "php-extras", + "phpdoc", + "plsql", + "powerquery", + "powershell", + "processing", + "prolog", + "promql", + "properties", + "protobuf", + "psl", + "pug", + "puppet", + "pure", + "purebasic", + "purescript", + "python", + "q", + "qml", + "qore", + "qsharp", + "r", + "racket", + "reason", + "regex", + "rego", + "renpy", + "rest", + "rip", + "roboconf", + "robotframework", + "ruby", + "rust", + "sas", + "sass", + "scala", + "scheme", + "scss", + "shell-session", + "smali", + "smalltalk", + "smarty", + "sml", + "solidity", + "solution-file", + "soy", + "sparql", + "splunk-spl", + "sqf", + "sql", + "squirrel", + "stan", + "stylus", + "swift", + "systemd", + "t4-cs", + "t4-templating", + "t4-vb", + "tap", + "tcl", + "textile", + "toml", + "tremor", + "tsx", + "tt2", + "turtle", + "twig", + "typescript", + "typoscript", + "unrealscript", + "uorazor", + "uri", + "v", + "vala", + "vbnet", + "velocity", + "verilog", + "vhdl", + "vim", + "visual-basic", + "warpscript", + "wasm", + "web-idl", + "wiki", + "wolfram", + "wren", + "xeora", + "xml-doc", + "xojo", + "xquery", + "yaml", + "yang", + "zig", +] + +class CodeBlock(Component): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + can_copy: Optional[bool] = False, + copy_button: Optional[Union[bool, Component]] = None, + theme: Optional[ + Union[ + Var[ + Literal[ + "a11y-dark", + "atom-dark", + "cb", + "coldark-cold", + "coldark-dark", + "coy", + "coy-without-shadows", + "darcula", + "dark", + "dracula", + "duotone-dark", + "duotone-earth", + "duotone-forest", + "duotone-light", + "duotone-sea", + "duotone-space", + "funky", + "ghcolors", + "gruvbox-dark", + "gruvbox-light", + "holi-theme", + "hopscotch", + "light", + "lucario", + "material-dark", + "material-light", + "material-oceanic", + "night-owl", + "nord", + "okaidia", + "one-dark", + "one-light", + "pojoaque", + "prism", + "shades-of-purple", + "solarized-dark-atom", + "solarizedlight", + "synthwave84", + "tomorrow", + "twilight", + "vs", + "vs-dark", + "vsc-dark-plus", + "xonokai", + "z-touch", + ] + ], + Literal[ + "a11y-dark", + "atom-dark", + "cb", + "coldark-cold", + "coldark-dark", + "coy", + "coy-without-shadows", + "darcula", + "dark", + "dracula", + "duotone-dark", + "duotone-earth", + "duotone-forest", + "duotone-light", + "duotone-sea", + "duotone-space", + "funky", + "ghcolors", + "gruvbox-dark", + "gruvbox-light", + "holi-theme", + "hopscotch", + "light", + "lucario", + "material-dark", + "material-light", + "material-oceanic", + "night-owl", + "nord", + "okaidia", + "one-dark", + "one-light", + "pojoaque", + "prism", + "shades-of-purple", + "solarized-dark-atom", + "solarizedlight", + "synthwave84", + "tomorrow", + "twilight", + "vs", + "vs-dark", + "vsc-dark-plus", + "xonokai", + "z-touch", + ], + ] + ] = None, + language: Optional[ + Union[ + Var[ + Literal[ + "abap", + "abnf", + "actionscript", + "ada", + "agda", + "al", + "antlr4", + "apacheconf", + "apex", + "apl", + "applescript", + "aql", + "arduino", + "arff", + "asciidoc", + "asm6502", + "asmatmel", + "aspnet", + "autohotkey", + "autoit", + "avisynth", + "avro-idl", + "bash", + "basic", + "batch", + "bbcode", + "bicep", + "birb", + "bison", + "bnf", + "brainfuck", + "brightscript", + "bro", + "bsl", + "c", + "cfscript", + "chaiscript", + "cil", + "clike", + "clojure", + "cmake", + "cobol", + "coffeescript", + "concurnas", + "coq", + "core", + "cpp", + "crystal", + "csharp", + "cshtml", + "csp", + "css", + "css-extras", + "csv", + "cypher", + "d", + "dart", + "dataweave", + "dax", + "dhall", + "diff", + "django", + "dns-zone-file", + "docker", + "dot", + "ebnf", + "editorconfig", + "eiffel", + "ejs", + "elixir", + "elm", + "erb", + "erlang", + "etlua", + "excel-formula", + "factor", + "false", + "firestore-security-rules", + "flow", + "fortran", + "fsharp", + "ftl", + "gap", + "gcode", + "gdscript", + "gedcom", + "gherkin", + "git", + "glsl", + "gml", + "gn", + "go", + "go-module", + "graphql", + "groovy", + "haml", + "handlebars", + "haskell", + "haxe", + "hcl", + "hlsl", + "hoon", + "hpkp", + "hsts", + "http", + "ichigojam", + "icon", + "icu-message-format", + "idris", + "iecst", + "ignore", + "index", + "inform7", + "ini", + "io", + "j", + "java", + "javadoc", + "javadoclike", + "javascript", + "javastacktrace", + "jexl", + "jolie", + "jq", + "js-extras", + "js-templates", + "jsdoc", + "json", + "json5", + "jsonp", + "jsstacktrace", + "jsx", + "julia", + "keepalived", + "keyman", + "kotlin", + "kumir", + "kusto", + "latex", + "latte", + "less", + "lilypond", + "liquid", + "lisp", + "livescript", + "llvm", + "log", + "lolcode", + "lua", + "magma", + "makefile", + "markdown", + "markup", + "markup-templating", + "matlab", + "maxscript", + "mel", + "mermaid", + "mizar", + "mongodb", + "monkey", + "moonscript", + "n1ql", + "n4js", + "nand2tetris-hdl", + "naniscript", + "nasm", + "neon", + "nevod", + "nginx", + "nim", + "nix", + "nsis", + "objectivec", + "ocaml", + "opencl", + "openqasm", + "oz", + "parigp", + "parser", + "pascal", + "pascaligo", + "pcaxis", + "peoplecode", + "perl", + "php", + "php-extras", + "phpdoc", + "plsql", + "powerquery", + "powershell", + "processing", + "prolog", + "promql", + "properties", + "protobuf", + "psl", + "pug", + "puppet", + "pure", + "purebasic", + "purescript", + "python", + "q", + "qml", + "qore", + "qsharp", + "r", + "racket", + "reason", + "regex", + "rego", + "renpy", + "rest", + "rip", + "roboconf", + "robotframework", + "ruby", + "rust", + "sas", + "sass", + "scala", + "scheme", + "scss", + "shell-session", + "smali", + "smalltalk", + "smarty", + "sml", + "solidity", + "solution-file", + "soy", + "sparql", + "splunk-spl", + "sqf", + "sql", + "squirrel", + "stan", + "stylus", + "swift", + "systemd", + "t4-cs", + "t4-templating", + "t4-vb", + "tap", + "tcl", + "textile", + "toml", + "tremor", + "tsx", + "tt2", + "turtle", + "twig", + "typescript", + "typoscript", + "unrealscript", + "uorazor", + "uri", + "v", + "vala", + "vbnet", + "velocity", + "verilog", + "vhdl", + "vim", + "visual-basic", + "warpscript", + "wasm", + "web-idl", + "wiki", + "wolfram", + "wren", + "xeora", + "xml-doc", + "xojo", + "xquery", + "yaml", + "yang", + "zig", + ] + ], + Literal[ + "abap", + "abnf", + "actionscript", + "ada", + "agda", + "al", + "antlr4", + "apacheconf", + "apex", + "apl", + "applescript", + "aql", + "arduino", + "arff", + "asciidoc", + "asm6502", + "asmatmel", + "aspnet", + "autohotkey", + "autoit", + "avisynth", + "avro-idl", + "bash", + "basic", + "batch", + "bbcode", + "bicep", + "birb", + "bison", + "bnf", + "brainfuck", + "brightscript", + "bro", + "bsl", + "c", + "cfscript", + "chaiscript", + "cil", + "clike", + "clojure", + "cmake", + "cobol", + "coffeescript", + "concurnas", + "coq", + "core", + "cpp", + "crystal", + "csharp", + "cshtml", + "csp", + "css", + "css-extras", + "csv", + "cypher", + "d", + "dart", + "dataweave", + "dax", + "dhall", + "diff", + "django", + "dns-zone-file", + "docker", + "dot", + "ebnf", + "editorconfig", + "eiffel", + "ejs", + "elixir", + "elm", + "erb", + "erlang", + "etlua", + "excel-formula", + "factor", + "false", + "firestore-security-rules", + "flow", + "fortran", + "fsharp", + "ftl", + "gap", + "gcode", + "gdscript", + "gedcom", + "gherkin", + "git", + "glsl", + "gml", + "gn", + "go", + "go-module", + "graphql", + "groovy", + "haml", + "handlebars", + "haskell", + "haxe", + "hcl", + "hlsl", + "hoon", + "hpkp", + "hsts", + "http", + "ichigojam", + "icon", + "icu-message-format", + "idris", + "iecst", + "ignore", + "index", + "inform7", + "ini", + "io", + "j", + "java", + "javadoc", + "javadoclike", + "javascript", + "javastacktrace", + "jexl", + "jolie", + "jq", + "js-extras", + "js-templates", + "jsdoc", + "json", + "json5", + "jsonp", + "jsstacktrace", + "jsx", + "julia", + "keepalived", + "keyman", + "kotlin", + "kumir", + "kusto", + "latex", + "latte", + "less", + "lilypond", + "liquid", + "lisp", + "livescript", + "llvm", + "log", + "lolcode", + "lua", + "magma", + "makefile", + "markdown", + "markup", + "markup-templating", + "matlab", + "maxscript", + "mel", + "mermaid", + "mizar", + "mongodb", + "monkey", + "moonscript", + "n1ql", + "n4js", + "nand2tetris-hdl", + "naniscript", + "nasm", + "neon", + "nevod", + "nginx", + "nim", + "nix", + "nsis", + "objectivec", + "ocaml", + "opencl", + "openqasm", + "oz", + "parigp", + "parser", + "pascal", + "pascaligo", + "pcaxis", + "peoplecode", + "perl", + "php", + "php-extras", + "phpdoc", + "plsql", + "powerquery", + "powershell", + "processing", + "prolog", + "promql", + "properties", + "protobuf", + "psl", + "pug", + "puppet", + "pure", + "purebasic", + "purescript", + "python", + "q", + "qml", + "qore", + "qsharp", + "r", + "racket", + "reason", + "regex", + "rego", + "renpy", + "rest", + "rip", + "roboconf", + "robotframework", + "ruby", + "rust", + "sas", + "sass", + "scala", + "scheme", + "scss", + "shell-session", + "smali", + "smalltalk", + "smarty", + "sml", + "solidity", + "solution-file", + "soy", + "sparql", + "splunk-spl", + "sqf", + "sql", + "squirrel", + "stan", + "stylus", + "swift", + "systemd", + "t4-cs", + "t4-templating", + "t4-vb", + "tap", + "tcl", + "textile", + "toml", + "tremor", + "tsx", + "tt2", + "turtle", + "twig", + "typescript", + "typoscript", + "unrealscript", + "uorazor", + "uri", + "v", + "vala", + "vbnet", + "velocity", + "verilog", + "vhdl", + "vim", + "visual-basic", + "warpscript", + "wasm", + "web-idl", + "wiki", + "wolfram", + "wren", + "xeora", + "xml-doc", + "xojo", + "xquery", + "yaml", + "yang", + "zig", + ], + ] + ] = None, + code: Optional[Union[Var[str], str]] = None, + show_line_numbers: Optional[Union[Var[bool], bool]] = None, + starting_line_number: Optional[Union[Var[int], int]] = None, + wrap_long_lines: Optional[Union[Var[bool], bool]] = None, + custom_style: Optional[Dict[str, str]] = None, + code_tag_props: Optional[Union[Var[Dict[str, str]], Dict[str, str]]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "CodeBlock": + """Create a text component. + + Args: + *children: The children of the component. + can_copy: Whether a copy button should appears. + copy_button: A custom copy button to override the default one. + theme: The theme to use ("light" or "dark"). + language: The language to use. + code: The code to display. + show_line_numbers: If this is enabled line numbers will be shown next to the code block. + starting_line_number: The starting line number to use. + wrap_long_lines: Whether to wrap long lines. + custom_style: A custom style for the code block. + code_tag_props: Props passed down to the code tag. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The props to pass to the component. + + Returns: + The text component. + """ + ... diff --git a/reflex/components/markdown/markdown.py b/reflex/components/markdown/markdown.py index 1c2b7746c..62a35e74e 100644 --- a/reflex/components/markdown/markdown.py +++ b/reflex/components/markdown/markdown.py @@ -50,7 +50,8 @@ def get_base_component_map() -> dict[str, Callable]: Returns: The base component map. """ - from reflex.components.chakra.datadisplay.code import Code, CodeBlock + from reflex.components.chakra.datadisplay.code import Code + from reflex.components.datadisplay.code import CodeBlock return { "h1": lambda value: Heading.create( @@ -164,7 +165,8 @@ class Markdown(Component): def _get_imports(self) -> imports.ImportDict: # Import here to avoid circular imports. - from reflex.components.chakra.datadisplay.code import Code, CodeBlock + from reflex.components.chakra.datadisplay.code import Code + from reflex.components.datadisplay.code import CodeBlock imports = super()._get_imports() diff --git a/reflex/components/radix/themes/components/__init__.py b/reflex/components/radix/themes/components/__init__.py index c4beba8f1..462e2e88a 100644 --- a/reflex/components/radix/themes/components/__init__.py +++ b/reflex/components/radix/themes/components/__init__.py @@ -28,6 +28,8 @@ from .textarea import text_area as text_area from .textfield import text_field as text_field from .tooltip import tooltip as tooltip +input = text_field + __all__ = [ "alert_dialog", "aspect_ratio", @@ -43,6 +45,7 @@ __all__ = [ "hover_card", "icon_button", "icon", + "input", "inset", "popover", "radio_group", diff --git a/reflex/components/radix/themes/layout/__init__.py b/reflex/components/radix/themes/layout/__init__.py index ae8688460..c6201f30a 100644 --- a/reflex/components/radix/themes/layout/__init__.py +++ b/reflex/components/radix/themes/layout/__init__.py @@ -7,7 +7,7 @@ from .flex import Flex from .grid import Grid from .section import Section from .spacer import Spacer -from .stack import HStack, VStack +from .stack import HStack, Stack, VStack box = Box.create center = Center.create @@ -16,6 +16,7 @@ flex = Flex.create grid = Grid.create section = Section.create spacer = Spacer.create +stack = Stack.create hstack = HStack.create vstack = VStack.create @@ -27,6 +28,7 @@ __all__ = [ "grid", "section", "spacer", + "stack", "hstack", "vstack", ] diff --git a/scripts/pyi_generator.py b/scripts/pyi_generator.py index 4e4fb9341..2ce0ae61f 100644 --- a/scripts/pyi_generator.py +++ b/scripts/pyi_generator.py @@ -914,7 +914,11 @@ if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) logging.getLogger("blib2to3.pgen2.driver").setLevel(logging.INFO) - targets = sys.argv[1:] if len(sys.argv) > 1 else ["reflex/components"] + targets = ( + [arg for arg in sys.argv[1:] if not arg.startswith("tests")] + if len(sys.argv) > 1 + else ["reflex/components"] + ) logger.info(f"Running .pyi generator for {targets}") changed_files = _get_changed_files() diff --git a/tests/components/datadisplay/test_code.py b/tests/components/datadisplay/test_code.py index 1557cef84..64452e90c 100644 --- a/tests/components/datadisplay/test_code.py +++ b/tests/components/datadisplay/test_code.py @@ -1,6 +1,6 @@ import pytest -from reflex.components.chakra.datadisplay.code import CodeBlock +from reflex.components.datadisplay.code import CodeBlock @pytest.mark.parametrize( From b3fb77f0d8e4a951dc409bbf6d1d50d6a3c6f206 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 6 Feb 2024 09:38:18 -0800 Subject: [PATCH 09/68] Add rx.lucide to top-level namespace --- reflex/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/reflex/__init__.py b/reflex/__init__.py index 0e1e8663f..dbfa714ed 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -119,6 +119,7 @@ _MAPPING = { "reflex.components.component": ["Component", "NoSSRComponent", "memo"], "reflex.components.chakra": ["chakra"], "reflex.components.el": ["el"], + "reflex.components.lucide": ["lucide"], "reflex.components.next": ["next"], "reflex.components.radix": ["radix"], "reflex.components.recharts": ["recharts"], From a858d3a755a9e37529ed555c4619f841dd14a28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Tue, 6 Feb 2024 23:21:22 +0100 Subject: [PATCH 10/68] remove radix icons (#2538) * remove radix icons * update pyi --- reflex/__init__.pyi | 1 + .../radix/themes/components/__init__.py | 2 - .../radix/themes/components/callout.py | 11 +- .../radix/themes/components/callout.pyi | 2 +- .../radix/themes/components/icons.py | 404 ------------------ .../radix/themes/components/icons.pyi | 190 -------- .../radix/themes/components/textfield.py | 3 +- .../radix/themes/components/textfield.pyi | 2 +- 8 files changed, 12 insertions(+), 603 deletions(-) delete mode 100644 reflex/components/radix/themes/components/icons.py delete mode 100644 reflex/components/radix/themes/components/icons.pyi diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index 488e9625c..81557a034 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -94,6 +94,7 @@ from reflex.components.component import NoSSRComponent as NoSSRComponent from reflex.components.component import memo as memo from reflex.components import chakra as chakra from reflex.components import el as el +from reflex.components import lucide as lucide from reflex.components import next as next from reflex.components import radix as radix from reflex.components import recharts as recharts diff --git a/reflex/components/radix/themes/components/__init__.py b/reflex/components/radix/themes/components/__init__.py index 462e2e88a..30efe0d65 100644 --- a/reflex/components/radix/themes/components/__init__.py +++ b/reflex/components/radix/themes/components/__init__.py @@ -13,7 +13,6 @@ from .dialog import dialog as dialog from .dropdownmenu import dropdown_menu as dropdown_menu from .hovercard import hover_card as hover_card from .iconbutton import icon_button as icon_button -from .icons import icon as icon from .inset import inset as inset from .popover import popover as popover from .radiogroup import radio_group as radio_group @@ -44,7 +43,6 @@ __all__ = [ "dropdown_menu", "hover_card", "icon_button", - "icon", "input", "inset", "popover", diff --git a/reflex/components/radix/themes/components/callout.py b/reflex/components/radix/themes/components/callout.py index a388f423e..6b0600d04 100644 --- a/reflex/components/radix/themes/components/callout.py +++ b/reflex/components/radix/themes/components/callout.py @@ -1,11 +1,12 @@ """Interactive components provided by @radix-ui/themes.""" + from types import SimpleNamespace from typing import Literal, Union import reflex as rx from reflex import el from reflex.components.component import Component -from reflex.components.radix.themes.components.icons import Icon +from reflex.components.lucide.icon import Icon from reflex.vars import Var from ..base import ( @@ -70,9 +71,11 @@ class Callout(CalloutRoot): The callout component. """ return CalloutRoot.create( - CalloutIcon.create(Icon.create(tag=props["icon"])) - if "icon" in props - else rx.fragment(), + ( + CalloutIcon.create(Icon.create(tag=props["icon"])) + if "icon" in props + else rx.fragment() + ), CalloutText.create(text), **props, ) diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index 3e96ffd1a..05e86e714 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -12,7 +12,7 @@ from typing import Literal, Union import reflex as rx from reflex import el from reflex.components.component import Component -from reflex.components.radix.themes.components.icons import Icon +from reflex.components.lucide.icon import Icon from reflex.vars import Var from ..base import LiteralAccentColor, RadixThemesComponent diff --git a/reflex/components/radix/themes/components/icons.py b/reflex/components/radix/themes/components/icons.py deleted file mode 100644 index 05f7cf5ca..000000000 --- a/reflex/components/radix/themes/components/icons.py +++ /dev/null @@ -1,404 +0,0 @@ -"""Radix Icons.""" - - -from typing import List - -from reflex.components.component import Component -from reflex.utils import format - - -class RadixIconComponent(Component): - """A component used as basis for Radix icons.""" - - library = "@radix-ui/react-icons@^1.3.0" - - -class Icon(RadixIconComponent): - """An image Icon.""" - - tag = "None" - - @classmethod - def create(cls, *children, **props) -> Component: - """Initialize the Icon component. - - Run some additional checks on Icon component. - - Args: - *children: The positional arguments - **props: The keyword arguments - - Raises: - AttributeError: The errors tied to bad usage of the Icon component. - ValueError: If the icon tag is invalid. - - Returns: - The created component. - """ - if children: - raise AttributeError( - f"Passing children to Icon component is not allowed: remove positional arguments {children} to fix" - ) - if "tag" not in props.keys(): - raise AttributeError("Missing 'tag' keyword-argument for Icon") - if type(props["tag"]) != str or props["tag"].lower() not in ICON_LIST: - raise ValueError( - f"Invalid icon tag: {props['tag']}. Please use one of the following: {sorted(ICON_LIST)}" - ) - props["tag"] = format.to_title_case(props["tag"]) + "Icon" - props["alias"] = f"RadixThemes{props['tag']}" - return super().create(*children, **props) - - -icon = Icon.create - - -ICON_ABSTRACT: List[str] = [ - "hamburger_menu", - "cross_1", - "dots_vertical", - "dots_horizontal", - "plus", - "minus", - "check", - "cross_2", - "check_circled", - "cross_circled", - "plus_circled", - "minus_circled", - "question_mark", - "question_mark_circled", - "info_circled", - "accessibility", - "exclamation_triangle", - "share_1", - "share_2", - "external_link", - "open_in_new_window", - "enter", - "exit", - "download", - "upload", - "reset", - "reload", - "update", - "enter_full_screen", - "exit_full_screen", - "drag_handle_vertical", - "drag_handle_horizontal", - "drag_handle_dots_1", - "drag_handle_dots_2", - "dot", - "dot_filled", - "commit", - "slash", - "circle", - "circle_backslash", - "half_1", - "half_2", - "view_none", - "view_horizontal", - "view_vertical", - "view_grid", - "copy", - "square", -] -ICON_ALIGNS: List[str] = [ - "align_top", - "align_center_vertically", - "align_bottom", - "stretch_vertically", - "align_left", - "align_center_horizontally", - "align_right", - "stretch_horizontally", - "space_between_horizontally", - "space_evenly_horizontally", - "space_between_vertically", - "space_evenly_vertically", - "pin_left", - "pin_right", - "pin_top", - "pin_bottom", -] -ICON_ARROWS: List[str] = [ - "arrow_left", - "arrow_right", - "arrow_up", - "arrow_down", - "arrow_top_left", - "arrow_top_right", - "arrow_bottom_left", - "arrow_bottom_right", - "chevron_left", - "chevron_right", - "chevron_up", - "chevron_down", - "double_arrow_down", - "double_arrow_right", - "double_arrow_left", - "double_arrow_up", - "thick_arrow_up", - "thick_arrow_down", - "thick_arrow_right", - "thick_arrow_left", - "triangle_right", - "triangle_left", - "triangle_down", - "triangle_up", - "caret_down", - "caret_up", - "caret_left", - "caret_right", - "caret_sort", - "width", - "height", - "size", - "move", - "all_sides", -] -ICON_BORDERS: List[str] = [ - "border_all", - "border_split", - "border_none", - "border_left", - "border_right", - "border_top", - "border_bottom", - "border_width", - "corners", - "corner_top_left", - "corner_top_right", - "corner_bottom_right", - "corner_bottom_left", - "border_style", - "border_solid", - "border_dashed", - "border_dotted", -] -ICON_COMPONENTS: List[str] = [ - "box", - "aspect_ratio", - "container", - "section", - "layout", - "grid", - "table", - "image", - "switch", - "checkbox", - "radiobutton", - "avatar", - "button", - "badge", - "input", - "slider", - "quote", - "code", - "list_bullet", - "dropdown_menu", - "video", - "pie_chart", - "calendar", - "dashboard", - "activity_log", - "bar_chart", - "divider_horizontal", - "divider_vertical", -] -ICON_DESIGN: List[str] = [ - "frame", - "crop", - "layers", - "stack", - "tokens", - "component_1", - "component_2", - "component_instance", - "component_none", - "component_boolean", - "component_placeholder", - "opacity", - "blending_mode", - "mask_on", - "mask_off", - "color_wheel", - "shadow", - "shadow_none", - "shadow_inner", - "shadow_outer", - "value", - "value_none", - "zoom_in", - "zoom_out", - "transparency_grid", - "group", - "dimensions", - "rotate_counter_clockwise", - "columns", - "rows", - "transform", - "box_model", - "padding", - "margin", - "angle", - "cursor_arrow", - "cursor_text", - "column_spacing", - "row_spacing", -] -ICON_LOGOS: List[str] = [ - "modulz_logo", - "stitches_logo", - "figma_logo", - "framer_logo", - "sketch_logo", - "twitter_logo", - "icon_jar_logo", - "git_hub_logo", - "code_sandbox_logo", - "notion_logo", - "discord_logo", - "instagram_logo", - "linked_in_logo", -] -ICON_MUSIC: List[str] = [ - "play", - "resume", - "pause", - "stop", - "track_previous", - "track_next", - "loop", - "shuffle", - "speaker_loud", - "speaker_moderate", - "speaker_quiet", - "speaker_off", -] -ICON_OBJECTS: List[str] = [ - "magnifying_glass", - "gear", - "bell", - "home", - "lock_closed", - "lock_open_1", - "lock_open_2", - "backpack", - "camera", - "paper_plane", - "rocket", - "envelope_closed", - "envelope_open", - "chat_bubble", - "link_1", - "link_2", - "link_break_1", - "link_break_2", - "link_none_1", - "link_none_2", - "trash", - "pencil_1", - "pencil_2", - "bookmark", - "bookmark_filled", - "drawing_pin", - "drawing_pin_filled", - "sewing_pin", - "sewing_pin_filled", - "cube", - "archive", - "crumpled_paper", - "mix", - "mixer_horizontal", - "mixer_vertical", - "file", - "file_minus", - "file_plus", - "file_text", - "reader", - "card_stack", - "card_stack_plus", - "card_stack_minus", - "id_card", - "crosshair_1", - "crosshair_2", - "target", - "globe", - "disc", - "sun", - "moon", - "clock", - "timer", - "counter_clockwise_clock", - "countdown_timer", - "stopwatch", - "lap_timer", - "lightning_bolt", - "magic_wand", - "face", - "person", - "eye_open", - "eye_none", - "eye_closed", - "hand", - "ruler_horizontal", - "ruler_square", - "clipboard", - "clipboard_copy", - "desktop", - "laptop", - "mobile", - "keyboard", - "star", - "star_filled", - "heart", - "heart_filled", - "scissors", - "hobby_knife", - "eraser", - "cookie", -] -ICON_TYPOGRAPHY: List[str] = [ - "font_style", - "font_italic", - "font_roman", - "font_bold", - "letter_case_lowercase", - "letter_case_capitalize", - "letter_case_uppercase", - "letter_case_toggle", - "letter_spacing", - "align_baseline", - "font_size", - "font_family", - "heading", - "text", - "text_none", - "line_height", - "underline", - "strikethrough", - "overline", - "pilcrow", - "text_align_left", - "text_align_center", - "text_align_right", - "text_align_justify", - "text_align_top", - "text_align_middle", - "text_align_bottom", - "dash", -] - -ICON_LIST: List[str] = [ - *ICON_ABSTRACT, - *ICON_ALIGNS, - *ICON_ARROWS, - *ICON_BORDERS, - *ICON_COMPONENTS, - *ICON_DESIGN, - *ICON_LOGOS, - *ICON_MUSIC, - *ICON_OBJECTS, - *ICON_TYPOGRAPHY, -] diff --git a/reflex/components/radix/themes/components/icons.pyi b/reflex/components/radix/themes/components/icons.pyi deleted file mode 100644 index 3fabc6e71..000000000 --- a/reflex/components/radix/themes/components/icons.pyi +++ /dev/null @@ -1,190 +0,0 @@ -"""Stub file for reflex/components/radix/themes/components/icons.py""" -# ------------------- DO NOT EDIT ---------------------- -# This file was generated by `scripts/pyi_generator.py`! -# ------------------------------------------------------ - -from typing import Any, Dict, Literal, Optional, Union, overload -from reflex.vars import Var, BaseVar, ComputedVar -from reflex.event import EventChain, EventHandler, EventSpec -from reflex.style import Style -from typing import List -from reflex.components.component import Component -from reflex.utils import format - -class RadixIconComponent(Component): - @overload - @classmethod - def create( # type: ignore - cls, - *children, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - **props - ) -> "RadixIconComponent": - """Create the component. - - Args: - *children: The children of the component. - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of - custom_attrs: custom attribute - **props: The props of the component. - - Returns: - The component. - - Raises: - TypeError: If an invalid child is passed. - """ - ... - -class Icon(RadixIconComponent): - @overload - @classmethod - def create( # type: ignore - cls, - *children, - style: Optional[Style] = None, - key: Optional[Any] = None, - id: Optional[Any] = None, - class_name: Optional[Any] = None, - autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, - custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_blur: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_context_menu: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_double_click: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_focus: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_down: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_enter: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_leave: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_move: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_out: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_over: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_mouse_up: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_scroll: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - on_unmount: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, - **props - ) -> "Icon": - """Initialize the Icon component. - - Run some additional checks on Icon component. - - Args: - *children: The positional arguments - style: The style of the component. - key: A unique key for the component. - id: The id for the component. - class_name: The class name for the component. - autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of - custom_attrs: custom attribute - **props: The keyword arguments - - Raises: - AttributeError: The errors tied to bad usage of the Icon component. - ValueError: If the icon tag is invalid. - - Returns: - The created component. - """ - ... - -icon = Icon.create -ICON_ABSTRACT: List[str] -ICON_ALIGNS: List[str] -ICON_ARROWS: List[str] -ICON_BORDERS: List[str] -ICON_COMPONENTS: List[str] -ICON_DESIGN: List[str] -ICON_LOGOS: List[str] -ICON_MUSIC: List[str] -ICON_OBJECTS: List[str] -ICON_TYPOGRAPHY: List[str] -ICON_LIST: List[str] diff --git a/reflex/components/radix/themes/components/textfield.py b/reflex/components/radix/themes/components/textfield.py index 63d0bdfed..08ea90c19 100644 --- a/reflex/components/radix/themes/components/textfield.py +++ b/reflex/components/radix/themes/components/textfield.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" + from types import SimpleNamespace from typing import Any, Dict, Literal @@ -6,7 +7,7 @@ import reflex as rx from reflex.components import el from reflex.components.component import Component from reflex.components.core.debounce import DebounceInput -from reflex.components.radix.themes.components.icons import Icon +from reflex.components.lucide.icon import Icon from reflex.constants import EventTriggers from reflex.vars import Var diff --git a/reflex/components/radix/themes/components/textfield.pyi b/reflex/components/radix/themes/components/textfield.pyi index 4989626cf..b12e732ef 100644 --- a/reflex/components/radix/themes/components/textfield.pyi +++ b/reflex/components/radix/themes/components/textfield.pyi @@ -13,7 +13,7 @@ import reflex as rx from reflex.components import el from reflex.components.component import Component from reflex.components.core.debounce import DebounceInput -from reflex.components.radix.themes.components.icons import Icon +from reflex.components.lucide.icon import Icon from reflex.constants import EventTriggers from reflex.vars import Var from ..base import LiteralAccentColor, LiteralRadius, LiteralSize, RadixThemesComponent From 1e4b0a163ce7ba3a4f84b2ecd5188258aa185d46 Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Wed, 7 Feb 2024 17:52:09 +0000 Subject: [PATCH 11/68] Map Accordion color schemes to radix colors (#2511) --- .../components/radix/primitives/accordion.py | 148 ++++++------------ .../components/radix/primitives/accordion.pyi | 64 +++++++- 2 files changed, 108 insertions(+), 104 deletions(-) diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index aa012da00..00d674d73 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -6,9 +6,10 @@ from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.components.component import Component -from reflex.components.core import cond, match +from reflex.components.core import match from reflex.components.lucide.icon import Icon from reflex.components.radix.primitives.base import RadixPrimitiveComponent +from reflex.components.radix.themes.base import LiteralAccentColor from reflex.style import ( Style, convert_dict_to_style_and_format_emotion, @@ -43,9 +44,7 @@ def get_theme_accordion_root(variant: Var[str], color_scheme: Var[str]) -> BaseV convert_dict_to_style_and_format_emotion( { "border_radius": "6px", - "background_color": cond( - color_scheme == "primary", "var(--accent-3)", "var(--slate-3)" - ), + "background_color": f"var(--{color_scheme}-3)", "box_shadow": "0 2px 10px var(--black-a1)", } ), @@ -55,11 +54,7 @@ def get_theme_accordion_root(variant: Var[str], color_scheme: Var[str]) -> BaseV convert_dict_to_style_and_format_emotion( { "border_radius": "6px", - "border": cond( - color_scheme == "primary", - "1px solid var(--accent-6)", - "1px solid var(--slate-6)", - ), + "border": f"1px solid var(--{color_scheme}-6)", "box_shadow": "0 2px 10px var(--black-a1)", } ), @@ -69,14 +64,8 @@ def get_theme_accordion_root(variant: Var[str], color_scheme: Var[str]) -> BaseV convert_dict_to_style_and_format_emotion( { "border_radius": "6px", - "border": cond( - color_scheme == "primary", - "1px solid var(--accent-6)", - "1px solid var(--slate-6)", - ), - "background_color": cond( - color_scheme == "primary", "var(--accent-3)", "var(--slate-3)" - ), + "border": f"1px solid var(--{color_scheme}-6)", + "background_color": f"var(--{color_scheme}-3)", "box_shadow": "0 2px 10px var(--black-a1)", } ), @@ -94,9 +83,7 @@ def get_theme_accordion_root(variant: Var[str], color_scheme: Var[str]) -> BaseV convert_dict_to_style_and_format_emotion( { "border_radius": "6px", - "background_color": cond( - color_scheme == "primary", "var(--accent-9)", "var(--slate-9)" - ), + "background_color": f"var(--{color_scheme}-9)", "box_shadow": "0 2px 10px var(--black-a4)", } ) @@ -159,24 +146,12 @@ def get_theme_accordion_trigger(variant: str | Var, color_scheme: str | Var) -> "soft", convert_dict_to_style_and_format_emotion( { - "color": cond( - color_scheme == "primary", - "var(--accent-11)", - "var(--slate-11)", - ), + "color": f"var(--{color_scheme}-11)", "&:hover": { - "background_color": cond( - color_scheme == "primary", - "var(--accent-4)", - "var(--slate-4)", - ), + "background_color": f"var(--{color_scheme}-4)", }, "& > .AccordionChevron": { - "color": cond( - color_scheme == "primary", - "var(--accent-11)", - "var(--slate-11)", - ), + "color": f"var(--{color_scheme}-11)", "transition": f"transform {DEFAULT_ANIMATION_DURATION}ms cubic-bezier(0.87, 0, 0.13, 1)", }, "&[data-state='open'] > .AccordionChevron": { @@ -201,24 +176,12 @@ def get_theme_accordion_trigger(variant: str | Var, color_scheme: str | Var) -> "ghost", convert_dict_to_style_and_format_emotion( { - "color": cond( - color_scheme == "primary", - "var(--accent-11)", - "var(--slate-11)", - ), + "color": f"var(--{color_scheme}-11)", "&:hover": { - "background_color": cond( - color_scheme == "primary", - "var(--accent-4)", - "var(--slate-4)", - ), + "background_color": f"var(--{color_scheme}-4)", }, "& > .AccordionChevron": { - "color": cond( - color_scheme == "primary", - "var(--accent-11)", - "var(--slate-11)", - ), + "color": f"var(--{color_scheme}-11)", "transition": f"transform {DEFAULT_ANIMATION_DURATION}ms cubic-bezier(0.87, 0, 0.13, 1)", }, "&[data-state='open'] > .AccordionChevron": { @@ -240,27 +203,13 @@ def get_theme_accordion_trigger(variant: str | Var, color_scheme: str | Var) -> # defaults to classic convert_dict_to_style_and_format_emotion( { - "color": cond( - color_scheme == "primary", - "var(--accent-9-contrast)", - "var(--slate-9-contrast)", - ), - "box_shadow": cond( - color_scheme == "primary", - "0 1px 0 var(--accent-6)", - "0 1px 0 var(--slate-11)", - ), + "color": f"var(--{color_scheme}-9-contrast)", + "box_shadow": f"var(--{color_scheme}-11)", "&:hover": { - "background_color": cond( - color_scheme == "primary", "var(--accent-10)", "var(--slate-10)" - ), + "background_color": f"var(--{color_scheme}-10)", }, "& > .AccordionChevron": { - "color": cond( - color_scheme == "primary", - "var(--accent-9-contrast)", - "var(--slate-9-contrast)", - ), + "color": f"var(--{color_scheme}-9-contrast)", "transition": f"transform {DEFAULT_ANIMATION_DURATION}ms cubic-bezier(0.87, 0, 0.13, 1)", }, "&[data-state='open'] > .AccordionChevron": { @@ -300,11 +249,7 @@ def get_theme_accordion_content(variant: str | Var, color_scheme: str | Var) -> { "overflow": "hidden", "font_size": "10px", - "color": cond( - color_scheme == "primary", - "var(--accent-11)", - "var(--slate-11)", - ), + "color": f"var(--{color_scheme}-11)", "padding": "15px, 20px", "&[data-state='open']": { "animation": Var.create( @@ -327,31 +272,13 @@ def get_theme_accordion_content(variant: str | Var, color_scheme: str | Var) -> "font_size": "10px", "color": match( variant, - ( - "classic", - cond( - color_scheme == "primary", - "var(--accent-9-contrast)", - "var(--slate-9-contrast)", - ), - ), - cond( - color_scheme == "primary", "var(--accent-11)", "var(--slate-11)" - ), + ("classic", f"var(--{color_scheme}-9-contrast)"), + f"var(--{color_scheme}-11)", ), "background_color": match( variant, - ( - "classic", - cond( - color_scheme == "primary", - "var(--accent-9)", - "var(--slate-9)", - ), - ), - cond( - color_scheme == "primary", "var(--accent-3)", "var(--slate-3)" - ), + ("classic", f"var(--{color_scheme}-9)"), + f"var(--{color_scheme}-3)", ), "padding": "15px, 20px", "&[data-state='open']": { @@ -409,7 +336,7 @@ class AccordionRoot(AccordionComponent): variant: Var[LiteralAccordionRootVariant] = "classic" # type: ignore # The color scheme of the accordion. - color_scheme: Var[LiteralAccordionRootColorScheme] = "primary" # type: ignore + color_scheme: Var[LiteralAccentColor] # type: ignore # dynamic themes of the accordion generated at compile time. _dynamic_themes: Var[dict] @@ -430,11 +357,11 @@ class AccordionRoot(AccordionComponent): """ comp = super().create(*children, **props) - if not comp.color_scheme._var_state: # type: ignore + if comp.color_scheme is not None and not comp.color_scheme._var_state: # type: ignore # mark the vars of color string literals as strings so they can be formatted properly when performing a var operation. comp.color_scheme._var_is_string = True # type: ignore - if not comp.variant._var_state: # type: ignore + if comp.variant is not None and not comp.variant._var_state: # type: ignore # mark the vars of variant string literals as strings so they are formatted properly in the match condition. comp.variant._var_is_string = True # type: ignore @@ -449,14 +376,29 @@ class AccordionRoot(AccordionComponent): return {"css": self._dynamic_themes._merge(format_as_emotion(self.style))} # type: ignore def _apply_theme(self, theme: Component): + global_color_scheme = getattr(theme, "accent_color", None) + + if global_color_scheme is None and self.color_scheme is None: + raise ValueError( + "`color_scheme` cannot be None. Either set the `color_scheme` prop on the accordion " + "component or set the `accent_color` prop in your global theme." + ) + + # prepare the color_scheme var to be used in an f-string(strip off the wrapping curly brace) + color_scheme = Var.create( + self.color_scheme if self.color_scheme is not None else global_color_scheme + )._replace( # type: ignore + _var_is_string=False + ) + accordion_theme_root = get_theme_accordion_root( - variant=self.variant, color_scheme=self.color_scheme + variant=self.variant, color_scheme=color_scheme ) accordion_theme_content = get_theme_accordion_content( - variant=self.variant, color_scheme=self.color_scheme + variant=self.variant, color_scheme=color_scheme ) accordion_theme_trigger = get_theme_accordion_trigger( - variant=self.variant, color_scheme=self.color_scheme + variant=self.variant, color_scheme=color_scheme ) # extract var_data from dynamic themes. @@ -480,7 +422,9 @@ class AccordionRoot(AccordionComponent): ) def _get_imports(self): - return imports.merge_imports(super()._get_imports(), self._var_data.imports) + return imports.merge_imports( + super()._get_imports(), self._var_data.imports if self._var_data else {} + ) def get_event_triggers(self) -> Dict[str, Any]: """Get the events triggers signatures for the component. diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 56488e4b6..a7c88b001 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -10,9 +10,10 @@ from reflex.style import Style from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.components.component import Component -from reflex.components.core import cond, match +from reflex.components.core import match from reflex.components.lucide.icon import Icon from reflex.components.radix.primitives.base import RadixPrimitiveComponent +from reflex.components.radix.themes.base import LiteralAccentColor from reflex.style import ( Style, convert_dict_to_style_and_format_emotion, @@ -148,7 +149,66 @@ class AccordionRoot(AccordionComponent): ] ] = None, color_scheme: Optional[ - Union[Var[Literal["primary", "accent"]], Literal["primary", "accent"]] + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] ] = None, _dynamic_themes: Optional[Union[Var[dict], dict]] = None, _var_data: Optional[VarData] = None, From de6244483d97272290d841a00dbd9205f4964d29 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 7 Feb 2024 11:55:25 -0800 Subject: [PATCH 12/68] [REF-1743] Implement radix-native color mode switch and button (#2526) --- reflex/.templates/apps/blank/code/blank.py | 2 +- reflex/__init__.py | 6 +- reflex/__init__.pyi | 3 +- reflex/components/chakra/forms/__init__.py | 7 +- .../chakra/forms/colormodeswitch.py | 31 +- .../chakra/forms/colormodeswitch.pyi | 11 +- reflex/components/core/__init__.py | 2 +- reflex/components/core/cond.py | 18 + reflex/components/datadisplay/code.py | 3 +- reflex/components/datadisplay/code.pyi | 3 +- reflex/components/radix/themes/__init__.py | 1 + reflex/components/radix/themes/base.py | 18 + reflex/components/radix/themes/base.pyi | 72 +-- reflex/components/radix/themes/color_mode.py | 109 ++++ reflex/components/radix/themes/color_mode.pyi | 540 ++++++++++++++++++ reflex/style.py | 3 + 16 files changed, 712 insertions(+), 117 deletions(-) create mode 100644 reflex/components/radix/themes/color_mode.py create mode 100644 reflex/components/radix/themes/color_mode.pyi diff --git a/reflex/.templates/apps/blank/code/blank.py b/reflex/.templates/apps/blank/code/blank.py index 2d1f1b257..96e73e1af 100644 --- a/reflex/.templates/apps/blank/code/blank.py +++ b/reflex/.templates/apps/blank/code/blank.py @@ -15,7 +15,7 @@ class State(rx.State): def index() -> rx.Component: return rx.fragment( - rx.color_mode_button(rx.color_mode_icon(), float="right"), + rx.color_mode.button(rx.color_mode.icon(), float="right"), rx.vstack( rx.heading("Welcome to Reflex!", font_size="2em"), rx.box("Get started by editing ", rx.code(filename, font_size="1em")), diff --git a/reflex/__init__.py b/reflex/__init__.py index dbfa714ed..52b59f571 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -20,7 +20,7 @@ _ALL_COMPONENTS = [ "foreach", "html", "match", - # "color_mode_cond", + "color_mode_cond", "connection_banner", "connection_modal", "debounce_input", @@ -121,7 +121,7 @@ _MAPPING = { "reflex.components.el": ["el"], "reflex.components.lucide": ["lucide"], "reflex.components.next": ["next"], - "reflex.components.radix": ["radix"], + "reflex.components.radix": ["radix", "color_mode"], "reflex.components.recharts": ["recharts"], "reflex.components.moment.moment": ["MomentDelta"], "reflex.config": ["config", "Config", "DBConfig"], @@ -150,7 +150,7 @@ _MAPPING = { "reflex.page": ["page"], "reflex.route": ["route"], "reflex.state": ["state", "var", "Cookie", "LocalStorage", "State"], - "reflex.style": ["style", "color_mode", "toggle_color_mode"], + "reflex.style": ["style", "toggle_color_mode"], "reflex.testing": ["testing"], "reflex.utils": ["utils"], "reflex.vars": ["vars", "cached_var", "Var"], diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index 81557a034..977bcc698 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -12,6 +12,7 @@ from reflex.components import cond as cond from reflex.components import foreach as foreach from reflex.components import html as html from reflex.components import match as match +from reflex.components import color_mode_cond as color_mode_cond from reflex.components import connection_banner as connection_banner from reflex.components import connection_modal as connection_modal from reflex.components import debounce_input as debounce_input @@ -97,6 +98,7 @@ from reflex.components import el as el from reflex.components import lucide as lucide from reflex.components import next as next from reflex.components import radix as radix +from reflex.components.radix import color_mode as color_mode from reflex.components import recharts as recharts from reflex.components.moment.moment import MomentDelta as MomentDelta from reflex import config as config @@ -134,7 +136,6 @@ from reflex.state import Cookie as Cookie from reflex.state import LocalStorage as LocalStorage from reflex.state import State as State from reflex import style as style -from reflex.style import color_mode as color_mode from reflex.style import toggle_color_mode as toggle_color_mode from reflex import testing as testing from reflex import utils as utils diff --git a/reflex/components/chakra/forms/__init__.py b/reflex/components/chakra/forms/__init__.py index 56bf5b195..7bf225e35 100644 --- a/reflex/components/chakra/forms/__init__.py +++ b/reflex/components/chakra/forms/__init__.py @@ -7,7 +7,6 @@ from .colormodeswitch import ( ColorModeIcon, ColorModeScript, ColorModeSwitch, - color_mode_cond, ) from .date_picker import DatePicker from .date_time_picker import DateTimePicker @@ -47,8 +46,4 @@ from .switch import Switch from .textarea import TextArea from .time_picker import TimePicker -helpers = [ - "color_mode_cond", -] - -__all__ = [f for f in dir() if f[0].isupper()] + helpers # type: ignore +__all__ = [f for f in dir() if f[0].isupper()] # type: ignore diff --git a/reflex/components/chakra/forms/colormodeswitch.py b/reflex/components/chakra/forms/colormodeswitch.py index 10de7a5a2..b88e5895b 100644 --- a/reflex/components/chakra/forms/colormodeswitch.py +++ b/reflex/components/chakra/forms/colormodeswitch.py @@ -16,40 +16,19 @@ rx.text( """ from __future__ import annotations -from typing import Any - from reflex.components.chakra import ChakraComponent from reflex.components.chakra.media.icon import Icon -from reflex.components.component import BaseComponent, Component -from reflex.components.core.cond import Cond, cond -from reflex.style import color_mode, toggle_color_mode -from reflex.vars import Var +from reflex.components.component import BaseComponent +from reflex.components.core.cond import Cond, color_mode_cond +from reflex.style import LIGHT_COLOR_MODE, color_mode, toggle_color_mode from .button import Button from .switch import Switch -DEFAULT_COLOR_MODE: str = "light" DEFAULT_LIGHT_ICON: Icon = Icon.create(tag="sun") DEFAULT_DARK_ICON: Icon = Icon.create(tag="moon") -def color_mode_cond(light: Any, dark: Any = None) -> Var | Component: - """Create a component or Prop based on color_mode. - - Args: - light: The component or prop to render if color_mode is default - dark: The component or prop to render if color_mode is non-default - - Returns: - The conditional component or prop. - """ - return cond( - color_mode == DEFAULT_COLOR_MODE, - light, - dark, - ) - - class ColorModeIcon(Cond): """Displays the current color mode as an icon.""" @@ -90,7 +69,7 @@ class ColorModeSwitch(Switch): """ return Switch.create( *children, - is_checked=color_mode != DEFAULT_COLOR_MODE, + is_checked=color_mode != LIGHT_COLOR_MODE, on_change=toggle_color_mode, **props, ) @@ -121,4 +100,4 @@ class ColorModeScript(ChakraComponent): """Chakra color mode script.""" tag = "ColorModeScript" - initialColorMode = "light" + initialColorMode = LIGHT_COLOR_MODE diff --git a/reflex/components/chakra/forms/colormodeswitch.pyi b/reflex/components/chakra/forms/colormodeswitch.pyi index 77fcff291..be3700b00 100644 --- a/reflex/components/chakra/forms/colormodeswitch.pyi +++ b/reflex/components/chakra/forms/colormodeswitch.pyi @@ -7,22 +7,17 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from typing import Any from reflex.components.chakra import ChakraComponent from reflex.components.chakra.media.icon import Icon -from reflex.components.component import BaseComponent, Component -from reflex.components.core.cond import Cond, cond -from reflex.style import color_mode, toggle_color_mode -from reflex.vars import Var +from reflex.components.component import BaseComponent +from reflex.components.core.cond import Cond, color_mode_cond +from reflex.style import LIGHT_COLOR_MODE, color_mode, toggle_color_mode from .button import Button from .switch import Switch -DEFAULT_COLOR_MODE: str DEFAULT_LIGHT_ICON: Icon DEFAULT_DARK_ICON: Icon -def color_mode_cond(light: Any, dark: Any = None) -> Var | Component: ... - class ColorModeIcon(Cond): @overload @classmethod diff --git a/reflex/components/core/__init__.py b/reflex/components/core/__init__.py index a3b4a0d1f..b223771ed 100644 --- a/reflex/components/core/__init__.py +++ b/reflex/components/core/__init__.py @@ -3,7 +3,7 @@ from . import layout as layout from .banner import ConnectionBanner, ConnectionModal from .colors import color -from .cond import Cond, cond +from .cond import Cond, color_mode_cond, cond from .debounce import DebounceInput from .foreach import Foreach from .html import Html diff --git a/reflex/components/core/cond.py b/reflex/components/core/cond.py index b17ab5409..174664c9c 100644 --- a/reflex/components/core/cond.py +++ b/reflex/components/core/cond.py @@ -7,6 +7,7 @@ from reflex.components.base.fragment import Fragment from reflex.components.component import BaseComponent, Component, MemoizationLeaf from reflex.components.tags import CondTag, Tag from reflex.constants import Dirs +from reflex.style import LIGHT_COLOR_MODE, color_mode from reflex.utils import format, imports from reflex.vars import BaseVar, Var, VarData @@ -180,3 +181,20 @@ def cond(condition: Any, c1: Any, c2: Any = None): _var_full_name_needs_state_prefix=False, merge_var_data=VarData.merge(*var_datas), ) + + +def color_mode_cond(light: Any, dark: Any = None) -> Var | Component: + """Create a component or Prop based on color_mode. + + Args: + light: The component or prop to render if color_mode is default + dark: The component or prop to render if color_mode is non-default + + Returns: + The conditional component or prop. + """ + return cond( + color_mode == LIGHT_COLOR_MODE, + light, + dark, + ) diff --git a/reflex/components/datadisplay/code.py b/reflex/components/datadisplay/code.py index ec9633399..0ac0d4d27 100644 --- a/reflex/components/datadisplay/code.py +++ b/reflex/components/datadisplay/code.py @@ -2,10 +2,11 @@ import re from typing import Dict, Literal, Optional, Union -from reflex.components.chakra.forms import Button, color_mode_cond +from reflex.components.chakra.forms import Button from reflex.components.chakra.layout import Box from reflex.components.chakra.media import Icon from reflex.components.component import Component +from reflex.components.core.cond import color_mode_cond from reflex.event import set_clipboard from reflex.style import Style from reflex.utils import format, imports diff --git a/reflex/components/datadisplay/code.pyi b/reflex/components/datadisplay/code.pyi index e398da463..cdbf8454b 100644 --- a/reflex/components/datadisplay/code.pyi +++ b/reflex/components/datadisplay/code.pyi @@ -9,10 +9,11 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style import re from typing import Dict, Literal, Optional, Union -from reflex.components.chakra.forms import Button, color_mode_cond +from reflex.components.chakra.forms import Button from reflex.components.chakra.layout import Box from reflex.components.chakra.media import Icon from reflex.components.component import Component +from reflex.components.core.cond import color_mode_cond from reflex.event import set_clipboard from reflex.style import Style from reflex.utils import format, imports diff --git a/reflex/components/radix/themes/__init__.py b/reflex/components/radix/themes/__init__.py index ec02436b1..e1d39fb52 100644 --- a/reflex/components/radix/themes/__init__.py +++ b/reflex/components/radix/themes/__init__.py @@ -1,6 +1,7 @@ """Namespace for components provided by the @radix-ui/themes library.""" from .base import theme as theme from .base import theme_panel as theme_panel +from .color_mode import color_mode_var_and_namespace as color_mode from .components import * from .layout import * from .typography import * diff --git a/reflex/components/radix/themes/base.py b/reflex/components/radix/themes/base.py index 4754b147f..f412607aa 100644 --- a/reflex/components/radix/themes/base.py +++ b/reflex/components/radix/themes/base.py @@ -169,6 +169,24 @@ class Theme(RadixThemesComponent): # Scale of all theme items: "90%" | "95%" | "100%" | "105%" | "110%". Defaults to "100%" scaling: Var[LiteralScaling] + @classmethod + def create( + cls, *children, color_mode: LiteralAppearance | None = None, **props + ) -> Component: + """Create a new Radix Theme specification. + + Args: + *children: Child components. + color_mode: map to appearance prop. + **props: Component properties. + + Returns: + A new component instance. + """ + if color_mode is not None: + props["appearance"] = props.pop("color_mode") + return super().create(*children, **props) + def _get_imports(self) -> imports.ImportDict: return imports.merge_imports( super()._get_imports(), diff --git a/reflex/components/radix/themes/base.pyi b/reflex/components/radix/themes/base.pyi index b3a893b79..213afde02 100644 --- a/reflex/components/radix/themes/base.pyi +++ b/reflex/components/radix/themes/base.pyi @@ -335,69 +335,7 @@ class Theme(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, + color_mode: Optional[LiteralAppearance | None] = None, has_background: Optional[Union[Var[bool], bool]] = None, appearance: Optional[ Union[ @@ -542,15 +480,11 @@ class Theme(RadixThemesComponent): ] = None, **props ) -> "Theme": - """Create a new component instance. - - Will prepend "RadixThemes" to the component tag to avoid conflicts with - other UI libraries for common names, like Text and Button. + """Create a new Radix Theme specification. Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. + color_mode: map to appearance prop. has_background: Whether to apply the themes background color to the theme node. Defaults to True. appearance: Override light or dark mode theme: "inherit" | "light" | "dark". Defaults to "inherit". accent_color: The color used for default buttons, typography, backgrounds, etc diff --git a/reflex/components/radix/themes/color_mode.py b/reflex/components/radix/themes/color_mode.py new file mode 100644 index 000000000..b6b739870 --- /dev/null +++ b/reflex/components/radix/themes/color_mode.py @@ -0,0 +1,109 @@ +"""A switch component for toggling color_mode. + +To style components based on color mode, use style props with `color_mode_cond`: + +``` +rx.text( + "Hover over me", + _hover={ + "background": rx.color_mode_cond( + light="var(--accent-2)", + dark="var(--accent-4)", + ), + }, +) +``` +""" +from __future__ import annotations + +import dataclasses + +from reflex.components.component import BaseComponent +from reflex.components.core.cond import Cond, color_mode_cond +from reflex.components.lucide.icon import Icon +from reflex.style import LIGHT_COLOR_MODE, color_mode, toggle_color_mode +from reflex.vars import BaseVar + +from .components.button import Button +from .components.switch import Switch + +DEFAULT_LIGHT_ICON: Icon = Icon.create(tag="sun") +DEFAULT_DARK_ICON: Icon = Icon.create(tag="moon") + + +class ColorModeIcon(Cond): + """Displays the current color mode as an icon.""" + + @classmethod + def create( + cls, + light_component: BaseComponent | None = None, + dark_component: BaseComponent | None = None, + ): + """Create an icon component based on color_mode. + + Args: + light_component: the component to display when color mode is default + dark_component: the component to display when color mode is dark (non-default) + + Returns: + The conditionally rendered component + """ + return color_mode_cond( + light=light_component or DEFAULT_LIGHT_ICON, + dark=dark_component or DEFAULT_DARK_ICON, + ) + + +class ColorModeSwitch(Switch): + """Switch for toggling light / dark mode via toggle_color_mode.""" + + @classmethod + def create(cls, *children, **props): + """Create a switch component bound to color_mode. + + Args: + *children: The children of the component. + **props: The props to pass to the component. + + Returns: + The switch component. + """ + return Switch.create( + *children, + is_checked=color_mode != LIGHT_COLOR_MODE, + on_change=toggle_color_mode, + **props, + ) + + +class ColorModeButton(Button): + """Button for toggling chakra light / dark mode via toggle_color_mode.""" + + @classmethod + def create(cls, *children, **props): + """Create a button component that calls toggle_color_mode on click. + + Args: + *children: The children of the component. + **props: The props to pass to the component. + + Returns: + The button component. + """ + return Button.create( + *children, + on_click=toggle_color_mode, + **props, + ) + + +class ColorModeNamespace(BaseVar): + """Namespace for color mode components.""" + + icon = staticmethod(ColorModeIcon.create) + switch = staticmethod(ColorModeSwitch.create) + button = staticmethod(ColorModeButton.create) + + +color_mode_var_and_namespace = ColorModeNamespace(**dataclasses.asdict(color_mode)) diff --git a/reflex/components/radix/themes/color_mode.pyi b/reflex/components/radix/themes/color_mode.pyi new file mode 100644 index 000000000..50e4093c1 --- /dev/null +++ b/reflex/components/radix/themes/color_mode.pyi @@ -0,0 +1,540 @@ +"""Stub file for reflex/components/radix/themes/color_mode.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +import dataclasses +from reflex.components.component import BaseComponent +from reflex.components.core.cond import Cond, color_mode_cond +from reflex.components.lucide.icon import Icon +from reflex.style import LIGHT_COLOR_MODE, color_mode, toggle_color_mode +from reflex.vars import BaseVar +from .components.button import Button +from .components.switch import Switch + +DEFAULT_LIGHT_ICON: Icon +DEFAULT_DARK_ICON: Icon + +class ColorModeIcon(Cond): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + cond: Optional[Union[Var[Any], Any]] = None, + comp1: Optional[BaseComponent] = None, + comp2: Optional[BaseComponent] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ColorModeIcon": + """Create an icon component based on color_mode. + + Args: + light_component: the component to display when color mode is default + dark_component: the component to display when color mode is dark (non-default) + + Returns: + The conditionally rendered component + """ + ... + +class ColorModeSwitch(Switch): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + as_child: Optional[Union[Var[bool], bool]] = None, + default_checked: Optional[Union[Var[bool], bool]] = None, + checked: Optional[Union[Var[bool], bool]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + required: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + value: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + radius: Optional[ + Union[ + Var[Literal["none", "small", "medium", "large", "full"]], + Literal["none", "small", "medium", "large", "full"], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ColorModeSwitch": + """Create a switch component bound to color_mode. + + Args: + *children: The children of the component. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. + default_checked: Whether the switch is checked by default + checked: Whether the switch is checked + disabled: If true, prevent the user from interacting with the switch + required: If true, the user must interact with the switch to submit the form + name: The name of the switch (when submitting a form) + value: The value associated with the "on" position + size: Switch size "1" - "4" + variant: Variant of switch: "solid" | "soft" | "outline" | "ghost" + color_scheme: Override theme color for switch + high_contrast: Whether to render the switch with higher contrast color against background + radius: Override theme radius for switch: "none" | "small" | "medium" | "large" | "full" + style: Props to rename The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The props to pass to the component. + + Returns: + The switch component. + """ + ... + +class ColorModeButton(Button): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + radius: Optional[ + Union[ + Var[Literal["none", "small", "medium", "large", "full"]], + Literal["none", "small", "medium", "large", "full"], + ] + ] = None, + auto_focus: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + disabled: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + form_action: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_enc_type: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_method: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_no_validate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_target: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + value: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + translate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ColorModeButton": + """Create a button component that calls toggle_color_mode on click. + + Args: + *children: The children of the component. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. + size: Button size "1" - "4" + variant: Variant of button: "solid" | "soft" | "outline" | "ghost" + color_scheme: Override theme color for button + high_contrast: Whether to render the button with higher contrast color against background + radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full" + auto_focus: Automatically focuses the button when the page loads + disabled: Disables the button + form: Associates the button with a form (by id) + form_action: URL to send the form data to (for type="submit" buttons) + form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons) + form_method: HTTP method to use for sending form data (for type="submit" buttons) + form_no_validate: Bypasses form validation when submitting (for type="submit" buttons) + form_target: Specifies where to display the response after submitting the form (for type="submit" buttons) + name: Name of the button, used when sending form data + type: Type of the button (submit, reset, or button) + value: Value of the button, used when sending form data + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + translate: Specifies whether the content of an element should be translated or not. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The props to pass to the component. + + Returns: + The button component. + """ + ... + +class ColorModeNamespace(BaseVar): + icon = staticmethod(ColorModeIcon.create) + switch = staticmethod(ColorModeSwitch.create) + button = staticmethod(ColorModeButton.create) + +color_mode_var_and_namespace = ColorModeNamespace(**dataclasses.asdict(color_mode)) diff --git a/reflex/style.py b/reflex/style.py index accd25db4..700aceb74 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -12,6 +12,9 @@ from reflex.vars import BaseVar, Var, VarData VarData.update_forward_refs() # Ensure all type definitions are resolved +LIGHT_COLOR_MODE: str = "light" +DARK_COLOR_MODE: str = "dark" + # Reference the global ColorModeContext color_mode_var_data = VarData( # type: ignore imports={ From 88f0be004d964226d5025b32ddad0c34ef3e3d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 7 Feb 2024 21:29:29 +0100 Subject: [PATCH 13/68] ordered & unordered lists (#2537) --- reflex/__init__.py | 4 + reflex/__init__.pyi | 3 + .../radix/themes/layout/__init__.py | 7 + reflex/components/radix/themes/layout/list.py | 154 +++ .../components/radix/themes/layout/list.pyi | 1065 +++++++++++++++++ 5 files changed, 1233 insertions(+) create mode 100644 reflex/components/radix/themes/layout/list.py create mode 100644 reflex/components/radix/themes/layout/list.pyi diff --git a/reflex/__init__.py b/reflex/__init__.py index 52b59f571..956576ccf 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -4,6 +4,7 @@ Anything imported here will be available in the default Reflex import as `rx.*`. To signal to typecheckers that something should be reexported, we use the Flask "import name as name" syntax. """ + from __future__ import annotations import importlib @@ -107,6 +108,9 @@ _ALL_COMPONENTS = [ "EditorOptions", "icon", "markdown", + "list_item", + "unordered_list", + "ordered_list", ] _MAPPING = { diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index 977bcc698..8f66aeb85 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -90,6 +90,9 @@ from reflex.components import EditorButtonList as EditorButtonList from reflex.components import EditorOptions as EditorOptions from reflex.components import icon as icon from reflex.components import markdown as markdown +from reflex.components import list_item as list_item +from reflex.components import unordered_list as unordered_list +from reflex.components import ordered_list as ordered_list from reflex.components.component import Component as Component from reflex.components.component import NoSSRComponent as NoSSRComponent from reflex.components.component import memo as memo diff --git a/reflex/components/radix/themes/layout/__init__.py b/reflex/components/radix/themes/layout/__init__.py index c6201f30a..ccc0b6f4c 100644 --- a/reflex/components/radix/themes/layout/__init__.py +++ b/reflex/components/radix/themes/layout/__init__.py @@ -5,6 +5,7 @@ from .center import Center from .container import Container from .flex import Flex from .grid import Grid +from .list import ListItem, OrderedList, UnorderedList from .section import Section from .spacer import Spacer from .stack import HStack, Stack, VStack @@ -19,6 +20,9 @@ spacer = Spacer.create stack = Stack.create hstack = HStack.create vstack = VStack.create +list_item = ListItem.create +ordered_list = OrderedList.create +unordered_list = UnorderedList.create __all__ = [ "box", @@ -31,4 +35,7 @@ __all__ = [ "stack", "hstack", "vstack", + "list_item", + "ordered_list", + "unordered_list", ] diff --git a/reflex/components/radix/themes/layout/list.py b/reflex/components/radix/themes/layout/list.py new file mode 100644 index 000000000..69c95acbe --- /dev/null +++ b/reflex/components/radix/themes/layout/list.py @@ -0,0 +1,154 @@ +"""List components.""" + +from types import SimpleNamespace +from typing import Iterable, Literal, Optional, Union + +from reflex.components.component import Component +from reflex.components.core.foreach import Foreach +from reflex.components.el.elements.typography import Li +from reflex.style import Style +from reflex.vars import Var + +from .base import LayoutComponent +from .flex import Flex + +# from reflex.vars import Var + +# from reflex.components.radix.themes.layout import LayoutComponent + +LiteralListStyleTypeUnordered = Literal[ + "none", + "disc", + "circle", + "square", +] + +LiteralListStyleTypeOrdered = Literal[ + "none", + "decimal", + "decimal-leading-zero", + "lower-roman", + "upper-roman", + "lower-greek", + "lower-latin", + "upper-latin", + "armenian", + "georgian", + "lower-alpha", + "upper-alpha", + "hiragana", + "katakana", +] + + +class BaseList(Flex, LayoutComponent): + """Base class for ordered and unordered lists.""" + + @classmethod + def create( + cls, + *children, + items: Optional[Union[Var[Iterable], Iterable]] = None, + list_style_type: str = "", + **props, + ): + """Create a list component. + + Args: + *children: The children of the component. + items: A list of items to add to the list. + list_style_type: The style of the list. + **props: The properties of the component. + + Returns: + The list component. + """ + if not children and items is not None: + if isinstance(items, Var): + children = [Foreach.create(items, ListItem.create)] + else: + children = [ListItem.create(item) for item in items] + props["list_style_type"] = list_style_type + props["direction"] = "column" + style = props.setdefault("style", {}) + style["list_style_position"] = "outside" + if "gap" in props: + style["gap"] = props["gap"] + return super().create(*children, **props) + + def _apply_theme(self, theme: Component): + self.style = Style( + { + "direction": "column", + "list_style_position": "outside", + **self.style, + } + ) + + +class UnorderedList(BaseList): + """Display an unordered list.""" + + @classmethod + def create( + cls, + *children, + items: Optional[Var[Iterable]] = None, + list_style_type: LiteralListStyleTypeUnordered = "disc", + **props, + ): + """Create a unordered list component. + + Args: + *children: The children of the component. + items: A list of items to add to the list. + list_style_type: The style of the list. + **props: The properties of the component. + + Returns: + The list component. + """ + return super().create( + *children, items=items, list_style_type=list_style_type, **props + ) + + +class OrderedList(BaseList): + """Display an ordered list.""" + + @classmethod + def create( + cls, + *children, + items: Optional[Var[Iterable]] = None, + list_style_type: LiteralListStyleTypeOrdered = "decimal", + **props, + ): + """Create an ordered list component. + + Args: + *children: The children of the component. + items: A list of items to add to the list. + list_style_type: The style of the list. + **props: The properties of the component. + + Returns: + The list component. + """ + return super().create( + *children, items=items, list_style_type=list_style_type, **props + ) + + +class ListItem(Li): + """Display an item of an ordered or unordered list.""" + + ... + + +class List(SimpleNamespace): + """List components.""" + + item = ListItem.create + ordered = OrderedList.create + unordered = UnorderedList.create diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi new file mode 100644 index 000000000..708cf8fca --- /dev/null +++ b/reflex/components/radix/themes/layout/list.pyi @@ -0,0 +1,1065 @@ +"""Stub file for reflex/components/radix/themes/layout/list.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +from types import SimpleNamespace +from typing import Iterable, Literal, Optional, Union +from reflex.components.component import Component +from reflex.components.core.foreach import Foreach +from reflex.components.el.elements.typography import Li +from reflex.style import Style +from reflex.vars import Var +from .base import LayoutComponent +from .flex import Flex + +LiteralListStyleTypeUnordered = Literal["none", "disc", "circle", "square"] +LiteralListStyleTypeOrdered = Literal[ + "none", + "decimal", + "decimal-leading-zero", + "lower-roman", + "upper-roman", + "lower-greek", + "lower-latin", + "upper-latin", + "armenian", + "georgian", + "lower-alpha", + "upper-alpha", + "hiragana", + "katakana", +] + +class BaseList(Flex, LayoutComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + items: Optional[Union[Union[Var[Iterable], Iterable], Iterable]] = None, + list_style_type: Optional[str] = "", + as_child: Optional[Union[Var[bool], bool]] = None, + display: Optional[ + Union[ + Var[Literal["none", "inline-flex", "flex"]], + Literal["none", "inline-flex", "flex"], + ] + ] = None, + direction: Optional[ + Union[ + Var[Literal["row", "column", "row-reverse", "column-reverse"]], + Literal["row", "column", "row-reverse", "column-reverse"], + ] + ] = None, + align: Optional[ + Union[ + Var[Literal["start", "center", "end", "baseline", "stretch"]], + Literal["start", "center", "end", "baseline", "stretch"], + ] + ] = None, + justify: Optional[ + Union[ + Var[Literal["start", "center", "end", "between"]], + Literal["start", "center", "end", "between"], + ] + ] = None, + wrap: Optional[ + Union[ + Var[Literal["nowrap", "wrap", "wrap-reverse"]], + Literal["nowrap", "wrap", "wrap-reverse"], + ] + ] = None, + gap: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + translate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + p: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + px: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + py: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pt: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pr: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pb: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pl: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, + grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, + m: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mx: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + my: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mt: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mr: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mb: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + ml: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["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, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "BaseList": + """Create a list component. + + Args: + *children: The children of the component. + items: A list of items to add to the list. + list_style_type: The style of the list. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. + display: How to display the element: "none" | "inline-flex" | "flex" + direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" + justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" + wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" + gap: Gap between children: "0" - "9" + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + translate: Specifies whether the content of an element should be translated or not. + p: Padding: "0" - "9" + px: Padding horizontal: "0" - "9" + py: Padding vertical: "0" - "9" + pt: Padding top: "0" - "9" + pr: Padding right: "0" - "9" + pb: Padding bottom: "0" - "9" + pl: Padding left: "0" - "9" + shrink: Whether the element will take up the smallest possible space: "0" | "1" + grow: Whether the element will take up the largest possible space: "0" | "1" + m: Margin: "0" - "9" + mx: Margin horizontal: "0" - "9" + my: Margin vertical: "0" - "9" + mt: Margin top: "0" - "9" + mr: Margin right: "0" - "9" + mb: Margin bottom: "0" - "9" + ml: Margin left: "0" - "9" + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The list component. + """ + ... + +class UnorderedList(BaseList): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + items: Optional[Union[Var[Iterable], Iterable]] = None, + list_style_type: Optional[Literal["none", "disc", "circle", "square"]] = "disc", + as_child: Optional[Union[Var[bool], bool]] = None, + display: Optional[ + Union[ + Var[Literal["none", "inline-flex", "flex"]], + Literal["none", "inline-flex", "flex"], + ] + ] = None, + direction: Optional[ + Union[ + Var[Literal["row", "column", "row-reverse", "column-reverse"]], + Literal["row", "column", "row-reverse", "column-reverse"], + ] + ] = None, + align: Optional[ + Union[ + Var[Literal["start", "center", "end", "baseline", "stretch"]], + Literal["start", "center", "end", "baseline", "stretch"], + ] + ] = None, + justify: Optional[ + Union[ + Var[Literal["start", "center", "end", "between"]], + Literal["start", "center", "end", "between"], + ] + ] = None, + wrap: Optional[ + Union[ + Var[Literal["nowrap", "wrap", "wrap-reverse"]], + Literal["nowrap", "wrap", "wrap-reverse"], + ] + ] = None, + gap: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + translate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + p: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + px: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + py: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pt: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pr: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pb: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pl: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, + grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, + m: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mx: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + my: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mt: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mr: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mb: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + ml: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["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, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "UnorderedList": + """Create a unordered list component. + + Args: + *children: The children of the component. + items: A list of items to add to the list. + list_style_type: The style of the list. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. + display: How to display the element: "none" | "inline-flex" | "flex" + direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" + justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" + wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" + gap: Gap between children: "0" - "9" + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + translate: Specifies whether the content of an element should be translated or not. + p: Padding: "0" - "9" + px: Padding horizontal: "0" - "9" + py: Padding vertical: "0" - "9" + pt: Padding top: "0" - "9" + pr: Padding right: "0" - "9" + pb: Padding bottom: "0" - "9" + pl: Padding left: "0" - "9" + shrink: Whether the element will take up the smallest possible space: "0" | "1" + grow: Whether the element will take up the largest possible space: "0" | "1" + m: Margin: "0" - "9" + mx: Margin horizontal: "0" - "9" + my: Margin vertical: "0" - "9" + mt: Margin top: "0" - "9" + mr: Margin right: "0" - "9" + mb: Margin bottom: "0" - "9" + ml: Margin left: "0" - "9" + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The list component. + """ + ... + +class OrderedList(BaseList): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + items: Optional[Union[Var[Iterable], Iterable]] = None, + list_style_type: Optional[ + Literal[ + "none", + "decimal", + "decimal-leading-zero", + "lower-roman", + "upper-roman", + "lower-greek", + "lower-latin", + "upper-latin", + "armenian", + "georgian", + "lower-alpha", + "upper-alpha", + "hiragana", + "katakana", + ] + ] = "decimal", + as_child: Optional[Union[Var[bool], bool]] = None, + display: Optional[ + Union[ + Var[Literal["none", "inline-flex", "flex"]], + Literal["none", "inline-flex", "flex"], + ] + ] = None, + direction: Optional[ + Union[ + Var[Literal["row", "column", "row-reverse", "column-reverse"]], + Literal["row", "column", "row-reverse", "column-reverse"], + ] + ] = None, + align: Optional[ + Union[ + Var[Literal["start", "center", "end", "baseline", "stretch"]], + Literal["start", "center", "end", "baseline", "stretch"], + ] + ] = None, + justify: Optional[ + Union[ + Var[Literal["start", "center", "end", "between"]], + Literal["start", "center", "end", "between"], + ] + ] = None, + wrap: Optional[ + Union[ + Var[Literal["nowrap", "wrap", "wrap-reverse"]], + Literal["nowrap", "wrap", "wrap-reverse"], + ] + ] = None, + gap: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + translate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + p: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + px: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + py: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pt: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pr: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pb: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + pl: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, + grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, + m: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mx: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + my: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mt: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mr: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + mb: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + ml: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["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, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "OrderedList": + """Create an ordered list component. + + Args: + *children: The children of the component. + items: A list of items to add to the list. + list_style_type: The style of the list. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. + display: How to display the element: "none" | "inline-flex" | "flex" + direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" + justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" + wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" + gap: Gap between children: "0" - "9" + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + translate: Specifies whether the content of an element should be translated or not. + p: Padding: "0" - "9" + px: Padding horizontal: "0" - "9" + py: Padding vertical: "0" - "9" + pt: Padding top: "0" - "9" + pr: Padding right: "0" - "9" + pb: Padding bottom: "0" - "9" + pl: Padding left: "0" - "9" + shrink: Whether the element will take up the smallest possible space: "0" | "1" + grow: Whether the element will take up the largest possible space: "0" | "1" + m: Margin: "0" - "9" + mx: Margin horizontal: "0" - "9" + my: Margin vertical: "0" - "9" + mt: Margin top: "0" - "9" + mr: Margin right: "0" - "9" + mb: Margin bottom: "0" - "9" + ml: Margin left: "0" - "9" + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The list component. + """ + ... + +class ListItem(Li): + ... + + @overload + @classmethod + def create( # type: ignore + cls, + *children, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + translate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ListItem": + """Create the component. + + Args: + *children: The children of the component. + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + translate: Specifies whether the content of an element should be translated or not. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The props of the component. + + Returns: + The component. + + Raises: + TypeError: If an invalid child is passed. + """ + ... + +class List(SimpleNamespace): + item = ListItem.create + ordered = OrderedList.create + unordered = UnorderedList.create From c596651de67487575b9a7d5c06409369709df00d Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 8 Feb 2024 10:28:45 -0800 Subject: [PATCH 14/68] Fix pre-commit issues introduced from merging origin/main --- reflex/components/radix/themes/color_mode.pyi | 17 +++++++---------- .../radix/themes/components/radiogroup.pyi | 14 +------------- .../radix/themes/components/slider.py | 2 +- .../components/radix/themes/components/tabs.pyi | 4 ---- tests/components/test_component.py | 2 +- 5 files changed, 10 insertions(+), 29 deletions(-) diff --git a/reflex/components/radix/themes/color_mode.pyi b/reflex/components/radix/themes/color_mode.pyi index 50e4093c1..12f470cad 100644 --- a/reflex/components/radix/themes/color_mode.pyi +++ b/reflex/components/radix/themes/color_mode.pyi @@ -107,12 +107,12 @@ class ColorModeSwitch(Switch): name: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, size: Optional[ - Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] ] = None, variant: Optional[ Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], ] ] = None, color_scheme: Optional[ @@ -180,8 +180,7 @@ class ColorModeSwitch(Switch): high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ - Var[Literal["none", "small", "medium", "large", "full"]], - Literal["none", "small", "medium", "large", "full"], + Var[Literal["none", "small", "full"]], Literal["none", "small", "full"] ] ] = None, style: Optional[Style] = None, @@ -253,10 +252,10 @@ class ColorModeSwitch(Switch): name: The name of the switch (when submitting a form) value: The value associated with the "on" position size: Switch size "1" - "4" - variant: Variant of switch: "solid" | "soft" | "outline" | "ghost" + variant: Variant of switch: "classic" | "surface" | "soft" color_scheme: Override theme color for switch high_contrast: Whether to render the switch with higher contrast color against background - radius: Override theme radius for switch: "none" | "small" | "medium" | "large" | "full" + radius: Override theme radius for switch: "none" | "small" | "full" style: Props to rename The style of the component. key: A unique key for the component. id: The id for the component. @@ -359,9 +358,7 @@ class ColorModeButton(Button): auto_focus: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - disabled: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, + disabled: Optional[Union[Var[bool], bool]] = None, form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, form_action: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] diff --git a/reflex/components/radix/themes/components/radiogroup.pyi b/reflex/components/radix/themes/components/radiogroup.pyi index 2867655fe..3fbce8923 100644 --- a/reflex/components/radix/themes/components/radiogroup.pyi +++ b/reflex/components/radix/themes/components/radiogroup.pyi @@ -621,13 +621,6 @@ class RadioGroup(SimpleNamespace): disabled: Optional[Union[Var[bool], bool]] = None, name: Optional[Union[Var[str], str]] = None, required: Optional[Union[Var[bool], bool]] = None, - orientation: Optional[ - Union[ - Var[Literal["horizontal", "vertical"]], - Literal["horizontal", "vertical"], - ] - ] = None, - loop: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -638,9 +631,6 @@ class RadioGroup(SimpleNamespace): on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] ] = None, @@ -692,7 +682,7 @@ class RadioGroup(SimpleNamespace): items: The items of the radio group. direction: The direction of the radio group. gap: The gap between the items of the radio group. - size: The size of the radio group: "1" | "2" | "3" + size: The size of the radio group. variant: The variant of the radio group color_scheme: The color of the radio group high_contrast: Whether to render the radio group with higher contrast color against background @@ -701,8 +691,6 @@ class RadioGroup(SimpleNamespace): disabled: Whether the radio group is disabled name: The name of the group. Submitted with its owning form as part of a name/value pair. required: Whether the radio group is required - orientation: The orientation of the component. - loop: When true, keyboard navigation will loop from last item to first, and vice versa. style: Props to rename The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/slider.py b/reflex/components/radix/themes/components/slider.py index 238bc7385..7f40c8241 100644 --- a/reflex/components/radix/themes/components/slider.py +++ b/reflex/components/radix/themes/components/slider.py @@ -108,4 +108,4 @@ class Slider(RadixThemesComponent): return super().create(*children, default_value=default_value, **props) -slider = Slider.create \ No newline at end of file +slider = Slider.create diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi index fd25336ca..f3b635ec2 100644 --- a/reflex/components/radix/themes/components/tabs.pyi +++ b/reflex/components/radix/themes/components/tabs.pyi @@ -692,9 +692,6 @@ class Tabs(SimpleNamespace): ], ] ] = None, - variant: Optional[ - Union[Var[Literal["surface", "ghost"]], Literal["surface", "ghost"]] - ] = None, default_value: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, orientation: Optional[ @@ -769,7 +766,6 @@ class Tabs(SimpleNamespace): *children: Child components. color: map to CSS default color property. color_scheme: map to radix color property. - variant: The variant of the tab default_value: The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. value: The controlled value of the tab that should be active. Use when you need to control the state of the tabs. orientation: The orientation of the tabs. diff --git a/tests/components/test_component.py b/tests/components/test_component.py index 50243e51b..261c6de14 100644 --- a/tests/components/test_component.py +++ b/tests/components/test_component.py @@ -768,7 +768,7 @@ class EventState(rx.State): id="direct-prop", ), pytest.param( - rx.text(as_=f"foo{TEST_VAR}bar"), + rx.text(as_=f"foo{TEST_VAR}bar"), # type: ignore [FORMATTED_TEST_VAR], id="fstring-prop", ), From b60753131845f3e65722e2b4791d2ab8d70aabd5 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 8 Feb 2024 10:46:40 -0800 Subject: [PATCH 15/68] Unbreak tests after recent changes in main (p2) --- reflex/.templates/apps/sidebar/code/styles.py | 4 ++-- tests/components/layout/test_match.py | 2 +- tests/components/test_component.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reflex/.templates/apps/sidebar/code/styles.py b/reflex/.templates/apps/sidebar/code/styles.py index ca94b8dfd..15a144a78 100644 --- a/reflex/.templates/apps/sidebar/code/styles.py +++ b/reflex/.templates/apps/sidebar/code/styles.py @@ -36,12 +36,12 @@ overlapping_button_style = { } base_style = { - rx.MenuButton: { + rx.chakra.MenuButton: { "width": "3em", "height": "3em", **overlapping_button_style, }, - rx.MenuItem: hover_accent_bg, + rx.chakra.MenuItem: hover_accent_bg, } markdown_style = { diff --git a/tests/components/layout/test_match.py b/tests/components/layout/test_match.py index 4a1783024..b8be69721 100644 --- a/tests/components/layout/test_match.py +++ b/tests/components/layout/test_match.py @@ -260,7 +260,7 @@ def test_match_case_tuple_elements(match_case): ([1, 2], rx.text("third value")), rx.text("default value"), ), - "Match cases should have the same return types. Case 3 with return value ` {`first value`} ` " + "Match cases should have the same return types. Case 3 with return value ` {`first value`} ` " "of type is not ", ), ], diff --git a/tests/components/test_component.py b/tests/components/test_component.py index 261c6de14..b7783e0f8 100644 --- a/tests/components/test_component.py +++ b/tests/components/test_component.py @@ -627,7 +627,7 @@ def test_component_with_only_valid_children(fixture, request): @pytest.mark.parametrize( "component,rendered", [ - (rx.text("hi"), "\n {`hi`}\n"), + (rx.text("hi"), "\n {`hi`}\n"), ( rx.box(rx.chakra.heading("test", size="md")), "\n \n {`test`}\n\n", @@ -768,7 +768,7 @@ class EventState(rx.State): id="direct-prop", ), pytest.param( - rx.text(as_=f"foo{TEST_VAR}bar"), # type: ignore + rx.heading(as_=f"foo{TEST_VAR}bar"), [FORMATTED_TEST_VAR], id="fstring-prop", ), From 3619595bccec184a6512bae8c90fb6a6f03fccca Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 8 Feb 2024 12:50:07 -0800 Subject: [PATCH 16/68] Fixup import of ChakraComponent It is no longer exposed in rx.components namespace --- reflex/utils/prerequisites.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 909b31035..19ed398ec 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -998,7 +998,7 @@ def migrate_to_rx_chakra(): def _get_rx_chakra_component_to_migrate() -> set[str]: - from reflex.components import ChakraComponent + from reflex.components.chakra import ChakraComponent rx_chakra_names = set(dir(reflex.chakra)) From 78c54b34863e32b5b47058627c736eb430fcc1ac Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 8 Feb 2024 14:44:53 -0800 Subject: [PATCH 17/68] Use rx.el.img as rx.image (#2558) * Use rx.el.img as rx.image * Update test_image to work with plain rx.el.img --- reflex/components/__init__.py | 3 ++- reflex/components/el/elements/media.py | 6 ------ reflex/components/el/elements/media.pyi | 8 -------- tests/components/media/test_image.py | 5 ++++- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/reflex/components/__init__.py b/reflex/components/__init__.py index ca6c8b0cd..f136b2420 100644 --- a/reflex/components/__init__.py +++ b/reflex/components/__init__.py @@ -7,10 +7,11 @@ from .component import Component from .component import NoSSRComponent as NoSSRComponent from .core import * from .datadisplay import * +from .el import img as image from .gridjs import * from .markdown import * from .moment import * -from .next import NextLink, image, next_link +from .next import NextLink, next_link from .plotly import * from .radix import * from .react_player import * diff --git a/reflex/components/el/elements/media.py b/reflex/components/el/elements/media.py index c39401a88..464fe82d8 100644 --- a/reflex/components/el/elements/media.py +++ b/reflex/components/el/elements/media.py @@ -95,9 +95,6 @@ class Img(BaseHTML): # How the image should be decoded decoding: Var[Union[str, int, bool]] - # The intrinsic height of the image - height: Var[Union[str, int, bool]] - # Specifies an intrinsic size for the image intrinsicsize: Var[Union[str, int, bool]] @@ -122,9 +119,6 @@ class Img(BaseHTML): # The name of the map to use with the image use_map: Var[Union[str, int, bool]] - # The intrinsic width of the image - width: Var[Union[str, int, bool]] - class Map(BaseHTML): """Display the map element.""" diff --git a/reflex/components/el/elements/media.pyi b/reflex/components/el/elements/media.pyi index 13be5187d..cf4cbb1a4 100644 --- a/reflex/components/el/elements/media.pyi +++ b/reflex/components/el/elements/media.pyi @@ -376,9 +376,6 @@ class Img(BaseHTML): decoding: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - height: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, intrinsicsize: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -401,9 +398,6 @@ class Img(BaseHTML): use_map: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - width: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -510,7 +504,6 @@ class Img(BaseHTML): border: Border width around the image cross_origin: Configures the CORS requests for the image decoding: How the image should be decoded - height: The intrinsic height of the image intrinsicsize: Specifies an intrinsic size for the image ismap: Whether the image is a server-side image map loading: Specifies the loading behavior of the image @@ -519,7 +512,6 @@ class Img(BaseHTML): src: URL of the image to display src_set: A set of source sizes and URLs for responsive images use_map: The name of the map to use with the image - width: The intrinsic width of the image access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/tests/components/media/test_image.py b/tests/components/media/test_image.py index ace0c1f31..a39895c67 100644 --- a/tests/components/media/test_image.py +++ b/tests/components/media/test_image.py @@ -35,7 +35,10 @@ def test_serialize_image(pil_image: Img): def test_set_src_str(): """Test that setting the src works.""" image = rx.image(src="pic2.jpeg") - assert str(image.src) == "{`pic2.jpeg`}" # type: ignore + # when using next/image, we explicitly create a _var_is_str Var + # assert str(image.src) == "{`pic2.jpeg`}" # type: ignore + # For plain rx.el.img, an explicit var is not created, so the quoting happens later + assert str(image.src) == "pic2.jpeg" # type: ignore def test_set_src_img(pil_image: Img): From 3136a86e5887afa875f497fc01a0121d307ceb1b Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 9 Feb 2024 16:13:35 -0800 Subject: [PATCH 18/68] [REF-1921] Remove HTML attributes that shadow CSS props (#2566) --- reflex/components/core/html.pyi | 4 - reflex/components/el/elements/base.py | 3 - reflex/components/el/elements/base.pyi | 4 - reflex/components/el/elements/forms.py | 6 - reflex/components/el/elements/forms.pyi | 60 ---------- reflex/components/el/elements/inline.pyi | 112 ------------------ reflex/components/el/elements/media.py | 36 ------ reflex/components/el/elements/media.pyi | 104 ---------------- reflex/components/el/elements/metadata.pyi | 16 --- reflex/components/el/elements/other.pyi | 28 ----- reflex/components/el/elements/scripts.py | 6 - reflex/components/el/elements/scripts.pyi | 20 ---- reflex/components/el/elements/sectioning.py | 4 - reflex/components/el/elements/sectioning.pyi | 67 ----------- reflex/components/el/elements/tables.py | 36 ------ reflex/components/el/elements/tables.pyi | 88 -------------- reflex/components/el/elements/typography.py | 3 - reflex/components/el/elements/typography.pyi | 64 ---------- reflex/components/radix/themes/color_mode.pyi | 4 - .../radix/themes/components/alertdialog.pyi | 4 - .../radix/themes/components/badge.pyi | 4 - .../radix/themes/components/button.pyi | 4 - .../radix/themes/components/callout.pyi | 20 ---- .../radix/themes/components/card.pyi | 4 - .../radix/themes/components/dialog.pyi | 4 - .../radix/themes/components/hovercard.pyi | 4 - .../radix/themes/components/iconbutton.pyi | 4 - .../radix/themes/components/inset.pyi | 4 - .../radix/themes/components/popover.pyi | 4 - .../radix/themes/components/table.pyi | 72 ----------- .../radix/themes/components/textarea.pyi | 4 - .../radix/themes/components/textfield.pyi | 16 --- reflex/components/radix/themes/layout/box.pyi | 4 - .../components/radix/themes/layout/center.pyi | 4 - .../radix/themes/layout/container.pyi | 4 - .../components/radix/themes/layout/flex.pyi | 4 - .../components/radix/themes/layout/grid.pyi | 4 - .../components/radix/themes/layout/list.pyi | 16 --- .../radix/themes/layout/section.pyi | 4 - .../components/radix/themes/layout/spacer.pyi | 4 - .../components/radix/themes/layout/stack.pyi | 12 -- .../radix/themes/typography/blockquote.pyi | 4 - .../radix/themes/typography/code.pyi | 4 - .../components/radix/themes/typography/em.pyi | 4 - .../radix/themes/typography/heading.pyi | 4 - .../radix/themes/typography/kbd.pyi | 4 - .../radix/themes/typography/link.pyi | 4 - .../radix/themes/typography/quote.pyi | 4 - .../radix/themes/typography/strong.pyi | 4 - .../radix/themes/typography/text.pyi | 4 - 50 files changed, 905 deletions(-) diff --git a/reflex/components/core/html.pyi b/reflex/components/core/html.pyi index 48d6e37ed..f16001435 100644 --- a/reflex/components/core/html.pyi +++ b/reflex/components/core/html.pyi @@ -60,9 +60,6 @@ class Html(Div): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -138,7 +135,6 @@ class Html(Div): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/el/elements/base.py b/reflex/components/el/elements/base.py index 207f98007..fd2dc8cbb 100644 --- a/reflex/components/el/elements/base.py +++ b/reflex/components/el/elements/base.py @@ -55,6 +55,3 @@ class BaseHTML(Element): # Defines a tooltip for the element. title: Var[Union[str, int, bool]] - - # Specifies whether the content of an element should be translated or not. - translate: Var[Union[str, int, bool]] diff --git a/reflex/components/el/elements/base.pyi b/reflex/components/el/elements/base.pyi index 6920c274d..cdd2a8af4 100644 --- a/reflex/components/el/elements/base.pyi +++ b/reflex/components/el/elements/base.pyi @@ -57,9 +57,6 @@ class BaseHTML(Element): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -134,7 +131,6 @@ class BaseHTML(Element): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/el/elements/forms.py b/reflex/components/el/elements/forms.py index 8be9a5c89..141181732 100644 --- a/reflex/components/el/elements/forms.py +++ b/reflex/components/el/elements/forms.py @@ -149,9 +149,6 @@ class Input(BaseHTML): # Specifies where to display the response after submitting the form (for type="submit" buttons) form_target: Var[Union[str, int, bool]] - # The height of the input (only for type="image") - height: Var[Union[str, int, bool]] - # References a datalist for suggested options list: Var[Union[str, int, bool]] @@ -203,9 +200,6 @@ class Input(BaseHTML): # Value of the input value: Var[Union[str, int, bool]] - # The width of the input (only for type="image") - width: Var[Union[str, int, bool]] - def get_event_triggers(self) -> Dict[str, Any]: """Get the event triggers that pass the component's value to the handler. diff --git a/reflex/components/el/elements/forms.pyi b/reflex/components/el/elements/forms.pyi index 054c3b7e9..402f22550 100644 --- a/reflex/components/el/elements/forms.pyi +++ b/reflex/components/el/elements/forms.pyi @@ -84,9 +84,6 @@ class Button(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -172,7 +169,6 @@ class Button(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -236,9 +232,6 @@ class Datalist(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -313,7 +306,6 @@ class Datalist(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -491,9 +483,6 @@ class Form(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -577,7 +566,6 @@ class Form(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -640,9 +628,6 @@ class Input(BaseHTML): form_target: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - height: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, list: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, max: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, max_length: Optional[ @@ -678,9 +663,6 @@ class Input(BaseHTML): value: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - width: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -721,9 +703,6 @@ class Input(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -805,7 +784,6 @@ class Input(BaseHTML): form_method: HTTP method to use for sending form data (for type="submit" buttons) form_no_validate: Bypasses form validation when submitting (for type="submit" buttons) form_target: Specifies where to display the response after submitting the form (for type="submit" buttons) - height: The height of the input (only for type="image") list: References a datalist for suggested options max: Specifies the maximum value for the input max_length: Specifies the maximum number of characters allowed in the input @@ -823,7 +801,6 @@ class Input(BaseHTML): type: Specifies the type of input use_map: Name of the image map used with the input value: Value of the input - width: The width of the input (only for type="image") access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -840,7 +817,6 @@ class Input(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -908,9 +884,6 @@ class Label(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -987,7 +960,6 @@ class Label(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1051,9 +1023,6 @@ class Legend(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1128,7 +1097,6 @@ class Legend(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1203,9 +1171,6 @@ class Meter(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1287,7 +1252,6 @@ class Meter(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1357,9 +1321,6 @@ class Optgroup(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1436,7 +1397,6 @@ class Optgroup(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1512,9 +1472,6 @@ class Option(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1593,7 +1550,6 @@ class Option(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1662,9 +1618,6 @@ class Output(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1742,7 +1695,6 @@ class Output(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1811,9 +1763,6 @@ class Progress(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1891,7 +1840,6 @@ class Progress(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1974,9 +1922,6 @@ class Select(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2062,7 +2007,6 @@ class Select(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2162,9 +2106,6 @@ class Textarea(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2263,7 +2204,6 @@ class Textarea(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/el/elements/inline.pyi b/reflex/components/el/elements/inline.pyi index 598d3cd93..ffb1daf90 100644 --- a/reflex/components/el/elements/inline.pyi +++ b/reflex/components/el/elements/inline.pyi @@ -78,9 +78,6 @@ class A(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -164,7 +161,6 @@ class A(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -228,9 +224,6 @@ class Abbr(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -305,7 +298,6 @@ class Abbr(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -369,9 +361,6 @@ class B(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -446,7 +435,6 @@ class B(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -510,9 +498,6 @@ class Bdi(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -587,7 +572,6 @@ class Bdi(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -651,9 +635,6 @@ class Bdo(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -728,7 +709,6 @@ class Bdo(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -792,9 +772,6 @@ class Br(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -869,7 +846,6 @@ class Br(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -933,9 +909,6 @@ class Cite(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1010,7 +983,6 @@ class Cite(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1074,9 +1046,6 @@ class Code(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1151,7 +1120,6 @@ class Code(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1218,9 +1186,6 @@ class Data(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1296,7 +1261,6 @@ class Data(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1360,9 +1324,6 @@ class Dfn(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1437,7 +1398,6 @@ class Dfn(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1501,9 +1461,6 @@ class Em(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1578,7 +1535,6 @@ class Em(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1642,9 +1598,6 @@ class I(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1719,7 +1672,6 @@ class I(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1783,9 +1735,6 @@ class Kbd(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1860,7 +1809,6 @@ class Kbd(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1924,9 +1872,6 @@ class Mark(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2001,7 +1946,6 @@ class Mark(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2066,9 +2010,6 @@ class Q(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2144,7 +2085,6 @@ class Q(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2208,9 +2148,6 @@ class Rp(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2285,7 +2222,6 @@ class Rp(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2349,9 +2285,6 @@ class Rt(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2426,7 +2359,6 @@ class Rt(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2490,9 +2422,6 @@ class Ruby(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2567,7 +2496,6 @@ class Ruby(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2631,9 +2559,6 @@ class S(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2708,7 +2633,6 @@ class S(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2772,9 +2696,6 @@ class Samp(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2849,7 +2770,6 @@ class Samp(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2913,9 +2833,6 @@ class Small(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2990,7 +2907,6 @@ class Small(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -3054,9 +2970,6 @@ class Span(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -3131,7 +3044,6 @@ class Span(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -3195,9 +3107,6 @@ class Strong(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -3272,7 +3181,6 @@ class Strong(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -3336,9 +3244,6 @@ class Sub(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -3413,7 +3318,6 @@ class Sub(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -3477,9 +3381,6 @@ class Sup(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -3554,7 +3455,6 @@ class Sup(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -3621,9 +3521,6 @@ class Time(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -3699,7 +3596,6 @@ class Time(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -3763,9 +3659,6 @@ class U(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -3840,7 +3733,6 @@ class U(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -3904,9 +3796,6 @@ class Wbr(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -3981,7 +3870,6 @@ class Wbr(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/el/elements/media.py b/reflex/components/el/elements/media.py index 464fe82d8..787404ceb 100644 --- a/reflex/components/el/elements/media.py +++ b/reflex/components/el/elements/media.py @@ -86,9 +86,6 @@ class Img(BaseHTML): # Alternative text for the image alt: Var[Union[str, int, bool]] - # Border width around the image - border: Var[Union[str, int, bool]] - # Configures the CORS requests for the image cross_origin: Var[Union[str, int, bool]] @@ -167,9 +164,6 @@ class Video(BaseHTML): # Configures the CORS requests for the video cross_origin: Var[Union[str, int, bool]] - # The intrinsic height of the video - height: Var[Union[str, int, bool]] - # Specifies that the video will loop loop: Var[Union[str, int, bool]] @@ -188,27 +182,18 @@ class Video(BaseHTML): # URL of the video to play src: Var[Union[str, int, bool]] - # The intrinsic width of the video - width: Var[Union[str, int, bool]] - class Embed(BaseHTML): """Display the embed element.""" tag = "embed" - # The intrinsic height of the embedded content - height: Var[Union[str, int, bool]] - # URL of the embedded content src: Var[Union[str, int, bool]] # Media type of the embedded content type: Var[Union[str, int, bool]] - # The intrinsic width of the embedded content - width: Var[Union[str, int, bool]] - class Iframe(BaseHTML): """Display the iframe element.""" @@ -224,9 +209,6 @@ class Iframe(BaseHTML): # Content Security Policy to apply to the iframe's content csp: Var[Union[str, int, bool]] - # The height of the iframe - height: Var[Union[str, int, bool]] - # Specifies the loading behavior of the iframe loading: Var[Union[str, int, bool]] @@ -245,27 +227,18 @@ class Iframe(BaseHTML): # HTML content to embed directly within the iframe src_doc: Var[Union[str, int, bool]] - # The width of the iframe - width: Var[Union[str, int, bool]] - class Object(BaseHTML): """Display the object element.""" tag = "object" - # Border width around the object - border: Var[Union[str, int, bool]] - # URL of the data to be used by the object data: Var[Union[str, int, bool]] # Associates the object with a form element form: Var[Union[str, int, bool]] - # The intrinsic height of the object - height: Var[Union[str, int, bool]] - # Name of the object, used for scripting or as a target for forms and links name: Var[Union[str, int, bool]] @@ -275,9 +248,6 @@ class Object(BaseHTML): # Name of an image map to use with the object use_map: Var[Union[str, int, bool]] - # The intrinsic width of the object - width: Var[Union[str, int, bool]] - class Picture(BaseHTML): """Display the picture element.""" @@ -319,12 +289,6 @@ class Svg(BaseHTML): tag = "svg" - # Specifies the width of the element - width: Var[Union[str, int, bool]] - - # Specifies the height of the element - height: Var[Union[str, int, bool]] - class Path(BaseHTML): """Display the path element.""" diff --git a/reflex/components/el/elements/media.pyi b/reflex/components/el/elements/media.pyi index cf4cbb1a4..f6479bef1 100644 --- a/reflex/components/el/elements/media.pyi +++ b/reflex/components/el/elements/media.pyi @@ -82,9 +82,6 @@ class Area(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -170,7 +167,6 @@ class Area(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -254,9 +250,6 @@ class Audio(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -339,7 +332,6 @@ class Audio(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -367,9 +359,6 @@ class Img(BaseHTML): Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, alt: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, - border: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, cross_origin: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -438,9 +427,6 @@ class Img(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -501,7 +487,6 @@ class Img(BaseHTML): *children: The children of the component. align: Image alignment with respect to its surrounding elements alt: Alternative text for the image - border: Border width around the image cross_origin: Configures the CORS requests for the image decoding: How the image should be decoded intrinsicsize: Specifies an intrinsic size for the image @@ -528,7 +513,6 @@ class Img(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -593,9 +577,6 @@ class Map(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -671,7 +652,6 @@ class Map(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -746,9 +726,6 @@ class Track(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -828,7 +805,6 @@ class Track(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -864,9 +840,6 @@ class Video(BaseHTML): cross_origin: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - height: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, loop: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, muted: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -881,9 +854,6 @@ class Video(BaseHTML): Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, - width: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -924,9 +894,6 @@ class Video(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -989,14 +956,12 @@ class Video(BaseHTML): buffered: Represents the time range of the buffered media controls: Displays the standard video controls cross_origin: Configures the CORS requests for the video - height: The intrinsic height of the video loop: Specifies that the video will loop muted: Indicates whether the video is muted by default plays_inline: Indicates that the video should play 'inline', inside its element's playback area poster: URL of an image to show while the video is downloading, or until the user hits the play button preload: Specifies how the video file should be preloaded src: URL of the video to play - width: The intrinsic width of the video access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -1013,7 +978,6 @@ class Video(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1037,14 +1001,8 @@ class Embed(BaseHTML): def create( # type: ignore cls, *children, - height: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, - width: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1085,9 +1043,6 @@ class Embed(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1146,10 +1101,8 @@ class Embed(BaseHTML): Args: *children: The children of the component. - height: The intrinsic height of the embedded content src: URL of the embedded content type: Media type of the embedded content - width: The intrinsic width of the embedded content access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -1166,7 +1119,6 @@ class Embed(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1197,9 +1149,6 @@ class Iframe(BaseHTML): Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, csp: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, - height: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, loading: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1214,9 +1163,6 @@ class Iframe(BaseHTML): src_doc: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - width: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1257,9 +1203,6 @@ class Iframe(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1321,14 +1264,12 @@ class Iframe(BaseHTML): align: Alignment of the iframe within the page or surrounding elements allow: Permissions policy for the iframe csp: Content Security Policy to apply to the iframe's content - height: The height of the iframe loading: Specifies the loading behavior of the iframe name: Name of the iframe, used as a target for hyperlinks and forms referrer_policy: Referrer policy for the iframe sandbox: Security restrictions for the content in the iframe src: URL of the document to display in the iframe src_doc: HTML content to embed directly within the iframe - width: The width of the iframe access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -1345,7 +1286,6 @@ class Iframe(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1369,22 +1309,13 @@ class Object(BaseHTML): def create( # type: ignore cls, *children, - border: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, data: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, - height: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, use_map: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - width: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1425,9 +1356,6 @@ class Object(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1486,14 +1414,11 @@ class Object(BaseHTML): Args: *children: The children of the component. - border: Border width around the object data: URL of the data to be used by the object form: Associates the object with a form element - height: The intrinsic height of the object name: Name of the object, used for scripting or as a target for forms and links type: Media type of the data specified in the data attribute use_map: Name of an image map to use with the object - width: The intrinsic width of the object access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -1510,7 +1435,6 @@ class Object(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1574,9 +1498,6 @@ class Picture(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1651,7 +1572,6 @@ class Picture(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1715,9 +1635,6 @@ class Portal(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1792,7 +1709,6 @@ class Portal(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1867,9 +1783,6 @@ class Source(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1949,7 +1862,6 @@ class Source(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1973,12 +1885,6 @@ class Svg(BaseHTML): def create( # type: ignore cls, *children, - width: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - height: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -2019,9 +1925,6 @@ class Svg(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2080,8 +1983,6 @@ class Svg(BaseHTML): Args: *children: The children of the component. - width: Specifies the width of the element - height: Specifies the height of the element access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -2098,7 +1999,6 @@ class Svg(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2163,9 +2063,6 @@ class Path(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2241,7 +2138,6 @@ class Path(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/el/elements/metadata.pyi b/reflex/components/el/elements/metadata.pyi index 0b8c11898..9bfb237b2 100644 --- a/reflex/components/el/elements/metadata.pyi +++ b/reflex/components/el/elements/metadata.pyi @@ -62,9 +62,6 @@ class Base(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -139,7 +136,6 @@ class Base(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -203,9 +199,6 @@ class Head(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -280,7 +273,6 @@ class Head(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -365,9 +357,6 @@ class Link(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -442,7 +431,6 @@ class Link(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -516,9 +504,6 @@ class Meta(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -593,7 +578,6 @@ class Meta(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/el/elements/other.pyi b/reflex/components/el/elements/other.pyi index 4f3dc0337..3753d7926 100644 --- a/reflex/components/el/elements/other.pyi +++ b/reflex/components/el/elements/other.pyi @@ -58,9 +58,6 @@ class Details(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -136,7 +133,6 @@ class Details(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -201,9 +197,6 @@ class Dialog(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -279,7 +272,6 @@ class Dialog(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -343,9 +335,6 @@ class Summary(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -420,7 +409,6 @@ class Summary(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -484,9 +472,6 @@ class Slot(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -561,7 +546,6 @@ class Slot(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -625,9 +609,6 @@ class Template(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -702,7 +683,6 @@ class Template(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -766,9 +746,6 @@ class Math(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -843,7 +820,6 @@ class Math(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -910,9 +886,6 @@ class Html(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -988,7 +961,6 @@ class Html(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/el/elements/scripts.py b/reflex/components/el/elements/scripts.py index 0eefa43ab..a37a32494 100644 --- a/reflex/components/el/elements/scripts.py +++ b/reflex/components/el/elements/scripts.py @@ -11,12 +11,6 @@ class Canvas(BaseHTML): tag = "canvas" - # The height of the canvas in CSS pixels - height: Var[Union[str, int, bool]] - - # The width of the canvas in CSS pixels - width: Var[Union[str, int, bool]] - class Noscript(BaseHTML): """Display the noscript element.""" diff --git a/reflex/components/el/elements/scripts.pyi b/reflex/components/el/elements/scripts.pyi index 9c5a0233b..5d9f57a0c 100644 --- a/reflex/components/el/elements/scripts.pyi +++ b/reflex/components/el/elements/scripts.pyi @@ -17,12 +17,6 @@ class Canvas(BaseHTML): def create( # type: ignore cls, *children, - height: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - width: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -63,9 +57,6 @@ class Canvas(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -124,8 +115,6 @@ class Canvas(BaseHTML): Args: *children: The children of the component. - height: The height of the canvas in CSS pixels - width: The width of the canvas in CSS pixels access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -142,7 +131,6 @@ class Canvas(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -206,9 +194,6 @@ class Noscript(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -283,7 +268,6 @@ class Noscript(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -370,9 +354,6 @@ class Script(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -456,7 +437,6 @@ class Script(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/el/elements/sectioning.py b/reflex/components/el/elements/sectioning.py index 140a661bb..ce3549573 100644 --- a/reflex/components/el/elements/sectioning.py +++ b/reflex/components/el/elements/sectioning.py @@ -1,5 +1,4 @@ """Element classes. This is an auto-generated file. Do not edit. See ../generate.py.""" -from typing import Union from reflex.vars import Var as Var @@ -11,9 +10,6 @@ class Body(BaseHTML): # noqa: E742 tag = "body" - bgcolor: Var[Union[str, int, bool]] - background: Var[Union[str, int, bool]] - class Address(BaseHTML): # noqa: E742 """Display the address element.""" diff --git a/reflex/components/el/elements/sectioning.pyi b/reflex/components/el/elements/sectioning.pyi index ad9b4afee..69e984532 100644 --- a/reflex/components/el/elements/sectioning.pyi +++ b/reflex/components/el/elements/sectioning.pyi @@ -7,7 +7,6 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from typing import Union from reflex.vars import Var as Var from .base import BaseHTML @@ -17,12 +16,6 @@ class Body(BaseHTML): def create( # type: ignore cls, *children, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - background: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -63,9 +56,6 @@ class Body(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -140,7 +130,6 @@ class Body(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -204,9 +193,6 @@ class Address(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -281,7 +267,6 @@ class Address(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -345,9 +330,6 @@ class Article(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -422,7 +404,6 @@ class Article(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -486,9 +467,6 @@ class Aside(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -563,7 +541,6 @@ class Aside(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -627,9 +604,6 @@ class Footer(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -704,7 +678,6 @@ class Footer(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -768,9 +741,6 @@ class Header(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -845,7 +815,6 @@ class Header(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -909,9 +878,6 @@ class H1(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -986,7 +952,6 @@ class H1(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1050,9 +1015,6 @@ class H2(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1127,7 +1089,6 @@ class H2(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1191,9 +1152,6 @@ class H3(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1268,7 +1226,6 @@ class H3(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1332,9 +1289,6 @@ class H4(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1409,7 +1363,6 @@ class H4(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1473,9 +1426,6 @@ class H5(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1550,7 +1500,6 @@ class H5(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1614,9 +1563,6 @@ class H6(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1691,7 +1637,6 @@ class H6(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1755,9 +1700,6 @@ class Main(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1832,7 +1774,6 @@ class Main(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1896,9 +1837,6 @@ class Nav(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1973,7 +1911,6 @@ class Nav(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2037,9 +1974,6 @@ class Section(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2114,7 +2048,6 @@ class Section(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/el/elements/tables.py b/reflex/components/el/elements/tables.py index 49fbb6452..1277e1bea 100644 --- a/reflex/components/el/elements/tables.py +++ b/reflex/components/el/elements/tables.py @@ -23,9 +23,6 @@ class Col(BaseHTML): # Alignment of the content within the column align: Var[Union[str, int, bool]] - # Background color of the column - bgcolor: Var[Union[str, int, bool]] - # Number of columns the col element spans span: Var[Union[str, int, bool]] @@ -38,9 +35,6 @@ class Colgroup(BaseHTML): # Alignment of the content within the column group align: Var[Union[str, int, bool]] - # Background color of the column group - bgcolor: Var[Union[str, int, bool]] - # Number of columns the colgroup element spans span: Var[Union[str, int, bool]] @@ -53,15 +47,6 @@ class Table(BaseHTML): # Alignment of the table align: Var[Union[str, int, bool]] - # Background image for the table - background: Var[Union[str, int, bool]] - - # Background color of the table - bgcolor: Var[Union[str, int, bool]] - - # Specifies the width of the border around the table - border: Var[Union[str, int, bool]] - # Provides a summary of the table's purpose and structure summary: Var[Union[str, int, bool]] @@ -74,9 +59,6 @@ class Tbody(BaseHTML): # Alignment of the content within the table body align: Var[Union[str, int, bool]] - # Background color of the table body - bgcolor: Var[Union[str, int, bool]] - class Td(BaseHTML): """Display the td element.""" @@ -86,12 +68,6 @@ class Td(BaseHTML): # Alignment of the content within the table cell align: Var[Union[str, int, bool]] - # Background image for the table cell - background: Var[Union[str, int, bool]] - - # Background color of the table cell - bgcolor: Var[Union[str, int, bool]] - # Number of columns a cell should span col_span: Var[Union[str, int, bool]] @@ -110,9 +86,6 @@ class Tfoot(BaseHTML): # Alignment of the content within the table footer align: Var[Union[str, int, bool]] - # Background color of the table footer - bgcolor: Var[Union[str, int, bool]] - class Th(BaseHTML): """Display the th element.""" @@ -122,12 +95,6 @@ class Th(BaseHTML): # Alignment of the content within the table header cell align: Var[Union[str, int, bool]] - # Background image for the table header cell - background: Var[Union[str, int, bool]] - - # Background color of the table header cell - bgcolor: Var[Union[str, int, bool]] - # Number of columns a header cell should span col_span: Var[Union[str, int, bool]] @@ -157,6 +124,3 @@ class Tr(BaseHTML): # Alignment of the content within the table row align: Var[Union[str, int, bool]] - - # Background color of the table row - bgcolor: Var[Union[str, int, bool]] diff --git a/reflex/components/el/elements/tables.pyi b/reflex/components/el/elements/tables.pyi index d07b77978..a01095c53 100644 --- a/reflex/components/el/elements/tables.pyi +++ b/reflex/components/el/elements/tables.pyi @@ -60,9 +60,6 @@ class Caption(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -138,7 +135,6 @@ class Caption(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -165,9 +161,6 @@ class Col(BaseHTML): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, span: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -209,9 +202,6 @@ class Col(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -271,7 +261,6 @@ class Col(BaseHTML): Args: *children: The children of the component. align: Alignment of the content within the column - bgcolor: Background color of the column span: Number of columns the col element spans access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -289,7 +278,6 @@ class Col(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -316,9 +304,6 @@ class Colgroup(BaseHTML): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, span: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -360,9 +345,6 @@ class Colgroup(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -422,7 +404,6 @@ class Colgroup(BaseHTML): Args: *children: The children of the component. align: Alignment of the content within the column group - bgcolor: Background color of the column group span: Number of columns the colgroup element spans access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -440,7 +421,6 @@ class Colgroup(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -467,15 +447,6 @@ class Table(BaseHTML): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - background: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - border: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, summary: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -519,9 +490,6 @@ class Table(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -581,9 +549,6 @@ class Table(BaseHTML): Args: *children: The children of the component. align: Alignment of the table - background: Background image for the table - bgcolor: Background color of the table - border: Specifies the width of the border around the table summary: Provides a summary of the table's purpose and structure access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -601,7 +566,6 @@ class Table(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -628,9 +592,6 @@ class Tbody(BaseHTML): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -671,9 +632,6 @@ class Tbody(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -733,7 +691,6 @@ class Tbody(BaseHTML): Args: *children: The children of the component. align: Alignment of the content within the table body - bgcolor: Background color of the table body access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -750,7 +707,6 @@ class Tbody(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -777,12 +733,6 @@ class Td(BaseHTML): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - background: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, col_span: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -832,9 +782,6 @@ class Td(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -894,8 +841,6 @@ class Td(BaseHTML): Args: *children: The children of the component. align: Alignment of the content within the table cell - background: Background image for the table cell - bgcolor: Background color of the table cell col_span: Number of columns a cell should span headers: IDs of the headers associated with this cell row_span: Number of rows a cell should span @@ -915,7 +860,6 @@ class Td(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -942,9 +886,6 @@ class Tfoot(BaseHTML): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -985,9 +926,6 @@ class Tfoot(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1047,7 +985,6 @@ class Tfoot(BaseHTML): Args: *children: The children of the component. align: Alignment of the content within the table footer - bgcolor: Background color of the table footer access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -1064,7 +1001,6 @@ class Tfoot(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1091,12 +1027,6 @@ class Th(BaseHTML): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - background: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, col_span: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1149,9 +1079,6 @@ class Th(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1211,8 +1138,6 @@ class Th(BaseHTML): Args: *children: The children of the component. align: Alignment of the content within the table header cell - background: Background image for the table header cell - bgcolor: Background color of the table header cell col_span: Number of columns a header cell should span headers: IDs of the headers associated with this header cell row_span: Number of rows a header cell should span @@ -1233,7 +1158,6 @@ class Th(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1300,9 +1224,6 @@ class Thead(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1378,7 +1299,6 @@ class Thead(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1405,9 +1325,6 @@ class Tr(BaseHTML): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1448,9 +1365,6 @@ class Tr(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1510,7 +1424,6 @@ class Tr(BaseHTML): Args: *children: The children of the component. align: Alignment of the content within the table row - bgcolor: Background color of the table row access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -1527,7 +1440,6 @@ class Tr(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/el/elements/typography.py b/reflex/components/el/elements/typography.py index 01684951c..f8e3769fa 100644 --- a/reflex/components/el/elements/typography.py +++ b/reflex/components/el/elements/typography.py @@ -53,9 +53,6 @@ class Hr(BaseHTML): # Used to specify the alignment of text content of The Element. this attribute is used in all elements. align: Var[Union[str, int, bool]] - # Used to specify the color of a Horizontal rule. - color: Var[Union[str, int, bool]] - class Li(BaseHTML): """Display the li element.""" diff --git a/reflex/components/el/elements/typography.pyi b/reflex/components/el/elements/typography.pyi index 08f5c9b32..2f30c4805 100644 --- a/reflex/components/el/elements/typography.pyi +++ b/reflex/components/el/elements/typography.pyi @@ -58,9 +58,6 @@ class Blockquote(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -136,7 +133,6 @@ class Blockquote(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -200,9 +196,6 @@ class Dd(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -277,7 +270,6 @@ class Dd(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -341,9 +333,6 @@ class Div(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -418,7 +407,6 @@ class Div(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -482,9 +470,6 @@ class Dl(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -559,7 +544,6 @@ class Dl(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -623,9 +607,6 @@ class Dt(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -700,7 +681,6 @@ class Dt(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -764,9 +744,6 @@ class Figcaption(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -841,7 +818,6 @@ class Figcaption(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -868,9 +844,6 @@ class Hr(BaseHTML): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - color: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -911,9 +884,6 @@ class Hr(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -973,7 +943,6 @@ class Hr(BaseHTML): Args: *children: The children of the component. align: Used to specify the alignment of text content of The Element. this attribute is used in all elements. - color: Used to specify the color of a Horizontal rule. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -990,7 +959,6 @@ class Hr(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1054,9 +1022,6 @@ class Li(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1131,7 +1096,6 @@ class Li(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1196,9 +1160,6 @@ class Menu(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1274,7 +1235,6 @@ class Menu(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1345,9 +1305,6 @@ class Ol(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1425,7 +1382,6 @@ class Ol(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1489,9 +1445,6 @@ class P(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1566,7 +1519,6 @@ class P(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1630,9 +1582,6 @@ class Pre(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1707,7 +1656,6 @@ class Pre(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1771,9 +1719,6 @@ class Ul(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1848,7 +1793,6 @@ class Ul(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1916,9 +1860,6 @@ class Ins(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1995,7 +1936,6 @@ class Ins(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -2063,9 +2003,6 @@ class Del(BaseHTML): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -2142,7 +2079,6 @@ class Del(BaseHTML): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/color_mode.pyi b/reflex/components/radix/themes/color_mode.pyi index 12f470cad..3542d481b 100644 --- a/reflex/components/radix/themes/color_mode.pyi +++ b/reflex/components/radix/themes/color_mode.pyi @@ -420,9 +420,6 @@ class ColorModeButton(Button): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -514,7 +511,6 @@ class ColorModeButton(Button): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/alertdialog.pyi b/reflex/components/radix/themes/components/alertdialog.pyi index 0ba103c08..ffa4be175 100644 --- a/reflex/components/radix/themes/components/alertdialog.pyi +++ b/reflex/components/radix/themes/components/alertdialog.pyi @@ -428,9 +428,6 @@ class AlertDialogContent(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -521,7 +518,6 @@ class AlertDialogContent(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/badge.pyi b/reflex/components/radix/themes/components/badge.pyi index 2a0b1ee3b..9586b06ba 100644 --- a/reflex/components/radix/themes/components/badge.pyi +++ b/reflex/components/radix/themes/components/badge.pyi @@ -135,9 +135,6 @@ class Badge(el.Span, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -221,7 +218,6 @@ class Badge(el.Span, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/button.pyi b/reflex/components/radix/themes/components/button.pyi index f2bb2e4ed..b0258ab56 100644 --- a/reflex/components/radix/themes/components/button.pyi +++ b/reflex/components/radix/themes/components/button.pyi @@ -170,9 +170,6 @@ class Button(el.Button, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -268,7 +265,6 @@ class Button(el.Button, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index 05e86e714..e8221e2a3 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -138,9 +138,6 @@ class CalloutRoot(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -224,7 +221,6 @@ class CalloutRoot(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -348,9 +344,6 @@ class CalloutIcon(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -430,7 +423,6 @@ class CalloutIcon(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -554,9 +546,6 @@ class CalloutText(el.P, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -636,7 +625,6 @@ class CalloutText(el.P, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -772,9 +760,6 @@ class Callout(CalloutRoot): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -856,7 +841,6 @@ class Callout(CalloutRoot): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -994,9 +978,6 @@ class CalloutNamespace(SimpleNamespace): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1078,7 +1059,6 @@ class CalloutNamespace(SimpleNamespace): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi index 75b14c2c9..bcb2e956f 100644 --- a/reflex/components/radix/themes/components/card.pyi +++ b/reflex/components/radix/themes/components/card.pyi @@ -133,9 +133,6 @@ class Card(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -218,7 +215,6 @@ class Card(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi index bf21e0cf2..1a455754b 100644 --- a/reflex/components/radix/themes/components/dialog.pyi +++ b/reflex/components/radix/themes/components/dialog.pyi @@ -571,9 +571,6 @@ class DialogContent(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -669,7 +666,6 @@ class DialogContent(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/hovercard.pyi b/reflex/components/radix/themes/components/hovercard.pyi index 32510ba46..5ef0fc92b 100644 --- a/reflex/components/radix/themes/components/hovercard.pyi +++ b/reflex/components/radix/themes/components/hovercard.pyi @@ -441,9 +441,6 @@ class HoverCardContent(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -527,7 +524,6 @@ class HoverCardContent(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/iconbutton.pyi b/reflex/components/radix/themes/components/iconbutton.pyi index 95be21daa..abba0a67a 100644 --- a/reflex/components/radix/themes/components/iconbutton.pyi +++ b/reflex/components/radix/themes/components/iconbutton.pyi @@ -173,9 +173,6 @@ class IconButton(el.Button, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -267,7 +264,6 @@ class IconButton(el.Button, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/inset.pyi b/reflex/components/radix/themes/components/inset.pyi index 11ee8f5c9..609af896e 100644 --- a/reflex/components/radix/themes/components/inset.pyi +++ b/reflex/components/radix/themes/components/inset.pyi @@ -142,9 +142,6 @@ class Inset(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -233,7 +230,6 @@ class Inset(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index e6a056753..3d3bf8383 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -442,9 +442,6 @@ class PopoverContent(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -548,7 +545,6 @@ class PopoverContent(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index 0ce59ac2e..65a6bf54f 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -91,15 +91,6 @@ class TableRoot(el.Table, RadixThemesComponent): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - background: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - border: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, summary: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -143,9 +134,6 @@ class TableRoot(el.Table, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -212,9 +200,6 @@ class TableRoot(el.Table, RadixThemesComponent): size: The size of the table: "1" | "2" | "3" variant: The variant of the table align: Alignment of the table - background: Background image for the table - bgcolor: Background color of the table - border: Specifies the width of the border around the table summary: Provides a summary of the table's purpose and structure access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -232,7 +217,6 @@ class TableRoot(el.Table, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -359,9 +343,6 @@ class TableHeader(el.Thead, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -442,7 +423,6 @@ class TableHeader(el.Thead, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -532,9 +512,6 @@ class TableRow(el.Tr, RadixThemesComponent): Literal["start", "center", "end", "baseline"], ] ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -575,9 +552,6 @@ class TableRow(el.Tr, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -642,7 +616,6 @@ class TableRow(el.Tr, RadixThemesComponent): color: map to CSS default color property. color_scheme: map to radix color property. align: Alignment of the content within the table row - bgcolor: Background color of the table row access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -659,7 +632,6 @@ class TableRow(el.Tr, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -753,12 +725,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - background: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, col_span: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -811,9 +777,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -880,8 +843,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): justify: The justification of the column width: width of the column align: Alignment of the content within the table header cell - background: Background image for the table header cell - bgcolor: Background color of the table header cell col_span: Number of columns a header cell should span headers: IDs of the headers associated with this header cell row_span: Number of rows a header cell should span @@ -902,7 +863,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -989,9 +949,6 @@ class TableBody(el.Tbody, RadixThemesComponent): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1032,9 +989,6 @@ class TableBody(el.Tbody, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1099,7 +1053,6 @@ class TableBody(el.Tbody, RadixThemesComponent): color: map to CSS default color property. color_scheme: map to radix color property. align: Alignment of the content within the table body - bgcolor: Background color of the table body access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -1116,7 +1069,6 @@ class TableBody(el.Tbody, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1210,12 +1162,6 @@ class TableCell(el.Td, RadixThemesComponent): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - background: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, col_span: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1265,9 +1211,6 @@ class TableCell(el.Td, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1334,8 +1277,6 @@ class TableCell(el.Td, RadixThemesComponent): justify: The justification of the column width: width of the column align: Alignment of the content within the table cell - background: Background image for the table cell - bgcolor: Background color of the table cell col_span: Number of columns a cell should span headers: IDs of the headers associated with this cell row_span: Number of rows a cell should span @@ -1355,7 +1296,6 @@ class TableCell(el.Td, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1449,12 +1389,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - background: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, - bgcolor: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, col_span: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1507,9 +1441,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1576,8 +1507,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): justify: The justification of the column width: width of the column align: Alignment of the content within the table header cell - background: Background image for the table header cell - bgcolor: Background color of the table header cell col_span: Number of columns a header cell should span headers: IDs of the headers associated with this header cell row_span: Number of rows a header cell should span @@ -1598,7 +1527,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/textarea.pyi b/reflex/components/radix/themes/components/textarea.pyi index c0514e304..7b3ef7ea6 100644 --- a/reflex/components/radix/themes/components/textarea.pyi +++ b/reflex/components/radix/themes/components/textarea.pyi @@ -149,9 +149,6 @@ class TextArea(RadixThemesComponent, el.Textarea): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -253,7 +250,6 @@ class TextArea(RadixThemesComponent, el.Textarea): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/textfield.pyi b/reflex/components/radix/themes/components/textfield.pyi index 482fd6009..a4df9f670 100644 --- a/reflex/components/radix/themes/components/textfield.pyi +++ b/reflex/components/radix/themes/components/textfield.pyi @@ -145,9 +145,6 @@ class TextFieldRoot(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -230,7 +227,6 @@ class TextFieldRoot(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -289,9 +285,6 @@ class TextFieldInput(el.Input, TextFieldRoot): form_target: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - height: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, list: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, max: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, max_length: Optional[ @@ -327,9 +320,6 @@ class TextFieldInput(el.Input, TextFieldRoot): value: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - width: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, variant: Optional[ Union[ Var[Literal["classic", "surface", "soft"]], @@ -444,9 +434,6 @@ class TextFieldInput(el.Input, TextFieldRoot): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -528,7 +515,6 @@ class TextFieldInput(el.Input, TextFieldRoot): form_method: HTTP method to use for sending form data (for type="submit" buttons) form_no_validate: Bypasses form validation when submitting (for type="submit" buttons) form_target: Specifies where to display the response after submitting the form (for type="submit" buttons) - height: The height of the input (only for type="image") list: References a datalist for suggested options max: Specifies the maximum value for the input max_length: Specifies the maximum number of characters allowed in the input @@ -546,7 +532,6 @@ class TextFieldInput(el.Input, TextFieldRoot): type: Specifies the type of input use_map: Name of the image map used with the input value: Value of the input - width: The width of the input (only for type="image") variant: Variant of text field: "classic" | "surface" | "soft" color_scheme: Override theme color for text field radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full" @@ -566,7 +551,6 @@ class TextFieldInput(el.Input, TextFieldRoot): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/layout/box.pyi b/reflex/components/radix/themes/layout/box.pyi index f27ade65d..816e7a7d6 100644 --- a/reflex/components/radix/themes/layout/box.pyi +++ b/reflex/components/radix/themes/layout/box.pyi @@ -119,9 +119,6 @@ class Box(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -201,7 +198,6 @@ class Box(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/layout/center.pyi b/reflex/components/radix/themes/layout/center.pyi index 9bbea0f1d..05799bbfb 100644 --- a/reflex/components/radix/themes/layout/center.pyi +++ b/reflex/components/radix/themes/layout/center.pyi @@ -156,9 +156,6 @@ class Center(Flex): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -245,7 +242,6 @@ class Center(Flex): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/layout/container.pyi b/reflex/components/radix/themes/layout/container.pyi index 177cb8954..92cf5e182 100644 --- a/reflex/components/radix/themes/layout/container.pyi +++ b/reflex/components/radix/themes/layout/container.pyi @@ -126,9 +126,6 @@ class Container(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -209,7 +206,6 @@ class Container(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi index 5f1c8c2db..5033a3360 100644 --- a/reflex/components/radix/themes/layout/flex.pyi +++ b/reflex/components/radix/themes/layout/flex.pyi @@ -162,9 +162,6 @@ class Flex(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -251,7 +248,6 @@ class Flex(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/layout/grid.pyi b/reflex/components/radix/themes/layout/grid.pyi index 4ae5cc601..2b4c03f40 100644 --- a/reflex/components/radix/themes/layout/grid.pyi +++ b/reflex/components/radix/themes/layout/grid.pyi @@ -163,9 +163,6 @@ class Grid(el.Div, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -254,7 +251,6 @@ class Grid(el.Div, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi index 708cf8fca..7cda1899e 100644 --- a/reflex/components/radix/themes/layout/list.pyi +++ b/reflex/components/radix/themes/layout/list.pyi @@ -120,9 +120,6 @@ class BaseList(Flex, LayoutComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, p: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -292,7 +289,6 @@ class BaseList(Flex, LayoutComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. p: Padding: "0" - "9" px: Padding horizontal: "0" - "9" py: Padding vertical: "0" - "9" @@ -408,9 +404,6 @@ class UnorderedList(BaseList): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, p: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -580,7 +573,6 @@ class UnorderedList(BaseList): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. p: Padding: "0" - "9" px: Padding horizontal: "0" - "9" py: Padding vertical: "0" - "9" @@ -713,9 +705,6 @@ class OrderedList(BaseList): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, p: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -885,7 +874,6 @@ class OrderedList(BaseList): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. p: Padding: "0" - "9" px: Padding horizontal: "0" - "9" py: Padding vertical: "0" - "9" @@ -964,9 +952,6 @@ class ListItem(Li): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1041,7 +1026,6 @@ class ListItem(Li): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/layout/section.pyi b/reflex/components/radix/themes/layout/section.pyi index 8a02ad758..ebcb83546 100644 --- a/reflex/components/radix/themes/layout/section.pyi +++ b/reflex/components/radix/themes/layout/section.pyi @@ -126,9 +126,6 @@ class Section(el.Section, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -209,7 +206,6 @@ class Section(el.Section, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/layout/spacer.pyi b/reflex/components/radix/themes/layout/spacer.pyi index 7738f4f91..6a6718ece 100644 --- a/reflex/components/radix/themes/layout/spacer.pyi +++ b/reflex/components/radix/themes/layout/spacer.pyi @@ -156,9 +156,6 @@ class Spacer(Flex): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -245,7 +242,6 @@ class Spacer(Flex): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi index c354db1a1..e2a785495 100644 --- a/reflex/components/radix/themes/layout/stack.pyi +++ b/reflex/components/radix/themes/layout/stack.pyi @@ -88,9 +88,6 @@ class Stack(Flex): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -173,7 +170,6 @@ class Stack(Flex): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -262,9 +258,6 @@ class VStack(Stack): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -347,7 +340,6 @@ class VStack(Stack): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -436,9 +428,6 @@ class HStack(Stack): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -521,7 +510,6 @@ class HStack(Stack): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/typography/blockquote.pyi b/reflex/components/radix/themes/typography/blockquote.pyi index c6c9d499a..38915a5fc 100644 --- a/reflex/components/radix/themes/typography/blockquote.pyi +++ b/reflex/components/radix/themes/typography/blockquote.pyi @@ -135,9 +135,6 @@ class Blockquote(el.Blockquote, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -221,7 +218,6 @@ class Blockquote(el.Blockquote, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/typography/code.pyi b/reflex/components/radix/themes/typography/code.pyi index 5f22ba3ac..8cc4bfb45 100644 --- a/reflex/components/radix/themes/typography/code.pyi +++ b/reflex/components/radix/themes/typography/code.pyi @@ -140,9 +140,6 @@ class Code(el.Code, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -226,7 +223,6 @@ class Code(el.Code, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/typography/em.pyi b/reflex/components/radix/themes/typography/em.pyi index 556aa92c0..039665aeb 100644 --- a/reflex/components/radix/themes/typography/em.pyi +++ b/reflex/components/radix/themes/typography/em.pyi @@ -119,9 +119,6 @@ class Em(el.Em, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -201,7 +198,6 @@ class Em(el.Em, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/typography/heading.pyi b/reflex/components/radix/themes/typography/heading.pyi index 0c1e81fa9..01db21e4c 100644 --- a/reflex/components/radix/themes/typography/heading.pyi +++ b/reflex/components/radix/themes/typography/heading.pyi @@ -148,9 +148,6 @@ class Heading(el.H1, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -237,7 +234,6 @@ class Heading(el.H1, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/typography/kbd.pyi b/reflex/components/radix/themes/typography/kbd.pyi index 4d2bf3bd3..4b70c24a4 100644 --- a/reflex/components/radix/themes/typography/kbd.pyi +++ b/reflex/components/radix/themes/typography/kbd.pyi @@ -127,9 +127,6 @@ class Kbd(el.Kbd, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -210,7 +207,6 @@ class Kbd(el.Kbd, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/typography/link.pyi b/reflex/components/radix/themes/typography/link.pyi index bf3c62e2f..4ccd22c59 100644 --- a/reflex/components/radix/themes/typography/link.pyi +++ b/reflex/components/radix/themes/typography/link.pyi @@ -174,9 +174,6 @@ class Link(RadixThemesComponent, A): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -267,7 +264,6 @@ class Link(RadixThemesComponent, A): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/typography/quote.pyi b/reflex/components/radix/themes/typography/quote.pyi index aa8e7794e..0608fb8b6 100644 --- a/reflex/components/radix/themes/typography/quote.pyi +++ b/reflex/components/radix/themes/typography/quote.pyi @@ -120,9 +120,6 @@ class Quote(el.Q, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -203,7 +200,6 @@ class Quote(el.Q, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/typography/strong.pyi b/reflex/components/radix/themes/typography/strong.pyi index 5a911cd69..df81f7d41 100644 --- a/reflex/components/radix/themes/typography/strong.pyi +++ b/reflex/components/radix/themes/typography/strong.pyi @@ -119,9 +119,6 @@ class Strong(el.Strong, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -201,7 +198,6 @@ class Strong(el.Strong, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index fa5aa6f07..f3cc5c900 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -156,9 +156,6 @@ class Text(el.Span, RadixThemesComponent): title: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - translate: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -245,7 +242,6 @@ class Text(el.Span, RadixThemesComponent): spell_check: Defines whether the element may be checked for spelling errors. tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. - translate: Specifies whether the content of an element should be translated or not. style: The style of the component. key: A unique key for the component. id: The id for the component. From 93c0091aadb645c70c4c867791e97aab412a1427 Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Tue, 13 Feb 2024 01:54:58 +0700 Subject: [PATCH 19/68] remove extra props on scroll area (#2581) --- .../components/radix/themes/components/scrollarea.py | 7 ------- .../components/radix/themes/components/scrollarea.pyi | 11 +---------- reflex/components/radix/themes/components/select.py | 2 -- reflex/components/radix/themes/components/select.pyi | 2 -- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/reflex/components/radix/themes/components/scrollarea.py b/reflex/components/radix/themes/components/scrollarea.py index 911cda1a8..f829b5b8d 100644 --- a/reflex/components/radix/themes/components/scrollarea.py +++ b/reflex/components/radix/themes/components/scrollarea.py @@ -4,7 +4,6 @@ from typing import Literal from reflex.vars import Var from ..base import ( - LiteralRadius, RadixThemesComponent, ) @@ -14,12 +13,6 @@ class ScrollArea(RadixThemesComponent): tag = "ScrollArea" - # The size of the radio group: "1" | "2" | "3" - size: Var[Literal[1, 2, 3]] - - # The radius of the radio group - radius: Var[LiteralRadius] - # The alignment of the scroll area scrollbars: Var[Literal["vertical", "horizontal", "both"]] diff --git a/reflex/components/radix/themes/components/scrollarea.pyi b/reflex/components/radix/themes/components/scrollarea.pyi index dd2cda40f..029b0d6b1 100644 --- a/reflex/components/radix/themes/components/scrollarea.pyi +++ b/reflex/components/radix/themes/components/scrollarea.pyi @@ -9,7 +9,7 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Literal from reflex.vars import Var -from ..base import LiteralRadius, RadixThemesComponent +from ..base import RadixThemesComponent class ScrollArea(RadixThemesComponent): @overload @@ -80,13 +80,6 @@ class ScrollArea(RadixThemesComponent): ], ] ] = None, - size: Optional[Union[Var[Literal[1, 2, 3]], Literal[1, 2, 3]]] = None, - radius: Optional[ - Union[ - Var[Literal["none", "small", "medium", "large", "full"]], - Literal["none", "small", "medium", "large", "full"], - ] - ] = None, scrollbars: Optional[ Union[ Var[Literal["vertical", "horizontal", "both"]], @@ -163,8 +156,6 @@ class ScrollArea(RadixThemesComponent): *children: Child components. color: map to CSS default color property. color_scheme: map to radix color property. - size: The size of the radio group: "1" | "2" | "3" - radius: The radius of the radio group scrollbars: The alignment of the scroll area type_: Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars. "auto" | "always" | "scroll" | "hover" scroll_hide_delay: If type is set to either "scroll" or "hover", this prop determines the length of time, in milliseconds, before the scrollbars are hidden after the user stops interacting with scrollbars. diff --git a/reflex/components/radix/themes/components/select.py b/reflex/components/radix/themes/components/select.py index fc2feac2e..3545852e9 100644 --- a/reflex/components/radix/themes/components/select.py +++ b/reflex/components/radix/themes/components/select.py @@ -13,8 +13,6 @@ from ..base import ( RadixThemesComponent, ) -LiteralButtonSize = Literal[1, 2, 3, 4] - class SelectRoot(RadixThemesComponent): """Displays a list of options for the user to pick from, triggered by a button.""" diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi index d689af3a8..85ca6e72b 100644 --- a/reflex/components/radix/themes/components/select.pyi +++ b/reflex/components/radix/themes/components/select.pyi @@ -15,8 +15,6 @@ from reflex.constants import EventTriggers from reflex.vars import Var from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent -LiteralButtonSize = Literal[1, 2, 3, 4] - class SelectRoot(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload From 6e946631f3bc2b57856c2e4a86bfac9236d1ac82 Mon Sep 17 00:00:00 2001 From: Martin Xu <15661672+martinxu9@users.noreply.github.com> Date: Mon, 12 Feb 2024 10:57:17 -0800 Subject: [PATCH 20/68] alias form to form.root (#2579) --- reflex/components/radix/primitives/form.py | 2 +- reflex/components/radix/primitives/form.pyi | 89 ++++++++++++++++++++- 2 files changed, 89 insertions(+), 2 deletions(-) diff --git a/reflex/components/radix/primitives/form.py b/reflex/components/radix/primitives/form.py index 655fd34d5..1b9c93db1 100644 --- a/reflex/components/radix/primitives/form.py +++ b/reflex/components/radix/primitives/form.py @@ -293,11 +293,11 @@ class FormSubmit(FormComponent): class Form(SimpleNamespace): """Form components.""" + root = __call__ = staticmethod(FormRoot.create) control = staticmethod(FormControl.create) field = staticmethod(FormField.create) label = staticmethod(FormLabel.create) message = staticmethod(FormMessage.create) - root = staticmethod(FormRoot.create) submit = staticmethod(FormSubmit.create) validity_state = staticmethod(FormValidityState.create) diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index 5c29918ab..1b549d88f 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -753,12 +753,99 @@ class FormSubmit(FormComponent): ... class Form(SimpleNamespace): + root = staticmethod(FormRoot.create) control = staticmethod(FormControl.create) field = staticmethod(FormField.create) label = staticmethod(FormLabel.create) message = staticmethod(FormMessage.create) - root = staticmethod(FormRoot.create) submit = staticmethod(FormSubmit.create) validity_state = staticmethod(FormValidityState.create) + @staticmethod + def __call__( + *children, + reset_on_submit: Optional[Union[Var[bool], bool]] = None, + handle_submit_unique_name: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_clear_server_errors: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_submit: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "FormRoot": + """Create a form component. + + Args: + *children: The children of the form. + reset_on_submit: If true, the form will be cleared after submit. + handle_submit_unique_name: The name used to make this form's submit handler function unique. + as_child: Change the default rendered element for the one passed as a child. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The properties of the form. + + Returns: + The form component. + """ + ... + form = Form() From 798b72825dfb3ad357dd8504746e357f88c0286d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Mon, 12 Feb 2024 21:36:48 +0100 Subject: [PATCH 21/68] fix match import in iconbutton (#2552) --- reflex/components/core/match.py | 1 + reflex/components/radix/primitives/accordion.py | 16 ++++++++-------- reflex/components/radix/primitives/accordion.pyi | 2 +- .../radix/themes/components/iconbutton.py | 4 ++-- .../radix/themes/components/iconbutton.pyi | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/reflex/components/core/match.py b/reflex/components/core/match.py index 2b966497b..f1f4a2096 100644 --- a/reflex/components/core/match.py +++ b/reflex/components/core/match.py @@ -1,4 +1,5 @@ """rx.match.""" + import textwrap from typing import Any, Dict, List, Optional, Tuple, Union diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index 16c79076d..59aff2c6c 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -6,7 +6,7 @@ from types import SimpleNamespace from typing import Any, Dict, List, Literal from reflex.components.component import Component -from reflex.components.core import match +from reflex.components.core.match import Match from reflex.components.lucide.icon import Icon from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.components.radix.themes.base import LiteralAccentColor @@ -37,7 +37,7 @@ def get_theme_accordion_root(variant: Var[str], color_scheme: Var[str]) -> BaseV Returns: The theme for the accordion root component. """ - return match( # type: ignore + return Match.create( # type: ignore variant, ( "soft", @@ -86,7 +86,7 @@ def get_theme_accordion_root(variant: Var[str], color_scheme: Var[str]) -> BaseV "background_color": f"var(--{color_scheme}-9)", "box_shadow": "0 2px 10px var(--black-a4)", } - ) + ), # defaults to classic ) @@ -140,7 +140,7 @@ def get_theme_accordion_trigger(variant: str | Var, color_scheme: str | Var) -> Returns: The theme for the accordion trigger component. """ - return match( # type: ignore + return Match.create( # type: ignore variant, ( "soft", @@ -240,7 +240,7 @@ def get_theme_accordion_content(variant: str | Var, color_scheme: str | Var) -> Returns: The theme for the accordion content component. """ - return match( # type: ignore + return Match.create( # type: ignore variant, ( "outline", @@ -270,12 +270,12 @@ def get_theme_accordion_content(variant: str | Var, color_scheme: str | Var) -> { "overflow": "hidden", "font_size": "10px", - "color": match( + "color": Match.create( variant, ("classic", f"var(--{color_scheme}-9-contrast)"), f"var(--{color_scheme}-11)", ), - "background_color": match( + "background_color": Match.create( variant, ("classic", f"var(--{color_scheme}-9)"), f"var(--{color_scheme}-3)", @@ -344,7 +344,7 @@ class AccordionRoot(AccordionComponent): # The var_data associated with the component. _var_data: VarData = VarData() # type: ignore - _valid_children: List[str] = ["AccordionItem"] + _valid_children: List[str] = ["AccordionItem", "Foreach"] @classmethod def create(cls, *children, **props) -> Component: diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 19f996ad5..a56b70b70 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -10,7 +10,7 @@ from reflex.style import Style from types import SimpleNamespace from typing import Any, Dict, List, Literal from reflex.components.component import Component -from reflex.components.core import match +from reflex.components.core.match import Match from reflex.components.lucide.icon import Icon from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.components.radix.themes.base import LiteralAccentColor diff --git a/reflex/components/radix/themes/components/iconbutton.py b/reflex/components/radix/themes/components/iconbutton.py index b2e94f6e4..687c72dfd 100644 --- a/reflex/components/radix/themes/components/iconbutton.py +++ b/reflex/components/radix/themes/components/iconbutton.py @@ -4,7 +4,7 @@ from typing import Literal from reflex import el from reflex.components.component import Component -from reflex.components.core import match +from reflex.components.core.match import Match from reflex.components.lucide import Icon from reflex.style import Style from reflex.vars import Var @@ -77,7 +77,7 @@ class IconButton(el.Button, RadixThemesComponent): } children[0].size = RADIX_TO_LUCIDE_SIZE[props["size"]] else: - children[0].size = match( + children[0].size = Match.create( props["size"], ("1", "12px"), ("2", "24px"), diff --git a/reflex/components/radix/themes/components/iconbutton.pyi b/reflex/components/radix/themes/components/iconbutton.pyi index abba0a67a..85fd73da1 100644 --- a/reflex/components/radix/themes/components/iconbutton.pyi +++ b/reflex/components/radix/themes/components/iconbutton.pyi @@ -10,7 +10,7 @@ from reflex.style import Style from typing import Literal from reflex import el from reflex.components.component import Component -from reflex.components.core import match +from reflex.components.core.match import Match from reflex.components.lucide import Icon from reflex.style import Style from reflex.vars import Var From fc6eff71041b122a049a03e7d90e8bc2ede34656 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 12 Feb 2024 13:32:23 -0800 Subject: [PATCH 22/68] Convert templates to use `rx.chakra` where needed (#2555) * Convert templates to use `rx.chakra` where needed * reflex_init_in_docker_test: run test on PR into reflex-0.4.0 This is why we didn't catch the template issues earlier --- .../workflows/reflex_init_in_docker_test.yml | 3 +- reflex/.templates/apps/demo/code/demo.py | 30 ++-- .../apps/demo/code/pages/chatapp.py | 4 +- .../apps/demo/code/pages/datatable.py | 54 ++++---- .../.templates/apps/demo/code/pages/forms.py | 128 +++++++++--------- .../apps/demo/code/pages/graphing.py | 70 +++++----- .../.templates/apps/demo/code/pages/home.py | 24 ++-- reflex/.templates/apps/demo/code/sidebar.py | 46 +++---- reflex/.templates/apps/demo/code/styles.py | 4 +- .../apps/demo/code/webui/components/chat.py | 38 +++--- .../apps/demo/code/webui/components/modal.py | 22 +-- .../apps/demo/code/webui/components/navbar.py | 46 ++++--- .../demo/code/webui/components/sidebar.py | 26 ++-- .../.templates/apps/demo/code/webui/styles.py | 18 +-- .../apps/sidebar/code/components/sidebar.py | 40 +++--- .../apps/sidebar/code/pages/dashboard.py | 10 +- .../apps/sidebar/code/pages/settings.py | 10 +- reflex/.templates/apps/sidebar/code/styles.py | 4 +- .../apps/sidebar/code/templates/template.py | 34 +++-- 19 files changed, 311 insertions(+), 300 deletions(-) diff --git a/.github/workflows/reflex_init_in_docker_test.yml b/.github/workflows/reflex_init_in_docker_test.yml index bbe45c6c1..0e458f233 100644 --- a/.github/workflows/reflex_init_in_docker_test.yml +++ b/.github/workflows/reflex_init_in_docker_test.yml @@ -6,8 +6,7 @@ on: paths-ignore: - '**/*.md' pull_request: - branches: - - main + branches: [ "main", "reflex-0.4.0" ] paths-ignore: - '**/*.md' diff --git a/reflex/.templates/apps/demo/code/demo.py b/reflex/.templates/apps/demo/code/demo.py index b502b2816..7031f09d0 100644 --- a/reflex/.templates/apps/demo/code/demo.py +++ b/reflex/.templates/apps/demo/code/demo.py @@ -25,23 +25,27 @@ def template(main_content: Callable[[], rx.Component]) -> rx.Component: Returns: rx.Component: The template for each page of the app. """ - menu_button = rx.box( - rx.menu( - rx.menu_button( - rx.icon( + menu_button = rx.chakra.box( + rx.chakra.menu( + rx.chakra.menu_button( + rx.chakra.icon( tag="hamburger", size="4em", color=text_color, ), ), - rx.menu_list( - rx.menu_item(rx.link("Home", href="/", width="100%")), - rx.menu_divider(), - rx.menu_item( - rx.link("About", href="https://github.com/reflex-dev", width="100%") + rx.chakra.menu_list( + rx.chakra.menu_item(rx.chakra.link("Home", href="/", width="100%")), + rx.chakra.menu_divider(), + rx.chakra.menu_item( + rx.chakra.link( + "About", href="https://github.com/reflex-dev", width="100%" + ) ), - rx.menu_item( - rx.link("Contact", href="mailto:founders@=reflex.dev", width="100%") + rx.chakra.menu_item( + rx.chakra.link( + "Contact", href="mailto:founders@=reflex.dev", width="100%" + ) ), ), ), @@ -51,10 +55,10 @@ def template(main_content: Callable[[], rx.Component]) -> rx.Component: z_index="500", ) - return rx.hstack( + return rx.chakra.hstack( sidebar(), main_content(), - rx.spacer(), + rx.chakra.spacer(), menu_button, align_items="flex-start", transition="left 0.5s, width 0.5s", diff --git a/reflex/.templates/apps/demo/code/pages/chatapp.py b/reflex/.templates/apps/demo/code/pages/chatapp.py index 5f06cc15d..acd11a599 100644 --- a/reflex/.templates/apps/demo/code/pages/chatapp.py +++ b/reflex/.templates/apps/demo/code/pages/chatapp.py @@ -13,8 +13,8 @@ def chatapp_page() -> rx.Component: Returns: The UI for the main app. """ - return rx.box( - rx.vstack( + return rx.chakra.box( + rx.chakra.vstack( navbar(), chat.chat(), chat.action_bar(), diff --git a/reflex/.templates/apps/demo/code/pages/datatable.py b/reflex/.templates/apps/demo/code/pages/datatable.py index 64bdea0eb..4cc9d39ea 100644 --- a/reflex/.templates/apps/demo/code/pages/datatable.py +++ b/reflex/.templates/apps/demo/code/pages/datatable.py @@ -129,10 +129,10 @@ class DataTableState(State): ] -code_show = """rx.hstack( - rx.divider(orientation="vertical", height="100vh", border="solid black 1px"), - rx.vstack( - rx.box( +code_show = """rx.chakra.hstack( + rx.chakra.divider(orientation="vertical", height="100vh", border="solid black 1px"), + rx.chakra.vstack( + rx.chakra.box( rx.data_editor( columns=DataTableState.cols, data=DataTableState.data, @@ -147,7 +147,7 @@ code_show = """rx.hstack( height="80vh", ), ), - rx.spacer(), + rx.chakra.spacer(), height="100vh", spacing="25", ), @@ -270,15 +270,15 @@ def datatable_page() -> rx.Component: Returns: rx.Component: The UI for the settings page. """ - return rx.box( - rx.vstack( - rx.heading( + return rx.chakra.box( + rx.chakra.vstack( + rx.chakra.heading( "Data Table Demo", font_size="3em", ), - rx.hstack( - rx.vstack( - rx.box( + rx.chakra.hstack( + rx.chakra.vstack( + rx.chakra.box( rx.data_editor( columns=DataTableState.cols, data=DataTableState.data, @@ -292,21 +292,21 @@ def datatable_page() -> rx.Component: width="80vw", ), ), - rx.spacer(), + rx.chakra.spacer(), spacing="25", ), ), - rx.tabs( - rx.tab_list( - rx.tab("Code", style=tab_style), - rx.tab("Data", style=tab_style), - rx.tab("State", style=tab_style), - rx.tab("Styling", style=tab_style), + rx.chakra.tabs( + rx.chakra.tab_list( + rx.chakra.tab("Code", style=tab_style), + rx.chakra.tab("Data", style=tab_style), + rx.chakra.tab("State", style=tab_style), + rx.chakra.tab("Styling", style=tab_style), padding_x=0, ), - rx.tab_panels( - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panels( + rx.chakra.tab_panel( + rx.chakra.code_block( code_show, language="python", show_line_numbers=True, @@ -315,8 +315,8 @@ def datatable_page() -> rx.Component: padding_x=0, padding_y=".25em", ), - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panel( + rx.chakra.code_block( data_show, language="python", show_line_numbers=True, @@ -325,8 +325,8 @@ def datatable_page() -> rx.Component: padding_x=0, padding_y=".25em", ), - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panel( + rx.chakra.code_block( state_show, language="python", show_line_numbers=True, @@ -335,8 +335,8 @@ def datatable_page() -> rx.Component: padding_x=0, padding_y=".25em", ), - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panel( + rx.chakra.code_block( darkTheme_show, language="python", show_line_numbers=True, diff --git a/reflex/.templates/apps/demo/code/pages/forms.py b/reflex/.templates/apps/demo/code/pages/forms.py index 904f003cd..5b39ba5c1 100644 --- a/reflex/.templates/apps/demo/code/pages/forms.py +++ b/reflex/.templates/apps/demo/code/pages/forms.py @@ -4,21 +4,21 @@ import reflex as rx from ..states.form_state import FormState, UploadState from ..styles import * -forms_1_code = """rx.vstack( - rx.form( - rx.vstack( - rx.input( +forms_1_code = """rx.chakra.vstack( + rx.chakra.form( + rx.chakra.vstack( + rx.chakra.input( placeholder="First Name", id="first_name", ), - rx.input( + rx.chakra.input( placeholder="Last Name", id="last_name" ), - rx.hstack( - rx.checkbox("Checked", id="check"), - rx.switch("Switched", id="switch"), + rx.chakra.hstack( + rx.chakra.checkbox("Checked", id="check"), + rx.chakra.switch("Switched", id="switch"), ), - rx.button("Submit", + rx.chakra.button("Submit", type_="submit", bg="#ecfdf5", color="#047857", @@ -27,9 +27,9 @@ forms_1_code = """rx.vstack( ), on_submit=FormState.handle_submit, ), - rx.divider(), - rx.heading("Results"), - rx.text(FormState.form_data.to_string()), + rx.chakra.divider(), + rx.chakra.heading("Results"), + rx.chakra.text(FormState.form_data.to_string()), width="100%", )""" @@ -44,35 +44,35 @@ forms_1_state = """class FormState(rx.State): self.form_data = form_data""" -forms_2_code = """rx.vstack( +forms_2_code = """rx.chakra.vstack( rx.upload( - rx.vstack( - rx.button( + rx.chakra.vstack( + rx.chakra.button( "Select File", color=color, bg="white", border=f"1px solid {color}", ), - rx.text( + rx.chakra.text( "Drag and drop files here or click to select files" ), ), border=f"1px dotted {color}", padding="5em", ), - rx.hstack(rx.foreach(rx.selected_files, rx.text)), - rx.button( + rx.chakra.hstack(rx.foreach(rx.selected_files, rx.chakra.text)), + rx.chakra.button( "Upload", on_click=lambda: UploadState.handle_upload( rx.upload_files() ), ), - rx.button( + rx.chakra.button( "Clear", on_click=rx.clear_selected_files, ), rx.foreach( - UploadState.img, lambda img: rx.image(src=img, width="20%", height="auto",) + UploadState.img, lambda img: rx.chakra.image(src=img, width="20%", height="auto",) ), padding="5em", width="100%", @@ -109,25 +109,25 @@ def forms_page() -> rx.Component: Returns: rx.Component: The UI for the settings page. """ - return rx.box( - rx.vstack( - rx.heading( + return rx.chakra.box( + rx.chakra.vstack( + rx.chakra.heading( "Forms Demo", font_size="3em", ), - rx.vstack( - rx.form( - rx.vstack( - rx.input( + rx.chakra.vstack( + rx.chakra.form( + rx.chakra.vstack( + rx.chakra.input( placeholder="First Name", id="first_name", ), - rx.input(placeholder="Last Name", id="last_name"), - rx.hstack( - rx.checkbox("Checked", id="check"), - rx.switch("Switched", id="switch"), + rx.chakra.input(placeholder="Last Name", id="last_name"), + rx.chakra.hstack( + rx.chakra.checkbox("Checked", id="check"), + rx.chakra.switch("Switched", id="switch"), ), - rx.button( + rx.chakra.button( "Submit", type_="submit", bg="#ecfdf5", @@ -137,20 +137,20 @@ def forms_page() -> rx.Component: ), on_submit=FormState.handle_submit, ), - rx.divider(), - rx.heading("Results"), - rx.text(FormState.form_data.to_string()), + rx.chakra.divider(), + rx.chakra.heading("Results"), + rx.chakra.text(FormState.form_data.to_string()), width="100%", ), - rx.tabs( - rx.tab_list( - rx.tab("Code", style=tab_style), - rx.tab("State", style=tab_style), + rx.chakra.tabs( + rx.chakra.tab_list( + rx.chakra.tab("Code", style=tab_style), + rx.chakra.tab("State", style=tab_style), padding_x=0, ), - rx.tab_panels( - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panels( + rx.chakra.tab_panel( + rx.chakra.code_block( forms_1_code, language="python", show_line_numbers=True, @@ -159,8 +159,8 @@ def forms_page() -> rx.Component: padding_x=0, padding_y=".25em", ), - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panel( + rx.chakra.code_block( forms_1_state, language="python", show_line_numbers=True, @@ -177,34 +177,36 @@ def forms_page() -> rx.Component: width="100%", padding_top=".5em", ), - rx.heading("Upload Example", font_size="3em"), - rx.text("Try uploading some images and see how they look."), - rx.vstack( + rx.chakra.heading("Upload Example", font_size="3em"), + rx.chakra.text("Try uploading some images and see how they look."), + rx.chakra.vstack( rx.upload( - rx.vstack( - rx.button( + rx.chakra.vstack( + rx.chakra.button( "Select File", color=color, bg="white", border=f"1px solid {color}", ), - rx.text("Drag and drop files here or click to select files"), + rx.chakra.text( + "Drag and drop files here or click to select files" + ), ), border=f"1px dotted {color}", padding="5em", ), - rx.hstack(rx.foreach(rx.selected_files, rx.text)), - rx.button( + rx.chakra.hstack(rx.foreach(rx.selected_files, rx.chakra.text)), + rx.chakra.button( "Upload", on_click=lambda: UploadState.handle_upload(rx.upload_files()), ), - rx.button( + rx.chakra.button( "Clear", on_click=rx.clear_selected_files, ), rx.foreach( UploadState.img, - lambda img: rx.image( + lambda img: rx.chakra.image( src=img, width="20%", height="auto", @@ -213,15 +215,15 @@ def forms_page() -> rx.Component: padding="5em", width="100%", ), - rx.tabs( - rx.tab_list( - rx.tab("Code", style=tab_style), - rx.tab("State", style=tab_style), + rx.chakra.tabs( + rx.chakra.tab_list( + rx.chakra.tab("Code", style=tab_style), + rx.chakra.tab("State", style=tab_style), padding_x=0, ), - rx.tab_panels( - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panels( + rx.chakra.tab_panel( + rx.chakra.code_block( forms_2_code, language="python", show_line_numbers=True, @@ -230,8 +232,8 @@ def forms_page() -> rx.Component: padding_x=0, padding_y=".25em", ), - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panel( + rx.chakra.code_block( forms_2_state, language="python", show_line_numbers=True, diff --git a/reflex/.templates/apps/demo/code/pages/graphing.py b/reflex/.templates/apps/demo/code/pages/graphing.py index 0accf81a0..6b5defb46 100644 --- a/reflex/.templates/apps/demo/code/pages/graphing.py +++ b/reflex/.templates/apps/demo/code/pages/graphing.py @@ -56,19 +56,19 @@ graph_2_code = """rx.recharts.pie_chart( ), rx.recharts.graphing_tooltip(), ), -rx.vstack( +rx.chakra.vstack( rx.foreach( PieChartState.resource_types, - lambda type_, i: rx.hstack( - rx.button( + lambda type_, i: rx.chakra.hstack( + rx.chakra.button( "-", on_click=PieChartState.decrement(type_), ), - rx.text( + rx.chakra.text( type_, PieChartState.resources[i]["count"], ), - rx.button( + rx.chakra.button( "+", on_click=PieChartState.increment(type_), ), @@ -111,17 +111,17 @@ def graphing_page() -> rx.Component: Returns: rx.Component: The UI for the dashboard page. """ - return rx.box( - rx.vstack( - rx.heading( + return rx.chakra.box( + rx.chakra.vstack( + rx.chakra.heading( "Graphing Demo", font_size="3em", ), - rx.heading( + rx.chakra.heading( "Composed Chart", font_size="2em", ), - rx.stack( + rx.chakra.stack( rx.recharts.composed_chart( rx.recharts.area(data_key="uv", stroke="#8884d8", fill="#8884d8"), rx.recharts.bar(data_key="amt", bar_size=20, fill="#413ea0"), @@ -136,15 +136,15 @@ def graphing_page() -> rx.Component: width="100%", height="20em", ), - rx.tabs( - rx.tab_list( - rx.tab("Code", style=tab_style), - rx.tab("Data", style=tab_style), + rx.chakra.tabs( + rx.chakra.tab_list( + rx.chakra.tab("Code", style=tab_style), + rx.chakra.tab("Data", style=tab_style), padding_x=0, ), - rx.tab_panels( - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panels( + rx.chakra.tab_panel( + rx.chakra.code_block( graph_1_code, language="python", show_line_numbers=True, @@ -153,8 +153,8 @@ def graphing_page() -> rx.Component: padding_x=0, padding_y=".25em", ), - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panel( + rx.chakra.code_block( data_1_show, language="python", show_line_numbers=True, @@ -171,8 +171,8 @@ def graphing_page() -> rx.Component: width="100%", padding_top=".5em", ), - rx.heading("Interactive Example", font_size="2em"), - rx.hstack( + rx.chakra.heading("Interactive Example", font_size="2em"), + rx.chakra.hstack( rx.recharts.pie_chart( rx.recharts.pie( data=PieChartState.resources, @@ -187,19 +187,19 @@ def graphing_page() -> rx.Component: ), rx.recharts.graphing_tooltip(), ), - rx.vstack( + rx.chakra.vstack( rx.foreach( PieChartState.resource_types, - lambda type_, i: rx.hstack( - rx.button( + lambda type_, i: rx.chakra.hstack( + rx.chakra.button( "-", on_click=PieChartState.decrement(type_), ), - rx.text( + rx.chakra.text( type_, PieChartState.resources[i]["count"], ), - rx.button( + rx.chakra.button( "+", on_click=PieChartState.increment(type_), ), @@ -209,15 +209,15 @@ def graphing_page() -> rx.Component: width="100%", height="15em", ), - rx.tabs( - rx.tab_list( - rx.tab("Code", style=tab_style), - rx.tab("State", style=tab_style), + rx.chakra.tabs( + rx.chakra.tab_list( + rx.chakra.tab("Code", style=tab_style), + rx.chakra.tab("State", style=tab_style), padding_x=0, ), - rx.tab_panels( - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panels( + rx.chakra.tab_panel( + rx.chakra.code_block( graph_2_code, language="python", show_line_numbers=True, @@ -226,8 +226,8 @@ def graphing_page() -> rx.Component: padding_x=0, padding_y=".25em", ), - rx.tab_panel( - rx.code_block( + rx.chakra.tab_panel( + rx.chakra.code_block( graph_2_state, language="python", show_line_numbers=True, diff --git a/reflex/.templates/apps/demo/code/pages/home.py b/reflex/.templates/apps/demo/code/pages/home.py index 3b94dfe0a..d1a667783 100644 --- a/reflex/.templates/apps/demo/code/pages/home.py +++ b/reflex/.templates/apps/demo/code/pages/home.py @@ -10,39 +10,39 @@ def home_page() -> rx.Component: Returns: rx.Component: The UI for the home page. """ - return rx.box( - rx.vstack( - rx.heading( + return rx.chakra.box( + rx.chakra.vstack( + rx.chakra.heading( "Welcome to Reflex! 👋", font_size="3em", ), - rx.text( + rx.chakra.text( "Reflex is an open-source app framework built specifically to allow you to build web apps in pure python. 👈 Select a demo from the sidebar to see some examples of what Reflex can do!", ), - rx.heading( + rx.chakra.heading( "Things to check out:", font_size="2em", ), - rx.unordered_list( - rx.list_item( + rx.chakra.unordered_list( + rx.chakra.list_item( "Take a look at ", - rx.link( + rx.chakra.link( "reflex.dev", href="https://reflex.dev", color="rgb(107,99,246)", ), ), - rx.list_item( + rx.chakra.list_item( "Check out our ", - rx.link( + rx.chakra.link( "docs", href="https://reflex.dev/docs/getting-started/introduction/", color="rgb(107,99,246)", ), ), - rx.list_item( + rx.chakra.list_item( "Ask a question in our ", - rx.link( + rx.chakra.link( "community", href="https://discord.gg/T5WSbC2YtQ", color="rgb(107,99,246)", diff --git a/reflex/.templates/apps/demo/code/sidebar.py b/reflex/.templates/apps/demo/code/sidebar.py index 343da6e27..5f634402f 100644 --- a/reflex/.templates/apps/demo/code/sidebar.py +++ b/reflex/.templates/apps/demo/code/sidebar.py @@ -12,15 +12,15 @@ def sidebar_header() -> rx.Component: Returns: rx.Component: The sidebar header component. """ - return rx.hstack( - rx.image( + return rx.chakra.hstack( + rx.chakra.image( src="/icon.svg", height="2em", ), - rx.spacer(), - rx.link( - rx.center( - rx.image( + rx.chakra.spacer(), + rx.chakra.link( + rx.chakra.center( + rx.chakra.image( src="/github.svg", height="3em", padding="0.5em", @@ -46,10 +46,10 @@ def sidebar_footer() -> rx.Component: Returns: rx.Component: The sidebar footer component. """ - return rx.hstack( - rx.link( - rx.center( - rx.image( + return rx.chakra.hstack( + rx.chakra.link( + rx.chakra.center( + rx.chakra.image( src="/paneleft.svg", height="2em", padding="0.5em", @@ -65,15 +65,15 @@ def sidebar_footer() -> rx.Component: left=rx.cond(State.sidebar_displayed, "0px", "20.5em"), **overlapping_button_style, ), - rx.spacer(), - rx.link( - rx.text( + rx.chakra.spacer(), + rx.chakra.link( + rx.chakra.text( "Docs", ), href="https://reflex.dev/docs/getting-started/introduction/", ), - rx.link( - rx.text( + rx.chakra.link( + rx.chakra.text( "Blog", ), href="https://reflex.dev/blog/", @@ -95,14 +95,14 @@ def sidebar_item(text: str, icon: str, url: str) -> rx.Component: Returns: rx.Component: The sidebar item component. """ - return rx.link( - rx.hstack( - rx.image( + return rx.chakra.link( + rx.chakra.hstack( + rx.chakra.image( src=icon, height="2.5em", padding="0.5em", ), - rx.text( + rx.chakra.text( text, ), bg=rx.cond( @@ -131,10 +131,10 @@ def sidebar() -> rx.Component: Returns: rx.Component: The sidebar component. """ - return rx.box( - rx.vstack( + return rx.chakra.box( + rx.chakra.vstack( sidebar_header(), - rx.vstack( + rx.chakra.vstack( sidebar_item( "Welcome", "/github.svg", @@ -165,7 +165,7 @@ def sidebar() -> rx.Component: align_items="flex-start", padding="1em", ), - rx.spacer(), + rx.chakra.spacer(), sidebar_footer(), height="100dvh", ), diff --git a/reflex/.templates/apps/demo/code/styles.py b/reflex/.templates/apps/demo/code/styles.py index 934821ad6..e31913194 100644 --- a/reflex/.templates/apps/demo/code/styles.py +++ b/reflex/.templates/apps/demo/code/styles.py @@ -46,12 +46,12 @@ overlapping_button_style = { } base_style = { - rx.MenuButton: { + rx.chakra.MenuButton: { "width": "3em", "height": "3em", **overlapping_button_style, }, - rx.MenuItem: hover_accent_bg, + rx.chakra.MenuItem: hover_accent_bg, } tab_style = { diff --git a/reflex/.templates/apps/demo/code/webui/components/chat.py b/reflex/.templates/apps/demo/code/webui/components/chat.py index 9ac6ddf9e..fd9b6ba98 100644 --- a/reflex/.templates/apps/demo/code/webui/components/chat.py +++ b/reflex/.templates/apps/demo/code/webui/components/chat.py @@ -14,9 +14,9 @@ def message(qa: QA) -> rx.Component: Returns: A component displaying the question/answer pair. """ - return rx.box( - rx.box( - rx.text( + return rx.chakra.box( + rx.chakra.box( + rx.chakra.text( qa.question, bg=styles.border_color, shadow=styles.shadow_light, @@ -25,8 +25,8 @@ def message(qa: QA) -> rx.Component: text_align="right", margin_top="1em", ), - rx.box( - rx.text( + rx.chakra.box( + rx.chakra.text( qa.answer, bg=styles.accent_color, shadow=styles.shadow_light, @@ -45,8 +45,8 @@ def chat() -> rx.Component: Returns: A component displaying all the messages in a single conversation. """ - return rx.vstack( - rx.box(rx.foreach(State.chats[State.current_chat], message)), + return rx.chakra.vstack( + rx.chakra.box(rx.foreach(State.chats[State.current_chat], message)), py="8", flex="1", width="100%", @@ -55,7 +55,7 @@ def chat() -> rx.Component: align_self="center", overflow="hidden", padding_bottom="5em", - **styles.base_style[rx.Vstack], + **styles.base_style[rx.chakra.Vstack], ) @@ -65,12 +65,12 @@ def action_bar() -> rx.Component: Returns: The action bar to send a new message. """ - return rx.box( - rx.vstack( - rx.form( - rx.form_control( - rx.hstack( - rx.input( + return rx.chakra.box( + rx.chakra.vstack( + rx.chakra.form( + rx.chakra.form_control( + rx.chakra.hstack( + rx.chakra.input( placeholder="Type something...", value=State.question, on_change=State.set_question, @@ -78,24 +78,24 @@ def action_bar() -> rx.Component: _hover={"border_color": styles.accent_color}, style=styles.input_style, ), - rx.button( + rx.chakra.button( rx.cond( State.processing, loading_icon(height="1em"), - rx.text("Send"), + rx.chakra.text("Send"), ), type_="submit", _hover={"bg": styles.accent_color}, style=styles.input_style, ), - **styles.base_style[rx.Hstack], + **styles.base_style[rx.chakra.Hstack], ), is_disabled=State.processing, ), on_submit=State.process_question, width="100%", ), - rx.text( + rx.chakra.text( "ReflexGPT may return factually incorrect or misleading responses. Use discretion.", font_size="xs", color="#fff6", @@ -104,7 +104,7 @@ def action_bar() -> rx.Component: width="100%", max_w="3xl", mx="auto", - **styles.base_style[rx.Vstack], + **styles.base_style[rx.chakra.Vstack], ), position="sticky", bottom="0", diff --git a/reflex/.templates/apps/demo/code/webui/components/modal.py b/reflex/.templates/apps/demo/code/webui/components/modal.py index ce51b9b6b..c76b8dffd 100644 --- a/reflex/.templates/apps/demo/code/webui/components/modal.py +++ b/reflex/.templates/apps/demo/code/webui/components/modal.py @@ -9,13 +9,13 @@ def modal() -> rx.Component: Returns: The modal component. """ - return rx.modal( - rx.modal_overlay( - rx.modal_content( - rx.modal_header( - rx.hstack( - rx.text("Create new chat"), - rx.icon( + return rx.chakra.modal( + rx.chakra.modal_overlay( + rx.chakra.modal_content( + rx.chakra.modal_header( + rx.chakra.hstack( + rx.chakra.text("Create new chat"), + rx.chakra.icon( tag="close", font_size="sm", on_click=State.toggle_modal, @@ -27,8 +27,8 @@ def modal() -> rx.Component: justify_content="space-between", ) ), - rx.modal_body( - rx.input( + rx.chakra.modal_body( + rx.chakra.input( placeholder="Type something...", on_blur=State.set_new_chat_name, bg="#222", @@ -36,8 +36,8 @@ def modal() -> rx.Component: _placeholder={"color": "#fffa"}, ), ), - rx.modal_footer( - rx.button( + rx.chakra.modal_footer( + rx.chakra.button( "Create", bg="#5535d4", box_shadow="md", diff --git a/reflex/.templates/apps/demo/code/webui/components/navbar.py b/reflex/.templates/apps/demo/code/webui/components/navbar.py index 35c3e2522..e836f29ec 100644 --- a/reflex/.templates/apps/demo/code/webui/components/navbar.py +++ b/reflex/.templates/apps/demo/code/webui/components/navbar.py @@ -5,18 +5,18 @@ from ...webui.state import State def navbar(): - return rx.box( - rx.hstack( - rx.hstack( - rx.icon( + return rx.chakra.box( + rx.chakra.hstack( + rx.chakra.hstack( + rx.chakra.icon( tag="hamburger", mr=4, on_click=State.toggle_drawer, cursor="pointer", ), - rx.link( - rx.box( - rx.image(src="favicon.ico", width=30, height="auto"), + rx.chakra.link( + rx.chakra.box( + rx.chakra.image(src="favicon.ico", width=30, height="auto"), p="1", border_radius="6", bg="#F0F0F0", @@ -24,17 +24,19 @@ def navbar(): ), href="/", ), - rx.breadcrumb( - rx.breadcrumb_item( - rx.heading("ReflexGPT", size="sm"), + rx.chakra.breadcrumb( + rx.chakra.breadcrumb_item( + rx.chakra.heading("ReflexGPT", size="sm"), ), - rx.breadcrumb_item( - rx.text(State.current_chat, size="sm", font_weight="normal"), + rx.chakra.breadcrumb_item( + rx.chakra.text( + State.current_chat, size="sm", font_weight="normal" + ), ), ), ), - rx.hstack( - rx.button( + rx.chakra.hstack( + rx.chakra.button( "+ New chat", bg=styles.accent_color, px="4", @@ -42,15 +44,15 @@ def navbar(): h="auto", on_click=State.toggle_modal, ), - rx.menu( - rx.menu_button( - rx.avatar(name="User", size="md"), - rx.box(), + rx.chakra.menu( + rx.chakra.menu_button( + rx.chakra.avatar(name="User", size="md"), + rx.chakra.box(), ), - rx.menu_list( - rx.menu_item("Help"), - rx.menu_divider(), - rx.menu_item("Settings"), + rx.chakra.menu_list( + rx.chakra.menu_item("Help"), + rx.chakra.menu_divider(), + rx.chakra.menu_item("Settings"), ), ), spacing="8", diff --git a/reflex/.templates/apps/demo/code/webui/components/sidebar.py b/reflex/.templates/apps/demo/code/webui/components/sidebar.py index 91b7acd8d..b4ffdd41f 100644 --- a/reflex/.templates/apps/demo/code/webui/components/sidebar.py +++ b/reflex/.templates/apps/demo/code/webui/components/sidebar.py @@ -13,16 +13,16 @@ def sidebar_chat(chat: str) -> rx.Component: Returns: The sidebar chat item. """ - return rx.hstack( - rx.box( + return rx.chakra.hstack( + rx.chakra.box( chat, on_click=lambda: State.set_chat(chat), style=styles.sidebar_style, color=styles.icon_color, flex="1", ), - rx.box( - rx.icon( + rx.chakra.box( + rx.chakra.icon( tag="delete", style=styles.icon_style, on_click=State.delete_chat, @@ -40,21 +40,21 @@ def sidebar() -> rx.Component: Returns: The sidebar component. """ - return rx.drawer( - rx.drawer_overlay( - rx.drawer_content( - rx.drawer_header( - rx.hstack( - rx.text("Chats"), - rx.icon( + return rx.chakra.drawer( + rx.chakra.drawer_overlay( + rx.chakra.drawer_content( + rx.chakra.drawer_header( + rx.chakra.hstack( + rx.chakra.text("Chats"), + rx.chakra.icon( tag="close", on_click=State.toggle_drawer, style=styles.icon_style, ), ) ), - rx.drawer_body( - rx.vstack( + rx.chakra.drawer_body( + rx.chakra.vstack( rx.foreach(State.chat_titles, lambda chat: sidebar_chat(chat)), align_items="stretch", ) diff --git a/reflex/.templates/apps/demo/code/webui/styles.py b/reflex/.templates/apps/demo/code/webui/styles.py index 7abc579fb..62212ac1a 100644 --- a/reflex/.templates/apps/demo/code/webui/styles.py +++ b/reflex/.templates/apps/demo/code/webui/styles.py @@ -45,43 +45,43 @@ sidebar_style = dict( ) base_style = { - rx.Avatar: { + rx.chakra.Avatar: { "shadow": shadow, "color": text_light_color, # "bg": border_color, }, - rx.Button: { + rx.chakra.Button: { "shadow": shadow, "color": text_light_color, "_hover": { "bg": accent_dark, }, }, - rx.Menu: { + rx.chakra.Menu: { "bg": bg_dark_color, "border": f"red", }, - rx.MenuList: { + rx.chakra.MenuList: { "bg": bg_dark_color, "border": f"1.5px solid {bg_medium_color}", }, - rx.MenuDivider: { + rx.chakra.MenuDivider: { "border": f"1px solid {bg_medium_color}", }, - rx.MenuItem: { + rx.chakra.MenuItem: { "bg": bg_dark_color, "color": text_light_color, }, - rx.DrawerContent: { + rx.chakra.DrawerContent: { "bg": bg_dark_color, "color": text_light_color, "opacity": "0.9", }, - rx.Hstack: { + rx.chakra.Hstack: { "align_items": "center", "justify_content": "space-between", }, - rx.Vstack: { + rx.chakra.Vstack: { "align_items": "stretch", "justify_content": "space-between", }, diff --git a/reflex/.templates/apps/sidebar/code/components/sidebar.py b/reflex/.templates/apps/sidebar/code/components/sidebar.py index 26f2362e0..8e3d2f736 100644 --- a/reflex/.templates/apps/sidebar/code/components/sidebar.py +++ b/reflex/.templates/apps/sidebar/code/components/sidebar.py @@ -11,17 +11,17 @@ def sidebar_header() -> rx.Component: Returns: The sidebar header component. """ - return rx.hstack( + return rx.chakra.hstack( # The logo. - rx.image( + rx.chakra.image( src="/icon.svg", height="2em", ), - rx.spacer(), + rx.chakra.spacer(), # Link to Reflex GitHub repo. - rx.link( - rx.center( - rx.image( + rx.chakra.link( + rx.chakra.center( + rx.chakra.image( src="/github.svg", height="3em", padding="0.5em", @@ -47,14 +47,14 @@ def sidebar_footer() -> rx.Component: Returns: The sidebar footer component. """ - return rx.hstack( - rx.spacer(), - rx.link( - rx.text("Docs"), + return rx.chakra.hstack( + rx.chakra.spacer(), + rx.chakra.link( + rx.chakra.text("Docs"), href="https://reflex.dev/docs/getting-started/introduction/", ), - rx.link( - rx.text("Blog"), + rx.chakra.link( + rx.chakra.text("Blog"), href="https://reflex.dev/blog/", ), width="100%", @@ -79,14 +79,14 @@ def sidebar_item(text: str, icon: str, url: str) -> rx.Component: (rx.State.router.page.path == "/") & text == "Home" ) - return rx.link( - rx.hstack( - rx.image( + return rx.chakra.link( + rx.chakra.hstack( + rx.chakra.image( src=icon, height="2.5em", padding="0.5em", ), - rx.text( + rx.chakra.text( text, ), bg=rx.cond( @@ -118,10 +118,10 @@ def sidebar() -> rx.Component: # Get all the decorated pages and add them to the sidebar. from reflex.page import get_decorated_pages - return rx.box( - rx.vstack( + return rx.chakra.box( + rx.chakra.vstack( sidebar_header(), - rx.vstack( + rx.chakra.vstack( *[ sidebar_item( text=page.get("title", page["route"].strip("/").capitalize()), @@ -135,7 +135,7 @@ def sidebar() -> rx.Component: align_items="flex-start", padding="1em", ), - rx.spacer(), + rx.chakra.spacer(), sidebar_footer(), height="100dvh", ), diff --git a/reflex/.templates/apps/sidebar/code/pages/dashboard.py b/reflex/.templates/apps/sidebar/code/pages/dashboard.py index e0a895009..bfe29615c 100644 --- a/reflex/.templates/apps/sidebar/code/pages/dashboard.py +++ b/reflex/.templates/apps/sidebar/code/pages/dashboard.py @@ -11,11 +11,11 @@ def dashboard() -> rx.Component: Returns: The UI for the dashboard page. """ - return rx.vstack( - rx.heading("Dashboard", font_size="3em"), - rx.text("Welcome to Reflex!"), - rx.text( + return rx.chakra.vstack( + rx.chakra.heading("Dashboard", font_size="3em"), + rx.chakra.text("Welcome to Reflex!"), + rx.chakra.text( "You can edit this page in ", - rx.code("{your_app}/pages/dashboard.py"), + rx.chakra.code("{your_app}/pages/dashboard.py"), ), ) diff --git a/reflex/.templates/apps/sidebar/code/pages/settings.py b/reflex/.templates/apps/sidebar/code/pages/settings.py index 7bee3bf86..94b89d691 100644 --- a/reflex/.templates/apps/sidebar/code/pages/settings.py +++ b/reflex/.templates/apps/sidebar/code/pages/settings.py @@ -12,11 +12,11 @@ def settings() -> rx.Component: Returns: The UI for the settings page. """ - return rx.vstack( - rx.heading("Settings", font_size="3em"), - rx.text("Welcome to Reflex!"), - rx.text( + return rx.chakra.vstack( + rx.chakra.heading("Settings", font_size="3em"), + rx.chakra.text("Welcome to Reflex!"), + rx.chakra.text( "You can edit this page in ", - rx.code("{your_app}/pages/settings.py"), + rx.chakra.code("{your_app}/pages/settings.py"), ), ) diff --git a/reflex/.templates/apps/sidebar/code/styles.py b/reflex/.templates/apps/sidebar/code/styles.py index 15a144a78..d11a1e580 100644 --- a/reflex/.templates/apps/sidebar/code/styles.py +++ b/reflex/.templates/apps/sidebar/code/styles.py @@ -45,8 +45,8 @@ base_style = { } markdown_style = { - "code": lambda text: rx.code(text, color="#1F1944", bg="#EAE4FD"), - "a": lambda text, **props: rx.link( + "code": lambda text: rx.chakra.code(text, color="#1F1944", bg="#EAE4FD"), + "a": lambda text, **props: rx.chakra.link( text, **props, font_weight="bold", diff --git a/reflex/.templates/apps/sidebar/code/templates/template.py b/reflex/.templates/apps/sidebar/code/templates/template.py index 4664b6035..1ba46d309 100644 --- a/reflex/.templates/apps/sidebar/code/templates/template.py +++ b/reflex/.templates/apps/sidebar/code/templates/template.py @@ -25,19 +25,19 @@ def menu_button() -> rx.Component: """ from reflex.page import get_decorated_pages - return rx.box( - rx.menu( - rx.menu_button( - rx.icon( + return rx.chakra.box( + rx.chakra.menu( + rx.chakra.menu_button( + rx.chakra.icon( tag="hamburger", size="4em", color=styles.text_color, ), ), - rx.menu_list( + rx.chakra.menu_list( *[ - rx.menu_item( - rx.link( + rx.chakra.menu_item( + rx.chakra.link( page["title"], href=page["route"], width="100%", @@ -45,12 +45,16 @@ def menu_button() -> rx.Component: ) for page in get_decorated_pages() ], - rx.menu_divider(), - rx.menu_item( - rx.link("About", href="https://github.com/reflex-dev", width="100%") + rx.chakra.menu_divider(), + rx.chakra.menu_item( + rx.chakra.link( + "About", href="https://github.com/reflex-dev", width="100%" + ) ), - rx.menu_item( - rx.link("Contact", href="mailto:founders@=reflex.dev", width="100%") + rx.chakra.menu_item( + rx.chakra.link( + "Contact", href="mailto:founders@=reflex.dev", width="100%" + ) ), ), ), @@ -107,10 +111,10 @@ def template( on_load=on_load, ) def templated_page(): - return rx.hstack( + return rx.chakra.hstack( sidebar(), - rx.box( - rx.box( + rx.chakra.box( + rx.chakra.box( page_content(), **styles.template_content_style, ), From eafe53369e4cfd8adcf76464a7039efed474400d Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 12 Feb 2024 14:55:39 -0800 Subject: [PATCH 23/68] keep-chakra: whitelist is always whitelist (#2585) Regardless of whether the same name exists in the top level rx. namespace, always convert whitelisted names to rx.chakra. --- reflex/utils/prerequisites.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 19ed398ec..25119458e 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -1003,18 +1003,17 @@ def _get_rx_chakra_component_to_migrate() -> set[str]: rx_chakra_names = set(dir(reflex.chakra)) names_to_migrate = set() + + # whitelist names will always be rewritten as rx.chakra. whitelist = { - "CodeBlock", "ColorModeIcon", "MultiSelect", "MultiSelectOption", - "base", - "code_block", - "color_mode_cond", "color_mode_icon", "multi_select", "multi_select_option", } + for rx_chakra_name in sorted(rx_chakra_names): if rx_chakra_name.startswith("_"): continue @@ -1032,12 +1031,8 @@ def _get_rx_chakra_component_to_migrate() -> set[str]: rx_chakra_object, ChakraComponent ): names_to_migrate.add(rx_chakra_name) - pass - else: - # For the given rx.chakra., does rx. exist? - # And of these, should we include in migration? - if hasattr(reflex, rx_chakra_name) and rx_chakra_name in whitelist: - names_to_migrate.add(rx_chakra_name) + elif rx_chakra_name in whitelist: + names_to_migrate.add(rx_chakra_name) except Exception: raise From 71e4d539f618f3bc907b166873fe8a16bbb3975b Mon Sep 17 00:00:00 2001 From: Tom Gotsman <64492814+tgberkeley@users.noreply.github.com> Date: Mon, 12 Feb 2024 15:19:05 -0800 Subject: [PATCH 24/68] Remove dropdown menu sub content extra props (#2582) --- .../radix/themes/components/checkbox.py | 62 ++++++++++++++++--- .../radix/themes/components/checkbox.pyi | 40 ++++++------ .../radix/themes/components/dropdownmenu.py | 12 ---- .../radix/themes/components/dropdownmenu.pyi | 8 --- 4 files changed, 75 insertions(+), 47 deletions(-) diff --git a/reflex/components/radix/themes/components/checkbox.py b/reflex/components/radix/themes/components/checkbox.py index 455b92530..60e186406 100644 --- a/reflex/components/radix/themes/components/checkbox.py +++ b/reflex/components/radix/themes/components/checkbox.py @@ -11,11 +11,11 @@ from reflex.vars import Var from ..base import ( LiteralAccentColor, LiteralSize, - LiteralVariant, RadixThemesComponent, ) LiteralCheckboxSize = Literal["1", "2", "3"] +LiteralCheckboxVariant = Literal["classic", "surface", "soft"] class Checkbox(RadixThemesComponent): @@ -26,16 +26,16 @@ class Checkbox(RadixThemesComponent): # Change the default rendered element for the one passed as a child, merging their props and behavior. as_child: Var[bool] - # Button size "1" - "3" + # Checkbox size "1" - "3" size: Var[LiteralCheckboxSize] - # Variant of button: "solid" | "soft" | "outline" | "ghost" - variant: Var[LiteralVariant] + # Variant of checkbox: "classic" | "surface" | "soft" + variant: Var[LiteralCheckboxVariant] - # Override theme color for button + # Override theme color for checkbox color_scheme: Var[LiteralAccentColor] - # Whether to render the button with higher contrast color against background + # Whether to render the checkbox with higher contrast color against background high_contrast: Var[bool] # Whether the checkbox is checked by default @@ -71,18 +71,64 @@ class Checkbox(RadixThemesComponent): } -class HighLevelCheckbox(Checkbox): +class HighLevelCheckbox(RadixThemesComponent): """A checkbox component with a label.""" + tag = "Checkbox" + # The text label for the checkbox. text: Var[str] # The gap between the checkbox and the label. gap: Var[LiteralSize] - # The size of the checkbox. + # The size of the checkbox "1" - "3". size: Var[LiteralCheckboxSize] + # Change the default rendered element for the one passed as a child, merging their props and behavior. + as_child: Var[bool] + + # Variant of checkbox: "classic" | "surface" | "soft" + variant: Var[LiteralCheckboxVariant] + + # Override theme color for checkbox + color_scheme: Var[LiteralAccentColor] + + # Whether to render the checkbox with higher contrast color against background + high_contrast: Var[bool] + + # Whether the checkbox is checked by default + default_checked: Var[bool] + + # Whether the checkbox is checked + checked: Var[bool] + + # Whether the checkbox is disabled + disabled: Var[bool] + + # Whether the checkbox is required + required: Var[bool] + + # The name of the checkbox control when submitting the form. + name: Var[str] + + # The value of the checkbox control when submitting the form. + value: Var[str] + + # Props to rename + _rename_props = {"onChange": "onCheckedChange"} + + def get_event_triggers(self) -> Dict[str, Any]: + """Get the events triggers signatures for the component. + + Returns: + The signatures of the event triggers. + """ + return { + **super().get_event_triggers(), + EventTriggers.ON_CHANGE: lambda e0: [e0], + } + @classmethod def create(cls, text: Var[str] = Var.create_safe(""), **props) -> Component: """Create a checkbox with a label. diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index 42a57ef86..8ff9e64ef 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -14,9 +14,10 @@ from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.constants import EventTriggers from reflex.vars import Var -from ..base import LiteralAccentColor, LiteralSize, LiteralVariant, RadixThemesComponent +from ..base import LiteralAccentColor, LiteralSize, RadixThemesComponent LiteralCheckboxSize = Literal["1", "2", "3"] +LiteralCheckboxVariant = Literal["classic", "surface", "soft"] class Checkbox(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @@ -94,8 +95,8 @@ class Checkbox(RadixThemesComponent): ] = None, variant: Optional[ Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, @@ -172,9 +173,9 @@ class Checkbox(RadixThemesComponent): color: map to CSS default color property. color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - size: Button size "1" - "3" - variant: Variant of button: "solid" | "soft" | "outline" | "ghost" - high_contrast: Whether to render the button with higher contrast color against background + size: Checkbox size "1" - "3" + variant: Variant of checkbox: "classic" | "surface" | "soft" + high_contrast: Whether to render the checkbox with higher contrast color against background default_checked: Whether the checkbox is checked by default checked: Whether the checkbox is checked disabled: Whether the checkbox is disabled @@ -195,7 +196,8 @@ class Checkbox(RadixThemesComponent): """ ... -class HighLevelCheckbox(Checkbox): +class HighLevelCheckbox(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod def create( # type: ignore @@ -214,8 +216,8 @@ class HighLevelCheckbox(Checkbox): as_child: Optional[Union[Var[bool], bool]] = None, variant: Optional[ Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], ] ] = None, color_scheme: Optional[ @@ -350,11 +352,11 @@ class HighLevelCheckbox(Checkbox): text: The text of the label. text: The text label for the checkbox. gap: The gap between the checkbox and the label. - size: Button size "1" - "3" + size: The size of the checkbox "1" - "3". as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - variant: Variant of button: "solid" | "soft" | "outline" | "ghost" - color_scheme: Override theme color for button - high_contrast: Whether to render the button with higher contrast color against background + variant: Variant of checkbox: "classic" | "surface" | "soft" + color_scheme: Override theme color for checkbox + high_contrast: Whether to render the checkbox with higher contrast color against background default_checked: Whether the checkbox is checked by default checked: Whether the checkbox is checked disabled: Whether the checkbox is disabled @@ -392,8 +394,8 @@ class CheckboxNamespace(SimpleNamespace): as_child: Optional[Union[Var[bool], bool]] = None, variant: Optional[ Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], ] ] = None, color_scheme: Optional[ @@ -528,11 +530,11 @@ class CheckboxNamespace(SimpleNamespace): text: The text of the label. text: The text label for the checkbox. gap: The gap between the checkbox and the label. - size: Button size "1" - "3" + size: The size of the checkbox "1" - "3". as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - variant: Variant of button: "solid" | "soft" | "outline" | "ghost" - color_scheme: Override theme color for button - high_contrast: Whether to render the button with higher contrast color against background + variant: Variant of checkbox: "classic" | "surface" | "soft" + color_scheme: Override theme color for checkbox + high_contrast: Whether to render the checkbox with higher contrast color against background default_checked: Whether the checkbox is checked by default checked: Whether the checkbox is checked disabled: Whether the checkbox is disabled diff --git a/reflex/components/radix/themes/components/dropdownmenu.py b/reflex/components/radix/themes/components/dropdownmenu.py index 64686bd92..8d21525cf 100644 --- a/reflex/components/radix/themes/components/dropdownmenu.py +++ b/reflex/components/radix/themes/components/dropdownmenu.py @@ -185,18 +185,6 @@ class DropdownMenuSubContent(RadixThemesComponent): tag = "DropdownMenu.SubContent" - # Dropdown Menu Sub Content size "1" - "2" - size: Var[LiteralSizeType] - - # Variant of Dropdown Menu Sub Content: "solid" | "soft" - variant: Var[LiteralVariantType] - - # Override theme color for Dropdown Menu Sub Content - color_scheme: Var[LiteralAccentColor] - - # Whether to render the component with higher contrast color against background - high_contrast: Var[bool] - # Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. as_child: Var[bool] diff --git a/reflex/components/radix/themes/components/dropdownmenu.pyi b/reflex/components/radix/themes/components/dropdownmenu.pyi index 32f752e13..8c3d55aaa 100644 --- a/reflex/components/radix/themes/components/dropdownmenu.pyi +++ b/reflex/components/radix/themes/components/dropdownmenu.pyi @@ -915,11 +915,6 @@ class DropdownMenuSubContent(RadixThemesComponent): ], ] ] = None, - size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, - variant: Optional[ - Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] - ] = None, - high_contrast: Optional[Union[Var[bool], bool]] = None, as_child: Optional[Union[Var[bool], bool]] = None, loop: Optional[Union[Var[bool], bool]] = None, force_mount: Optional[Union[Var[bool], bool]] = None, @@ -1014,9 +1009,6 @@ class DropdownMenuSubContent(RadixThemesComponent): *children: Child components. color: map to CSS default color property. color_scheme: map to radix color property. - size: Dropdown Menu Sub Content size "1" - "2" - variant: Variant of Dropdown Menu Sub Content: "solid" | "soft" - high_contrast: Whether to render the component with higher contrast color against background as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. loop: When True, keyboard navigation will loop from last item to first, and vice versa. Defaults to False. force_mount: Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. From 5c6a800b62e9d3f3eab4a25cf7635ae9847f884d Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Tue, 13 Feb 2024 06:20:36 +0700 Subject: [PATCH 25/68] Update styles for progress (#2570) --- reflex/components/radix/primitives/progress.py | 15 +++++++++------ reflex/components/radix/primitives/progress.pyi | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/reflex/components/radix/primitives/progress.py b/reflex/components/radix/primitives/progress.py index eed28c651..486ad2148 100644 --- a/reflex/components/radix/primitives/progress.py +++ b/reflex/components/radix/primitives/progress.py @@ -6,6 +6,7 @@ from types import SimpleNamespace from typing import Optional from reflex.components.component import Component +from reflex.components.radix.primitives.accordion import DEFAULT_ANIMATION_DURATION from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName from reflex.style import Style from reflex.vars import Var @@ -34,10 +35,11 @@ class ProgressRoot(ProgressComponent): { "position": "relative", "overflow": "hidden", - "background": "black", + "background": "var(--gray-a3)", "border_radius": "99999px", - "width": "300px", - "height": "25px", + "width": "100%", + "height": "20px", + "boxShadow": "inset 0 0 0 1px var(--gray-a5)", **self.style, } ) @@ -56,14 +58,15 @@ class ProgressIndicator(ProgressComponent): def _apply_theme(self, theme: Component): self.style = Style( { - "background-color": "white", + "background-color": "var(--accent-9)", "width": "100%", "height": "100%", - "transition": f"transform 660ms linear", + f"transition": f"transform {DEFAULT_ANIMATION_DURATION}ms linear", "&[data_state='loading']": { - "transition": f"transform 660ms linear", + "transition": f"transform {DEFAULT_ANIMATION_DURATION}ms linear", }, "transform": f"translateX(-{100 - self.value}%)", # type: ignore + "boxShadow": "inset 0 0 0 1px var(--gray-a5)", } ) diff --git a/reflex/components/radix/primitives/progress.pyi b/reflex/components/radix/primitives/progress.pyi index e34a297d3..bc4a82b3c 100644 --- a/reflex/components/radix/primitives/progress.pyi +++ b/reflex/components/radix/primitives/progress.pyi @@ -10,6 +10,7 @@ from reflex.style import Style from types import SimpleNamespace from typing import Optional from reflex.components.component import Component +from reflex.components.radix.primitives.accordion import DEFAULT_ANIMATION_DURATION from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName from reflex.style import Style from reflex.vars import Var From de30e15b1d641f910acd3299f8ff78e5700c5bb6 Mon Sep 17 00:00:00 2001 From: Alek Petuskey Date: Mon, 12 Feb 2024 15:29:45 -0800 Subject: [PATCH 26/68] Add alias for Vaul drawer (#2586) --- reflex/components/radix/primitives/drawer.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/reflex/components/radix/primitives/drawer.py b/reflex/components/radix/primitives/drawer.py index b9223c1f2..8e091d4b7 100644 --- a/reflex/components/radix/primitives/drawer.py +++ b/reflex/components/radix/primitives/drawer.py @@ -32,6 +32,8 @@ class DrawerRoot(DrawerComponent): tag = "Drawer.Root" + alias = "Vaul" + tag + # Whether the drawer is open or not. open: Var[bool] @@ -83,6 +85,8 @@ class DrawerTrigger(DrawerComponent): tag = "Drawer.Trigger" + alias = "Vaul" + tag + as_child: Var[bool] @@ -91,6 +95,8 @@ class DrawerPortal(DrawerComponent): tag = "Drawer.Portal" + alias = "Vaul" + tag + # Based on https://www.radix-ui.com/primitives/docs/components/dialog#content class DrawerContent(DrawerComponent): @@ -98,6 +104,8 @@ class DrawerContent(DrawerComponent): tag = "Drawer.Content" + alias = "Vaul" + tag + # Style set partially based on the source code at https://ui.shadcn.com/docs/components/drawer def _get_style(self) -> dict: """Get the style for the component. @@ -146,6 +154,8 @@ class DrawerOverlay(DrawerComponent): tag = "Drawer.Overlay" + alias = "Vaul" + tag + # Style set based on the source code at https://ui.shadcn.com/docs/components/drawer def _get_style(self) -> dict: """Get the style for the component. @@ -177,12 +187,16 @@ class DrawerClose(DrawerComponent): tag = "Drawer.Close" + alias = "Vaul" + tag + class DrawerTitle(DrawerComponent): """A title for the drawer.""" tag = "Drawer.Title" + alias = "Vaul" + tag + # Style set based on the source code at https://ui.shadcn.com/docs/components/drawer def _get_style(self) -> dict: """Get the style for the component. @@ -211,6 +225,8 @@ class DrawerDescription(DrawerComponent): tag = "Drawer.Description" + alias = "Vaul" + tag + # Style set based on the source code at https://ui.shadcn.com/docs/components/drawer def _get_style(self) -> dict: """Get the style for the component. From 977a9d632b020bfa962d8973f64d5878ffaa8f71 Mon Sep 17 00:00:00 2001 From: Brandon Hsiao Date: Mon, 12 Feb 2024 18:38:34 -0800 Subject: [PATCH 27/68] add fixes to rx.progress --- reflex/components/radix/primitives/progress.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reflex/components/radix/primitives/progress.py b/reflex/components/radix/primitives/progress.py index 486ad2148..8d502577a 100644 --- a/reflex/components/radix/primitives/progress.py +++ b/reflex/components/radix/primitives/progress.py @@ -65,7 +65,7 @@ class ProgressIndicator(ProgressComponent): "&[data_state='loading']": { "transition": f"transform {DEFAULT_ANIMATION_DURATION}ms linear", }, - "transform": f"translateX(-{100 - self.value}%)", # type: ignore + "transform": f"translateX(calc(-100% + {self.value}%))", # type: ignore "boxShadow": "inset 0 0 0 1px var(--gray-a5)", } ) @@ -78,7 +78,7 @@ class Progress(SimpleNamespace): indicator = staticmethod(ProgressIndicator.create) @staticmethod - def __call__(**props) -> Component: + def __call__(width: Optional[str] = "100%", **props) -> Component: """High level API for progress bar. Args: @@ -88,7 +88,7 @@ class Progress(SimpleNamespace): The progress bar. """ return ProgressRoot.create( - ProgressIndicator.create(value=props.get("value")), + ProgressIndicator.create(width=width, value=props.get("value")), **props, ) From 481c9d9dbd816227fc75a702cfb1aac667d61bf3 Mon Sep 17 00:00:00 2001 From: Brandon Hsiao Date: Mon, 12 Feb 2024 18:57:52 -0800 Subject: [PATCH 28/68] fix, lint --- reflex/components/radix/primitives/progress.py | 7 ++++++- reflex/components/radix/primitives/progress.pyi | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/reflex/components/radix/primitives/progress.py b/reflex/components/radix/primitives/progress.py index 8d502577a..08c79bbed 100644 --- a/reflex/components/radix/primitives/progress.py +++ b/reflex/components/radix/primitives/progress.py @@ -82,13 +82,18 @@ class Progress(SimpleNamespace): """High level API for progress bar. Args: + width: The width of the progerss bar **props: The props of the progress bar Returns: The progress bar. """ + + style = props.setdefault("style", {}) + style.update({"width": width}) + return ProgressRoot.create( - ProgressIndicator.create(width=width, value=props.get("value")), + ProgressIndicator.create(value=props.get("value")), **props, ) diff --git a/reflex/components/radix/primitives/progress.pyi b/reflex/components/radix/primitives/progress.pyi index bc4a82b3c..61186c33b 100644 --- a/reflex/components/radix/primitives/progress.pyi +++ b/reflex/components/radix/primitives/progress.pyi @@ -275,6 +275,6 @@ class Progress(SimpleNamespace): indicator = staticmethod(ProgressIndicator.create) @staticmethod - def __call__(**props) -> Component: ... + def __call__(width: Optional[str] = "100%", **props) -> Component: ... progress = Progress() From de6835f4643bdd8ef7b1d528824335e9dbdda360 Mon Sep 17 00:00:00 2001 From: Brandon Hsiao Date: Mon, 12 Feb 2024 19:16:20 -0800 Subject: [PATCH 29/68] ruff --- reflex/components/radix/primitives/progress.py | 1 - 1 file changed, 1 deletion(-) diff --git a/reflex/components/radix/primitives/progress.py b/reflex/components/radix/primitives/progress.py index 08c79bbed..5854c9e54 100644 --- a/reflex/components/radix/primitives/progress.py +++ b/reflex/components/radix/primitives/progress.py @@ -88,7 +88,6 @@ class Progress(SimpleNamespace): Returns: The progress bar. """ - style = props.setdefault("style", {}) style.update({"width": width}) From 61234ae164ac315326a47d9505e17ce8d5e77fc2 Mon Sep 17 00:00:00 2001 From: invrainbow <77120437+invrainbow@users.noreply.github.com> Date: Mon, 12 Feb 2024 19:30:25 -0800 Subject: [PATCH 30/68] Fix operator precedence (#2573) --- reflex/utils/format.py | 17 ++++++- reflex/vars.py | 3 ++ tests/components/layout/test_match.py | 6 +-- tests/components/test_component.py | 2 +- tests/test_var.py | 66 +++++++++++++-------------- 5 files changed, 56 insertions(+), 38 deletions(-) diff --git a/reflex/utils/format.py b/reflex/utils/format.py index 9c67f1fc0..aaa371c2a 100644 --- a/reflex/utils/format.py +++ b/reflex/utils/format.py @@ -52,6 +52,10 @@ def get_close_char(open: str, close: str | None = None) -> str: def is_wrapped(text: str, open: str, close: str | None = None) -> bool: """Check if the given text is wrapped in the given open and close characters. + "(a) + (b)" --> False + "((abc))" --> True + "(abc)" --> True + Args: text: The text to check. open: The open character. @@ -61,7 +65,18 @@ def is_wrapped(text: str, open: str, close: str | None = None) -> bool: Whether the text is wrapped. """ close = get_close_char(open, close) - return text.startswith(open) and text.endswith(close) + if not (text.startswith(open) and text.endswith(close)): + return False + + depth = 0 + for ch in text[:-1]: + if ch == open: + depth += 1 + if ch == close: + depth -= 1 + if depth == 0: # it shouldn't close before the end + return False + return True def wrap( diff --git a/reflex/vars.py b/reflex/vars.py index 98118b1d1..4e605f9d6 100644 --- a/reflex/vars.py +++ b/reflex/vars.py @@ -736,6 +736,9 @@ class Var: left_operand_full_name = get_operand_full_name(left_operand) right_operand_full_name = get_operand_full_name(right_operand) + left_operand_full_name = format.wrap(left_operand_full_name, "(") + right_operand_full_name = format.wrap(right_operand_full_name, "(") + # apply function to operands if fn is not None: if invoke_fn: diff --git a/tests/components/layout/test_match.py b/tests/components/layout/test_match.py index b8be69721..ad9e7cb4e 100644 --- a/tests/components/layout/test_match.py +++ b/tests/components/layout/test_match.py @@ -72,7 +72,7 @@ def test_match_components(): assert fifth_return_value_render["name"] == "RadixThemesText" assert fifth_return_value_render["children"][0]["contents"] == "{`fifth value`}" - assert match_cases[5][0]._var_name == "(match_state.num + 1)" + assert match_cases[5][0]._var_name == "((match_state.num) + (1))" assert match_cases[5][0]._var_type == int fifth_return_value_render = match_cases[5][1].render() assert fifth_return_value_render["name"] == "RadixThemesText" @@ -102,7 +102,7 @@ def test_match_components(): "(() => { switch (JSON.stringify(match_state.value)) {case JSON.stringify(1): return (`first`); break;case JSON.stringify(2): case JSON.stringify(3): return " "(`second value`); break;case JSON.stringify([1, 2]): return (`third-value`); break;case JSON.stringify(`random`): " 'return (`fourth_value`); break;case JSON.stringify({"foo": "bar"}): return (`fifth value`); ' - "break;case JSON.stringify((match_state.num + 1)): return (`sixth value`); break;case JSON.stringify(`${match_state.value} - string`): " + "break;case JSON.stringify(((match_state.num) + (1))): return (`sixth value`); break;case JSON.stringify(`${match_state.value} - string`): " "return (match_state.string); break;case JSON.stringify(match_state.string): return (`${match_state.value} - string`); break;default: " "return (`default value`); break;};})()", ), @@ -121,7 +121,7 @@ def test_match_components(): "(() => { switch (JSON.stringify(match_state.value)) {case JSON.stringify(1): return (`first`); break;case JSON.stringify(2): case JSON.stringify(3): return " "(`second value`); break;case JSON.stringify([1, 2]): return (`third-value`); break;case JSON.stringify(`random`): " 'return (`fourth_value`); break;case JSON.stringify({"foo": "bar"}): return (`fifth value`); ' - "break;case JSON.stringify((match_state.num + 1)): return (`sixth value`); break;case JSON.stringify(`${match_state.value} - string`): " + "break;case JSON.stringify(((match_state.num) + (1))): return (`sixth value`); break;case JSON.stringify(`${match_state.value} - string`): " "return (match_state.string); break;case JSON.stringify(match_state.string): return (`${match_state.value} - string`); break;default: " "return (match_state.string); break;};})()", ), diff --git a/tests/components/test_component.py b/tests/components/test_component.py index b7783e0f8..3c0c09d7e 100644 --- a/tests/components/test_component.py +++ b/tests/components/test_component.py @@ -450,7 +450,7 @@ def test_component_event_trigger_arbitrary_args(): assert comp.render()["props"][0] == ( "onFoo={(__e,_alpha,_bravo,_charlie) => addEvents(" - '[Event("c1_state.mock_handler", {_e:__e.target.value,_bravo:_bravo["nested"],_charlie:(_charlie.custom + 42)})], ' + '[Event("c1_state.mock_handler", {_e:__e.target.value,_bravo:_bravo["nested"],_charlie:((_charlie.custom) + (42))})], ' "(__e,_alpha,_bravo,_charlie), {})}" ) diff --git a/tests/test_var.py b/tests/test_var.py index df9b7453e..3f2f9c4fa 100644 --- a/tests/test_var.py +++ b/tests/test_var.py @@ -245,30 +245,30 @@ def test_basic_operations(TestObj): Args: TestObj: The test object. """ - assert str(v(1) == v(2)) == "{(1 === 2)}" - assert str(v(1) != v(2)) == "{(1 !== 2)}" - assert str(v(1) < v(2)) == "{(1 < 2)}" - assert str(v(1) <= v(2)) == "{(1 <= 2)}" - assert str(v(1) > v(2)) == "{(1 > 2)}" - assert str(v(1) >= v(2)) == "{(1 >= 2)}" - assert str(v(1) + v(2)) == "{(1 + 2)}" - assert str(v(1) - v(2)) == "{(1 - 2)}" - assert str(v(1) * v(2)) == "{(1 * 2)}" - assert str(v(1) / v(2)) == "{(1 / 2)}" - assert str(v(1) // v(2)) == "{Math.floor(1 / 2)}" - assert str(v(1) % v(2)) == "{(1 % 2)}" - assert str(v(1) ** v(2)) == "{Math.pow(1 , 2)}" - assert str(v(1) & v(2)) == "{(1 && 2)}" - assert str(v(1) | v(2)) == "{(1 || 2)}" + assert str(v(1) == v(2)) == "{((1) === (2))}" + assert str(v(1) != v(2)) == "{((1) !== (2))}" + assert str(v(1) < v(2)) == "{((1) < (2))}" + assert str(v(1) <= v(2)) == "{((1) <= (2))}" + assert str(v(1) > v(2)) == "{((1) > (2))}" + assert str(v(1) >= v(2)) == "{((1) >= (2))}" + assert str(v(1) + v(2)) == "{((1) + (2))}" + assert str(v(1) - v(2)) == "{((1) - (2))}" + assert str(v(1) * v(2)) == "{((1) * (2))}" + assert str(v(1) / v(2)) == "{((1) / (2))}" + assert str(v(1) // v(2)) == "{Math.floor((1) / (2))}" + assert str(v(1) % v(2)) == "{((1) % (2))}" + assert str(v(1) ** v(2)) == "{Math.pow((1) , (2))}" + assert str(v(1) & v(2)) == "{((1) && (2))}" + assert str(v(1) | v(2)) == "{((1) || (2))}" assert str(v([1, 2, 3])[v(0)]) == "{[1, 2, 3].at(0)}" assert str(v({"a": 1, "b": 2})["a"]) == '{{"a": 1, "b": 2}["a"]}' - assert str(v("foo") == v("bar")) == '{("foo" === "bar")}' + assert str(v("foo") == v("bar")) == '{(("foo") === ("bar"))}' assert ( str( Var.create("foo", _var_is_local=False) == Var.create("bar", _var_is_local=False) ) - == "{(foo === bar)}" + == "{((foo) === (bar))}" ) assert ( str( @@ -279,7 +279,7 @@ def test_basic_operations(TestObj): _var_name="bar", _var_type=str, _var_is_string=True, _var_is_local=True ) ) - == "(`foo` === `bar`)" + == "((`foo`) === (`bar`))" ) assert ( str( @@ -295,7 +295,7 @@ def test_basic_operations(TestObj): _var_name="bar", _var_type=str, _var_is_string=True, _var_is_local=True ) ) - == "{(state.foo.bar === `bar`)}" + == "{((state.foo.bar) === (`bar`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=TestObj)._var_set_state("state").bar) @@ -303,7 +303,7 @@ def test_basic_operations(TestObj): ) assert str(abs(v(1))) == "{Math.abs(1)}" assert str(v([1, 2, 3]).length()) == "{[1, 2, 3].length}" - assert str(v([1, 2]) + v([3, 4])) == "{spreadArraysOrObjects([1, 2] , [3, 4])}" + assert str(v([1, 2]) + v([3, 4])) == "{spreadArraysOrObjects(([1, 2]) , ([3, 4]))}" # Tests for reverse operation assert str(v([1, 2, 3]).reverse()) == "{[...[1, 2, 3]].reverse()}" @@ -319,55 +319,55 @@ def test_basic_operations(TestObj): assert str(BaseVar(_var_name="foo", _var_type=str)._type()) == "{typeof foo}" # type: ignore assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() == str) # type: ignore - == "{(typeof foo === `string`)}" + == "{((typeof foo) === (`string`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() == str) # type: ignore - == "{(typeof foo === `string`)}" + == "{((typeof foo) === (`string`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() == int) # type: ignore - == "{(typeof foo === `number`)}" + == "{((typeof foo) === (`number`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() == list) # type: ignore - == "{(typeof foo === `Array`)}" + == "{((typeof foo) === (`Array`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() == float) # type: ignore - == "{(typeof foo === `number`)}" + == "{((typeof foo) === (`number`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() == tuple) # type: ignore - == "{(typeof foo === `Array`)}" + == "{((typeof foo) === (`Array`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() == dict) # type: ignore - == "{(typeof foo === `Object`)}" + == "{((typeof foo) === (`Object`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() != str) # type: ignore - == "{(typeof foo !== `string`)}" + == "{((typeof foo) !== (`string`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() != int) # type: ignore - == "{(typeof foo !== `number`)}" + == "{((typeof foo) !== (`number`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() != list) # type: ignore - == "{(typeof foo !== `Array`)}" + == "{((typeof foo) !== (`Array`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() != float) # type: ignore - == "{(typeof foo !== `number`)}" + == "{((typeof foo) !== (`number`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() != tuple) # type: ignore - == "{(typeof foo !== `Array`)}" + == "{((typeof foo) !== (`Array`))}" ) assert ( str(BaseVar(_var_name="foo", _var_type=str)._type() != dict) # type: ignore - == "{(typeof foo !== `Object`)}" + == "{((typeof foo) !== (`Object`))}" ) From f05d5ba7ba66af1ec076a7c864b0be36bf566529 Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Tue, 13 Feb 2024 12:35:49 +0700 Subject: [PATCH 31/68] Rename components in top level namespace (#2589) --- integration/test_form_submit.py | 6 +- reflex/__init__.py | 12 +- reflex/__init__.pyi | 8 +- reflex/components/radix/primitives/form.py | 2 +- reflex/components/radix/primitives/form.pyi | 2 +- .../radix/themes/components/__init__.py | 26 +- .../{alertdialog.py => alert_dialog.py} | 0 .../radix/themes/components/alert_dialog.pyi | 1128 ++++++++++++++ .../{aspectratio.py => aspect_ratio.py} | 0 .../radix/themes/components/aspect_ratio.pyi | 162 ++ .../{contextmenu.py => context_menu.py} | 0 .../radix/themes/components/context_menu.pyi | 1249 +++++++++++++++ .../{dropdownmenu.py => dropdown_menu.py} | 2 +- .../radix/themes/components/dropdown_menu.pyi | 1350 +++++++++++++++++ .../{hovercard.py => hover_card.py} | 0 .../radix/themes/components/hover_card.pyi | 700 +++++++++ .../{iconbutton.py => icon_button.py} | 0 .../radix/themes/components/icon_button.pyi | 284 ++++ .../{radiogroup.py => radio_group.py} | 2 +- .../radix/themes/components/radio_group.pyi | 708 +++++++++ .../{scrollarea.py => scroll_area.py} | 0 .../radix/themes/components/scroll_area.pyi | 176 +++ .../radix/themes/components/separator.py | 3 +- .../radix/themes/components/separator.pyi | 2 +- .../components/{textarea.py => text_area.py} | 0 .../{textarea.pyi => text_area.pyi} | 2 +- .../{textfield.py => text_field.py} | 0 .../radix/themes/components/text_field.pyi | 1092 +++++++++++++ reflex/components/radix/themes/typography.py | 140 -- .../radix/themes/typography/__init__.py | 15 +- .../components/radix/themes/typography/em.py | 17 - .../components/radix/themes/typography/kbd.py | 24 - .../radix/themes/typography/quote.py | 17 - .../radix/themes/typography/strong.py | 17 - .../radix/themes/typography/text.py | 41 + .../radix/themes/typography/text.pyi | 1064 +++++++++++++ 36 files changed, 7988 insertions(+), 263 deletions(-) rename reflex/components/radix/themes/components/{alertdialog.py => alert_dialog.py} (100%) create mode 100644 reflex/components/radix/themes/components/alert_dialog.pyi rename reflex/components/radix/themes/components/{aspectratio.py => aspect_ratio.py} (100%) create mode 100644 reflex/components/radix/themes/components/aspect_ratio.pyi rename reflex/components/radix/themes/components/{contextmenu.py => context_menu.py} (100%) create mode 100644 reflex/components/radix/themes/components/context_menu.pyi rename reflex/components/radix/themes/components/{dropdownmenu.py => dropdown_menu.py} (99%) create mode 100644 reflex/components/radix/themes/components/dropdown_menu.pyi rename reflex/components/radix/themes/components/{hovercard.py => hover_card.py} (100%) create mode 100644 reflex/components/radix/themes/components/hover_card.pyi rename reflex/components/radix/themes/components/{iconbutton.py => icon_button.py} (100%) create mode 100644 reflex/components/radix/themes/components/icon_button.pyi rename reflex/components/radix/themes/components/{radiogroup.py => radio_group.py} (99%) create mode 100644 reflex/components/radix/themes/components/radio_group.pyi rename reflex/components/radix/themes/components/{scrollarea.py => scroll_area.py} (100%) create mode 100644 reflex/components/radix/themes/components/scroll_area.pyi rename reflex/components/radix/themes/components/{textarea.py => text_area.py} (100%) rename reflex/components/radix/themes/components/{textarea.pyi => text_area.pyi} (99%) rename reflex/components/radix/themes/components/{textfield.py => text_field.py} (100%) create mode 100644 reflex/components/radix/themes/components/text_field.pyi delete mode 100644 reflex/components/radix/themes/typography.py delete mode 100644 reflex/components/radix/themes/typography/em.py delete mode 100644 reflex/components/radix/themes/typography/kbd.py delete mode 100644 reflex/components/radix/themes/typography/quote.py delete mode 100644 reflex/components/radix/themes/typography/strong.py diff --git a/integration/test_form_submit.py b/integration/test_form_submit.py index 8f7792eff..655630478 100644 --- a/integration/test_form_submit.py +++ b/integration/test_form_submit.py @@ -43,8 +43,8 @@ def FormSubmit(): rx.switch(id="bool_input4"), rx.slider(id="slider_input", default_value=[50], width="100%"), rx.chakra.range_slider(id="range_input"), - rx.radio_group(["option1", "option2"], id="radio_input"), - rx.radio_group(FormState.var_options, id="radio_input_var"), + rx.radio(["option1", "option2"], id="radio_input"), + rx.radio(FormState.var_options, id="radio_input_var"), rx.chakra.select(["option1", "option2"], id="select_input"), rx.chakra.select(FormState.var_options, id="select_input_var"), rx.text_area(id="text_area_input"), @@ -96,7 +96,7 @@ def FormSubmitName(): rx.switch(name="bool_input4"), rx.slider(name="slider_input", default_value=[50], width="100%"), rx.chakra.range_slider(name="range_input"), - rx.radio_group(FormState.options, name="radio_input"), + rx.radio(FormState.options, name="radio_input"), rx.select( FormState.options, name="select_input", diff --git a/reflex/__init__.py b/reflex/__init__.py index 956576ccf..62943d8b5 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -58,33 +58,27 @@ _ALL_COMPONENTS = [ "container", "context_menu", "dialog", + "divider", "drawer", - "dropdown_menu", - # "bold" (em) "flex", "form", "grid", "heading", "hover_card", "hstack", - # "icon" (lucide) "icon_button", "inset", "input", - "kbd", "link", + "menu", "popover", "progress", - "quote", - "radio_group", + "radio", "scroll_area", "section", "select", - "separator", - # "separator" (divider?), "slider", "spacer", - # "strong" (bold?) "stack", "switch", "table", diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index 8f66aeb85..58c5cf040 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -45,8 +45,8 @@ from reflex.components import code as code from reflex.components import container as container from reflex.components import context_menu as context_menu from reflex.components import dialog as dialog +from reflex.components import divider as divider from reflex.components import drawer as drawer -from reflex.components import dropdown_menu as dropdown_menu from reflex.components import flex as flex from reflex.components import form as form from reflex.components import grid as grid @@ -56,16 +56,14 @@ from reflex.components import hstack as hstack from reflex.components import icon_button as icon_button from reflex.components import inset as inset from reflex.components import input as input -from reflex.components import kbd as kbd from reflex.components import link as link +from reflex.components import menu as menu from reflex.components import popover as popover from reflex.components import progress as progress -from reflex.components import quote as quote -from reflex.components import radio_group as radio_group +from reflex.components import radio as radio from reflex.components import scroll_area as scroll_area from reflex.components import section as section from reflex.components import select as select -from reflex.components import separator as separator from reflex.components import slider as slider from reflex.components import spacer as spacer from reflex.components import stack as stack diff --git a/reflex/components/radix/primitives/form.py b/reflex/components/radix/primitives/form.py index 1b9c93db1..c8dde5e8d 100644 --- a/reflex/components/radix/primitives/form.py +++ b/reflex/components/radix/primitives/form.py @@ -9,7 +9,7 @@ from typing import Any, Dict, Iterator, Literal from jinja2 import Environment from reflex.components.component import Component -from reflex.components.radix.themes.components.textfield import TextFieldInput +from reflex.components.radix.themes.components.text_field import TextFieldInput from reflex.components.tags.tag import Tag from reflex.constants.base import Dirs from reflex.constants.event import EventTriggers diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index 1b549d88f..f2ea87c1f 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -12,7 +12,7 @@ from types import SimpleNamespace from typing import Any, Dict, Iterator, Literal from jinja2 import Environment from reflex.components.component import Component -from reflex.components.radix.themes.components.textfield import TextFieldInput +from reflex.components.radix.themes.components.text_field import TextFieldInput from reflex.components.tags.tag import Tag from reflex.constants.base import Dirs from reflex.constants.event import EventTriggers diff --git a/reflex/components/radix/themes/components/__init__.py b/reflex/components/radix/themes/components/__init__.py index 30efe0d65..55f7e02ae 100644 --- a/reflex/components/radix/themes/components/__init__.py +++ b/reflex/components/radix/themes/components/__init__.py @@ -1,30 +1,33 @@ """Radix themes components.""" -from .alertdialog import alert_dialog as alert_dialog -from .aspectratio import aspect_ratio as aspect_ratio +from .alert_dialog import alert_dialog as alert_dialog +from .aspect_ratio import aspect_ratio as aspect_ratio from .avatar import avatar as avatar from .badge import badge as badge from .button import button as button from .callout import callout as callout from .card import card as card from .checkbox import checkbox as checkbox -from .contextmenu import context_menu as context_menu +from .context_menu import context_menu as context_menu from .dialog import dialog as dialog -from .dropdownmenu import dropdown_menu as dropdown_menu -from .hovercard import hover_card as hover_card -from .iconbutton import icon_button as icon_button +from .dropdown_menu import dropdown_menu as dropdown_menu +from .dropdown_menu import menu as menu +from .hover_card import hover_card as hover_card +from .icon_button import icon_button as icon_button from .inset import inset as inset from .popover import popover as popover -from .radiogroup import radio_group as radio_group -from .scrollarea import scroll_area as scroll_area +from .radio_group import radio as radio +from .radio_group import radio_group as radio_group +from .scroll_area import scroll_area as scroll_area from .select import select as select +from .separator import divider as divider from .separator import separator as separator from .slider import slider as slider from .switch import switch as switch from .table import table as table from .tabs import tabs as tabs -from .textarea import text_area as text_area -from .textfield import text_field as text_field +from .text_area import text_area as text_area +from .text_field import text_field as text_field from .tooltip import tooltip as tooltip input = text_field @@ -40,12 +43,15 @@ __all__ = [ "checkbox", "context_menu", "dialog", + "divider", "dropdown_menu", "hover_card", "icon_button", "input", "inset", + "menu", "popover", + "radio", "radio_group", "scroll_area", "select", diff --git a/reflex/components/radix/themes/components/alertdialog.py b/reflex/components/radix/themes/components/alert_dialog.py similarity index 100% rename from reflex/components/radix/themes/components/alertdialog.py rename to reflex/components/radix/themes/components/alert_dialog.py diff --git a/reflex/components/radix/themes/components/alert_dialog.pyi b/reflex/components/radix/themes/components/alert_dialog.pyi new file mode 100644 index 000000000..9ba8fa07f --- /dev/null +++ b/reflex/components/radix/themes/components/alert_dialog.pyi @@ -0,0 +1,1128 @@ +"""Stub file for reflex/components/radix/themes/components/alert_dialog.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +from types import SimpleNamespace +from typing import Any, Dict, Literal +from reflex import el +from reflex.constants import EventTriggers +from reflex.vars import Var +from ..base import RadixThemesComponent + +LiteralContentSize = Literal["1", "2", "3", "4"] + +class AlertDialogRoot(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + open: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AlertDialogRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + open: The controlled open state of the dialog. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class AlertDialogTrigger(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AlertDialogTrigger": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class AlertDialogContent(el.Div, RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + ] = None, + force_mount: Optional[Union[Var[bool], bool]] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_close_auto_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_escape_key_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_auto_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AlertDialogContent": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + size: The size of the content. + force_mount: Whether to force mount the content on open. + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class AlertDialogTitle(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AlertDialogTitle": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class AlertDialogDescription(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AlertDialogDescription": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class AlertDialogAction(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AlertDialogAction": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class AlertDialogCancel(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AlertDialogCancel": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class AlertDialog(SimpleNamespace): + root = staticmethod(AlertDialogRoot.create) + trigger = staticmethod(AlertDialogTrigger.create) + content = staticmethod(AlertDialogContent.create) + title = staticmethod(AlertDialogTitle.create) + description = staticmethod(AlertDialogDescription.create) + action = staticmethod(AlertDialogAction.create) + cancel = staticmethod(AlertDialogCancel.create) + +alert_dialog = AlertDialog() diff --git a/reflex/components/radix/themes/components/aspectratio.py b/reflex/components/radix/themes/components/aspect_ratio.py similarity index 100% rename from reflex/components/radix/themes/components/aspectratio.py rename to reflex/components/radix/themes/components/aspect_ratio.py diff --git a/reflex/components/radix/themes/components/aspect_ratio.pyi b/reflex/components/radix/themes/components/aspect_ratio.pyi new file mode 100644 index 000000000..2efcfc54f --- /dev/null +++ b/reflex/components/radix/themes/components/aspect_ratio.pyi @@ -0,0 +1,162 @@ +"""Stub file for reflex/components/radix/themes/components/aspect_ratio.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +from typing import Union +from reflex.vars import Var +from ..base import RadixThemesComponent + +class AspectRatio(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + ratio: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AspectRatio": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + ratio: The ratio of the width to the height of the element + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +aspect_ratio = AspectRatio.create diff --git a/reflex/components/radix/themes/components/contextmenu.py b/reflex/components/radix/themes/components/context_menu.py similarity index 100% rename from reflex/components/radix/themes/components/contextmenu.py rename to reflex/components/radix/themes/components/context_menu.py diff --git a/reflex/components/radix/themes/components/context_menu.pyi b/reflex/components/radix/themes/components/context_menu.pyi new file mode 100644 index 000000000..92ca55563 --- /dev/null +++ b/reflex/components/radix/themes/components/context_menu.pyi @@ -0,0 +1,1249 @@ +"""Stub file for reflex/components/radix/themes/components/context_menu.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +from types import SimpleNamespace +from typing import Any, Dict, List, Literal +from reflex.constants import EventTriggers +from reflex.vars import Var +from ..base import LiteralAccentColor, RadixThemesComponent + +class ContextMenuRoot(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + modal: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ContextMenuRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + modal: The modality of the context menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenuTrigger(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ContextMenuTrigger": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + disabled: Whether the trigger is disabled + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenuContent(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, + variant: Optional[ + Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + align_offset: Optional[Union[Var[int], int]] = None, + avoid_collisions: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_close_auto_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_escape_key_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_interact_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_pointer_down_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ContextMenuContent": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + size: Button size "1" - "4" + variant: Variant of button: "solid" | "soft" | "outline" | "ghost" + high_contrast: Whether to render the button with higher contrast color against background + align_offset: The vertical distance in pixels from the anchor. + avoid_collisions: When true, overrides the side and aligns preferences to prevent collisions with boundary edges. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenuSub(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ContextMenuSub": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenuSubTrigger(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ContextMenuSubTrigger": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + disabled: Whether the trigger is disabled + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenuSubContent(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + loop: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_escape_key_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_interact_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_pointer_down_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ContextMenuSubContent": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + loop: When true, keyboard navigation will loop from last item to first, and vice versa. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenuItem(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + shortcut: Optional[Union[Var[str], str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ContextMenuItem": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + shortcut: Shortcut to render a menu item as a link + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenuSeparator(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ContextMenuSeparator": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class ContextMenu(SimpleNamespace): + root = staticmethod(ContextMenuRoot.create) + trigger = staticmethod(ContextMenuTrigger.create) + content = staticmethod(ContextMenuContent.create) + sub = staticmethod(ContextMenuSub.create) + sub_trigger = staticmethod(ContextMenuSubTrigger.create) + sub_content = staticmethod(ContextMenuSubContent.create) + item = staticmethod(ContextMenuItem.create) + separator = staticmethod(ContextMenuSeparator.create) + +context_menu = ContextMenu() diff --git a/reflex/components/radix/themes/components/dropdownmenu.py b/reflex/components/radix/themes/components/dropdown_menu.py similarity index 99% rename from reflex/components/radix/themes/components/dropdownmenu.py rename to reflex/components/radix/themes/components/dropdown_menu.py index 8d21525cf..8911c512a 100644 --- a/reflex/components/radix/themes/components/dropdownmenu.py +++ b/reflex/components/radix/themes/components/dropdown_menu.py @@ -285,4 +285,4 @@ class DropdownMenu(SimpleNamespace): separator = staticmethod(DropdownMenuSeparator.create) -dropdown_menu = DropdownMenu() +menu = dropdown_menu = DropdownMenu() diff --git a/reflex/components/radix/themes/components/dropdown_menu.pyi b/reflex/components/radix/themes/components/dropdown_menu.pyi new file mode 100644 index 000000000..1b11e2b60 --- /dev/null +++ b/reflex/components/radix/themes/components/dropdown_menu.pyi @@ -0,0 +1,1350 @@ +"""Stub file for reflex/components/radix/themes/components/dropdown_menu.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +from types import SimpleNamespace +from typing import Any, Dict, List, Literal, Union +from reflex.constants import EventTriggers +from reflex.vars import Var +from ..base import LiteralAccentColor, RadixThemesComponent + +LiteralDirType = Literal["ltr", "rtl"] +LiteralSizeType = Literal["1", "2"] +LiteralVariantType = Literal["solid", "soft"] +LiteralSideType = Literal["top", "right", "bottom", "left"] +LiteralAlignType = Literal["start", "center", "end"] +LiteralStickyType = Literal["partial", "always"] + +class DropdownMenuRoot(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + default_open: Optional[Union[Var[bool], bool]] = None, + open: Optional[Union[Var[bool], bool]] = None, + modal: Optional[Union[Var[bool], bool]] = None, + dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DropdownMenuRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + default_open: The open state of the dropdown menu when it is initially rendered. Use when you do not need to control its open state. + open: The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange. + modal: The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. Defaults to True. + dir: The reading direction of submenus when applicable. If omitted, inherits globally from DirectionProvider or assumes LTR (left-to-right) reading mode. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class DropdownMenuTrigger(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DropdownMenuTrigger": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class DropdownMenuContent(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, + variant: Optional[ + Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + loop: Optional[Union[Var[bool], bool]] = None, + force_mount: Optional[Union[Var[bool], bool]] = None, + side: Optional[ + Union[ + Var[Literal["top", "right", "bottom", "left"]], + Literal["top", "right", "bottom", "left"], + ] + ] = None, + side_offset: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None, + align: Optional[ + Union[ + Var[Literal["start", "center", "end"]], + Literal["start", "center", "end"], + ] + ] = None, + align_offset: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None, + avoid_collisions: Optional[Union[Var[bool], bool]] = None, + collision_padding: Optional[ + Union[ + Var[Union[float, int, Dict[str, Union[float, int]]]], + Union[float, int, Dict[str, Union[float, int]]], + ] + ] = None, + arrow_padding: Optional[ + Union[Var[Union[float, int]], Union[float, int]] + ] = None, + sticky: Optional[ + Union[Var[Literal["partial", "always"]], Literal["partial", "always"]] + ] = None, + hide_when_detached: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_close_auto_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_escape_key_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_interact_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_pointer_down_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DropdownMenuContent": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + size: Dropdown Menu Content size "1" - "2" + variant: Variant of Dropdown Menu Content: "solid" | "soft" + high_contrast: Renders the Dropdown Menu Content in higher contrast + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + loop: When True, keyboard navigation will loop from last item to first, and vice versa. Defaults to False. + force_mount: Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. + side: The preferred side of the trigger to render against when open. Will be reversed when collisions occur and `avoid_collisions` is enabled.The position of the tooltip. Defaults to "top". + side_offset: The distance in pixels from the trigger. Defaults to 0. + align: The preferred alignment against the trigger. May change when collisions occur. Defaults to "center". + align_offset: An offset in pixels from the "start" or "end" alignment options. + avoid_collisions: When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True. + collision_padding: The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0. + arrow_padding: The padding between the arrow and the edges of the content. If your content has border-radius, this will prevent it from overflowing the corners. Defaults to 0. + sticky: The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial". + hide_when_detached: Whether to hide the content when the trigger becomes fully occluded. Defaults to False. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class DropdownMenuSubTrigger(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + text_value: Optional[Union[Var[str], str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DropdownMenuSubTrigger": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + disabled: When true, prevents the user from interacting with the item. + text_value: Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class DropdownMenuSub(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + open: Optional[Union[Var[bool], bool]] = None, + default_open: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DropdownMenuSub": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + open: The controlled open state of the submenu. Must be used in conjunction with `on_open_change`. + default_open: The open state of the submenu when it is initially rendered. Use when you do not need to control its open state. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class DropdownMenuSubContent(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + loop: Optional[Union[Var[bool], bool]] = None, + force_mount: Optional[Union[Var[bool], bool]] = None, + side_offset: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None, + align_offset: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None, + avoid_collisions: Optional[Union[Var[bool], bool]] = None, + collision_padding: Optional[ + Union[ + Var[Union[float, int, Dict[str, Union[float, int]]]], + Union[float, int, Dict[str, Union[float, int]]], + ] + ] = None, + arrow_padding: Optional[ + Union[Var[Union[float, int]], Union[float, int]] + ] = None, + sticky: Optional[ + Union[Var[Literal["partial", "always"]], Literal["partial", "always"]] + ] = None, + hide_when_detached: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_escape_key_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_interact_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_pointer_down_outside: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DropdownMenuSubContent": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + loop: When True, keyboard navigation will loop from last item to first, and vice versa. Defaults to False. + force_mount: Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. + side_offset: The distance in pixels from the trigger. Defaults to 0. + align_offset: An offset in pixels from the "start" or "end" alignment options. + avoid_collisions: When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True. + collision_padding: The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0. + arrow_padding: The padding between the arrow and the edges of the content. If your content has border-radius, this will prevent it from overflowing the corners. Defaults to 0. + sticky: The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial". + hide_when_detached: Whether to hide the content when the trigger becomes fully occluded. Defaults to False. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class DropdownMenuItem(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + shortcut: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + text_value: Optional[Union[Var[str], str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_select: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DropdownMenuItem": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + shortcut: Shortcut to render a menu item as a link + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. + disabled: When true, prevents the user from interacting with the item. + text_value: Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class DropdownMenuSeparator(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "DropdownMenuSeparator": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class DropdownMenu(SimpleNamespace): + root = staticmethod(DropdownMenuRoot.create) + trigger = staticmethod(DropdownMenuTrigger.create) + content = staticmethod(DropdownMenuContent.create) + sub_trigger = staticmethod(DropdownMenuSubTrigger.create) + sub = staticmethod(DropdownMenuSub.create) + sub_content = staticmethod(DropdownMenuSubContent.create) + item = staticmethod(DropdownMenuItem.create) + separator = staticmethod(DropdownMenuSeparator.create) + +menu = dropdown_menu = DropdownMenu() diff --git a/reflex/components/radix/themes/components/hovercard.py b/reflex/components/radix/themes/components/hover_card.py similarity index 100% rename from reflex/components/radix/themes/components/hovercard.py rename to reflex/components/radix/themes/components/hover_card.py diff --git a/reflex/components/radix/themes/components/hover_card.pyi b/reflex/components/radix/themes/components/hover_card.pyi new file mode 100644 index 000000000..9f74370aa --- /dev/null +++ b/reflex/components/radix/themes/components/hover_card.pyi @@ -0,0 +1,700 @@ +"""Stub file for reflex/components/radix/themes/components/hover_card.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +from types import SimpleNamespace +from typing import Any, Dict, Literal +from reflex import el +from reflex.constants import EventTriggers +from reflex.vars import Var +from ..base import RadixThemesComponent + +class HoverCardRoot(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + default_open: Optional[Union[Var[bool], bool]] = None, + open: Optional[Union[Var[bool], bool]] = None, + open_delay: Optional[Union[Var[int], int]] = None, + close_delay: Optional[Union[Var[int], int]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "HoverCardRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state. + open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange. + open_delay: The duration from when the mouse enters the trigger until the hover card opens. + close_delay: The duration from when the mouse leaves the trigger until the hover card closes. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class HoverCardTrigger(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "HoverCardTrigger": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class HoverCardContent(el.Div, RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + side: Optional[ + Union[ + Var[Literal["top", "right", "bottom", "left"]], + Literal["top", "right", "bottom", "left"], + ] + ] = None, + side_offset: Optional[Union[Var[int], int]] = None, + align: Optional[ + Union[ + Var[Literal["start", "center", "end"]], + Literal["start", "center", "end"], + ] + ] = None, + avoid_collisions: Optional[Union[Var[bool], bool]] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "HoverCardContent": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + side: The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled. + side_offset: The distance in pixels from the trigger. + align: The preferred alignment against the trigger. May change when collisions occur. + avoid_collisions: Whether or not the hover card should avoid collisions with its trigger. + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class HoverCard(SimpleNamespace): + root = staticmethod(HoverCardRoot.create) + trigger = staticmethod(HoverCardTrigger.create) + content = staticmethod(HoverCardContent.create) + + @staticmethod + def __call__( + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + default_open: Optional[Union[Var[bool], bool]] = None, + open: Optional[Union[Var[bool], bool]] = None, + open_delay: Optional[Union[Var[int], int]] = None, + close_delay: Optional[Union[Var[int], int]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_open_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "HoverCardRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state. + open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange. + open_delay: The duration from when the mouse enters the trigger until the hover card opens. + close_delay: The duration from when the mouse leaves the trigger until the hover card closes. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +hover_card = HoverCard() diff --git a/reflex/components/radix/themes/components/iconbutton.py b/reflex/components/radix/themes/components/icon_button.py similarity index 100% rename from reflex/components/radix/themes/components/iconbutton.py rename to reflex/components/radix/themes/components/icon_button.py diff --git a/reflex/components/radix/themes/components/icon_button.pyi b/reflex/components/radix/themes/components/icon_button.pyi new file mode 100644 index 000000000..c0300b02f --- /dev/null +++ b/reflex/components/radix/themes/components/icon_button.pyi @@ -0,0 +1,284 @@ +"""Stub file for reflex/components/radix/themes/components/icon_button.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +from typing import Literal +from reflex import el +from reflex.components.component import Component +from reflex.components.core.match import Match +from reflex.components.lucide import Icon +from reflex.style import Style +from reflex.vars import Var +from ..base import ( + LiteralAccentColor, + LiteralRadius, + LiteralVariant, + RadixThemesComponent, +) + +LiteralButtonSize = Literal["1", "2", "3", "4"] + +class IconButton(el.Button, RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + radius: Optional[ + Union[ + Var[Literal["none", "small", "medium", "large", "full"]], + Literal["none", "small", "medium", "large", "full"], + ] + ] = None, + auto_focus: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + form_action: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_enc_type: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_method: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_no_validate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_target: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + value: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "IconButton": + """Create a IconButton component. + + Args: + *children: The children of the component. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. + size: Button size "1" - "4" + variant: Variant of button: "classic" | "solid" | "soft" | "surface" | "outline" | "ghost" + color_scheme: Override theme color for button + high_contrast: Whether to render the button with higher contrast color against background + radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full" + auto_focus: Automatically focuses the button when the page loads + disabled: Disables the button + form: Associates the button with a form (by id) + form_action: URL to send the form data to (for type="submit" buttons) + form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons) + form_method: HTTP method to use for sending form data (for type="submit" buttons) + form_no_validate: Bypasses form validation when submitting (for type="submit" buttons) + form_target: Specifies where to display the response after submitting the form (for type="submit" buttons) + name: Name of the button, used when sending form data + type: Type of the button (submit, reset, or button) + value: Value of the button, used when sending form data + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The properties of the component. + + Raises: + ValueError: If no children are passed. + + Returns: + The IconButton component. + """ + ... + +icon_button = IconButton.create diff --git a/reflex/components/radix/themes/components/radiogroup.py b/reflex/components/radix/themes/components/radio_group.py similarity index 99% rename from reflex/components/radix/themes/components/radiogroup.py rename to reflex/components/radix/themes/components/radio_group.py index aad4f1241..f8bd72ce6 100644 --- a/reflex/components/radix/themes/components/radiogroup.py +++ b/reflex/components/radix/themes/components/radio_group.py @@ -196,4 +196,4 @@ class RadioGroup(SimpleNamespace): __call__ = staticmethod(HighLevelRadioGroup.create) -radio_group = RadioGroup() +radio = radio_group = RadioGroup() diff --git a/reflex/components/radix/themes/components/radio_group.pyi b/reflex/components/radix/themes/components/radio_group.pyi new file mode 100644 index 000000000..3967de4f7 --- /dev/null +++ b/reflex/components/radix/themes/components/radio_group.pyi @@ -0,0 +1,708 @@ +"""Stub file for reflex/components/radix/themes/components/radio_group.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +from types import SimpleNamespace +from typing import Any, Dict, List, Literal, Optional, Union +import reflex as rx +from reflex.components.component import Component +from reflex.components.radix.themes.layout.flex import Flex +from reflex.components.radix.themes.typography.text import Text +from reflex.constants import EventTriggers +from reflex.vars import Var +from ..base import LiteralAccentColor, LiteralSize, RadixThemesComponent + +LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"] + +class RadioGroupRoot(RadixThemesComponent): + def get_event_triggers(self) -> Dict[str, Any]: ... + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + value: Optional[Union[Var[str], str]] = None, + default_value: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + required: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "RadioGroupRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + size: The size of the radio group: "1" | "2" | "3" + variant: The variant of the radio group + high_contrast: Whether to render the radio group with higher contrast color against background + value: The controlled value of the radio item to check. Should be used in conjunction with on_change. + default_value: The initial value of checked radio item. Should be used in conjunction with on_change. + disabled: Whether the radio group is disabled + name: The name of the group. Submitted with its owning form as part of a name/value pair. + required: Whether the radio group is required + style: Props to rename The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class RadioGroupItem(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + value: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + required: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "RadioGroupItem": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + value: The value of the radio item to check. Should be used in conjunction with on_change. + disabled: When true, prevents the user from interacting with the radio item. + required: When true, indicates that the user must check the radio item before the owning form can be submitted. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class HighLevelRadioGroup(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + items: Optional[Union[Var[List[str]], List[str]]] = None, + direction: Optional[ + Union[ + Var[Literal["row", "column", "row-reverse", "column-reverse"]], + Literal["row", "column", "row-reverse", "column-reverse"], + ] + ] = None, + gap: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + value: Optional[Union[Var[str], str]] = None, + default_value: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + required: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "HighLevelRadioGroup": + """Create a radio group component. + + Args: + items: The items of the radio group. + items: The items of the radio group. + direction: The direction of the radio group. + gap: The gap between the items of the radio group. + size: The size of the radio group. + variant: The variant of the radio group + color_scheme: The color of the radio group + high_contrast: Whether to render the radio group with higher contrast color against background + value: The controlled value of the radio item to check. Should be used in conjunction with on_change. + default_value: The initial value of checked radio item. Should be used in conjunction with on_change. + disabled: Whether the radio group is disabled + name: The name of the group. Submitted with its owning form as part of a name/value pair. + required: Whether the radio group is required + style: Props to rename The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Additional properties to apply to the accordion item. + + Returns: + The created radio group component. + """ + ... + +class RadioGroup(SimpleNamespace): + root = staticmethod(RadioGroupRoot.create) + item = staticmethod(RadioGroupItem.create) + + @staticmethod + def __call__( + *children, + items: Optional[Union[Var[List[str]], List[str]]] = None, + direction: Optional[ + Union[ + Var[Literal["row", "column", "row-reverse", "column-reverse"]], + Literal["row", "column", "row-reverse", "column-reverse"], + ] + ] = None, + gap: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + value: Optional[Union[Var[str], str]] = None, + default_value: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + required: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "HighLevelRadioGroup": + """Create a radio group component. + + Args: + items: The items of the radio group. + items: The items of the radio group. + direction: The direction of the radio group. + gap: The gap between the items of the radio group. + size: The size of the radio group. + variant: The variant of the radio group + color_scheme: The color of the radio group + high_contrast: Whether to render the radio group with higher contrast color against background + value: The controlled value of the radio item to check. Should be used in conjunction with on_change. + default_value: The initial value of checked radio item. Should be used in conjunction with on_change. + disabled: Whether the radio group is disabled + name: The name of the group. Submitted with its owning form as part of a name/value pair. + required: Whether the radio group is required + style: Props to rename The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Additional properties to apply to the accordion item. + + Returns: + The created radio group component. + """ + ... + +radio = radio_group = RadioGroup() diff --git a/reflex/components/radix/themes/components/scrollarea.py b/reflex/components/radix/themes/components/scroll_area.py similarity index 100% rename from reflex/components/radix/themes/components/scrollarea.py rename to reflex/components/radix/themes/components/scroll_area.py diff --git a/reflex/components/radix/themes/components/scroll_area.pyi b/reflex/components/radix/themes/components/scroll_area.pyi new file mode 100644 index 000000000..aef8e18d6 --- /dev/null +++ b/reflex/components/radix/themes/components/scroll_area.pyi @@ -0,0 +1,176 @@ +"""Stub file for reflex/components/radix/themes/components/scroll_area.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +from typing import Literal +from reflex.vars import Var +from ..base import RadixThemesComponent + +class ScrollArea(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + scrollbars: Optional[ + Union[ + Var[Literal["vertical", "horizontal", "both"]], + Literal["vertical", "horizontal", "both"], + ] + ] = None, + type_: Optional[ + Union[ + Var[Literal["auto", "always", "scroll", "hover"]], + Literal["auto", "always", "scroll", "hover"], + ] + ] = None, + scroll_hide_delay: Optional[Union[Var[int], int]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "ScrollArea": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + scrollbars: The alignment of the scroll area + type_: Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars. "auto" | "always" | "scroll" | "hover" + scroll_hide_delay: If type is set to either "scroll" or "hover", this prop determines the length of time, in milliseconds, before the scrollbars are hidden after the user stops interacting with scrollbars. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +scroll_area = ScrollArea.create diff --git a/reflex/components/radix/themes/components/separator.py b/reflex/components/radix/themes/components/separator.py index 08a147ca1..d3938f302 100644 --- a/reflex/components/radix/themes/components/separator.py +++ b/reflex/components/radix/themes/components/separator.py @@ -29,4 +29,5 @@ class Separator(RadixThemesComponent): decorative: Var[bool] -separator = Separator.create +# Alias to divider. +divider = separator = Separator.create diff --git a/reflex/components/radix/themes/components/separator.pyi b/reflex/components/radix/themes/components/separator.pyi index bac38a7fc..0e0ded0ac 100644 --- a/reflex/components/radix/themes/components/separator.pyi +++ b/reflex/components/radix/themes/components/separator.pyi @@ -172,4 +172,4 @@ class Separator(RadixThemesComponent): """ ... -separator = Separator.create +divider = separator = Separator.create diff --git a/reflex/components/radix/themes/components/textarea.py b/reflex/components/radix/themes/components/text_area.py similarity index 100% rename from reflex/components/radix/themes/components/textarea.py rename to reflex/components/radix/themes/components/text_area.py diff --git a/reflex/components/radix/themes/components/textarea.pyi b/reflex/components/radix/themes/components/text_area.pyi similarity index 99% rename from reflex/components/radix/themes/components/textarea.pyi rename to reflex/components/radix/themes/components/text_area.pyi index 7b3ef7ea6..7be25db1a 100644 --- a/reflex/components/radix/themes/components/textarea.pyi +++ b/reflex/components/radix/themes/components/text_area.pyi @@ -1,4 +1,4 @@ -"""Stub file for reflex/components/radix/themes/components/textarea.py""" +"""Stub file for reflex/components/radix/themes/components/text_area.py""" # ------------------- DO NOT EDIT ---------------------- # This file was generated by `scripts/pyi_generator.py`! # ------------------------------------------------------ diff --git a/reflex/components/radix/themes/components/textfield.py b/reflex/components/radix/themes/components/text_field.py similarity index 100% rename from reflex/components/radix/themes/components/textfield.py rename to reflex/components/radix/themes/components/text_field.py diff --git a/reflex/components/radix/themes/components/text_field.pyi b/reflex/components/radix/themes/components/text_field.pyi new file mode 100644 index 000000000..127c17fdc --- /dev/null +++ b/reflex/components/radix/themes/components/text_field.pyi @@ -0,0 +1,1092 @@ +"""Stub file for reflex/components/radix/themes/components/text_field.py""" +# ------------------- DO NOT EDIT ---------------------- +# This file was generated by `scripts/pyi_generator.py`! +# ------------------------------------------------------ + +from typing import Any, Dict, Literal, Optional, Union, overload +from reflex.vars import Var, BaseVar, ComputedVar +from reflex.event import EventChain, EventHandler, EventSpec +from reflex.style import Style +from types import SimpleNamespace +from typing import Any, Dict, Literal +import reflex as rx +from reflex.components import el +from reflex.components.component import Component +from reflex.components.core.debounce import DebounceInput +from reflex.components.lucide.icon import Icon +from reflex.constants import EventTriggers +from reflex.vars import Var +from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent + +LiteralTextFieldSize = Literal["1", "2", "3"] +LiteralTextFieldVariant = Literal["classic", "surface", "soft"] + +class TextFieldRoot(el.Div, RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, + radius: Optional[ + Union[ + Var[Literal["none", "small", "medium", "large", "full"]], + Literal["none", "small", "medium", "large", "full"], + ] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "TextFieldRoot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + size: Text field size "1" - "3" + variant: Variant of text field: "classic" | "surface" | "soft" + radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full" + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class TextFieldInput(el.Input, TextFieldRoot): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + accept: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + alt: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + auto_complete: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_focus: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + capture: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + checked: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dirname: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + disabled: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + form_action: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_enc_type: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_method: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_no_validate: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + form_target: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + list: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + max: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + max_length: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + min_length: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + min: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + multiple: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + pattern: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + placeholder: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + read_only: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + required: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + size: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + step: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + use_map: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + value: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + radius: Optional[ + Union[ + Var[Literal["none", "small", "medium", "large", "full"]], + Literal["none", "small", "medium", "large", "full"], + ] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_key_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_key_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "TextFieldInput": + """Create an Input component. + + Args: + *children: The children of the component. + accept: Accepted types of files when the input is file type + alt: Alternate text for input type="image" + auto_complete: Whether the input should have autocomplete enabled + auto_focus: Automatically focuses the input when the page loads + capture: Captures media from the user (camera or microphone) + checked: Indicates whether the input is checked (for checkboxes and radio buttons) + dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted + disabled: Disables the input + form: Associates the input with a form (by id) + form_action: URL to send the form data to (for type="submit" buttons) + form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons) + form_method: HTTP method to use for sending form data (for type="submit" buttons) + form_no_validate: Bypasses form validation when submitting (for type="submit" buttons) + form_target: Specifies where to display the response after submitting the form (for type="submit" buttons) + list: References a datalist for suggested options + max: Specifies the maximum value for the input + max_length: Specifies the maximum number of characters allowed in the input + min_length: Specifies the minimum number of characters required in the input + min: Specifies the minimum value for the input + multiple: Indicates whether multiple values can be entered in an input of the type email or file + name: Name of the input, used when sending form data + pattern: Regex pattern the input's value must match to be valid + placeholder: Placeholder text in the input + read_only: Indicates whether the input is read-only + required: Indicates that the input is required + size: Text field size "1" - "3" + src: URL for image inputs + step: Specifies the legal number intervals for an input + type: Specifies the type of input + use_map: Name of the image map used with the input + value: Value of the input + variant: Variant of text field: "classic" | "surface" | "soft" + color_scheme: Override theme color for text field + radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full" + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The component. + """ + ... + def get_event_triggers(self) -> Dict[str, Any]: ... + +class TextFieldSlot(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "TextFieldSlot": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class Input(RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + icon: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + radius: Optional[ + Union[ + Var[Literal["none", "small", "medium", "large", "full"]], + Literal["none", "small", "medium", "large", "full"], + ] + ] = None, + auto_complete: Optional[Union[Var[bool], bool]] = None, + default_value: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + max_length: Optional[Union[Var[str], str]] = None, + min_length: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + placeholder: Optional[Union[Var[str], str]] = None, + required: Optional[Union[Var[bool], bool]] = None, + value: Optional[Union[Var[str], str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_key_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_key_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Input": + """Create an Input component. + + Args: + icon: The icon to render before the input. + size: Text field size "1" - "3" + variant: Variant of text field: "classic" | "surface" | "soft" + color_scheme: Override theme color for text field + radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full" + auto_complete: Whether the input should have autocomplete enabled + default_value: The value of the input when initially rendered. + disabled: Disables the input + max_length: Specifies the maximum number of characters allowed in the input + min_length: Specifies the minimum number of characters required in the input + name: Name of the input, used when sending form data + placeholder: Placeholder text in the input + required: Indicates that the input is required + value: Value of the input + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The component. + """ + ... + def get_event_triggers(self) -> Dict[str, Any]: ... + +class TextField(SimpleNamespace): + root = staticmethod(TextFieldRoot.create) + input = staticmethod(TextFieldInput.create) + slot = staticmethod(TextFieldSlot.create) + + @staticmethod + def __call__( + *children, + icon: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + radius: Optional[ + Union[ + Var[Literal["none", "small", "medium", "large", "full"]], + Literal["none", "small", "medium", "large", "full"], + ] + ] = None, + auto_complete: Optional[Union[Var[bool], bool]] = None, + default_value: Optional[Union[Var[str], str]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + max_length: Optional[Union[Var[str], str]] = None, + min_length: Optional[Union[Var[str], str]] = None, + name: Optional[Union[Var[str], str]] = None, + placeholder: Optional[Union[Var[str], str]] = None, + required: Optional[Union[Var[bool], bool]] = None, + value: Optional[Union[Var[str], str]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_change: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_key_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_key_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Input": + """Create an Input component. + + Args: + icon: The icon to render before the input. + size: Text field size "1" - "3" + variant: Variant of text field: "classic" | "surface" | "soft" + color_scheme: Override theme color for text field + radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full" + auto_complete: Whether the input should have autocomplete enabled + default_value: The value of the input when initially rendered. + disabled: Disables the input + max_length: Specifies the maximum number of characters allowed in the input + min_length: Specifies the minimum number of characters required in the input + name: Name of the input, used when sending form data + placeholder: Placeholder text in the input + required: Indicates that the input is required + value: Value of the input + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The component. + """ + ... + +text_field = TextField() diff --git a/reflex/components/radix/themes/typography.py b/reflex/components/radix/themes/typography.py deleted file mode 100644 index f275fd2bb..000000000 --- a/reflex/components/radix/themes/typography.py +++ /dev/null @@ -1,140 +0,0 @@ -"""Components for rendering text. - -https://www.radix-ui.com/themes/docs/theme/typography -""" -from __future__ import annotations - -from typing import Literal - -from reflex.vars import Var - -from .base import ( - LiteralAccentColor, - LiteralVariant, - RadixThemesComponent, -) - -LiteralTextWeight = Literal["light", "regular", "medium", "bold"] -LiteralTextAlign = Literal["left", "center", "right"] -LiteralTextSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] -LiteralTextTrim = Literal["normal", "start", "end", "both"] - - -class Text(RadixThemesComponent): - """A foundational text primitive based on the element.""" - - tag = "Text" - - # Change the default rendered element for the one passed as a child, merging their props and behavior. - as_child: Var[bool] - - # Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild) - as_: Var[str] - - # Text size: "1" - "9" - size: Var[LiteralTextSize] - - # Thickness of text: "light" | "regular" | "medium" | "bold" - weight: Var[LiteralTextWeight] - - # Alignment of text in element: "left" | "center" | "right" - align: Var[LiteralTextAlign] - - # Removes the leading trim space: "normal" | "start" | "end" | "both" - trim: Var[LiteralTextTrim] - - # Overrides the accent color inherited from the Theme. - color_scheme: Var[LiteralAccentColor] - - # Whether to render the text with higher contrast color - high_contrast: Var[bool] - - -class Heading(Text): - """A semantic heading element.""" - - tag = "Heading" - - -class Blockquote(RadixThemesComponent): - """A block level extended quotation.""" - - tag = "Blockquote" - - # Text size: "1" - "9" - size: Var[LiteralTextSize] - - # Thickness of text: "light" | "regular" | "medium" | "bold" - weight: Var[LiteralTextWeight] - - # Overrides the accent color inherited from the Theme. - color_scheme: Var[LiteralAccentColor] - - # Whether to render the text with higher contrast color - high_contrast: Var[bool] - - -class Code(Blockquote): - """Marks text to signify a short fragment of computer code.""" - - tag = "Code" - - # The visual variant to apply: "solid" | "soft" | "outline" | "ghost" - variant: Var[LiteralVariant] - - -class Em(RadixThemesComponent): - """Marks text to stress emphasis.""" - - tag = "Em" - - -class Kbd(RadixThemesComponent): - """Represents keyboard input or a hotkey.""" - - tag = "Kbd" - - # Text size: "1" - "9" - size: Var[LiteralTextSize] - - -LiteralLinkUnderline = Literal["auto", "hover", "always"] - - -class Link(RadixThemesComponent): - """A semantic element for navigation between pages.""" - - tag = "Link" - - # Change the default rendered element for the one passed as a child, merging their props and behavior. - as_child: Var[bool] - - # Text size: "1" - "9" - size: Var[LiteralTextSize] - - # Thickness of text: "light" | "regular" | "medium" | "bold" - weight: Var[LiteralTextWeight] - - # Removes the leading trim space: "normal" | "start" | "end" | "both" - trim: Var[LiteralTextTrim] - - # Sets the visibility of the underline affordance: "auto" | "hover" | "always" - underline: Var[LiteralLinkUnderline] - - # Overrides the accent color inherited from the Theme. - color_scheme: Var[LiteralAccentColor] - - # Whether to render the text with higher contrast color - high_contrast: Var[bool] - - -class Quote(RadixThemesComponent): - """A short inline quotation.""" - - tag = "Quote" - - -class Strong(RadixThemesComponent): - """Marks text to signify strong importance.""" - - tag = "Strong" diff --git a/reflex/components/radix/themes/typography/__init__.py b/reflex/components/radix/themes/typography/__init__.py index bcd41399c..a14e21007 100644 --- a/reflex/components/radix/themes/typography/__init__.py +++ b/reflex/components/radix/themes/typography/__init__.py @@ -2,32 +2,19 @@ from .blockquote import Blockquote from .code import Code -from .em import Em from .heading import Heading -from .kbd import Kbd from .link import Link -from .quote import Quote -from .strong import Strong -from .text import Text +from .text import text blockquote = Blockquote.create code = Code.create -em = Em.create heading = Heading.create -kbd = Kbd.create link = Link.create -quote = Quote.create -strong = Strong.create -text = Text.create __all__ = [ "blockquote", "code", - "em", "heading", - "kbd", "link", - "quote", - "strong", "text", ] diff --git a/reflex/components/radix/themes/typography/em.py b/reflex/components/radix/themes/typography/em.py deleted file mode 100644 index eb7e3e6ce..000000000 --- a/reflex/components/radix/themes/typography/em.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Components for rendering heading. - -https://www.radix-ui.com/themes/docs/theme/typography -""" -from __future__ import annotations - -from reflex import el - -from ..base import ( - RadixThemesComponent, -) - - -class Em(el.Em, RadixThemesComponent): - """Marks text to stress emphasis.""" - - tag = "Em" diff --git a/reflex/components/radix/themes/typography/kbd.py b/reflex/components/radix/themes/typography/kbd.py deleted file mode 100644 index b8c28010c..000000000 --- a/reflex/components/radix/themes/typography/kbd.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Components for rendering heading. - -https://www.radix-ui.com/themes/docs/theme/typography -""" -from __future__ import annotations - -from reflex import el -from reflex.vars import Var - -from ..base import ( - RadixThemesComponent, -) -from .base import ( - LiteralTextSize, -) - - -class Kbd(el.Kbd, RadixThemesComponent): - """Represents keyboard input or a hotkey.""" - - tag = "Kbd" - - # Text size: "1" - "9" - size: Var[LiteralTextSize] diff --git a/reflex/components/radix/themes/typography/quote.py b/reflex/components/radix/themes/typography/quote.py deleted file mode 100644 index 6c590bf76..000000000 --- a/reflex/components/radix/themes/typography/quote.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Components for rendering heading. - -https://www.radix-ui.com/themes/docs/theme/typography -""" -from __future__ import annotations - -from reflex import el - -from ..base import ( - RadixThemesComponent, -) - - -class Quote(el.Q, RadixThemesComponent): - """A short inline quotation.""" - - tag = "Quote" diff --git a/reflex/components/radix/themes/typography/strong.py b/reflex/components/radix/themes/typography/strong.py deleted file mode 100644 index bb74b7b44..000000000 --- a/reflex/components/radix/themes/typography/strong.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Components for rendering heading. - -https://www.radix-ui.com/themes/docs/theme/typography -""" -from __future__ import annotations - -from reflex import el - -from ..base import ( - RadixThemesComponent, -) - - -class Strong(el.Strong, RadixThemesComponent): - """Marks text to signify strong importance.""" - - tag = "Strong" diff --git a/reflex/components/radix/themes/typography/text.py b/reflex/components/radix/themes/typography/text.py index 4ed426d15..f2487f7db 100644 --- a/reflex/components/radix/themes/typography/text.py +++ b/reflex/components/radix/themes/typography/text.py @@ -4,6 +4,7 @@ https://www.radix-ui.com/themes/docs/theme/typography """ from __future__ import annotations +from types import SimpleNamespace from typing import Literal from reflex import el @@ -51,3 +52,43 @@ class Text(el.Span, RadixThemesComponent): # Whether to render the text with higher contrast color high_contrast: Var[bool] + + +class Em(el.Em, RadixThemesComponent): + """Marks text to stress emphasis.""" + + tag = "Em" + + +class Kbd(el.Kbd, RadixThemesComponent): + """Represents keyboard input or a hotkey.""" + + tag = "Kbd" + + # Text size: "1" - "9" + size: Var[LiteralTextSize] + + +class Quote(el.Q, RadixThemesComponent): + """A short inline quotation.""" + + tag = "Quote" + + +class Strong(el.Strong, RadixThemesComponent): + """Marks text to signify strong importance.""" + + tag = "Strong" + + +class TextNamespace(SimpleNamespace): + """Checkbox components namespace.""" + + __call__ = staticmethod(Text.create) + em = staticmethod(Em.create) + kbd = staticmethod(Kbd.create) + quote = staticmethod(Quote.create) + strong = staticmethod(Strong.create) + + +text = TextNamespace() diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index f3cc5c900..7e266cfb8 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style +from types import SimpleNamespace from typing import Literal from reflex import el from reflex.vars import Var @@ -255,3 +256,1066 @@ class Text(el.Span, RadixThemesComponent): A new component instance. """ ... + +class Em(el.Em, RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Em": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class Kbd(el.Kbd, RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + size: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Kbd": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + size: Text size: "1" - "9" + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class Quote(el.Q, RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + cite: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Quote": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + cite: Specifies the source URL of the quote. + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class Strong(el.Strong, RadixThemesComponent): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Strong": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +class TextNamespace(SimpleNamespace): + em = staticmethod(Em.create) + kbd = staticmethod(Kbd.create) + quote = staticmethod(Quote.create) + strong = staticmethod(Strong.create) + + @staticmethod + def __call__( + *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + as_: Optional[ + Union[ + Var[Literal["p", "label", "div", "span"]], + Literal["p", "label", "div", "span"], + ] + ] = None, + size: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, + align: Optional[ + Union[ + Var[Literal["left", "center", "right"]], + Literal["left", "center", "right"], + ] + ] = None, + trim: Optional[ + Union[ + Var[Literal["normal", "start", "end", "both"]], + Literal["normal", "start", "end", "both"], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + _rename_props: Optional[Dict[str, str]] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Text": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. + as_: Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild) + size: Text size: "1" - "9" + weight: Thickness of text: "light" | "regular" | "medium" | "bold" + align: Alignment of text in element: "left" | "center" | "right" + trim: Removes the leading trim space: "normal" | "start" | "end" | "both" + high_contrast: Whether to render the text with higher contrast color + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + _rename_props: props to change the name of + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + +text = TextNamespace() From 4206afeb7b140e36c3ab4fffde704be9ff22666f Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 13 Feb 2024 10:06:28 -0800 Subject: [PATCH 32/68] [REF-1958] Remove shadowed radix css props (#2590) * style: shorthand replacements need camelCase Avoid warning on terminal and in browser console from using kebab-case CSS props with emotion. * _rename_props only replace prop name once In case the value also contains the prop name, we don't want to replace it multiple times. * pyi_generator: ignore _rename_props in create signature * Avoid shadowing CSS prop `display` and `gap` Replace usages of `gap` with `spacing` to retain Radix sizing number system, while allowing users to specify a responsive `gap` using CSS units. Remove `display` props from radix components, allowing `display` to accept responsive lists. * checkbox: apply `gap` to `flex` if provided * Remove _rename_props from .create signatures * Fix spacing prop in blank template * Fixup tests after changing style shorthand to return camelCase --- .../benchmarks/test_compile_benchmark.py | 4 +- reflex/.templates/apps/blank/code/blank.py | 2 +- reflex/components/base/app_wrap.pyi | 1 - reflex/components/base/body.pyi | 2 - reflex/components/base/document.pyi | 10 ---- reflex/components/base/fragment.pyi | 2 - reflex/components/base/head.pyi | 4 -- reflex/components/base/link.pyi | 4 -- reflex/components/base/meta.pyi | 8 --- reflex/components/base/script.pyi | 2 - reflex/components/chakra/base.pyi | 5 -- .../components/chakra/datadisplay/badge.pyi | 2 - reflex/components/chakra/datadisplay/code.pyi | 2 - .../components/chakra/datadisplay/divider.pyi | 2 - .../chakra/datadisplay/keyboard_key.pyi | 2 - reflex/components/chakra/datadisplay/list.pyi | 8 --- reflex/components/chakra/datadisplay/stat.pyi | 12 ---- .../components/chakra/datadisplay/table.pyi | 18 ------ reflex/components/chakra/datadisplay/tag.pyi | 9 --- .../chakra/disclosure/accordion.pyi | 10 ---- reflex/components/chakra/disclosure/tabs.pyi | 10 ---- .../chakra/disclosure/transition.pyi | 12 ---- .../chakra/disclosure/visuallyhidden.pyi | 2 - reflex/components/chakra/feedback/alert.pyi | 8 --- .../chakra/feedback/circularprogress.pyi | 4 -- .../components/chakra/feedback/progress.pyi | 2 - .../components/chakra/feedback/skeleton.pyi | 6 -- reflex/components/chakra/feedback/spinner.pyi | 2 - reflex/components/chakra/forms/button.pyi | 4 -- reflex/components/chakra/forms/checkbox.pyi | 4 -- .../chakra/forms/colormodeswitch.pyi | 7 --- .../components/chakra/forms/date_picker.pyi | 2 - .../chakra/forms/date_time_picker.pyi | 2 - reflex/components/chakra/forms/editable.pyi | 8 --- reflex/components/chakra/forms/email.pyi | 2 - reflex/components/chakra/forms/form.pyi | 10 ---- reflex/components/chakra/forms/iconbutton.pyi | 2 - reflex/components/chakra/forms/input.pyi | 12 ---- .../components/chakra/forms/numberinput.pyi | 10 ---- reflex/components/chakra/forms/password.pyi | 2 - reflex/components/chakra/forms/pininput.pyi | 4 -- reflex/components/chakra/forms/radio.pyi | 4 -- .../components/chakra/forms/rangeslider.pyi | 8 --- reflex/components/chakra/forms/select.pyi | 4 -- reflex/components/chakra/forms/slider.pyi | 10 ---- reflex/components/chakra/forms/switch.pyi | 2 - reflex/components/chakra/forms/textarea.pyi | 2 - .../components/chakra/forms/time_picker.pyi | 2 - .../components/chakra/layout/aspect_ratio.pyi | 2 - reflex/components/chakra/layout/box.pyi | 2 - reflex/components/chakra/layout/card.pyi | 7 --- reflex/components/chakra/layout/center.pyi | 6 -- reflex/components/chakra/layout/container.pyi | 2 - reflex/components/chakra/layout/flex.pyi | 2 - reflex/components/chakra/layout/grid.pyi | 6 -- reflex/components/chakra/layout/spacer.pyi | 2 - reflex/components/chakra/layout/stack.pyi | 6 -- reflex/components/chakra/layout/wrap.pyi | 4 -- reflex/components/chakra/media/avatar.pyi | 6 -- reflex/components/chakra/media/icon.pyi | 4 -- reflex/components/chakra/media/image.pyi | 2 - .../chakra/navigation/breadcrumb.pyi | 8 --- reflex/components/chakra/navigation/link.pyi | 2 - .../chakra/navigation/linkoverlay.pyi | 4 -- .../components/chakra/navigation/stepper.pyi | 18 ------ .../components/chakra/overlay/alertdialog.pyi | 14 ----- reflex/components/chakra/overlay/drawer.pyi | 14 ----- reflex/components/chakra/overlay/menu.pyi | 16 ------ reflex/components/chakra/overlay/modal.pyi | 14 ----- reflex/components/chakra/overlay/popover.pyi | 18 ------ reflex/components/chakra/overlay/tooltip.pyi | 2 - .../components/chakra/typography/heading.pyi | 2 - .../chakra/typography/highlight.pyi | 2 - reflex/components/chakra/typography/span.pyi | 2 - reflex/components/chakra/typography/text.pyi | 2 - reflex/components/component.py | 2 +- reflex/components/core/banner.pyi | 3 - .../components/core/client_side_routing.pyi | 4 -- reflex/components/core/debounce.pyi | 1 - reflex/components/core/html.pyi | 2 - reflex/components/core/upload.pyi | 4 -- reflex/components/datadisplay/code.pyi | 2 - reflex/components/datadisplay/dataeditor.pyi | 2 - reflex/components/el/element.pyi | 2 - reflex/components/el/elements/base.pyi | 2 - reflex/components/el/elements/forms.pyi | 28 --------- reflex/components/el/elements/inline.pyi | 56 ------------------ reflex/components/el/elements/media.pyi | 28 --------- reflex/components/el/elements/metadata.pyi | 10 ---- reflex/components/el/elements/other.pyi | 14 ----- reflex/components/el/elements/scripts.pyi | 6 -- reflex/components/el/elements/sectioning.pyi | 30 ---------- reflex/components/el/elements/tables.pyi | 20 ------- reflex/components/el/elements/typography.pyi | 30 ---------- reflex/components/gridjs/datatable.pyi | 4 -- reflex/components/lucide/icon.pyi | 4 -- reflex/components/markdown/markdown.pyi | 2 - reflex/components/moment/moment.pyi | 2 - reflex/components/next/base.pyi | 2 - reflex/components/next/image.pyi | 2 - reflex/components/next/link.pyi | 2 - reflex/components/next/video.pyi | 2 - reflex/components/plotly/plotly.pyi | 4 -- .../components/radix/primitives/accordion.pyi | 12 ---- reflex/components/radix/primitives/base.pyi | 4 -- reflex/components/radix/primitives/drawer.pyi | 20 ------- reflex/components/radix/primitives/form.pyi | 18 ------ .../components/radix/primitives/progress.pyi | 6 -- reflex/components/radix/primitives/slider.pyi | 10 ---- reflex/components/radix/themes/base.pyi | 10 ---- reflex/components/radix/themes/color_mode.pyi | 5 -- .../radix/themes/components/alert_dialog.pyi | 14 ----- .../radix/themes/components/aspect_ratio.pyi | 2 - .../radix/themes/components/avatar.pyi | 2 - .../radix/themes/components/badge.pyi | 2 - .../radix/themes/components/button.pyi | 2 - .../radix/themes/components/callout.pyi | 10 ---- .../radix/themes/components/card.pyi | 2 - .../radix/themes/components/checkbox.py | 10 +++- .../radix/themes/components/checkbox.pyi | 14 ++--- .../radix/themes/components/context_menu.pyi | 16 ------ .../radix/themes/components/dialog.pyi | 14 ----- .../radix/themes/components/dropdown_menu.pyi | 16 ------ .../radix/themes/components/hover_card.pyi | 8 --- .../radix/themes/components/icon_button.pyi | 2 - .../radix/themes/components/inset.pyi | 2 - .../radix/themes/components/popover.pyi | 8 --- .../radix/themes/components/radio_group.py | 8 +-- .../radix/themes/components/radio_group.pyi | 16 ++---- .../radix/themes/components/radiogroup.pyi | 16 ++---- .../radix/themes/components/scroll_area.pyi | 2 - .../radix/themes/components/select.pyi | 18 ------ .../radix/themes/components/separator.pyi | 2 - .../radix/themes/components/slider.pyi | 2 - .../radix/themes/components/switch.pyi | 2 - .../radix/themes/components/table.py | 11 +--- .../radix/themes/components/table.pyi | 22 +------ .../radix/themes/components/tabs.pyi | 10 ---- .../radix/themes/components/text_area.pyi | 2 - .../radix/themes/components/text_field.pyi | 10 ---- .../radix/themes/components/tooltip.pyi | 2 - .../components/radix/themes/layout/base.pyi | 2 - reflex/components/radix/themes/layout/box.pyi | 2 - .../components/radix/themes/layout/center.pyi | 13 +---- .../radix/themes/layout/container.pyi | 2 - reflex/components/radix/themes/layout/flex.py | 11 ++-- .../components/radix/themes/layout/flex.pyi | 16 +----- reflex/components/radix/themes/layout/grid.py | 19 ++++--- .../components/radix/themes/layout/grid.pyi | 27 ++++----- .../components/radix/themes/layout/list.pyi | 41 ++----------- .../radix/themes/layout/section.pyi | 2 - .../components/radix/themes/layout/spacer.pyi | 13 +---- .../components/radix/themes/layout/stack.py | 23 ++++---- .../components/radix/themes/layout/stack.pyi | 57 ++----------------- .../radix/themes/typography/blockquote.pyi | 2 - .../radix/themes/typography/code.pyi | 2 - .../radix/themes/typography/heading.pyi | 2 - .../radix/themes/typography/link.pyi | 2 - .../radix/themes/typography/text.pyi | 12 ---- reflex/components/react_player/audio.pyi | 2 - .../components/react_player/react_player.pyi | 2 - reflex/components/react_player/video.pyi | 2 - reflex/components/recharts/cartesian.pyi | 38 ------------- reflex/components/recharts/charts.pyi | 22 ------- reflex/components/recharts/general.pyi | 10 ---- reflex/components/recharts/polar.pyi | 12 ---- reflex/components/recharts/recharts.pyi | 4 -- reflex/components/suneditor/editor.pyi | 2 - reflex/style.py | 10 ++-- scripts/pyi_generator.py | 1 + tests/components/typography/test_markdown.py | 4 +- tests/test_style.py | 10 ++-- 172 files changed, 99 insertions(+), 1295 deletions(-) diff --git a/integration/benchmarks/test_compile_benchmark.py b/integration/benchmarks/test_compile_benchmark.py index 82162de00..85815bae0 100644 --- a/integration/benchmarks/test_compile_benchmark.py +++ b/integration/benchmarks/test_compile_benchmark.py @@ -43,7 +43,7 @@ def sample_small_page() -> rx.Component: """ return rx.vstack( *[rx.button(State.count, font_size="2em") for i in range(100)], - spacing="1em", + gap="1em", ) @@ -62,7 +62,7 @@ def sample_large_page() -> rx.Component: ) for i in range(100) ], - spacing="1em", + gap="1em", ) diff --git a/reflex/.templates/apps/blank/code/blank.py b/reflex/.templates/apps/blank/code/blank.py index 96e73e1af..9adaa08fa 100644 --- a/reflex/.templates/apps/blank/code/blank.py +++ b/reflex/.templates/apps/blank/code/blank.py @@ -32,7 +32,7 @@ def index() -> rx.Component: ) }, ), - spacing="1.5em", + gap="1.5em", font_size="2em", padding_top="10%", ), diff --git a/reflex/components/base/app_wrap.pyi b/reflex/components/base/app_wrap.pyi index 1bd4c764e..63302bcc9 100644 --- a/reflex/components/base/app_wrap.pyi +++ b/reflex/components/base/app_wrap.pyi @@ -22,7 +22,6 @@ class AppWrap(Fragment): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] diff --git a/reflex/components/base/body.pyi b/reflex/components/base/body.pyi index 218351a99..7ba105a0d 100644 --- a/reflex/components/base/body.pyi +++ b/reflex/components/base/body.pyi @@ -20,7 +20,6 @@ class Body(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -78,7 +77,6 @@ class Body(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/base/document.pyi b/reflex/components/base/document.pyi index 0a2c4eda8..746a2f18b 100644 --- a/reflex/components/base/document.pyi +++ b/reflex/components/base/document.pyi @@ -20,7 +20,6 @@ class NextDocumentLib(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -78,7 +77,6 @@ class NextDocumentLib(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -101,7 +99,6 @@ class Html(NextDocumentLib): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -159,7 +156,6 @@ class Html(NextDocumentLib): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -182,7 +178,6 @@ class DocumentHead(NextDocumentLib): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -240,7 +235,6 @@ class DocumentHead(NextDocumentLib): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -263,7 +257,6 @@ class Main(NextDocumentLib): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -321,7 +314,6 @@ class Main(NextDocumentLib): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -344,7 +336,6 @@ class NextScript(NextDocumentLib): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -402,7 +393,6 @@ class NextScript(NextDocumentLib): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/base/fragment.pyi b/reflex/components/base/fragment.pyi index 963675c0d..83014e20a 100644 --- a/reflex/components/base/fragment.pyi +++ b/reflex/components/base/fragment.pyi @@ -20,7 +20,6 @@ class Fragment(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -78,7 +77,6 @@ class Fragment(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/base/head.pyi b/reflex/components/base/head.pyi index be8c61e13..dd975844e 100644 --- a/reflex/components/base/head.pyi +++ b/reflex/components/base/head.pyi @@ -20,7 +20,6 @@ class NextHeadLib(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -78,7 +77,6 @@ class NextHeadLib(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -101,7 +99,6 @@ class Head(NextHeadLib, MemoizationLeaf): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -159,7 +156,6 @@ class Head(NextHeadLib, MemoizationLeaf): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/base/link.pyi b/reflex/components/base/link.pyi index 166f42c33..a7754ae9a 100644 --- a/reflex/components/base/link.pyi +++ b/reflex/components/base/link.pyi @@ -23,7 +23,6 @@ class RawLink(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -83,7 +82,6 @@ class RawLink(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -113,7 +111,6 @@ class ScriptTag(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -178,7 +175,6 @@ class ScriptTag(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/base/meta.pyi b/reflex/components/base/meta.pyi index 9a44dff50..61f3e344a 100644 --- a/reflex/components/base/meta.pyi +++ b/reflex/components/base/meta.pyi @@ -23,7 +23,6 @@ class Title(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -81,7 +80,6 @@ class Title(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -109,7 +107,6 @@ class Meta(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -172,7 +169,6 @@ class Meta(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -200,7 +196,6 @@ class Description(Meta): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -263,7 +258,6 @@ class Description(Meta): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -291,7 +285,6 @@ class Image(Meta): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -354,7 +347,6 @@ class Image(Meta): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/base/script.pyi b/reflex/components/base/script.pyi index e27fcff86..3a1e6f582 100644 --- a/reflex/components/base/script.pyi +++ b/reflex/components/base/script.pyi @@ -24,7 +24,6 @@ class Script(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -103,7 +102,6 @@ class Script(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/base.pyi b/reflex/components/chakra/base.pyi index 44a1fd4a1..a21cd2951 100644 --- a/reflex/components/chakra/base.pyi +++ b/reflex/components/chakra/base.pyi @@ -24,7 +24,6 @@ class ChakraComponent(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -82,7 +81,6 @@ class ChakraComponent(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -106,7 +104,6 @@ class ChakraProvider(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -175,7 +172,6 @@ class ChakraColorModeProvider(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -233,7 +229,6 @@ class ChakraColorModeProvider(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/datadisplay/badge.pyi b/reflex/components/chakra/datadisplay/badge.pyi index 0913d741a..8480b89de 100644 --- a/reflex/components/chakra/datadisplay/badge.pyi +++ b/reflex/components/chakra/datadisplay/badge.pyi @@ -28,7 +28,6 @@ class Badge(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -88,7 +87,6 @@ class Badge(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/datadisplay/code.pyi b/reflex/components/chakra/datadisplay/code.pyi index 6252eafc6..8702c162e 100644 --- a/reflex/components/chakra/datadisplay/code.pyi +++ b/reflex/components/chakra/datadisplay/code.pyi @@ -20,7 +20,6 @@ class Code(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -78,7 +77,6 @@ class Code(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/datadisplay/divider.pyi b/reflex/components/chakra/datadisplay/divider.pyi index dc61c0d02..174234e5a 100644 --- a/reflex/components/chakra/datadisplay/divider.pyi +++ b/reflex/components/chakra/datadisplay/divider.pyi @@ -33,7 +33,6 @@ class Divider(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -93,7 +92,6 @@ class Divider(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/datadisplay/keyboard_key.pyi b/reflex/components/chakra/datadisplay/keyboard_key.pyi index 4a2831af7..a3e7dcff0 100644 --- a/reflex/components/chakra/datadisplay/keyboard_key.pyi +++ b/reflex/components/chakra/datadisplay/keyboard_key.pyi @@ -20,7 +20,6 @@ class KeyboardKey(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -78,7 +77,6 @@ class KeyboardKey(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/datadisplay/list.pyi b/reflex/components/chakra/datadisplay/list.pyi index 2c034413d..a246c3f02 100644 --- a/reflex/components/chakra/datadisplay/list.pyi +++ b/reflex/components/chakra/datadisplay/list.pyi @@ -27,7 +27,6 @@ class List(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -89,7 +88,6 @@ class List(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -109,7 +107,6 @@ class ListItem(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -167,7 +164,6 @@ class ListItem(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -194,7 +190,6 @@ class OrderedList(List): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -256,7 +251,6 @@ class OrderedList(List): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -280,7 +274,6 @@ class UnorderedList(List): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -342,7 +335,6 @@ class UnorderedList(List): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/chakra/datadisplay/stat.pyi b/reflex/components/chakra/datadisplay/stat.pyi index 978c5d124..09b123fac 100644 --- a/reflex/components/chakra/datadisplay/stat.pyi +++ b/reflex/components/chakra/datadisplay/stat.pyi @@ -26,7 +26,6 @@ class Stat(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -88,7 +87,6 @@ class Stat(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -108,7 +106,6 @@ class StatLabel(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -166,7 +163,6 @@ class StatLabel(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -189,7 +185,6 @@ class StatNumber(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -247,7 +242,6 @@ class StatNumber(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -270,7 +264,6 @@ class StatHelpText(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -328,7 +321,6 @@ class StatHelpText(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -352,7 +344,6 @@ class StatArrow(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -411,7 +402,6 @@ class StatArrow(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -434,7 +424,6 @@ class StatGroup(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -492,7 +481,6 @@ class StatGroup(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/datadisplay/table.pyi b/reflex/components/chakra/datadisplay/table.pyi index bd0d840d8..bd9774b7e 100644 --- a/reflex/components/chakra/datadisplay/table.pyi +++ b/reflex/components/chakra/datadisplay/table.pyi @@ -33,7 +33,6 @@ class Table(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -99,7 +98,6 @@ class Table(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -120,7 +118,6 @@ class Thead(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -179,7 +176,6 @@ class Thead(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -203,7 +199,6 @@ class Tbody(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -262,7 +257,6 @@ class Tbody(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -285,7 +279,6 @@ class Tfoot(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -344,7 +337,6 @@ class Tfoot(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -368,7 +360,6 @@ class Tr(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -428,7 +419,6 @@ class Tr(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -449,7 +439,6 @@ class Th(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -508,7 +497,6 @@ class Th(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -532,7 +520,6 @@ class Td(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -591,7 +578,6 @@ class Td(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -615,7 +601,6 @@ class TableCaption(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -674,7 +659,6 @@ class TableCaption(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -697,7 +681,6 @@ class TableContainer(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -755,7 +738,6 @@ class TableContainer(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/datadisplay/tag.pyi b/reflex/components/chakra/datadisplay/tag.pyi index e0026982f..3f4171958 100644 --- a/reflex/components/chakra/datadisplay/tag.pyi +++ b/reflex/components/chakra/datadisplay/tag.pyi @@ -28,7 +28,6 @@ class TagLabel(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -86,7 +85,6 @@ class TagLabel(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -109,7 +107,6 @@ class TagLeftIcon(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -167,7 +164,6 @@ class TagLeftIcon(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -190,7 +186,6 @@ class TagRightIcon(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -248,7 +243,6 @@ class TagRightIcon(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -271,7 +265,6 @@ class TagCloseButton(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -329,7 +322,6 @@ class TagCloseButton(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -394,7 +386,6 @@ class Tag(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] diff --git a/reflex/components/chakra/disclosure/accordion.pyi b/reflex/components/chakra/disclosure/accordion.pyi index b62942800..c18f02a15 100644 --- a/reflex/components/chakra/disclosure/accordion.pyi +++ b/reflex/components/chakra/disclosure/accordion.pyi @@ -34,7 +34,6 @@ class Accordion(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -99,7 +98,6 @@ class Accordion(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -122,7 +120,6 @@ class AccordionItem(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -183,7 +180,6 @@ class AccordionItem(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -206,7 +202,6 @@ class AccordionButton(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -264,7 +259,6 @@ class AccordionButton(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -287,7 +281,6 @@ class AccordionPanel(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -345,7 +338,6 @@ class AccordionPanel(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -368,7 +360,6 @@ class AccordionIcon(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -426,7 +417,6 @@ class AccordionIcon(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/disclosure/tabs.pyi b/reflex/components/chakra/disclosure/tabs.pyi index 4f526098d..097185aa3 100644 --- a/reflex/components/chakra/disclosure/tabs.pyi +++ b/reflex/components/chakra/disclosure/tabs.pyi @@ -112,7 +112,6 @@ class Tabs(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -181,7 +180,6 @@ class Tabs(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -205,7 +203,6 @@ class Tab(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -267,7 +264,6 @@ class Tab(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -290,7 +286,6 @@ class TabList(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -348,7 +343,6 @@ class TabList(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -371,7 +365,6 @@ class TabPanels(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -429,7 +422,6 @@ class TabPanels(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -452,7 +444,6 @@ class TabPanel(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -510,7 +501,6 @@ class TabPanel(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/disclosure/transition.pyi b/reflex/components/chakra/disclosure/transition.pyi index 8f46a6a3d..52092e502 100644 --- a/reflex/components/chakra/disclosure/transition.pyi +++ b/reflex/components/chakra/disclosure/transition.pyi @@ -24,7 +24,6 @@ class Transition(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -84,7 +83,6 @@ class Transition(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -109,7 +107,6 @@ class Fade(Transition): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -169,7 +166,6 @@ class Fade(Transition): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -196,7 +192,6 @@ class ScaleFade(Transition): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -258,7 +253,6 @@ class ScaleFade(Transition): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -284,7 +278,6 @@ class Slide(Transition): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -345,7 +338,6 @@ class Slide(Transition): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -373,7 +365,6 @@ class SlideFade(Transition): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -436,7 +427,6 @@ class SlideFade(Transition): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -464,7 +454,6 @@ class Collapse(Transition): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -527,7 +516,6 @@ class Collapse(Transition): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/disclosure/visuallyhidden.pyi b/reflex/components/chakra/disclosure/visuallyhidden.pyi index 181cc0262..b8717da83 100644 --- a/reflex/components/chakra/disclosure/visuallyhidden.pyi +++ b/reflex/components/chakra/disclosure/visuallyhidden.pyi @@ -20,7 +20,6 @@ class VisuallyHidden(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -78,7 +77,6 @@ class VisuallyHidden(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/feedback/alert.pyi b/reflex/components/chakra/feedback/alert.pyi index 769241125..aae57c1f7 100644 --- a/reflex/components/chakra/feedback/alert.pyi +++ b/reflex/components/chakra/feedback/alert.pyi @@ -37,7 +37,6 @@ class Alert(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -100,7 +99,6 @@ class Alert(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -120,7 +118,6 @@ class AlertIcon(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -178,7 +175,6 @@ class AlertIcon(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -201,7 +197,6 @@ class AlertTitle(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -259,7 +254,6 @@ class AlertTitle(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -282,7 +276,6 @@ class AlertDescription(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -340,7 +333,6 @@ class AlertDescription(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/feedback/circularprogress.pyi b/reflex/components/chakra/feedback/circularprogress.pyi index d033946fa..4f1582041 100644 --- a/reflex/components/chakra/feedback/circularprogress.pyi +++ b/reflex/components/chakra/feedback/circularprogress.pyi @@ -34,7 +34,6 @@ class CircularProgress(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -103,7 +102,6 @@ class CircularProgress(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: the props of the component. @@ -123,7 +121,6 @@ class CircularProgressLabel(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -181,7 +178,6 @@ class CircularProgressLabel(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/feedback/progress.pyi b/reflex/components/chakra/feedback/progress.pyi index 4d9a1e714..c6c7b1aa4 100644 --- a/reflex/components/chakra/feedback/progress.pyi +++ b/reflex/components/chakra/feedback/progress.pyi @@ -29,7 +29,6 @@ class Progress(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -94,7 +93,6 @@ class Progress(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/feedback/skeleton.pyi b/reflex/components/chakra/feedback/skeleton.pyi index 4cc33fff9..a393e5899 100644 --- a/reflex/components/chakra/feedback/skeleton.pyi +++ b/reflex/components/chakra/feedback/skeleton.pyi @@ -26,7 +26,6 @@ class Skeleton(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -89,7 +88,6 @@ class Skeleton(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -117,7 +115,6 @@ class SkeletonCircle(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -180,7 +177,6 @@ class SkeletonCircle(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -209,7 +205,6 @@ class SkeletonText(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -273,7 +268,6 @@ class SkeletonText(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/feedback/spinner.pyi b/reflex/components/chakra/feedback/spinner.pyi index 5e2a195ba..6bd414911 100644 --- a/reflex/components/chakra/feedback/spinner.pyi +++ b/reflex/components/chakra/feedback/spinner.pyi @@ -31,7 +31,6 @@ class Spinner(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -94,7 +93,6 @@ class Spinner(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/button.pyi b/reflex/components/chakra/forms/button.pyi index 62023db77..47f2f9222 100644 --- a/reflex/components/chakra/forms/button.pyi +++ b/reflex/components/chakra/forms/button.pyi @@ -96,7 +96,6 @@ class Button(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -166,7 +165,6 @@ class Button(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -201,7 +199,6 @@ class ButtonGroup(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -264,7 +261,6 @@ class ButtonGroup(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/checkbox.pyi b/reflex/components/chakra/forms/checkbox.pyi index 867bf8aab..024066d01 100644 --- a/reflex/components/chakra/forms/checkbox.pyi +++ b/reflex/components/chakra/forms/checkbox.pyi @@ -85,7 +85,6 @@ class Checkbox(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -158,7 +157,6 @@ class Checkbox(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -185,7 +183,6 @@ class CheckboxGroup(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -247,7 +244,6 @@ class CheckboxGroup(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/colormodeswitch.pyi b/reflex/components/chakra/forms/colormodeswitch.pyi index be3700b00..ea273cc1f 100644 --- a/reflex/components/chakra/forms/colormodeswitch.pyi +++ b/reflex/components/chakra/forms/colormodeswitch.pyi @@ -32,7 +32,6 @@ class ColorModeIcon(Cond): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -161,7 +160,6 @@ class ColorModeSwitch(Switch): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -233,7 +231,6 @@ class ColorModeSwitch(Switch): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props to pass to the component. @@ -321,7 +318,6 @@ class ColorModeButton(Button): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -391,7 +387,6 @@ class ColorModeButton(Button): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props to pass to the component. @@ -411,7 +406,6 @@ class ColorModeScript(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -469,7 +463,6 @@ class ColorModeScript(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/date_picker.pyi b/reflex/components/chakra/forms/date_picker.pyi index c5d0f153e..e59fa43d4 100644 --- a/reflex/components/chakra/forms/date_picker.pyi +++ b/reflex/components/chakra/forms/date_picker.pyi @@ -41,7 +41,6 @@ class DatePicker(Input): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -121,7 +120,6 @@ class DatePicker(Input): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/chakra/forms/date_time_picker.pyi b/reflex/components/chakra/forms/date_time_picker.pyi index 330739121..f205749c0 100644 --- a/reflex/components/chakra/forms/date_time_picker.pyi +++ b/reflex/components/chakra/forms/date_time_picker.pyi @@ -41,7 +41,6 @@ class DateTimePicker(Input): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -121,7 +120,6 @@ class DateTimePicker(Input): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/chakra/forms/editable.pyi b/reflex/components/chakra/forms/editable.pyi index de7dfe4cb..26bb23e5b 100644 --- a/reflex/components/chakra/forms/editable.pyi +++ b/reflex/components/chakra/forms/editable.pyi @@ -32,7 +32,6 @@ class Editable(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -110,7 +109,6 @@ class Editable(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -133,7 +131,6 @@ class EditableInput(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -191,7 +188,6 @@ class EditableInput(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -214,7 +210,6 @@ class EditableTextarea(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -272,7 +267,6 @@ class EditableTextarea(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -295,7 +289,6 @@ class EditablePreview(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -353,7 +346,6 @@ class EditablePreview(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/email.pyi b/reflex/components/chakra/forms/email.pyi index 5763c1c7b..51f90957d 100644 --- a/reflex/components/chakra/forms/email.pyi +++ b/reflex/components/chakra/forms/email.pyi @@ -41,7 +41,6 @@ class Email(Input): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -121,7 +120,6 @@ class Email(Input): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/chakra/forms/form.pyi b/reflex/components/chakra/forms/form.pyi index 0a291ebf1..fd915a736 100644 --- a/reflex/components/chakra/forms/form.pyi +++ b/reflex/components/chakra/forms/form.pyi @@ -38,7 +38,6 @@ class Form(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -102,7 +101,6 @@ class Form(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the form. @@ -131,7 +129,6 @@ class FormControl(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -197,7 +194,6 @@ class FormControl(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the form control. @@ -220,7 +216,6 @@ class FormHelperText(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -278,7 +273,6 @@ class FormHelperText(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -302,7 +296,6 @@ class FormLabel(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -361,7 +354,6 @@ class FormLabel(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -384,7 +376,6 @@ class FormErrorMessage(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -442,7 +433,6 @@ class FormErrorMessage(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/iconbutton.pyi b/reflex/components/chakra/forms/iconbutton.pyi index 6da52491d..245f7b2f0 100644 --- a/reflex/components/chakra/forms/iconbutton.pyi +++ b/reflex/components/chakra/forms/iconbutton.pyi @@ -33,7 +33,6 @@ class IconButton(Text): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -101,7 +100,6 @@ class IconButton(Text): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/input.pyi b/reflex/components/chakra/forms/input.pyi index afd36c736..3c7ee8826 100644 --- a/reflex/components/chakra/forms/input.pyi +++ b/reflex/components/chakra/forms/input.pyi @@ -105,7 +105,6 @@ class Input(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -185,7 +184,6 @@ class Input(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -205,7 +203,6 @@ class InputGroup(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -263,7 +260,6 @@ class InputGroup(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -286,7 +282,6 @@ class InputLeftAddon(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -344,7 +339,6 @@ class InputLeftAddon(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -367,7 +361,6 @@ class InputRightAddon(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -425,7 +418,6 @@ class InputRightAddon(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -448,7 +440,6 @@ class InputLeftElement(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -506,7 +497,6 @@ class InputLeftElement(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -529,7 +519,6 @@ class InputRightElement(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -587,7 +576,6 @@ class InputRightElement(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/numberinput.pyi b/reflex/components/chakra/forms/numberinput.pyi index 6f094a0f0..017040989 100644 --- a/reflex/components/chakra/forms/numberinput.pyi +++ b/reflex/components/chakra/forms/numberinput.pyi @@ -55,7 +55,6 @@ class NumberInput(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -136,7 +135,6 @@ class NumberInput(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -156,7 +154,6 @@ class NumberInputField(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -214,7 +211,6 @@ class NumberInputField(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -237,7 +233,6 @@ class NumberInputStepper(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -295,7 +290,6 @@ class NumberInputStepper(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -318,7 +312,6 @@ class NumberIncrementStepper(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -376,7 +369,6 @@ class NumberIncrementStepper(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -399,7 +391,6 @@ class NumberDecrementStepper(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -457,7 +448,6 @@ class NumberDecrementStepper(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/password.pyi b/reflex/components/chakra/forms/password.pyi index ec30a0d38..c9a4ec026 100644 --- a/reflex/components/chakra/forms/password.pyi +++ b/reflex/components/chakra/forms/password.pyi @@ -41,7 +41,6 @@ class Password(Input): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -121,7 +120,6 @@ class Password(Input): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/chakra/forms/pininput.pyi b/reflex/components/chakra/forms/pininput.pyi index 841370871..f255b7db1 100644 --- a/reflex/components/chakra/forms/pininput.pyi +++ b/reflex/components/chakra/forms/pininput.pyi @@ -49,7 +49,6 @@ class PinInput(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -131,7 +130,6 @@ class PinInput(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -156,7 +154,6 @@ class PinInputField(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -216,7 +213,6 @@ class PinInputField(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/radio.pyi b/reflex/components/chakra/forms/radio.pyi index 81485ee13..d48cb6c33 100644 --- a/reflex/components/chakra/forms/radio.pyi +++ b/reflex/components/chakra/forms/radio.pyi @@ -31,7 +31,6 @@ class RadioGroup(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -95,7 +94,6 @@ class RadioGroup(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -126,7 +124,6 @@ class Radio(Text): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -197,7 +194,6 @@ class Radio(Text): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/rangeslider.pyi b/reflex/components/chakra/forms/rangeslider.pyi index 63d4a9bf0..cb76cfbe8 100644 --- a/reflex/components/chakra/forms/rangeslider.pyi +++ b/reflex/components/chakra/forms/rangeslider.pyi @@ -40,7 +40,6 @@ class RangeSlider(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -120,7 +119,6 @@ class RangeSlider(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -140,7 +138,6 @@ class RangeSliderTrack(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -198,7 +195,6 @@ class RangeSliderTrack(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -221,7 +217,6 @@ class RangeSliderFilledTrack(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -279,7 +274,6 @@ class RangeSliderFilledTrack(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -304,7 +298,6 @@ class RangeSliderThumb(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -363,7 +356,6 @@ class RangeSliderThumb(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/select.pyi b/reflex/components/chakra/forms/select.pyi index eae35ab04..a443896e4 100644 --- a/reflex/components/chakra/forms/select.pyi +++ b/reflex/components/chakra/forms/select.pyi @@ -44,7 +44,6 @@ class Select(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -119,7 +118,6 @@ class Select(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -142,7 +140,6 @@ class Option(Text): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -204,7 +201,6 @@ class Option(Text): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/slider.pyi b/reflex/components/chakra/forms/slider.pyi index 9db6c6cf0..5bc500930 100644 --- a/reflex/components/chakra/forms/slider.pyi +++ b/reflex/components/chakra/forms/slider.pyi @@ -52,7 +52,6 @@ class Slider(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -139,7 +138,6 @@ class Slider(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -159,7 +157,6 @@ class SliderTrack(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -217,7 +214,6 @@ class SliderTrack(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -240,7 +236,6 @@ class SliderFilledTrack(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -298,7 +293,6 @@ class SliderFilledTrack(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -322,7 +316,6 @@ class SliderThumb(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -381,7 +374,6 @@ class SliderThumb(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -404,7 +396,6 @@ class SliderMark(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -462,7 +453,6 @@ class SliderMark(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/switch.pyi b/reflex/components/chakra/forms/switch.pyi index e5376bec4..1af43b2f1 100644 --- a/reflex/components/chakra/forms/switch.pyi +++ b/reflex/components/chakra/forms/switch.pyi @@ -82,7 +82,6 @@ class Switch(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -154,7 +153,6 @@ class Switch(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/forms/textarea.pyi b/reflex/components/chakra/forms/textarea.pyi index 87b867be9..48358e2ad 100644 --- a/reflex/components/chakra/forms/textarea.pyi +++ b/reflex/components/chakra/forms/textarea.pyi @@ -42,7 +42,6 @@ class TextArea(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -120,7 +119,6 @@ class TextArea(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/chakra/forms/time_picker.pyi b/reflex/components/chakra/forms/time_picker.pyi index 172f8406d..ac833e37b 100644 --- a/reflex/components/chakra/forms/time_picker.pyi +++ b/reflex/components/chakra/forms/time_picker.pyi @@ -41,7 +41,6 @@ class TimePicker(Input): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -121,7 +120,6 @@ class TimePicker(Input): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/chakra/layout/aspect_ratio.pyi b/reflex/components/chakra/layout/aspect_ratio.pyi index 59ec83f9b..1cd574abc 100644 --- a/reflex/components/chakra/layout/aspect_ratio.pyi +++ b/reflex/components/chakra/layout/aspect_ratio.pyi @@ -22,7 +22,6 @@ class AspectRatio(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -81,7 +80,6 @@ class AspectRatio(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/layout/box.pyi b/reflex/components/chakra/layout/box.pyi index 832b2d803..ba1f769b8 100644 --- a/reflex/components/chakra/layout/box.pyi +++ b/reflex/components/chakra/layout/box.pyi @@ -25,7 +25,6 @@ class Box(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -86,7 +85,6 @@ class Box(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/layout/card.pyi b/reflex/components/chakra/layout/card.pyi index 8c09b0095..6ec404acd 100644 --- a/reflex/components/chakra/layout/card.pyi +++ b/reflex/components/chakra/layout/card.pyi @@ -28,7 +28,6 @@ class CardHeader(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -86,7 +85,6 @@ class CardHeader(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -109,7 +107,6 @@ class CardBody(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -167,7 +164,6 @@ class CardBody(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -190,7 +186,6 @@ class CardFooter(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -248,7 +243,6 @@ class CardFooter(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -333,7 +327,6 @@ class Card(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] diff --git a/reflex/components/chakra/layout/center.pyi b/reflex/components/chakra/layout/center.pyi index 690be5b73..98fbbb84b 100644 --- a/reflex/components/chakra/layout/center.pyi +++ b/reflex/components/chakra/layout/center.pyi @@ -20,7 +20,6 @@ class Center(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -78,7 +77,6 @@ class Center(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -101,7 +99,6 @@ class Square(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -159,7 +156,6 @@ class Square(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -182,7 +178,6 @@ class Circle(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -240,7 +235,6 @@ class Circle(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/layout/container.pyi b/reflex/components/chakra/layout/container.pyi index ed0b08966..22594f4af 100644 --- a/reflex/components/chakra/layout/container.pyi +++ b/reflex/components/chakra/layout/container.pyi @@ -22,7 +22,6 @@ class Container(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -81,7 +80,6 @@ class Container(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/layout/flex.pyi b/reflex/components/chakra/layout/flex.pyi index 19614eae2..dbb3b36dc 100644 --- a/reflex/components/chakra/layout/flex.pyi +++ b/reflex/components/chakra/layout/flex.pyi @@ -31,7 +31,6 @@ class Flex(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -96,7 +95,6 @@ class Flex(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/layout/grid.pyi b/reflex/components/chakra/layout/grid.pyi index 1be11985c..7195a1579 100644 --- a/reflex/components/chakra/layout/grid.pyi +++ b/reflex/components/chakra/layout/grid.pyi @@ -29,7 +29,6 @@ class Grid(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -94,7 +93,6 @@ class Grid(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -124,7 +122,6 @@ class GridItem(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -189,7 +186,6 @@ class GridItem(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -225,7 +221,6 @@ class ResponsiveGrid(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -296,7 +291,6 @@ class ResponsiveGrid(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/layout/spacer.pyi b/reflex/components/chakra/layout/spacer.pyi index 2797311e2..6a793ce19 100644 --- a/reflex/components/chakra/layout/spacer.pyi +++ b/reflex/components/chakra/layout/spacer.pyi @@ -20,7 +20,6 @@ class Spacer(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -78,7 +77,6 @@ class Spacer(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/layout/stack.pyi b/reflex/components/chakra/layout/stack.pyi index af39a2773..28d110979 100644 --- a/reflex/components/chakra/layout/stack.pyi +++ b/reflex/components/chakra/layout/stack.pyi @@ -35,7 +35,6 @@ class Stack(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -101,7 +100,6 @@ class Stack(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -137,7 +135,6 @@ class Hstack(Stack): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -203,7 +200,6 @@ class Hstack(Stack): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -239,7 +235,6 @@ class Vstack(Stack): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -305,7 +300,6 @@ class Vstack(Stack): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/layout/wrap.pyi b/reflex/components/chakra/layout/wrap.pyi index 895a35f1a..ba54d9431 100644 --- a/reflex/components/chakra/layout/wrap.pyi +++ b/reflex/components/chakra/layout/wrap.pyi @@ -30,7 +30,6 @@ class Wrap(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -96,7 +95,6 @@ class Wrap(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -116,7 +114,6 @@ class WrapItem(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -174,7 +171,6 @@ class WrapItem(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/media/avatar.pyi b/reflex/components/chakra/media/avatar.pyi index 1b313ecd6..69b017801 100644 --- a/reflex/components/chakra/media/avatar.pyi +++ b/reflex/components/chakra/media/avatar.pyi @@ -36,7 +36,6 @@ class Avatar(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -105,7 +104,6 @@ class Avatar(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -128,7 +126,6 @@ class AvatarBadge(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -186,7 +183,6 @@ class AvatarBadge(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -211,7 +207,6 @@ class AvatarGroup(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -271,7 +266,6 @@ class AvatarGroup(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/media/icon.pyi b/reflex/components/chakra/media/icon.pyi index f856a2f40..987722c01 100644 --- a/reflex/components/chakra/media/icon.pyi +++ b/reflex/components/chakra/media/icon.pyi @@ -22,7 +22,6 @@ class ChakraIconComponent(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -80,7 +79,6 @@ class ChakraIconComponent(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -103,7 +101,6 @@ class Icon(ChakraIconComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -163,7 +160,6 @@ class Icon(ChakraIconComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The keyword arguments diff --git a/reflex/components/chakra/media/image.pyi b/reflex/components/chakra/media/image.pyi index 6804f974b..e20e3a871 100644 --- a/reflex/components/chakra/media/image.pyi +++ b/reflex/components/chakra/media/image.pyi @@ -37,7 +37,6 @@ class Image(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -112,7 +111,6 @@ class Image(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the image. diff --git a/reflex/components/chakra/navigation/breadcrumb.pyi b/reflex/components/chakra/navigation/breadcrumb.pyi index 6d10aae15..e7993cd52 100644 --- a/reflex/components/chakra/navigation/breadcrumb.pyi +++ b/reflex/components/chakra/navigation/breadcrumb.pyi @@ -27,7 +27,6 @@ class Breadcrumb(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -90,7 +89,6 @@ class Breadcrumb(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -116,7 +114,6 @@ class BreadcrumbItem(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -180,7 +177,6 @@ class BreadcrumbItem(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -200,7 +196,6 @@ class BreadcrumbSeparator(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -258,7 +253,6 @@ class BreadcrumbSeparator(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -287,7 +281,6 @@ class BreadcrumbLink(Link): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -351,7 +344,6 @@ class BreadcrumbLink(Link): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/navigation/link.pyi b/reflex/components/chakra/navigation/link.pyi index 190fb7b09..a5b3db0e0 100644 --- a/reflex/components/chakra/navigation/link.pyi +++ b/reflex/components/chakra/navigation/link.pyi @@ -31,7 +31,6 @@ class Link(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -94,7 +93,6 @@ class Link(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/navigation/linkoverlay.pyi b/reflex/components/chakra/navigation/linkoverlay.pyi index 9fcc7cc83..7daaf1924 100644 --- a/reflex/components/chakra/navigation/linkoverlay.pyi +++ b/reflex/components/chakra/navigation/linkoverlay.pyi @@ -23,7 +23,6 @@ class LinkOverlay(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -83,7 +82,6 @@ class LinkOverlay(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -106,7 +104,6 @@ class LinkBox(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -164,7 +161,6 @@ class LinkBox(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/navigation/stepper.pyi b/reflex/components/chakra/navigation/stepper.pyi index 6bdb20843..a4020d1cf 100644 --- a/reflex/components/chakra/navigation/stepper.pyi +++ b/reflex/components/chakra/navigation/stepper.pyi @@ -80,7 +80,6 @@ class Stepper(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -144,7 +143,6 @@ class Stepper(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -164,7 +162,6 @@ class Step(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -222,7 +219,6 @@ class Step(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -245,7 +241,6 @@ class StepDescription(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -303,7 +298,6 @@ class StepDescription(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -326,7 +320,6 @@ class StepIcon(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -384,7 +377,6 @@ class StepIcon(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -407,7 +399,6 @@ class StepIndicator(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -465,7 +456,6 @@ class StepIndicator(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -488,7 +478,6 @@ class StepNumber(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -546,7 +535,6 @@ class StepNumber(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -569,7 +557,6 @@ class StepSeparator(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -627,7 +614,6 @@ class StepSeparator(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -653,7 +639,6 @@ class StepStatus(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -712,7 +697,6 @@ class StepStatus(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -735,7 +719,6 @@ class StepTitle(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -793,7 +776,6 @@ class StepTitle(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/overlay/alertdialog.pyi b/reflex/components/chakra/overlay/alertdialog.pyi index ce508361f..01fd6240e 100644 --- a/reflex/components/chakra/overlay/alertdialog.pyi +++ b/reflex/components/chakra/overlay/alertdialog.pyi @@ -62,7 +62,6 @@ class AlertDialog(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -149,7 +148,6 @@ class AlertDialog(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the alert dialog component. @@ -172,7 +170,6 @@ class AlertDialogBody(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -230,7 +227,6 @@ class AlertDialogBody(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -253,7 +249,6 @@ class AlertDialogHeader(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -311,7 +306,6 @@ class AlertDialogHeader(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -334,7 +328,6 @@ class AlertDialogFooter(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -392,7 +385,6 @@ class AlertDialogFooter(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -415,7 +407,6 @@ class AlertDialogContent(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -473,7 +464,6 @@ class AlertDialogContent(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -496,7 +486,6 @@ class AlertDialogOverlay(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -554,7 +543,6 @@ class AlertDialogOverlay(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -577,7 +565,6 @@ class AlertDialogCloseButton(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -635,7 +622,6 @@ class AlertDialogCloseButton(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/overlay/drawer.pyi b/reflex/components/chakra/overlay/drawer.pyi index 189378795..be6c3830b 100644 --- a/reflex/components/chakra/overlay/drawer.pyi +++ b/reflex/components/chakra/overlay/drawer.pyi @@ -101,7 +101,6 @@ class Drawer(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -191,7 +190,6 @@ class Drawer(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the drawer component. @@ -214,7 +212,6 @@ class DrawerBody(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -272,7 +269,6 @@ class DrawerBody(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -295,7 +291,6 @@ class DrawerHeader(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -353,7 +348,6 @@ class DrawerHeader(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -376,7 +370,6 @@ class DrawerFooter(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -434,7 +427,6 @@ class DrawerFooter(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -457,7 +449,6 @@ class DrawerOverlay(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -515,7 +506,6 @@ class DrawerOverlay(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -538,7 +528,6 @@ class DrawerContent(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -596,7 +585,6 @@ class DrawerContent(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -619,7 +607,6 @@ class DrawerCloseButton(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -677,7 +664,6 @@ class DrawerCloseButton(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/overlay/menu.pyi b/reflex/components/chakra/overlay/menu.pyi index 660838313..3450cfde9 100644 --- a/reflex/components/chakra/overlay/menu.pyi +++ b/reflex/components/chakra/overlay/menu.pyi @@ -52,7 +52,6 @@ class Menu(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -134,7 +133,6 @@ class Menu(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -156,7 +154,6 @@ class MenuButton(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -216,7 +213,6 @@ class MenuButton(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -240,7 +236,6 @@ class MenuList(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -299,7 +294,6 @@ class MenuList(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -324,7 +318,6 @@ class MenuItem(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -387,7 +380,6 @@ class MenuItem(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -420,7 +412,6 @@ class MenuItemOption(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -486,7 +477,6 @@ class MenuItemOption(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -509,7 +499,6 @@ class MenuGroup(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -567,7 +556,6 @@ class MenuGroup(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -594,7 +582,6 @@ class MenuOptionGroup(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -654,7 +641,6 @@ class MenuOptionGroup(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -677,7 +663,6 @@ class MenuDivider(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -735,7 +720,6 @@ class MenuDivider(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/overlay/modal.pyi b/reflex/components/chakra/overlay/modal.pyi index 9b3d2826e..5550f6d42 100644 --- a/reflex/components/chakra/overlay/modal.pyi +++ b/reflex/components/chakra/overlay/modal.pyi @@ -49,7 +49,6 @@ class Modal(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -136,7 +135,6 @@ class Modal(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -159,7 +157,6 @@ class ModalOverlay(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -217,7 +214,6 @@ class ModalOverlay(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -240,7 +236,6 @@ class ModalHeader(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -298,7 +293,6 @@ class ModalHeader(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -321,7 +315,6 @@ class ModalFooter(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -379,7 +372,6 @@ class ModalFooter(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -402,7 +394,6 @@ class ModalContent(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -460,7 +451,6 @@ class ModalContent(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -483,7 +473,6 @@ class ModalBody(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -541,7 +530,6 @@ class ModalBody(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -564,7 +552,6 @@ class ModalCloseButton(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -622,7 +609,6 @@ class ModalCloseButton(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/overlay/popover.pyi b/reflex/components/chakra/overlay/popover.pyi index d502f29bb..2f39860d3 100644 --- a/reflex/components/chakra/overlay/popover.pyi +++ b/reflex/components/chakra/overlay/popover.pyi @@ -58,7 +58,6 @@ class Popover(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -147,7 +146,6 @@ class Popover(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -167,7 +165,6 @@ class PopoverContent(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -225,7 +222,6 @@ class PopoverContent(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -248,7 +244,6 @@ class PopoverHeader(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -306,7 +301,6 @@ class PopoverHeader(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -329,7 +323,6 @@ class PopoverFooter(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -387,7 +380,6 @@ class PopoverFooter(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -410,7 +402,6 @@ class PopoverBody(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -468,7 +459,6 @@ class PopoverBody(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -491,7 +481,6 @@ class PopoverArrow(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -549,7 +538,6 @@ class PopoverArrow(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -572,7 +560,6 @@ class PopoverCloseButton(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -630,7 +617,6 @@ class PopoverCloseButton(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -653,7 +639,6 @@ class PopoverAnchor(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -711,7 +696,6 @@ class PopoverAnchor(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -734,7 +718,6 @@ class PopoverTrigger(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -792,7 +775,6 @@ class PopoverTrigger(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/overlay/tooltip.pyi b/reflex/components/chakra/overlay/tooltip.pyi index 492e1c41c..e7aad7f50 100644 --- a/reflex/components/chakra/overlay/tooltip.pyi +++ b/reflex/components/chakra/overlay/tooltip.pyi @@ -42,7 +42,6 @@ class Tooltip(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -123,7 +122,6 @@ class Tooltip(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/typography/heading.pyi b/reflex/components/chakra/typography/heading.pyi index 2aef0a631..e6cfa6b11 100644 --- a/reflex/components/chakra/typography/heading.pyi +++ b/reflex/components/chakra/typography/heading.pyi @@ -28,7 +28,6 @@ class Heading(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -88,7 +87,6 @@ class Heading(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/typography/highlight.pyi b/reflex/components/chakra/typography/highlight.pyi index 91b194554..0d935a7e8 100644 --- a/reflex/components/chakra/typography/highlight.pyi +++ b/reflex/components/chakra/typography/highlight.pyi @@ -25,7 +25,6 @@ class Highlight(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -85,7 +84,6 @@ class Highlight(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/typography/span.pyi b/reflex/components/chakra/typography/span.pyi index 84c39bcbd..5cb16e319 100644 --- a/reflex/components/chakra/typography/span.pyi +++ b/reflex/components/chakra/typography/span.pyi @@ -22,7 +22,6 @@ class Span(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -81,7 +80,6 @@ class Span(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/chakra/typography/text.pyi b/reflex/components/chakra/typography/text.pyi index 6fb06ada7..ca81acc24 100644 --- a/reflex/components/chakra/typography/text.pyi +++ b/reflex/components/chakra/typography/text.pyi @@ -23,7 +23,6 @@ class Text(ChakraComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -83,7 +82,6 @@ class Text(ChakraComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/component.py b/reflex/components/component.py index 0d619a8cf..889aa8d59 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -659,7 +659,7 @@ class Component(BaseComponent, ABC): for ix, prop in enumerate(rendered_dict["props"]): for old_prop, new_prop in self._rename_props.items(): if prop.startswith(old_prop): - rendered_dict["props"][ix] = prop.replace(old_prop, new_prop) + rendered_dict["props"][ix] = prop.replace(old_prop, new_prop, 1) def _validate_component_children(self, children: List[Component]): """Validate the children components. diff --git a/reflex/components/core/banner.pyi b/reflex/components/core/banner.pyi index 00f9a5121..456d54bea 100644 --- a/reflex/components/core/banner.pyi +++ b/reflex/components/core/banner.pyi @@ -34,7 +34,6 @@ class WebsocketTargetURL(Bare): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -103,7 +102,6 @@ class ConnectionBanner(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -173,7 +171,6 @@ class ConnectionModal(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] diff --git a/reflex/components/core/client_side_routing.pyi b/reflex/components/core/client_side_routing.pyi index 4b90e79c4..53bf90043 100644 --- a/reflex/components/core/client_side_routing.pyi +++ b/reflex/components/core/client_side_routing.pyi @@ -26,7 +26,6 @@ class ClientSideRouting(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -84,7 +83,6 @@ class ClientSideRouting(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -110,7 +108,6 @@ class Default404Page(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -168,7 +165,6 @@ class Default404Page(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/core/debounce.pyi b/reflex/components/core/debounce.pyi index db9a3e8b0..a37d6c1ae 100644 --- a/reflex/components/core/debounce.pyi +++ b/reflex/components/core/debounce.pyi @@ -32,7 +32,6 @@ class DebounceInput(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] diff --git a/reflex/components/core/html.pyi b/reflex/components/core/html.pyi index f16001435..e5246380c 100644 --- a/reflex/components/core/html.pyi +++ b/reflex/components/core/html.pyi @@ -65,7 +65,6 @@ class Html(Div): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -140,7 +139,6 @@ class Html(Div): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props to pass to the component. diff --git a/reflex/components/core/upload.pyi b/reflex/components/core/upload.pyi index f11d1ea10..e8f4c6d18 100644 --- a/reflex/components/core/upload.pyi +++ b/reflex/components/core/upload.pyi @@ -46,7 +46,6 @@ class UploadFilesProvider(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -104,7 +103,6 @@ class UploadFilesProvider(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -140,7 +138,6 @@ class Upload(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -210,7 +207,6 @@ class Upload(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/datadisplay/code.pyi b/reflex/components/datadisplay/code.pyi index cdbf8454b..99b40c55e 100644 --- a/reflex/components/datadisplay/code.pyi +++ b/reflex/components/datadisplay/code.pyi @@ -1036,7 +1036,6 @@ class CodeBlock(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1104,7 +1103,6 @@ class CodeBlock(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props to pass to the component. diff --git a/reflex/components/datadisplay/dataeditor.pyi b/reflex/components/datadisplay/dataeditor.pyi index 8e7d00827..fcc299926 100644 --- a/reflex/components/datadisplay/dataeditor.pyi +++ b/reflex/components/datadisplay/dataeditor.pyi @@ -134,7 +134,6 @@ class DataEditor(NoSSRComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_cell_activated: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -224,7 +223,6 @@ class DataEditor(NoSSRComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the data editor. diff --git a/reflex/components/el/element.pyi b/reflex/components/el/element.pyi index 818fc5061..5b488d919 100644 --- a/reflex/components/el/element.pyi +++ b/reflex/components/el/element.pyi @@ -20,7 +20,6 @@ class Element(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -78,7 +77,6 @@ class Element(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/el/elements/base.pyi b/reflex/components/el/elements/base.pyi index cdd2a8af4..5b58c88d6 100644 --- a/reflex/components/el/elements/base.pyi +++ b/reflex/components/el/elements/base.pyi @@ -62,7 +62,6 @@ class BaseHTML(Element): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -136,7 +135,6 @@ class BaseHTML(Element): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/el/elements/forms.pyi b/reflex/components/el/elements/forms.pyi index 402f22550..dd681a35a 100644 --- a/reflex/components/el/elements/forms.pyi +++ b/reflex/components/el/elements/forms.pyi @@ -89,7 +89,6 @@ class Button(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -174,7 +173,6 @@ class Button(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -237,7 +235,6 @@ class Datalist(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -311,7 +308,6 @@ class Datalist(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -339,7 +335,6 @@ class Fieldset(Element): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -400,7 +395,6 @@ class Fieldset(Element): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -488,7 +482,6 @@ class Form(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -571,7 +564,6 @@ class Form(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -708,7 +700,6 @@ class Input(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -822,7 +813,6 @@ class Input(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -889,7 +879,6 @@ class Label(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -965,7 +954,6 @@ class Label(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1028,7 +1016,6 @@ class Legend(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1102,7 +1089,6 @@ class Legend(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1176,7 +1162,6 @@ class Meter(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1257,7 +1242,6 @@ class Meter(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1326,7 +1310,6 @@ class Optgroup(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1402,7 +1385,6 @@ class Optgroup(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1477,7 +1459,6 @@ class Option(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1555,7 +1536,6 @@ class Option(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1623,7 +1603,6 @@ class Output(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1700,7 +1679,6 @@ class Output(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1768,7 +1746,6 @@ class Progress(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1845,7 +1822,6 @@ class Progress(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1927,7 +1903,6 @@ class Select(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2012,7 +1987,6 @@ class Select(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2111,7 +2085,6 @@ class Textarea(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2209,7 +2182,6 @@ class Textarea(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/el/elements/inline.pyi b/reflex/components/el/elements/inline.pyi index ffb1daf90..971ec8d68 100644 --- a/reflex/components/el/elements/inline.pyi +++ b/reflex/components/el/elements/inline.pyi @@ -83,7 +83,6 @@ class A(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -166,7 +165,6 @@ class A(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -229,7 +227,6 @@ class Abbr(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -303,7 +300,6 @@ class Abbr(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -366,7 +362,6 @@ class B(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -440,7 +435,6 @@ class B(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -503,7 +497,6 @@ class Bdi(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -577,7 +570,6 @@ class Bdi(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -640,7 +632,6 @@ class Bdo(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -714,7 +705,6 @@ class Bdo(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -777,7 +767,6 @@ class Br(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -851,7 +840,6 @@ class Br(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -914,7 +902,6 @@ class Cite(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -988,7 +975,6 @@ class Cite(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1051,7 +1037,6 @@ class Code(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1125,7 +1110,6 @@ class Code(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1191,7 +1175,6 @@ class Data(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1266,7 +1249,6 @@ class Data(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1329,7 +1311,6 @@ class Dfn(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1403,7 +1384,6 @@ class Dfn(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1466,7 +1446,6 @@ class Em(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1540,7 +1519,6 @@ class Em(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1603,7 +1581,6 @@ class I(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1677,7 +1654,6 @@ class I(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1740,7 +1716,6 @@ class Kbd(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1814,7 +1789,6 @@ class Kbd(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1877,7 +1851,6 @@ class Mark(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1951,7 +1924,6 @@ class Mark(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2015,7 +1987,6 @@ class Q(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2090,7 +2061,6 @@ class Q(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2153,7 +2123,6 @@ class Rp(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2227,7 +2196,6 @@ class Rp(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2290,7 +2258,6 @@ class Rt(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2364,7 +2331,6 @@ class Rt(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2427,7 +2393,6 @@ class Ruby(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2501,7 +2466,6 @@ class Ruby(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2564,7 +2528,6 @@ class S(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2638,7 +2601,6 @@ class S(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2701,7 +2663,6 @@ class Samp(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2775,7 +2736,6 @@ class Samp(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2838,7 +2798,6 @@ class Small(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2912,7 +2871,6 @@ class Small(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2975,7 +2933,6 @@ class Span(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -3049,7 +3006,6 @@ class Span(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -3112,7 +3068,6 @@ class Strong(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -3186,7 +3141,6 @@ class Strong(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -3249,7 +3203,6 @@ class Sub(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -3323,7 +3276,6 @@ class Sub(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -3386,7 +3338,6 @@ class Sup(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -3460,7 +3411,6 @@ class Sup(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -3526,7 +3476,6 @@ class Time(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -3601,7 +3550,6 @@ class Time(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -3664,7 +3612,6 @@ class U(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -3738,7 +3685,6 @@ class U(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -3801,7 +3747,6 @@ class Wbr(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -3875,7 +3820,6 @@ class Wbr(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/el/elements/media.pyi b/reflex/components/el/elements/media.pyi index f6479bef1..5e0316199 100644 --- a/reflex/components/el/elements/media.pyi +++ b/reflex/components/el/elements/media.pyi @@ -87,7 +87,6 @@ class Area(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -172,7 +171,6 @@ class Area(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -255,7 +253,6 @@ class Audio(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -337,7 +334,6 @@ class Audio(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -432,7 +428,6 @@ class Img(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -518,7 +513,6 @@ class Img(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -582,7 +576,6 @@ class Map(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -657,7 +650,6 @@ class Map(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -731,7 +723,6 @@ class Track(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -810,7 +801,6 @@ class Track(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -899,7 +889,6 @@ class Video(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -983,7 +972,6 @@ class Video(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1048,7 +1036,6 @@ class Embed(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1124,7 +1111,6 @@ class Embed(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1208,7 +1194,6 @@ class Iframe(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1291,7 +1276,6 @@ class Iframe(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1361,7 +1345,6 @@ class Object(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1440,7 +1423,6 @@ class Object(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1503,7 +1485,6 @@ class Picture(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1577,7 +1558,6 @@ class Picture(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1640,7 +1620,6 @@ class Portal(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1714,7 +1693,6 @@ class Portal(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1788,7 +1766,6 @@ class Source(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1867,7 +1844,6 @@ class Source(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1930,7 +1906,6 @@ class Svg(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2004,7 +1979,6 @@ class Svg(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2068,7 +2042,6 @@ class Path(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2143,7 +2116,6 @@ class Path(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/el/elements/metadata.pyi b/reflex/components/el/elements/metadata.pyi index 9bfb237b2..8dd05ff96 100644 --- a/reflex/components/el/elements/metadata.pyi +++ b/reflex/components/el/elements/metadata.pyi @@ -67,7 +67,6 @@ class Base(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -141,7 +140,6 @@ class Base(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -204,7 +202,6 @@ class Head(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -278,7 +275,6 @@ class Head(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -362,7 +358,6 @@ class Link(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -436,7 +431,6 @@ class Link(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -509,7 +503,6 @@ class Meta(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -583,7 +576,6 @@ class Meta(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -606,7 +598,6 @@ class Title(Element): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -664,7 +655,6 @@ class Title(Element): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/el/elements/other.pyi b/reflex/components/el/elements/other.pyi index 3753d7926..1d939d5c2 100644 --- a/reflex/components/el/elements/other.pyi +++ b/reflex/components/el/elements/other.pyi @@ -63,7 +63,6 @@ class Details(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -138,7 +137,6 @@ class Details(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -202,7 +200,6 @@ class Dialog(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -277,7 +274,6 @@ class Dialog(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -340,7 +336,6 @@ class Summary(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -414,7 +409,6 @@ class Summary(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -477,7 +471,6 @@ class Slot(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -551,7 +544,6 @@ class Slot(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -614,7 +606,6 @@ class Template(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -688,7 +679,6 @@ class Template(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -751,7 +741,6 @@ class Math(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -825,7 +814,6 @@ class Math(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -891,7 +879,6 @@ class Html(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -966,7 +953,6 @@ class Html(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/el/elements/scripts.pyi b/reflex/components/el/elements/scripts.pyi index 5d9f57a0c..ca2ec9fc6 100644 --- a/reflex/components/el/elements/scripts.pyi +++ b/reflex/components/el/elements/scripts.pyi @@ -62,7 +62,6 @@ class Canvas(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -136,7 +135,6 @@ class Canvas(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -199,7 +197,6 @@ class Noscript(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -273,7 +270,6 @@ class Noscript(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -359,7 +355,6 @@ class Script(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -442,7 +437,6 @@ class Script(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/el/elements/sectioning.pyi b/reflex/components/el/elements/sectioning.pyi index 69e984532..8233d45d3 100644 --- a/reflex/components/el/elements/sectioning.pyi +++ b/reflex/components/el/elements/sectioning.pyi @@ -61,7 +61,6 @@ class Body(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -135,7 +134,6 @@ class Body(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -198,7 +196,6 @@ class Address(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -272,7 +269,6 @@ class Address(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -335,7 +331,6 @@ class Article(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -409,7 +404,6 @@ class Article(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -472,7 +466,6 @@ class Aside(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -546,7 +539,6 @@ class Aside(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -609,7 +601,6 @@ class Footer(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -683,7 +674,6 @@ class Footer(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -746,7 +736,6 @@ class Header(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -820,7 +809,6 @@ class Header(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -883,7 +871,6 @@ class H1(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -957,7 +944,6 @@ class H1(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1020,7 +1006,6 @@ class H2(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1094,7 +1079,6 @@ class H2(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1157,7 +1141,6 @@ class H3(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1231,7 +1214,6 @@ class H3(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1294,7 +1276,6 @@ class H4(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1368,7 +1349,6 @@ class H4(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1431,7 +1411,6 @@ class H5(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1505,7 +1484,6 @@ class H5(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1568,7 +1546,6 @@ class H6(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1642,7 +1619,6 @@ class H6(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1705,7 +1681,6 @@ class Main(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1779,7 +1754,6 @@ class Main(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1842,7 +1816,6 @@ class Nav(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1916,7 +1889,6 @@ class Nav(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1979,7 +1951,6 @@ class Section(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2053,7 +2024,6 @@ class Section(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/el/elements/tables.pyi b/reflex/components/el/elements/tables.pyi index a01095c53..3d1ac50a3 100644 --- a/reflex/components/el/elements/tables.pyi +++ b/reflex/components/el/elements/tables.pyi @@ -65,7 +65,6 @@ class Caption(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -140,7 +139,6 @@ class Caption(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -207,7 +205,6 @@ class Col(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -283,7 +280,6 @@ class Col(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -350,7 +346,6 @@ class Colgroup(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -426,7 +421,6 @@ class Colgroup(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -495,7 +489,6 @@ class Table(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -571,7 +564,6 @@ class Table(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -637,7 +629,6 @@ class Tbody(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -712,7 +703,6 @@ class Tbody(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -787,7 +777,6 @@ class Td(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -865,7 +854,6 @@ class Td(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -931,7 +919,6 @@ class Tfoot(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1006,7 +993,6 @@ class Tfoot(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1084,7 +1070,6 @@ class Th(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1163,7 +1148,6 @@ class Th(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1229,7 +1213,6 @@ class Thead(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1304,7 +1287,6 @@ class Thead(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1370,7 +1352,6 @@ class Tr(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1445,7 +1426,6 @@ class Tr(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/el/elements/typography.pyi b/reflex/components/el/elements/typography.pyi index 2f30c4805..bb70908af 100644 --- a/reflex/components/el/elements/typography.pyi +++ b/reflex/components/el/elements/typography.pyi @@ -63,7 +63,6 @@ class Blockquote(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -138,7 +137,6 @@ class Blockquote(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -201,7 +199,6 @@ class Dd(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -275,7 +272,6 @@ class Dd(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -338,7 +334,6 @@ class Div(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -412,7 +407,6 @@ class Div(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -475,7 +469,6 @@ class Dl(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -549,7 +542,6 @@ class Dl(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -612,7 +604,6 @@ class Dt(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -686,7 +677,6 @@ class Dt(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -749,7 +739,6 @@ class Figcaption(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -823,7 +812,6 @@ class Figcaption(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -889,7 +877,6 @@ class Hr(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -964,7 +951,6 @@ class Hr(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1027,7 +1013,6 @@ class Li(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1101,7 +1086,6 @@ class Li(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1165,7 +1149,6 @@ class Menu(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1240,7 +1223,6 @@ class Menu(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1310,7 +1292,6 @@ class Ol(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1387,7 +1368,6 @@ class Ol(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1450,7 +1430,6 @@ class P(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1524,7 +1503,6 @@ class P(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1587,7 +1565,6 @@ class Pre(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1661,7 +1638,6 @@ class Pre(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1724,7 +1700,6 @@ class Ul(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1798,7 +1773,6 @@ class Ul(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1865,7 +1839,6 @@ class Ins(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1941,7 +1914,6 @@ class Ins(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -2008,7 +1980,6 @@ class Del(BaseHTML): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -2084,7 +2055,6 @@ class Del(BaseHTML): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/gridjs/datatable.pyi b/reflex/components/gridjs/datatable.pyi index 9ad0d03d2..691c3d4bd 100644 --- a/reflex/components/gridjs/datatable.pyi +++ b/reflex/components/gridjs/datatable.pyi @@ -25,7 +25,6 @@ class Gridjs(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -83,7 +82,6 @@ class Gridjs(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -112,7 +110,6 @@ class DataTable(Gridjs): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -176,7 +173,6 @@ class DataTable(Gridjs): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props to pass to the component. diff --git a/reflex/components/lucide/icon.pyi b/reflex/components/lucide/icon.pyi index cdca826cd..26eabb48b 100644 --- a/reflex/components/lucide/icon.pyi +++ b/reflex/components/lucide/icon.pyi @@ -23,7 +23,6 @@ class LucideIconComponent(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -81,7 +80,6 @@ class LucideIconComponent(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -105,7 +103,6 @@ class Icon(LucideIconComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -166,7 +163,6 @@ class Icon(LucideIconComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The keyword arguments diff --git a/reflex/components/markdown/markdown.pyi b/reflex/components/markdown/markdown.pyi index 27c9789ac..1322e7622 100644 --- a/reflex/components/markdown/markdown.pyi +++ b/reflex/components/markdown/markdown.pyi @@ -55,7 +55,6 @@ class Markdown(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -116,7 +115,6 @@ class Markdown(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/moment/moment.pyi b/reflex/components/moment/moment.pyi index bd5392f7e..6eb780cda 100644 --- a/reflex/components/moment/moment.pyi +++ b/reflex/components/moment/moment.pyi @@ -56,7 +56,6 @@ class Moment(NoSSRComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -137,7 +136,6 @@ class Moment(NoSSRComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/next/base.pyi b/reflex/components/next/base.pyi index f940aaca1..57fab6a9a 100644 --- a/reflex/components/next/base.pyi +++ b/reflex/components/next/base.pyi @@ -22,7 +22,6 @@ class NextComponent(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -80,7 +79,6 @@ class NextComponent(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/next/image.pyi b/reflex/components/next/image.pyi index 3eba50fba..a8f7d8379 100644 --- a/reflex/components/next/image.pyi +++ b/reflex/components/next/image.pyi @@ -38,7 +38,6 @@ class Image(NextComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -114,7 +113,6 @@ class Image(NextComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props:The props of the component. diff --git a/reflex/components/next/link.pyi b/reflex/components/next/link.pyi index 57e42d550..3d8809968 100644 --- a/reflex/components/next/link.pyi +++ b/reflex/components/next/link.pyi @@ -23,7 +23,6 @@ class NextLink(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -83,7 +82,6 @@ class NextLink(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/next/video.pyi b/reflex/components/next/video.pyi index 25cd027d6..cee5c4c9d 100644 --- a/reflex/components/next/video.pyi +++ b/reflex/components/next/video.pyi @@ -25,7 +25,6 @@ class Video(NextComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -84,7 +83,6 @@ class Video(NextComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/plotly/plotly.pyi b/reflex/components/plotly/plotly.pyi index d237f1c12..2a0653aeb 100644 --- a/reflex/components/plotly/plotly.pyi +++ b/reflex/components/plotly/plotly.pyi @@ -27,7 +27,6 @@ class PlotlyLib(NoSSRComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -85,7 +84,6 @@ class PlotlyLib(NoSSRComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -113,7 +111,6 @@ class Plotly(PlotlyLib): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -176,7 +173,6 @@ class Plotly(PlotlyLib): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index a56b70b70..5e38a5516 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -51,7 +51,6 @@ class AccordionComponent(RadixPrimitiveComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -110,7 +109,6 @@ class AccordionComponent(RadixPrimitiveComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -218,7 +216,6 @@ class AccordionRoot(AccordionComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -291,7 +288,6 @@ class AccordionRoot(AccordionComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -315,7 +311,6 @@ class AccordionItem(AccordionComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -376,7 +371,6 @@ class AccordionItem(AccordionComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -400,7 +394,6 @@ class AccordionHeader(AccordionComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -459,7 +452,6 @@ class AccordionHeader(AccordionComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -483,7 +475,6 @@ class AccordionTrigger(AccordionComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -542,7 +533,6 @@ class AccordionTrigger(AccordionComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -566,7 +556,6 @@ class AccordionContent(AccordionComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -625,7 +614,6 @@ class AccordionContent(AccordionComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/radix/primitives/base.pyi b/reflex/components/radix/primitives/base.pyi index e1e2e5711..f31a66252 100644 --- a/reflex/components/radix/primitives/base.pyi +++ b/reflex/components/radix/primitives/base.pyi @@ -25,7 +25,6 @@ class RadixPrimitiveComponent(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -84,7 +83,6 @@ class RadixPrimitiveComponent(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -108,7 +106,6 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -167,7 +164,6 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/radix/primitives/drawer.pyi b/reflex/components/radix/primitives/drawer.pyi index 8c57293c7..352460f87 100644 --- a/reflex/components/radix/primitives/drawer.pyi +++ b/reflex/components/radix/primitives/drawer.pyi @@ -25,7 +25,6 @@ class DrawerComponent(RadixPrimitiveComponentWithClassName): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -84,7 +83,6 @@ class DrawerComponent(RadixPrimitiveComponentWithClassName): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -125,7 +123,6 @@ class DrawerRoot(DrawerComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -196,7 +193,6 @@ class DrawerRoot(DrawerComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -220,7 +216,6 @@ class DrawerTrigger(DrawerComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -279,7 +274,6 @@ class DrawerTrigger(DrawerComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -303,7 +297,6 @@ class DrawerPortal(DrawerComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -362,7 +355,6 @@ class DrawerPortal(DrawerComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -387,7 +379,6 @@ class DrawerContent(DrawerComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -461,7 +452,6 @@ class DrawerContent(DrawerComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -485,7 +475,6 @@ class DrawerOverlay(DrawerComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -544,7 +533,6 @@ class DrawerOverlay(DrawerComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -568,7 +556,6 @@ class DrawerClose(DrawerComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -627,7 +614,6 @@ class DrawerClose(DrawerComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -651,7 +637,6 @@ class DrawerTitle(DrawerComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -710,7 +695,6 @@ class DrawerTitle(DrawerComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -734,7 +718,6 @@ class DrawerDescription(DrawerComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -793,7 +776,6 @@ class DrawerDescription(DrawerComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -838,7 +820,6 @@ class Drawer(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -909,7 +890,6 @@ class Drawer(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index f2ea87c1f..752d365cb 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -39,7 +39,6 @@ class FormComponent(RadixPrimitiveComponentWithClassName): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -98,7 +97,6 @@ class FormComponent(RadixPrimitiveComponentWithClassName): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -125,7 +123,6 @@ class FormRoot(FormComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -192,7 +189,6 @@ class FormRoot(FormComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the form. @@ -215,7 +211,6 @@ class FormField(FormComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -276,7 +271,6 @@ class FormField(FormComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -300,7 +294,6 @@ class FormLabel(FormComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -359,7 +352,6 @@ class FormLabel(FormComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -383,7 +375,6 @@ class FormControl(FormComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -442,7 +433,6 @@ class FormControl(FormComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the form. @@ -512,7 +502,6 @@ class FormMessage(FormComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -574,7 +563,6 @@ class FormMessage(FormComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -598,7 +586,6 @@ class FormValidityState(FormComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -657,7 +644,6 @@ class FormValidityState(FormComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -681,7 +667,6 @@ class FormSubmit(FormComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -740,7 +725,6 @@ class FormSubmit(FormComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -772,7 +756,6 @@ class Form(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -839,7 +822,6 @@ class Form(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the form. diff --git a/reflex/components/radix/primitives/progress.pyi b/reflex/components/radix/primitives/progress.pyi index 61186c33b..70e19be44 100644 --- a/reflex/components/radix/primitives/progress.pyi +++ b/reflex/components/radix/primitives/progress.pyi @@ -27,7 +27,6 @@ class ProgressComponent(RadixPrimitiveComponentWithClassName): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -86,7 +85,6 @@ class ProgressComponent(RadixPrimitiveComponentWithClassName): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -112,7 +110,6 @@ class ProgressRoot(ProgressComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -173,7 +170,6 @@ class ProgressRoot(ProgressComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -198,7 +194,6 @@ class ProgressIndicator(ProgressComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -258,7 +253,6 @@ class ProgressIndicator(ProgressComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/radix/primitives/slider.pyi b/reflex/components/radix/primitives/slider.pyi index 57c58ef9d..da2228c90 100644 --- a/reflex/components/radix/primitives/slider.pyi +++ b/reflex/components/radix/primitives/slider.pyi @@ -29,7 +29,6 @@ class SliderComponent(RadixPrimitiveComponentWithClassName): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -88,7 +87,6 @@ class SliderComponent(RadixPrimitiveComponentWithClassName): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -129,7 +127,6 @@ class SliderRoot(SliderComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -194,7 +191,6 @@ class SliderRoot(SliderComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -218,7 +214,6 @@ class SliderTrack(SliderComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -277,7 +272,6 @@ class SliderTrack(SliderComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -301,7 +295,6 @@ class SliderRange(SliderComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -360,7 +353,6 @@ class SliderRange(SliderComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -384,7 +376,6 @@ class SliderThumb(SliderComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -443,7 +434,6 @@ class SliderThumb(SliderComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/radix/themes/base.pyi b/reflex/components/radix/themes/base.pyi index 213afde02..da3cf1d5e 100644 --- a/reflex/components/radix/themes/base.pyi +++ b/reflex/components/radix/themes/base.pyi @@ -104,7 +104,6 @@ class CommonMarginProps(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -169,7 +168,6 @@ class CommonMarginProps(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -255,7 +253,6 @@ class RadixThemesComponent(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -318,7 +315,6 @@ class RadixThemesComponent(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -431,7 +427,6 @@ class Theme(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -497,7 +492,6 @@ class Theme(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -581,7 +575,6 @@ class ThemePanel(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -645,7 +638,6 @@ class ThemePanel(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -665,7 +657,6 @@ class RadixThemesColorModeProvider(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -723,7 +714,6 @@ class RadixThemesColorModeProvider(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/radix/themes/color_mode.pyi b/reflex/components/radix/themes/color_mode.pyi index 3542d481b..5818d6753 100644 --- a/reflex/components/radix/themes/color_mode.pyi +++ b/reflex/components/radix/themes/color_mode.pyi @@ -33,7 +33,6 @@ class ColorModeIcon(Cond): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -188,7 +187,6 @@ class ColorModeSwitch(Switch): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -261,7 +259,6 @@ class ColorModeSwitch(Switch): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props to pass to the component. @@ -425,7 +422,6 @@ class ColorModeButton(Button): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -516,7 +512,6 @@ class ColorModeButton(Button): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props to pass to the component. diff --git a/reflex/components/radix/themes/components/alert_dialog.pyi b/reflex/components/radix/themes/components/alert_dialog.pyi index 9ba8fa07f..2cec7b3a1 100644 --- a/reflex/components/radix/themes/components/alert_dialog.pyi +++ b/reflex/components/radix/themes/components/alert_dialog.pyi @@ -92,7 +92,6 @@ class AlertDialogRoot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -159,7 +158,6 @@ class AlertDialogRoot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -242,7 +240,6 @@ class AlertDialogTrigger(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -305,7 +302,6 @@ class AlertDialogTrigger(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -433,7 +429,6 @@ class AlertDialogContent(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -523,7 +518,6 @@ class AlertDialogContent(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -606,7 +600,6 @@ class AlertDialogTitle(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -669,7 +662,6 @@ class AlertDialogTitle(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -752,7 +744,6 @@ class AlertDialogDescription(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -815,7 +806,6 @@ class AlertDialogDescription(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -898,7 +888,6 @@ class AlertDialogAction(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -961,7 +950,6 @@ class AlertDialogAction(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1044,7 +1032,6 @@ class AlertDialogCancel(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1107,7 +1094,6 @@ class AlertDialogCancel(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/aspect_ratio.pyi b/reflex/components/radix/themes/components/aspect_ratio.pyi index 2efcfc54f..12bb55c08 100644 --- a/reflex/components/radix/themes/components/aspect_ratio.pyi +++ b/reflex/components/radix/themes/components/aspect_ratio.pyi @@ -86,7 +86,6 @@ class AspectRatio(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -150,7 +149,6 @@ class AspectRatio(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/avatar.pyi b/reflex/components/radix/themes/components/avatar.pyi index 232d765d8..5b8722d74 100644 --- a/reflex/components/radix/themes/components/avatar.pyi +++ b/reflex/components/radix/themes/components/avatar.pyi @@ -103,7 +103,6 @@ class Avatar(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -172,7 +171,6 @@ class Avatar(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/badge.pyi b/reflex/components/radix/themes/components/badge.pyi index 9586b06ba..9968994fc 100644 --- a/reflex/components/radix/themes/components/badge.pyi +++ b/reflex/components/radix/themes/components/badge.pyi @@ -140,7 +140,6 @@ class Badge(el.Span, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -223,7 +222,6 @@ class Badge(el.Span, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/button.pyi b/reflex/components/radix/themes/components/button.pyi index b0258ab56..ffb7d2d3b 100644 --- a/reflex/components/radix/themes/components/button.pyi +++ b/reflex/components/radix/themes/components/button.pyi @@ -175,7 +175,6 @@ class Button(el.Button, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -270,7 +269,6 @@ class Button(el.Button, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index e8221e2a3..3954f491e 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -143,7 +143,6 @@ class CalloutRoot(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -226,7 +225,6 @@ class CalloutRoot(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -349,7 +347,6 @@ class CalloutIcon(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -428,7 +425,6 @@ class CalloutIcon(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -551,7 +547,6 @@ class CalloutText(el.P, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -630,7 +625,6 @@ class CalloutText(el.P, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -765,7 +759,6 @@ class Callout(CalloutRoot): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -846,7 +839,6 @@ class Callout(CalloutRoot): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -983,7 +975,6 @@ class CalloutNamespace(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1064,7 +1055,6 @@ class CalloutNamespace(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi index bcb2e956f..88713fb84 100644 --- a/reflex/components/radix/themes/components/card.pyi +++ b/reflex/components/radix/themes/components/card.pyi @@ -138,7 +138,6 @@ class Card(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -220,7 +219,6 @@ class Card(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/checkbox.py b/reflex/components/radix/themes/components/checkbox.py index 60e186406..c614cc19f 100644 --- a/reflex/components/radix/themes/components/checkbox.py +++ b/reflex/components/radix/themes/components/checkbox.py @@ -80,7 +80,7 @@ class HighLevelCheckbox(RadixThemesComponent): text: Var[str] # The gap between the checkbox and the label. - gap: Var[LiteralSize] + spacing: Var[LiteralSize] # The size of the checkbox "1" - "3". size: Var[LiteralCheckboxSize] @@ -140,8 +140,11 @@ class HighLevelCheckbox(RadixThemesComponent): Returns: The checkbox component with a label. """ - gap = props.pop("gap", "2") + spacing = props.pop("spacing", "2") size = props.pop("size", "2") + flex_props = {} + if "gap" in props: + flex_props["gap"] = props.pop("gap", None) return Text.create( Flex.create( @@ -150,7 +153,8 @@ class HighLevelCheckbox(RadixThemesComponent): **props, ), text, - gap=gap, + spacing=spacing, + **flex_props, ), as_="label", size=size, diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index 8ff9e64ef..c28a09518 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -111,7 +111,6 @@ class Checkbox(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -187,7 +186,6 @@ class Checkbox(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -204,7 +202,7 @@ class HighLevelCheckbox(RadixThemesComponent): cls, *children, text: Optional[Union[Var[str], str]] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -294,7 +292,6 @@ class HighLevelCheckbox(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -351,7 +348,7 @@ class HighLevelCheckbox(RadixThemesComponent): Args: text: The text of the label. text: The text label for the checkbox. - gap: The gap between the checkbox and the label. + spacing: The gap between the checkbox and the label. size: The size of the checkbox "1" - "3". as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. variant: Variant of checkbox: "classic" | "surface" | "soft" @@ -368,7 +365,6 @@ class HighLevelCheckbox(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Additional properties to apply to the checkbox item. @@ -382,7 +378,7 @@ class CheckboxNamespace(SimpleNamespace): def __call__( *children, text: Optional[Union[Var[str], str]] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -472,7 +468,6 @@ class CheckboxNamespace(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -529,7 +524,7 @@ class CheckboxNamespace(SimpleNamespace): Args: text: The text of the label. text: The text label for the checkbox. - gap: The gap between the checkbox and the label. + spacing: The gap between the checkbox and the label. size: The size of the checkbox "1" - "3". as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. variant: Variant of checkbox: "classic" | "surface" | "soft" @@ -546,7 +541,6 @@ class CheckboxNamespace(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Additional properties to apply to the checkbox item. diff --git a/reflex/components/radix/themes/components/context_menu.pyi b/reflex/components/radix/themes/components/context_menu.pyi index 92ca55563..3d92b2696 100644 --- a/reflex/components/radix/themes/components/context_menu.pyi +++ b/reflex/components/radix/themes/components/context_menu.pyi @@ -89,7 +89,6 @@ class ContextMenuRoot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -156,7 +155,6 @@ class ContextMenuRoot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -240,7 +238,6 @@ class ContextMenuTrigger(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -304,7 +301,6 @@ class ContextMenuTrigger(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -395,7 +391,6 @@ class ContextMenuContent(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -478,7 +473,6 @@ class ContextMenuContent(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -561,7 +555,6 @@ class ContextMenuSub(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -624,7 +617,6 @@ class ContextMenuSub(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -708,7 +700,6 @@ class ContextMenuSubTrigger(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -772,7 +763,6 @@ class ContextMenuSubTrigger(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -857,7 +847,6 @@ class ContextMenuSubContent(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -933,7 +922,6 @@ class ContextMenuSubContent(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1017,7 +1005,6 @@ class ContextMenuItem(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1081,7 +1068,6 @@ class ContextMenuItem(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1164,7 +1150,6 @@ class ContextMenuSeparator(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1227,7 +1212,6 @@ class ContextMenuSeparator(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi index 1a455754b..ef41b0b71 100644 --- a/reflex/components/radix/themes/components/dialog.pyi +++ b/reflex/components/radix/themes/components/dialog.pyi @@ -90,7 +90,6 @@ class DialogRoot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -157,7 +156,6 @@ class DialogRoot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -240,7 +238,6 @@ class DialogTrigger(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -303,7 +300,6 @@ class DialogTrigger(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -386,7 +382,6 @@ class DialogTitle(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -449,7 +444,6 @@ class DialogTitle(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -576,7 +570,6 @@ class DialogContent(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -671,7 +664,6 @@ class DialogContent(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -754,7 +746,6 @@ class DialogDescription(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -817,7 +808,6 @@ class DialogDescription(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -900,7 +890,6 @@ class DialogClose(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -963,7 +952,6 @@ class DialogClose(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1052,7 +1040,6 @@ class Dialog(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1119,7 +1106,6 @@ class Dialog(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/dropdown_menu.pyi b/reflex/components/radix/themes/components/dropdown_menu.pyi index 1b11e2b60..877a99038 100644 --- a/reflex/components/radix/themes/components/dropdown_menu.pyi +++ b/reflex/components/radix/themes/components/dropdown_menu.pyi @@ -99,7 +99,6 @@ class DropdownMenuRoot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -169,7 +168,6 @@ class DropdownMenuRoot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -253,7 +251,6 @@ class DropdownMenuTrigger(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -317,7 +314,6 @@ class DropdownMenuTrigger(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -437,7 +433,6 @@ class DropdownMenuContent(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -530,7 +525,6 @@ class DropdownMenuContent(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -616,7 +610,6 @@ class DropdownMenuSubTrigger(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -682,7 +675,6 @@ class DropdownMenuSubTrigger(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -768,7 +760,6 @@ class DropdownMenuSub(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -836,7 +827,6 @@ class DropdownMenuSub(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -939,7 +929,6 @@ class DropdownMenuSubContent(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1024,7 +1013,6 @@ class DropdownMenuSubContent(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1112,7 +1100,6 @@ class DropdownMenuItem(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1182,7 +1169,6 @@ class DropdownMenuItem(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1265,7 +1251,6 @@ class DropdownMenuSeparator(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1328,7 +1313,6 @@ class DropdownMenuSeparator(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/hover_card.pyi b/reflex/components/radix/themes/components/hover_card.pyi index 9f74370aa..8c89c0239 100644 --- a/reflex/components/radix/themes/components/hover_card.pyi +++ b/reflex/components/radix/themes/components/hover_card.pyi @@ -93,7 +93,6 @@ class HoverCardRoot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -163,7 +162,6 @@ class HoverCardRoot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -246,7 +244,6 @@ class HoverCardTrigger(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -309,7 +306,6 @@ class HoverCardTrigger(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -446,7 +442,6 @@ class HoverCardContent(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -529,7 +524,6 @@ class HoverCardContent(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -618,7 +612,6 @@ class HoverCard(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -688,7 +681,6 @@ class HoverCard(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/icon_button.pyi b/reflex/components/radix/themes/components/icon_button.pyi index c0300b02f..7abd29682 100644 --- a/reflex/components/radix/themes/components/icon_button.pyi +++ b/reflex/components/radix/themes/components/icon_button.pyi @@ -178,7 +178,6 @@ class IconButton(el.Button, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -269,7 +268,6 @@ class IconButton(el.Button, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/radix/themes/components/inset.pyi b/reflex/components/radix/themes/components/inset.pyi index 609af896e..54c57a7c2 100644 --- a/reflex/components/radix/themes/components/inset.pyi +++ b/reflex/components/radix/themes/components/inset.pyi @@ -147,7 +147,6 @@ class Inset(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -235,7 +234,6 @@ class Inset(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index 3d3bf8383..5aed1d7f6 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -91,7 +91,6 @@ class PopoverRoot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -159,7 +158,6 @@ class PopoverRoot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -242,7 +240,6 @@ class PopoverTrigger(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -305,7 +302,6 @@ class PopoverTrigger(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -447,7 +443,6 @@ class PopoverContent(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -550,7 +545,6 @@ class PopoverContent(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -633,7 +627,6 @@ class PopoverClose(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -696,7 +689,6 @@ class PopoverClose(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/radio_group.py b/reflex/components/radix/themes/components/radio_group.py index f8bd72ce6..986d7271f 100644 --- a/reflex/components/radix/themes/components/radio_group.py +++ b/reflex/components/radix/themes/components/radio_group.py @@ -90,7 +90,7 @@ class HighLevelRadioGroup(RadixThemesComponent): direction: Var[LiteralFlexDirection] = Var.create_safe("column") # The gap between the items of the radio group. - gap: Var[LiteralSize] = Var.create_safe("2") + spacing: Var[LiteralSize] = Var.create_safe("2") # The size of the radio group. size: Var[Literal["1", "2", "3"]] = Var.create_safe("2") @@ -138,7 +138,7 @@ class HighLevelRadioGroup(RadixThemesComponent): The created radio group component. """ direction = props.pop("direction", "column") - gap = props.pop("gap", "2") + spacing = props.pop("spacing", "2") size = props.pop("size", "2") default_value = props.pop("default_value", "") @@ -167,7 +167,7 @@ class HighLevelRadioGroup(RadixThemesComponent): Flex.create( RadioGroupItem.create(value=item_value), item_value, - gap="2", + spacing="2", ), size=size, as_="label", @@ -180,7 +180,7 @@ class HighLevelRadioGroup(RadixThemesComponent): Flex.create( *children, direction=direction, - gap=gap, + spacing=spacing, ), size=size, default_value=default_value, diff --git a/reflex/components/radix/themes/components/radio_group.pyi b/reflex/components/radix/themes/components/radio_group.pyi index 3967de4f7..6c70f7317 100644 --- a/reflex/components/radix/themes/components/radio_group.pyi +++ b/reflex/components/radix/themes/components/radio_group.pyi @@ -109,7 +109,6 @@ class RadioGroupRoot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -183,7 +182,6 @@ class RadioGroupRoot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -269,7 +267,6 @@ class RadioGroupItem(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -335,7 +332,6 @@ class RadioGroupItem(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -357,7 +353,7 @@ class HighLevelRadioGroup(RadixThemesComponent): Literal["row", "column", "row-reverse", "column-reverse"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -445,7 +441,6 @@ class HighLevelRadioGroup(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -500,7 +495,7 @@ class HighLevelRadioGroup(RadixThemesComponent): items: The items of the radio group. items: The items of the radio group. direction: The direction of the radio group. - gap: The gap between the items of the radio group. + spacing: The gap between the items of the radio group. size: The size of the radio group. variant: The variant of the radio group color_scheme: The color of the radio group @@ -515,7 +510,6 @@ class HighLevelRadioGroup(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Additional properties to apply to the accordion item. @@ -538,7 +532,7 @@ class RadioGroup(SimpleNamespace): Literal["row", "column", "row-reverse", "column-reverse"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -626,7 +620,6 @@ class RadioGroup(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -681,7 +674,7 @@ class RadioGroup(SimpleNamespace): items: The items of the radio group. items: The items of the radio group. direction: The direction of the radio group. - gap: The gap between the items of the radio group. + spacing: The gap between the items of the radio group. size: The size of the radio group. variant: The variant of the radio group color_scheme: The color of the radio group @@ -696,7 +689,6 @@ class RadioGroup(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Additional properties to apply to the accordion item. diff --git a/reflex/components/radix/themes/components/radiogroup.pyi b/reflex/components/radix/themes/components/radiogroup.pyi index 3fbce8923..1ea3e3bfa 100644 --- a/reflex/components/radix/themes/components/radiogroup.pyi +++ b/reflex/components/radix/themes/components/radiogroup.pyi @@ -109,7 +109,6 @@ class RadioGroupRoot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -183,7 +182,6 @@ class RadioGroupRoot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -269,7 +267,6 @@ class RadioGroupItem(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -335,7 +332,6 @@ class RadioGroupItem(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -357,7 +353,7 @@ class HighLevelRadioGroup(RadixThemesComponent): Literal["row", "column", "row-reverse", "column-reverse"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -445,7 +441,6 @@ class HighLevelRadioGroup(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -500,7 +495,7 @@ class HighLevelRadioGroup(RadixThemesComponent): items: The items of the radio group. items: The items of the radio group. direction: The direction of the radio group. - gap: The gap between the items of the radio group. + spacing: The gap between the items of the radio group. size: The size of the radio group. variant: The variant of the radio group color_scheme: The color of the radio group @@ -515,7 +510,6 @@ class HighLevelRadioGroup(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Additional properties to apply to the accordion item. @@ -538,7 +532,7 @@ class RadioGroup(SimpleNamespace): Literal["row", "column", "row-reverse", "column-reverse"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -626,7 +620,6 @@ class RadioGroup(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -681,7 +674,7 @@ class RadioGroup(SimpleNamespace): items: The items of the radio group. items: The items of the radio group. direction: The direction of the radio group. - gap: The gap between the items of the radio group. + spacing: The gap between the items of the radio group. size: The size of the radio group. variant: The variant of the radio group color_scheme: The color of the radio group @@ -696,7 +689,6 @@ class RadioGroup(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Additional properties to apply to the accordion item. diff --git a/reflex/components/radix/themes/components/scroll_area.pyi b/reflex/components/radix/themes/components/scroll_area.pyi index aef8e18d6..dd3ee45b2 100644 --- a/reflex/components/radix/themes/components/scroll_area.pyi +++ b/reflex/components/radix/themes/components/scroll_area.pyi @@ -98,7 +98,6 @@ class ScrollArea(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -164,7 +163,6 @@ class ScrollArea(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi index 85ca6e72b..adb8a1550 100644 --- a/reflex/components/radix/themes/components/select.pyi +++ b/reflex/components/radix/themes/components/select.pyi @@ -100,7 +100,6 @@ class SelectRoot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -177,7 +176,6 @@ class SelectRoot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -273,7 +271,6 @@ class SelectTrigger(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -339,7 +336,6 @@ class SelectTrigger(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -447,7 +443,6 @@ class SelectContent(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -526,7 +521,6 @@ class SelectContent(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -609,7 +603,6 @@ class SelectGroup(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -672,7 +665,6 @@ class SelectGroup(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -757,7 +749,6 @@ class SelectItem(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -822,7 +813,6 @@ class SelectItem(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -905,7 +895,6 @@ class SelectLabel(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -968,7 +957,6 @@ class SelectLabel(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1051,7 +1039,6 @@ class SelectSeparator(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1114,7 +1101,6 @@ class SelectSeparator(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1223,7 +1209,6 @@ class HighLevelSelect(SelectRoot): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1303,7 +1288,6 @@ class HighLevelSelect(SelectRoot): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Additional properties to apply to the select component. @@ -1418,7 +1402,6 @@ class Select(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1498,7 +1481,6 @@ class Select(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Additional properties to apply to the select component. diff --git a/reflex/components/radix/themes/components/separator.pyi b/reflex/components/radix/themes/components/separator.pyi index 0e0ded0ac..12ab6e2fa 100644 --- a/reflex/components/radix/themes/components/separator.pyi +++ b/reflex/components/radix/themes/components/separator.pyi @@ -97,7 +97,6 @@ class Separator(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -163,7 +162,6 @@ class Separator(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/slider.pyi b/reflex/components/radix/themes/components/slider.pyi index 841a47980..581410a23 100644 --- a/reflex/components/radix/themes/components/slider.pyi +++ b/reflex/components/radix/themes/components/slider.pyi @@ -124,7 +124,6 @@ class Slider(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -203,7 +202,6 @@ class Slider(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/radix/themes/components/switch.pyi b/reflex/components/radix/themes/components/switch.pyi index f1ff6a375..d29e661f1 100644 --- a/reflex/components/radix/themes/components/switch.pyi +++ b/reflex/components/radix/themes/components/switch.pyi @@ -111,7 +111,6 @@ class Switch(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -188,7 +187,6 @@ class Switch(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/table.py b/reflex/components/radix/themes/components/table.py index c50bc5eac..aa032f318 100644 --- a/reflex/components/radix/themes/components/table.py +++ b/reflex/components/radix/themes/components/table.py @@ -1,6 +1,6 @@ """Interactive components provided by @radix-ui/themes.""" from types import SimpleNamespace -from typing import List, Literal, Union +from typing import List, Literal from reflex import el from reflex.vars import Var @@ -51,9 +51,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): # The justification of the column justify: Var[Literal["start", "center", "end"]] - # width of the column - width: Var[Union[str, int]] - _invalid_children: List[str] = [ "TableBody", "TableHeader", @@ -87,9 +84,6 @@ class TableCell(el.Td, RadixThemesComponent): # The justification of the column justify: Var[Literal["start", "center", "end"]] - # width of the column - width: Var[Union[str, int]] - _invalid_children: List[str] = [ "TableBody", "TableHeader", @@ -107,9 +101,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): # The justification of the column justify: Var[Literal["start", "center", "end"]] - # width of the column - width: Var[Union[str, int]] - _invalid_children: List[str] = [ "TableBody", "TableHeader", diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index 65a6bf54f..6b911ddb7 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -8,7 +8,7 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from types import SimpleNamespace -from typing import List, Literal, Union +from typing import List, Literal from reflex import el from reflex.vars import Var from ..base import RadixThemesComponent @@ -139,7 +139,6 @@ class TableRoot(el.Table, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -222,7 +221,6 @@ class TableRoot(el.Table, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -348,7 +346,6 @@ class TableHeader(el.Thead, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -428,7 +425,6 @@ class TableHeader(el.Thead, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -557,7 +553,6 @@ class TableRow(el.Tr, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -637,7 +632,6 @@ class TableRow(el.Tr, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -721,7 +715,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): Literal["start", "center", "end"], ] ] = None, - width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None, align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -782,7 +775,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -841,7 +833,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): color: map to CSS default color property. color_scheme: map to radix color property. justify: The justification of the column - width: width of the column align: Alignment of the content within the table header cell col_span: Number of columns a header cell should span headers: IDs of the headers associated with this header cell @@ -868,7 +859,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -994,7 +984,6 @@ class TableBody(el.Tbody, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1074,7 +1063,6 @@ class TableBody(el.Tbody, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1158,7 +1146,6 @@ class TableCell(el.Td, RadixThemesComponent): Literal["start", "center", "end"], ] ] = None, - width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None, align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1216,7 +1203,6 @@ class TableCell(el.Td, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1275,7 +1261,6 @@ class TableCell(el.Td, RadixThemesComponent): color: map to CSS default color property. color_scheme: map to radix color property. justify: The justification of the column - width: width of the column align: Alignment of the content within the table cell col_span: Number of columns a cell should span headers: IDs of the headers associated with this cell @@ -1301,7 +1286,6 @@ class TableCell(el.Td, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1385,7 +1369,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): Literal["start", "center", "end"], ] ] = None, - width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None, align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1446,7 +1429,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1505,7 +1487,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): color: map to CSS default color property. color_scheme: map to radix color property. justify: The justification of the column - width: width of the column align: Alignment of the content within the table header cell col_span: Number of columns a header cell should span headers: IDs of the headers associated with this header cell @@ -1532,7 +1513,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi index f3b635ec2..b671852c1 100644 --- a/reflex/components/radix/themes/components/tabs.pyi +++ b/reflex/components/radix/themes/components/tabs.pyi @@ -96,7 +96,6 @@ class TabsRoot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -165,7 +164,6 @@ class TabsRoot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -249,7 +247,6 @@ class TabsList(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -313,7 +310,6 @@ class TabsList(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -398,7 +394,6 @@ class TabsTrigger(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -463,7 +458,6 @@ class TabsTrigger(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -547,7 +541,6 @@ class TabsContent(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -611,7 +604,6 @@ class TabsContent(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -705,7 +697,6 @@ class Tabs(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -774,7 +765,6 @@ class Tabs(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/components/text_area.pyi b/reflex/components/radix/themes/components/text_area.pyi index 7be25db1a..3ac4d2daf 100644 --- a/reflex/components/radix/themes/components/text_area.pyi +++ b/reflex/components/radix/themes/components/text_area.pyi @@ -154,7 +154,6 @@ class TextArea(RadixThemesComponent, el.Textarea): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -255,7 +254,6 @@ class TextArea(RadixThemesComponent, el.Textarea): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/radix/themes/components/text_field.pyi b/reflex/components/radix/themes/components/text_field.pyi index 127c17fdc..13ca66229 100644 --- a/reflex/components/radix/themes/components/text_field.pyi +++ b/reflex/components/radix/themes/components/text_field.pyi @@ -150,7 +150,6 @@ class TextFieldRoot(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -232,7 +231,6 @@ class TextFieldRoot(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -439,7 +437,6 @@ class TextFieldInput(el.Input, TextFieldRoot): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -556,7 +553,6 @@ class TextFieldInput(el.Input, TextFieldRoot): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -640,7 +636,6 @@ class TextFieldSlot(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -703,7 +698,6 @@ class TextFieldSlot(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -810,7 +804,6 @@ class Input(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -890,7 +883,6 @@ class Input(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -1000,7 +992,6 @@ class TextField(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1080,7 +1071,6 @@ class TextField(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. diff --git a/reflex/components/radix/themes/components/tooltip.pyi b/reflex/components/radix/themes/components/tooltip.pyi index 7709f4d0b..531569ae2 100644 --- a/reflex/components/radix/themes/components/tooltip.pyi +++ b/reflex/components/radix/themes/components/tooltip.pyi @@ -67,7 +67,6 @@ class Tooltip(RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -152,7 +151,6 @@ class Tooltip(RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The keyword arguments diff --git a/reflex/components/radix/themes/layout/base.pyi b/reflex/components/radix/themes/layout/base.pyi index a085807c9..fa3cfd9fa 100644 --- a/reflex/components/radix/themes/layout/base.pyi +++ b/reflex/components/radix/themes/layout/base.pyi @@ -173,7 +173,6 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -252,7 +251,6 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/layout/box.pyi b/reflex/components/radix/themes/layout/box.pyi index 816e7a7d6..59439c2e2 100644 --- a/reflex/components/radix/themes/layout/box.pyi +++ b/reflex/components/radix/themes/layout/box.pyi @@ -124,7 +124,6 @@ class Box(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -203,7 +202,6 @@ class Box(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/layout/center.pyi b/reflex/components/radix/themes/layout/center.pyi index 05799bbfb..c0ea78630 100644 --- a/reflex/components/radix/themes/layout/center.pyi +++ b/reflex/components/radix/themes/layout/center.pyi @@ -80,12 +80,6 @@ class Center(Flex): ] ] = None, as_child: Optional[Union[Var[bool], bool]] = None, - display: Optional[ - Union[ - Var[Literal["none", "inline-flex", "flex"]], - Literal["none", "inline-flex", "flex"], - ] - ] = None, direction: Optional[ Union[ Var[Literal["row", "column", "row-reverse", "column-reverse"]], @@ -110,7 +104,7 @@ class Center(Flex): Literal["nowrap", "wrap", "wrap-reverse"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -161,7 +155,6 @@ class Center(Flex): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -220,12 +213,11 @@ class Center(Flex): color: map to CSS default color property. color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - display: How to display the element: "none" | "inline-flex" | "flex" direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" - gap: Gap between children: "0" - "9" + spacing: Gap between children: "0" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -247,7 +239,6 @@ class Center(Flex): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/layout/container.pyi b/reflex/components/radix/themes/layout/container.pyi index 92cf5e182..cde82511c 100644 --- a/reflex/components/radix/themes/layout/container.pyi +++ b/reflex/components/radix/themes/layout/container.pyi @@ -131,7 +131,6 @@ class Container(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -211,7 +210,6 @@ class Container(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/layout/flex.py b/reflex/components/radix/themes/layout/flex.py index 39dfdea41..295df7832 100644 --- a/reflex/components/radix/themes/layout/flex.py +++ b/reflex/components/radix/themes/layout/flex.py @@ -1,7 +1,7 @@ """Declarative layout and common spacing props.""" from __future__ import annotations -from typing import Literal +from typing import Dict, Literal from reflex import el from reflex.vars import Var @@ -14,7 +14,6 @@ from ..base import ( ) LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"] -LiteralFlexDisplay = Literal["none", "inline-flex", "flex"] LiteralFlexWrap = Literal["nowrap", "wrap", "wrap-reverse"] @@ -26,9 +25,6 @@ class Flex(el.Div, RadixThemesComponent): # Change the default rendered element for the one passed as a child, merging their props and behavior. as_child: Var[bool] - # How to display the element: "none" | "inline-flex" | "flex" - display: Var[LiteralFlexDisplay] - # How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" direction: Var[LiteralFlexDirection] @@ -42,4 +38,7 @@ class Flex(el.Div, RadixThemesComponent): wrap: Var[LiteralFlexWrap] # Gap between children: "0" - "9" - gap: Var[LiteralSize] + spacing: Var[LiteralSize] + + # Reflex maps the "spacing" prop to "gap" prop. + _rename_props: Dict[str, str] = {"spacing": "gap"} diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi index 5033a3360..29bca6d21 100644 --- a/reflex/components/radix/themes/layout/flex.pyi +++ b/reflex/components/radix/themes/layout/flex.pyi @@ -7,13 +7,12 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from typing import Literal +from typing import Dict, Literal from reflex import el from reflex.vars import Var from ..base import LiteralAlign, LiteralJustify, LiteralSize, RadixThemesComponent LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"] -LiteralFlexDisplay = Literal["none", "inline-flex", "flex"] LiteralFlexWrap = Literal["nowrap", "wrap", "wrap-reverse"] class Flex(el.Div, RadixThemesComponent): @@ -86,12 +85,6 @@ class Flex(el.Div, RadixThemesComponent): ] ] = None, as_child: Optional[Union[Var[bool], bool]] = None, - display: Optional[ - Union[ - Var[Literal["none", "inline-flex", "flex"]], - Literal["none", "inline-flex", "flex"], - ] - ] = None, direction: Optional[ Union[ Var[Literal["row", "column", "row-reverse", "column-reverse"]], @@ -116,7 +109,7 @@ class Flex(el.Div, RadixThemesComponent): Literal["nowrap", "wrap", "wrap-reverse"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -167,7 +160,6 @@ class Flex(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -226,12 +218,11 @@ class Flex(el.Div, RadixThemesComponent): color: map to CSS default color property. color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - display: How to display the element: "none" | "inline-flex" | "flex" direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" - gap: Gap between children: "0" - "9" + spacing: Gap between children: "0" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -253,7 +244,6 @@ class Flex(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/layout/grid.py b/reflex/components/radix/themes/layout/grid.py index f9c9bd6c8..90665b911 100644 --- a/reflex/components/radix/themes/layout/grid.py +++ b/reflex/components/radix/themes/layout/grid.py @@ -1,7 +1,7 @@ """Declarative layout and common spacing props.""" from __future__ import annotations -from typing import Literal +from typing import Dict, Literal from reflex import el from reflex.vars import Var @@ -13,7 +13,6 @@ from ..base import ( RadixThemesComponent, ) -LiteralGridDisplay = Literal["none", "inline-grid", "grid"] LiteralGridFlow = Literal["row", "column", "dense", "row-dense", "column-dense"] @@ -25,9 +24,6 @@ class Grid(el.Div, RadixThemesComponent): # Change the default rendered element for the one passed as a child, merging their props and behavior. as_child: Var[bool] - # How to display the element: "none" | "inline-grid" | "grid" - display: Var[LiteralGridDisplay] - # Number of columns columns: Var[str] @@ -44,10 +40,17 @@ class Grid(el.Div, RadixThemesComponent): justify: Var[LiteralJustify] # Gap between children: "0" - "9" - gap: Var[LiteralSize] + spacing: Var[LiteralSize] # Gap between children horizontal: "0" - "9" - gap_x: Var[LiteralSize] + spacing_x: Var[LiteralSize] # Gap between children vertical: "0" - "9" - gap_x: Var[LiteralSize] + spacing_y: Var[LiteralSize] + + # Reflex maps the "spacing" prop to "gap" prop. + _rename_props: Dict[str, str] = { + "spacing": "gap", + "spacing_x": "gap_x", + "spacing_y": "gap_y", + } diff --git a/reflex/components/radix/themes/layout/grid.pyi b/reflex/components/radix/themes/layout/grid.pyi index 2b4c03f40..cbe160531 100644 --- a/reflex/components/radix/themes/layout/grid.pyi +++ b/reflex/components/radix/themes/layout/grid.pyi @@ -7,12 +7,11 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from typing import Literal +from typing import Dict, Literal from reflex import el from reflex.vars import Var from ..base import LiteralAlign, LiteralJustify, LiteralSize, RadixThemesComponent -LiteralGridDisplay = Literal["none", "inline-grid", "grid"] LiteralGridFlow = Literal["row", "column", "dense", "row-dense", "column-dense"] class Grid(el.Div, RadixThemesComponent): @@ -85,12 +84,6 @@ class Grid(el.Div, RadixThemesComponent): ] ] = None, as_child: Optional[Union[Var[bool], bool]] = None, - display: Optional[ - Union[ - Var[Literal["none", "inline-grid", "grid"]], - Literal["none", "inline-grid", "grid"], - ] - ] = None, columns: Optional[Union[Var[str], str]] = None, rows: Optional[Union[Var[str], str]] = None, flow: Optional[ @@ -111,13 +104,19 @@ class Grid(el.Div, RadixThemesComponent): Literal["start", "center", "end", "between"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, - gap_x: Optional[ + spacing_x: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + spacing_y: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -168,7 +167,6 @@ class Grid(el.Div, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -227,14 +225,14 @@ class Grid(el.Div, RadixThemesComponent): color: map to CSS default color property. color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - display: How to display the element: "none" | "inline-grid" | "grid" columns: Number of columns rows: Number of rows flow: How the grid items are layed out: "row" | "column" | "dense" | "row-dense" | "column-dense" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" - gap: Gap between children: "0" - "9" - gap_x: Gap between children vertical: "0" - "9" + spacing: Gap between children: "0" - "9" + spacing_x: Gap between children horizontal: "0" - "9" + spacing_y: Gap between children vertical: "0" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -256,7 +254,6 @@ class Grid(el.Div, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi index 7cda1899e..878cdc9ea 100644 --- a/reflex/components/radix/themes/layout/list.pyi +++ b/reflex/components/radix/themes/layout/list.pyi @@ -44,12 +44,6 @@ class BaseList(Flex, LayoutComponent): items: Optional[Union[Union[Var[Iterable], Iterable], Iterable]] = None, list_style_type: Optional[str] = "", as_child: Optional[Union[Var[bool], bool]] = None, - display: Optional[ - Union[ - Var[Literal["none", "inline-flex", "flex"]], - Literal["none", "inline-flex", "flex"], - ] - ] = None, direction: Optional[ Union[ Var[Literal["row", "column", "row-reverse", "column-reverse"]], @@ -74,7 +68,7 @@ class BaseList(Flex, LayoutComponent): Literal["nowrap", "wrap", "wrap-reverse"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -211,7 +205,6 @@ class BaseList(Flex, LayoutComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -267,12 +260,11 @@ class BaseList(Flex, LayoutComponent): items: A list of items to add to the list. list_style_type: The style of the list. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - display: How to display the element: "none" | "inline-flex" | "flex" direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" - gap: Gap between children: "0" - "9" + spacing: Gap between children: "0" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -310,7 +302,6 @@ class BaseList(Flex, LayoutComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -328,12 +319,6 @@ class UnorderedList(BaseList): items: Optional[Union[Var[Iterable], Iterable]] = None, list_style_type: Optional[Literal["none", "disc", "circle", "square"]] = "disc", as_child: Optional[Union[Var[bool], bool]] = None, - display: Optional[ - Union[ - Var[Literal["none", "inline-flex", "flex"]], - Literal["none", "inline-flex", "flex"], - ] - ] = None, direction: Optional[ Union[ Var[Literal["row", "column", "row-reverse", "column-reverse"]], @@ -358,7 +343,7 @@ class UnorderedList(BaseList): Literal["nowrap", "wrap", "wrap-reverse"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -495,7 +480,6 @@ class UnorderedList(BaseList): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -551,12 +535,11 @@ class UnorderedList(BaseList): items: A list of items to add to the list. list_style_type: The style of the list. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - display: How to display the element: "none" | "inline-flex" | "flex" direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" - gap: Gap between children: "0" - "9" + spacing: Gap between children: "0" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -594,7 +577,6 @@ class UnorderedList(BaseList): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -629,12 +611,6 @@ class OrderedList(BaseList): ] ] = "decimal", as_child: Optional[Union[Var[bool], bool]] = None, - display: Optional[ - Union[ - Var[Literal["none", "inline-flex", "flex"]], - Literal["none", "inline-flex", "flex"], - ] - ] = None, direction: Optional[ Union[ Var[Literal["row", "column", "row-reverse", "column-reverse"]], @@ -659,7 +635,7 @@ class OrderedList(BaseList): Literal["nowrap", "wrap", "wrap-reverse"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -796,7 +772,6 @@ class OrderedList(BaseList): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -852,12 +827,11 @@ class OrderedList(BaseList): items: A list of items to add to the list. list_style_type: The style of the list. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - display: How to display the element: "none" | "inline-flex" | "flex" direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" - gap: Gap between children: "0" - "9" + spacing: Gap between children: "0" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -895,7 +869,6 @@ class OrderedList(BaseList): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the component. @@ -957,7 +930,6 @@ class ListItem(Li): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1031,7 +1003,6 @@ class ListItem(Li): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/radix/themes/layout/section.pyi b/reflex/components/radix/themes/layout/section.pyi index ebcb83546..eed8ee381 100644 --- a/reflex/components/radix/themes/layout/section.pyi +++ b/reflex/components/radix/themes/layout/section.pyi @@ -131,7 +131,6 @@ class Section(el.Section, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -211,7 +210,6 @@ class Section(el.Section, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/layout/spacer.pyi b/reflex/components/radix/themes/layout/spacer.pyi index 6a6718ece..553b5c34f 100644 --- a/reflex/components/radix/themes/layout/spacer.pyi +++ b/reflex/components/radix/themes/layout/spacer.pyi @@ -80,12 +80,6 @@ class Spacer(Flex): ] ] = None, as_child: Optional[Union[Var[bool], bool]] = None, - display: Optional[ - Union[ - Var[Literal["none", "inline-flex", "flex"]], - Literal["none", "inline-flex", "flex"], - ] - ] = None, direction: Optional[ Union[ Var[Literal["row", "column", "row-reverse", "column-reverse"]], @@ -110,7 +104,7 @@ class Spacer(Flex): Literal["nowrap", "wrap", "wrap-reverse"], ] ] = None, - gap: Optional[ + spacing: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], @@ -161,7 +155,6 @@ class Spacer(Flex): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -220,12 +213,11 @@ class Spacer(Flex): color: map to CSS default color property. color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - display: How to display the element: "none" | "inline-flex" | "flex" direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" - gap: Gap between children: "0" - "9" + spacing: Gap between children: "0" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -247,7 +239,6 @@ class Spacer(Flex): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/layout/stack.py b/reflex/components/radix/themes/layout/stack.py index 02d550c63..afec5a378 100644 --- a/reflex/components/radix/themes/layout/stack.py +++ b/reflex/components/radix/themes/layout/stack.py @@ -1,10 +1,11 @@ """Stack components.""" from __future__ import annotations -from typing import Literal, Optional +from typing import Literal from reflex.components.component import Component +from ..base import LiteralSize from .flex import Flex LiteralJustify = Literal["start", "center", "end"] @@ -18,9 +19,9 @@ class Stack(Flex): def create( cls, *children, - justify: Optional[LiteralJustify] = "start", - align: Optional[LiteralAlign] = "center", - spacing: Optional[str] = "0.5rem", + justify: LiteralJustify = "start", + align: LiteralAlign = "center", + spacing: LiteralSize = "2", **props, ) -> Component: """Create a new instance of the component. @@ -35,15 +36,13 @@ class Stack(Flex): Returns: The stack component. """ - style = props.setdefault("style", {}) - style.update( - { - "alignItems": align, - "justifyContent": justify, - "gap": spacing, - } + return super().create( + *children, + align=align, + justify=justify, + spacing=spacing, + **props, ) - return super().create(*children, **props) class VStack(Stack): diff --git a/reflex/components/radix/themes/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi index e2a785495..5b4239543 100644 --- a/reflex/components/radix/themes/layout/stack.pyi +++ b/reflex/components/radix/themes/layout/stack.pyi @@ -7,8 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from typing import Literal, Optional +from typing import Literal from reflex.components.component import Component +from ..base import LiteralSize from .flex import Flex LiteralJustify = Literal["start", "center", "end"] @@ -22,14 +23,8 @@ class Stack(Flex): *children, justify: Optional[LiteralJustify] = "start", align: Optional[LiteralAlign] = "center", - spacing: Optional[str] = "0.5rem", + spacing: Optional[LiteralSize] = "2", as_child: Optional[Union[Var[bool], bool]] = None, - display: Optional[ - Union[ - Var[Literal["none", "inline-flex", "flex"]], - Literal["none", "inline-flex", "flex"], - ] - ] = None, direction: Optional[ Union[ Var[Literal["row", "column", "row-reverse", "column-reverse"]], @@ -42,12 +37,6 @@ class Stack(Flex): Literal["nowrap", "wrap", "wrap-reverse"], ] ] = None, - gap: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -93,7 +82,6 @@ class Stack(Flex): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -150,10 +138,8 @@ class Stack(Flex): align: The alignment of the stack elements. spacing: The spacing between each stack item. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - display: How to display the element: "none" | "inline-flex" | "flex" direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" - gap: Gap between children: "0" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -175,7 +161,6 @@ class Stack(Flex): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the stack. @@ -192,14 +177,8 @@ class VStack(Stack): *children, justify: Optional[LiteralJustify] = "start", align: Optional[LiteralAlign] = "center", - spacing: Optional[str] = "0.5rem", + spacing: Optional[LiteralSize] = "2", as_child: Optional[Union[Var[bool], bool]] = None, - display: Optional[ - Union[ - Var[Literal["none", "inline-flex", "flex"]], - Literal["none", "inline-flex", "flex"], - ] - ] = None, direction: Optional[ Union[ Var[Literal["row", "column", "row-reverse", "column-reverse"]], @@ -212,12 +191,6 @@ class VStack(Stack): Literal["nowrap", "wrap", "wrap-reverse"], ] ] = None, - gap: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -263,7 +236,6 @@ class VStack(Stack): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -320,10 +292,8 @@ class VStack(Stack): align: The alignment of the stack elements. spacing: The spacing between each stack item. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - display: How to display the element: "none" | "inline-flex" | "flex" direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" - gap: Gap between children: "0" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -345,7 +315,6 @@ class VStack(Stack): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the stack. @@ -362,14 +331,8 @@ class HStack(Stack): *children, justify: Optional[LiteralJustify] = "start", align: Optional[LiteralAlign] = "center", - spacing: Optional[str] = "0.5rem", + spacing: Optional[LiteralSize] = "2", as_child: Optional[Union[Var[bool], bool]] = None, - display: Optional[ - Union[ - Var[Literal["none", "inline-flex", "flex"]], - Literal["none", "inline-flex", "flex"], - ] - ] = None, direction: Optional[ Union[ Var[Literal["row", "column", "row-reverse", "column-reverse"]], @@ -382,12 +345,6 @@ class HStack(Stack): Literal["nowrap", "wrap", "wrap-reverse"], ] ] = None, - gap: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -433,7 +390,6 @@ class HStack(Stack): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -490,10 +446,8 @@ class HStack(Stack): align: The alignment of the stack elements. spacing: The spacing between each stack item. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - display: How to display the element: "none" | "inline-flex" | "flex" direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" - gap: Gap between children: "0" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -515,7 +469,6 @@ class HStack(Stack): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the stack. diff --git a/reflex/components/radix/themes/typography/blockquote.pyi b/reflex/components/radix/themes/typography/blockquote.pyi index 38915a5fc..801a4d9fb 100644 --- a/reflex/components/radix/themes/typography/blockquote.pyi +++ b/reflex/components/radix/themes/typography/blockquote.pyi @@ -140,7 +140,6 @@ class Blockquote(el.Blockquote, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -223,7 +222,6 @@ class Blockquote(el.Blockquote, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/typography/code.pyi b/reflex/components/radix/themes/typography/code.pyi index 8cc4bfb45..8fe0e0a84 100644 --- a/reflex/components/radix/themes/typography/code.pyi +++ b/reflex/components/radix/themes/typography/code.pyi @@ -145,7 +145,6 @@ class Code(el.Code, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -228,7 +227,6 @@ class Code(el.Code, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/typography/heading.pyi b/reflex/components/radix/themes/typography/heading.pyi index 01db21e4c..705cad9a6 100644 --- a/reflex/components/radix/themes/typography/heading.pyi +++ b/reflex/components/radix/themes/typography/heading.pyi @@ -153,7 +153,6 @@ class Heading(el.H1, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -239,7 +238,6 @@ class Heading(el.H1, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/radix/themes/typography/link.pyi b/reflex/components/radix/themes/typography/link.pyi index 4ccd22c59..ee0bc844c 100644 --- a/reflex/components/radix/themes/typography/link.pyi +++ b/reflex/components/radix/themes/typography/link.pyi @@ -179,7 +179,6 @@ class Link(RadixThemesComponent, A): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -269,7 +268,6 @@ class Link(RadixThemesComponent, A): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index 7e266cfb8..382b04b3d 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -162,7 +162,6 @@ class Text(el.Span, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -248,7 +247,6 @@ class Text(el.Span, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -371,7 +369,6 @@ class Em(el.Em, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -450,7 +447,6 @@ class Em(el.Em, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -579,7 +575,6 @@ class Kbd(el.Kbd, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -659,7 +654,6 @@ class Kbd(el.Kbd, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -783,7 +777,6 @@ class Quote(el.Q, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -863,7 +856,6 @@ class Quote(el.Q, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -986,7 +978,6 @@ class Strong(el.Strong, RadixThemesComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1065,7 +1056,6 @@ class Strong(el.Strong, RadixThemesComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. @@ -1223,7 +1213,6 @@ class TextNamespace(SimpleNamespace): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1309,7 +1298,6 @@ class TextNamespace(SimpleNamespace): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Component properties. diff --git a/reflex/components/react_player/audio.pyi b/reflex/components/react_player/audio.pyi index 061c9c29e..d45dbcdaf 100644 --- a/reflex/components/react_player/audio.pyi +++ b/reflex/components/react_player/audio.pyi @@ -31,7 +31,6 @@ class Audio(ReactPlayer): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -98,7 +97,6 @@ class Audio(ReactPlayer): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/react_player/react_player.pyi b/reflex/components/react_player/react_player.pyi index 539adc7d6..49ab91ab1 100644 --- a/reflex/components/react_player/react_player.pyi +++ b/reflex/components/react_player/react_player.pyi @@ -30,7 +30,6 @@ class ReactPlayer(NoSSRComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -97,7 +96,6 @@ class ReactPlayer(NoSSRComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/react_player/video.pyi b/reflex/components/react_player/video.pyi index 93627287c..a3c447cb0 100644 --- a/reflex/components/react_player/video.pyi +++ b/reflex/components/react_player/video.pyi @@ -31,7 +31,6 @@ class Video(ReactPlayer): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -98,7 +97,6 @@ class Video(ReactPlayer): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/recharts/cartesian.pyi b/reflex/components/recharts/cartesian.pyi index bf5259651..3af7849a2 100644 --- a/reflex/components/recharts/cartesian.pyi +++ b/reflex/components/recharts/cartesian.pyi @@ -95,7 +95,6 @@ class Axis(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -140,7 +139,6 @@ class Axis(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -220,7 +218,6 @@ class XAxis(Axis): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -265,7 +262,6 @@ class XAxis(Axis): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -345,7 +341,6 @@ class YAxis(Axis): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -390,7 +385,6 @@ class YAxis(Axis): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -457,7 +451,6 @@ class ZAxis(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -520,7 +513,6 @@ class ZAxis(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -555,7 +547,6 @@ class Brush(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_change: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -582,7 +573,6 @@ class Brush(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -615,7 +605,6 @@ class Cartesian(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -650,7 +639,6 @@ class Cartesian(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -729,7 +717,6 @@ class Area(Cartesian): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -772,7 +759,6 @@ class Area(Cartesian): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -812,7 +798,6 @@ class Bar(Cartesian): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -855,7 +840,6 @@ class Bar(Cartesian): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -934,7 +918,6 @@ class Line(Cartesian): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -977,7 +960,6 @@ class Line(Cartesian): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1035,7 +1017,6 @@ class Scatter(Cartesian): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1077,7 +1058,6 @@ class Scatter(Cartesian): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1118,7 +1098,6 @@ class Funnel(Cartesian): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1157,7 +1136,6 @@ class Funnel(Cartesian): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1187,7 +1165,6 @@ class ErrorBar(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1250,7 +1227,6 @@ class ErrorBar(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1284,7 +1260,6 @@ class Reference(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1348,7 +1323,6 @@ class Reference(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1383,7 +1357,6 @@ class ReferenceLine(Reference): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1448,7 +1421,6 @@ class ReferenceLine(Reference): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1483,7 +1455,6 @@ class ReferenceDot(Reference): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1520,7 +1491,6 @@ class ReferenceDot(Reference): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1559,7 +1529,6 @@ class ReferenceArea(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1628,7 +1597,6 @@ class ReferenceArea(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1655,7 +1623,6 @@ class Grid(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1717,7 +1684,6 @@ class Grid(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1749,7 +1715,6 @@ class CartesianGrid(Grid): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1816,7 +1781,6 @@ class CartesianGrid(Grid): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -1862,7 +1826,6 @@ class CartesianAxis(Grid): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -1933,7 +1896,6 @@ class CartesianAxis(Grid): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/recharts/charts.pyi b/reflex/components/recharts/charts.pyi index 4c401901f..2d133cba7 100644 --- a/reflex/components/recharts/charts.pyi +++ b/reflex/components/recharts/charts.pyi @@ -53,7 +53,6 @@ class ChartBase(RechartsCharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -86,7 +85,6 @@ class ChartBase(RechartsCharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the chart component. @@ -132,7 +130,6 @@ class AreaChart(ChartBase): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -166,7 +163,6 @@ class AreaChart(ChartBase): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the chart component. @@ -211,7 +207,6 @@ class BarChart(ChartBase): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -249,7 +244,6 @@ class BarChart(ChartBase): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the chart component. @@ -289,7 +283,6 @@ class LineChart(ChartBase): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -322,7 +315,6 @@ class LineChart(ChartBase): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the chart component. @@ -372,7 +364,6 @@ class ComposedChart(ChartBase): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -410,7 +401,6 @@ class ComposedChart(ChartBase): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the chart component. @@ -451,7 +441,6 @@ class PieChart(ChartBase): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -481,7 +470,6 @@ class PieChart(ChartBase): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the chart component. @@ -528,7 +516,6 @@ class RadarChart(ChartBase): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -567,7 +554,6 @@ class RadarChart(ChartBase): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the chart component. @@ -617,7 +603,6 @@ class RadialBarChart(ChartBase): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -659,7 +644,6 @@ class RadialBarChart(ChartBase): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the chart component. @@ -700,7 +684,6 @@ class ScatterChart(ChartBase): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -739,7 +722,6 @@ class ScatterChart(ChartBase): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the chart component. @@ -773,7 +755,6 @@ class FunnelChart(RechartsCharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -806,7 +787,6 @@ class FunnelChart(RechartsCharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -840,7 +820,6 @@ class Treemap(RechartsCharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -907,7 +886,6 @@ class Treemap(RechartsCharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The properties of the chart component. diff --git a/reflex/components/recharts/general.pyi b/reflex/components/recharts/general.pyi index 43eb3c1fa..8b5cb5c62 100644 --- a/reflex/components/recharts/general.pyi +++ b/reflex/components/recharts/general.pyi @@ -37,7 +37,6 @@ class ResponsiveContainer(Recharts, MemoizationLeaf): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -101,7 +100,6 @@ class ResponsiveContainer(Recharts, MemoizationLeaf): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -176,7 +174,6 @@ class Legend(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -217,7 +214,6 @@ class Legend(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -248,7 +244,6 @@ class GraphingTooltip(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -314,7 +309,6 @@ class GraphingTooltip(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -386,7 +380,6 @@ class Label(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -448,7 +441,6 @@ class Label(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -521,7 +513,6 @@ class LabelList(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -584,7 +575,6 @@ class LabelList(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/recharts/polar.pyi b/reflex/components/recharts/polar.pyi index d19a39f77..8270f1cde 100644 --- a/reflex/components/recharts/polar.pyi +++ b/reflex/components/recharts/polar.pyi @@ -46,7 +46,6 @@ class Pie(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -93,7 +92,6 @@ class Pie(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -132,7 +130,6 @@ class Radar(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -201,7 +198,6 @@ class Radar(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -230,7 +226,6 @@ class RadialBar(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -266,7 +261,6 @@ class RadialBar(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -305,7 +299,6 @@ class PolarAngleAxis(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -347,7 +340,6 @@ class PolarAngleAxis(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -379,7 +371,6 @@ class PolarGrid(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -444,7 +435,6 @@ class PolarGrid(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -522,7 +512,6 @@ class PolarRadiusAxis(Recharts): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -564,7 +553,6 @@ class PolarRadiusAxis(Recharts): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/recharts/recharts.pyi b/reflex/components/recharts/recharts.pyi index 787095e82..1eb3a2203 100644 --- a/reflex/components/recharts/recharts.pyi +++ b/reflex/components/recharts/recharts.pyi @@ -21,7 +21,6 @@ class Recharts(Component): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -79,7 +78,6 @@ class Recharts(Component): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. @@ -102,7 +100,6 @@ class RechartsCharts(NoSSRComponent, MemoizationLeaf): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -160,7 +157,6 @@ class RechartsCharts(NoSSRComponent, MemoizationLeaf): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: The props of the component. diff --git a/reflex/components/suneditor/editor.pyi b/reflex/components/suneditor/editor.pyi index 92c4b5e2b..867274434 100644 --- a/reflex/components/suneditor/editor.pyi +++ b/reflex/components/suneditor/editor.pyi @@ -126,7 +126,6 @@ class Editor(NoSSRComponent): id: Optional[Any] = None, class_name: Optional[Any] = None, autofocus: Optional[bool] = None, - _rename_props: Optional[Dict[str, str]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] @@ -227,7 +226,6 @@ class Editor(NoSSRComponent): id: The id for the component. class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded - _rename_props: props to change the name of custom_attrs: custom attribute **props: Any properties to be passed to the Editor diff --git a/reflex/style.py b/reflex/style.py index 6117b3369..3b916da43 100644 --- a/reflex/style.py +++ b/reflex/style.py @@ -41,12 +41,12 @@ toggle_color_mode = BaseVar( breakpoints = ["0", "30em", "48em", "62em", "80em", "96em"] STYLE_PROP_SHORTHAND_MAPPING = { - "paddingX": ("padding-inline-start", "padding-inline-end"), - "paddingY": ("padding-top", "padding-bottom"), - "marginX": ("margin-inline-start", "margin-inline-end"), - "marginY": ("margin-top", "margin-bottom"), + "paddingX": ("paddingInlineStart", "paddingInlineEnd"), + "paddingY": ("paddingTop", "paddingBottom"), + "marginX": ("marginInlineStart", "marginInlineEnd"), + "marginY": ("marginTop", "marginBottom"), "bg": ("background",), - "bgColor": ("background-color",), + "bgColor": ("backgroundColor",), } diff --git a/scripts/pyi_generator.py b/scripts/pyi_generator.py index 2ce0ae61f..2e8936d13 100644 --- a/scripts/pyi_generator.py +++ b/scripts/pyi_generator.py @@ -54,6 +54,7 @@ EXCLUDED_PROPS = [ "special_props", "_invalid_children", "_memoization_mode", + "_rename_props", "_valid_children", "_valid_parents", ] diff --git a/tests/components/typography/test_markdown.py b/tests/components/typography/test_markdown.py index e5580dd5f..32d6c040f 100644 --- a/tests/components/typography/test_markdown.py +++ b/tests/components/typography/test_markdown.py @@ -58,6 +58,6 @@ def test_pass_custom_styles(): comp = md.get_component("h1") # type: ignore assert comp.style == { "color": "red", - "margin-bottom": "0.5em", - "margin-top": "0.5em", + "marginBottom": "0.5em", + "marginTop": "0.5em", } diff --git a/tests/test_style.py b/tests/test_style.py index 79ecee23c..cbe2b2ac1 100644 --- a/tests/test_style.py +++ b/tests/test_style.py @@ -20,17 +20,17 @@ test_style = [ {"::-webkit-scrollbar": {"display": "none"}}, {"::-webkit-scrollbar": {"display": "none"}}, ), - ({"margin_y": "2rem"}, {"margin-bottom": "2rem", "margin-top": "2rem"}), - ({"marginY": "2rem"}, {"margin-bottom": "2rem", "margin-top": "2rem"}), + ({"margin_y": "2rem"}, {"marginBottom": "2rem", "marginTop": "2rem"}), + ({"marginY": "2rem"}, {"marginBottom": "2rem", "marginTop": "2rem"}), ( {"::-webkit-scrollbar": {"bgColor": "red"}}, - {"::-webkit-scrollbar": {"background-color": "red"}}, + {"::-webkit-scrollbar": {"backgroundColor": "red"}}, ), ( {"paddingX": ["2rem", "3rem"]}, { - "padding-inline-start": ["2rem", "3rem"], - "padding-inline-end": ["2rem", "3rem"], + "paddingInlineStart": ["2rem", "3rem"], + "paddingInlineEnd": ["2rem", "3rem"], }, ), ] From d26ceb236d07fe9b3283dc2da5fff82600a74943 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 13 Feb 2024 11:14:15 -0800 Subject: [PATCH 33/68] Expose `get_upload_url` and `get_upload_dir` at top level --- reflex/__init__.py | 2 ++ reflex/__init__.pyi | 2 ++ 2 files changed, 4 insertions(+) diff --git a/reflex/__init__.py b/reflex/__init__.py index 62943d8b5..690789b89 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -39,6 +39,8 @@ _ALL_COMPONENTS = [ # Upload "cancel_upload", "clear_selected_files", + "get_upload_dir", + "get_upload_url", "selected_files", "upload", # Radix diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index 58c5cf040..e6de5a505 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -27,6 +27,8 @@ from reflex.components import tablet_and_desktop as tablet_and_desktop from reflex.components import tablet_only as tablet_only from reflex.components import cancel_upload as cancel_upload from reflex.components import clear_selected_files as clear_selected_files +from reflex.components import get_upload_dir as get_upload_dir +from reflex.components import get_upload_url as get_upload_url from reflex.components import selected_files as selected_files from reflex.components import upload as upload from reflex.components import accordion as accordion From c1089fc8f989c227cf600d482cb0da536fd5d08a Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Tue, 13 Feb 2024 19:58:48 +0000 Subject: [PATCH 34/68] [REF-1925] Accordion foreach fix (#2598) --- reflex/components/radix/primitives/accordion.py | 8 +++++--- reflex/components/radix/primitives/accordion.pyi | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index 59aff2c6c..e927c99e1 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -339,7 +339,7 @@ class AccordionRoot(AccordionComponent): color_scheme: Var[LiteralAccentColor] # type: ignore # dynamic themes of the accordion generated at compile time. - _dynamic_themes: Var[dict] + _dynamic_themes: Var[dict] = Var.create({}) # type: ignore # The var_data associated with the component. _var_data: VarData = VarData() # type: ignore @@ -540,7 +540,9 @@ to { """ -def accordion_item(header: Component, content: Component, **props) -> Component: +def accordion_item( + header: Component | Var, content: Component | Var, **props +) -> Component: """Create an accordion item. Args: @@ -552,7 +554,7 @@ def accordion_item(header: Component, content: Component, **props) -> Component: The accordion item. """ # The item requires a value to toggle (use the header as the default value). - value = props.pop("value", str(header)) + value = props.pop("value", header if isinstance(header, Var) else str(header)) return AccordionItem.create( AccordionHeader.create( diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 5e38a5516..c415431dc 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -625,7 +625,9 @@ class AccordionContent(AccordionComponent): """ ... -def accordion_item(header: Component, content: Component, **props) -> Component: ... +def accordion_item( + header: Component | Var, content: Component | Var, **props +) -> Component: ... class Accordion(SimpleNamespace): content = staticmethod(AccordionContent.create) From fda6785d566f354392290b361cd66ce955110108 Mon Sep 17 00:00:00 2001 From: Martin Xu <15661672+martinxu9@users.noreply.github.com> Date: Tue, 13 Feb 2024 12:03:17 -0800 Subject: [PATCH 35/68] sub form.root to form class solely for documentation (#2594) --- reflex/components/radix/primitives/form.py | 14 ++- reflex/components/radix/primitives/form.pyi | 96 ++++++++++++++++++++- 2 files changed, 104 insertions(+), 6 deletions(-) diff --git a/reflex/components/radix/primitives/form.py b/reflex/components/radix/primitives/form.py index c8dde5e8d..8437a41dc 100644 --- a/reflex/components/radix/primitives/form.py +++ b/reflex/components/radix/primitives/form.py @@ -290,16 +290,24 @@ class FormSubmit(FormComponent): alias = "RadixFormSubmit" -class Form(SimpleNamespace): +# This class is created mainly for reflex-web docs. +class Form(FormRoot): + """The Form component.""" + + pass + + +class FormNamespace(SimpleNamespace): """Form components.""" - root = __call__ = staticmethod(FormRoot.create) + root = staticmethod(FormRoot.create) control = staticmethod(FormControl.create) field = staticmethod(FormField.create) label = staticmethod(FormLabel.create) message = staticmethod(FormMessage.create) submit = staticmethod(FormSubmit.create) validity_state = staticmethod(FormValidityState.create) + __call__ = staticmethod(Form.create) -form = Form() +form = FormNamespace() diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index 752d365cb..247e393df 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -736,7 +736,97 @@ class FormSubmit(FormComponent): """ ... -class Form(SimpleNamespace): +class Form(FormRoot): + pass + + @overload + @classmethod + def create( # type: ignore + cls, + *children, + reset_on_submit: Optional[Union[Var[bool], bool]] = None, + handle_submit_unique_name: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_clear_server_errors: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_submit: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Form": + """Create a form component. + + Args: + *children: The children of the form. + reset_on_submit: If true, the form will be cleared after submit. + handle_submit_unique_name: The name used to make this form's submit handler function unique. + as_child: Change the default rendered element for the one passed as a child. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the form. + + Returns: + The form component. + """ + ... + +class FormNamespace(SimpleNamespace): root = staticmethod(FormRoot.create) control = staticmethod(FormControl.create) field = staticmethod(FormField.create) @@ -809,7 +899,7 @@ class Form(SimpleNamespace): Union[EventHandler, EventSpec, list, function, BaseVar] ] = None, **props - ) -> "FormRoot": + ) -> "Form": """Create a form component. Args: @@ -830,4 +920,4 @@ class Form(SimpleNamespace): """ ... -form = Form() +form = FormNamespace() From 5328f624d4f65379a8009690257960b81ef6fb98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Tue, 13 Feb 2024 21:05:59 +0100 Subject: [PATCH 36/68] update connection banner and connection modal to use Radix component instead of chakra (#2593) --- reflex/components/core/banner.py | 21 ++++++++++++++------- reflex/components/core/banner.pyi | 10 +++++++--- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/reflex/components/core/banner.py b/reflex/components/core/banner.py index c0e13820e..182d6a5e5 100644 --- a/reflex/components/core/banner.py +++ b/reflex/components/core/banner.py @@ -1,14 +1,19 @@ """Banner components.""" + from __future__ import annotations from typing import Optional from reflex.components.base.bare import Bare -from reflex.components.chakra.layout import Box -from reflex.components.chakra.overlay.modal import Modal -from reflex.components.chakra.typography import Text from reflex.components.component import Component from reflex.components.core.cond import cond +from reflex.components.radix.themes.components.dialog import ( + DialogContent, + DialogRoot, + DialogTitle, +) +from reflex.components.radix.themes.layout import Box +from reflex.components.radix.themes.typography.text import Text from reflex.constants import Dirs, Hooks, Imports from reflex.utils import imports from reflex.vars import Var, VarData @@ -105,9 +110,11 @@ class ConnectionModal(Component): comp = Text.create(*default_connection_error()) return cond( has_connection_error, - Modal.create( - header="Connection Error", - body=comp, - is_open=has_connection_error, + DialogRoot.create( + DialogContent.create( + DialogTitle.create("Connection Error"), + comp, + ), + open=has_connection_error, ), ) diff --git a/reflex/components/core/banner.pyi b/reflex/components/core/banner.pyi index 456d54bea..f7c7b2577 100644 --- a/reflex/components/core/banner.pyi +++ b/reflex/components/core/banner.pyi @@ -9,11 +9,15 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Optional from reflex.components.base.bare import Bare -from reflex.components.chakra.layout import Box -from reflex.components.chakra.overlay.modal import Modal -from reflex.components.chakra.typography import Text from reflex.components.component import Component from reflex.components.core.cond import cond +from reflex.components.radix.themes.components.dialog import ( + DialogContent, + DialogRoot, + DialogTitle, +) +from reflex.components.radix.themes.layout import Box +from reflex.components.radix.themes.typography.text import Text from reflex.constants import Dirs, Hooks, Imports from reflex.utils import imports from reflex.vars import Var, VarData From db90006512f5580f0b078ac1d0fefcce31fbd289 Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Wed, 14 Feb 2024 03:13:48 +0700 Subject: [PATCH 37/68] Update input to use textfield.input (#2599) --- .../radix/themes/components/text_field.py | 40 ++++--------------- .../radix/themes/components/text_field.pyi | 14 ++++--- 2 files changed, 15 insertions(+), 39 deletions(-) diff --git a/reflex/components/radix/themes/components/text_field.py b/reflex/components/radix/themes/components/text_field.py index 64b8f9824..8f25e75aa 100644 --- a/reflex/components/radix/themes/components/text_field.py +++ b/reflex/components/radix/themes/components/text_field.py @@ -3,11 +3,9 @@ from types import SimpleNamespace from typing import Any, Dict, Literal -import reflex as rx from reflex.components import el from reflex.components.component import Component from reflex.components.core.debounce import DebounceInput -from reflex.components.lucide.icon import Icon from reflex.constants import EventTriggers from reflex.vars import Var @@ -88,9 +86,6 @@ class TextFieldSlot(RadixThemesComponent): class Input(RadixThemesComponent): """High level wrapper for the Input component.""" - # The icon to render before the input. - icon: Var[str] - # Text field size "1" - "3" size: Var[LiteralTextFieldSize] @@ -124,9 +119,15 @@ class Input(RadixThemesComponent): # Placeholder text in the input placeholder: Var[str] + # Indicates whether the input is read-only + read_only: Var[bool] + # Indicates that the input is required required: Var[bool] + # Specifies the type of input + type: Var[str] + # Value of the input value: Var[str] @@ -140,34 +141,7 @@ class Input(RadixThemesComponent): Returns: The component. """ - input_props = { - prop: props.pop(prop) - for prop in [ - "auto_complete", - "default_value", - "disabled", - "max_length", - "min_length", - "name", - "placeholder", - "required", - "value", - "on_change", - "on_focus", - "on_blur", - "on_key_down", - "on_key_up", - ] - if prop in props - } - - icon = props.pop("icon", None) - - return TextFieldRoot.create( - TextFieldSlot.create(Icon.create(tag=icon)) if icon else rx.fragment(), - TextFieldInput.create(**input_props), - **props, - ) + return TextFieldInput.create(**props) def get_event_triggers(self) -> Dict[str, Any]: """Get the event triggers that pass the component's value to the handler. diff --git a/reflex/components/radix/themes/components/text_field.pyi b/reflex/components/radix/themes/components/text_field.pyi index 13ca66229..c058ff87c 100644 --- a/reflex/components/radix/themes/components/text_field.pyi +++ b/reflex/components/radix/themes/components/text_field.pyi @@ -9,11 +9,9 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from types import SimpleNamespace from typing import Any, Dict, Literal -import reflex as rx from reflex.components import el from reflex.components.component import Component from reflex.components.core.debounce import DebounceInput -from reflex.components.lucide.icon import Icon from reflex.constants import EventTriggers from reflex.vars import Var from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent @@ -712,7 +710,6 @@ class Input(RadixThemesComponent): def create( # type: ignore cls, *children, - icon: Optional[Union[Var[str], str]] = None, size: Optional[ Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] ] = None, @@ -797,7 +794,9 @@ class Input(RadixThemesComponent): min_length: Optional[Union[Var[str], str]] = None, name: Optional[Union[Var[str], str]] = None, placeholder: Optional[Union[Var[str], str]] = None, + read_only: Optional[Union[Var[bool], bool]] = None, required: Optional[Union[Var[bool], bool]] = None, + type: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -864,7 +863,6 @@ class Input(RadixThemesComponent): """Create an Input component. Args: - icon: The icon to render before the input. size: Text field size "1" - "3" variant: Variant of text field: "classic" | "surface" | "soft" color_scheme: Override theme color for text field @@ -876,7 +874,9 @@ class Input(RadixThemesComponent): min_length: Specifies the minimum number of characters required in the input name: Name of the input, used when sending form data placeholder: Placeholder text in the input + read_only: Indicates whether the input is read-only required: Indicates that the input is required + type: Specifies the type of input value: Value of the input style: The style of the component. key: A unique key for the component. @@ -900,7 +900,6 @@ class TextField(SimpleNamespace): @staticmethod def __call__( *children, - icon: Optional[Union[Var[str], str]] = None, size: Optional[ Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] ] = None, @@ -985,7 +984,9 @@ class TextField(SimpleNamespace): min_length: Optional[Union[Var[str], str]] = None, name: Optional[Union[Var[str], str]] = None, placeholder: Optional[Union[Var[str], str]] = None, + read_only: Optional[Union[Var[bool], bool]] = None, required: Optional[Union[Var[bool], bool]] = None, + type: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -1052,7 +1053,6 @@ class TextField(SimpleNamespace): """Create an Input component. Args: - icon: The icon to render before the input. size: Text field size "1" - "3" variant: Variant of text field: "classic" | "surface" | "soft" color_scheme: Override theme color for text field @@ -1064,7 +1064,9 @@ class TextField(SimpleNamespace): min_length: Specifies the minimum number of characters required in the input name: Name of the input, used when sending form data placeholder: Placeholder text in the input + read_only: Indicates whether the input is read-only required: Indicates that the input is required + type: Specifies the type of input value: Value of the input style: The style of the component. key: A unique key for the component. From 656e43503c74f4e035a72a6e507f03d4ab7f4748 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 13 Feb 2024 14:07:25 -0800 Subject: [PATCH 38/68] [REF-1840] Clean up `color_scheme` mapping (#2602) --- reflex/components/radix/themes/base.py | 30 +- reflex/components/radix/themes/base.pyi | 134 +----- reflex/components/radix/themes/color_mode.pyi | 2 +- .../radix/themes/components/alert_dialog.pyi | 455 ------------------ .../radix/themes/components/aspect_ratio.pyi | 65 --- .../radix/themes/components/avatar.pyi | 22 +- .../radix/themes/components/badge.pyi | 18 +- .../radix/themes/components/button.pyi | 24 +- .../radix/themes/components/callout.pyi | 154 +----- .../radix/themes/components/card.pyi | 65 --- .../radix/themes/components/checkbox.pyi | 30 +- .../radix/themes/components/context_menu.pyi | 406 +--------------- .../radix/themes/components/dialog.pyi | 455 ------------------ .../radix/themes/components/dropdown_menu.pyi | 406 +--------------- .../radix/themes/components/hover_card.pyi | 260 ---------- .../radix/themes/components/inset.pyi | 65 --- .../radix/themes/components/popover.pyi | 260 ---------- .../radix/themes/components/radio_group.pyi | 93 +--- .../radix/themes/components/scroll_area.pyi | 65 --- .../radix/themes/components/select.pyi | 357 +------------- .../radix/themes/components/separator.pyi | 10 +- .../radix/themes/components/slider.pyi | 2 +- .../radix/themes/components/switch.pyi | 38 +- .../radix/themes/components/table.pyi | 455 ------------------ .../radix/themes/components/tabs.pyi | 329 +------------ .../radix/themes/components/text_field.pyi | 26 +- .../components/radix/themes/layout/base.pyi | 65 --- reflex/components/radix/themes/layout/box.pyi | 65 --- .../components/radix/themes/layout/center.pyi | 65 --- .../radix/themes/layout/container.pyi | 65 --- .../components/radix/themes/layout/flex.pyi | 65 --- .../components/radix/themes/layout/grid.pyi | 65 --- .../radix/themes/layout/section.pyi | 65 --- .../components/radix/themes/layout/spacer.pyi | 65 --- .../radix/themes/typography/blockquote.pyi | 28 +- .../radix/themes/typography/code.pyi | 40 +- .../radix/themes/typography/heading.pyi | 56 ++- .../radix/themes/typography/text.pyi | 392 +++------------ 38 files changed, 258 insertions(+), 5004 deletions(-) diff --git a/reflex/components/radix/themes/base.py b/reflex/components/radix/themes/base.py index f412607aa..a923e499c 100644 --- a/reflex/components/radix/themes/base.py +++ b/reflex/components/radix/themes/base.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Literal +from typing import Any, Dict, Literal from reflex.components import Component from reflex.components.tags import Tag @@ -78,12 +78,13 @@ class RadixThemesComponent(Component): library = "@radix-ui/themes@^2.0.0" + # "Fake" prop color_scheme is used to avoid shadowing CSS prop "color". + _rename_props: Dict[str, str] = {"colorScheme": "color"} + @classmethod def create( cls, *children, - color: Var[str] = None, # type: ignore - color_scheme: Var[LiteralAccentColor] = None, # type: ignore **props, ) -> Component: """Create a new component instance. @@ -93,19 +94,11 @@ class RadixThemesComponent(Component): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. **props: Component properties. Returns: A new component instance. """ - if color is not None: - style = props.get("style", {}) - style["color"] = color - props["style"] = style - if color_scheme is not None: - props["color"] = color_scheme component = super().create(*children, **props) if component.library is None: component.library = RadixThemesComponent.__fields__["library"].default @@ -114,21 +107,6 @@ class RadixThemesComponent(Component): ) return component - @classmethod - def get_fields(cls) -> dict[str, Any]: - """Get the pydantic fields for the component. - - Returns: - Mapping of field name to ModelField instance. - """ - fields = super().get_fields() - if "color_scheme" in fields: - # Treat "color" as a direct prop, so the translation of reflex "color_scheme" - # to "color" does not put the "color_scheme" value into the "style" prop. - fields["color"] = fields.pop("color_scheme") - fields["color"].required = False - return fields - @staticmethod def _get_app_wrap_components() -> dict[tuple[int, str], Component]: return { diff --git a/reflex/components/radix/themes/base.pyi b/reflex/components/radix/themes/base.pyi index da3cf1d5e..c24fbd39e 100644 --- a/reflex/components/radix/themes/base.pyi +++ b/reflex/components/radix/themes/base.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from typing import Any, Literal +from typing import Any, Dict, Literal from reflex.components import Component from reflex.components.tags import Tag from reflex.utils import imports @@ -185,69 +185,6 @@ class RadixThemesComponent(Component): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -308,8 +245,6 @@ class RadixThemesComponent(Component): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -322,8 +257,6 @@ class RadixThemesComponent(Component): A new component instance. """ ... - @classmethod - def get_fields(cls) -> dict[str, Any]: ... class Theme(RadixThemesComponent): @overload @@ -506,69 +439,6 @@ class ThemePanel(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, default_open: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -630,8 +500,6 @@ class ThemePanel(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. default_open: Whether the panel is open. Defaults to False. style: The style of the component. key: A unique key for the component. diff --git a/reflex/components/radix/themes/color_mode.pyi b/reflex/components/radix/themes/color_mode.pyi index 5818d6753..e8db4bb77 100644 --- a/reflex/components/radix/themes/color_mode.pyi +++ b/reflex/components/radix/themes/color_mode.pyi @@ -254,7 +254,7 @@ class ColorModeSwitch(Switch): color_scheme: Override theme color for switch high_contrast: Whether to render the switch with higher contrast color against background radius: Override theme radius for switch: "none" | "small" | "full" - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. diff --git a/reflex/components/radix/themes/components/alert_dialog.pyi b/reflex/components/radix/themes/components/alert_dialog.pyi index 2cec7b3a1..999cfe1aa 100644 --- a/reflex/components/radix/themes/components/alert_dialog.pyi +++ b/reflex/components/radix/themes/components/alert_dialog.pyi @@ -23,69 +23,6 @@ class AlertDialogRoot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, open: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -150,8 +87,6 @@ class AlertDialogRoot(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. open: The controlled open state of the dialog. style: The style of the component. key: A unique key for the component. @@ -172,69 +107,6 @@ class AlertDialogTrigger(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -295,8 +167,6 @@ class AlertDialogTrigger(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -317,69 +187,6 @@ class AlertDialogContent(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, size: Optional[ Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] ] = None, @@ -493,8 +300,6 @@ class AlertDialogContent(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: The size of the content. force_mount: Whether to force mount the content on open. access_key: Provides a hint for generating a keyboard shortcut for the current element. @@ -532,69 +337,6 @@ class AlertDialogTitle(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -655,8 +397,6 @@ class AlertDialogTitle(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -676,69 +416,6 @@ class AlertDialogDescription(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -799,8 +476,6 @@ class AlertDialogDescription(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -820,69 +495,6 @@ class AlertDialogAction(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -943,8 +555,6 @@ class AlertDialogAction(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -964,69 +574,6 @@ class AlertDialogCancel(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1087,8 +634,6 @@ class AlertDialogCancel(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/aspect_ratio.pyi b/reflex/components/radix/themes/components/aspect_ratio.pyi index 12bb55c08..d75105149 100644 --- a/reflex/components/radix/themes/components/aspect_ratio.pyi +++ b/reflex/components/radix/themes/components/aspect_ratio.pyi @@ -17,69 +17,6 @@ class AspectRatio(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, ratio: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -141,8 +78,6 @@ class AspectRatio(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. ratio: The ratio of the width to the height of the element style: The style of the component. key: A unique key for the component. diff --git a/reflex/components/radix/themes/components/avatar.pyi b/reflex/components/radix/themes/components/avatar.pyi index 5b8722d74..508d5b3ff 100644 --- a/reflex/components/radix/themes/components/avatar.pyi +++ b/reflex/components/radix/themes/components/avatar.pyi @@ -17,7 +17,15 @@ class Avatar(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + variant: Optional[ + Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] + ] = None, + size: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -80,15 +88,6 @@ class Avatar(RadixThemesComponent): ], ] ] = None, - variant: Optional[ - Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] - ] = None, - size: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -158,10 +157,9 @@ class Avatar(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. variant: The variant of the avatar size: The size of the avatar: "1" - "9" + color_scheme: Color theme of the avatar high_contrast: Whether to render the avatar with higher contrast color against background radius: Override theme radius for avatar: "none" | "small" | "medium" | "large" | "full" src: The src of the avatar image diff --git a/reflex/components/radix/themes/components/badge.pyi b/reflex/components/radix/themes/components/badge.pyi index 9968994fc..e4e4bdf64 100644 --- a/reflex/components/radix/themes/components/badge.pyi +++ b/reflex/components/radix/themes/components/badge.pyi @@ -18,7 +18,13 @@ class Badge(el.Span, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + variant: Optional[ + Union[ + Var[Literal["solid", "soft", "surface", "outline"]], + Literal["solid", "soft", "surface", "outline"], + ] + ] = None, + size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, color_scheme: Optional[ Union[ Var[ @@ -81,13 +87,6 @@ class Badge(el.Span, RadixThemesComponent): ], ] ] = None, - variant: Optional[ - Union[ - Var[Literal["solid", "soft", "surface", "outline"]], - Literal["solid", "soft", "surface", "outline"], - ] - ] = None, - size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -195,10 +194,9 @@ class Badge(el.Span, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. variant: The variant of the badge size: The size of the badge + color_scheme: Color theme of the badge high_contrast: Whether to render the badge with higher contrast color against background radius: Override theme radius for badge: "none" | "small" | "medium" | "large" | "full" access_key: Provides a hint for generating a keyboard shortcut for the current element. diff --git a/reflex/components/radix/themes/components/button.pyi b/reflex/components/radix/themes/components/button.pyi index ffb7d2d3b..e2ec05ded 100644 --- a/reflex/components/radix/themes/components/button.pyi +++ b/reflex/components/radix/themes/components/button.pyi @@ -25,7 +25,16 @@ class Button(el.Button, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -88,16 +97,6 @@ class Button(el.Button, RadixThemesComponent): ], ] ] = None, - as_child: Optional[Union[Var[bool], bool]] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -230,11 +229,10 @@ class Button(el.Button, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Button size "1" - "4" variant: Variant of button: "solid" | "soft" | "outline" | "ghost" + color_scheme: Override theme color for button high_contrast: Whether to render the button with higher contrast color against background radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full" auto_focus: Automatically focuses the button when the page loads diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index 3954f491e..7f792ee38 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -24,7 +24,16 @@ class CalloutRoot(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["soft", "surface", "outline"]], + Literal["soft", "surface", "outline"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -87,16 +96,6 @@ class CalloutRoot(el.Div, RadixThemesComponent): ], ] ] = None, - as_child: Optional[Union[Var[bool], bool]] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["soft", "surface", "outline"]], - Literal["soft", "surface", "outline"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -198,11 +197,10 @@ class CalloutRoot(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Size "1" - "3" variant: Variant of button: "soft" | "surface" | "outline" + color_scheme: Override theme color for button high_contrast: Whether to render the button with higher contrast color against background access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -239,69 +237,6 @@ class CalloutIcon(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -402,8 +337,6 @@ class CalloutIcon(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -439,69 +372,6 @@ class CalloutText(el.P, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -602,8 +472,6 @@ class CalloutText(el.P, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi index 88713fb84..3a0b2ce63 100644 --- a/reflex/components/radix/themes/components/card.pyi +++ b/reflex/components/radix/themes/components/card.pyi @@ -18,69 +18,6 @@ class Card(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, as_child: Optional[Union[Var[bool], bool]] = None, size: Optional[ Union[ @@ -193,8 +130,6 @@ class Card(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Card size: "1" - "5" variant: Variant of Card: "solid" | "soft" | "outline" | "ghost" diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index c28a09518..4ac7e070e 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -26,7 +26,16 @@ class Checkbox(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -89,16 +98,6 @@ class Checkbox(RadixThemesComponent): ], ] ] = None, - as_child: Optional[Union[Var[bool], bool]] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "surface", "soft"]], - Literal["classic", "surface", "soft"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, default_checked: Optional[Union[Var[bool], bool]] = None, checked: Optional[Union[Var[bool], bool]] = None, @@ -169,11 +168,10 @@ class Checkbox(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Checkbox size "1" - "3" variant: Variant of checkbox: "classic" | "surface" | "soft" + color_scheme: Override theme color for checkbox high_contrast: Whether to render the checkbox with higher contrast color against background default_checked: Whether the checkbox is checked by default checked: Whether the checkbox is checked @@ -181,7 +179,7 @@ class Checkbox(RadixThemesComponent): required: Whether the checkbox is required name: The name of the checkbox control when submitting the form. value: The value of the checkbox control when submitting the form. - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. @@ -360,7 +358,7 @@ class HighLevelCheckbox(RadixThemesComponent): required: Whether the checkbox is required name: The name of the checkbox control when submitting the form. value: The value of the checkbox control when submitting the form. - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. @@ -536,7 +534,7 @@ class CheckboxNamespace(SimpleNamespace): required: Whether the checkbox is required name: The name of the checkbox control when submitting the form. value: The value of the checkbox control when submitting the form. - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. diff --git a/reflex/components/radix/themes/components/context_menu.pyi b/reflex/components/radix/themes/components/context_menu.pyi index 3d92b2696..03fd2c4c4 100644 --- a/reflex/components/radix/themes/components/context_menu.pyi +++ b/reflex/components/radix/themes/components/context_menu.pyi @@ -20,69 +20,6 @@ class ContextMenuRoot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, modal: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -147,8 +84,6 @@ class ContextMenuRoot(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. modal: The modality of the context menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. style: The style of the component. key: A unique key for the component. @@ -169,69 +104,6 @@ class ContextMenuTrigger(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, disabled: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -293,8 +165,6 @@ class ContextMenuTrigger(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. disabled: Whether the trigger is disabled style: The style of the component. key: A unique key for the component. @@ -316,7 +186,10 @@ class ContextMenuContent(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, + variant: Optional[ + Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -379,10 +252,6 @@ class ContextMenuContent(RadixThemesComponent): ], ] ] = None, - size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, - variant: Optional[ - Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, align_offset: Optional[Union[Var[int], int]] = None, avoid_collisions: Optional[Union[Var[bool], bool]] = None, @@ -461,10 +330,9 @@ class ContextMenuContent(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: Button size "1" - "4" variant: Variant of button: "solid" | "soft" | "outline" | "ghost" + color_scheme: Override theme color for button high_contrast: Whether to render the button with higher contrast color against background align_offset: The vertical distance in pixels from the anchor. avoid_collisions: When true, overrides the side and aligns preferences to prevent collisions with boundary edges. @@ -487,69 +355,6 @@ class ContextMenuSub(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -610,8 +415,6 @@ class ContextMenuSub(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -631,69 +434,6 @@ class ContextMenuSubTrigger(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, disabled: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -755,8 +495,6 @@ class ContextMenuSubTrigger(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. disabled: Whether the trigger is disabled style: The style of the component. key: A unique key for the component. @@ -778,69 +516,6 @@ class ContextMenuSubContent(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, loop: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -914,8 +589,6 @@ class ContextMenuSubContent(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. loop: When true, keyboard navigation will loop from last item to first, and vice versa. style: The style of the component. key: A unique key for the component. @@ -936,7 +609,6 @@ class ContextMenuItem(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, color_scheme: Optional[ Union[ Var[ @@ -1060,8 +732,7 @@ class ContextMenuItem(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. + color_scheme: Override theme color for button shortcut: Shortcut to render a menu item as a link style: The style of the component. key: A unique key for the component. @@ -1082,69 +753,6 @@ class ContextMenuSeparator(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1205,8 +813,6 @@ class ContextMenuSeparator(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi index ef41b0b71..ca5939a0a 100644 --- a/reflex/components/radix/themes/components/dialog.pyi +++ b/reflex/components/radix/themes/components/dialog.pyi @@ -21,69 +21,6 @@ class DialogRoot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, open: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -148,8 +85,6 @@ class DialogRoot(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. open: The controlled open state of the dialog. style: The style of the component. key: A unique key for the component. @@ -170,69 +105,6 @@ class DialogTrigger(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -293,8 +165,6 @@ class DialogTrigger(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -314,69 +184,6 @@ class DialogTitle(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -437,8 +244,6 @@ class DialogTitle(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -459,69 +264,6 @@ class DialogContent(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, size: Optional[ Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] ] = None, @@ -640,8 +382,6 @@ class DialogContent(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: DialogContent size "1" - "4" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -678,69 +418,6 @@ class DialogDescription(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -801,8 +478,6 @@ class DialogDescription(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -822,69 +497,6 @@ class DialogClose(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -945,8 +557,6 @@ class DialogClose(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -971,69 +581,6 @@ class Dialog(SimpleNamespace): @staticmethod def __call__( *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, open: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -1098,8 +645,6 @@ class Dialog(SimpleNamespace): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. open: The controlled open state of the dialog. style: The style of the component. key: A unique key for the component. diff --git a/reflex/components/radix/themes/components/dropdown_menu.pyi b/reflex/components/radix/themes/components/dropdown_menu.pyi index 877a99038..7f2d840d8 100644 --- a/reflex/components/radix/themes/components/dropdown_menu.pyi +++ b/reflex/components/radix/themes/components/dropdown_menu.pyi @@ -27,69 +27,6 @@ class DropdownMenuRoot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, default_open: Optional[Union[Var[bool], bool]] = None, open: Optional[Union[Var[bool], bool]] = None, modal: Optional[Union[Var[bool], bool]] = None, @@ -157,8 +94,6 @@ class DropdownMenuRoot(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. default_open: The open state of the dropdown menu when it is initially rendered. Use when you do not need to control its open state. open: The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange. modal: The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. Defaults to True. @@ -182,69 +117,6 @@ class DropdownMenuTrigger(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, as_child: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -306,8 +178,6 @@ class DropdownMenuTrigger(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. style: The style of the component. key: A unique key for the component. @@ -329,7 +199,10 @@ class DropdownMenuContent(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, + variant: Optional[ + Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -392,10 +265,6 @@ class DropdownMenuContent(RadixThemesComponent): ], ] ] = None, - size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, - variant: Optional[ - Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, as_child: Optional[Union[Var[bool], bool]] = None, loop: Optional[Union[Var[bool], bool]] = None, @@ -503,10 +372,9 @@ class DropdownMenuContent(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: Dropdown Menu Content size "1" - "2" variant: Variant of Dropdown Menu Content: "solid" | "soft" + color_scheme: Override theme color for Dropdown Menu Content high_contrast: Renders the Dropdown Menu Content in higher contrast as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. loop: When True, keyboard navigation will loop from last item to first, and vice versa. Defaults to False. @@ -539,69 +407,6 @@ class DropdownMenuSubTrigger(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, as_child: Optional[Union[Var[bool], bool]] = None, disabled: Optional[Union[Var[bool], bool]] = None, text_value: Optional[Union[Var[str], str]] = None, @@ -665,8 +470,6 @@ class DropdownMenuSubTrigger(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. disabled: When true, prevents the user from interacting with the item. text_value: Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside. @@ -690,69 +493,6 @@ class DropdownMenuSub(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, open: Optional[Union[Var[bool], bool]] = None, default_open: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, @@ -818,8 +558,6 @@ class DropdownMenuSub(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. open: The controlled open state of the submenu. Must be used in conjunction with `on_open_change`. default_open: The open state of the submenu when it is initially rendered. Use when you do not need to control its open state. style: The style of the component. @@ -842,69 +580,6 @@ class DropdownMenuSubContent(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, as_child: Optional[Union[Var[bool], bool]] = None, loop: Optional[Union[Var[bool], bool]] = None, force_mount: Optional[Union[Var[bool], bool]] = None, @@ -996,8 +671,6 @@ class DropdownMenuSubContent(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. loop: When True, keyboard navigation will loop from last item to first, and vice versa. Defaults to False. force_mount: Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. @@ -1028,7 +701,6 @@ class DropdownMenuItem(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, color_scheme: Optional[ Union[ Var[ @@ -1158,8 +830,7 @@ class DropdownMenuItem(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. + color_scheme: Override theme color for Dropdown Menu Item shortcut: Shortcut to render a menu item as a link as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False. disabled: When true, prevents the user from interacting with the item. @@ -1183,69 +854,6 @@ class DropdownMenuSeparator(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1306,8 +914,6 @@ class DropdownMenuSeparator(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/hover_card.pyi b/reflex/components/radix/themes/components/hover_card.pyi index 8c89c0239..d732ce561 100644 --- a/reflex/components/radix/themes/components/hover_card.pyi +++ b/reflex/components/radix/themes/components/hover_card.pyi @@ -21,69 +21,6 @@ class HoverCardRoot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, default_open: Optional[Union[Var[bool], bool]] = None, open: Optional[Union[Var[bool], bool]] = None, open_delay: Optional[Union[Var[int], int]] = None, @@ -151,8 +88,6 @@ class HoverCardRoot(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state. open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange. open_delay: The duration from when the mouse enters the trigger until the hover card opens. @@ -176,69 +111,6 @@ class HoverCardTrigger(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -299,8 +171,6 @@ class HoverCardTrigger(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -320,69 +190,6 @@ class HoverCardContent(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, side: Optional[ Union[ Var[Literal["top", "right", "bottom", "left"]], @@ -497,8 +304,6 @@ class HoverCardContent(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. side: The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled. side_offset: The distance in pixels from the trigger. align: The preferred alignment against the trigger. May change when collisions occur. @@ -540,69 +345,6 @@ class HoverCard(SimpleNamespace): @staticmethod def __call__( *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, default_open: Optional[Union[Var[bool], bool]] = None, open: Optional[Union[Var[bool], bool]] = None, open_delay: Optional[Union[Var[int], int]] = None, @@ -670,8 +412,6 @@ class HoverCard(SimpleNamespace): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state. open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange. open_delay: The duration from when the mouse enters the trigger until the hover card opens. diff --git a/reflex/components/radix/themes/components/inset.pyi b/reflex/components/radix/themes/components/inset.pyi index 54c57a7c2..f4b1bc41f 100644 --- a/reflex/components/radix/themes/components/inset.pyi +++ b/reflex/components/radix/themes/components/inset.pyi @@ -20,69 +20,6 @@ class Inset(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, side: Optional[ Union[ Var[Literal["x", "y", "top", "bottom", "right", "left"]], @@ -202,8 +139,6 @@ class Inset(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. side: The side clip: How to clip the element's content: "border-box" | "padding-box" p: Padding diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index 5aed1d7f6..e81f03be2 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -21,69 +21,6 @@ class PopoverRoot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, open: Optional[Union[Var[bool], bool]] = None, modal: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, @@ -149,8 +86,6 @@ class PopoverRoot(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. open: The controlled open state of the popover. modal: The modality of the popover. When set to true, interaction with outside elements will be disabled and only popover content will be visible to screen readers. style: The style of the component. @@ -172,69 +107,6 @@ class PopoverTrigger(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -295,8 +167,6 @@ class PopoverTrigger(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -317,69 +187,6 @@ class PopoverContent(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, size: Optional[ Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] ] = None, @@ -516,8 +323,6 @@ class PopoverContent(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: Size of the button: "1" | "2" | "3" | "4" side: The preferred side of the anchor to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled. side_offset: The distance in pixels from the anchor. @@ -559,69 +364,6 @@ class PopoverClose(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -682,8 +424,6 @@ class PopoverClose(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/radio_group.pyi b/reflex/components/radix/themes/components/radio_group.pyi index 6c70f7317..aff3fe9ed 100644 --- a/reflex/components/radix/themes/components/radio_group.pyi +++ b/reflex/components/radix/themes/components/radio_group.pyi @@ -26,7 +26,15 @@ class RadioGroupRoot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -89,15 +97,6 @@ class RadioGroupRoot(RadixThemesComponent): ], ] ] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "surface", "soft"]], - Literal["classic", "surface", "soft"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, value: Optional[Union[Var[str], str]] = None, default_value: Optional[Union[Var[str], str]] = None, @@ -167,17 +166,16 @@ class RadioGroupRoot(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: The size of the radio group: "1" | "2" | "3" variant: The variant of the radio group + color_scheme: The color of the radio group high_contrast: Whether to render the radio group with higher contrast color against background value: The controlled value of the radio item to check. Should be used in conjunction with on_change. default_value: The initial value of checked radio item. Should be used in conjunction with on_change. disabled: Whether the radio group is disabled name: The name of the group. Submitted with its owning form as part of a name/value pair. required: Whether the radio group is required - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. @@ -196,69 +194,6 @@ class RadioGroupItem(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, required: Optional[Union[Var[bool], bool]] = None, @@ -322,8 +257,6 @@ class RadioGroupItem(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. value: The value of the radio item to check. Should be used in conjunction with on_change. disabled: When true, prevents the user from interacting with the radio item. required: When true, indicates that the user must check the radio item before the owning form can be submitted. @@ -505,7 +438,7 @@ class HighLevelRadioGroup(RadixThemesComponent): disabled: Whether the radio group is disabled name: The name of the group. Submitted with its owning form as part of a name/value pair. required: Whether the radio group is required - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. @@ -684,7 +617,7 @@ class RadioGroup(SimpleNamespace): disabled: Whether the radio group is disabled name: The name of the group. Submitted with its owning form as part of a name/value pair. required: Whether the radio group is required - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. diff --git a/reflex/components/radix/themes/components/scroll_area.pyi b/reflex/components/radix/themes/components/scroll_area.pyi index dd3ee45b2..2202990df 100644 --- a/reflex/components/radix/themes/components/scroll_area.pyi +++ b/reflex/components/radix/themes/components/scroll_area.pyi @@ -17,69 +17,6 @@ class ScrollArea(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, scrollbars: Optional[ Union[ Var[Literal["vertical", "horizontal", "both"]], @@ -153,8 +90,6 @@ class ScrollArea(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. scrollbars: The alignment of the scroll area type_: Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars. "auto" | "always" | "scroll" | "hover" scroll_hide_delay: If type is set to either "scroll" or "hover", this prop determines the length of time, in milliseconds, before the scrollbars are hidden after the user stops interacting with scrollbars. diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi index adb8a1550..b93c7c0d6 100644 --- a/reflex/components/radix/themes/components/select.pyi +++ b/reflex/components/radix/themes/components/select.pyi @@ -22,69 +22,6 @@ class SelectRoot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, size: Optional[ Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] ] = None, @@ -161,8 +98,6 @@ class SelectRoot(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: The size of the select: "1" | "2" | "3" default_value: The value of the select when initially rendered. Use when you do not need to control the state of the select. value: The controlled value of the select. Should be used in conjunction with on_change. @@ -171,7 +106,7 @@ class SelectRoot(RadixThemesComponent): name: The name of the select control when submitting the form. disabled: When True, prevents the user from interacting with select. required: When True, indicates that the user must select a value before the owning form can be submitted. - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. @@ -190,7 +125,12 @@ class SelectTrigger(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft", "ghost"]], + Literal["classic", "surface", "soft", "ghost"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -253,12 +193,6 @@ class SelectTrigger(RadixThemesComponent): ], ] ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "surface", "soft", "ghost"]], - Literal["classic", "surface", "soft", "ghost"], - ] - ] = None, radius: Optional[ Union[ Var[Literal["none", "small", "medium", "large", "full"]], @@ -326,9 +260,8 @@ class SelectTrigger(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. variant: Variant of the select trigger + color_scheme: The color of the select trigger radius: The radius of the select trigger placeholder: The placeholder of the select trigger style: The style of the component. @@ -351,7 +284,9 @@ class SelectContent(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + variant: Optional[ + Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -414,9 +349,6 @@ class SelectContent(RadixThemesComponent): ], ] ] = None, - variant: Optional[ - Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, position: Optional[ Union[ @@ -507,9 +439,8 @@ class SelectContent(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. variant: The variant of the select content + color_scheme: The color of the select content high_contrast: Whether to render the select content with higher contrast color against background position: The positioning mode to use, item-aligned is the default and behaves similarly to a native MacOS menu by positioning content relative to the active item. popper positions content in the same way as our other primitives, for example Popover or DropdownMenu. side: The preferred side of the anchor to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled. Only available when position is set to popper. @@ -535,69 +466,6 @@ class SelectGroup(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -658,8 +526,6 @@ class SelectGroup(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -679,69 +545,6 @@ class SelectItem(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, @@ -804,8 +607,6 @@ class SelectItem(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. value: The value given as data when submitting a form with a name. disabled: Whether the select item is disabled style: The style of the component. @@ -827,69 +628,6 @@ class SelectLabel(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -950,8 +688,6 @@ class SelectLabel(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -971,69 +707,6 @@ class SelectSeparator(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1094,8 +767,6 @@ class SelectSeparator(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1283,7 +954,7 @@ class HighLevelSelect(SelectRoot): name: The name of the select control when submitting the form. disabled: When True, prevents the user from interacting with select. required: When True, indicates that the user must select a value before the owning form can be submitted. - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. @@ -1476,7 +1147,7 @@ class Select(SimpleNamespace): name: The name of the select control when submitting the form. disabled: When True, prevents the user from interacting with select. required: When True, indicates that the user must select a value before the owning form can be submitted. - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. diff --git a/reflex/components/radix/themes/components/separator.pyi b/reflex/components/radix/themes/components/separator.pyi index 12ab6e2fa..be46643c1 100644 --- a/reflex/components/radix/themes/components/separator.pyi +++ b/reflex/components/radix/themes/components/separator.pyi @@ -19,7 +19,9 @@ class Separator(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -82,9 +84,6 @@ class Separator(RadixThemesComponent): ], ] ] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] - ] = None, orientation: Optional[ Union[ Var[Literal["horizontal", "vertical"]], @@ -152,9 +151,8 @@ class Separator(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: The size of the select: "1" | "2" | "3" | "4" + color_scheme: The color of the select orientation: The orientation of the separator. decorative: When true, signifies that it is purely visual, carries no semantic meaning, and ensures it is not present in the accessibility tree. style: The style of the component. diff --git a/reflex/components/radix/themes/components/slider.pyi b/reflex/components/radix/themes/components/slider.pyi index 581410a23..1c1935f60 100644 --- a/reflex/components/radix/themes/components/slider.pyi +++ b/reflex/components/radix/themes/components/slider.pyi @@ -197,7 +197,7 @@ class Slider(RadixThemesComponent): step: The step value of the slider. disabled: Whether the slider is disabled orientation: The orientation of the slider. - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. diff --git a/reflex/components/radix/themes/components/switch.pyi b/reflex/components/radix/themes/components/switch.pyi index d29e661f1..cf2bf5ea8 100644 --- a/reflex/components/radix/themes/components/switch.pyi +++ b/reflex/components/radix/themes/components/switch.pyi @@ -21,7 +21,22 @@ class Switch(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + default_checked: Optional[Union[Var[bool], bool]] = None, + checked: Optional[Union[Var[bool], bool]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + required: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + value: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -84,22 +99,6 @@ class Switch(RadixThemesComponent): ], ] ] = None, - as_child: Optional[Union[Var[bool], bool]] = None, - default_checked: Optional[Union[Var[bool], bool]] = None, - checked: Optional[Union[Var[bool], bool]] = None, - disabled: Optional[Union[Var[bool], bool]] = None, - required: Optional[Union[Var[bool], bool]] = None, - name: Optional[Union[Var[str], str]] = None, - value: Optional[Union[Var[str], str]] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "surface", "soft"]], - Literal["classic", "surface", "soft"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -169,8 +168,6 @@ class Switch(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. default_checked: Whether the switch is checked by default checked: Whether the switch is checked @@ -180,9 +177,10 @@ class Switch(RadixThemesComponent): value: The value associated with the "on" position size: Switch size "1" - "4" variant: Variant of switch: "classic" | "surface" | "soft" + color_scheme: Override theme color for switch high_contrast: Whether to render the switch with higher contrast color against background radius: Override theme radius for switch: "none" | "small" | "full" - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index 6b911ddb7..73b9fa7e2 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -19,69 +19,6 @@ class TableRoot(el.Table, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, size: Optional[ Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] ] = None, @@ -194,8 +131,6 @@ class TableRoot(el.Table, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: The size of the table: "1" | "2" | "3" variant: The variant of the table align: Alignment of the table @@ -235,69 +170,6 @@ class TableHeader(el.Thead, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -401,8 +273,6 @@ class TableHeader(el.Thead, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. align: Alignment of the content within the table header access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -439,69 +309,6 @@ class TableRow(el.Tr, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, align: Optional[ Union[ Var[Literal["start", "center", "end", "baseline"]], @@ -608,8 +415,6 @@ class TableRow(el.Tr, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. align: Alignment of the content within the table row access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -646,69 +451,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, justify: Optional[ Union[ Var[Literal["start", "center", "end"]], @@ -830,8 +572,6 @@ class TableColumnHeaderCell(el.Th, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. justify: The justification of the column align: Alignment of the content within the table header cell col_span: Number of columns a header cell should span @@ -873,69 +613,6 @@ class TableBody(el.Tbody, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1039,8 +716,6 @@ class TableBody(el.Tbody, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. align: Alignment of the content within the table body access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -1077,69 +752,6 @@ class TableCell(el.Td, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, justify: Optional[ Union[ Var[Literal["start", "center", "end"]], @@ -1258,8 +870,6 @@ class TableCell(el.Td, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. justify: The justification of the column align: Alignment of the content within the table cell col_span: Number of columns a cell should span @@ -1300,69 +910,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, justify: Optional[ Union[ Var[Literal["start", "center", "end"]], @@ -1484,8 +1031,6 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. justify: The justification of the column align: Alignment of the content within the table header cell col_span: Number of columns a header cell should span diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi index b671852c1..af4c66db3 100644 --- a/reflex/components/radix/themes/components/tabs.pyi +++ b/reflex/components/radix/themes/components/tabs.pyi @@ -20,69 +20,6 @@ class TabsRoot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, default_value: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, orientation: Optional[ @@ -154,12 +91,10 @@ class TabsRoot(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. default_value: The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. value: The controlled value of the tab that should be active. Use when you need to control the state of the tabs. orientation: The orientation of the tabs. - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. @@ -178,69 +113,6 @@ class TabsList(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -302,8 +174,6 @@ class TabsList(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: Tabs size "1" - "2" style: The style of the component. key: A unique key for the component. @@ -324,69 +194,6 @@ class TabsTrigger(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, @@ -449,8 +256,6 @@ class TabsTrigger(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. value: The value of the tab. Must be unique for each tab. disabled: Whether the tab is disabled style: The style of the component. @@ -472,69 +277,6 @@ class TabsContent(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, value: Optional[Union[Var[str], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -596,8 +338,6 @@ class TabsContent(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. value: The value of the tab. Must be unique for each tab. style: The style of the component. key: A unique key for the component. @@ -621,69 +361,6 @@ class Tabs(SimpleNamespace): @staticmethod def __call__( *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, default_value: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, orientation: Optional[ @@ -755,12 +432,10 @@ class Tabs(SimpleNamespace): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. default_value: The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. value: The controlled value of the tab that should be active. Use when you need to control the state of the tabs. orientation: The orientation of the tabs. - style: Props to rename The style of the component. + style: The style of the component. key: A unique key for the component. id: The id for the component. class_name: The class name for the component. diff --git a/reflex/components/radix/themes/components/text_field.pyi b/reflex/components/radix/themes/components/text_field.pyi index c058ff87c..c6f88b2e9 100644 --- a/reflex/components/radix/themes/components/text_field.pyi +++ b/reflex/components/radix/themes/components/text_field.pyi @@ -25,7 +25,15 @@ class TextFieldRoot(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -88,15 +96,6 @@ class TextFieldRoot(el.Div, RadixThemesComponent): ], ] ] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "surface", "soft"]], - Literal["classic", "surface", "soft"], - ] - ] = None, radius: Optional[ Union[ Var[Literal["none", "small", "medium", "large", "full"]], @@ -203,10 +202,9 @@ class TextFieldRoot(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: Text field size "1" - "3" variant: Variant of text field: "classic" | "surface" | "soft" + color_scheme: Override theme color for text field radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -566,7 +564,6 @@ class TextFieldSlot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, color_scheme: Optional[ Union[ Var[ @@ -689,8 +686,7 @@ class TextFieldSlot(RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. + color_scheme: Override theme color for text field slot style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/layout/base.pyi b/reflex/components/radix/themes/layout/base.pyi index fa3cfd9fa..aa88429e2 100644 --- a/reflex/components/radix/themes/layout/base.pyi +++ b/reflex/components/radix/themes/layout/base.pyi @@ -19,69 +19,6 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, p: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -228,8 +165,6 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. p: Padding: "0" - "9" px: Padding horizontal: "0" - "9" py: Padding vertical: "0" - "9" diff --git a/reflex/components/radix/themes/layout/box.pyi b/reflex/components/radix/themes/layout/box.pyi index 59439c2e2..65c2e81a8 100644 --- a/reflex/components/radix/themes/layout/box.pyi +++ b/reflex/components/radix/themes/layout/box.pyi @@ -16,69 +16,6 @@ class Box(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -179,8 +116,6 @@ class Box(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/reflex/components/radix/themes/layout/center.pyi b/reflex/components/radix/themes/layout/center.pyi index c0ea78630..402e4c08f 100644 --- a/reflex/components/radix/themes/layout/center.pyi +++ b/reflex/components/radix/themes/layout/center.pyi @@ -16,69 +16,6 @@ class Center(Flex): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ Union[ @@ -210,8 +147,6 @@ class Center(Flex): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" diff --git a/reflex/components/radix/themes/layout/container.pyi b/reflex/components/radix/themes/layout/container.pyi index cde82511c..b45bfdae6 100644 --- a/reflex/components/radix/themes/layout/container.pyi +++ b/reflex/components/radix/themes/layout/container.pyi @@ -20,69 +20,6 @@ class Container(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, size: Optional[ Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] ] = None, @@ -186,8 +123,6 @@ class Container(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: The size of the container: "1" - "4" (default "4") access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi index 29bca6d21..e50fabae6 100644 --- a/reflex/components/radix/themes/layout/flex.pyi +++ b/reflex/components/radix/themes/layout/flex.pyi @@ -21,69 +21,6 @@ class Flex(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ Union[ @@ -215,8 +152,6 @@ class Flex(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" diff --git a/reflex/components/radix/themes/layout/grid.pyi b/reflex/components/radix/themes/layout/grid.pyi index cbe160531..3171bcbe4 100644 --- a/reflex/components/radix/themes/layout/grid.pyi +++ b/reflex/components/radix/themes/layout/grid.pyi @@ -20,69 +20,6 @@ class Grid(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, as_child: Optional[Union[Var[bool], bool]] = None, columns: Optional[Union[Var[str], str]] = None, rows: Optional[Union[Var[str], str]] = None, @@ -222,8 +159,6 @@ class Grid(el.Div, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. columns: Number of columns rows: Number of rows diff --git a/reflex/components/radix/themes/layout/section.pyi b/reflex/components/radix/themes/layout/section.pyi index eed8ee381..0236fda64 100644 --- a/reflex/components/radix/themes/layout/section.pyi +++ b/reflex/components/radix/themes/layout/section.pyi @@ -20,69 +20,6 @@ class Section(el.Section, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, size: Optional[ Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] ] = None, @@ -186,8 +123,6 @@ class Section(el.Section, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: The size of the section: "1" - "3" (default "3") access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. diff --git a/reflex/components/radix/themes/layout/spacer.pyi b/reflex/components/radix/themes/layout/spacer.pyi index 553b5c34f..df662edae 100644 --- a/reflex/components/radix/themes/layout/spacer.pyi +++ b/reflex/components/radix/themes/layout/spacer.pyi @@ -16,69 +16,6 @@ class Spacer(Flex): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ Union[ @@ -210,8 +147,6 @@ class Spacer(Flex): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" diff --git a/reflex/components/radix/themes/typography/blockquote.pyi b/reflex/components/radix/themes/typography/blockquote.pyi index 801a4d9fb..435d76409 100644 --- a/reflex/components/radix/themes/typography/blockquote.pyi +++ b/reflex/components/radix/themes/typography/blockquote.pyi @@ -18,7 +18,18 @@ class Blockquote(el.Blockquote, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -81,18 +92,6 @@ class Blockquote(el.Blockquote, RadixThemesComponent): ], ] ] = None, - size: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - weight: Optional[ - Union[ - Var[Literal["light", "regular", "medium", "bold"]], - Literal["light", "regular", "medium", "bold"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, cite: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, access_key: Optional[ @@ -195,10 +194,9 @@ class Blockquote(el.Blockquote, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: Text size: "1" - "9" weight: Thickness of text: "light" | "regular" | "medium" | "bold" + color_scheme: Overrides the accent color inherited from the Theme. high_contrast: Whether to render the text with higher contrast color cite: Define the title of a work. access_key: Provides a hint for generating a keyboard shortcut for the current element. diff --git a/reflex/components/radix/themes/typography/code.pyi b/reflex/components/radix/themes/typography/code.pyi index 8fe0e0a84..41fd781c0 100644 --- a/reflex/components/radix/themes/typography/code.pyi +++ b/reflex/components/radix/themes/typography/code.pyi @@ -18,7 +18,24 @@ class Code(el.Code, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, + size: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -81,24 +98,6 @@ class Code(el.Code, RadixThemesComponent): ], ] ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], - ] - ] = None, - size: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - weight: Optional[ - Union[ - Var[Literal["light", "regular", "medium", "bold"]], - Literal["light", "regular", "medium", "bold"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -200,11 +199,10 @@ class Code(el.Code, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. variant: The visual variant to apply: "solid" | "soft" | "outline" | "ghost" size: Text size: "1" - "9" weight: Thickness of text: "light" | "regular" | "medium" | "bold" + color_scheme: Overrides the accent color inherited from the Theme. high_contrast: Whether to render the text with higher contrast color access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. diff --git a/reflex/components/radix/themes/typography/heading.pyi b/reflex/components/radix/themes/typography/heading.pyi index 705cad9a6..87e0c295a 100644 --- a/reflex/components/radix/themes/typography/heading.pyi +++ b/reflex/components/radix/themes/typography/heading.pyi @@ -18,7 +18,32 @@ class Heading(el.H1, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + as_: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, + align: Optional[ + Union[ + Var[Literal["left", "center", "right"]], + Literal["left", "center", "right"], + ] + ] = None, + trim: Optional[ + Union[ + Var[Literal["normal", "start", "end", "both"]], + Literal["normal", "start", "end", "both"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -81,32 +106,6 @@ class Heading(el.H1, RadixThemesComponent): ], ] ] = None, - as_child: Optional[Union[Var[bool], bool]] = None, - as_: Optional[Union[Var[str], str]] = None, - size: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - weight: Optional[ - Union[ - Var[Literal["light", "regular", "medium", "bold"]], - Literal["light", "regular", "medium", "bold"], - ] - ] = None, - align: Optional[ - Union[ - Var[Literal["left", "center", "right"]], - Literal["left", "center", "right"], - ] - ] = None, - trim: Optional[ - Union[ - Var[Literal["normal", "start", "end", "both"]], - Literal["normal", "start", "end", "both"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -208,14 +207,13 @@ class Heading(el.H1, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. as_: Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild) size: Text size: "1" - "9" weight: Thickness of text: "light" | "regular" | "medium" | "bold" align: Alignment of text in element: "left" | "center" | "right" trim: Removes the leading trim space: "normal" | "start" | "end" | "both" + color_scheme: Overrides the accent color inherited from the Theme. high_contrast: Whether to render the text with higher contrast color access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index 382b04b3d..d3e9eaf8a 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -22,7 +22,37 @@ class Text(el.Span, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + as_: Optional[ + Union[ + Var[Literal["p", "label", "div", "span"]], + Literal["p", "label", "div", "span"], + ] + ] = None, + size: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, + align: Optional[ + Union[ + Var[Literal["left", "center", "right"]], + Literal["left", "center", "right"], + ] + ] = None, + trim: Optional[ + Union[ + Var[Literal["normal", "start", "end", "both"]], + Literal["normal", "start", "end", "both"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -85,37 +115,6 @@ class Text(el.Span, RadixThemesComponent): ], ] ] = None, - as_child: Optional[Union[Var[bool], bool]] = None, - as_: Optional[ - Union[ - Var[Literal["p", "label", "div", "span"]], - Literal["p", "label", "div", "span"], - ] - ] = None, - size: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - weight: Optional[ - Union[ - Var[Literal["light", "regular", "medium", "bold"]], - Literal["light", "regular", "medium", "bold"], - ] - ] = None, - align: Optional[ - Union[ - Var[Literal["left", "center", "right"]], - Literal["left", "center", "right"], - ] - ] = None, - trim: Optional[ - Union[ - Var[Literal["normal", "start", "end", "both"]], - Literal["normal", "start", "end", "both"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -217,14 +216,13 @@ class Text(el.Span, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. as_: Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild) size: Text size: "1" - "9" weight: Thickness of text: "light" | "regular" | "medium" | "bold" align: Alignment of text in element: "left" | "center" | "right" trim: Removes the leading trim space: "normal" | "start" | "end" | "both" + color_scheme: Overrides the accent color inherited from the Theme. high_contrast: Whether to render the text with higher contrast color access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -261,69 +259,6 @@ class Em(el.Em, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -424,8 +359,6 @@ class Em(el.Em, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -461,69 +394,6 @@ class Kbd(el.Kbd, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, size: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -630,8 +500,6 @@ class Kbd(el.Kbd, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. size: Text size: "1" - "9" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -668,69 +536,6 @@ class Quote(el.Q, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, cite: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -832,8 +637,6 @@ class Quote(el.Q, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. cite: Specifies the source URL of the quote. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -870,69 +673,6 @@ class Strong(el.Strong, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[Union[Var[str], str]] = None, - color_scheme: Optional[ - Union[ - Var[ - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ] - ], - Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", - ], - ] - ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -1033,8 +773,6 @@ class Strong(el.Strong, RadixThemesComponent): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -1073,7 +811,37 @@ class TextNamespace(SimpleNamespace): @staticmethod def __call__( *children, - color: Optional[Union[Var[str], str]] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + as_: Optional[ + Union[ + Var[Literal["p", "label", "div", "span"]], + Literal["p", "label", "div", "span"], + ] + ] = None, + size: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, + align: Optional[ + Union[ + Var[Literal["left", "center", "right"]], + Literal["left", "center", "right"], + ] + ] = None, + trim: Optional[ + Union[ + Var[Literal["normal", "start", "end", "both"]], + Literal["normal", "start", "end", "both"], + ] + ] = None, color_scheme: Optional[ Union[ Var[ @@ -1136,37 +904,6 @@ class TextNamespace(SimpleNamespace): ], ] ] = None, - as_child: Optional[Union[Var[bool], bool]] = None, - as_: Optional[ - Union[ - Var[Literal["p", "label", "div", "span"]], - Literal["p", "label", "div", "span"], - ] - ] = None, - size: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - weight: Optional[ - Union[ - Var[Literal["light", "regular", "medium", "bold"]], - Literal["light", "regular", "medium", "bold"], - ] - ] = None, - align: Optional[ - Union[ - Var[Literal["left", "center", "right"]], - Literal["left", "center", "right"], - ] - ] = None, - trim: Optional[ - Union[ - Var[Literal["normal", "start", "end", "both"]], - Literal["normal", "start", "end", "both"], - ] - ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -1268,14 +1005,13 @@ class TextNamespace(SimpleNamespace): Args: *children: Child components. - color: map to CSS default color property. - color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. as_: Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild) size: Text size: "1" - "9" weight: Thickness of text: "light" | "regular" | "medium" | "bold" align: Alignment of text in element: "left" | "center" | "right" trim: Removes the leading trim space: "normal" | "start" | "end" | "both" + color_scheme: Overrides the accent color inherited from the Theme. high_contrast: Whether to render the text with higher contrast color access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. From eea3b00deb07a9a3bf7e4a9642c62b77e2896ca9 Mon Sep 17 00:00:00 2001 From: invrainbow <77120437+invrainbow@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:08:30 -0800 Subject: [PATCH 39/68] Fix AccordionItem interactive docs not showing up (#2600) --- .../components/radix/primitives/accordion.py | 79 ++++++++++--------- .../components/radix/primitives/accordion.pyi | 23 +++--- 2 files changed, 50 insertions(+), 52 deletions(-) diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index e927c99e1..71add6466 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -3,7 +3,7 @@ from __future__ import annotations from types import SimpleNamespace -from typing import Any, Dict, List, Literal +from typing import Any, Dict, List, Literal, Optional from reflex.components.component import Component from reflex.components.core.match import Match @@ -468,6 +468,44 @@ class AccordionItem(AccordionComponent): } ) + @classmethod + def create( + cls, + *children, + header: Optional[Component | Var] = None, + content: Optional[Component | Var] = None, + **props, + ) -> Component: + """Create an accordion item. + + Args: + header: The header of the accordion item. + content: The content of the accordion item. + *children: The list of children to use if header and content are not provided. + **props: Additional properties to apply to the accordion item. + + Returns: + The accordion item. + """ + # The item requires a value to toggle (use the header as the default value). + value = props.pop("value", header if isinstance(header, Var) else str(header)) + + if (header is not None) and (content is not None): + children = [ + AccordionHeader.create( + AccordionTrigger.create( + header, + Icon.create(tag="chevron_down", class_name="AccordionChevron"), + class_name="AccordionTrigger", + ), + ), + AccordionContent.create(content, class_name="AccordionContent"), + ] + + return super().create( + *children, value=value, **props, class_name="AccordionItem" + ) + class AccordionHeader(AccordionComponent): """An accordion component.""" @@ -540,49 +578,12 @@ to { """ -def accordion_item( - header: Component | Var, content: Component | Var, **props -) -> Component: - """Create an accordion item. - - Args: - header: The header of the accordion item. - content: The content of the accordion item. - **props: Additional properties to apply to the accordion item. - - Returns: - The accordion item. - """ - # The item requires a value to toggle (use the header as the default value). - value = props.pop("value", header if isinstance(header, Var) else str(header)) - - return AccordionItem.create( - AccordionHeader.create( - AccordionTrigger.create( - header, - Icon.create( - tag="chevron_down", - class_name="AccordionChevron", - ), - class_name="AccordionTrigger", - ), - ), - AccordionContent.create( - content, - class_name="AccordionContent", - ), - value=value, - **props, - class_name="AccordionItem", - ) - - class Accordion(SimpleNamespace): """Accordion component.""" content = staticmethod(AccordionContent.create) header = staticmethod(AccordionHeader.create) - item = staticmethod(accordion_item) + item = staticmethod(AccordionItem.create) root = staticmethod(AccordionRoot.create) trigger = staticmethod(AccordionTrigger.create) diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index c415431dc..2065ea319 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -8,7 +8,7 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from types import SimpleNamespace -from typing import Any, Dict, List, Literal +from typing import Any, Dict, List, Literal, Optional from reflex.components.component import Component from reflex.components.core.match import Match from reflex.components.lucide.icon import Icon @@ -303,6 +303,8 @@ class AccordionItem(AccordionComponent): def create( # type: ignore cls, *children, + header: Optional[Component | Var] = None, + content: Optional[Component | Var] = None, value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, as_child: Optional[Union[Var[bool], bool]] = None, @@ -359,10 +361,12 @@ class AccordionItem(AccordionComponent): ] = None, **props ) -> "AccordionItem": - """Create the component. + """Create an accordion item. Args: - *children: The children of the component. + header: The header of the accordion item. + content: The content of the accordion item. + *children: The list of children to use if header and content are not provided. value: A unique identifier for the item. disabled: When true, prevents the user from interacting with the item. as_child: Change the default rendered element for the one passed as a child. @@ -372,13 +376,10 @@ class AccordionItem(AccordionComponent): class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded custom_attrs: custom attribute - **props: The props of the component. + **props: Additional properties to apply to the accordion item. Returns: - The component. - - Raises: - TypeError: If an invalid child is passed. + The accordion item. """ ... @@ -625,14 +626,10 @@ class AccordionContent(AccordionComponent): """ ... -def accordion_item( - header: Component | Var, content: Component | Var, **props -) -> Component: ... - class Accordion(SimpleNamespace): content = staticmethod(AccordionContent.create) header = staticmethod(AccordionHeader.create) - item = staticmethod(accordion_item) + item = staticmethod(AccordionItem.create) root = staticmethod(AccordionRoot.create) trigger = staticmethod(AccordionTrigger.create) From 5e9b472d1b86c01e993eb1a16f9bb114004a4c93 Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Tue, 13 Feb 2024 22:22:22 +0000 Subject: [PATCH 40/68] [REF-1919] Valid Children/parents to allow Foreach,Cond,Match and Fragment (#2591) --- reflex/components/component.py | 54 ++++--- tests/components/test_component.py | 232 +++++++++++++++++++++++++++++ 2 files changed, 267 insertions(+), 19 deletions(-) diff --git a/reflex/components/component.py b/reflex/components/component.py index 889aa8d59..2eef065bd 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -668,20 +668,43 @@ class Component(BaseComponent, ABC): children: The children of the component. """ - skip_parentable = all(child._valid_parents == [] for child in children) - if not self._invalid_children and not self._valid_children and skip_parentable: + no_valid_parents_defined = all(child._valid_parents == [] for child in children) + if ( + not self._invalid_children + and not self._valid_children + and no_valid_parents_defined + ): return comp_name = type(self).__name__ + allowed_components = ["Fragment", "Foreach", "Cond", "Match"] - def validate_invalid_child(child_name): - if child_name in self._invalid_children: + def validate_child(child): + child_name = type(child).__name__ + + # Iterate through the immediate children of fragment + if child_name == "Fragment": + for c in child.children: + validate_child(c) + + if child_name == "Cond": + validate_child(child.comp1) + validate_child(child.comp2) + + if child_name == "Match": + for cases in child.match_cases: + validate_child(cases[-1]) + validate_child(child.default) + + if self._invalid_children and child_name in self._invalid_children: raise ValueError( f"The component `{comp_name}` cannot have `{child_name}` as a child component" ) - def validate_valid_child(child_name): - if child_name not in self._valid_children: + if self._valid_children and child_name not in [ + *self._valid_children, + *allowed_components, + ]: valid_child_list = ", ".join( [f"`{v_child}`" for v_child in self._valid_children] ) @@ -689,26 +712,19 @@ class Component(BaseComponent, ABC): f"The component `{comp_name}` only allows the components: {valid_child_list} as children. Got `{child_name}` instead." ) - def validate_vaild_parent(child_name, valid_parents): - if comp_name not in valid_parents: + if child._valid_parents and comp_name not in [ + *child._valid_parents, + *allowed_components, + ]: valid_parent_list = ", ".join( - [f"`{v_parent}`" for v_parent in valid_parents] + [f"`{v_parent}`" for v_parent in child._valid_parents] ) raise ValueError( f"The component `{child_name}` can only be a child of the components: {valid_parent_list}. Got `{comp_name}` instead." ) for child in children: - name = type(child).__name__ - - if self._invalid_children: - validate_invalid_child(name) - - if self._valid_children: - validate_valid_child(name) - - if child._valid_parents: - validate_vaild_parent(name, child._valid_parents) + validate_child(child) @staticmethod def _get_vars_from_event_triggers( diff --git a/tests/components/test_component.py b/tests/components/test_component.py index 3c0c09d7e..63ec6b31e 100644 --- a/tests/components/test_component.py +++ b/tests/components/test_component.py @@ -948,3 +948,235 @@ def test_instantiate_all_components(): component = getattr(rx, component_name) if isinstance(component, type) and issubclass(component, Component): component.create() + + +class InvalidParentComponent(Component): + """Invalid Parent Component.""" + + ... + + +class ValidComponent1(Component): + """Test valid component.""" + + _valid_children = ["ValidComponent2"] + + +class ValidComponent2(Component): + """Test valid component.""" + + ... + + +class ValidComponent3(Component): + """Test valid component.""" + + _valid_parents = ["ValidComponent2"] + + +class ValidComponent4(Component): + """Test valid component.""" + + _invalid_children = ["InvalidComponent"] + + +class InvalidComponent(Component): + """Test invalid component.""" + + ... + + +valid_component1 = ValidComponent1.create +valid_component2 = ValidComponent2.create +invalid_component = InvalidComponent.create +valid_component3 = ValidComponent3.create +invalid_parent = InvalidParentComponent.create +valid_component4 = ValidComponent4.create + + +def test_validate_valid_children(): + valid_component1(valid_component2()) + valid_component1( + rx.fragment(valid_component2()), + ) + valid_component1( + rx.fragment( + rx.fragment( + rx.fragment(valid_component2()), + ), + ), + ) + + valid_component1( + rx.cond( # type: ignore + True, + rx.fragment(valid_component2()), + rx.fragment( + rx.foreach(Var.create([1, 2, 3]), lambda x: valid_component2(x)) # type: ignore + ), + ) + ) + + valid_component1( + rx.cond( + True, + valid_component2(), + rx.fragment( + rx.match( + "condition", + ("first", valid_component2()), + rx.fragment(valid_component2(rx.text("default"))), + ) + ), + ) + ) + + valid_component1( + rx.match( + "condition", + ("first", valid_component2()), + ("second", "third", rx.fragment(valid_component2())), + ( + "fourth", + rx.cond(True, valid_component2(), rx.fragment(valid_component2())), + ), + ( + "fifth", + rx.match( + "nested_condition", + ("nested_first", valid_component2()), + rx.fragment(valid_component2()), + ), + valid_component2(), + ), + ) + ) + + +def test_validate_valid_parents(): + valid_component2(valid_component3()) + valid_component2( + rx.fragment(valid_component3()), + ) + valid_component1( + rx.fragment( + valid_component2( + rx.fragment(valid_component3()), + ), + ), + ) + + valid_component2( + rx.cond( # type: ignore + True, + rx.fragment(valid_component3()), + rx.fragment( + rx.foreach( + Var.create([1, 2, 3]), # type: ignore + lambda x: valid_component2(valid_component3(x)), + ) + ), + ) + ) + + valid_component2( + rx.cond( + True, + valid_component3(), + rx.fragment( + rx.match( + "condition", + ("first", valid_component3()), + rx.fragment(valid_component3(rx.text("default"))), + ) + ), + ) + ) + + valid_component2( + rx.match( + "condition", + ("first", valid_component3()), + ("second", "third", rx.fragment(valid_component3())), + ( + "fourth", + rx.cond(True, valid_component3(), rx.fragment(valid_component3())), + ), + ( + "fifth", + rx.match( + "nested_condition", + ("nested_first", valid_component3()), + rx.fragment(valid_component3()), + ), + valid_component3(), + ), + ) + ) + + +def test_validate_invalid_children(): + with pytest.raises(ValueError): + valid_component4(invalid_component()) + + with pytest.raises(ValueError): + valid_component4( + rx.fragment(invalid_component()), + ) + + with pytest.raises(ValueError): + valid_component2( + rx.fragment( + valid_component4( + rx.fragment(invalid_component()), + ), + ), + ) + + with pytest.raises(ValueError): + valid_component4( + rx.cond( # type: ignore + True, + rx.fragment(invalid_component()), + rx.fragment( + rx.foreach(Var.create([1, 2, 3]), lambda x: invalid_component(x)) # type: ignore + ), + ) + ) + + with pytest.raises(ValueError): + valid_component4( + rx.cond( + True, + invalid_component(), + rx.fragment( + rx.match( + "condition", + ("first", invalid_component()), + rx.fragment(invalid_component(rx.text("default"))), + ) + ), + ) + ) + + with pytest.raises(ValueError): + valid_component4( + rx.match( + "condition", + ("first", invalid_component()), + ("second", "third", rx.fragment(invalid_component())), + ( + "fourth", + rx.cond(True, invalid_component(), rx.fragment(valid_component2())), + ), + ( + "fifth", + rx.match( + "nested_condition", + ("nested_first", invalid_component()), + rx.fragment(invalid_component()), + ), + invalid_component(), + ), + ) + ) From fccb73ee70105efa056e878091cdd0dfb8fe31bc Mon Sep 17 00:00:00 2001 From: invrainbow <77120437+invrainbow@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:25:31 -0800 Subject: [PATCH 41/68] Fix rx.progress to support `max` prop (#2601) --- reflex/components/radix/primitives/progress.py | 9 +++++++-- reflex/components/radix/primitives/progress.pyi | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/reflex/components/radix/primitives/progress.py b/reflex/components/radix/primitives/progress.py index 5854c9e54..8679a55f0 100644 --- a/reflex/components/radix/primitives/progress.py +++ b/reflex/components/radix/primitives/progress.py @@ -55,6 +55,9 @@ class ProgressIndicator(ProgressComponent): # The current progress value. value: Var[Optional[int]] + # The maximum progress value. + max: Var[Optional[int]] + def _apply_theme(self, theme: Component): self.style = Style( { @@ -65,7 +68,7 @@ class ProgressIndicator(ProgressComponent): "&[data_state='loading']": { "transition": f"transform {DEFAULT_ANIMATION_DURATION}ms linear", }, - "transform": f"translateX(calc(-100% + {self.value}%))", # type: ignore + "transform": f"translateX(calc(-100% + ({self.value} / {self.max} * 100%)))", # type: ignore "boxShadow": "inset 0 0 0 1px var(--gray-a5)", } ) @@ -92,7 +95,9 @@ class Progress(SimpleNamespace): style.update({"width": width}) return ProgressRoot.create( - ProgressIndicator.create(value=props.get("value")), + ProgressIndicator.create( + value=props.get("value"), max=props.get("max", 100) + ), **props, ) diff --git a/reflex/components/radix/primitives/progress.pyi b/reflex/components/radix/primitives/progress.pyi index 70e19be44..0fadf594f 100644 --- a/reflex/components/radix/primitives/progress.pyi +++ b/reflex/components/radix/primitives/progress.pyi @@ -188,6 +188,7 @@ class ProgressIndicator(ProgressComponent): cls, *children, value: Optional[Union[Var[Optional[int]], Optional[int]]] = None, + max: Optional[Union[Var[Optional[int]], Optional[int]]] = None, as_child: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -247,6 +248,7 @@ class ProgressIndicator(ProgressComponent): Args: *children: The children of the component. value: The current progress value. + max: The maximum progress value. as_child: Change the default rendered element for the one passed as a child. style: The style of the component. key: A unique key for the component. From e729a315f8d5d4b970bdf89180fc56578fa694ce Mon Sep 17 00:00:00 2001 From: invrainbow <77120437+invrainbow@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:32:44 -0800 Subject: [PATCH 42/68] Fix fstrings being escaped improperly (#2571) --- reflex/utils/format.py | 65 +++++++++++++++++++++--- reflex/vars.py | 76 +++++++++++++++++++++------- reflex/vars.pyi | 3 ++ tests/components/layout/test_cond.py | 6 +++ tests/components/test_component.py | 5 +- tests/test_var.py | 2 +- 6 files changed, 128 insertions(+), 29 deletions(-) diff --git a/reflex/utils/format.py b/reflex/utils/format.py index aaa371c2a..53b55d0eb 100644 --- a/reflex/utils/format.py +++ b/reflex/utils/format.py @@ -188,6 +188,35 @@ def to_kebab_case(text: str) -> str: return to_snake_case(text).replace("_", "-") +def _escape_js_string(string: str) -> str: + """Escape the string for use as a JS string literal. + + Args: + string: The string to escape. + + Returns: + The escaped string. + """ + # Escape backticks. + string = string.replace(r"\`", "`") + string = string.replace("`", r"\`") + return string + + +def _wrap_js_string(string: str) -> str: + """Wrap string so it looks like {`string`}. + + Args: + string: The string to wrap. + + Returns: + The wrapped string. + """ + string = wrap(string, "`") + string = wrap(string, "{") + return string + + def format_string(string: str) -> str: """Format the given string as a JS string literal.. @@ -197,15 +226,33 @@ def format_string(string: str) -> str: Returns: The formatted string. """ - # Escape backticks. - string = string.replace(r"\`", "`") - string = string.replace("`", r"\`") + return _wrap_js_string(_escape_js_string(string)) - # Wrap the string so it looks like {`string`}. - string = wrap(string, "`") - string = wrap(string, "{") - return string +def format_f_string_prop(prop: BaseVar) -> str: + """Format the string in a given prop as an f-string. + + Args: + prop: The prop to format. + + Returns: + The formatted string. + """ + s = prop._var_full_name + var_data = prop._var_data + interps = var_data.interpolations if var_data else [] + parts: List[str] = [] + + if interps: + for i, (start, end) in enumerate(interps): + prev_end = interps[i - 1][1] if i > 0 else 0 + parts.append(_escape_js_string(s[prev_end:start])) + parts.append(s[start:end]) + parts.append(_escape_js_string(s[interps[-1][1] :])) + else: + parts.append(_escape_js_string(s)) + + return _wrap_js_string("".join(parts)) def format_var(var: Var) -> str: @@ -345,7 +392,9 @@ def format_prop( if isinstance(prop, Var): if not prop._var_is_local or prop._var_is_string: return str(prop) - if types._issubclass(prop._var_type, str): + if isinstance(prop, BaseVar) and types._issubclass(prop._var_type, str): + if prop._var_data and prop._var_data.interpolations: + return format_f_string_prop(prop) return format_string(prop._var_full_name) prop = prop._var_full_name diff --git a/reflex/vars.py b/reflex/vars.py index 4e605f9d6..83cdbcc7e 100644 --- a/reflex/vars.py +++ b/reflex/vars.py @@ -31,8 +31,6 @@ from typing import ( get_type_hints, ) -import pydantic - from reflex import constants from reflex.base import Base from reflex.utils import console, format, imports, serializers, types @@ -122,6 +120,11 @@ class VarData(Base): # Hooks that need to be present in the component to render this var hooks: Set[str] = set() + # Positions of interpolated strings. This is used by the decoder to figure + # out where the interpolations are and only escape the non-interpolated + # segments. + interpolations: List[Tuple[int, int]] = [] + @classmethod def merge(cls, *others: VarData | None) -> VarData | None: """Merge multiple var data objects. @@ -135,17 +138,21 @@ class VarData(Base): state = "" _imports = {} hooks = set() + interpolations = [] for var_data in others: if var_data is None: continue state = state or var_data.state _imports = imports.merge_imports(_imports, var_data.imports) hooks.update(var_data.hooks) + interpolations += var_data.interpolations + return ( cls( state=state, imports=_imports, hooks=hooks, + interpolations=interpolations, ) or None ) @@ -156,7 +163,7 @@ class VarData(Base): Returns: True if any field is set to a non-default value. """ - return bool(self.state or self.imports or self.hooks) + return bool(self.state or self.imports or self.hooks or self.interpolations) def __eq__(self, other: Any) -> bool: """Check if two var data objects are equal. @@ -169,6 +176,9 @@ class VarData(Base): """ if not isinstance(other, VarData): return False + + # Don't compare interpolations - that's added in by the decoder, and + # not part of the vardata itself. return ( self.state == other.state and self.hooks == other.hooks @@ -184,6 +194,7 @@ class VarData(Base): """ return { "state": self.state, + "interpolations": list(self.interpolations), "imports": { lib: [import_var.dict() for import_var in import_vars] for lib, import_vars in self.imports.items() @@ -202,10 +213,18 @@ def _encode_var(value: Var) -> str: The encoded var. """ if value._var_data: + from reflex.utils.serializers import serialize + + final_value = str(value) + data = value._var_data.dict() + data["string_length"] = len(final_value) + data_json = value._var_data.__config__.json_dumps(data, default=serialize) + return ( - f"{constants.REFLEX_VAR_OPENING_TAG}{value._var_data.json()}{constants.REFLEX_VAR_CLOSING_TAG}" - + str(value) + f"{constants.REFLEX_VAR_OPENING_TAG}{data_json}{constants.REFLEX_VAR_CLOSING_TAG}" + + final_value ) + return str(value) @@ -220,21 +239,40 @@ def _decode_var(value: str) -> tuple[VarData | None, str]: """ var_datas = [] if isinstance(value, str): - # Extract the state name from a formatted var - while m := re.match( - pattern=rf"(.*){constants.REFLEX_VAR_OPENING_TAG}(.*){constants.REFLEX_VAR_CLOSING_TAG}(.*)", - string=value, - flags=re.DOTALL, # Ensure . matches newline characters. - ): - value = m.group(1) + m.group(3) + offset = 0 + + # Initialize some methods for reading json. + var_data_config = VarData().__config__ + + def json_loads(s): try: - var_datas.append(VarData.parse_raw(m.group(2))) - except pydantic.ValidationError: - # If the VarData is invalid, it was probably json-encoded twice... - var_datas.append(VarData.parse_raw(json.loads(f'"{m.group(2)}"'))) - if var_datas: - return VarData.merge(*var_datas), value - return None, value + return var_data_config.json_loads(s) + except json.decoder.JSONDecodeError: + return var_data_config.json_loads(var_data_config.json_loads(f'"{s}"')) + + # Compile regex for finding reflex var tags. + pattern_re = rf"{constants.REFLEX_VAR_OPENING_TAG}(.*?){constants.REFLEX_VAR_CLOSING_TAG}" + pattern = re.compile(pattern_re, flags=re.DOTALL) + + # Find all tags. + while m := pattern.search(value): + start, end = m.span() + value = value[:start] + value[end:] + + # Read the JSON, pull out the string length, parse the rest as VarData. + data = json_loads(m.group(1)) + string_length = data.pop("string_length", None) + var_data = VarData.parse_obj(data) + + # Use string length to compute positions of interpolations. + if string_length is not None: + realstart = start + offset + var_data.interpolations = [(realstart, realstart + string_length)] + + var_datas.append(var_data) + offset += end - start + + return VarData.merge(*var_datas) if var_datas else None, value def _extract_var_data(value: Iterable) -> list[VarData | None]: diff --git a/reflex/vars.pyi b/reflex/vars.pyi index fc5d7e100..80f4ad25f 100644 --- a/reflex/vars.pyi +++ b/reflex/vars.pyi @@ -1,4 +1,5 @@ """ Generated with stubgen from mypy, then manually edited, do not regen.""" +from __future__ import annotations from dataclasses import dataclass from _typeshed import Incomplete @@ -17,6 +18,7 @@ from typing import ( List, Optional, Set, + Tuple, Type, Union, overload, @@ -34,6 +36,7 @@ class VarData(Base): state: str imports: dict[str, set[ImportVar]] hooks: set[str] + interpolations: List[Tuple[int, int]] @classmethod def merge(cls, *others: VarData | None) -> VarData | None: ... diff --git a/tests/components/layout/test_cond.py b/tests/components/layout/test_cond.py index d60d65085..56a3e156d 100644 --- a/tests/components/layout/test_cond.py +++ b/tests/components/layout/test_cond.py @@ -27,6 +27,12 @@ def cond_state(request): return CondState +def test_f_string_cond_interpolation(): + # make sure backticks inside interpolation don't get escaped + var = Var.create(f"x {cond(True, 'a', 'b')}") + assert str(var) == "x ${isTrue(true) ? `a` : `b`}" + + @pytest.mark.parametrize( "cond_state", [ diff --git a/tests/components/test_component.py b/tests/components/test_component.py index 63ec6b31e..04acfca4e 100644 --- a/tests/components/test_component.py +++ b/tests/components/test_component.py @@ -687,7 +687,10 @@ def test_stateful_banner(): TEST_VAR = Var.create_safe("test")._replace( merge_var_data=VarData( - hooks={"useTest"}, imports={"test": {ImportVar(tag="test")}}, state="Test" + hooks={"useTest"}, + imports={"test": {ImportVar(tag="test")}}, + state="Test", + interpolations=[], ) ) FORMATTED_TEST_VAR = Var.create(f"foo{TEST_VAR}bar") diff --git a/tests/test_var.py b/tests/test_var.py index 3f2f9c4fa..3d7d23d89 100644 --- a/tests/test_var.py +++ b/tests/test_var.py @@ -718,7 +718,7 @@ def test_computed_var_with_annotation_error(request, fixture, full_name): (f"{BaseVar(_var_name='var', _var_type=str)}", "${var}"), ( f"testing f-string with {BaseVar(_var_name='myvar', _var_type=int)._var_set_state('state')}", - 'testing f-string with ${"state": "state", "imports": {"/utils/context": [{"tag": "StateContexts", "is_default": false, "alias": null, "install": true, "render": true}], "react": [{"tag": "useContext", "is_default": false, "alias": null, "install": true, "render": true}]}, "hooks": ["const state = useContext(StateContexts.state)"]}{state.myvar}', + 'testing f-string with ${"state": "state", "interpolations": [], "imports": {"/utils/context": [{"tag": "StateContexts", "is_default": false, "alias": null, "install": true, "render": true}], "react": [{"tag": "useContext", "is_default": false, "alias": null, "install": true, "render": true}]}, "hooks": ["const state = useContext(StateContexts.state)"], "string_length": 13}{state.myvar}', ), ( f"testing local f-string {BaseVar(_var_name='x', _var_is_local=True, _var_type=str)}", From eadbf1d3db4c4b63f950f6e2da48300db365c74d Mon Sep 17 00:00:00 2001 From: Alek Petuskey Date: Tue, 13 Feb 2024 22:10:18 -0800 Subject: [PATCH 43/68] Fix comments on drawer (#2604) * Fix comments on drawer * Fix precommit * Fix pyi * Fix table invalid children --------- Co-authored-by: Alek Petuskey --- reflex/components/radix/primitives/drawer.py | 26 +++++++------------ reflex/components/radix/primitives/drawer.pyi | 24 ++++++++--------- 2 files changed, 22 insertions(+), 28 deletions(-) diff --git a/reflex/components/radix/primitives/drawer.py b/reflex/components/radix/primitives/drawer.py index 8e091d4b7..1ebde5894 100644 --- a/reflex/components/radix/primitives/drawer.py +++ b/reflex/components/radix/primitives/drawer.py @@ -6,12 +6,12 @@ from __future__ import annotations from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union -from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName +from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.constants import EventTriggers from reflex.vars import Var -class DrawerComponent(RadixPrimitiveComponentWithClassName): +class DrawerComponent(RadixPrimitiveComponent): """A Drawer component.""" library = "vaul" @@ -37,35 +37,28 @@ class DrawerRoot(DrawerComponent): # Whether the drawer is open or not. open: Var[bool] - # Enable background scaling, - # it requires an element with [vaul-drawer-wrapper] data attribute to scale its background. + # Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background. should_scale_background: Var[bool] # Number between 0 and 1 that determines when the drawer should be closed. close_threshold: Var[float] - # 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]]] - # Index of a snapPoint from which the overlay fade should be applied. - # Defaults to the last snap point. - # TODO: will it accept -1 then? + # Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point. fade_from_index: Var[int] # Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms scroll_lock_timeout: Var[int] - # When `False`, it allows to interact with elements outside of the drawer without closing it. - # Defaults to `True`. + # When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`. modal: Var[bool] # Direction of the drawer. Defaults to `"bottom"` direction: Var[LiteralDirectionType] - # When `True`, it prevents scroll restoration - # when the drawer is closed after a navigation happens inside of it. - # Defaults to `True`. + # When `True`, it prevents scroll restoration. Defaults to `True`. preventScrollRestoration: Var[bool] def get_event_triggers(self) -> Dict[str, Any]: @@ -87,7 +80,8 @@ class DrawerTrigger(DrawerComponent): alias = "Vaul" + tag - as_child: Var[bool] + # Defaults to true, if the first child acts as the trigger. + as_child: Var[bool] = True # type: ignore class DrawerPortal(DrawerComponent): @@ -170,7 +164,7 @@ class DrawerOverlay(DrawerComponent): "bottom": "0", "top": "0", "z_index": 50, - "background": "rgba(0, 0, 0, 0.8)", + "background": "rgba(0, 0, 0, 0.5)", } style = self.style or {} base_style.update(style) diff --git a/reflex/components/radix/primitives/drawer.pyi b/reflex/components/radix/primitives/drawer.pyi index 352460f87..8671a48da 100644 --- a/reflex/components/radix/primitives/drawer.pyi +++ b/reflex/components/radix/primitives/drawer.pyi @@ -9,11 +9,11 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union -from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName +from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.constants import EventTriggers from reflex.vars import Var -class DrawerComponent(RadixPrimitiveComponentWithClassName): +class DrawerComponent(RadixPrimitiveComponent): @overload @classmethod def create( # type: ignore @@ -179,14 +179,14 @@ class DrawerRoot(DrawerComponent): Args: *children: The children of the component. open: Whether the drawer is open or not. - should_scale_background: Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background. + should_scale_background: Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background. close_threshold: Number between 0 and 1 that determines when the drawer should be closed. - snap_points: 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. - fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point. TODO: will it accept -1 then? + snap_points: 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. + fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point. scroll_lock_timeout: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms - modal: When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`. + modal: When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`. direction: Direction of the drawer. Defaults to `"bottom"` - preventScrollRestoration: When `True`, it prevents scroll restoration when the drawer is closed after a navigation happens inside of it. Defaults to `True`. + preventScrollRestoration: When `True`, it prevents scroll restoration. Defaults to `True`. as_child: Change the default rendered element for the one passed as a child. style: The style of the component. key: A unique key for the component. @@ -876,14 +876,14 @@ class Drawer(SimpleNamespace): Args: *children: The children of the component. open: Whether the drawer is open or not. - should_scale_background: Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background. + should_scale_background: Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background. close_threshold: Number between 0 and 1 that determines when the drawer should be closed. - snap_points: 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. - fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point. TODO: will it accept -1 then? + snap_points: 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. + fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point. scroll_lock_timeout: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms - modal: When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`. + modal: When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`. direction: Direction of the drawer. Defaults to `"bottom"` - preventScrollRestoration: When `True`, it prevents scroll restoration when the drawer is closed after a navigation happens inside of it. Defaults to `True`. + preventScrollRestoration: When `True`, it prevents scroll restoration. Defaults to `True`. as_child: Change the default rendered element for the one passed as a child. style: The style of the component. key: A unique key for the component. From 4232767b6980851328a2a17e4ffa71a11e5a77c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 14 Feb 2024 19:29:09 +0100 Subject: [PATCH 44/68] update docstrings for Dialog components (#2608) --- reflex/components/radix/themes/components/dialog.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/reflex/components/radix/themes/components/dialog.py b/reflex/components/radix/themes/components/dialog.py index 404733655..6001ab14e 100644 --- a/reflex/components/radix/themes/components/dialog.py +++ b/reflex/components/radix/themes/components/dialog.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" + from types import SimpleNamespace from typing import Any, Dict, Literal @@ -12,7 +13,7 @@ from ..base import ( class DialogRoot(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Root component for Dialog.""" tag = "Dialog.Root" @@ -32,19 +33,19 @@ class DialogRoot(RadixThemesComponent): class DialogTrigger(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Trigger an action or event, to open a Dialog modal.""" tag = "Dialog.Trigger" class DialogTitle(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Title component to display inside a Dialog modal.""" tag = "Dialog.Title" class DialogContent(el.Div, RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Content component to display inside a Dialog modal.""" tag = "Dialog.Content" @@ -68,13 +69,13 @@ class DialogContent(el.Div, RadixThemesComponent): class DialogDescription(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Description component to display inside a Dialog modal.""" tag = "Dialog.Description" class DialogClose(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Close button component to close an open Dialog modal.""" tag = "Dialog.Close" From 48d6717bb8975a791da854ee57b040f108a081dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 14 Feb 2024 19:30:26 +0100 Subject: [PATCH 45/68] add span in text namespace (#2607) --- .../radix/themes/typography/text.py | 8 + .../radix/themes/typography/text.pyi | 238 ++++++++++++++++++ 2 files changed, 246 insertions(+) diff --git a/reflex/components/radix/themes/typography/text.py b/reflex/components/radix/themes/typography/text.py index f2487f7db..44fd82149 100644 --- a/reflex/components/radix/themes/typography/text.py +++ b/reflex/components/radix/themes/typography/text.py @@ -2,6 +2,7 @@ https://www.radix-ui.com/themes/docs/theme/typography """ + from __future__ import annotations from types import SimpleNamespace @@ -54,6 +55,12 @@ class Text(el.Span, RadixThemesComponent): high_contrast: Var[bool] +class Span(Text): + """A variant of text rendering as element.""" + + as_: Var[LiteralType] = "span" # type: ignore + + class Em(el.Em, RadixThemesComponent): """Marks text to stress emphasis.""" @@ -89,6 +96,7 @@ class TextNamespace(SimpleNamespace): kbd = staticmethod(Kbd.create) quote = staticmethod(Quote.create) strong = staticmethod(Strong.create) + span = staticmethod(Span.create) text = TextNamespace() diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index d3e9eaf8a..23dd322ac 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -253,6 +253,243 @@ class Text(el.Span, RadixThemesComponent): """ ... +class Span(Text): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + as_: Optional[ + Union[ + Var[Literal["p", "label", "div", "span"]], + Literal["p", "label", "div", "span"], + ] + ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[ + Union[ + Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + ] + ] = None, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, + align: Optional[ + Union[ + Var[Literal["left", "center", "right"]], + Literal["left", "center", "right"], + ] + ] = None, + trim: Optional[ + Union[ + Var[Literal["normal", "start", "end", "both"]], + Literal["normal", "start", "end", "both"], + ] + ] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, + high_contrast: Optional[Union[Var[bool], bool]] = None, + access_key: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + auto_capitalize: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + content_editable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + context_menu: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + draggable: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + enter_key_hint: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + hidden: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + input_mode: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + item_prop: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + spell_check: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + tab_index: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + title: Optional[ + Union[Var[Union[str, int, bool]], Union[str, int, bool]] + ] = None, + style: Optional[Style] = None, + key: Optional[Any] = None, + id: Optional[Any] = None, + class_name: Optional[Any] = None, + autofocus: Optional[bool] = None, + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "Span": + """Create a new component instance. + + Will prepend "RadixThemes" to the component tag to avoid conflicts with + other UI libraries for common names, like Text and Button. + + Args: + *children: Child components. + as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. + as_: Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild) + size: Text size: "1" - "9" + weight: Thickness of text: "light" | "regular" | "medium" | "bold" + align: Alignment of text in element: "left" | "center" | "right" + trim: Removes the leading trim space: "normal" | "start" | "end" | "both" + color_scheme: Overrides the accent color inherited from the Theme. + high_contrast: Whether to render the text with higher contrast color + access_key: Provides a hint for generating a keyboard shortcut for the current element. + auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. + content_editable: Indicates whether the element's content is editable. + context_menu: Defines the ID of a element which will serve as the element's context menu. + dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) + draggable: Defines whether the element can be dragged. + enter_key_hint: Hints what media types the media element is able to play. + hidden: Defines whether the element is hidden. + input_mode: Defines the type of the element. + item_prop: Defines the name of the element for metadata purposes. + lang: Defines the language used in the element. + role: Defines the role of the element. + slot: Assigns a slot in a shadow DOM shadow tree to an element. + spell_check: Defines whether the element may be checked for spelling errors. + tab_index: Defines the position of the current element in the tabbing order. + title: Defines a tooltip for the element. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: Component properties. + + Returns: + A new component instance. + """ + ... + class Em(el.Em, RadixThemesComponent): @overload @classmethod @@ -807,6 +1044,7 @@ class TextNamespace(SimpleNamespace): kbd = staticmethod(Kbd.create) quote = staticmethod(Quote.create) strong = staticmethod(Strong.create) + span = staticmethod(Span.create) @staticmethod def __call__( From d8a9a0c95d972d6be4c507a8b4735c1eb2361b46 Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Wed, 14 Feb 2024 19:55:05 +0000 Subject: [PATCH 46/68] Accordion var data Attribute Error Fix (#2611) --- reflex/components/radix/primitives/accordion.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index 71add6466..4a8f801f1 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -344,7 +344,7 @@ class AccordionRoot(AccordionComponent): # The var_data associated with the component. _var_data: VarData = VarData() # type: ignore - _valid_children: List[str] = ["AccordionItem", "Foreach"] + _valid_children: List[str] = ["AccordionItem"] @classmethod def create(cls, *children, **props) -> Component: @@ -404,10 +404,13 @@ class AccordionRoot(AccordionComponent): ) # extract var_data from dynamic themes. - self._var_data = self._var_data.merge( # type: ignore - accordion_theme_trigger._var_data, - accordion_theme_content._var_data, - accordion_theme_root._var_data, + self._var_data = ( + self._var_data.merge( # type: ignore + accordion_theme_trigger._var_data, + accordion_theme_content._var_data, + accordion_theme_root._var_data, + ) + or self._var_data ) self._dynamic_themes = Var.create( # type: ignore From 74d90ffb656c887906d8cd89b2c71d9f27162519 Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Wed, 14 Feb 2024 21:36:48 +0000 Subject: [PATCH 47/68] Apply themes to drawer content (#2612) --- reflex/components/radix/primitives/drawer.py | 20 +++++++++++++++++++ reflex/components/radix/primitives/drawer.pyi | 16 ++++++++------- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/reflex/components/radix/primitives/drawer.py b/reflex/components/radix/primitives/drawer.py index 1ebde5894..b93567858 100644 --- a/reflex/components/radix/primitives/drawer.py +++ b/reflex/components/radix/primitives/drawer.py @@ -7,6 +7,7 @@ from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union from reflex.components.radix.primitives.base import RadixPrimitiveComponent +from reflex.components.radix.themes.base import Theme from reflex.constants import EventTriggers from reflex.vars import Var @@ -142,6 +143,25 @@ class DrawerContent(DrawerComponent): EventTriggers.ON_INTERACT_OUTSIDE: lambda e0: [e0.target.value], } + @classmethod + def create(cls, *children, **props): + """Create a Drawer Content. + We wrap the Drawer content in an `rx.theme` to make radix themes definitions available to + rendered div in the DOM. This is because Vaul Drawer injects the Drawer overlay content in a sibling + div to the root div rendered by radix which contains styling definitions. Wrapping in `rx.theme` + makes the styling available to the overlay. + + Args: + *children: The list of children to use. + **props: Additional properties to apply to the drawer content. + + Returns: + The drawer content. + """ + comp = super().create(*children, **props) + + return Theme.create(comp) + class DrawerOverlay(DrawerComponent): """A layer that covers the inert portion of the view when the dialog is open.""" diff --git a/reflex/components/radix/primitives/drawer.pyi b/reflex/components/radix/primitives/drawer.pyi index 8671a48da..cf19f4743 100644 --- a/reflex/components/radix/primitives/drawer.pyi +++ b/reflex/components/radix/primitives/drawer.pyi @@ -10,6 +10,7 @@ from reflex.style import Style from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union from reflex.components.radix.primitives.base import RadixPrimitiveComponent +from reflex.components.radix.themes.base import Theme from reflex.constants import EventTriggers from reflex.vars import Var @@ -442,10 +443,14 @@ class DrawerContent(DrawerComponent): ] = None, **props ) -> "DrawerContent": - """Create the component. + """Create a Drawer Content. + We wrap the Drawer content in an `rx.theme` to make radix themes definitions available to + rendered div in the DOM. This is because Vaul Drawer injects the Drawer overlay content in a sibling + div to the root div rendered by radix which contains styling definitions. Wrapping in `rx.theme` + makes the styling available to the overlay. Args: - *children: The children of the component. + *children: The list of children to use. as_child: Change the default rendered element for the one passed as a child. style: The style of the component. key: A unique key for the component. @@ -453,13 +458,10 @@ class DrawerContent(DrawerComponent): class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded custom_attrs: custom attribute - **props: The props of the component. + **props: Additional properties to apply to the drawer content. Returns: - The component. - - Raises: - TypeError: If an invalid child is passed. + The drawer content. """ ... From f12746d859e12e3ba3d38ab659b79f12a79a5087 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 14 Feb 2024 14:36:01 -0800 Subject: [PATCH 48/68] Inherit _rename_props from parent classes (#2613) Ensure that _rename_props from base classes add to the list of _rename_props in subclasses. Add a test case to validate this behavior. --- reflex/components/component.py | 8 ++++++++ tests/components/test_component.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/reflex/components/component.py b/reflex/components/component.py index 2eef065bd..43b66f52b 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -190,6 +190,14 @@ class Component(BaseComponent, ABC): field.required = False field.default = Var.create(field.default) + # Ensure renamed props from parent classes are applied to the subclass. + if cls._rename_props: + inherited_rename_props = {} + for parent in reversed(cls.mro()): + if issubclass(parent, Component) and parent._rename_props: + inherited_rename_props.update(parent._rename_props) + cls._rename_props = inherited_rename_props + def __init__(self, *args, **kwargs): """Initialize the component. diff --git a/tests/components/test_component.py b/tests/components/test_component.py index 04acfca4e..74656c5c1 100644 --- a/tests/components/test_component.py +++ b/tests/components/test_component.py @@ -1183,3 +1183,33 @@ def test_validate_invalid_children(): ), ) ) + + +def test_rename_props(): + """Test that _rename_props works and is inherited.""" + + class C1(Component): + tag = "C1" + + prop1: Var[str] + prop2: Var[str] + + _rename_props = {"prop1": "renamed_prop1", "prop2": "renamed_prop2"} + + class C2(C1): + tag = "C2" + + prop3: Var[str] + + _rename_props = {"prop2": "subclass_prop2", "prop3": "renamed_prop3"} + + c1 = C1.create(prop1="prop1_1", prop2="prop2_1") + rendered_c1 = c1.render() + assert "renamed_prop1={`prop1_1`}" in rendered_c1["props"] + assert "renamed_prop2={`prop2_1`}" in rendered_c1["props"] + + c2 = C2.create(prop1="prop1_2", prop2="prop2_2", prop3="prop3_2") + rendered_c2 = c2.render() + assert "renamed_prop1={`prop1_2`}" in rendered_c2["props"] + assert "subclass_prop2={`prop2_2`}" in rendered_c2["props"] + assert "renamed_prop3={`prop3_2`}" in rendered_c2["props"] From a91987c05151e4833064b0e05dd43d71c2e9a253 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 14 Feb 2024 15:51:38 -0800 Subject: [PATCH 49/68] Update docstrings for Radix components based on upstream descriptions (#2615) These are better than copying the generic description of Button in many many many components. --- .../radix/themes/components/callout.py | 8 ++++---- .../radix/themes/components/checkbox.py | 2 +- .../radix/themes/components/context_menu.py | 18 +++++++++--------- .../radix/themes/components/dropdown_menu.py | 2 +- .../radix/themes/components/hover_card.py | 8 ++++---- .../radix/themes/components/icon_button.py | 2 +- .../radix/themes/components/inset.py | 2 +- .../radix/themes/components/popover.py | 10 +++++----- .../radix/themes/components/separator.py | 2 +- .../radix/themes/components/slider.py | 2 +- .../components/radix/themes/components/tabs.py | 10 +++++----- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/reflex/components/radix/themes/components/callout.py b/reflex/components/radix/themes/components/callout.py index 6b0600d04..23f6de650 100644 --- a/reflex/components/radix/themes/components/callout.py +++ b/reflex/components/radix/themes/components/callout.py @@ -18,7 +18,7 @@ CalloutVariant = Literal["soft", "surface", "outline"] class CalloutRoot(el.Div, RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Groups Icon and Text parts of a Callout.""" tag = "Callout.Root" @@ -39,19 +39,19 @@ class CalloutRoot(el.Div, RadixThemesComponent): class CalloutIcon(el.Div, RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Provides width and height for the icon associated with the callout.""" tag = "Callout.Icon" class CalloutText(el.P, RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Renders the callout text. This component is based on the p element.""" tag = "Callout.Text" class Callout(CalloutRoot): - """High level wrapper for the Callout component.""" + """A short message to attract user's attention.""" # The text of the callout. text: Var[str] diff --git a/reflex/components/radix/themes/components/checkbox.py b/reflex/components/radix/themes/components/checkbox.py index c614cc19f..9d1682f68 100644 --- a/reflex/components/radix/themes/components/checkbox.py +++ b/reflex/components/radix/themes/components/checkbox.py @@ -19,7 +19,7 @@ LiteralCheckboxVariant = Literal["classic", "surface", "soft"] class Checkbox(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Selects a single value, typically for submission in a form.""" tag = "Checkbox" diff --git a/reflex/components/radix/themes/components/context_menu.py b/reflex/components/radix/themes/components/context_menu.py index 822cb123d..acb886ef0 100644 --- a/reflex/components/radix/themes/components/context_menu.py +++ b/reflex/components/radix/themes/components/context_menu.py @@ -12,7 +12,7 @@ from ..base import ( class ContextMenuRoot(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Menu representing a set of actions, displayed at the origin of a pointer right-click or long-press.""" tag = "ContextMenu.Root" @@ -34,7 +34,7 @@ class ContextMenuRoot(RadixThemesComponent): class ContextMenuTrigger(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Wraps the element that will open the context menu.""" tag = "ContextMenu.Trigger" @@ -47,7 +47,7 @@ class ContextMenuTrigger(RadixThemesComponent): class ContextMenuContent(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """The component that pops out when the context menu is open.""" tag = "ContextMenu.Content" @@ -86,13 +86,13 @@ class ContextMenuContent(RadixThemesComponent): class ContextMenuSub(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Contains all the parts of a submenu.""" tag = "ContextMenu.Sub" class ContextMenuSubTrigger(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """An item that opens a submenu.""" tag = "ContextMenu.SubTrigger" @@ -103,7 +103,7 @@ class ContextMenuSubTrigger(RadixThemesComponent): class ContextMenuSubContent(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """The component that pops out when a submenu is open.""" tag = "ContextMenu.SubContent" @@ -128,7 +128,7 @@ class ContextMenuSubContent(RadixThemesComponent): class ContextMenuItem(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """The component that contains the context menu items.""" tag = "ContextMenu.Item" @@ -142,13 +142,13 @@ class ContextMenuItem(RadixThemesComponent): class ContextMenuSeparator(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Separates items in a context menu.""" tag = "ContextMenu.Separator" class ContextMenu(SimpleNamespace): - """ContextMenu components namespace.""" + """Menu representing a set of actions, displayed at the origin of a pointer right-click or long-press.""" root = staticmethod(ContextMenuRoot.create) trigger = staticmethod(ContextMenuTrigger.create) diff --git a/reflex/components/radix/themes/components/dropdown_menu.py b/reflex/components/radix/themes/components/dropdown_menu.py index 8911c512a..b2516670a 100644 --- a/reflex/components/radix/themes/components/dropdown_menu.py +++ b/reflex/components/radix/themes/components/dropdown_menu.py @@ -141,7 +141,7 @@ class DropdownMenuContent(RadixThemesComponent): class DropdownMenuSubTrigger(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """An item that opens a submenu.""" tag = "DropdownMenu.SubTrigger" diff --git a/reflex/components/radix/themes/components/hover_card.py b/reflex/components/radix/themes/components/hover_card.py index fe8c2b85e..ab3fdcea3 100644 --- a/reflex/components/radix/themes/components/hover_card.py +++ b/reflex/components/radix/themes/components/hover_card.py @@ -12,7 +12,7 @@ from ..base import ( class HoverCardRoot(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """For sighted users to preview content available behind a link.""" tag = "HoverCard.Root" @@ -41,13 +41,13 @@ class HoverCardRoot(RadixThemesComponent): class HoverCardTrigger(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Wraps the link that will open the hover card.""" tag = "HoverCard.Trigger" class HoverCardContent(el.Div, RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Contains the content of the open hover card.""" tag = "HoverCard.Content" @@ -65,7 +65,7 @@ class HoverCardContent(el.Div, RadixThemesComponent): class HoverCard(SimpleNamespace): - """HoverCard components namespace.""" + """For sighted users to preview content available behind a link.""" root = __call__ = staticmethod(HoverCardRoot.create) trigger = staticmethod(HoverCardTrigger.create) diff --git a/reflex/components/radix/themes/components/icon_button.py b/reflex/components/radix/themes/components/icon_button.py index 687c72dfd..47dc1be86 100644 --- a/reflex/components/radix/themes/components/icon_button.py +++ b/reflex/components/radix/themes/components/icon_button.py @@ -20,7 +20,7 @@ LiteralButtonSize = Literal["1", "2", "3", "4"] class IconButton(el.Button, RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """A button designed specifically for usage with a single icon.""" tag = "IconButton" diff --git a/reflex/components/radix/themes/components/inset.py b/reflex/components/radix/themes/components/inset.py index 8c0fd1e5c..fcdafc6a0 100644 --- a/reflex/components/radix/themes/components/inset.py +++ b/reflex/components/radix/themes/components/inset.py @@ -12,7 +12,7 @@ LiteralButtonSize = Literal["1", "2", "3", "4"] class Inset(el.Div, RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Applies a negative margin to allow content to bleed into the surrounding container.""" tag = "Inset" diff --git a/reflex/components/radix/themes/components/popover.py b/reflex/components/radix/themes/components/popover.py index af259f0f6..5132e0aea 100644 --- a/reflex/components/radix/themes/components/popover.py +++ b/reflex/components/radix/themes/components/popover.py @@ -12,7 +12,7 @@ from ..base import ( class PopoverRoot(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Floating element for displaying rich content, triggered by a button.""" tag = "Popover.Root" @@ -35,13 +35,13 @@ class PopoverRoot(RadixThemesComponent): class PopoverTrigger(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Wraps the control that will open the popover.""" tag = "Popover.Trigger" class PopoverContent(el.Div, RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Contains content to be rendered in the open popover.""" tag = "Popover.Content" @@ -81,13 +81,13 @@ class PopoverContent(el.Div, RadixThemesComponent): class PopoverClose(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Wraps the control that will close the popover.""" tag = "Popover.Close" class Popover(SimpleNamespace): - """Popover components namespace.""" + """Floating element for displaying rich content, triggered by a button.""" root = staticmethod(PopoverRoot.create) trigger = staticmethod(PopoverTrigger.create) diff --git a/reflex/components/radix/themes/components/separator.py b/reflex/components/radix/themes/components/separator.py index d3938f302..92d2e8b85 100644 --- a/reflex/components/radix/themes/components/separator.py +++ b/reflex/components/radix/themes/components/separator.py @@ -12,7 +12,7 @@ LiteralSeperatorSize = Literal["1", "2", "3", "4"] class Separator(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Visually or semantically separates content.""" tag = "Separator" diff --git a/reflex/components/radix/themes/components/slider.py b/reflex/components/radix/themes/components/slider.py index 7f40c8241..6d8bd90f1 100644 --- a/reflex/components/radix/themes/components/slider.py +++ b/reflex/components/radix/themes/components/slider.py @@ -12,7 +12,7 @@ from ..base import ( class Slider(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Provides user selection from a range of values.""" tag = "Slider" diff --git a/reflex/components/radix/themes/components/tabs.py b/reflex/components/radix/themes/components/tabs.py index 7bc6cc359..18ce4726b 100644 --- a/reflex/components/radix/themes/components/tabs.py +++ b/reflex/components/radix/themes/components/tabs.py @@ -11,7 +11,7 @@ from ..base import ( class TabsRoot(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Set of content sections to be displayed one at a time.""" tag = "Tabs.Root" @@ -40,7 +40,7 @@ class TabsRoot(RadixThemesComponent): class TabsList(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Contains the triggers that sit alongside the active content.""" tag = "Tabs.List" @@ -49,7 +49,7 @@ class TabsList(RadixThemesComponent): class TabsTrigger(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """The button that activates its associated content.""" tag = "Tabs.Trigger" @@ -63,7 +63,7 @@ class TabsTrigger(RadixThemesComponent): class TabsContent(RadixThemesComponent): - """Trigger an action or event, such as submitting a form or displaying a dialog.""" + """Contains the content associated with each trigger.""" tag = "Tabs.Content" @@ -72,7 +72,7 @@ class TabsContent(RadixThemesComponent): class Tabs(SimpleNamespace): - """Tabs components namespace.""" + """Set of content sections to be displayed one at a time.""" root = __call__ = staticmethod(TabsRoot.create) list = staticmethod(TabsList.create) From 39486386f4333384cd7b4634183cd3a670c0f839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Thu, 15 Feb 2024 02:06:28 +0100 Subject: [PATCH 50/68] fix value/default_value in accordion (#2616) * fix value/default_value in accordion * fix for 3.8 compat * update comment --- .../components/radix/primitives/accordion.py | 18 +++++++++++------- .../components/radix/primitives/accordion.pyi | 12 ++++++++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index 4a8f801f1..1c473fa59 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -3,7 +3,7 @@ from __future__ import annotations from types import SimpleNamespace -from typing import Any, Dict, List, Literal, Optional +from typing import Any, Dict, List, Literal, Optional, Union from reflex.components.component import Component from reflex.components.core.match import Match @@ -16,7 +16,7 @@ from reflex.style import ( format_as_emotion, ) from reflex.utils import imports -from reflex.vars import BaseVar, Var, VarData +from reflex.vars import BaseVar, Var, VarData, get_unique_variable_name LiteralAccordionType = Literal["single", "multiple"] LiteralAccordionDir = Literal["ltr", "rtl"] @@ -315,10 +315,10 @@ class AccordionRoot(AccordionComponent): type_: Var[LiteralAccordionType] # The value of the item to expand. - value: Var[str] + value: Var[Optional[Union[str, List[str]]]] # The default value of the item to expand. - default_value: Var[str] + default_value: Var[Optional[Union[str, List[str]]]] # Whether or not the accordion is collapsible. collapsible: Var[bool] @@ -490,15 +490,19 @@ class AccordionItem(AccordionComponent): Returns: The accordion item. """ - # The item requires a value to toggle (use the header as the default value). - value = props.pop("value", header if isinstance(header, Var) else str(header)) + # The item requires a value to toggle (use a random unique name if not provided). + value = props.pop("value", get_unique_variable_name()) if (header is not None) and (content is not None): children = [ AccordionHeader.create( AccordionTrigger.create( header, - Icon.create(tag="chevron_down", class_name="AccordionChevron"), + Icon.create( + tag="chevron_down", + class_name="AccordionChevron", + display="inline-block", + ), class_name="AccordionTrigger", ), ), diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 2065ea319..5b71da123 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -8,7 +8,7 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from types import SimpleNamespace -from typing import Any, Dict, List, Literal, Optional +from typing import Any, Dict, List, Literal, Optional, Union from reflex.components.component import Component from reflex.components.core.match import Match from reflex.components.lucide.icon import Icon @@ -20,7 +20,7 @@ from reflex.style import ( format_as_emotion, ) from reflex.utils import imports -from reflex.vars import BaseVar, Var, VarData +from reflex.vars import BaseVar, Var, VarData, get_unique_variable_name LiteralAccordionType = Literal["single", "multiple"] LiteralAccordionDir = Literal["ltr", "rtl"] @@ -129,8 +129,12 @@ class AccordionRoot(AccordionComponent): type_: Optional[ Union[Var[Literal["single", "multiple"]], Literal["single", "multiple"]] ] = None, - value: Optional[Union[Var[str], str]] = None, - default_value: Optional[Union[Var[str], str]] = None, + value: Optional[ + Union[Var[Union[str, List[str]]], Union[str, List[str]]] + ] = None, + default_value: Optional[ + Union[Var[Union[str, List[str]]], Union[str, List[str]]] + ] = None, collapsible: Optional[Union[Var[bool], bool]] = None, disabled: Optional[Union[Var[bool], bool]] = None, dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None, From 80c62da0624a3e4752078347024468e6a2428ba1 Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Thu, 15 Feb 2024 13:43:16 +0700 Subject: [PATCH 51/68] Use align start by default stacks (#2619) --- reflex/components/chakra/forms/input.py | 2 +- .../components/radix/themes/layout/stack.py | 6 --- .../components/radix/themes/layout/stack.pyi | 54 ++++++++++++++----- 3 files changed, 43 insertions(+), 19 deletions(-) diff --git a/reflex/components/chakra/forms/input.py b/reflex/components/chakra/forms/input.py index 363878f62..4512a4f48 100644 --- a/reflex/components/chakra/forms/input.py +++ b/reflex/components/chakra/forms/input.py @@ -30,7 +30,7 @@ class Input(ChakraComponent): placeholder: Var[str] # The type of input. - type_: Var[LiteralInputType] = "text" # type: ignore + type_: Var[LiteralInputType] # The border color when the input is invalid. error_border_color: Var[str] diff --git a/reflex/components/radix/themes/layout/stack.py b/reflex/components/radix/themes/layout/stack.py index afec5a378..2718f038b 100644 --- a/reflex/components/radix/themes/layout/stack.py +++ b/reflex/components/radix/themes/layout/stack.py @@ -19,8 +19,6 @@ class Stack(Flex): def create( cls, *children, - justify: LiteralJustify = "start", - align: LiteralAlign = "center", spacing: LiteralSize = "2", **props, ) -> Component: @@ -28,8 +26,6 @@ class Stack(Flex): Args: *children: The children of the stack. - justify: The justify of the stack elements. - align: The alignment of the stack elements. spacing: The spacing between each stack item. **props: The properties of the stack. @@ -38,8 +34,6 @@ class Stack(Flex): """ return super().create( *children, - align=align, - justify=justify, spacing=spacing, **props, ) diff --git a/reflex/components/radix/themes/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi index 5b4239543..eb4523ad8 100644 --- a/reflex/components/radix/themes/layout/stack.pyi +++ b/reflex/components/radix/themes/layout/stack.pyi @@ -21,8 +21,6 @@ class Stack(Flex): def create( # type: ignore cls, *children, - justify: Optional[LiteralJustify] = "start", - align: Optional[LiteralAlign] = "center", spacing: Optional[LiteralSize] = "2", as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ @@ -31,6 +29,18 @@ class Stack(Flex): Literal["row", "column", "row-reverse", "column-reverse"], ] ] = None, + align: Optional[ + Union[ + Var[Literal["start", "center", "end", "baseline", "stretch"]], + Literal["start", "center", "end", "baseline", "stretch"], + ] + ] = None, + justify: Optional[ + Union[ + Var[Literal["start", "center", "end", "between"]], + Literal["start", "center", "end", "between"], + ] + ] = None, wrap: Optional[ Union[ Var[Literal["nowrap", "wrap", "wrap-reverse"]], @@ -134,11 +144,11 @@ class Stack(Flex): Args: *children: The children of the stack. - justify: The justify of the stack elements. - align: The alignment of the stack elements. spacing: The spacing between each stack item. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" + justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -175,8 +185,6 @@ class VStack(Stack): def create( # type: ignore cls, *children, - justify: Optional[LiteralJustify] = "start", - align: Optional[LiteralAlign] = "center", spacing: Optional[LiteralSize] = "2", as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ @@ -185,6 +193,18 @@ class VStack(Stack): Literal["row", "column", "row-reverse", "column-reverse"], ] ] = None, + align: Optional[ + Union[ + Var[Literal["start", "center", "end", "baseline", "stretch"]], + Literal["start", "center", "end", "baseline", "stretch"], + ] + ] = None, + justify: Optional[ + Union[ + Var[Literal["start", "center", "end", "between"]], + Literal["start", "center", "end", "between"], + ] + ] = None, wrap: Optional[ Union[ Var[Literal["nowrap", "wrap", "wrap-reverse"]], @@ -288,11 +308,11 @@ class VStack(Stack): Args: *children: The children of the stack. - justify: The justify of the stack elements. - align: The alignment of the stack elements. spacing: The spacing between each stack item. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" + justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. @@ -329,8 +349,6 @@ class HStack(Stack): def create( # type: ignore cls, *children, - justify: Optional[LiteralJustify] = "start", - align: Optional[LiteralAlign] = "center", spacing: Optional[LiteralSize] = "2", as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ @@ -339,6 +357,18 @@ class HStack(Stack): Literal["row", "column", "row-reverse", "column-reverse"], ] ] = None, + align: Optional[ + Union[ + Var[Literal["start", "center", "end", "baseline", "stretch"]], + Literal["start", "center", "end", "baseline", "stretch"], + ] + ] = None, + justify: Optional[ + Union[ + Var[Literal["start", "center", "end", "between"]], + Literal["start", "center", "end", "between"], + ] + ] = None, wrap: Optional[ Union[ Var[Literal["nowrap", "wrap", "wrap-reverse"]], @@ -442,11 +472,11 @@ class HStack(Stack): Args: *children: The children of the stack. - justify: The justify of the stack elements. - align: The alignment of the stack elements. spacing: The spacing between each stack item. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" + justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. From 791fcc9b41f6c1d6e050d493dcb9e6466e79499d Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Thu, 15 Feb 2024 19:08:19 +0000 Subject: [PATCH 52/68] Text `as_` prop literals update (#2620) Support more literal values --- .../radix/themes/typography/text.py | 21 ++- .../radix/themes/typography/text.pyi | 153 +++++++++++++++++- 2 files changed, 166 insertions(+), 8 deletions(-) diff --git a/reflex/components/radix/themes/typography/text.py b/reflex/components/radix/themes/typography/text.py index 44fd82149..7657301a2 100644 --- a/reflex/components/radix/themes/typography/text.py +++ b/reflex/components/radix/themes/typography/text.py @@ -22,7 +22,26 @@ from .base import ( LiteralTextWeight, ) -LiteralType = Literal["p", "label", "div", "span"] +LiteralType = Literal[ + "p", + "label", + "div", + "span", + "b", + "i", + "u", + "abbr", + "cite", + "del", + "em", + "ins", + "kbd", + "mark", + "s", + "samp", + "sub", + "sup", +] class Text(el.Span, RadixThemesComponent): diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index 23dd322ac..277ee1407 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -14,7 +14,26 @@ from reflex.vars import Var from ..base import LiteralAccentColor, RadixThemesComponent from .base import LiteralTextAlign, LiteralTextSize, LiteralTextTrim, LiteralTextWeight -LiteralType = Literal["p", "label", "div", "span"] +LiteralType = Literal[ + "p", + "label", + "div", + "span", + "b", + "i", + "u", + "abbr", + "cite", + "del", + "em", + "ins", + "kbd", + "mark", + "s", + "samp", + "sub", + "sup", +] class Text(el.Span, RadixThemesComponent): @overload @@ -25,8 +44,48 @@ class Text(el.Span, RadixThemesComponent): as_child: Optional[Union[Var[bool], bool]] = None, as_: Optional[ Union[ - Var[Literal["p", "label", "div", "span"]], - Literal["p", "label", "div", "span"], + Var[ + Literal[ + "p", + "label", + "div", + "span", + "b", + "i", + "u", + "abbr", + "cite", + "del", + "em", + "ins", + "kbd", + "mark", + "s", + "samp", + "sub", + "sup", + ] + ], + Literal[ + "p", + "label", + "div", + "span", + "b", + "i", + "u", + "abbr", + "cite", + "del", + "em", + "ins", + "kbd", + "mark", + "s", + "samp", + "sub", + "sup", + ], ] ] = None, size: Optional[ @@ -261,8 +320,48 @@ class Span(Text): *children, as_: Optional[ Union[ - Var[Literal["p", "label", "div", "span"]], - Literal["p", "label", "div", "span"], + Var[ + Literal[ + "p", + "label", + "div", + "span", + "b", + "i", + "u", + "abbr", + "cite", + "del", + "em", + "ins", + "kbd", + "mark", + "s", + "samp", + "sub", + "sup", + ] + ], + Literal[ + "p", + "label", + "div", + "span", + "b", + "i", + "u", + "abbr", + "cite", + "del", + "em", + "ins", + "kbd", + "mark", + "s", + "samp", + "sub", + "sup", + ], ] ] = None, as_child: Optional[Union[Var[bool], bool]] = None, @@ -1052,8 +1151,48 @@ class TextNamespace(SimpleNamespace): as_child: Optional[Union[Var[bool], bool]] = None, as_: Optional[ Union[ - Var[Literal["p", "label", "div", "span"]], - Literal["p", "label", "div", "span"], + Var[ + Literal[ + "p", + "label", + "div", + "span", + "b", + "i", + "u", + "abbr", + "cite", + "del", + "em", + "ins", + "kbd", + "mark", + "s", + "samp", + "sub", + "sup", + ] + ], + Literal[ + "p", + "label", + "div", + "span", + "b", + "i", + "u", + "abbr", + "cite", + "del", + "em", + "ins", + "kbd", + "mark", + "s", + "samp", + "sub", + "sup", + ], ] ] = None, size: Optional[ From 44000af633891a18e1c78856cbadfd4e1a260f04 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 15 Feb 2024 11:09:00 -0800 Subject: [PATCH 53/68] Unbreak demo app (#2623) Apparently this was converted before code_block got moved back to the top level. --- reflex/.templates/apps/demo/code/pages/datatable.py | 8 ++++---- reflex/.templates/apps/demo/code/pages/forms.py | 8 ++++---- reflex/.templates/apps/demo/code/pages/graphing.py | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/reflex/.templates/apps/demo/code/pages/datatable.py b/reflex/.templates/apps/demo/code/pages/datatable.py index 4cc9d39ea..2a7e79c93 100644 --- a/reflex/.templates/apps/demo/code/pages/datatable.py +++ b/reflex/.templates/apps/demo/code/pages/datatable.py @@ -306,7 +306,7 @@ def datatable_page() -> rx.Component: ), rx.chakra.tab_panels( rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( code_show, language="python", show_line_numbers=True, @@ -316,7 +316,7 @@ def datatable_page() -> rx.Component: padding_y=".25em", ), rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( data_show, language="python", show_line_numbers=True, @@ -326,7 +326,7 @@ def datatable_page() -> rx.Component: padding_y=".25em", ), rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( state_show, language="python", show_line_numbers=True, @@ -336,7 +336,7 @@ def datatable_page() -> rx.Component: padding_y=".25em", ), rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( darkTheme_show, language="python", show_line_numbers=True, diff --git a/reflex/.templates/apps/demo/code/pages/forms.py b/reflex/.templates/apps/demo/code/pages/forms.py index 5b39ba5c1..38efc3e0f 100644 --- a/reflex/.templates/apps/demo/code/pages/forms.py +++ b/reflex/.templates/apps/demo/code/pages/forms.py @@ -150,7 +150,7 @@ def forms_page() -> rx.Component: ), rx.chakra.tab_panels( rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( forms_1_code, language="python", show_line_numbers=True, @@ -160,7 +160,7 @@ def forms_page() -> rx.Component: padding_y=".25em", ), rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( forms_1_state, language="python", show_line_numbers=True, @@ -223,7 +223,7 @@ def forms_page() -> rx.Component: ), rx.chakra.tab_panels( rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( forms_2_code, language="python", show_line_numbers=True, @@ -233,7 +233,7 @@ def forms_page() -> rx.Component: padding_y=".25em", ), rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( forms_2_state, language="python", show_line_numbers=True, diff --git a/reflex/.templates/apps/demo/code/pages/graphing.py b/reflex/.templates/apps/demo/code/pages/graphing.py index 6b5defb46..3eeef92c1 100644 --- a/reflex/.templates/apps/demo/code/pages/graphing.py +++ b/reflex/.templates/apps/demo/code/pages/graphing.py @@ -144,7 +144,7 @@ def graphing_page() -> rx.Component: ), rx.chakra.tab_panels( rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( graph_1_code, language="python", show_line_numbers=True, @@ -154,7 +154,7 @@ def graphing_page() -> rx.Component: padding_y=".25em", ), rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( data_1_show, language="python", show_line_numbers=True, @@ -217,7 +217,7 @@ def graphing_page() -> rx.Component: ), rx.chakra.tab_panels( rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( graph_2_code, language="python", show_line_numbers=True, @@ -227,7 +227,7 @@ def graphing_page() -> rx.Component: padding_y=".25em", ), rx.chakra.tab_panel( - rx.chakra.code_block( + rx.code_block( graph_2_state, language="python", show_line_numbers=True, From 37eeea11002945dc5f54d4a42c441375d1280497 Mon Sep 17 00:00:00 2001 From: Martin Xu <15661672+martinxu9@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:54:38 -0800 Subject: [PATCH 54/68] Spacing literal should include "0" (#2622) * spacing literal should include "0" * rename to LiteralSpacing * pyi --- reflex/components/radix/themes/base.py | 16 +- reflex/components/radix/themes/base.pyi | 30 +-- .../radix/themes/components/avatar.py | 4 +- .../radix/themes/components/avatar.pyi | 4 +- .../radix/themes/components/checkbox.py | 5 +- .../radix/themes/components/checkbox.pyi | 10 +- .../radix/themes/components/radio_group.py | 5 +- .../radix/themes/components/radio_group.pyi | 10 +- .../radix/themes/components/radiogroup.pyi | 3 +- reflex/components/radix/themes/layout/base.py | 17 +- .../components/radix/themes/layout/base.pyi | 58 +++--- .../components/radix/themes/layout/center.py | 1 + .../components/radix/themes/layout/center.pyi | 4 +- reflex/components/radix/themes/layout/flex.py | 5 +- .../components/radix/themes/layout/flex.pyi | 6 +- reflex/components/radix/themes/layout/grid.py | 9 +- .../components/radix/themes/layout/grid.pyi | 14 +- reflex/components/radix/themes/layout/list.py | 4 - .../components/radix/themes/layout/list.pyi | 180 +++++++++--------- .../components/radix/themes/layout/spacer.py | 1 + .../components/radix/themes/layout/spacer.pyi | 4 +- .../components/radix/themes/layout/stack.py | 5 +- .../components/radix/themes/layout/stack.pyi | 8 +- 23 files changed, 206 insertions(+), 197 deletions(-) diff --git a/reflex/components/radix/themes/base.py b/reflex/components/radix/themes/base.py index a923e499c..be7657ad4 100644 --- a/reflex/components/radix/themes/base.py +++ b/reflex/components/radix/themes/base.py @@ -11,7 +11,7 @@ from reflex.vars import Var LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"] LiteralJustify = Literal["start", "center", "end", "between"] -LiteralSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] +LiteralSpacing = Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] LiteralVariant = Literal["classic", "solid", "soft", "surface", "outline", "ghost"] LiteralAppearance = Literal["inherit", "light", "dark"] LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"] @@ -52,25 +52,25 @@ class CommonMarginProps(Component): """Many radix-themes elements accept shorthand margin props.""" # Margin: "0" - "9" - m: Var[LiteralSize] + m: Var[LiteralSpacing] # Margin horizontal: "0" - "9" - mx: Var[LiteralSize] + mx: Var[LiteralSpacing] # Margin vertical: "0" - "9" - my: Var[LiteralSize] + my: Var[LiteralSpacing] # Margin top: "0" - "9" - mt: Var[LiteralSize] + mt: Var[LiteralSpacing] # Margin right: "0" - "9" - mr: Var[LiteralSize] + mr: Var[LiteralSpacing] # Margin bottom: "0" - "9" - mb: Var[LiteralSize] + mb: Var[LiteralSpacing] # Margin left: "0" - "9" - ml: Var[LiteralSize] + ml: Var[LiteralSpacing] class RadixThemesComponent(Component): diff --git a/reflex/components/radix/themes/base.pyi b/reflex/components/radix/themes/base.pyi index c24fbd39e..0ae5812e5 100644 --- a/reflex/components/radix/themes/base.pyi +++ b/reflex/components/radix/themes/base.pyi @@ -15,7 +15,7 @@ from reflex.vars import Var LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"] LiteralJustify = Literal["start", "center", "end", "between"] -LiteralSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] +LiteralSpacing = Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] LiteralVariant = Literal["classic", "solid", "soft", "surface", "outline", "ghost"] LiteralAppearance = Literal["inherit", "light", "dark"] LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"] @@ -59,44 +59,44 @@ class CommonMarginProps(Component): *children, m: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mx: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, my: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mt: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mr: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mb: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, ml: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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, diff --git a/reflex/components/radix/themes/components/avatar.py b/reflex/components/radix/themes/components/avatar.py index 2029c7ef1..0b64831c3 100644 --- a/reflex/components/radix/themes/components/avatar.py +++ b/reflex/components/radix/themes/components/avatar.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" + from typing import Literal from reflex.vars import Var @@ -6,10 +7,11 @@ from reflex.vars import Var from ..base import ( LiteralAccentColor, LiteralRadius, - LiteralSize, RadixThemesComponent, ) +LiteralSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] + class Avatar(RadixThemesComponent): """An image element with a fallback for representing the user.""" diff --git a/reflex/components/radix/themes/components/avatar.pyi b/reflex/components/radix/themes/components/avatar.pyi index 508d5b3ff..8a61a64a2 100644 --- a/reflex/components/radix/themes/components/avatar.pyi +++ b/reflex/components/radix/themes/components/avatar.pyi @@ -9,7 +9,9 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Literal from reflex.vars import Var -from ..base import LiteralAccentColor, LiteralRadius, LiteralSize, RadixThemesComponent +from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent + +LiteralSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] class Avatar(RadixThemesComponent): @overload diff --git a/reflex/components/radix/themes/components/checkbox.py b/reflex/components/radix/themes/components/checkbox.py index 9d1682f68..2303b8667 100644 --- a/reflex/components/radix/themes/components/checkbox.py +++ b/reflex/components/radix/themes/components/checkbox.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" + from types import SimpleNamespace from typing import Any, Dict, Literal @@ -10,7 +11,7 @@ from reflex.vars import Var from ..base import ( LiteralAccentColor, - LiteralSize, + LiteralSpacing, RadixThemesComponent, ) @@ -80,7 +81,7 @@ class HighLevelCheckbox(RadixThemesComponent): text: Var[str] # The gap between the checkbox and the label. - spacing: Var[LiteralSize] + spacing: Var[LiteralSpacing] # The size of the checkbox "1" - "3". size: Var[LiteralCheckboxSize] diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index 4ac7e070e..2cce04e90 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -14,7 +14,7 @@ from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.constants import EventTriggers from reflex.vars import Var -from ..base import LiteralAccentColor, LiteralSize, RadixThemesComponent +from ..base import LiteralAccentColor, LiteralSpacing, RadixThemesComponent LiteralCheckboxSize = Literal["1", "2", "3"] LiteralCheckboxVariant = Literal["classic", "surface", "soft"] @@ -202,8 +202,8 @@ class HighLevelCheckbox(RadixThemesComponent): text: Optional[Union[Var[str], str]] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, size: Optional[ @@ -378,8 +378,8 @@ class CheckboxNamespace(SimpleNamespace): text: Optional[Union[Var[str], str]] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, size: Optional[ diff --git a/reflex/components/radix/themes/components/radio_group.py b/reflex/components/radix/themes/components/radio_group.py index 986d7271f..61d700ec9 100644 --- a/reflex/components/radix/themes/components/radio_group.py +++ b/reflex/components/radix/themes/components/radio_group.py @@ -1,4 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" + from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union @@ -11,7 +12,7 @@ from reflex.vars import Var from ..base import ( LiteralAccentColor, - LiteralSize, + LiteralSpacing, RadixThemesComponent, ) @@ -90,7 +91,7 @@ class HighLevelRadioGroup(RadixThemesComponent): direction: Var[LiteralFlexDirection] = Var.create_safe("column") # The gap between the items of the radio group. - spacing: Var[LiteralSize] = Var.create_safe("2") + spacing: Var[LiteralSpacing] = Var.create_safe("2") # The size of the radio group. size: Var[Literal["1", "2", "3"]] = Var.create_safe("2") diff --git a/reflex/components/radix/themes/components/radio_group.pyi b/reflex/components/radix/themes/components/radio_group.pyi index aff3fe9ed..782c8ca8c 100644 --- a/reflex/components/radix/themes/components/radio_group.pyi +++ b/reflex/components/radix/themes/components/radio_group.pyi @@ -15,7 +15,7 @@ from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.constants import EventTriggers from reflex.vars import Var -from ..base import LiteralAccentColor, LiteralSize, RadixThemesComponent +from ..base import LiteralAccentColor, LiteralSpacing, RadixThemesComponent LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"] @@ -288,8 +288,8 @@ class HighLevelRadioGroup(RadixThemesComponent): ] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, size: Optional[ @@ -467,8 +467,8 @@ class RadioGroup(SimpleNamespace): ] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, size: Optional[ diff --git a/reflex/components/radix/themes/components/radiogroup.pyi b/reflex/components/radix/themes/components/radiogroup.pyi index 1ea3e3bfa..6540428fc 100644 --- a/reflex/components/radix/themes/components/radiogroup.pyi +++ b/reflex/components/radix/themes/components/radiogroup.pyi @@ -1,4 +1,5 @@ """Stub file for reflex/components/radix/themes/components/radiogroup.py""" + # ------------------- DO NOT EDIT ---------------------- # This file was generated by `scripts/pyi_generator.py`! # ------------------------------------------------------ @@ -15,7 +16,7 @@ from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.constants import EventTriggers from reflex.vars import Var -from ..base import LiteralAccentColor, LiteralSize, RadixThemesComponent +from ..base import LiteralAccentColor, LiteralSpacing, RadixThemesComponent LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"] diff --git a/reflex/components/radix/themes/layout/base.py b/reflex/components/radix/themes/layout/base.py index cd02a5465..f18ed34a8 100644 --- a/reflex/components/radix/themes/layout/base.py +++ b/reflex/components/radix/themes/layout/base.py @@ -1,4 +1,5 @@ """Declarative layout and common spacing props.""" + from __future__ import annotations from typing import Literal @@ -7,7 +8,7 @@ from reflex.vars import Var from ..base import ( CommonMarginProps, - LiteralSize, + LiteralSpacing, RadixThemesComponent, ) @@ -21,25 +22,25 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent): """ # Padding: "0" - "9" - p: Var[LiteralSize] + p: Var[LiteralSpacing] # Padding horizontal: "0" - "9" - px: Var[LiteralSize] + px: Var[LiteralSpacing] # Padding vertical: "0" - "9" - py: Var[LiteralSize] + py: Var[LiteralSpacing] # Padding top: "0" - "9" - pt: Var[LiteralSize] + pt: Var[LiteralSpacing] # Padding right: "0" - "9" - pr: Var[LiteralSize] + pr: Var[LiteralSpacing] # Padding bottom: "0" - "9" - pb: Var[LiteralSize] + pb: Var[LiteralSpacing] # Padding left: "0" - "9" - pl: Var[LiteralSize] + pl: Var[LiteralSpacing] # Whether the element will take up the smallest possible space: "0" | "1" shrink: Var[LiteralBoolNumber] diff --git a/reflex/components/radix/themes/layout/base.pyi b/reflex/components/radix/themes/layout/base.pyi index aa88429e2..11f1d1412 100644 --- a/reflex/components/radix/themes/layout/base.pyi +++ b/reflex/components/radix/themes/layout/base.pyi @@ -9,7 +9,7 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Literal from reflex.vars import Var -from ..base import CommonMarginProps, LiteralSize, RadixThemesComponent +from ..base import CommonMarginProps, LiteralSpacing, RadixThemesComponent LiteralBoolNumber = Literal["0", "1"] @@ -21,88 +21,88 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent): *children, p: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, px: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, py: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, pt: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, pr: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, m: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mx: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, my: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mt: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mr: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mb: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, ml: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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, diff --git a/reflex/components/radix/themes/layout/center.py b/reflex/components/radix/themes/layout/center.py index 1d3502980..b6a8faa8e 100644 --- a/reflex/components/radix/themes/layout/center.py +++ b/reflex/components/radix/themes/layout/center.py @@ -1,4 +1,5 @@ """A center component.""" + from __future__ import annotations from reflex.components.component import Component diff --git a/reflex/components/radix/themes/layout/center.pyi b/reflex/components/radix/themes/layout/center.pyi index 402e4c08f..726a66f0a 100644 --- a/reflex/components/radix/themes/layout/center.pyi +++ b/reflex/components/radix/themes/layout/center.pyi @@ -43,8 +43,8 @@ class Center(Flex): ] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, access_key: Optional[ diff --git a/reflex/components/radix/themes/layout/flex.py b/reflex/components/radix/themes/layout/flex.py index 295df7832..ef7aed16c 100644 --- a/reflex/components/radix/themes/layout/flex.py +++ b/reflex/components/radix/themes/layout/flex.py @@ -1,4 +1,5 @@ """Declarative layout and common spacing props.""" + from __future__ import annotations from typing import Dict, Literal @@ -9,7 +10,7 @@ from reflex.vars import Var from ..base import ( LiteralAlign, LiteralJustify, - LiteralSize, + LiteralSpacing, RadixThemesComponent, ) @@ -38,7 +39,7 @@ class Flex(el.Div, RadixThemesComponent): wrap: Var[LiteralFlexWrap] # Gap between children: "0" - "9" - spacing: Var[LiteralSize] + spacing: Var[LiteralSpacing] # Reflex maps the "spacing" prop to "gap" prop. _rename_props: Dict[str, str] = {"spacing": "gap"} diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi index e50fabae6..fe8c6d6b2 100644 --- a/reflex/components/radix/themes/layout/flex.pyi +++ b/reflex/components/radix/themes/layout/flex.pyi @@ -10,7 +10,7 @@ from reflex.style import Style from typing import Dict, Literal from reflex import el from reflex.vars import Var -from ..base import LiteralAlign, LiteralJustify, LiteralSize, RadixThemesComponent +from ..base import LiteralAlign, LiteralJustify, LiteralSpacing, RadixThemesComponent LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"] LiteralFlexWrap = Literal["nowrap", "wrap", "wrap-reverse"] @@ -48,8 +48,8 @@ class Flex(el.Div, RadixThemesComponent): ] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, access_key: Optional[ diff --git a/reflex/components/radix/themes/layout/grid.py b/reflex/components/radix/themes/layout/grid.py index 90665b911..565703643 100644 --- a/reflex/components/radix/themes/layout/grid.py +++ b/reflex/components/radix/themes/layout/grid.py @@ -1,4 +1,5 @@ """Declarative layout and common spacing props.""" + from __future__ import annotations from typing import Dict, Literal @@ -9,7 +10,7 @@ from reflex.vars import Var from ..base import ( LiteralAlign, LiteralJustify, - LiteralSize, + LiteralSpacing, RadixThemesComponent, ) @@ -40,13 +41,13 @@ class Grid(el.Div, RadixThemesComponent): justify: Var[LiteralJustify] # Gap between children: "0" - "9" - spacing: Var[LiteralSize] + spacing: Var[LiteralSpacing] # Gap between children horizontal: "0" - "9" - spacing_x: Var[LiteralSize] + spacing_x: Var[LiteralSpacing] # Gap between children vertical: "0" - "9" - spacing_y: Var[LiteralSize] + spacing_y: Var[LiteralSpacing] # Reflex maps the "spacing" prop to "gap" prop. _rename_props: Dict[str, str] = { diff --git a/reflex/components/radix/themes/layout/grid.pyi b/reflex/components/radix/themes/layout/grid.pyi index 3171bcbe4..e6107f7de 100644 --- a/reflex/components/radix/themes/layout/grid.pyi +++ b/reflex/components/radix/themes/layout/grid.pyi @@ -10,7 +10,7 @@ from reflex.style import Style from typing import Dict, Literal from reflex import el from reflex.vars import Var -from ..base import LiteralAlign, LiteralJustify, LiteralSize, RadixThemesComponent +from ..base import LiteralAlign, LiteralJustify, LiteralSpacing, RadixThemesComponent LiteralGridFlow = Literal["row", "column", "dense", "row-dense", "column-dense"] @@ -43,20 +43,20 @@ class Grid(el.Div, RadixThemesComponent): ] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, spacing_x: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, spacing_y: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, access_key: Optional[ diff --git a/reflex/components/radix/themes/layout/list.py b/reflex/components/radix/themes/layout/list.py index 69c95acbe..0de3b7dcc 100644 --- a/reflex/components/radix/themes/layout/list.py +++ b/reflex/components/radix/themes/layout/list.py @@ -12,10 +12,6 @@ from reflex.vars import Var from .base import LayoutComponent from .flex import Flex -# from reflex.vars import Var - -# from reflex.components.radix.themes.layout import LayoutComponent - LiteralListStyleTypeUnordered = Literal[ "none", "disc", diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi index 878cdc9ea..f28c6223b 100644 --- a/reflex/components/radix/themes/layout/list.pyi +++ b/reflex/components/radix/themes/layout/list.pyi @@ -70,8 +70,8 @@ class BaseList(Flex, LayoutComponent): ] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, access_key: Optional[ @@ -116,88 +116,88 @@ class BaseList(Flex, LayoutComponent): ] = None, p: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, px: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, py: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, pt: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, pr: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, m: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mx: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, my: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mt: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mr: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mb: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, ml: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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, @@ -345,8 +345,8 @@ class UnorderedList(BaseList): ] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, access_key: Optional[ @@ -391,88 +391,88 @@ class UnorderedList(BaseList): ] = None, p: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, px: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, py: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, pt: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, pr: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, m: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mx: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, my: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mt: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mr: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mb: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, ml: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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, @@ -637,8 +637,8 @@ class OrderedList(BaseList): ] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, access_key: Optional[ @@ -683,88 +683,88 @@ class OrderedList(BaseList): ] = None, p: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, px: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, py: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, pt: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, pr: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, m: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mx: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, my: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mt: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mr: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, mb: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, ml: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[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, diff --git a/reflex/components/radix/themes/layout/spacer.py b/reflex/components/radix/themes/layout/spacer.py index ea7a7307d..33a790216 100644 --- a/reflex/components/radix/themes/layout/spacer.py +++ b/reflex/components/radix/themes/layout/spacer.py @@ -1,4 +1,5 @@ """A spacer component.""" + from __future__ import annotations from reflex.components.component import Component diff --git a/reflex/components/radix/themes/layout/spacer.pyi b/reflex/components/radix/themes/layout/spacer.pyi index df662edae..7d0a49d61 100644 --- a/reflex/components/radix/themes/layout/spacer.pyi +++ b/reflex/components/radix/themes/layout/spacer.pyi @@ -43,8 +43,8 @@ class Spacer(Flex): ] = None, spacing: Optional[ Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], + Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]], + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], ] ] = None, access_key: Optional[ diff --git a/reflex/components/radix/themes/layout/stack.py b/reflex/components/radix/themes/layout/stack.py index 2718f038b..d9bbb4f45 100644 --- a/reflex/components/radix/themes/layout/stack.py +++ b/reflex/components/radix/themes/layout/stack.py @@ -1,11 +1,12 @@ """Stack components.""" + from __future__ import annotations from typing import Literal from reflex.components.component import Component -from ..base import LiteralSize +from ..base import LiteralSpacing from .flex import Flex LiteralJustify = Literal["start", "center", "end"] @@ -19,7 +20,7 @@ class Stack(Flex): def create( cls, *children, - spacing: LiteralSize = "2", + spacing: LiteralSpacing = "2", **props, ) -> Component: """Create a new instance of the component. diff --git a/reflex/components/radix/themes/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi index eb4523ad8..5873f24f5 100644 --- a/reflex/components/radix/themes/layout/stack.pyi +++ b/reflex/components/radix/themes/layout/stack.pyi @@ -9,7 +9,7 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Literal from reflex.components.component import Component -from ..base import LiteralSize +from ..base import LiteralSpacing from .flex import Flex LiteralJustify = Literal["start", "center", "end"] @@ -21,7 +21,7 @@ class Stack(Flex): def create( # type: ignore cls, *children, - spacing: Optional[LiteralSize] = "2", + spacing: Optional[LiteralSpacing] = "2", as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ Union[ @@ -185,7 +185,7 @@ class VStack(Stack): def create( # type: ignore cls, *children, - spacing: Optional[LiteralSize] = "2", + spacing: Optional[LiteralSpacing] = "2", as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ Union[ @@ -349,7 +349,7 @@ class HStack(Stack): def create( # type: ignore cls, *children, - spacing: Optional[LiteralSize] = "2", + spacing: Optional[LiteralSpacing] = "2", as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ Union[ From 45b70a130c9ed54bd509b443c40562db05401fc5 Mon Sep 17 00:00:00 2001 From: Timothy Pidashev Date: Thu, 15 Feb 2024 12:17:53 -0800 Subject: [PATCH 55/68] align vstack in blank demo app (#2625) --- reflex/.templates/apps/blank/code/blank.py | 1 + 1 file changed, 1 insertion(+) diff --git a/reflex/.templates/apps/blank/code/blank.py b/reflex/.templates/apps/blank/code/blank.py index 9adaa08fa..9b2cf0cf3 100644 --- a/reflex/.templates/apps/blank/code/blank.py +++ b/reflex/.templates/apps/blank/code/blank.py @@ -35,6 +35,7 @@ def index() -> rx.Component: gap="1.5em", font_size="2em", padding_top="10%", + align="center", ), ) From d979d993381c90bfc070898c331ea571713afe9c Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 15 Feb 2024 12:49:53 -0800 Subject: [PATCH 56/68] [REF-1902] [REF-1987] Chakra upgrade message (#2624) * Show rx.chakra upgrade message _before_ overwriting the version Ensure that the conditions for showing the rx.chakra upgrade message are checked before overwriting the version saved in .web/reflex.json. Check for the absense of a config file to suppress the upgrade message when init'ing a brand new project. Check for the existance of `reflex.json` before opening it, since it might not exist at the point it's checked. * Update more information link in chakra upgrade message * Fix long line --- reflex/reflex.py | 7 ++++--- reflex/utils/prerequisites.py | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/reflex/reflex.py b/reflex/reflex.py index 1426d33a6..38dc4c865 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -84,6 +84,10 @@ def _init( prerequisites.ensure_reflex_installation_id() + # When upgrading to 0.4, show migration instructions. + if prerequisites.should_show_rx_chakra_migration_instructions(): + prerequisites.show_rx_chakra_migration_instructions() + # Set up the app directory, only if the config doesn't exist. if not os.path.exists(constants.Config.FILE): if template is None: @@ -100,9 +104,6 @@ def _init( # Migrate Pynecone projects to Reflex. prerequisites.migrate_to_reflex() - if prerequisites.should_show_rx_chakra_migration_instructions(): - prerequisites.show_rx_chakra_migration_instructions() - # Initialize the .gitignore. prerequisites.initialize_gitignore() diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 25119458e..48d587b7c 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -949,8 +949,15 @@ def should_show_rx_chakra_migration_instructions() -> bool: if os.getenv("REFLEX_PROMPT_MIGRATE_TO_RX_CHAKRA") == "yes": return True - with open(constants.Dirs.REFLEX_JSON, "r") as f: - data = json.load(f) + if not Path(constants.Config.FILE).exists(): + # They are running reflex init for the first time. + return False + + existing_init_reflex_version = None + reflex_json = Path(constants.Dirs.REFLEX_JSON) + if reflex_json.exists(): + with reflex_json.open("r") as f: + data = json.load(f) existing_init_reflex_version = data.get("version", None) if existing_init_reflex_version is None: @@ -975,7 +982,9 @@ def show_rx_chakra_migration_instructions(): "[bold]Run `reflex script keep-chakra` to automatically update your app." ) console.log("") - console.log("For more details, please see https://TODO") # TODO add link to docs + console.log( + "For more details, please see https://reflex.dev/blog/2024-02-15-reflex-v0.4.0" + ) def migrate_to_rx_chakra(): From 6ded702d0302fa9510eb82e4e90be213b0158594 Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Fri, 16 Feb 2024 03:51:52 +0700 Subject: [PATCH 57/68] Simplify app template (#2627) --- reflex/.templates/apps/blank/code/blank.py | 32 ++++++++-------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/reflex/.templates/apps/blank/code/blank.py b/reflex/.templates/apps/blank/code/blank.py index 9b2cf0cf3..4a1751996 100644 --- a/reflex/.templates/apps/blank/code/blank.py +++ b/reflex/.templates/apps/blank/code/blank.py @@ -1,4 +1,5 @@ """Welcome to Reflex! This file outlines the steps to create a basic app.""" + from rxconfig import config import reflex as rx @@ -10,36 +11,25 @@ filename = f"{config.app_name}/{config.app_name}.py" class State(rx.State): """The app state.""" - pass - def index() -> rx.Component: - return rx.fragment( - rx.color_mode.button(rx.color_mode.icon(), float="right"), + return rx.center( + rx.theme_panel(), rx.vstack( - rx.heading("Welcome to Reflex!", font_size="2em"), - rx.box("Get started by editing ", rx.code(filename, font_size="1em")), - rx.link( + rx.heading("Welcome to Reflex!", size="9"), + rx.text("Get started by editing ", rx.code(filename)), + rx.button( "Check out our docs!", - href=docs_url, - border="0.1em solid", - padding="0.5em", - border_radius="0.5em", - _hover={ - "color": rx.color_mode_cond( - light="rgb(107,99,246)", - dark="rgb(179, 175, 255)", - ) - }, + on_click=lambda: rx.redirect(docs_url), + size="4", ), - gap="1.5em", - font_size="2em", - padding_top="10%", align="center", + spacing="7", + font_size="2em", ), + height="100vh", ) -# Create app instance and add index page. app = rx.App() app.add_page(index) From 411a3a1f13a58480f480eb8babda3991d97b11d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Thu, 15 Feb 2024 22:57:12 +0100 Subject: [PATCH 58/68] accordion default classname (#2628) --- .../components/radix/primitives/accordion.py | 167 ++++++++++++------ .../components/radix/primitives/accordion.pyi | 104 +++++++++-- 2 files changed, 203 insertions(+), 68 deletions(-) diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index 1c473fa59..24b5cd668 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -428,7 +428,9 @@ class AccordionRoot(AccordionComponent): def _get_imports(self): return imports.merge_imports( - super()._get_imports(), self._var_data.imports if self._var_data else {} + super()._get_imports(), + self._var_data.imports if self._var_data else {}, + {"@emotion/react": [imports.ImportVar(tag="keyframes")]}, ) def get_event_triggers(self) -> Dict[str, Any]: @@ -442,6 +444,26 @@ class AccordionRoot(AccordionComponent): "on_value_change": lambda e0: [e0], } + def _get_custom_code(self) -> str: + return """ +const slideDown = keyframes` +from { + height: 0; +} +to { + height: var(--radix-accordion-content-height); +} +` +const slideUp = keyframes` +from { + height: var(--radix-accordion-content-height); +} +to { + height: 0; +} +` +""" + class AccordionItem(AccordionComponent): """An accordion component.""" @@ -493,25 +515,23 @@ class AccordionItem(AccordionComponent): # The item requires a value to toggle (use a random unique name if not provided). value = props.pop("value", get_unique_variable_name()) + if "AccordionItem" not in ( + cls_name := props.pop("class_name", "AccordionItem") + ): + cls_name = f"{cls_name} AccordionItem" + if (header is not None) and (content is not None): children = [ AccordionHeader.create( AccordionTrigger.create( header, - Icon.create( - tag="chevron_down", - class_name="AccordionChevron", - display="inline-block", - ), - class_name="AccordionTrigger", + AccordionIcon.create(), ), ), - AccordionContent.create(content, class_name="AccordionContent"), + AccordionContent.create(content), ] - return super().create( - *children, value=value, **props, class_name="AccordionItem" - ) + return super().create(*children, value=value, **props, class_name=cls_name) class AccordionHeader(AccordionComponent): @@ -521,12 +541,26 @@ class AccordionHeader(AccordionComponent): alias = "RadixAccordionHeader" + @classmethod + def create(cls, *children, **props) -> Component: + """Create the Accordion header component. + + Args: + *children: The children of the component. + **props: The properties of the component. + + Returns: + The Accordion header Component. + """ + if "AccordionHeader" not in ( + cls_name := props.pop("class_name", "AccordionHeader") + ): + cls_name = f"{cls_name} AccordionHeader" + + return super().create(*children, class_name=cls_name, **props) + def _apply_theme(self, theme: Component): - self.style = Style( - { - **self.style, - } - ) + self.style = Style({**self.style}) class AccordionTrigger(AccordionComponent): @@ -536,12 +570,48 @@ class AccordionTrigger(AccordionComponent): alias = "RadixAccordionTrigger" + @classmethod + def create(cls, *children, **props) -> Component: + """Create the Accordion trigger component. + + Args: + *children: The children of the component. + **props: The properties of the component. + + Returns: + The Accordion trigger Component. + """ + if "AccordionTrigger" not in ( + cls_name := props.pop("class_name", "AccordionTrigger") + ): + cls_name = f"{cls_name} AccordionTrigger" + + return super().create(*children, class_name=cls_name, **props) + def _apply_theme(self, theme: Component): - self.style = Style( - { - **self.style, - } - ) + self.style = Style({**self.style}) + + +class AccordionIcon(Icon): + """An accordion icon component.""" + + @classmethod + def create(cls, *children, **props) -> Component: + """Create the Accordion icon component. + + Args: + *children: The children of the component. + **props: The properties of the component. + + Returns: + The Accordion icon Component. + """ + if "AccordionChevron" not in ( + cls_name := props.pop("class_name", "AccordionChevron") + ): + cls_name = f"{cls_name} AccordionChevron" + + return super().create(tag="chevron_down", class_name=cls_name, **props) class AccordionContent(AccordionComponent): @@ -551,38 +621,32 @@ class AccordionContent(AccordionComponent): alias = "RadixAccordionContent" + @classmethod + def create(cls, *children, **props) -> Component: + """Create the Accordion content component. + + Args: + *children: The children of the component. + **props: The properties of the component. + + Returns: + The Accordion content Component. + """ + if "AccordionContent" not in ( + cls_name := props.pop("class_name", "AccordionContent") + ): + cls_name = f"{cls_name} AccordionContent" + + return super().create(*children, class_name=cls_name, **props) + def _apply_theme(self, theme: Component): - self.style = Style( - { - **self.style, - } - ) + self.style = Style({**self.style}) - def _get_imports(self): - return { - **super()._get_imports(), - "@emotion/react": [imports.ImportVar(tag="keyframes")], - } - - def _get_custom_code(self) -> str: - return """ -const slideDown = keyframes` -from { - height: 0; -} -to { - height: var(--radix-accordion-content-height); -} -` -const slideUp = keyframes` -from { - height: var(--radix-accordion-content-height); -} -to { - height: 0; -} -` -""" + # def _get_imports(self): + # return { + # **super()._get_imports(), + # "@emotion/react": [imports.ImportVar(tag="keyframes")], + # } class Accordion(SimpleNamespace): @@ -591,6 +655,7 @@ class Accordion(SimpleNamespace): content = staticmethod(AccordionContent.create) header = staticmethod(AccordionHeader.create) item = staticmethod(AccordionItem.create) + icon = staticmethod(AccordionIcon.create) root = staticmethod(AccordionRoot.create) trigger = staticmethod(AccordionTrigger.create) diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 5b71da123..f088981a4 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -447,7 +447,7 @@ class AccordionHeader(AccordionComponent): ] = None, **props ) -> "AccordionHeader": - """Create the component. + """Create the Accordion header component. Args: *children: The children of the component. @@ -458,13 +458,10 @@ class AccordionHeader(AccordionComponent): class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded custom_attrs: custom attribute - **props: The props of the component. + **props: The properties of the component. Returns: - The component. - - Raises: - TypeError: If an invalid child is passed. + The Accordion header Component. """ ... @@ -528,7 +525,7 @@ class AccordionTrigger(AccordionComponent): ] = None, **props ) -> "AccordionTrigger": - """Create the component. + """Create the Accordion trigger component. Args: *children: The children of the component. @@ -539,13 +536,88 @@ class AccordionTrigger(AccordionComponent): class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded custom_attrs: custom attribute - **props: The props of the component. + **props: The properties of the component. Returns: - The component. + The Accordion trigger Component. + """ + ... - Raises: - TypeError: If an invalid child is passed. +class AccordionIcon(Icon): + @overload + @classmethod + def create( # type: ignore + cls, + *children, + size: Optional[Union[Var[int], int]] = 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, str]]] = None, + on_blur: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_context_menu: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_double_click: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_focus: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_down: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_enter: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_leave: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_move: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_out: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_over: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_mouse_up: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_scroll: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + on_unmount: Optional[ + Union[EventHandler, EventSpec, list, function, BaseVar] + ] = None, + **props + ) -> "AccordionIcon": + """Create the Accordion icon component. + + Args: + *children: The children of the component. + size: The size of the icon in pixels. + style: The style of the component. + key: A unique key for the component. + id: The id for the component. + class_name: The class name for the component. + autofocus: Whether the component should take the focus once the page is loaded + custom_attrs: custom attribute + **props: The properties of the component. + + Returns: + The Accordion icon Component. """ ... @@ -609,7 +681,7 @@ class AccordionContent(AccordionComponent): ] = None, **props ) -> "AccordionContent": - """Create the component. + """Create the Accordion content component. Args: *children: The children of the component. @@ -620,13 +692,10 @@ class AccordionContent(AccordionComponent): class_name: The class name for the component. autofocus: Whether the component should take the focus once the page is loaded custom_attrs: custom attribute - **props: The props of the component. + **props: The properties of the component. Returns: - The component. - - Raises: - TypeError: If an invalid child is passed. + The Accordion content Component. """ ... @@ -634,6 +703,7 @@ class Accordion(SimpleNamespace): content = staticmethod(AccordionContent.create) header = staticmethod(AccordionHeader.create) item = staticmethod(AccordionItem.create) + icon = staticmethod(AccordionIcon.create) root = staticmethod(AccordionRoot.create) trigger = staticmethod(AccordionTrigger.create) From 0cb66fb56103be33f769d62d49fafc12de310242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Thu, 15 Feb 2024 22:57:27 +0100 Subject: [PATCH 59/68] set default align stack (#2626) --- .../components/radix/themes/layout/stack.py | 10 +++--- .../components/radix/themes/layout/stack.pyi | 33 ++++--------------- 2 files changed, 11 insertions(+), 32 deletions(-) diff --git a/reflex/components/radix/themes/layout/stack.py b/reflex/components/radix/themes/layout/stack.py index d9bbb4f45..de711afc6 100644 --- a/reflex/components/radix/themes/layout/stack.py +++ b/reflex/components/radix/themes/layout/stack.py @@ -2,16 +2,11 @@ from __future__ import annotations -from typing import Literal - from reflex.components.component import Component -from ..base import LiteralSpacing +from ..base import LiteralAlign, LiteralSpacing from .flex import Flex -LiteralJustify = Literal["start", "center", "end"] -LiteralAlign = Literal["start", "center", "end", "stretch"] - class Stack(Flex): """A stack component.""" @@ -21,6 +16,7 @@ class Stack(Flex): cls, *children, spacing: LiteralSpacing = "2", + align: LiteralAlign = "start", **props, ) -> Component: """Create a new instance of the component. @@ -28,6 +24,7 @@ class Stack(Flex): Args: *children: The children of the stack. spacing: The spacing between each stack item. + align: The alignment of the stack items. **props: The properties of the stack. Returns: @@ -36,6 +33,7 @@ class Stack(Flex): return super().create( *children, spacing=spacing, + align=align, **props, ) diff --git a/reflex/components/radix/themes/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi index 5873f24f5..928e0bb2b 100644 --- a/reflex/components/radix/themes/layout/stack.pyi +++ b/reflex/components/radix/themes/layout/stack.pyi @@ -7,14 +7,10 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from typing import Literal from reflex.components.component import Component -from ..base import LiteralSpacing +from ..base import LiteralAlign, LiteralSpacing from .flex import Flex -LiteralJustify = Literal["start", "center", "end"] -LiteralAlign = Literal["start", "center", "end", "stretch"] - class Stack(Flex): @overload @classmethod @@ -22,6 +18,7 @@ class Stack(Flex): cls, *children, spacing: Optional[LiteralSpacing] = "2", + align: Optional[LiteralAlign] = "start", as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ Union[ @@ -29,12 +26,6 @@ class Stack(Flex): Literal["row", "column", "row-reverse", "column-reverse"], ] ] = None, - align: Optional[ - Union[ - Var[Literal["start", "center", "end", "baseline", "stretch"]], - Literal["start", "center", "end", "baseline", "stretch"], - ] - ] = None, justify: Optional[ Union[ Var[Literal["start", "center", "end", "between"]], @@ -145,9 +136,9 @@ class Stack(Flex): Args: *children: The children of the stack. spacing: The spacing between each stack item. + align: The alignment of the stack items. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" - align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" access_key: Provides a hint for generating a keyboard shortcut for the current element. @@ -186,6 +177,7 @@ class VStack(Stack): cls, *children, spacing: Optional[LiteralSpacing] = "2", + align: Optional[LiteralAlign] = "start", as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ Union[ @@ -193,12 +185,6 @@ class VStack(Stack): Literal["row", "column", "row-reverse", "column-reverse"], ] ] = None, - align: Optional[ - Union[ - Var[Literal["start", "center", "end", "baseline", "stretch"]], - Literal["start", "center", "end", "baseline", "stretch"], - ] - ] = None, justify: Optional[ Union[ Var[Literal["start", "center", "end", "between"]], @@ -309,9 +295,9 @@ class VStack(Stack): Args: *children: The children of the stack. spacing: The spacing between each stack item. + align: The alignment of the stack items. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" - align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" access_key: Provides a hint for generating a keyboard shortcut for the current element. @@ -350,6 +336,7 @@ class HStack(Stack): cls, *children, spacing: Optional[LiteralSpacing] = "2", + align: Optional[LiteralAlign] = "start", as_child: Optional[Union[Var[bool], bool]] = None, direction: Optional[ Union[ @@ -357,12 +344,6 @@ class HStack(Stack): Literal["row", "column", "row-reverse", "column-reverse"], ] ] = None, - align: Optional[ - Union[ - Var[Literal["start", "center", "end", "baseline", "stretch"]], - Literal["start", "center", "end", "baseline", "stretch"], - ] - ] = None, justify: Optional[ Union[ Var[Literal["start", "center", "end", "between"]], @@ -473,9 +454,9 @@ class HStack(Stack): Args: *children: The children of the stack. spacing: The spacing between each stack item. + align: The alignment of the stack items. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" - align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" access_key: Provides a hint for generating a keyboard shortcut for the current element. From 7240f8ee6f0b7c312ffbcbc281cbd2d5b0db88cd Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Fri, 16 Feb 2024 07:03:10 +0700 Subject: [PATCH 60/68] Handle component namespaces in global styles (#2630) --- reflex/app.py | 19 ++++++++--- reflex/components/component.py | 33 ++++++++++++++++++- .../components/radix/primitives/accordion.py | 5 ++- .../components/radix/primitives/accordion.pyi | 5 ++- reflex/components/radix/primitives/drawer.py | 4 +-- reflex/components/radix/primitives/drawer.pyi | 4 +-- reflex/components/radix/primitives/form.py | 5 ++- reflex/components/radix/primitives/form.pyi | 5 ++- .../components/radix/primitives/progress.py | 5 ++- .../components/radix/primitives/progress.pyi | 5 ++- reflex/components/radix/primitives/slider.py | 5 ++- reflex/components/radix/primitives/slider.pyi | 5 ++- .../radix/themes/components/alert_dialog.py | 4 +-- .../radix/themes/components/alert_dialog.pyi | 4 +-- .../radix/themes/components/callout.py | 5 ++- .../radix/themes/components/callout.pyi | 5 ++- .../radix/themes/components/checkbox.py | 5 ++- .../radix/themes/components/checkbox.pyi | 5 ++- .../radix/themes/components/context_menu.py | 4 +-- .../radix/themes/components/context_menu.pyi | 4 +-- .../radix/themes/components/dialog.py | 4 +-- .../radix/themes/components/dialog.pyi | 4 +-- .../radix/themes/components/dropdown_menu.py | 4 +-- .../radix/themes/components/dropdown_menu.pyi | 4 +-- .../radix/themes/components/hover_card.py | 4 +-- .../radix/themes/components/hover_card.pyi | 4 +-- .../radix/themes/components/popover.py | 4 +-- .../radix/themes/components/popover.pyi | 4 +-- .../radix/themes/components/radio_group.py | 5 ++- .../radix/themes/components/radio_group.pyi | 5 ++- .../radix/themes/components/select.py | 5 ++- .../radix/themes/components/select.pyi | 5 ++- .../radix/themes/components/table.py | 4 +-- .../radix/themes/components/table.pyi | 4 +-- .../radix/themes/components/tabs.py | 4 +-- .../radix/themes/components/tabs.pyi | 4 +-- .../radix/themes/components/text_field.py | 5 ++- .../radix/themes/components/text_field.pyi | 5 ++- reflex/components/radix/themes/layout/list.py | 5 ++- .../components/radix/themes/layout/list.pyi | 5 ++- .../radix/themes/typography/text.py | 4 +-- .../radix/themes/typography/text.pyi | 4 +-- tests/test_style.py | 9 +++++ 43 files changed, 135 insertions(+), 106 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 33d773a6f..40c63372f 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -39,7 +39,11 @@ from reflex.compiler import utils as compiler_utils from reflex.components import connection_modal from reflex.components.base.app_wrap import AppWrap from reflex.components.base.fragment import Fragment -from reflex.components.component import Component, ComponentStyle +from reflex.components.component import ( + Component, + ComponentStyle, + evaluate_style_namespaces, +) from reflex.components.core.client_side_routing import ( Default404Page, wait_for_client_redirect, @@ -682,10 +686,7 @@ class App(Base): # Store the compile results. compile_results = [] - # Compile the pages in parallel. - custom_components = set() - # TODO Anecdotally, processes=2 works 10% faster (cpu_count=12) - all_imports = {} + # Add the app wrappers. app_wrappers: Dict[tuple[int, str], Component] = { # Default app wrap component renders {children} (0, "AppWrap"): AppWrap.create() @@ -694,6 +695,14 @@ class App(Base): # If a theme component was provided, wrap the app with it app_wrappers[(20, "Theme")] = self.theme + # Fix up the style. + self.style = evaluate_style_namespaces(self.style) + + # Track imports and custom components found. + all_imports = {} + custom_components = set() + + # Compile the pages in parallel. with progress, concurrent.futures.ThreadPoolExecutor() as thread_pool: fixed_pages = 7 task = progress.add_task("Compiling:", total=len(self.pages) + fixed_pages) diff --git a/reflex/components/component.py b/reflex/components/component.py index 43b66f52b..5c71216f1 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -7,6 +7,7 @@ import typing from abc import ABC, abstractmethod from functools import lru_cache, wraps from hashlib import md5 +from types import SimpleNamespace from typing import ( Any, Callable, @@ -114,8 +115,38 @@ class BaseComponent(Base, ABC): """ +class ComponentNamespace(SimpleNamespace): + """A namespace to manage components with subcomponents.""" + + def __hash__(self) -> int: + """Get the hash of the namespace. + + + Returns: + The hash of the namespace. + """ + return hash(self.__class__.__name__) + + +def evaluate_style_namespaces(style: ComponentStyle) -> dict: + """Evaluate namespaces in the style. + + Args: + style: The style to evaluate. + + Returns: + The evaluated style. + """ + return { + k.__call__ if isinstance(k, ComponentNamespace) else k: v + for k, v in style.items() + } + + # Map from component to styling. -ComponentStyle = Dict[Union[str, Type[BaseComponent], Callable], Any] +ComponentStyle = Dict[ + Union[str, Type[BaseComponent], Callable, ComponentNamespace], Any +] ComponentChild = Union[types.PrimitiveType, Var, BaseComponent] diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index 24b5cd668..da790b0b2 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -2,10 +2,9 @@ from __future__ import annotations -from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.core.match import Match from reflex.components.lucide.icon import Icon from reflex.components.radix.primitives.base import RadixPrimitiveComponent @@ -649,7 +648,7 @@ class AccordionContent(AccordionComponent): # } -class Accordion(SimpleNamespace): +class Accordion(ComponentNamespace): """Accordion component.""" content = staticmethod(AccordionContent.create) diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index f088981a4..e5b94bf7b 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -7,9 +7,8 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.core.match import Match from reflex.components.lucide.icon import Icon from reflex.components.radix.primitives.base import RadixPrimitiveComponent @@ -699,7 +698,7 @@ class AccordionContent(AccordionComponent): """ ... -class Accordion(SimpleNamespace): +class Accordion(ComponentNamespace): content = staticmethod(AccordionContent.create) header = staticmethod(AccordionHeader.create) item = staticmethod(AccordionItem.create) diff --git a/reflex/components/radix/primitives/drawer.py b/reflex/components/radix/primitives/drawer.py index b93567858..b268180aa 100644 --- a/reflex/components/radix/primitives/drawer.py +++ b/reflex/components/radix/primitives/drawer.py @@ -3,9 +3,9 @@ # Style based on https://ui.shadcn.com/docs/components/drawer from __future__ import annotations -from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union +from reflex.components.component import ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.components.radix.themes.base import Theme from reflex.constants import EventTriggers @@ -261,7 +261,7 @@ class DrawerDescription(DrawerComponent): return self.style -class Drawer(SimpleNamespace): +class Drawer(ComponentNamespace): """A namespace for Drawer components.""" root = __call__ = staticmethod(DrawerRoot.create) diff --git a/reflex/components/radix/primitives/drawer.pyi b/reflex/components/radix/primitives/drawer.pyi index cf19f4743..ac58d9a7e 100644 --- a/reflex/components/radix/primitives/drawer.pyi +++ b/reflex/components/radix/primitives/drawer.pyi @@ -7,8 +7,8 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union +from reflex.components.component import ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponent from reflex.components.radix.themes.base import Theme from reflex.constants import EventTriggers @@ -789,7 +789,7 @@ class DrawerDescription(DrawerComponent): """ ... -class Drawer(SimpleNamespace): +class Drawer(ComponentNamespace): root = staticmethod(DrawerRoot.create) trigger = staticmethod(DrawerTrigger.create) portal = staticmethod(DrawerPortal.create) diff --git a/reflex/components/radix/primitives/form.py b/reflex/components/radix/primitives/form.py index 8437a41dc..d6b57799a 100644 --- a/reflex/components/radix/primitives/form.py +++ b/reflex/components/radix/primitives/form.py @@ -3,12 +3,11 @@ from __future__ import annotations from hashlib import md5 -from types import SimpleNamespace from typing import Any, Dict, Iterator, Literal from jinja2 import Environment -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.themes.components.text_field import TextFieldInput from reflex.components.tags.tag import Tag from reflex.constants.base import Dirs @@ -297,7 +296,7 @@ class Form(FormRoot): pass -class FormNamespace(SimpleNamespace): +class FormNamespace(ComponentNamespace): """Form components.""" root = staticmethod(FormRoot.create) diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi index 247e393df..e80b4214c 100644 --- a/reflex/components/radix/primitives/form.pyi +++ b/reflex/components/radix/primitives/form.pyi @@ -8,10 +8,9 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from hashlib import md5 -from types import SimpleNamespace from typing import Any, Dict, Iterator, Literal from jinja2 import Environment -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.themes.components.text_field import TextFieldInput from reflex.components.tags.tag import Tag from reflex.constants.base import Dirs @@ -826,7 +825,7 @@ class Form(FormRoot): """ ... -class FormNamespace(SimpleNamespace): +class FormNamespace(ComponentNamespace): root = staticmethod(FormRoot.create) control = staticmethod(FormControl.create) field = staticmethod(FormField.create) diff --git a/reflex/components/radix/primitives/progress.py b/reflex/components/radix/primitives/progress.py index 8679a55f0..1b03a8d98 100644 --- a/reflex/components/radix/primitives/progress.py +++ b/reflex/components/radix/primitives/progress.py @@ -2,10 +2,9 @@ from __future__ import annotations -from types import SimpleNamespace from typing import Optional -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.primitives.accordion import DEFAULT_ANIMATION_DURATION from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName from reflex.style import Style @@ -74,7 +73,7 @@ class ProgressIndicator(ProgressComponent): ) -class Progress(SimpleNamespace): +class Progress(ComponentNamespace): """High level API for progress bar.""" root = staticmethod(ProgressRoot.create) diff --git a/reflex/components/radix/primitives/progress.pyi b/reflex/components/radix/primitives/progress.pyi index 0fadf594f..61b8d5edd 100644 --- a/reflex/components/radix/primitives/progress.pyi +++ b/reflex/components/radix/primitives/progress.pyi @@ -7,9 +7,8 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Optional -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.primitives.accordion import DEFAULT_ANIMATION_DURATION from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName from reflex.style import Style @@ -266,7 +265,7 @@ class ProgressIndicator(ProgressComponent): """ ... -class Progress(SimpleNamespace): +class Progress(ComponentNamespace): root = staticmethod(ProgressRoot.create) indicator = staticmethod(ProgressIndicator.create) diff --git a/reflex/components/radix/primitives/slider.py b/reflex/components/radix/primitives/slider.py index c4e82ba88..94560c3f0 100644 --- a/reflex/components/radix/primitives/slider.py +++ b/reflex/components/radix/primitives/slider.py @@ -2,10 +2,9 @@ from __future__ import annotations -from types import SimpleNamespace from typing import Any, Dict, List, Literal -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName from reflex.style import Style from reflex.vars import Var @@ -149,7 +148,7 @@ class SliderThumb(SliderComponent): ) -class Slider(SimpleNamespace): +class Slider(ComponentNamespace): """High level API for slider.""" root = staticmethod(SliderRoot.create) diff --git a/reflex/components/radix/primitives/slider.pyi b/reflex/components/radix/primitives/slider.pyi index da2228c90..62940118f 100644 --- a/reflex/components/radix/primitives/slider.pyi +++ b/reflex/components/radix/primitives/slider.pyi @@ -7,9 +7,8 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, List, Literal -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName from reflex.style import Style from reflex.vars import Var @@ -445,7 +444,7 @@ class SliderThumb(SliderComponent): """ ... -class Slider(SimpleNamespace): +class Slider(ComponentNamespace): root = staticmethod(SliderRoot.create) track = staticmethod(SliderTrack.create) range = staticmethod(SliderRange.create) diff --git a/reflex/components/radix/themes/components/alert_dialog.py b/reflex/components/radix/themes/components/alert_dialog.py index 2990c96b0..81b8bb0af 100644 --- a/reflex/components/radix/themes/components/alert_dialog.py +++ b/reflex/components/radix/themes/components/alert_dialog.py @@ -1,8 +1,8 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var @@ -95,7 +95,7 @@ class AlertDialogCancel(RadixThemesComponent): tag = "AlertDialog.Cancel" -class AlertDialog(SimpleNamespace): +class AlertDialog(ComponentNamespace): """AlertDialog components namespace.""" root = staticmethod(AlertDialogRoot.create) diff --git a/reflex/components/radix/themes/components/alert_dialog.pyi b/reflex/components/radix/themes/components/alert_dialog.pyi index 999cfe1aa..5ad8e5436 100644 --- a/reflex/components/radix/themes/components/alert_dialog.pyi +++ b/reflex/components/radix/themes/components/alert_dialog.pyi @@ -7,9 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var from ..base import RadixThemesComponent @@ -647,7 +647,7 @@ class AlertDialogCancel(RadixThemesComponent): """ ... -class AlertDialog(SimpleNamespace): +class AlertDialog(ComponentNamespace): root = staticmethod(AlertDialogRoot.create) trigger = staticmethod(AlertDialogTrigger.create) content = staticmethod(AlertDialogContent.create) diff --git a/reflex/components/radix/themes/components/callout.py b/reflex/components/radix/themes/components/callout.py index 23f6de650..5eaf1cac0 100644 --- a/reflex/components/radix/themes/components/callout.py +++ b/reflex/components/radix/themes/components/callout.py @@ -1,11 +1,10 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Literal, Union import reflex as rx from reflex import el -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.lucide.icon import Icon from reflex.vars import Var @@ -81,7 +80,7 @@ class Callout(CalloutRoot): ) -class CalloutNamespace(SimpleNamespace): +class CalloutNamespace(ComponentNamespace): """Callout components namespace.""" root = staticmethod(CalloutRoot.create) diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index 7f792ee38..c96c59b64 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -7,11 +7,10 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Literal, Union import reflex as rx from reflex import el -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.lucide.icon import Icon from reflex.vars import Var from ..base import LiteralAccentColor, RadixThemesComponent @@ -715,7 +714,7 @@ class Callout(CalloutRoot): """ ... -class CalloutNamespace(SimpleNamespace): +class CalloutNamespace(ComponentNamespace): root = staticmethod(CalloutRoot.create) icon = staticmethod(CalloutIcon.create) text = staticmethod(CalloutText.create) diff --git a/reflex/components/radix/themes/components/checkbox.py b/reflex/components/radix/themes/components/checkbox.py index 2303b8667..250a1da4c 100644 --- a/reflex/components/radix/themes/components/checkbox.py +++ b/reflex/components/radix/themes/components/checkbox.py @@ -1,9 +1,8 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, Literal -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.constants import EventTriggers @@ -162,7 +161,7 @@ class HighLevelCheckbox(RadixThemesComponent): ) -class CheckboxNamespace(SimpleNamespace): +class CheckboxNamespace(ComponentNamespace): """Checkbox components namespace.""" __call__ = staticmethod(HighLevelCheckbox.create) diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index 2cce04e90..fe0c4d998 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -7,9 +7,8 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, Literal -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.constants import EventTriggers @@ -371,7 +370,7 @@ class HighLevelCheckbox(RadixThemesComponent): """ ... -class CheckboxNamespace(SimpleNamespace): +class CheckboxNamespace(ComponentNamespace): @staticmethod def __call__( *children, diff --git a/reflex/components/radix/themes/components/context_menu.py b/reflex/components/radix/themes/components/context_menu.py index acb886ef0..7631d7970 100644 --- a/reflex/components/radix/themes/components/context_menu.py +++ b/reflex/components/radix/themes/components/context_menu.py @@ -1,7 +1,7 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, List, Literal +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var @@ -147,7 +147,7 @@ class ContextMenuSeparator(RadixThemesComponent): tag = "ContextMenu.Separator" -class ContextMenu(SimpleNamespace): +class ContextMenu(ComponentNamespace): """Menu representing a set of actions, displayed at the origin of a pointer right-click or long-press.""" root = staticmethod(ContextMenuRoot.create) diff --git a/reflex/components/radix/themes/components/context_menu.pyi b/reflex/components/radix/themes/components/context_menu.pyi index 03fd2c4c4..0f8a0b771 100644 --- a/reflex/components/radix/themes/components/context_menu.pyi +++ b/reflex/components/radix/themes/components/context_menu.pyi @@ -7,8 +7,8 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, List, Literal +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var from ..base import LiteralAccentColor, RadixThemesComponent @@ -826,7 +826,7 @@ class ContextMenuSeparator(RadixThemesComponent): """ ... -class ContextMenu(SimpleNamespace): +class ContextMenu(ComponentNamespace): root = staticmethod(ContextMenuRoot.create) trigger = staticmethod(ContextMenuTrigger.create) content = staticmethod(ContextMenuContent.create) diff --git a/reflex/components/radix/themes/components/dialog.py b/reflex/components/radix/themes/components/dialog.py index 6001ab14e..ebc80b5a3 100644 --- a/reflex/components/radix/themes/components/dialog.py +++ b/reflex/components/radix/themes/components/dialog.py @@ -1,9 +1,9 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var @@ -80,7 +80,7 @@ class DialogClose(RadixThemesComponent): tag = "Dialog.Close" -class Dialog(SimpleNamespace): +class Dialog(ComponentNamespace): """Dialog components namespace.""" root = __call__ = staticmethod(DialogRoot.create) diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi index ca5939a0a..426b553a8 100644 --- a/reflex/components/radix/themes/components/dialog.pyi +++ b/reflex/components/radix/themes/components/dialog.pyi @@ -7,9 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var from ..base import RadixThemesComponent @@ -570,7 +570,7 @@ class DialogClose(RadixThemesComponent): """ ... -class Dialog(SimpleNamespace): +class Dialog(ComponentNamespace): root = staticmethod(DialogRoot.create) trigger = staticmethod(DialogTrigger.create) title = staticmethod(DialogTitle.create) diff --git a/reflex/components/radix/themes/components/dropdown_menu.py b/reflex/components/radix/themes/components/dropdown_menu.py index b2516670a..013684975 100644 --- a/reflex/components/radix/themes/components/dropdown_menu.py +++ b/reflex/components/radix/themes/components/dropdown_menu.py @@ -1,7 +1,7 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, List, Literal, Union +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var @@ -272,7 +272,7 @@ class DropdownMenuSeparator(RadixThemesComponent): tag = "DropdownMenu.Separator" -class DropdownMenu(SimpleNamespace): +class DropdownMenu(ComponentNamespace): """DropdownMenu components namespace.""" root = staticmethod(DropdownMenuRoot.create) diff --git a/reflex/components/radix/themes/components/dropdown_menu.pyi b/reflex/components/radix/themes/components/dropdown_menu.pyi index 7f2d840d8..0ece0d499 100644 --- a/reflex/components/radix/themes/components/dropdown_menu.pyi +++ b/reflex/components/radix/themes/components/dropdown_menu.pyi @@ -7,8 +7,8 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, List, Literal, Union +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var from ..base import LiteralAccentColor, RadixThemesComponent @@ -927,7 +927,7 @@ class DropdownMenuSeparator(RadixThemesComponent): """ ... -class DropdownMenu(SimpleNamespace): +class DropdownMenu(ComponentNamespace): root = staticmethod(DropdownMenuRoot.create) trigger = staticmethod(DropdownMenuTrigger.create) content = staticmethod(DropdownMenuContent.create) diff --git a/reflex/components/radix/themes/components/hover_card.py b/reflex/components/radix/themes/components/hover_card.py index ab3fdcea3..aee639302 100644 --- a/reflex/components/radix/themes/components/hover_card.py +++ b/reflex/components/radix/themes/components/hover_card.py @@ -1,8 +1,8 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var @@ -64,7 +64,7 @@ class HoverCardContent(el.Div, RadixThemesComponent): avoid_collisions: Var[bool] -class HoverCard(SimpleNamespace): +class HoverCard(ComponentNamespace): """For sighted users to preview content available behind a link.""" root = __call__ = staticmethod(HoverCardRoot.create) diff --git a/reflex/components/radix/themes/components/hover_card.pyi b/reflex/components/radix/themes/components/hover_card.pyi index d732ce561..b67efe97e 100644 --- a/reflex/components/radix/themes/components/hover_card.pyi +++ b/reflex/components/radix/themes/components/hover_card.pyi @@ -7,9 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var from ..base import RadixThemesComponent @@ -337,7 +337,7 @@ class HoverCardContent(el.Div, RadixThemesComponent): """ ... -class HoverCard(SimpleNamespace): +class HoverCard(ComponentNamespace): root = staticmethod(HoverCardRoot.create) trigger = staticmethod(HoverCardTrigger.create) content = staticmethod(HoverCardContent.create) diff --git a/reflex/components/radix/themes/components/popover.py b/reflex/components/radix/themes/components/popover.py index 5132e0aea..97250fc0e 100644 --- a/reflex/components/radix/themes/components/popover.py +++ b/reflex/components/radix/themes/components/popover.py @@ -1,8 +1,8 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var @@ -86,7 +86,7 @@ class PopoverClose(RadixThemesComponent): tag = "Popover.Close" -class Popover(SimpleNamespace): +class Popover(ComponentNamespace): """Floating element for displaying rich content, triggered by a button.""" root = staticmethod(PopoverRoot.create) diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index e81f03be2..d60597785 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -7,9 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var from ..base import RadixThemesComponent @@ -437,7 +437,7 @@ class PopoverClose(RadixThemesComponent): """ ... -class Popover(SimpleNamespace): +class Popover(ComponentNamespace): root = staticmethod(PopoverRoot.create) trigger = staticmethod(PopoverTrigger.create) content = staticmethod(PopoverContent.create) diff --git a/reflex/components/radix/themes/components/radio_group.py b/reflex/components/radix/themes/components/radio_group.py index 61d700ec9..ad7a0f10a 100644 --- a/reflex/components/radix/themes/components/radio_group.py +++ b/reflex/components/radix/themes/components/radio_group.py @@ -1,10 +1,9 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union import reflex as rx -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.constants import EventTriggers @@ -189,7 +188,7 @@ class HighLevelRadioGroup(RadixThemesComponent): ) -class RadioGroup(SimpleNamespace): +class RadioGroup(ComponentNamespace): """RadioGroup components namespace.""" root = staticmethod(RadioGroupRoot.create) diff --git a/reflex/components/radix/themes/components/radio_group.pyi b/reflex/components/radix/themes/components/radio_group.pyi index 782c8ca8c..0fec881ba 100644 --- a/reflex/components/radix/themes/components/radio_group.pyi +++ b/reflex/components/radix/themes/components/radio_group.pyi @@ -7,10 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, List, Literal, Optional, Union import reflex as rx -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.constants import EventTriggers @@ -451,7 +450,7 @@ class HighLevelRadioGroup(RadixThemesComponent): """ ... -class RadioGroup(SimpleNamespace): +class RadioGroup(ComponentNamespace): root = staticmethod(RadioGroupRoot.create) item = staticmethod(RadioGroupItem.create) diff --git a/reflex/components/radix/themes/components/select.py b/reflex/components/radix/themes/components/select.py index 3545852e9..9331f0b3e 100644 --- a/reflex/components/radix/themes/components/select.py +++ b/reflex/components/radix/themes/components/select.py @@ -1,9 +1,8 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, List, Literal, Union import reflex as rx -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var @@ -236,7 +235,7 @@ class HighLevelSelect(SelectRoot): ) -class Select(SimpleNamespace): +class Select(ComponentNamespace): """Select components namespace.""" root = staticmethod(SelectRoot.create) diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi index b93c7c0d6..f0a002b77 100644 --- a/reflex/components/radix/themes/components/select.pyi +++ b/reflex/components/radix/themes/components/select.pyi @@ -7,10 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, List, Literal, Union import reflex as rx -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent @@ -967,7 +966,7 @@ class HighLevelSelect(SelectRoot): """ ... -class Select(SimpleNamespace): +class Select(ComponentNamespace): root = staticmethod(SelectRoot.create) trigger = staticmethod(SelectTrigger.create) content = staticmethod(SelectContent.create) diff --git a/reflex/components/radix/themes/components/table.py b/reflex/components/radix/themes/components/table.py index aa032f318..a2b3bada3 100644 --- a/reflex/components/radix/themes/components/table.py +++ b/reflex/components/radix/themes/components/table.py @@ -1,8 +1,8 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import List, Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.vars import Var from ..base import ( @@ -111,7 +111,7 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): ] -class Table(SimpleNamespace): +class Table(ComponentNamespace): """Table components namespace.""" root = staticmethod(TableRoot.create) diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index 73b9fa7e2..5220601ce 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -7,9 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import List, Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.vars import Var from ..base import RadixThemesComponent @@ -1066,7 +1066,7 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent): """ ... -class Table(SimpleNamespace): +class Table(ComponentNamespace): root = staticmethod(TableRoot.create) header = staticmethod(TableHeader.create) body = staticmethod(TableBody.create) diff --git a/reflex/components/radix/themes/components/tabs.py b/reflex/components/radix/themes/components/tabs.py index 18ce4726b..b0a169741 100644 --- a/reflex/components/radix/themes/components/tabs.py +++ b/reflex/components/radix/themes/components/tabs.py @@ -1,7 +1,7 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, List, Literal +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var @@ -71,7 +71,7 @@ class TabsContent(RadixThemesComponent): value: Var[str] -class Tabs(SimpleNamespace): +class Tabs(ComponentNamespace): """Set of content sections to be displayed one at a time.""" root = __call__ = staticmethod(TabsRoot.create) diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi index af4c66db3..87b8df31d 100644 --- a/reflex/components/radix/themes/components/tabs.pyi +++ b/reflex/components/radix/themes/components/tabs.pyi @@ -7,8 +7,8 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, List, Literal +from reflex.components.component import ComponentNamespace from reflex.constants import EventTriggers from reflex.vars import Var from ..base import RadixThemesComponent @@ -352,7 +352,7 @@ class TabsContent(RadixThemesComponent): """ ... -class Tabs(SimpleNamespace): +class Tabs(ComponentNamespace): root = staticmethod(TabsRoot.create) list = staticmethod(TabsList.create) trigger = staticmethod(TabsTrigger.create) diff --git a/reflex/components/radix/themes/components/text_field.py b/reflex/components/radix/themes/components/text_field.py index 8f25e75aa..74b88fd27 100644 --- a/reflex/components/radix/themes/components/text_field.py +++ b/reflex/components/radix/themes/components/text_field.py @@ -1,10 +1,9 @@ """Interactive components provided by @radix-ui/themes.""" -from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.components import el -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.core.debounce import DebounceInput from reflex.constants import EventTriggers from reflex.vars import Var @@ -159,7 +158,7 @@ class Input(RadixThemesComponent): } -class TextField(SimpleNamespace): +class TextField(ComponentNamespace): """TextField components namespace.""" root = staticmethod(TextFieldRoot.create) diff --git a/reflex/components/radix/themes/components/text_field.pyi b/reflex/components/radix/themes/components/text_field.pyi index c6f88b2e9..24239f93d 100644 --- a/reflex/components/radix/themes/components/text_field.pyi +++ b/reflex/components/radix/themes/components/text_field.pyi @@ -7,10 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Any, Dict, Literal from reflex.components import el -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.core.debounce import DebounceInput from reflex.constants import EventTriggers from reflex.vars import Var @@ -888,7 +887,7 @@ class Input(RadixThemesComponent): ... def get_event_triggers(self) -> Dict[str, Any]: ... -class TextField(SimpleNamespace): +class TextField(ComponentNamespace): root = staticmethod(TextFieldRoot.create) input = staticmethod(TextFieldInput.create) slot = staticmethod(TextFieldSlot.create) diff --git a/reflex/components/radix/themes/layout/list.py b/reflex/components/radix/themes/layout/list.py index 0de3b7dcc..8d458910b 100644 --- a/reflex/components/radix/themes/layout/list.py +++ b/reflex/components/radix/themes/layout/list.py @@ -1,9 +1,8 @@ """List components.""" -from types import SimpleNamespace from typing import Iterable, Literal, Optional, Union -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.core.foreach import Foreach from reflex.components.el.elements.typography import Li from reflex.style import Style @@ -142,7 +141,7 @@ class ListItem(Li): ... -class List(SimpleNamespace): +class List(ComponentNamespace): """List components.""" item = ListItem.create diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi index f28c6223b..4ee3f65dd 100644 --- a/reflex/components/radix/themes/layout/list.pyi +++ b/reflex/components/radix/themes/layout/list.pyi @@ -7,9 +7,8 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Iterable, Literal, Optional, Union -from reflex.components.component import Component +from reflex.components.component import Component, ComponentNamespace from reflex.components.core.foreach import Foreach from reflex.components.el.elements.typography import Li from reflex.style import Style @@ -1014,7 +1013,7 @@ class ListItem(Li): """ ... -class List(SimpleNamespace): +class List(ComponentNamespace): item = ListItem.create ordered = OrderedList.create unordered = UnorderedList.create diff --git a/reflex/components/radix/themes/typography/text.py b/reflex/components/radix/themes/typography/text.py index 7657301a2..96512fe58 100644 --- a/reflex/components/radix/themes/typography/text.py +++ b/reflex/components/radix/themes/typography/text.py @@ -5,10 +5,10 @@ https://www.radix-ui.com/themes/docs/theme/typography from __future__ import annotations -from types import SimpleNamespace from typing import Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.vars import Var from ..base import ( @@ -107,7 +107,7 @@ class Strong(el.Strong, RadixThemesComponent): tag = "Strong" -class TextNamespace(SimpleNamespace): +class TextNamespace(ComponentNamespace): """Checkbox components namespace.""" __call__ = staticmethod(Text.create) diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index 277ee1407..054b331d9 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -7,9 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from types import SimpleNamespace from typing import Literal from reflex import el +from reflex.components.component import ComponentNamespace from reflex.vars import Var from ..base import LiteralAccentColor, RadixThemesComponent from .base import LiteralTextAlign, LiteralTextSize, LiteralTextTrim, LiteralTextWeight @@ -1138,7 +1138,7 @@ class Strong(el.Strong, RadixThemesComponent): """ ... -class TextNamespace(SimpleNamespace): +class TextNamespace(ComponentNamespace): em = staticmethod(Em.create) kbd = staticmethod(Kbd.create) quote = staticmethod(Quote.create) diff --git a/tests/test_style.py b/tests/test_style.py index cbe2b2ac1..ccc7b6569 100644 --- a/tests/test_style.py +++ b/tests/test_style.py @@ -6,6 +6,7 @@ import pytest import reflex as rx from reflex import style +from reflex.components.component import evaluate_style_namespaces from reflex.style import Style from reflex.vars import Var @@ -494,3 +495,11 @@ def test_style_via_component_with_state( assert comp.style._var_data == expected_get_style["css"]._var_data # Assert that style values are equal. compare_dict_of_var(comp._get_style(), expected_get_style) + + +def test_evaluate_style_namespaces(): + """Test that namespaces get converted to component create functions.""" + style_dict = {rx.text: {"color": "blue"}} + assert rx.text.__call__ not in style_dict + style_dict = evaluate_style_namespaces(style_dict) # type: ignore + assert rx.text.__call__ in style_dict From b03fa5709f34510b78671abc53fcb646728e4226 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 15 Feb 2024 18:15:44 -0800 Subject: [PATCH 61/68] rx.theme: Recognize `color_mode` in addition to `appearance` (#2635) --- reflex/components/radix/themes/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflex/components/radix/themes/base.py b/reflex/components/radix/themes/base.py index be7657ad4..2b4af6f83 100644 --- a/reflex/components/radix/themes/base.py +++ b/reflex/components/radix/themes/base.py @@ -162,7 +162,7 @@ class Theme(RadixThemesComponent): A new component instance. """ if color_mode is not None: - props["appearance"] = props.pop("color_mode") + props["appearance"] = color_mode return super().create(*children, **props) def _get_imports(self) -> imports.ImportDict: From f46be1d9b86c2d1d218a590dfcf3aa9895cc786e Mon Sep 17 00:00:00 2001 From: Alek Petuskey Date: Thu, 15 Feb 2024 19:58:34 -0800 Subject: [PATCH 62/68] Update new readme to match radix api (#2631) --- README.md | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 2bba09313..46b01da47 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,12 @@ Here is the complete code to create this. This is all done in one Python file! import reflex as rx import openai -openai.api_key = "YOUR_API_KEY" +openai_client = openai.OpenAI() + class State(rx.State): """The app state.""" + prompt = "" image_url = "" processing = False @@ -88,41 +90,40 @@ class State(rx.State): self.processing, self.complete = True, False yield - response = openai.Image.create(prompt=self.prompt, n=1, size="1024x1024") - self.image_url = response["data"][0]["url"] + response = openai_client.images.generate( + prompt=self.prompt, n=1, size="1024x1024" + ) + self.image_url = response.data[0].url self.processing, self.complete = False, True - def index(): return rx.center( rx.vstack( - rx.heading("DALL·E"), - rx.input(placeholder="Enter a prompt", on_blur=State.set_prompt), - rx.button( - "Generate Image", - on_click=State.get_image, - is_loading=State.processing, - width="100%", + rx.heading("DALL-E", font_size="1.5em"), + rx.input( + placeholder="Enter a prompt..", + on_blur=State.set_prompt, + width="25em", ), + rx.button("Generate Image", on_click=State.get_image, width="25em"), rx.cond( - State.complete, - rx.image( - src=State.image_url, - height="25em", - width="25em", - ) + State.processing, + rx.chakra.circular_progress(is_indeterminate=True), + rx.cond( + State.complete, + rx.image(src=State.image_url, width="20em"), + ), ), - padding="2em", - shadow="lg", - border_radius="lg", + align="center", ), width="100%", height="100vh", ) + # Add state and page to the app. app = rx.App() -app.add_page(index, title="reflex:DALL·E") +app.add_page(index, title="Reflex:DALL-E") ``` ## Let's break this down. @@ -156,6 +157,7 @@ class State(rx.State): image_url = "" processing = False complete = False + ``` The state defines all the variables (called vars) in an app that can change and the functions that change them. @@ -172,8 +174,10 @@ def get_image(self): self.processing, self.complete = True, False yield - response = openai.Image.create(prompt=self.prompt, n=1, size="1024x1024") - self.image_url = response["data"][0]["url"] + response = openai_client.images.generate( + prompt=self.prompt, n=1, size="1024x1024" + ) + self.image_url = response.data[0].url self.processing, self.complete = False, True ``` From 0beec0b2a6e88148adb565565f5833eac8fef1df Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Fri, 16 Feb 2024 11:34:52 +0700 Subject: [PATCH 63/68] Default high level radio to horizontal (#2637) --- reflex/components/radix/themes/components/radio_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflex/components/radix/themes/components/radio_group.py b/reflex/components/radix/themes/components/radio_group.py index ad7a0f10a..7ff901f37 100644 --- a/reflex/components/radix/themes/components/radio_group.py +++ b/reflex/components/radix/themes/components/radio_group.py @@ -87,7 +87,7 @@ class HighLevelRadioGroup(RadixThemesComponent): items: Var[List[str]] # The direction of the radio group. - direction: Var[LiteralFlexDirection] = Var.create_safe("column") + direction: Var[LiteralFlexDirection] # The gap between the items of the radio group. spacing: Var[LiteralSpacing] = Var.create_safe("2") From 3350fa038849f07d9ae7d7d5ceda115e96b53e2a Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 15 Feb 2024 20:46:06 -0800 Subject: [PATCH 64/68] Component: translate underscore suffix for props supported by chakra (#2636) * Component: translate underscore suffix for props supported by chakra type_ becomes type min_ becomes min max_ becomes max id_ becomes id The deprecation warning is only displayed when the underscore suffix prop is passed and the non-underscore suffix prop is defined on the given component. * Rename type_ to type in accordion and scroll_area All of the new radix components avoid the underscore suffix names where possible. * Update deprecation warning wording * Refactor for readability * Do not raise deprecation warning for `id_` id is kind of a special prop because it exists on all components * Add test case for deprecating underscore suffix props --- reflex/components/component.py | 15 +++++ .../components/radix/primitives/accordion.py | 2 +- .../components/radix/primitives/accordion.pyi | 4 +- .../radix/themes/components/scroll_area.py | 2 +- .../radix/themes/components/scroll_area.pyi | 4 +- tests/components/test_component.py | 56 +++++++++++++++++++ 6 files changed, 77 insertions(+), 6 deletions(-) diff --git a/reflex/components/component.py b/reflex/components/component.py index 5c71216f1..ffee162fa 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -598,6 +598,21 @@ class Component(BaseComponent, ABC): # Import here to avoid circular imports. from reflex.components.base.bare import Bare + # Translate deprecated props to new names. + new_prop_names = [ + prop for prop in cls.get_props() if prop in ["type", "min", "max"] + ] + for prop in new_prop_names: + under_prop = f"{prop}_" + if under_prop in props: + console.deprecate( + f"Underscore suffix for prop `{under_prop}`", + reason=f"for consistency. Use `{prop}` instead.", + deprecation_version="0.4.0", + removal_version="0.5.0", + ) + props[prop] = props.pop(under_prop) + # Validate all the children. for child in children: # Make sure the child is a valid type. diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index da790b0b2..cf5e630ab 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -311,7 +311,7 @@ class AccordionRoot(AccordionComponent): alias = "RadixAccordionRoot" # The type of accordion (single or multiple). - type_: Var[LiteralAccordionType] + type: Var[LiteralAccordionType] # The value of the item to expand. value: Var[Optional[Union[str, List[str]]]] diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index e5b94bf7b..457e53ee0 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -125,7 +125,7 @@ class AccordionRoot(AccordionComponent): def create( # type: ignore cls, *children, - type_: Optional[ + type: Optional[ Union[Var[Literal["single", "multiple"]], Literal["single", "multiple"]] ] = None, value: Optional[ @@ -274,7 +274,7 @@ class AccordionRoot(AccordionComponent): Args: *children: The children of the component. - type_: The type of accordion (single or multiple). + type: The type of accordion (single or multiple). value: The value of the item to expand. default_value: The default value of the item to expand. collapsible: Whether or not the accordion is collapsible. diff --git a/reflex/components/radix/themes/components/scroll_area.py b/reflex/components/radix/themes/components/scroll_area.py index f829b5b8d..b7b79286b 100644 --- a/reflex/components/radix/themes/components/scroll_area.py +++ b/reflex/components/radix/themes/components/scroll_area.py @@ -17,7 +17,7 @@ class ScrollArea(RadixThemesComponent): scrollbars: Var[Literal["vertical", "horizontal", "both"]] # Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars. "auto" | "always" | "scroll" | "hover" - type_: Var[Literal["auto", "always", "scroll", "hover"]] + type: Var[Literal["auto", "always", "scroll", "hover"]] # If type is set to either "scroll" or "hover", this prop determines the length of time, in milliseconds, before the scrollbars are hidden after the user stops interacting with scrollbars. scroll_hide_delay: Var[int] diff --git a/reflex/components/radix/themes/components/scroll_area.pyi b/reflex/components/radix/themes/components/scroll_area.pyi index 2202990df..676cc41ae 100644 --- a/reflex/components/radix/themes/components/scroll_area.pyi +++ b/reflex/components/radix/themes/components/scroll_area.pyi @@ -23,7 +23,7 @@ class ScrollArea(RadixThemesComponent): Literal["vertical", "horizontal", "both"], ] ] = None, - type_: Optional[ + type: Optional[ Union[ Var[Literal["auto", "always", "scroll", "hover"]], Literal["auto", "always", "scroll", "hover"], @@ -91,7 +91,7 @@ class ScrollArea(RadixThemesComponent): Args: *children: Child components. scrollbars: The alignment of the scroll area - type_: Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars. "auto" | "always" | "scroll" | "hover" + type: Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars. "auto" | "always" | "scroll" | "hover" scroll_hide_delay: If type is set to either "scroll" or "hover", this prop determines the length of time, in milliseconds, before the scrollbars are hidden after the user stops interacting with scrollbars. style: The style of the component. key: A unique key for the component. diff --git a/tests/components/test_component.py b/tests/components/test_component.py index 74656c5c1..04468b2ba 100644 --- a/tests/components/test_component.py +++ b/tests/components/test_component.py @@ -1213,3 +1213,59 @@ def test_rename_props(): assert "renamed_prop1={`prop1_2`}" in rendered_c2["props"] assert "subclass_prop2={`prop2_2`}" in rendered_c2["props"] assert "renamed_prop3={`prop3_2`}" in rendered_c2["props"] + + +def test_deprecated_props(capsys): + """Assert that deprecated underscore suffix props are translated. + + Args: + capsys: Pytest fixture for capturing stdout and stderr. + """ + + class C1(Component): + tag = "C1" + + type: Var[str] + min: Var[str] + max: Var[str] + + # No warnings are emitted when using the new prop names. + c1_1 = C1.create(type="type1", min="min1", max="max1") + out_err = capsys.readouterr() + assert not out_err.err + assert not out_err.out + + c1_1_render = c1_1.render() + assert "type={`type1`}" in c1_1_render["props"] + assert "min={`min1`}" in c1_1_render["props"] + assert "max={`max1`}" in c1_1_render["props"] + + # Deprecation warning is emitted with underscore suffix, + # but the component still works. + c1_2 = C1.create(type_="type2", min_="min2", max_="max2") + out_err = capsys.readouterr() + assert out_err.out.count("DeprecationWarning:") == 3 + assert not out_err.err + + c1_2_render = c1_2.render() + assert "type={`type2`}" in c1_2_render["props"] + assert "min={`min2`}" in c1_2_render["props"] + assert "max={`max2`}" in c1_2_render["props"] + + class C2(Component): + tag = "C2" + + type_: Var[str] + min_: Var[str] + max_: Var[str] + + # No warnings are emitted if the actual prop has an underscore suffix + c2_1 = C2.create(type_="type1", min_="min1", max_="max1") + out_err = capsys.readouterr() + assert not out_err.err + assert not out_err.out + + c2_1_render = c2_1.render() + assert "type={`type1`}" in c2_1_render["props"] + assert "min={`min1`}" in c2_1_render["props"] + assert "max={`max1`}" in c2_1_render["props"] From 1698e3e5e3d237a757c3a0c0b1ab21dd9a30e8ea Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 15 Feb 2024 20:51:06 -0800 Subject: [PATCH 65/68] Fix more information link to v0.4.0 blog post (#2638) --- reflex/utils/prerequisites.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 48d587b7c..f4dd5146d 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -983,7 +983,7 @@ def show_rx_chakra_migration_instructions(): ) console.log("") console.log( - "For more details, please see https://reflex.dev/blog/2024-02-15-reflex-v0.4.0" + "For more details, please see https://reflex.dev/blog/2024-02-16-reflex-v0.4.0" ) From 10984ef8691cdf26f1ec47dc51ff4a30f206887b Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 15 Feb 2024 22:48:52 -0800 Subject: [PATCH 66/68] Quick fixes for regressions in 0.4.0 (#2639) * rx.el.img accepts Any type for src prop This retains compatibility with the previous chakra image src prop. * Re-add `moment` back to top-level namespace --- reflex/__init__.py | 1 + reflex/__init__.pyi | 1 + reflex/components/el/elements/media.py | 4 ++-- reflex/components/el/elements/media.pyi | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/reflex/__init__.py b/reflex/__init__.py index 690789b89..276c05b99 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -107,6 +107,7 @@ _ALL_COMPONENTS = [ "list_item", "unordered_list", "ordered_list", + "moment", ] _MAPPING = { diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi index e6de5a505..65e8f36fe 100644 --- a/reflex/__init__.pyi +++ b/reflex/__init__.pyi @@ -93,6 +93,7 @@ from reflex.components import markdown as markdown from reflex.components import list_item as list_item from reflex.components import unordered_list as unordered_list from reflex.components import ordered_list as ordered_list +from reflex.components import moment as moment from reflex.components.component import Component as Component from reflex.components.component import NoSSRComponent as NoSSRComponent from reflex.components.component import memo as memo diff --git a/reflex/components/el/elements/media.py b/reflex/components/el/elements/media.py index 787404ceb..2865ca66a 100644 --- a/reflex/components/el/elements/media.py +++ b/reflex/components/el/elements/media.py @@ -1,5 +1,5 @@ """Element classes. This is an auto-generated file. Do not edit. See ../generate.py.""" -from typing import Union +from typing import Any, Union from reflex.vars import Var as Var @@ -108,7 +108,7 @@ class Img(BaseHTML): sizes: Var[Union[str, int, bool]] # URL of the image to display - src: Var[Union[str, int, bool]] + src: Var[Any] # A set of source sizes and URLs for responsive images src_set: Var[Union[str, int, bool]] diff --git a/reflex/components/el/elements/media.pyi b/reflex/components/el/elements/media.pyi index 5e0316199..6003986bd 100644 --- a/reflex/components/el/elements/media.pyi +++ b/reflex/components/el/elements/media.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from typing import Union +from typing import Any, Union from reflex.vars import Var as Var from .base import BaseHTML @@ -376,7 +376,7 @@ class Img(BaseHTML): sizes: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, + src: Optional[Union[Var[Any], Any]] = None, src_set: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, From 3f24b422607f4e9938e45ffff14d3dbc773f40bc Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Fri, 16 Feb 2024 17:41:02 +0000 Subject: [PATCH 67/68] Drawer component styles should only be in css dict (#2640) --- reflex/components/radix/primitives/drawer.py | 28 +++----------------- reflex/components/tags/tag.py | 6 ++++- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/reflex/components/radix/primitives/drawer.py b/reflex/components/radix/primitives/drawer.py index b268180aa..76fc5ab2f 100644 --- a/reflex/components/radix/primitives/drawer.py +++ b/reflex/components/radix/primitives/drawer.py @@ -119,12 +119,7 @@ class DrawerContent(DrawerComponent): } style = self.style or {} base_style.update(style) - self.style.update( - { - "css": base_style, - } - ) - return self.style + return {"css": base_style} def get_event_triggers(self) -> Dict[str, Any]: """Get the events triggers signatures for the component. @@ -188,12 +183,7 @@ class DrawerOverlay(DrawerComponent): } style = self.style or {} base_style.update(style) - self.style.update( - { - "css": base_style, - } - ) - return self.style + return {"css": base_style} class DrawerClose(DrawerComponent): @@ -226,12 +216,7 @@ class DrawerTitle(DrawerComponent): } style = self.style or {} base_style.update(style) - self.style.update( - { - "css": base_style, - } - ) - return self.style + return {"css": base_style} class DrawerDescription(DrawerComponent): @@ -253,12 +238,7 @@ class DrawerDescription(DrawerComponent): } style = self.style or {} base_style.update(style) - self.style.update( - { - "css": base_style, - } - ) - return self.style + return {"css": base_style} class Drawer(ComponentNamespace): diff --git a/reflex/components/tags/tag.py b/reflex/components/tags/tag.py index 6bb53a428..27b5dc7c1 100644 --- a/reflex/components/tags/tag.py +++ b/reflex/components/tags/tag.py @@ -62,11 +62,15 @@ class Tag(Base): Returns: The tag with the props added. """ + from reflex.components.core.colors import Color + self.props.update( { format.to_camel_case(name, allow_hyphens=True): prop if types._isinstance(prop, Union[EventChain, dict]) - else Var.create(prop) + else Var.create( + prop, _var_is_string=isinstance(prop, Color) + ) # rx.color is always a string for name, prop in kwargs.items() if self.is_valid_prop(prop) } From 58f200231d3bf39251f4d6ddeadd2ab092262056 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 16 Feb 2024 09:42:07 -0800 Subject: [PATCH 68/68] Bump package version to 0.4.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 58586e160..f3a4c8bed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "reflex" -version = "0.3.10" +version = "0.4.0" description = "Web apps in pure Python." license = "Apache-2.0" authors = [