reflex 0.5.9a1__py3-none-any.whl → 0.5.10__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 (169) hide show
  1. reflex/__init__.py +21 -2
  2. reflex/__init__.pyi +0 -1
  3. reflex/app.py +1 -1
  4. reflex/components/__init__.py +0 -1
  5. reflex/components/__init__.pyi +0 -1
  6. reflex/components/markdown/markdown.py +1 -1
  7. reflex/components/recharts/cartesian.py +3 -0
  8. reflex/components/recharts/cartesian.pyi +2 -0
  9. reflex/components/sonner/toast.py +27 -1
  10. reflex/components/sonner/toast.pyi +5 -0
  11. reflex/constants/base.py +2 -0
  12. reflex/constants/installer.py +2 -0
  13. reflex/experimental/hooks.py +1 -1
  14. reflex/reflex.py +0 -15
  15. reflex/state.py +22 -22
  16. reflex/testing.py +8 -3
  17. reflex/utils/net.py +43 -0
  18. reflex/utils/prerequisites.py +27 -126
  19. reflex/utils/registry.py +48 -0
  20. reflex/utils/types.py +1 -1
  21. reflex/vars.py +4 -2
  22. {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/METADATA +2 -1
  23. {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/RECORD +26 -167
  24. reflex/components/chakra/__init__.py +0 -204
  25. reflex/components/chakra/base.py +0 -210
  26. reflex/components/chakra/base.pyi +0 -319
  27. reflex/components/chakra/datadisplay/__init__.py +0 -10
  28. reflex/components/chakra/datadisplay/badge.py +0 -16
  29. reflex/components/chakra/datadisplay/badge.pyi +0 -96
  30. reflex/components/chakra/datadisplay/code.py +0 -11
  31. reflex/components/chakra/datadisplay/code.pyi +0 -87
  32. reflex/components/chakra/datadisplay/divider.py +0 -20
  33. reflex/components/chakra/datadisplay/divider.pyi +0 -100
  34. reflex/components/chakra/datadisplay/keyboard_key.py +0 -9
  35. reflex/components/chakra/datadisplay/keyboard_key.pyi +0 -87
  36. reflex/components/chakra/datadisplay/list.py +0 -60
  37. reflex/components/chakra/datadisplay/list.pyi +0 -339
  38. reflex/components/chakra/datadisplay/stat.py +0 -80
  39. reflex/components/chakra/datadisplay/stat.pyi +0 -477
  40. reflex/components/chakra/datadisplay/table.py +0 -305
  41. reflex/components/chakra/datadisplay/table.pyi +0 -737
  42. reflex/components/chakra/datadisplay/tag.py +0 -85
  43. reflex/components/chakra/datadisplay/tag.pyi +0 -433
  44. reflex/components/chakra/disclosure/__init__.py +0 -14
  45. reflex/components/chakra/disclosure/accordion.py +0 -110
  46. reflex/components/chakra/disclosure/accordion.pyi +0 -411
  47. reflex/components/chakra/disclosure/tabs.py +0 -117
  48. reflex/components/chakra/disclosure/tabs.pyi +0 -496
  49. reflex/components/chakra/disclosure/transition.py +0 -73
  50. reflex/components/chakra/disclosure/transition.pyi +0 -509
  51. reflex/components/chakra/disclosure/visuallyhidden.py +0 -9
  52. reflex/components/chakra/disclosure/visuallyhidden.pyi +0 -87
  53. reflex/components/chakra/feedback/__init__.py +0 -7
  54. reflex/components/chakra/feedback/alert.py +0 -68
  55. reflex/components/chakra/feedback/alert.pyi +0 -335
  56. reflex/components/chakra/feedback/circularprogress.py +0 -68
  57. reflex/components/chakra/feedback/circularprogress.pyi +0 -185
  58. reflex/components/chakra/feedback/progress.py +0 -33
  59. reflex/components/chakra/feedback/progress.pyi +0 -101
  60. reflex/components/chakra/feedback/skeleton.py +0 -70
  61. reflex/components/chakra/feedback/skeleton.pyi +0 -271
  62. reflex/components/chakra/feedback/spinner.py +0 -25
  63. reflex/components/chakra/feedback/spinner.pyi +0 -102
  64. reflex/components/chakra/forms/__init__.py +0 -49
  65. reflex/components/chakra/forms/button.py +0 -83
  66. reflex/components/chakra/forms/button.pyi +0 -262
  67. reflex/components/chakra/forms/checkbox.py +0 -77
  68. reflex/components/chakra/forms/checkbox.pyi +0 -247
  69. reflex/components/chakra/forms/colormodeswitch.py +0 -104
  70. reflex/components/chakra/forms/colormodeswitch.pyi +0 -473
  71. reflex/components/chakra/forms/date_picker.py +0 -11
  72. reflex/components/chakra/forms/date_picker.pyi +0 -129
  73. reflex/components/chakra/forms/date_time_picker.py +0 -11
  74. reflex/components/chakra/forms/date_time_picker.pyi +0 -129
  75. reflex/components/chakra/forms/editable.py +0 -67
  76. reflex/components/chakra/forms/editable.pyi +0 -343
  77. reflex/components/chakra/forms/email.py +0 -11
  78. reflex/components/chakra/forms/email.pyi +0 -129
  79. reflex/components/chakra/forms/form.py +0 -103
  80. reflex/components/chakra/forms/form.pyi +0 -484
  81. reflex/components/chakra/forms/iconbutton.py +0 -38
  82. reflex/components/chakra/forms/iconbutton.pyi +0 -108
  83. reflex/components/chakra/forms/input.py +0 -130
  84. reflex/components/chakra/forms/input.pyi +0 -566
  85. reflex/components/chakra/forms/multiselect.py +0 -355
  86. reflex/components/chakra/forms/numberinput.py +0 -128
  87. reflex/components/chakra/forms/numberinput.pyi +0 -442
  88. reflex/components/chakra/forms/password.py +0 -11
  89. reflex/components/chakra/forms/password.pyi +0 -129
  90. reflex/components/chakra/forms/pininput.py +0 -201
  91. reflex/components/chakra/forms/pininput.pyi +0 -215
  92. reflex/components/chakra/forms/radio.py +0 -101
  93. reflex/components/chakra/forms/radio.pyi +0 -197
  94. reflex/components/chakra/forms/rangeslider.py +0 -149
  95. reflex/components/chakra/forms/rangeslider.pyi +0 -354
  96. reflex/components/chakra/forms/select.py +0 -103
  97. reflex/components/chakra/forms/select.pyi +0 -204
  98. reflex/components/chakra/forms/slider.py +0 -130
  99. reflex/components/chakra/forms/slider.pyi +0 -449
  100. reflex/components/chakra/forms/switch.py +0 -49
  101. reflex/components/chakra/forms/switch.pyi +0 -159
  102. reflex/components/chakra/forms/textarea.py +0 -79
  103. reflex/components/chakra/forms/textarea.pyi +0 -123
  104. reflex/components/chakra/forms/time_picker.py +0 -11
  105. reflex/components/chakra/forms/time_picker.pyi +0 -129
  106. reflex/components/chakra/layout/__init__.py +0 -14
  107. reflex/components/chakra/layout/aspect_ratio.py +0 -13
  108. reflex/components/chakra/layout/aspect_ratio.pyi +0 -89
  109. reflex/components/chakra/layout/box.py +0 -31
  110. reflex/components/chakra/layout/box.pyi +0 -93
  111. reflex/components/chakra/layout/card.py +0 -100
  112. reflex/components/chakra/layout/card.pyi +0 -379
  113. reflex/components/chakra/layout/center.py +0 -21
  114. reflex/components/chakra/layout/center.pyi +0 -239
  115. reflex/components/chakra/layout/container.py +0 -13
  116. reflex/components/chakra/layout/container.pyi +0 -89
  117. reflex/components/chakra/layout/flex.py +0 -33
  118. reflex/components/chakra/layout/flex.pyi +0 -101
  119. reflex/components/chakra/layout/grid.py +0 -125
  120. reflex/components/chakra/layout/grid.pyi +0 -293
  121. reflex/components/chakra/layout/spacer.py +0 -9
  122. reflex/components/chakra/layout/spacer.pyi +0 -87
  123. reflex/components/chakra/layout/stack.py +0 -48
  124. reflex/components/chakra/layout/stack.pyi +0 -305
  125. reflex/components/chakra/layout/wrap.py +0 -57
  126. reflex/components/chakra/layout/wrap.pyi +0 -179
  127. reflex/components/chakra/media/__init__.py +0 -7
  128. reflex/components/chakra/media/avatar.py +0 -58
  129. reflex/components/chakra/media/avatar.pyi +0 -267
  130. reflex/components/chakra/media/icon.py +0 -111
  131. reflex/components/chakra/media/icon.pyi +0 -171
  132. reflex/components/chakra/media/image.py +0 -74
  133. reflex/components/chakra/media/image.pyi +0 -118
  134. reflex/components/chakra/navigation/__init__.py +0 -18
  135. reflex/components/chakra/navigation/breadcrumb.py +0 -98
  136. reflex/components/chakra/navigation/breadcrumb.pyi +0 -351
  137. reflex/components/chakra/navigation/link.py +0 -62
  138. reflex/components/chakra/navigation/link.pyi +0 -105
  139. reflex/components/chakra/navigation/linkoverlay.py +0 -22
  140. reflex/components/chakra/navigation/linkoverlay.pyi +0 -167
  141. reflex/components/chakra/navigation/stepper.py +0 -113
  142. reflex/components/chakra/navigation/stepper.pyi +0 -762
  143. reflex/components/chakra/overlay/__init__.py +0 -50
  144. reflex/components/chakra/overlay/alertdialog.py +0 -153
  145. reflex/components/chakra/overlay/alertdialog.pyi +0 -612
  146. reflex/components/chakra/overlay/drawer.py +0 -168
  147. reflex/components/chakra/overlay/drawer.pyi +0 -652
  148. reflex/components/chakra/overlay/menu.py +0 -225
  149. reflex/components/chakra/overlay/menu.pyi +0 -708
  150. reflex/components/chakra/overlay/modal.py +0 -166
  151. reflex/components/chakra/overlay/modal.pyi +0 -600
  152. reflex/components/chakra/overlay/popover.py +0 -183
  153. reflex/components/chakra/overlay/popover.pyi +0 -757
  154. reflex/components/chakra/overlay/tooltip.py +0 -70
  155. reflex/components/chakra/overlay/tooltip.pyi +0 -129
  156. reflex/components/chakra/typography/__init__.py +0 -10
  157. reflex/components/chakra/typography/heading.py +0 -16
  158. reflex/components/chakra/typography/heading.pyi +0 -96
  159. reflex/components/chakra/typography/highlight.py +0 -23
  160. reflex/components/chakra/typography/highlight.pyi +0 -91
  161. reflex/components/chakra/typography/span.py +0 -15
  162. reflex/components/chakra/typography/span.pyi +0 -89
  163. reflex/components/chakra/typography/text.py +0 -18
  164. reflex/components/chakra/typography/text.pyi +0 -91
  165. reflex/components/media/__init__.py +0 -1
  166. reflex/components/media/icon.py +0 -3
  167. {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/LICENSE +0 -0
  168. {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/WHEEL +0 -0
  169. {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/entry_points.txt +0 -0
@@ -1,50 +0,0 @@
1
- """Overlay components."""
2
-
3
- from .alertdialog import (
4
- AlertDialog,
5
- AlertDialogBody,
6
- AlertDialogContent,
7
- AlertDialogFooter,
8
- AlertDialogHeader,
9
- AlertDialogOverlay,
10
- )
11
- from .drawer import (
12
- Drawer,
13
- DrawerBody,
14
- DrawerCloseButton,
15
- DrawerContent,
16
- DrawerFooter,
17
- DrawerHeader,
18
- DrawerOverlay,
19
- )
20
- from .menu import (
21
- Menu,
22
- MenuButton,
23
- MenuDivider,
24
- MenuGroup,
25
- MenuItem,
26
- MenuItemOption,
27
- MenuList,
28
- MenuOptionGroup,
29
- )
30
- from .modal import (
31
- Modal,
32
- ModalBody,
33
- ModalCloseButton,
34
- ModalContent,
35
- ModalFooter,
36
- ModalHeader,
37
- ModalOverlay,
38
- )
39
- from .popover import (
40
- Popover,
41
- PopoverAnchor,
42
- PopoverArrow,
43
- PopoverBody,
44
- PopoverCloseButton,
45
- PopoverContent,
46
- PopoverFooter,
47
- PopoverHeader,
48
- PopoverTrigger,
49
- )
50
- from .tooltip import Tooltip
@@ -1,153 +0,0 @@
1
- """Alert dialog components."""
2
-
3
- from __future__ import annotations
4
-
5
- from reflex.components.chakra import ChakraComponent, LiteralAlertDialogSize
6
- from reflex.components.chakra.media.icon import Icon
7
- from reflex.components.component import Component
8
- from reflex.event import EventHandler
9
- from reflex.vars import Var
10
-
11
-
12
- class AlertDialog(ChakraComponent):
13
- """Provides context and state for the dialog."""
14
-
15
- tag = "AlertDialog"
16
-
17
- # If true, the modal will be open.
18
- is_open: Var[bool]
19
-
20
- # The least destructive element to focus when the dialog opens.
21
- least_destructive_ref: Var[str]
22
-
23
- # Handle zoom/pinch gestures on iOS devices when scroll locking is enabled. Defaults to false.
24
- allow_pinch_zoom: Var[bool]
25
-
26
- # If true, the modal will autofocus the first enabled and interactive element within the ModalContent
27
- auto_focus: Var[bool]
28
-
29
- # If true, scrolling will be disabled on the body when the modal opens.
30
- block_scroll_on_mount: Var[bool]
31
-
32
- # If true, the modal will close when the Esc key is pressed
33
- close_on_esc: Var[bool]
34
-
35
- # If true, the modal will close when the overlay is clicked
36
- close_on_overlay_click: Var[bool]
37
-
38
- # If true, the modal will be centered on screen.
39
- is_centered: Var[bool]
40
-
41
- # Enables aggressive focus capturing within iframes. If true, keep focus in the lock, no matter where lock is active. If false, allows focus to move outside of iframe.
42
- lock_focus_across_frames: Var[bool]
43
-
44
- # If true, a `padding-right` will be applied to the body element that's equal to the width of the scrollbar. This can help prevent some unpleasant flickering effect and content adjustment when the modal opens
45
- preserve_scroll_bar_gap: Var[bool]
46
-
47
- # If true, the modal will return focus to the element that triggered it when it closes.
48
- return_focus_on_close: Var[bool]
49
-
50
- # "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "full"
51
- size: Var[LiteralAlertDialogSize]
52
-
53
- # If true, the siblings of the modal will have `aria-hidden` set to true so that screen readers can only see the modal. This is commonly known as making the other elements **inert**
54
- use_inert: Var[bool]
55
-
56
- # Fired when the modal is closing.
57
- on_close: EventHandler[lambda: []]
58
-
59
- # Fired when the modal is closed and the exit animation is complete.
60
- on_close_complete: EventHandler[lambda: []]
61
-
62
- # Fired when the Esc key is pressed.
63
- on_esc: EventHandler[lambda: []]
64
-
65
- # Fired when the overlay is clicked.
66
- on_overlay_click: EventHandler[lambda: []]
67
-
68
- @classmethod
69
- def create(
70
- cls, *children, header=None, body=None, footer=None, close_button=None, **props
71
- ) -> Component:
72
- """Create an alert dialog component.
73
-
74
- Args:
75
- *children: The children of the alert dialog component.
76
- header: The header of the alert dialog.
77
- body: The body of the alert dialog.
78
- footer: The footer of the alert dialog.
79
- close_button: The close button of the alert dialog.
80
- **props: The properties of the alert dialog component.
81
-
82
- Raises:
83
- AttributeError: if there is a conflict between the props used.
84
-
85
- Returns:
86
- The alert dialog component.
87
- """
88
- if len(children) == 0:
89
- contents = []
90
-
91
- if header:
92
- contents.append(AlertDialogHeader.create(header))
93
-
94
- if body:
95
- contents.append(AlertDialogBody.create(body))
96
-
97
- if footer:
98
- contents.append(AlertDialogFooter.create(footer))
99
-
100
- # add AlertDialogCloseButton if either a prop for one was passed, or if on_close callback is present
101
- if props.get("on_close"):
102
- # get user defined close button or use default one
103
- if not close_button:
104
- close_button = Icon.create(tag="close")
105
- contents.append(AlertDialogCloseButton.create(close_button))
106
- elif close_button:
107
- raise AttributeError(
108
- "Close button can not be used if on_close event handler is not defined"
109
- )
110
-
111
- children = [
112
- AlertDialogOverlay.create(
113
- AlertDialogContent.create(*contents),
114
- )
115
- ]
116
-
117
- return super().create(*children, **props)
118
-
119
-
120
- class AlertDialogBody(ChakraComponent):
121
- """Should contain the description announced by screen readers."""
122
-
123
- tag = "AlertDialogBody"
124
-
125
-
126
- class AlertDialogHeader(ChakraComponent):
127
- """Should contain the title announced by screen readers."""
128
-
129
- tag = "AlertDialogHeader"
130
-
131
-
132
- class AlertDialogFooter(ChakraComponent):
133
- """Should contain the events of the dialog."""
134
-
135
- tag = "AlertDialogFooter"
136
-
137
-
138
- class AlertDialogContent(ChakraComponent):
139
- """The wrapper for the alert dialog's content."""
140
-
141
- tag = "AlertDialogContent"
142
-
143
-
144
- class AlertDialogOverlay(ChakraComponent):
145
- """The dimmed overlay behind the dialog."""
146
-
147
- tag = "AlertDialogOverlay"
148
-
149
-
150
- class AlertDialogCloseButton(ChakraComponent):
151
- """The button that closes the dialog."""
152
-
153
- tag = "AlertDialogCloseButton"