typography.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. """Typography classes."""
  2. from typing import Literal
  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[str]
  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. class Li(BaseHTML):
  29. """Display the li element."""
  30. tag = "li"
  31. class Menu(BaseHTML):
  32. """Display the menu element."""
  33. tag = "menu"
  34. # Specifies that the menu element is a context menu.
  35. type: Var[str]
  36. class Ol(BaseHTML):
  37. """Display the ol element."""
  38. tag = "ol"
  39. # Reverses the order of the list.
  40. reversed: Var[bool]
  41. # Specifies the start value of the first list item in an ordered list.
  42. start: Var[int]
  43. # Specifies the kind of marker to use in the list (letters or numbers).
  44. type: Var[Literal["1", "a", "A", "i", "I"]]
  45. class P(BaseHTML):
  46. """Display the p element."""
  47. tag = "p"
  48. class Pre(BaseHTML):
  49. """Display the pre element."""
  50. tag = "pre"
  51. class Ul(BaseHTML):
  52. """Display the ul element."""
  53. tag = "ul"
  54. class Ins(BaseHTML):
  55. """Display the ins element."""
  56. tag = "ins"
  57. # Specifies the URL of the document that explains the reason why the text was inserted/changed.
  58. cite: Var[str]
  59. # Specifies the date and time of when the text was inserted/changed.
  60. date_time: Var[str]
  61. class Del(BaseHTML):
  62. """Display the del element."""
  63. tag = "del"
  64. # Specifies the URL of the document that explains the reason why the text was deleted.
  65. cite: Var[str]
  66. # Specifies the date and time of when the text was deleted.
  67. date_time: Var[str]
  68. blockquote = Blockquote.create
  69. dd = Dd.create
  70. div = Div.create
  71. dl = Dl.create
  72. dt = Dt.create
  73. figcaption = Figcaption.create
  74. hr = Hr.create
  75. li = Li.create
  76. ol = Ol.create
  77. p = P.create
  78. pre = Pre.create
  79. ul = Ul.create
  80. ins = Ins.create
  81. del_ = Del.create # 'del' is a reserved keyword in Python