inline.py 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. """Inline classes."""
  2. from typing import Union
  3. from reflex.vars.base import Var
  4. from .base import BaseHTML
  5. class A(BaseHTML): # Inherits common attributes from BaseMeta
  6. """Display the 'a' element."""
  7. tag = "a"
  8. # Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink.
  9. download: Var[Union[str, int, bool]]
  10. # Specifies the URL of the page the link goes to
  11. href: Var[Union[str, int, bool]]
  12. # Specifies the language of the linked document
  13. href_lang: Var[Union[str, int, bool]]
  14. # Specifies what media/device the linked document is optimized for
  15. media: Var[Union[str, int, bool]]
  16. # Specifies which referrer is sent when fetching the resource
  17. ping: Var[Union[str, int, bool]]
  18. # Specifies the relationship between the current document and the linked document
  19. referrer_policy: Var[Union[str, int, bool]]
  20. # Specifies the relationship between the linked document and the current document
  21. rel: Var[Union[str, int, bool]]
  22. # Specifies the shape of the area
  23. shape: Var[Union[str, int, bool]]
  24. # Specifies where to open the linked document
  25. target: Var[Union[str, int, bool]]
  26. class Abbr(BaseHTML):
  27. """Display the abbr element."""
  28. tag = "abbr"
  29. class B(BaseHTML):
  30. """Display the b element."""
  31. tag = "b"
  32. class Bdi(BaseHTML):
  33. """Display the bdi element."""
  34. tag = "bdi"
  35. class Bdo(BaseHTML):
  36. """Display the bdo element."""
  37. tag = "bdo"
  38. class Br(BaseHTML):
  39. """Display the br element."""
  40. tag = "br"
  41. class Cite(BaseHTML):
  42. """Display the cite element."""
  43. tag = "cite"
  44. class Code(BaseHTML):
  45. """Display the code element."""
  46. tag = "code"
  47. class Data(BaseHTML):
  48. """Display the data element."""
  49. tag = "data"
  50. # Specifies the machine-readable translation of the data element.
  51. value: Var[Union[str, int, bool]]
  52. class Dfn(BaseHTML):
  53. """Display the dfn element."""
  54. tag = "dfn"
  55. class Em(BaseHTML):
  56. """Display the em element."""
  57. tag = "em"
  58. class I(BaseHTML): # noqa: E742
  59. """Display the i element."""
  60. tag = "i"
  61. class Kbd(BaseHTML):
  62. """Display the kbd element."""
  63. tag = "kbd"
  64. class Mark(BaseHTML):
  65. """Display the mark element."""
  66. tag = "mark"
  67. class Q(BaseHTML):
  68. """Display the q element."""
  69. tag = "q"
  70. # Specifies the source URL of the quote.
  71. cite: Var[Union[str, int, bool]]
  72. class Rp(BaseHTML):
  73. """Display the rp element."""
  74. tag = "rp"
  75. class Rt(BaseHTML):
  76. """Display the rt element."""
  77. tag = "rt"
  78. class Ruby(BaseHTML):
  79. """Display the ruby element."""
  80. tag = "ruby"
  81. class S(BaseHTML):
  82. """Display the s element."""
  83. tag = "s"
  84. class Samp(BaseHTML):
  85. """Display the samp element."""
  86. tag = "samp"
  87. class Small(BaseHTML):
  88. """Display the small element."""
  89. tag = "small"
  90. class Span(BaseHTML):
  91. """Display the span element."""
  92. tag = "span"
  93. class Strong(BaseHTML):
  94. """Display the strong element."""
  95. tag = "strong"
  96. class Sub(BaseHTML):
  97. """Display the sub element."""
  98. tag = "sub"
  99. class Sup(BaseHTML):
  100. """Display the sup element."""
  101. tag = "sup"
  102. class Time(BaseHTML):
  103. """Display the time element."""
  104. tag = "time"
  105. # Specifies the date and/or time of the element.
  106. date_time: Var[Union[str, int, bool]]
  107. class U(BaseHTML):
  108. """Display the u element."""
  109. tag = "u"
  110. class Wbr(BaseHTML):
  111. """Display the wbr element."""
  112. tag = "wbr"
  113. a = A.create
  114. abbr = Abbr.create
  115. b = B.create
  116. bdi = Bdi.create
  117. bdo = Bdo.create
  118. br = Br.create
  119. cite = Cite.create
  120. code = Code.create
  121. data = Data.create
  122. dfn = Dfn.create
  123. em = Em.create
  124. i = I.create
  125. kbd = Kbd.create
  126. mark = Mark.create
  127. q = Q.create
  128. rp = Rp.create
  129. rt = Rt.create
  130. ruby = Ruby.create
  131. s = S.create
  132. samp = Samp.create
  133. small = Small.create
  134. span = Span.create
  135. strong = Strong.create
  136. sub = Sub.create
  137. sup = Sup.create
  138. time = Time.create
  139. u = U.create
  140. wbr = Wbr.create