123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517 |
- """Stub file for reflex/components/radix/themes/components/checkbox.py"""
- # ------------------- DO NOT EDIT ----------------------
- # This file was generated by `reflex/utils/pyi_generator.py`!
- # ------------------------------------------------------
- from typing import Any, Callable, Dict, Literal, Optional, Union, overload
- from reflex.components.component import ComponentNamespace
- from reflex.components.core.breakpoints import Breakpoints
- from reflex.event import EventHandler, EventSpec
- from reflex.style import Style
- from reflex.vars import Var
- from ..base import RadixThemesComponent
- LiteralCheckboxSize = Literal["1", "2", "3"]
- LiteralCheckboxVariant = Literal["classic", "surface", "soft"]
- class Checkbox(RadixThemesComponent):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- as_child: Optional[Union[Var[bool], bool]] = None,
- size: Optional[
- Union[
- Var[
- Union[
- Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"]
- ]
- ],
- Literal["1", "2", "3"],
- Breakpoints[str, 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,
- 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, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- **props,
- ) -> "Checkbox":
- """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.
- 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
- 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: Component properties.
- Returns:
- A new component instance.
- """
- ...
- class HighLevelCheckbox(RadixThemesComponent):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- text: Optional[Union[Var[str], str]] = None,
- spacing: Optional[
- Union[
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
- ]
- ] = None,
- 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", "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,
- 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, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- **props,
- ) -> "HighLevelCheckbox":
- """Create a checkbox with a label.
- Args:
- text: The text of the label.
- text: The text label for the checkbox.
- 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"
- 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
- 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.
- """
- ...
- class CheckboxNamespace(ComponentNamespace):
- @staticmethod
- def __call__(
- *children,
- text: Optional[Union[Var[str], str]] = None,
- spacing: Optional[
- Union[
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
- ]
- ] = None,
- 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", "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,
- 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, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- **props,
- ) -> "HighLevelCheckbox":
- """Create a checkbox with a label.
- Args:
- text: The text of the label.
- text: The text label for the checkbox.
- 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"
- 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
- 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()
|