other.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. """Other classes."""
  2. from typing import Union
  3. from reflex.vars.base import Var
  4. from .base import BaseHTML
  5. class Details(BaseHTML):
  6. """Display the details element."""
  7. tag = "details"
  8. # Indicates whether the details will be visible (expanded) to the user
  9. open: Var[Union[str, int, bool]]
  10. class Dialog(BaseHTML):
  11. """Display the dialog element."""
  12. tag = "dialog"
  13. # Indicates whether the dialog is active and can be interacted with
  14. open: Var[Union[str, int, bool]]
  15. class Summary(BaseHTML):
  16. """Display the summary element.
  17. Used as a summary or caption for a <details> element.
  18. """
  19. tag = "summary"
  20. class Slot(BaseHTML):
  21. """Display the slot element.
  22. Used as a placeholder inside a web component.
  23. """
  24. tag = "slot"
  25. class Template(BaseHTML):
  26. """Display the template element.
  27. Used for declaring fragments of HTML that can be cloned and inserted in the document.
  28. """
  29. tag = "template"
  30. class Math(BaseHTML):
  31. """Display the math element.
  32. Represents a mathematical expression.
  33. """
  34. tag = "math"
  35. class Html(BaseHTML):
  36. """Display the html element."""
  37. tag = "html"
  38. # Specifies the URL of the document's cache manifest (obsolete in HTML5)
  39. manifest: Var[Union[str, int, bool]]
  40. details = Details.create
  41. dialog = Dialog.create
  42. summary = Summary.create
  43. slot = Slot.create
  44. template = Template.create
  45. math = Math.create
  46. html = Html.create