Accept suggestions
This commit is contained in:
parent
db143cfddf
commit
7ab15e23fd
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
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.component import Component, ComponentNamespace
|
||||||
from reflex.components.core.colors import color
|
from reflex.components.core.colors import color
|
||||||
@ -194,9 +194,9 @@ class AccordionItem(AccordionComponent):
|
|||||||
disabled: Var[bool]
|
disabled: Var[bool]
|
||||||
|
|
||||||
# The header of the accordion item.
|
# 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.
|
# 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] = [
|
_valid_children: List[str] = [
|
||||||
"AccordionHeader",
|
"AccordionHeader",
|
||||||
|
@ -304,12 +304,8 @@ class AccordionItem(AccordionComponent):
|
|||||||
*children,
|
*children,
|
||||||
value: Optional[Union[Var[str], str]] = None,
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
header: Optional[
|
header: Optional[Union[Component, Var[Union[Component, str]], str]] = None,
|
||||||
Union[Component, Union[Component, Var[Union[Component, str]], str], str]
|
content: Optional[Union[Component, Var[Union[Component, str]], str]] = None,
|
||||||
] = None,
|
|
||||||
content: Optional[
|
|
||||||
Union[Component, Union[Component, Var[Union[Component, str]], str], str]
|
|
||||||
] = None,
|
|
||||||
color_scheme: Optional[
|
color_scheme: Optional[
|
||||||
Union[
|
Union[
|
||||||
Literal[
|
Literal[
|
||||||
|
@ -116,7 +116,7 @@ class ColorModeIconButton(IconButton):
|
|||||||
The button component.
|
The button component.
|
||||||
"""
|
"""
|
||||||
position = props.pop("position", None)
|
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
|
# position is used to set nice defaults for positioning the icon button
|
||||||
if isinstance(position, Var):
|
if isinstance(position, Var):
|
||||||
|
@ -47,7 +47,7 @@ class BaseList(Component):
|
|||||||
] = "none"
|
] = "none"
|
||||||
|
|
||||||
# A list of items to add to the list.
|
# A list of items to add to the list.
|
||||||
items: Optional[Union[Iterable, Var[Iterable]]] = None
|
items: Var[Iterable] = Var.create([])
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(
|
def create(
|
||||||
@ -99,9 +99,6 @@ class UnorderedList(BaseList, Ul):
|
|||||||
|
|
||||||
tag = "ul"
|
tag = "ul"
|
||||||
|
|
||||||
# The style of the list.
|
|
||||||
list_style_type: LiteralListStyleTypeUnordered = "disc"
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(
|
def create(
|
||||||
cls,
|
cls,
|
||||||
@ -132,9 +129,6 @@ class OrderedList(BaseList, Ol):
|
|||||||
|
|
||||||
tag = "ol"
|
tag = "ol"
|
||||||
|
|
||||||
# The style of the list.
|
|
||||||
list_style_type: LiteralListStyleTypeOrdered = "decimal"
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(
|
def create(
|
||||||
cls,
|
cls,
|
||||||
|
@ -56,7 +56,7 @@ class BaseList(Component):
|
|||||||
Literal["circle", "disc", "none", "square"],
|
Literal["circle", "disc", "none", "square"],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None,
|
items: Optional[Union[Iterable, Var[Iterable]]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
@ -108,8 +108,28 @@ class UnorderedList(BaseList, Ul):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
list_style_type: Optional[LiteralListStyleTypeUnordered] = None,
|
list_style_type: Optional[
|
||||||
items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None,
|
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,
|
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
auto_capitalize: Optional[
|
auto_capitalize: Optional[
|
||||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||||
@ -199,8 +219,28 @@ class OrderedList(BaseList, Ol):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
list_style_type: Optional[LiteralListStyleTypeOrdered] = None,
|
list_style_type: Optional[
|
||||||
items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None,
|
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,
|
reversed: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
start: 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,
|
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||||
@ -406,7 +446,7 @@ class List(ComponentNamespace):
|
|||||||
Literal["circle", "disc", "none", "square"],
|
Literal["circle", "disc", "none", "square"],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None,
|
items: Optional[Union[Iterable, Var[Iterable]]] = None,
|
||||||
style: Optional[Style] = None,
|
style: Optional[Style] = None,
|
||||||
key: Optional[Any] = None,
|
key: Optional[Any] = None,
|
||||||
id: Optional[Any] = None,
|
id: Optional[Any] = None,
|
||||||
|
Loading…
Reference in New Issue
Block a user