|
@@ -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
|