diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py index 60c5fce902..81575c5b22 100644 --- a/reflex/components/radix/primitives/accordion.py +++ b/reflex/components/radix/primitives/accordion.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Literal, Optional, Tuple, Union +from typing import Any, List, Literal, Tuple, Union from reflex.components.component import Component, ComponentNamespace from reflex.components.core.colors import color @@ -194,9 +194,9 @@ class AccordionItem(AccordionComponent): disabled: Var[bool] # The header of the accordion item. - header: Optional[Union[Component, str, Var[Union[Component, str]]]] = None + header: Var[Union[Component, str]] = Var.create(None) # The content of the accordion item. - content: Optional[Union[Component, str, Var[Union[Component, str]]]] = None + content: Var[Union[Component, str]] = Var.create(None) _valid_children: List[str] = [ "AccordionHeader", diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi index 54fdd39b3f..8ea5b78123 100644 --- a/reflex/components/radix/primitives/accordion.pyi +++ b/reflex/components/radix/primitives/accordion.pyi @@ -304,12 +304,8 @@ class AccordionItem(AccordionComponent): *children, value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, - header: Optional[ - Union[Component, Union[Component, Var[Union[Component, str]], str], str] - ] = None, - content: Optional[ - Union[Component, Union[Component, Var[Union[Component, str]], str], str] - ] = None, + header: Optional[Union[Component, Var[Union[Component, str]], str]] = None, + content: Optional[Union[Component, Var[Union[Component, str]], str]] = None, color_scheme: Optional[ Union[ Literal[ diff --git a/reflex/components/radix/themes/color_mode.py b/reflex/components/radix/themes/color_mode.py index ffb0ff7504..a01d40e075 100644 --- a/reflex/components/radix/themes/color_mode.py +++ b/reflex/components/radix/themes/color_mode.py @@ -116,7 +116,7 @@ def create( The button component. """ position = props.pop("position", None) - allow_system = props.pop("allow_system", None) + allow_system = props.pop("allow_system", False) # position is used to set nice defaults for positioning the icon button if isinstance(position, Var): diff --git a/reflex/components/radix/themes/layout/list.py b/reflex/components/radix/themes/layout/list.py index 9dc8ac9a6f..970dec05ae 100644 --- a/reflex/components/radix/themes/layout/list.py +++ b/reflex/components/radix/themes/layout/list.py @@ -47,7 +47,7 @@ class BaseList(Component): ] = "none" # A list of items to add to the list. - items: Optional[Union[Iterable, Var[Iterable]]] = None + items: Var[Iterable] = Var.create([]) @classmethod def create( @@ -99,9 +99,6 @@ class UnorderedList(BaseList, Ul): tag = "ul" - # The style of the list. - list_style_type: LiteralListStyleTypeUnordered = "disc" - @classmethod def create( cls, @@ -132,9 +129,6 @@ class OrderedList(BaseList, Ol): tag = "ol" - # The style of the list. - list_style_type: LiteralListStyleTypeOrdered = "decimal" - @classmethod def create( cls, diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi index 3911e257c0..4bcbeae45b 100644 --- a/reflex/components/radix/themes/layout/list.pyi +++ b/reflex/components/radix/themes/layout/list.pyi @@ -56,7 +56,7 @@ class BaseList(Component): Literal["circle", "disc", "none", "square"], ] ] = None, - items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None, + items: Optional[Union[Iterable, Var[Iterable]]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -108,8 +108,28 @@ class UnorderedList(BaseList, Ul): def create( # type: ignore cls, *children, - list_style_type: Optional[LiteralListStyleTypeUnordered] = None, - items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None, + list_style_type: Optional[ + Union[ + Literal[ + "armenian", + "decimal", + "decimal-leading-zero", + "georgian", + "hiragana", + "katakana", + "lower-alpha", + "lower-greek", + "lower-latin", + "lower-roman", + "none", + "upper-alpha", + "upper-latin", + "upper-roman", + ], + Literal["circle", "disc", "none", "square"], + ] + ] = None, + items: Optional[Union[Iterable, Var[Iterable]]] = None, access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, auto_capitalize: Optional[ Union[Var[Union[bool, int, str]], bool, int, str] @@ -199,8 +219,28 @@ class OrderedList(BaseList, Ol): def create( # type: ignore cls, *children, - list_style_type: Optional[LiteralListStyleTypeOrdered] = None, - items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None, + list_style_type: Optional[ + Union[ + Literal[ + "armenian", + "decimal", + "decimal-leading-zero", + "georgian", + "hiragana", + "katakana", + "lower-alpha", + "lower-greek", + "lower-latin", + "lower-roman", + "none", + "upper-alpha", + "upper-latin", + "upper-roman", + ], + Literal["circle", "disc", "none", "square"], + ] + ] = None, + items: Optional[Union[Iterable, Var[Iterable]]] = None, reversed: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, start: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None, @@ -406,7 +446,7 @@ class List(ComponentNamespace): Literal["circle", "disc", "none", "square"], ] ] = None, - items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None, + items: Optional[Union[Iterable, Var[Iterable]]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None,