typography.py 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. """Typography classes."""
  2. from typing import Union
  3. from reflex.vars.base import Var
  4. from .base import BaseHTML
  5. class Blockquote(BaseHTML):
  6. """Display the blockquote element."""
  7. tag = "blockquote"
  8. # Define the title of a work.
  9. cite: Var[Union[str, int, bool]]
  10. class Dd(BaseHTML):
  11. """Display the dd element."""
  12. tag = "dd"
  13. class Div(BaseHTML):
  14. """Display the div element."""
  15. tag = "div"
  16. class Dl(BaseHTML):
  17. """Display the dl element."""
  18. tag = "dl"
  19. class Dt(BaseHTML):
  20. """Display the dt element."""
  21. tag = "dt"
  22. class Figcaption(BaseHTML):
  23. """Display the figcaption element."""
  24. tag = "figcaption"
  25. class Hr(BaseHTML):
  26. """Display the hr element."""
  27. tag = "hr"
  28. # Used to specify the alignment of text content of The Element. this attribute is used in all elements.
  29. align: Var[Union[str, int, bool]]
  30. class Li(BaseHTML):
  31. """Display the li element."""
  32. tag = "li"
  33. class Menu(BaseHTML):
  34. """Display the menu element."""
  35. tag = "menu"
  36. # Specifies that the menu element is a context menu.
  37. type: Var[Union[str, int, bool]]
  38. class Ol(BaseHTML):
  39. """Display the ol element."""
  40. tag = "ol"
  41. # Reverses the order of the list.
  42. reversed: Var[Union[str, int, bool]]
  43. # Specifies the start value of the first list item in an ordered list.
  44. start: Var[Union[str, int, bool]]
  45. # Specifies the kind of marker to use in the list (letters or numbers).
  46. type: Var[Union[str, int, bool]]
  47. class P(BaseHTML):
  48. """Display the p element."""
  49. tag = "p"
  50. class Pre(BaseHTML):
  51. """Display the pre element."""
  52. tag = "pre"
  53. class Ul(BaseHTML):
  54. """Display the ul element."""
  55. tag = "ul"
  56. class Ins(BaseHTML):
  57. """Display the ins element."""
  58. tag = "ins"
  59. # Specifies the URL of the document that explains the reason why the text was inserted/changed.
  60. cite: Var[Union[str, int, bool]]
  61. # Specifies the date and time of when the text was inserted/changed.
  62. date_time: Var[Union[str, int, bool]]
  63. class Del(BaseHTML):
  64. """Display the del element."""
  65. tag = "del"
  66. # Specifies the URL of the document that explains the reason why the text was deleted.
  67. cite: Var[Union[str, int, bool]]
  68. # Specifies the date and time of when the text was deleted.
  69. date_time: Var[Union[str, int, bool]]
  70. blockquote = Blockquote.create
  71. dd = Dd.create
  72. div = Div.create
  73. dl = Dl.create
  74. dt = Dt.create
  75. figcaption = Figcaption.create
  76. hr = Hr.create
  77. li = Li.create
  78. ol = Ol.create
  79. p = P.create
  80. pre = Pre.create
  81. ul = Ul.create
  82. ins = Ins.create
  83. del_ = Del.create # 'del' is a reserved keyword in Python