reflex 0.3.6__py3-none-any.whl → 0.3.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of reflex might be problematic. Click here for more details.

Files changed (136) hide show
  1. reflex/.templates/jinja/web/pages/base_page.js.jinja2 +2 -0
  2. reflex/__init__.py +29 -6
  3. reflex/__init__.pyi +2 -0
  4. reflex/app.py +3 -0
  5. reflex/components/__init__.py +2 -0
  6. reflex/components/chakra/__init__.py +23 -0
  7. reflex/components/{media → chakra/media}/image.py +1 -28
  8. reflex/components/chakra/media/image.pyi +120 -0
  9. reflex/components/component.py +27 -2
  10. reflex/components/datadisplay/datatable.py +1 -37
  11. reflex/components/datadisplay/datatable.pyi +1 -11
  12. reflex/components/el/elements/forms.py +43 -1
  13. reflex/components/el/elements/forms.pyi +26 -1
  14. reflex/components/graphing/plotly.py +0 -22
  15. reflex/components/graphing/plotly.pyi +0 -12
  16. reflex/components/media/__init__.py +0 -1
  17. reflex/components/media/image.pyi +0 -9
  18. reflex/components/next/__init__.py +8 -0
  19. reflex/components/next/base.py +8 -0
  20. reflex/components/next/base.pyi +91 -0
  21. reflex/components/next/image.py +114 -0
  22. reflex/components/next/image.pyi +122 -0
  23. reflex/components/next/video.py +33 -0
  24. reflex/components/next/video.pyi +92 -0
  25. reflex/components/radix/primitives/__init__.py +3 -0
  26. reflex/components/radix/primitives/accordion.py +279 -0
  27. reflex/components/radix/primitives/accordion.pyi +619 -0
  28. reflex/components/radix/themes/__init__.py +4 -73
  29. reflex/components/radix/themes/base.py +7 -7
  30. reflex/components/radix/themes/base.pyi +21 -21
  31. reflex/components/radix/themes/components/__init__.py +193 -0
  32. reflex/components/radix/themes/components/alertdialog.py +72 -0
  33. reflex/components/radix/themes/components/alertdialog.pyi +733 -0
  34. reflex/components/radix/themes/components/aspectratio.py +20 -0
  35. reflex/components/radix/themes/components/aspectratio.pyi +144 -0
  36. reflex/components/radix/themes/components/avatar.py +38 -0
  37. reflex/components/radix/themes/components/avatar.pyi +233 -0
  38. reflex/components/radix/themes/components/badge.py +38 -0
  39. reflex/components/radix/themes/components/badge.pyi +291 -0
  40. reflex/components/radix/themes/components/button.py +39 -0
  41. reflex/components/radix/themes/components/button.pyi +330 -0
  42. reflex/components/radix/themes/components/callout.py +49 -0
  43. reflex/components/radix/themes/components/callout.pyi +668 -0
  44. reflex/components/radix/themes/components/card.py +25 -0
  45. reflex/components/radix/themes/components/card.pyi +214 -0
  46. reflex/components/radix/themes/components/checkbox.py +67 -0
  47. reflex/components/radix/themes/components/checkbox.pyi +249 -0
  48. reflex/components/radix/themes/components/contextmenu.py +134 -0
  49. reflex/components/radix/themes/{typography.pyi → components/contextmenu.pyi} +182 -602
  50. reflex/components/radix/themes/components/dialog.py +75 -0
  51. reflex/components/radix/themes/components/dialog.pyi +739 -0
  52. reflex/components/radix/themes/components/dropdownmenu.py +101 -0
  53. reflex/components/radix/themes/components/dropdownmenu.pyi +1065 -0
  54. reflex/components/radix/themes/components/hovercard.py +63 -0
  55. reflex/components/radix/themes/components/hovercard.pyi +487 -0
  56. reflex/components/radix/themes/components/iconbutton.py +39 -0
  57. reflex/components/radix/themes/components/iconbutton.pyi +332 -0
  58. reflex/components/radix/themes/components/icons.py +400 -0
  59. reflex/components/radix/themes/components/icons.pyi +185 -0
  60. reflex/components/radix/themes/components/inset.py +44 -0
  61. reflex/components/radix/themes/components/inset.pyi +230 -0
  62. reflex/components/radix/themes/components/popover.py +85 -0
  63. reflex/components/radix/themes/components/popover.pyi +634 -0
  64. reflex/components/radix/themes/components/radiogroup.py +72 -0
  65. reflex/components/radix/themes/components/radiogroup.pyi +369 -0
  66. reflex/components/radix/themes/components/scrollarea.py +31 -0
  67. reflex/components/radix/themes/components/scrollarea.pyi +165 -0
  68. reflex/components/radix/themes/components/select.py +137 -0
  69. reflex/components/radix/themes/{layout.pyi → components/select.pyi} +422 -418
  70. reflex/components/radix/themes/components/separator.py +30 -0
  71. reflex/components/radix/themes/components/separator.pyi +218 -0
  72. reflex/components/radix/themes/components/slider.py +68 -0
  73. reflex/components/radix/themes/components/slider.pyi +254 -0
  74. reflex/components/radix/themes/components/switch.py +68 -0
  75. reflex/components/radix/themes/components/switch.pyi +250 -0
  76. reflex/components/radix/themes/components/table.py +79 -0
  77. reflex/components/radix/themes/components/table.pyi +1485 -0
  78. reflex/components/radix/themes/components/tabs.py +65 -0
  79. reflex/components/radix/themes/components/tabs.pyi +549 -0
  80. reflex/components/radix/themes/components/textarea.py +68 -0
  81. reflex/components/radix/themes/components/textarea.pyi +333 -0
  82. reflex/components/radix/themes/{components.py → components/textfield.py} +3 -87
  83. reflex/components/radix/themes/{components.pyi → components/textfield.pyi} +202 -591
  84. reflex/components/radix/themes/layout/__init__.py +13 -0
  85. reflex/components/radix/themes/layout/base.py +48 -0
  86. reflex/components/radix/themes/layout/base.pyi +195 -0
  87. reflex/components/radix/themes/layout/box.py +12 -0
  88. reflex/components/radix/themes/layout/box.pyi +252 -0
  89. reflex/components/radix/themes/layout/container.py +23 -0
  90. reflex/components/radix/themes/layout/container.pyi +260 -0
  91. reflex/components/radix/themes/layout/flex.py +45 -0
  92. reflex/components/radix/themes/layout/flex.pyi +303 -0
  93. reflex/components/radix/themes/layout/grid.py +53 -0
  94. reflex/components/radix/themes/layout/grid.pyi +203 -0
  95. reflex/components/radix/themes/layout/section.py +20 -0
  96. reflex/components/radix/themes/layout/section.pyi +260 -0
  97. reflex/components/radix/themes/typography/__init__.py +21 -0
  98. reflex/components/radix/themes/typography/base.py +12 -0
  99. reflex/components/radix/themes/typography/blockquote.py +36 -0
  100. reflex/components/radix/themes/typography/blockquote.pyi +282 -0
  101. reflex/components/radix/themes/typography/code.py +40 -0
  102. reflex/components/radix/themes/typography/code.pyi +292 -0
  103. reflex/components/radix/themes/typography/em.py +18 -0
  104. reflex/components/radix/themes/typography/em.pyi +199 -0
  105. reflex/components/radix/themes/typography/heading.py +50 -0
  106. reflex/components/radix/themes/typography/heading.pyi +298 -0
  107. reflex/components/radix/themes/typography/kbd.py +25 -0
  108. reflex/components/radix/themes/typography/kbd.pyi +208 -0
  109. reflex/components/radix/themes/typography/link.py +49 -0
  110. reflex/components/radix/themes/typography/link.pyi +238 -0
  111. reflex/components/radix/themes/typography/quote.py +18 -0
  112. reflex/components/radix/themes/typography/quote.pyi +200 -0
  113. reflex/components/radix/themes/typography/strong.py +18 -0
  114. reflex/components/radix/themes/typography/strong.pyi +199 -0
  115. reflex/components/radix/themes/typography/text.py +50 -0
  116. reflex/components/radix/themes/typography/text.pyi +298 -0
  117. reflex/constants/__init__.py +1 -0
  118. reflex/constants/base.py +7 -0
  119. reflex/constants/config.py +1 -1
  120. reflex/model.py +2 -1
  121. reflex/reflex.py +5 -0
  122. reflex/state.py +11 -0
  123. reflex/style.py +120 -10
  124. reflex/testing.py +4 -4
  125. reflex/utils/format.py +9 -5
  126. reflex/utils/prerequisites.py +49 -6
  127. reflex/utils/processes.py +8 -1
  128. reflex/utils/serializers.py +83 -0
  129. reflex/utils/types.py +22 -1
  130. reflex/vars.py +24 -1
  131. {reflex-0.3.6.dist-info → reflex-0.3.7.dist-info}/METADATA +3 -2
  132. {reflex-0.3.6.dist-info → reflex-0.3.7.dist-info}/RECORD +135 -42
  133. reflex/components/radix/themes/layout.py +0 -155
  134. {reflex-0.3.6.dist-info → reflex-0.3.7.dist-info}/LICENSE +0 -0
  135. {reflex-0.3.6.dist-info → reflex-0.3.7.dist-info}/WHEEL +0 -0
  136. {reflex-0.3.6.dist-info → reflex-0.3.7.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,137 @@
1
+ """Interactive components provided by @radix-ui/themes."""
2
+ from typing import Any, Dict, Literal
3
+
4
+ from reflex.vars import Var
5
+
6
+ from ..base import (
7
+ CommonMarginProps,
8
+ LiteralAccentColor,
9
+ LiteralRadius,
10
+ RadixThemesComponent,
11
+ )
12
+
13
+ LiteralButtonSize = Literal[1, 2, 3, 4]
14
+
15
+
16
+ class SelectRoot(CommonMarginProps, RadixThemesComponent):
17
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
18
+
19
+ tag = "Select.Root"
20
+
21
+ # The size of the select: "1" | "2" | "3"
22
+ size: Var[Literal[1, 2, 3]]
23
+
24
+ # The value of the select when initially rendered. Use when you do not need to control the state of the select.
25
+ default_value: Var[str]
26
+
27
+ # The controlled value of the select. Use when you need to control the state of the select.
28
+ value: Var[str]
29
+
30
+ # The open state of the select when it is initially rendered. Use when you do not need to control its open state.
31
+ default_open: Var[bool]
32
+
33
+ # The controlled open state of the select. Must be used in conjunction with onOpenChange.
34
+ open: Var[bool]
35
+
36
+ # The name of the select control when submitting the form.
37
+ name: Var[str]
38
+
39
+ def get_event_triggers(self) -> Dict[str, Any]:
40
+ """Get the events triggers signatures for the component.
41
+
42
+ Returns:
43
+ The signatures of the event triggers.
44
+ """
45
+ return {
46
+ **super().get_event_triggers(),
47
+ "on_open_change": lambda e0: [e0],
48
+ "on_value_change": lambda e0: [e0],
49
+ }
50
+
51
+
52
+ class SelectTrigger(CommonMarginProps, RadixThemesComponent):
53
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
54
+
55
+ tag = "Select.Trigger"
56
+
57
+ # Variant of the select trigger
58
+ variant: Var[Literal["classic", "surface", "soft", "ghost"]]
59
+
60
+ # The color of the select trigger
61
+ color: Var[LiteralAccentColor]
62
+
63
+ # The radius of the select trigger
64
+ radius: Var[LiteralRadius]
65
+
66
+ # The placeholder of the select trigger
67
+ placeholder: Var[str]
68
+
69
+
70
+ class SelectContent(CommonMarginProps, RadixThemesComponent):
71
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
72
+
73
+ tag = "Select.Content"
74
+
75
+ # The variant of the select content
76
+ variant: Var[Literal["solid", "soft"]]
77
+
78
+ # The color of the select content
79
+ color: Var[LiteralAccentColor]
80
+
81
+ # Whether to render the select content with higher contrast color against background
82
+ high_contrast: Var[bool]
83
+
84
+ # The positioning mode to use, item-aligned is the default and behaves similarly to a native MacOS menu by positioning content relative to the active item. popper positions content in the same way as our other primitives, for example Popover or DropdownMenu.
85
+ position: Var[Literal["item-aligned", "popper"]]
86
+
87
+ # The preferred side of the anchor to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled. Only available when position is set to popper.
88
+ side: Var[Literal["top", "right", "bottom", "left"]]
89
+
90
+ # The distance in pixels from the anchor. Only available when position is set to popper.
91
+ side_offset: Var[int]
92
+
93
+ # The preferred alignment against the anchor. May change when collisions occur. Only available when position is set to popper.
94
+ align: Var[Literal["start", "center", "end"]]
95
+
96
+ # The vertical distance in pixels from the anchor. Only available when position is set to popper.
97
+ align_offset: Var[int]
98
+
99
+ def get_event_triggers(self) -> Dict[str, Any]:
100
+ """Get the events triggers signatures for the component.
101
+
102
+ Returns:
103
+ The signatures of the event triggers.
104
+ """
105
+ return {
106
+ **super().get_event_triggers(),
107
+ "on_close_auto_focus": lambda e0: [e0],
108
+ "on_escape_key_down": lambda e0: [e0],
109
+ "on_pointer_down_outside": lambda e0: [e0],
110
+ }
111
+
112
+
113
+ class SelectGroup(CommonMarginProps, RadixThemesComponent):
114
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
115
+
116
+ tag = "Select.Group"
117
+
118
+
119
+ class SelectItem(CommonMarginProps, RadixThemesComponent):
120
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
121
+
122
+ tag = "Select.Item"
123
+
124
+ # The value of the select item when submitting the form.
125
+ value: Var[str]
126
+
127
+
128
+ class SelectLabel(CommonMarginProps, RadixThemesComponent):
129
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
130
+
131
+ tag = "Select.Label"
132
+
133
+
134
+ class SelectSeparator(CommonMarginProps, RadixThemesComponent):
135
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
136
+
137
+ tag = "Select.Separator"