reflex 0.3.5a4__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 (138) hide show
  1. reflex/.templates/jinja/web/pages/base_page.js.jinja2 +2 -0
  2. reflex/.templates/web/utils/state.js +1 -1
  3. reflex/__init__.py +29 -6
  4. reflex/__init__.pyi +2 -0
  5. reflex/app.py +3 -0
  6. reflex/components/__init__.py +2 -0
  7. reflex/components/chakra/__init__.py +23 -0
  8. reflex/components/{media → chakra/media}/image.py +1 -28
  9. reflex/components/chakra/media/image.pyi +120 -0
  10. reflex/components/component.py +32 -4
  11. reflex/components/datadisplay/datatable.py +1 -37
  12. reflex/components/datadisplay/datatable.pyi +1 -11
  13. reflex/components/el/elements/forms.py +43 -1
  14. reflex/components/el/elements/forms.pyi +26 -1
  15. reflex/components/graphing/plotly.py +0 -22
  16. reflex/components/graphing/plotly.pyi +0 -12
  17. reflex/components/media/__init__.py +0 -1
  18. reflex/components/media/image.pyi +0 -9
  19. reflex/components/next/__init__.py +8 -0
  20. reflex/components/next/base.py +8 -0
  21. reflex/components/next/base.pyi +91 -0
  22. reflex/components/next/image.py +114 -0
  23. reflex/components/next/image.pyi +122 -0
  24. reflex/components/next/video.py +33 -0
  25. reflex/components/next/video.pyi +92 -0
  26. reflex/components/radix/primitives/__init__.py +3 -0
  27. reflex/components/radix/primitives/accordion.py +279 -0
  28. reflex/components/radix/primitives/accordion.pyi +619 -0
  29. reflex/components/radix/themes/__init__.py +4 -73
  30. reflex/components/radix/themes/base.py +7 -7
  31. reflex/components/radix/themes/base.pyi +21 -21
  32. reflex/components/radix/themes/components/__init__.py +193 -0
  33. reflex/components/radix/themes/components/alertdialog.py +72 -0
  34. reflex/components/radix/themes/components/alertdialog.pyi +733 -0
  35. reflex/components/radix/themes/components/aspectratio.py +20 -0
  36. reflex/components/radix/themes/components/aspectratio.pyi +144 -0
  37. reflex/components/radix/themes/components/avatar.py +38 -0
  38. reflex/components/radix/themes/components/avatar.pyi +233 -0
  39. reflex/components/radix/themes/components/badge.py +38 -0
  40. reflex/components/radix/themes/components/badge.pyi +291 -0
  41. reflex/components/radix/themes/components/button.py +39 -0
  42. reflex/components/radix/themes/components/button.pyi +330 -0
  43. reflex/components/radix/themes/components/callout.py +49 -0
  44. reflex/components/radix/themes/components/callout.pyi +668 -0
  45. reflex/components/radix/themes/components/card.py +25 -0
  46. reflex/components/radix/themes/components/card.pyi +214 -0
  47. reflex/components/radix/themes/components/checkbox.py +67 -0
  48. reflex/components/radix/themes/components/checkbox.pyi +249 -0
  49. reflex/components/radix/themes/components/contextmenu.py +134 -0
  50. reflex/components/radix/themes/{typography.pyi → components/contextmenu.pyi} +182 -602
  51. reflex/components/radix/themes/components/dialog.py +75 -0
  52. reflex/components/radix/themes/components/dialog.pyi +739 -0
  53. reflex/components/radix/themes/components/dropdownmenu.py +101 -0
  54. reflex/components/radix/themes/components/dropdownmenu.pyi +1065 -0
  55. reflex/components/radix/themes/components/hovercard.py +63 -0
  56. reflex/components/radix/themes/components/hovercard.pyi +487 -0
  57. reflex/components/radix/themes/components/iconbutton.py +39 -0
  58. reflex/components/radix/themes/components/iconbutton.pyi +332 -0
  59. reflex/components/radix/themes/components/icons.py +400 -0
  60. reflex/components/radix/themes/components/icons.pyi +185 -0
  61. reflex/components/radix/themes/components/inset.py +44 -0
  62. reflex/components/radix/themes/components/inset.pyi +230 -0
  63. reflex/components/radix/themes/components/popover.py +85 -0
  64. reflex/components/radix/themes/components/popover.pyi +634 -0
  65. reflex/components/radix/themes/components/radiogroup.py +72 -0
  66. reflex/components/radix/themes/components/radiogroup.pyi +369 -0
  67. reflex/components/radix/themes/components/scrollarea.py +31 -0
  68. reflex/components/radix/themes/components/scrollarea.pyi +165 -0
  69. reflex/components/radix/themes/components/select.py +137 -0
  70. reflex/components/radix/themes/{layout.pyi → components/select.pyi} +422 -418
  71. reflex/components/radix/themes/components/separator.py +30 -0
  72. reflex/components/radix/themes/components/separator.pyi +218 -0
  73. reflex/components/radix/themes/components/slider.py +68 -0
  74. reflex/components/radix/themes/components/slider.pyi +254 -0
  75. reflex/components/radix/themes/components/switch.py +68 -0
  76. reflex/components/radix/themes/components/switch.pyi +250 -0
  77. reflex/components/radix/themes/components/table.py +79 -0
  78. reflex/components/radix/themes/components/table.pyi +1485 -0
  79. reflex/components/radix/themes/components/tabs.py +65 -0
  80. reflex/components/radix/themes/components/tabs.pyi +549 -0
  81. reflex/components/radix/themes/components/textarea.py +68 -0
  82. reflex/components/radix/themes/components/textarea.pyi +333 -0
  83. reflex/components/radix/themes/{components.py → components/textfield.py} +3 -87
  84. reflex/components/radix/themes/{components.pyi → components/textfield.pyi} +202 -591
  85. reflex/components/radix/themes/layout/__init__.py +13 -0
  86. reflex/components/radix/themes/layout/base.py +48 -0
  87. reflex/components/radix/themes/layout/base.pyi +195 -0
  88. reflex/components/radix/themes/layout/box.py +12 -0
  89. reflex/components/radix/themes/layout/box.pyi +252 -0
  90. reflex/components/radix/themes/layout/container.py +23 -0
  91. reflex/components/radix/themes/layout/container.pyi +260 -0
  92. reflex/components/radix/themes/layout/flex.py +45 -0
  93. reflex/components/radix/themes/layout/flex.pyi +303 -0
  94. reflex/components/radix/themes/layout/grid.py +53 -0
  95. reflex/components/radix/themes/layout/grid.pyi +203 -0
  96. reflex/components/radix/themes/layout/section.py +20 -0
  97. reflex/components/radix/themes/layout/section.pyi +260 -0
  98. reflex/components/radix/themes/typography/__init__.py +21 -0
  99. reflex/components/radix/themes/typography/base.py +12 -0
  100. reflex/components/radix/themes/typography/blockquote.py +36 -0
  101. reflex/components/radix/themes/typography/blockquote.pyi +282 -0
  102. reflex/components/radix/themes/typography/code.py +40 -0
  103. reflex/components/radix/themes/typography/code.pyi +292 -0
  104. reflex/components/radix/themes/typography/em.py +18 -0
  105. reflex/components/radix/themes/typography/em.pyi +199 -0
  106. reflex/components/radix/themes/typography/heading.py +50 -0
  107. reflex/components/radix/themes/typography/heading.pyi +298 -0
  108. reflex/components/radix/themes/typography/kbd.py +25 -0
  109. reflex/components/radix/themes/typography/kbd.pyi +208 -0
  110. reflex/components/radix/themes/typography/link.py +49 -0
  111. reflex/components/radix/themes/typography/link.pyi +238 -0
  112. reflex/components/radix/themes/typography/quote.py +18 -0
  113. reflex/components/radix/themes/typography/quote.pyi +200 -0
  114. reflex/components/radix/themes/typography/strong.py +18 -0
  115. reflex/components/radix/themes/typography/strong.pyi +199 -0
  116. reflex/components/radix/themes/typography/text.py +50 -0
  117. reflex/components/radix/themes/typography/text.pyi +298 -0
  118. reflex/components/radix/themes/typography.py +1 -1
  119. reflex/constants/__init__.py +1 -0
  120. reflex/constants/base.py +7 -0
  121. reflex/constants/config.py +1 -1
  122. reflex/model.py +2 -1
  123. reflex/reflex.py +8 -1
  124. reflex/state.py +11 -0
  125. reflex/style.py +120 -10
  126. reflex/testing.py +4 -4
  127. reflex/utils/format.py +9 -5
  128. reflex/utils/prerequisites.py +49 -6
  129. reflex/utils/processes.py +8 -1
  130. reflex/utils/serializers.py +83 -0
  131. reflex/utils/types.py +22 -1
  132. reflex/vars.py +24 -1
  133. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/METADATA +3 -2
  134. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/RECORD +137 -44
  135. reflex/components/radix/themes/layout.py +0 -155
  136. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/LICENSE +0 -0
  137. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/WHEEL +0 -0
  138. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/entry_points.txt +0 -0
@@ -3,7 +3,6 @@
3
3
  from .audio import Audio
4
4
  from .avatar import Avatar, AvatarBadge, AvatarGroup
5
5
  from .icon import Icon
6
- from .image import Image
7
6
  from .video import Video
8
7
 
9
8
  __all__ = [f for f in dir() if f[0].isupper()] # type: ignore
@@ -121,12 +121,3 @@ class Image(ChakraComponent):
121
121
  The Image component.
122
122
  """
123
123
  ...
124
-
125
- try:
126
- from PIL.Image import Image as Img
127
-
128
- @serializer
129
- def serialize_image(image: Img) -> str: ...
130
-
131
- except ImportError:
132
- pass
@@ -0,0 +1,8 @@
1
+ """Namespace for components provided by next packages."""
2
+
3
+ from .base import NextComponent
4
+ from .image import Image
5
+ from .video import Video
6
+
7
+ image = Image.create
8
+ video = Video.create
@@ -0,0 +1,8 @@
1
+ """Base for NextJS components."""
2
+ from reflex.components.component import Component
3
+
4
+
5
+ class NextComponent(Component):
6
+ """A Component used as based for any NextJS component."""
7
+
8
+ ...
@@ -0,0 +1,91 @@
1
+ """Stub file for reflex/components/next/base.py"""
2
+ # ------------------- DO NOT EDIT ----------------------
3
+ # This file was generated by `scripts/pyi_generator.py`!
4
+ # ------------------------------------------------------
5
+
6
+ from typing import Any, Dict, Literal, Optional, Union, overload
7
+ from reflex.vars import Var, BaseVar, ComputedVar
8
+ from reflex.event import EventChain, EventHandler, EventSpec
9
+ from reflex.style import Style
10
+ from reflex.components.component import Component
11
+
12
+ class NextComponent(Component):
13
+ ...
14
+
15
+ @overload
16
+ @classmethod
17
+ def create( # type: ignore
18
+ cls,
19
+ *children,
20
+ style: Optional[Style] = None,
21
+ key: Optional[Any] = None,
22
+ id: Optional[Any] = None,
23
+ class_name: Optional[Any] = None,
24
+ autofocus: Optional[bool] = None,
25
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
26
+ on_blur: Optional[
27
+ Union[EventHandler, EventSpec, list, function, BaseVar]
28
+ ] = None,
29
+ on_click: Optional[
30
+ Union[EventHandler, EventSpec, list, function, BaseVar]
31
+ ] = None,
32
+ on_context_menu: Optional[
33
+ Union[EventHandler, EventSpec, list, function, BaseVar]
34
+ ] = None,
35
+ on_double_click: Optional[
36
+ Union[EventHandler, EventSpec, list, function, BaseVar]
37
+ ] = None,
38
+ on_focus: Optional[
39
+ Union[EventHandler, EventSpec, list, function, BaseVar]
40
+ ] = None,
41
+ on_mount: Optional[
42
+ Union[EventHandler, EventSpec, list, function, BaseVar]
43
+ ] = None,
44
+ on_mouse_down: Optional[
45
+ Union[EventHandler, EventSpec, list, function, BaseVar]
46
+ ] = None,
47
+ on_mouse_enter: Optional[
48
+ Union[EventHandler, EventSpec, list, function, BaseVar]
49
+ ] = None,
50
+ on_mouse_leave: Optional[
51
+ Union[EventHandler, EventSpec, list, function, BaseVar]
52
+ ] = None,
53
+ on_mouse_move: Optional[
54
+ Union[EventHandler, EventSpec, list, function, BaseVar]
55
+ ] = None,
56
+ on_mouse_out: Optional[
57
+ Union[EventHandler, EventSpec, list, function, BaseVar]
58
+ ] = None,
59
+ on_mouse_over: Optional[
60
+ Union[EventHandler, EventSpec, list, function, BaseVar]
61
+ ] = None,
62
+ on_mouse_up: Optional[
63
+ Union[EventHandler, EventSpec, list, function, BaseVar]
64
+ ] = None,
65
+ on_scroll: Optional[
66
+ Union[EventHandler, EventSpec, list, function, BaseVar]
67
+ ] = None,
68
+ on_unmount: Optional[
69
+ Union[EventHandler, EventSpec, list, function, BaseVar]
70
+ ] = None,
71
+ **props
72
+ ) -> "NextComponent":
73
+ """Create the component.
74
+
75
+ Args:
76
+ *children: The children of the component.
77
+ style: The style of the component.
78
+ key: A unique key for the component.
79
+ id: The id for the component.
80
+ class_name: The class name for the component.
81
+ autofocus: Whether the component should take the focus once the page is loaded
82
+ custom_attrs: custom attribute
83
+ **props: The props of the component.
84
+
85
+ Returns:
86
+ The component.
87
+
88
+ Raises:
89
+ TypeError: If an invalid child is passed.
90
+ """
91
+ ...
@@ -0,0 +1,114 @@
1
+ """Image component from next/image."""
2
+
3
+ from typing import Any, Dict, Literal, Optional, Union
4
+
5
+ from reflex.utils import types
6
+ from reflex.vars import Var
7
+
8
+ from .base import NextComponent
9
+
10
+
11
+ class Image(NextComponent):
12
+ """Display an image."""
13
+
14
+ tag = "Image"
15
+ library = "next/image"
16
+ is_default = True
17
+
18
+ # This can be either an absolute external URL, or an internal path
19
+ src: Var[Any]
20
+
21
+ # Represents the rendered width in pixels, so it will affect how large the image appears.
22
+ width: Var[Any]
23
+
24
+ # Represents the rendered height in pixels, so it will affect how large the image appears.
25
+ height: Var[Any]
26
+
27
+ # Used to describe the image for screen readers and search engines.
28
+ alt: Var[str]
29
+
30
+ # A custom function used to resolve image URLs.
31
+ loader: Var[Any]
32
+
33
+ # A boolean that causes the image to fill the parent element, which is useful when the width and height are unknown. Default to True
34
+ fill: Var[bool]
35
+
36
+ # A string, similar to a media query, that provides information about how wide the image will be at different breakpoints.
37
+ sizes: Var[str]
38
+
39
+ # The quality of the optimized image, an integer between 1 and 100, where 100 is the best quality and therefore largest file size. Defaults to 75.
40
+ quality: Var[int]
41
+
42
+ # When true, the image will be considered high priority and preload. Lazy loading is automatically disabled for images using priority.
43
+ priority: Var[bool]
44
+
45
+ # A placeholder to use while the image is loading. Possible values are blur, empty, or data:image/.... Defaults to empty.
46
+ placeholder: Var[str]
47
+
48
+ # Allows passing CSS styles to the underlying image element.
49
+ # style: Var[Any]
50
+
51
+ # The loading behavior of the image. Defaults to lazy. Can hurt performance, recommended to use `priority` instead.
52
+ loading: Var[Literal["lazy", "eager"]]
53
+
54
+ # A Data URL to be used as a placeholder image before the src image successfully loads. Only takes effect when combined with placeholder="blur".
55
+ blurDataURL: Var[str]
56
+
57
+ def get_event_triggers(self) -> Dict[str, Any]:
58
+ """The event triggers of the component.
59
+
60
+ Returns:
61
+ The dict describing the event triggers.
62
+ """
63
+ return {
64
+ **super().get_event_triggers(),
65
+ "on_load": lambda: [],
66
+ "on_error": lambda: [],
67
+ }
68
+
69
+ @classmethod
70
+ def create(
71
+ cls,
72
+ *children,
73
+ width: Optional[Union[int, str]] = None,
74
+ height: Optional[Union[int, str]] = None,
75
+ **props,
76
+ ):
77
+ """Create an Image component from next/image.
78
+
79
+ Args:
80
+ *children: The children of the component.
81
+ width: The width of the image.
82
+ height: The height of the image.
83
+ **props:The props of the component.
84
+
85
+ Returns:
86
+ _type_: _description_
87
+ """
88
+ style = props.get("style", {})
89
+ DEFAULT_W_H = "100%"
90
+
91
+ def check_prop_type(prop_name, prop_value):
92
+ if types.check_prop_in_allowed_types(prop_value, allowed_types=[int]):
93
+ props[prop_name] = prop_value
94
+
95
+ elif types.check_prop_in_allowed_types(prop_value, allowed_types=[str]):
96
+ props[prop_name] = 0
97
+ style[prop_name] = prop_value
98
+ else:
99
+ props[prop_name] = 0
100
+ style[prop_name] = DEFAULT_W_H
101
+
102
+ check_prop_type("width", width)
103
+ check_prop_type("height", height)
104
+
105
+ props["style"] = style
106
+
107
+ # mysteriously, following `sizes` prop is needed to avoid blury images.
108
+ props["sizes"] = "100vw"
109
+
110
+ src = props.get("src", None)
111
+ if src is not None and not isinstance(src, (Var)):
112
+ props["src"] = Var.create(value=src, _var_is_string=True)
113
+
114
+ return super().create(*children, **props)
@@ -0,0 +1,122 @@
1
+ """Stub file for reflex/components/next/image.py"""
2
+ # ------------------- DO NOT EDIT ----------------------
3
+ # This file was generated by `scripts/pyi_generator.py`!
4
+ # ------------------------------------------------------
5
+
6
+ from typing import Any, Dict, Literal, Optional, Union, overload
7
+ from reflex.vars import Var, BaseVar, ComputedVar
8
+ from reflex.event import EventChain, EventHandler, EventSpec
9
+ from reflex.style import Style
10
+ from typing import Any, Dict, Literal, Optional, Union
11
+ from reflex.utils import types
12
+ from reflex.vars import Var
13
+ from .base import NextComponent
14
+
15
+ class Image(NextComponent):
16
+ def get_event_triggers(self) -> Dict[str, Any]: ...
17
+ @overload
18
+ @classmethod
19
+ def create( # type: ignore
20
+ cls,
21
+ *children,
22
+ width: Optional[Union[str, int]] = None,
23
+ height: Optional[Union[str, int]] = None,
24
+ src: Optional[Union[Var[Any], Any]] = None,
25
+ alt: Optional[Union[Var[str], str]] = None,
26
+ loader: Optional[Union[Var[Any], Any]] = None,
27
+ fill: Optional[Union[Var[bool], bool]] = None,
28
+ sizes: Optional[Union[Var[str], str]] = None,
29
+ quality: Optional[Union[Var[int], int]] = None,
30
+ priority: Optional[Union[Var[bool], bool]] = None,
31
+ placeholder: Optional[Union[Var[str], str]] = None,
32
+ loading: Optional[
33
+ Union[Var[Literal["lazy", "eager"]], Literal["lazy", "eager"]]
34
+ ] = None,
35
+ blurDataURL: Optional[Union[Var[str], str]] = None,
36
+ style: Optional[Style] = None,
37
+ key: Optional[Any] = None,
38
+ id: Optional[Any] = None,
39
+ class_name: Optional[Any] = None,
40
+ autofocus: Optional[bool] = None,
41
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
42
+ on_blur: Optional[
43
+ Union[EventHandler, EventSpec, list, function, BaseVar]
44
+ ] = None,
45
+ on_click: Optional[
46
+ Union[EventHandler, EventSpec, list, function, BaseVar]
47
+ ] = None,
48
+ on_context_menu: Optional[
49
+ Union[EventHandler, EventSpec, list, function, BaseVar]
50
+ ] = None,
51
+ on_double_click: Optional[
52
+ Union[EventHandler, EventSpec, list, function, BaseVar]
53
+ ] = None,
54
+ on_error: Optional[
55
+ Union[EventHandler, EventSpec, list, function, BaseVar]
56
+ ] = None,
57
+ on_focus: Optional[
58
+ Union[EventHandler, EventSpec, list, function, BaseVar]
59
+ ] = None,
60
+ on_load: Optional[
61
+ Union[EventHandler, EventSpec, list, function, BaseVar]
62
+ ] = None,
63
+ on_mount: Optional[
64
+ Union[EventHandler, EventSpec, list, function, BaseVar]
65
+ ] = None,
66
+ on_mouse_down: Optional[
67
+ Union[EventHandler, EventSpec, list, function, BaseVar]
68
+ ] = None,
69
+ on_mouse_enter: Optional[
70
+ Union[EventHandler, EventSpec, list, function, BaseVar]
71
+ ] = None,
72
+ on_mouse_leave: Optional[
73
+ Union[EventHandler, EventSpec, list, function, BaseVar]
74
+ ] = None,
75
+ on_mouse_move: Optional[
76
+ Union[EventHandler, EventSpec, list, function, BaseVar]
77
+ ] = None,
78
+ on_mouse_out: Optional[
79
+ Union[EventHandler, EventSpec, list, function, BaseVar]
80
+ ] = None,
81
+ on_mouse_over: Optional[
82
+ Union[EventHandler, EventSpec, list, function, BaseVar]
83
+ ] = None,
84
+ on_mouse_up: Optional[
85
+ Union[EventHandler, EventSpec, list, function, BaseVar]
86
+ ] = None,
87
+ on_scroll: Optional[
88
+ Union[EventHandler, EventSpec, list, function, BaseVar]
89
+ ] = None,
90
+ on_unmount: Optional[
91
+ Union[EventHandler, EventSpec, list, function, BaseVar]
92
+ ] = None,
93
+ **props
94
+ ) -> "Image":
95
+ """Create an Image component from next/image.
96
+
97
+ Args:
98
+ *children: The children of the component.
99
+ width: The width of the image.
100
+ height: The height of the image.
101
+ src: This can be either an absolute external URL, or an internal path
102
+ alt: Used to describe the image for screen readers and search engines.
103
+ loader: A custom function used to resolve image URLs.
104
+ fill: A boolean that causes the image to fill the parent element, which is useful when the width and height are unknown. Default to True
105
+ sizes: A string, similar to a media query, that provides information about how wide the image will be at different breakpoints.
106
+ quality: The quality of the optimized image, an integer between 1 and 100, where 100 is the best quality and therefore largest file size. Defaults to 75.
107
+ priority: When true, the image will be considered high priority and preload. Lazy loading is automatically disabled for images using priority.
108
+ placeholder: A placeholder to use while the image is loading. Possible values are blur, empty, or data:image/.... Defaults to empty.
109
+ loading: Allows passing CSS styles to the underlying image element. style: Var[Any] The loading behavior of the image. Defaults to lazy. Can hurt performance, recommended to use `priority` instead.
110
+ blurDataURL: A Data URL to be used as a placeholder image before the src image successfully loads. Only takes effect when combined with placeholder="blur".
111
+ style: The style of the component.
112
+ key: A unique key for the component.
113
+ id: The id for the component.
114
+ class_name: The class name for the component.
115
+ autofocus: Whether the component should take the focus once the page is loaded
116
+ custom_attrs: custom attribute
117
+ **props:The props of the component.
118
+
119
+ Returns:
120
+ _type_: _description_
121
+ """
122
+ ...
@@ -0,0 +1,33 @@
1
+ """Wrapping of the next-video component."""
2
+
3
+ from typing import Optional
4
+
5
+ from reflex.components.component import Component
6
+ from reflex.vars import Var
7
+
8
+ from .base import NextComponent
9
+
10
+
11
+ class Video(NextComponent):
12
+ """A video component from NextJS."""
13
+
14
+ tag = "Video"
15
+ library = "next-video"
16
+ is_default = True
17
+ # the URL
18
+ src: Var[str]
19
+
20
+ as_: Optional[Component]
21
+
22
+ @classmethod
23
+ def create(cls, *children, **props) -> NextComponent:
24
+ """Create a Video component.
25
+
26
+ Args:
27
+ *children: The children of the component.
28
+ **props: The props of the component.
29
+
30
+ Returns:
31
+ The Video component.
32
+ """
33
+ return super().create(*children, **props)
@@ -0,0 +1,92 @@
1
+ """Stub file for reflex/components/next/video.py"""
2
+ # ------------------- DO NOT EDIT ----------------------
3
+ # This file was generated by `scripts/pyi_generator.py`!
4
+ # ------------------------------------------------------
5
+
6
+ from typing import Any, Dict, Literal, Optional, Union, overload
7
+ from reflex.vars import Var, BaseVar, ComputedVar
8
+ from reflex.event import EventChain, EventHandler, EventSpec
9
+ from reflex.style import Style
10
+ from typing import Optional
11
+ from reflex.components.component import Component
12
+ from reflex.vars import Var
13
+ from .base import NextComponent
14
+
15
+ class Video(NextComponent):
16
+ @overload
17
+ @classmethod
18
+ def create( # type: ignore
19
+ cls,
20
+ *children,
21
+ src: Optional[Union[Var[str], str]] = None,
22
+ as_: Optional[Component] = None,
23
+ style: Optional[Style] = None,
24
+ key: Optional[Any] = None,
25
+ id: Optional[Any] = None,
26
+ class_name: Optional[Any] = None,
27
+ autofocus: Optional[bool] = None,
28
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
29
+ on_blur: Optional[
30
+ Union[EventHandler, EventSpec, list, function, BaseVar]
31
+ ] = None,
32
+ on_click: Optional[
33
+ Union[EventHandler, EventSpec, list, function, BaseVar]
34
+ ] = None,
35
+ on_context_menu: Optional[
36
+ Union[EventHandler, EventSpec, list, function, BaseVar]
37
+ ] = None,
38
+ on_double_click: Optional[
39
+ Union[EventHandler, EventSpec, list, function, BaseVar]
40
+ ] = None,
41
+ on_focus: Optional[
42
+ Union[EventHandler, EventSpec, list, function, BaseVar]
43
+ ] = None,
44
+ on_mount: Optional[
45
+ Union[EventHandler, EventSpec, list, function, BaseVar]
46
+ ] = None,
47
+ on_mouse_down: Optional[
48
+ Union[EventHandler, EventSpec, list, function, BaseVar]
49
+ ] = None,
50
+ on_mouse_enter: Optional[
51
+ Union[EventHandler, EventSpec, list, function, BaseVar]
52
+ ] = None,
53
+ on_mouse_leave: Optional[
54
+ Union[EventHandler, EventSpec, list, function, BaseVar]
55
+ ] = None,
56
+ on_mouse_move: Optional[
57
+ Union[EventHandler, EventSpec, list, function, BaseVar]
58
+ ] = None,
59
+ on_mouse_out: Optional[
60
+ Union[EventHandler, EventSpec, list, function, BaseVar]
61
+ ] = None,
62
+ on_mouse_over: Optional[
63
+ Union[EventHandler, EventSpec, list, function, BaseVar]
64
+ ] = None,
65
+ on_mouse_up: Optional[
66
+ Union[EventHandler, EventSpec, list, function, BaseVar]
67
+ ] = None,
68
+ on_scroll: Optional[
69
+ Union[EventHandler, EventSpec, list, function, BaseVar]
70
+ ] = None,
71
+ on_unmount: Optional[
72
+ Union[EventHandler, EventSpec, list, function, BaseVar]
73
+ ] = None,
74
+ **props
75
+ ) -> "Video":
76
+ """Create a Video component.
77
+
78
+ Args:
79
+ *children: The children of the component.
80
+ src: the URL
81
+ style: The style of the component.
82
+ key: A unique key for the component.
83
+ id: The id for the component.
84
+ class_name: The class name for the component.
85
+ autofocus: Whether the component should take the focus once the page is loaded
86
+ custom_attrs: custom attribute
87
+ **props: The props of the component.
88
+
89
+ Returns:
90
+ The Video component.
91
+ """
92
+ ...
@@ -0,0 +1,3 @@
1
+ """Radix primitive components (https://www.radix-ui.com/primitives)."""
2
+
3
+ from .accordion import accordion