checkbox.pyi 6.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. """Stub file for checkbox.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `scripts/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Optional, Union, overload
  6. from reflex.components.libs.chakra import ChakraComponent
  7. from reflex.components.component import Component
  8. from reflex.vars import Var, BaseVar, ComputedVar
  9. from reflex.event import EventHandler, EventChain, EventSpec
  10. class Checkbox(ChakraComponent):
  11. @overload
  12. @classmethod
  13. def create(cls, *children, color_scheme: Optional[Union[Var[str], str]] = None, size: Optional[Union[Var[str], str]] = None, is_checked: Optional[Union[Var[bool], bool]] = None, is_disabled: Optional[Union[Var[bool], bool]] = None, is_focusable: Optional[Union[Var[bool], bool]] = None, is_indeterminate: Optional[Union[Var[bool], bool]] = None, is_invalid: Optional[Union[Var[bool], bool]] = None, is_read_only: Optional[Union[Var[bool], bool]] = None, is_required: Optional[Union[Var[bool], bool]] = None, name: Optional[Union[Var[str], str]] = None, spacing: Optional[Union[Var[str], 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) -> "Checkbox": # type: ignore
  14. """Create the component.
  15. Args:
  16. *children: The children of the component.
  17. color_scheme: Color scheme for checkbox.
  18. Options:
  19. "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan"
  20. | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"
  21. size: "sm" | "md" | "lg"
  22. is_checked: If true, the checkbox will be checked.
  23. is_disabled: If true, the checkbox will be disabled
  24. is_focusable: If true and is_disabled is passed, the checkbox will remain tabbable but not interactive
  25. is_indeterminate: If true, the checkbox will be indeterminate. This only affects the icon shown inside checkbox and does not modify the is_checked var.
  26. is_invalid: If true, the checkbox is marked as invalid. Changes style of unchecked state.
  27. is_read_only: If true, the checkbox will be readonly
  28. is_required: If true, the checkbox input is marked as required, and required attribute will be added
  29. name: The name of the input field in a checkbox (Useful for form submission).
  30. spacing: The spacing between the checkbox and its label text (0.5rem)
  31. **props: The props of the component.
  32. Returns:
  33. The component.
  34. Raises:
  35. TypeError: If an invalid child is passed.
  36. """
  37. ...
  38. class CheckboxGroup(ChakraComponent):
  39. @overload
  40. @classmethod
  41. def create(cls, *children, value: Optional[Union[Var[str], str]] = None, default_value: Optional[Union[Var[str], str]] = None, is_disabled: Optional[Union[Var[bool], bool]] = None, is_native: Optional[Union[Var[bool], bool]] = 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) -> "CheckboxGroup": # type: ignore
  42. """Create the component.
  43. Args:
  44. *children: The children of the component.
  45. value: The value of the checkbox group
  46. default_value: The initial value of the checkbox group
  47. is_disabled: If true, all wrapped checkbox inputs will be disabled
  48. is_native: If true, input elements will receive checked attribute instead of isChecked. This assumes, you're using native radio inputs
  49. **props: The props of the component.
  50. Returns:
  51. The component.
  52. Raises:
  53. TypeError: If an invalid child is passed.
  54. """
  55. ...