reflex 0.5.4a3__py3-none-any.whl → 0.5.5__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.
- reflex/.templates/apps/demo/code/demo.py +1 -0
- reflex/.templates/apps/demo/code/pages/__init__.py +1 -0
- reflex/.templates/apps/demo/code/pages/datatable.py +1 -0
- reflex/.templates/apps/demo/code/pages/forms.py +1 -0
- reflex/.templates/apps/demo/code/pages/graphing.py +1 -0
- reflex/.templates/apps/demo/code/pages/home.py +1 -0
- reflex/.templates/apps/demo/code/styles.py +1 -0
- reflex/.templates/apps/demo/code/webui/components/loading_icon.py +1 -8
- reflex/.templates/web/components/reflex/chakra_color_mode_provider.js +27 -12
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +19 -5
- reflex/.templates/web/utils/state.js +73 -7
- reflex/__init__.py +3 -0
- reflex/__init__.pyi +3 -0
- reflex/admin.py +1 -0
- reflex/app.py +8 -6
- reflex/app_module_for_backend.py +2 -1
- reflex/base.py +4 -4
- reflex/compiler/compiler.py +4 -3
- reflex/compiler/templates.py +2 -0
- reflex/compiler/utils.py +58 -35
- reflex/components/__init__.py +1 -0
- reflex/components/base/__init__.py +1 -0
- reflex/components/base/app_wrap.py +1 -0
- reflex/components/base/fragment.py +1 -0
- reflex/components/base/link.py +0 -1
- reflex/components/base/script.py +11 -15
- reflex/components/base/script.pyi +1 -2
- reflex/components/chakra/base.py +15 -13
- reflex/components/chakra/base.pyi +3 -1
- reflex/components/chakra/datadisplay/code.py +1 -0
- reflex/components/chakra/datadisplay/divider.py +1 -0
- reflex/components/chakra/datadisplay/table.py +1 -0
- reflex/components/chakra/datadisplay/table.pyi +3 -0
- reflex/components/chakra/datadisplay/tag.py +1 -0
- reflex/components/chakra/disclosure/transition.py +1 -0
- reflex/components/chakra/feedback/circularprogress.py +1 -0
- reflex/components/chakra/forms/button.py +1 -0
- reflex/components/chakra/forms/checkbox.py +4 -13
- reflex/components/chakra/forms/checkbox.pyi +1 -3
- reflex/components/chakra/forms/colormodeswitch.py +1 -0
- reflex/components/chakra/forms/editable.py +13 -16
- reflex/components/chakra/forms/editable.pyi +1 -3
- reflex/components/chakra/forms/form.py +1 -0
- reflex/components/chakra/forms/input.py +22 -21
- reflex/components/chakra/forms/input.pyi +4 -4
- reflex/components/chakra/forms/multiselect.py +1 -0
- reflex/components/chakra/forms/numberinput.py +3 -12
- reflex/components/chakra/forms/numberinput.pyi +1 -3
- reflex/components/chakra/forms/pininput.py +8 -14
- reflex/components/chakra/forms/pininput.pyi +2 -3
- reflex/components/chakra/forms/radio.py +4 -13
- reflex/components/chakra/forms/radio.pyi +2 -3
- reflex/components/chakra/forms/rangeslider.py +10 -13
- reflex/components/chakra/forms/rangeslider.pyi +2 -3
- reflex/components/chakra/forms/select.py +4 -12
- reflex/components/chakra/forms/select.pyi +2 -3
- reflex/components/chakra/forms/slider.py +10 -13
- reflex/components/chakra/forms/slider.pyi +2 -3
- reflex/components/chakra/forms/switch.py +4 -13
- reflex/components/chakra/forms/switch.pyi +1 -3
- reflex/components/chakra/forms/textarea.py +16 -17
- reflex/components/chakra/forms/textarea.pyi +1 -3
- reflex/components/chakra/media/avatar.py +4 -12
- reflex/components/chakra/media/avatar.pyi +1 -2
- reflex/components/chakra/media/icon.py +1 -0
- reflex/components/chakra/media/image.py +7 -11
- reflex/components/chakra/media/image.pyi +2 -2
- reflex/components/chakra/navigation/link.py +8 -4
- reflex/components/chakra/navigation/link.pyi +2 -1
- reflex/components/chakra/overlay/alertdialog.py +12 -14
- reflex/components/chakra/overlay/alertdialog.pyi +1 -2
- reflex/components/chakra/overlay/drawer.py +12 -14
- reflex/components/chakra/overlay/drawer.pyi +1 -2
- reflex/components/chakra/overlay/menu.py +7 -11
- reflex/components/chakra/overlay/menu.pyi +2 -2
- reflex/components/chakra/overlay/modal.py +13 -13
- reflex/components/chakra/overlay/modal.pyi +2 -2
- reflex/components/chakra/overlay/popover.py +6 -12
- reflex/components/chakra/overlay/popover.pyi +1 -2
- reflex/components/chakra/overlay/tooltip.py +7 -13
- reflex/components/chakra/overlay/tooltip.pyi +1 -2
- reflex/components/chakra/typography/heading.py +0 -1
- reflex/components/chakra/typography/span.py +1 -0
- reflex/components/chakra/typography/text.py +1 -0
- reflex/components/component.py +70 -43
- reflex/components/core/__init__.py +1 -0
- reflex/components/core/banner.py +27 -24
- reflex/components/core/banner.pyi +6 -2
- reflex/components/core/client_side_routing.py +1 -0
- reflex/components/core/cond.py +19 -17
- reflex/components/core/debounce.py +4 -11
- reflex/components/core/debounce.pyi +1 -1
- reflex/components/core/foreach.py +1 -0
- reflex/components/core/html.py +1 -0
- reflex/components/core/match.py +9 -6
- reflex/components/core/upload.py +26 -25
- reflex/components/core/upload.pyi +3 -4
- reflex/components/datadisplay/__init__.py +1 -0
- reflex/components/datadisplay/code.py +27 -23
- reflex/components/datadisplay/code.pyi +4 -2
- reflex/components/datadisplay/dataeditor.py +73 -80
- reflex/components/datadisplay/dataeditor.pyi +52 -4
- reflex/components/datadisplay/logo.py +1 -0
- reflex/components/el/__init__.py +1 -0
- reflex/components/el/__init__.pyi +8 -0
- reflex/components/el/element.py +0 -1
- reflex/components/el/elements/__init__.py +5 -0
- reflex/components/el/elements/__init__.pyi +12 -1
- reflex/components/el/elements/base.py +1 -0
- reflex/components/el/elements/forms.py +44 -61
- reflex/components/el/elements/forms.pyi +4 -6
- reflex/components/el/elements/inline.py +1 -0
- reflex/components/el/elements/media.py +53 -0
- reflex/components/el/elements/media.pyi +428 -0
- reflex/components/el/elements/metadata.py +11 -0
- reflex/components/el/elements/metadata.pyi +80 -0
- reflex/components/el/elements/other.py +1 -0
- reflex/components/el/elements/scripts.py +1 -0
- reflex/components/el/elements/tables.py +1 -0
- reflex/components/el/elements/typography.py +1 -0
- reflex/components/gridjs/datatable.py +9 -6
- reflex/components/gridjs/datatable.pyi +4 -1
- reflex/components/markdown/markdown.py +36 -41
- reflex/components/markdown/markdown.pyi +4 -3
- reflex/components/media/icon.py +1 -0
- reflex/components/moment/moment.py +11 -17
- reflex/components/moment/moment.pyi +4 -3
- reflex/components/next/base.py +1 -0
- reflex/components/next/image.py +6 -11
- reflex/components/next/image.pyi +2 -2
- reflex/components/plotly/plotly.py +1 -0
- reflex/components/props.py +1 -0
- reflex/components/radix/__init__.py +1 -0
- reflex/components/radix/primitives/__init__.py +1 -0
- reflex/components/radix/primitives/accordion.py +7 -15
- reflex/components/radix/primitives/accordion.pyi +7 -4
- reflex/components/radix/primitives/base.py +1 -0
- reflex/components/radix/primitives/drawer.py +17 -27
- reflex/components/radix/primitives/drawer.pyi +2 -4
- reflex/components/radix/primitives/form.py +4 -12
- reflex/components/radix/primitives/form.pyi +2 -3
- reflex/components/radix/primitives/slider.py +6 -11
- reflex/components/radix/primitives/slider.pyi +2 -2
- reflex/components/radix/themes/__init__.py +1 -0
- reflex/components/radix/themes/base.py +3 -3
- reflex/components/radix/themes/base.pyi +3 -2
- reflex/components/radix/themes/color_mode.py +31 -2
- reflex/components/radix/themes/color_mode.pyi +10 -1
- reflex/components/radix/themes/components/__init__.py +1 -0
- reflex/components/radix/themes/components/alert_dialog.py +13 -24
- reflex/components/radix/themes/components/alert_dialog.pyi +2 -4
- reflex/components/radix/themes/components/aspect_ratio.py +1 -0
- reflex/components/radix/themes/components/card.py +1 -0
- reflex/components/radix/themes/components/checkbox.py +6 -22
- reflex/components/radix/themes/components/checkbox.pyi +2 -4
- reflex/components/radix/themes/components/checkbox_group.py +15 -3
- reflex/components/radix/themes/components/checkbox_group.pyi +10 -2
- reflex/components/radix/themes/components/context_menu.py +29 -38
- reflex/components/radix/themes/components/context_menu.pyi +2 -5
- reflex/components/radix/themes/components/dialog.py +18 -26
- reflex/components/radix/themes/components/dialog.pyi +2 -4
- reflex/components/radix/themes/components/dropdown_menu.py +32 -57
- reflex/components/radix/themes/components/dropdown_menu.pyi +2 -7
- reflex/components/radix/themes/components/hover_card.py +5 -12
- reflex/components/radix/themes/components/hover_card.pyi +2 -3
- reflex/components/radix/themes/components/icon_button.py +1 -0
- reflex/components/radix/themes/components/icon_button.pyi +1 -0
- reflex/components/radix/themes/components/inset.py +1 -0
- reflex/components/radix/themes/components/popover.py +22 -27
- reflex/components/radix/themes/components/popover.pyi +2 -4
- reflex/components/radix/themes/components/radio_group.py +25 -17
- reflex/components/radix/themes/components/radio_group.pyi +2 -3
- reflex/components/radix/themes/components/scroll_area.py +1 -0
- reflex/components/radix/themes/components/segmented_control.py +18 -5
- reflex/components/radix/themes/components/segmented_control.pyi +16 -7
- reflex/components/radix/themes/components/select.py +13 -23
- reflex/components/radix/themes/components/select.pyi +1 -4
- reflex/components/radix/themes/components/separator.py +1 -0
- reflex/components/radix/themes/components/slider.py +7 -12
- reflex/components/radix/themes/components/slider.pyi +2 -3
- reflex/components/radix/themes/components/switch.py +5 -12
- reflex/components/radix/themes/components/switch.pyi +2 -3
- reflex/components/radix/themes/components/table.py +1 -0
- reflex/components/radix/themes/components/tabs.py +4 -11
- reflex/components/radix/themes/components/tabs.pyi +2 -2
- reflex/components/radix/themes/components/text_area.py +19 -18
- reflex/components/radix/themes/components/text_area.pyi +2 -3
- reflex/components/radix/themes/components/text_field.py +19 -18
- reflex/components/radix/themes/components/text_field.pyi +3 -3
- reflex/components/radix/themes/components/tooltip.py +10 -13
- reflex/components/radix/themes/components/tooltip.pyi +2 -3
- reflex/components/radix/themes/layout/__init__.py +1 -0
- reflex/components/radix/themes/layout/box.py +1 -0
- reflex/components/radix/themes/layout/container.py +1 -0
- reflex/components/radix/themes/layout/list.py +1 -0
- reflex/components/radix/themes/layout/list.pyi +1 -0
- reflex/components/radix/themes/layout/section.py +1 -0
- reflex/components/radix/themes/typography/__init__.py +1 -0
- reflex/components/radix/themes/typography/base.py +1 -0
- reflex/components/radix/themes/typography/blockquote.py +1 -0
- reflex/components/radix/themes/typography/code.py +1 -0
- reflex/components/radix/themes/typography/heading.py +1 -0
- reflex/components/radix/themes/typography/link.py +8 -3
- reflex/components/radix/themes/typography/link.pyi +2 -1
- reflex/components/react_player/audio.py +1 -0
- reflex/components/react_player/audio.pyi +48 -0
- reflex/components/react_player/react_player.py +49 -0
- reflex/components/react_player/react_player.pyi +49 -0
- reflex/components/react_player/video.py +1 -0
- reflex/components/react_player/video.pyi +48 -0
- reflex/components/recharts/__init__.py +1 -0
- reflex/components/recharts/cartesian.py +264 -74
- reflex/components/recharts/cartesian.pyi +573 -58
- reflex/components/recharts/charts.py +68 -78
- reflex/components/recharts/charts.pyi +373 -156
- reflex/components/recharts/general.py +52 -20
- reflex/components/recharts/general.pyi +52 -6
- reflex/components/recharts/polar.py +30 -18
- reflex/components/recharts/polar.pyi +66 -5
- reflex/components/recharts/recharts.py +5 -3
- reflex/components/recharts/recharts.pyi +2 -1
- reflex/components/sonner/toast.py +2 -2
- reflex/components/sonner/toast.pyi +1 -1
- reflex/components/suneditor/editor.py +39 -26
- reflex/components/suneditor/editor.pyi +4 -4
- reflex/components/tags/iter_tag.py +1 -0
- reflex/constants/__init__.py +3 -2
- reflex/constants/base.py +20 -21
- reflex/constants/compiler.py +3 -1
- reflex/constants/config.py +1 -0
- reflex/constants/event.py +1 -0
- reflex/constants/installer.py +3 -2
- reflex/constants/style.py +2 -8
- reflex/event.py +36 -6
- reflex/experimental/assets.py +1 -0
- reflex/experimental/client_state.py +9 -3
- reflex/experimental/hooks.py +1 -0
- reflex/experimental/misc.py +12 -3
- reflex/middleware/hydrate_middleware.py +1 -0
- reflex/middleware/middleware.py +1 -0
- reflex/state.py +38 -1
- reflex/style.py +67 -20
- reflex/testing.py +6 -2
- reflex/utils/build.py +76 -72
- reflex/utils/exec.py +17 -9
- reflex/utils/export.py +13 -9
- reflex/utils/imports.py +34 -5
- reflex/utils/lazy_loader.py +1 -0
- reflex/utils/path_ops.py +39 -33
- reflex/utils/prerequisites.py +38 -29
- reflex/utils/processes.py +1 -1
- reflex/utils/serializers.py +3 -6
- reflex/utils/watch.py +3 -1
- reflex/vars.py +26 -10
- reflex/vars.pyi +3 -3
- {reflex-0.5.4a3.dist-info → reflex-0.5.5.dist-info}/METADATA +3 -3
- {reflex-0.5.4a3.dist-info → reflex-0.5.5.dist-info}/RECORD +260 -260
- {reflex-0.5.4a3.dist-info → reflex-0.5.5.dist-info}/LICENSE +0 -0
- {reflex-0.5.4a3.dist-info → reflex-0.5.5.dist-info}/WHEEL +0 -0
- {reflex-0.5.4a3.dist-info → reflex-0.5.5.dist-info}/entry_points.txt +0 -0
|
@@ -9,6 +9,7 @@ from reflex.event import EventChain, EventHandler, EventSpec
|
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from typing import Any, Union
|
|
11
11
|
from reflex import Component
|
|
12
|
+
from reflex.constants.colors import Color
|
|
12
13
|
from reflex.vars import Var as Var
|
|
13
14
|
from .base import BaseHTML
|
|
14
15
|
|
|
@@ -1953,6 +1954,430 @@ class Svg(BaseHTML):
|
|
|
1953
1954
|
"""
|
|
1954
1955
|
...
|
|
1955
1956
|
|
|
1957
|
+
class Defs(BaseHTML):
|
|
1958
|
+
@overload
|
|
1959
|
+
@classmethod
|
|
1960
|
+
def create( # type: ignore
|
|
1961
|
+
cls,
|
|
1962
|
+
*children,
|
|
1963
|
+
access_key: Optional[
|
|
1964
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1965
|
+
] = None,
|
|
1966
|
+
auto_capitalize: Optional[
|
|
1967
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1968
|
+
] = None,
|
|
1969
|
+
content_editable: Optional[
|
|
1970
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1971
|
+
] = None,
|
|
1972
|
+
context_menu: Optional[
|
|
1973
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1974
|
+
] = None,
|
|
1975
|
+
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
1976
|
+
draggable: Optional[
|
|
1977
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1978
|
+
] = None,
|
|
1979
|
+
enter_key_hint: Optional[
|
|
1980
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1981
|
+
] = None,
|
|
1982
|
+
hidden: Optional[
|
|
1983
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1984
|
+
] = None,
|
|
1985
|
+
input_mode: Optional[
|
|
1986
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1987
|
+
] = None,
|
|
1988
|
+
item_prop: Optional[
|
|
1989
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1990
|
+
] = None,
|
|
1991
|
+
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
1992
|
+
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
1993
|
+
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
1994
|
+
spell_check: Optional[
|
|
1995
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1996
|
+
] = None,
|
|
1997
|
+
tab_index: Optional[
|
|
1998
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
1999
|
+
] = None,
|
|
2000
|
+
title: Optional[
|
|
2001
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2002
|
+
] = None,
|
|
2003
|
+
style: Optional[Style] = None,
|
|
2004
|
+
key: Optional[Any] = None,
|
|
2005
|
+
id: Optional[Any] = None,
|
|
2006
|
+
class_name: Optional[Any] = None,
|
|
2007
|
+
autofocus: Optional[bool] = None,
|
|
2008
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
2009
|
+
on_blur: Optional[
|
|
2010
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2011
|
+
] = None,
|
|
2012
|
+
on_click: Optional[
|
|
2013
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2014
|
+
] = None,
|
|
2015
|
+
on_context_menu: Optional[
|
|
2016
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2017
|
+
] = None,
|
|
2018
|
+
on_double_click: Optional[
|
|
2019
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2020
|
+
] = None,
|
|
2021
|
+
on_focus: Optional[
|
|
2022
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2023
|
+
] = None,
|
|
2024
|
+
on_mount: Optional[
|
|
2025
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2026
|
+
] = None,
|
|
2027
|
+
on_mouse_down: Optional[
|
|
2028
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2029
|
+
] = None,
|
|
2030
|
+
on_mouse_enter: Optional[
|
|
2031
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2032
|
+
] = None,
|
|
2033
|
+
on_mouse_leave: Optional[
|
|
2034
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2035
|
+
] = None,
|
|
2036
|
+
on_mouse_move: Optional[
|
|
2037
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2038
|
+
] = None,
|
|
2039
|
+
on_mouse_out: Optional[
|
|
2040
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2041
|
+
] = None,
|
|
2042
|
+
on_mouse_over: Optional[
|
|
2043
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2044
|
+
] = None,
|
|
2045
|
+
on_mouse_up: Optional[
|
|
2046
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2047
|
+
] = None,
|
|
2048
|
+
on_scroll: Optional[
|
|
2049
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2050
|
+
] = None,
|
|
2051
|
+
on_unmount: Optional[
|
|
2052
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2053
|
+
] = None,
|
|
2054
|
+
**props
|
|
2055
|
+
) -> "Defs":
|
|
2056
|
+
"""Create the component.
|
|
2057
|
+
|
|
2058
|
+
Args:
|
|
2059
|
+
*children: The children of the component.
|
|
2060
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
2061
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
2062
|
+
content_editable: Indicates whether the element's content is editable.
|
|
2063
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
2064
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
2065
|
+
draggable: Defines whether the element can be dragged.
|
|
2066
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
2067
|
+
hidden: Defines whether the element is hidden.
|
|
2068
|
+
input_mode: Defines the type of the element.
|
|
2069
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
2070
|
+
lang: Defines the language used in the element.
|
|
2071
|
+
role: Defines the role of the element.
|
|
2072
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
2073
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
2074
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
2075
|
+
title: Defines a tooltip for the element.
|
|
2076
|
+
style: The style of the component.
|
|
2077
|
+
key: A unique key for the component.
|
|
2078
|
+
id: The id for the component.
|
|
2079
|
+
class_name: The class name for the component.
|
|
2080
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
2081
|
+
custom_attrs: custom attribute
|
|
2082
|
+
**props: The props of the component.
|
|
2083
|
+
|
|
2084
|
+
Returns:
|
|
2085
|
+
The component.
|
|
2086
|
+
"""
|
|
2087
|
+
...
|
|
2088
|
+
|
|
2089
|
+
class Lineargradient(BaseHTML):
|
|
2090
|
+
@overload
|
|
2091
|
+
@classmethod
|
|
2092
|
+
def create( # type: ignore
|
|
2093
|
+
cls,
|
|
2094
|
+
*children,
|
|
2095
|
+
gradient_units: Optional[Union[Var[Union[str, bool]], Union[str, bool]]] = None,
|
|
2096
|
+
gradient_transform: Optional[
|
|
2097
|
+
Union[Var[Union[str, bool]], Union[str, bool]]
|
|
2098
|
+
] = None,
|
|
2099
|
+
spread_method: Optional[Union[Var[Union[str, bool]], Union[str, bool]]] = None,
|
|
2100
|
+
x1: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2101
|
+
x2: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2102
|
+
y1: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2103
|
+
y2: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2104
|
+
access_key: Optional[
|
|
2105
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2106
|
+
] = None,
|
|
2107
|
+
auto_capitalize: Optional[
|
|
2108
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2109
|
+
] = None,
|
|
2110
|
+
content_editable: Optional[
|
|
2111
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2112
|
+
] = None,
|
|
2113
|
+
context_menu: Optional[
|
|
2114
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2115
|
+
] = None,
|
|
2116
|
+
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2117
|
+
draggable: Optional[
|
|
2118
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2119
|
+
] = None,
|
|
2120
|
+
enter_key_hint: Optional[
|
|
2121
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2122
|
+
] = None,
|
|
2123
|
+
hidden: Optional[
|
|
2124
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2125
|
+
] = None,
|
|
2126
|
+
input_mode: Optional[
|
|
2127
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2128
|
+
] = None,
|
|
2129
|
+
item_prop: Optional[
|
|
2130
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2131
|
+
] = None,
|
|
2132
|
+
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2133
|
+
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2134
|
+
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2135
|
+
spell_check: Optional[
|
|
2136
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2137
|
+
] = None,
|
|
2138
|
+
tab_index: Optional[
|
|
2139
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2140
|
+
] = None,
|
|
2141
|
+
title: Optional[
|
|
2142
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2143
|
+
] = None,
|
|
2144
|
+
style: Optional[Style] = None,
|
|
2145
|
+
key: Optional[Any] = None,
|
|
2146
|
+
id: Optional[Any] = None,
|
|
2147
|
+
class_name: Optional[Any] = None,
|
|
2148
|
+
autofocus: Optional[bool] = None,
|
|
2149
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
2150
|
+
on_blur: Optional[
|
|
2151
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2152
|
+
] = None,
|
|
2153
|
+
on_click: Optional[
|
|
2154
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2155
|
+
] = None,
|
|
2156
|
+
on_context_menu: Optional[
|
|
2157
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2158
|
+
] = None,
|
|
2159
|
+
on_double_click: Optional[
|
|
2160
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2161
|
+
] = None,
|
|
2162
|
+
on_focus: Optional[
|
|
2163
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2164
|
+
] = None,
|
|
2165
|
+
on_mount: Optional[
|
|
2166
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2167
|
+
] = None,
|
|
2168
|
+
on_mouse_down: Optional[
|
|
2169
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2170
|
+
] = None,
|
|
2171
|
+
on_mouse_enter: Optional[
|
|
2172
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2173
|
+
] = None,
|
|
2174
|
+
on_mouse_leave: Optional[
|
|
2175
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2176
|
+
] = None,
|
|
2177
|
+
on_mouse_move: Optional[
|
|
2178
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2179
|
+
] = None,
|
|
2180
|
+
on_mouse_out: Optional[
|
|
2181
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2182
|
+
] = None,
|
|
2183
|
+
on_mouse_over: Optional[
|
|
2184
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2185
|
+
] = None,
|
|
2186
|
+
on_mouse_up: Optional[
|
|
2187
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2188
|
+
] = None,
|
|
2189
|
+
on_scroll: Optional[
|
|
2190
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2191
|
+
] = None,
|
|
2192
|
+
on_unmount: Optional[
|
|
2193
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2194
|
+
] = None,
|
|
2195
|
+
**props
|
|
2196
|
+
) -> "Lineargradient":
|
|
2197
|
+
"""Create the component.
|
|
2198
|
+
|
|
2199
|
+
Args:
|
|
2200
|
+
*children: The children of the component.
|
|
2201
|
+
gradient_units: Units for the gradient
|
|
2202
|
+
gradient_transform: Transform applied to the gradient
|
|
2203
|
+
spread_method: Method used to spread the gradient
|
|
2204
|
+
x1: X coordinate of the starting point of the gradient
|
|
2205
|
+
x2: X coordinate of the ending point of the gradient
|
|
2206
|
+
y1: Y coordinate of the starting point of the gradient
|
|
2207
|
+
y2: Y coordinate of the ending point of the gradient
|
|
2208
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
2209
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
2210
|
+
content_editable: Indicates whether the element's content is editable.
|
|
2211
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
2212
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
2213
|
+
draggable: Defines whether the element can be dragged.
|
|
2214
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
2215
|
+
hidden: Defines whether the element is hidden.
|
|
2216
|
+
input_mode: Defines the type of the element.
|
|
2217
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
2218
|
+
lang: Defines the language used in the element.
|
|
2219
|
+
role: Defines the role of the element.
|
|
2220
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
2221
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
2222
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
2223
|
+
title: Defines a tooltip for the element.
|
|
2224
|
+
style: The style of the component.
|
|
2225
|
+
key: A unique key for the component.
|
|
2226
|
+
id: The id for the component.
|
|
2227
|
+
class_name: The class name for the component.
|
|
2228
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
2229
|
+
custom_attrs: custom attribute
|
|
2230
|
+
**props: The props of the component.
|
|
2231
|
+
|
|
2232
|
+
Returns:
|
|
2233
|
+
The component.
|
|
2234
|
+
"""
|
|
2235
|
+
...
|
|
2236
|
+
|
|
2237
|
+
class Stop(BaseHTML):
|
|
2238
|
+
@overload
|
|
2239
|
+
@classmethod
|
|
2240
|
+
def create( # type: ignore
|
|
2241
|
+
cls,
|
|
2242
|
+
*children,
|
|
2243
|
+
offset: Optional[
|
|
2244
|
+
Union[Var[Union[str, float, int]], Union[str, float, int]]
|
|
2245
|
+
] = None,
|
|
2246
|
+
stop_color: Optional[
|
|
2247
|
+
Union[Var[Union[str, Color, bool]], Union[str, Color, bool]]
|
|
2248
|
+
] = None,
|
|
2249
|
+
stop_opacity: Optional[
|
|
2250
|
+
Union[Var[Union[str, float, int, bool]], Union[str, float, int, bool]]
|
|
2251
|
+
] = None,
|
|
2252
|
+
access_key: Optional[
|
|
2253
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2254
|
+
] = None,
|
|
2255
|
+
auto_capitalize: Optional[
|
|
2256
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2257
|
+
] = None,
|
|
2258
|
+
content_editable: Optional[
|
|
2259
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2260
|
+
] = None,
|
|
2261
|
+
context_menu: Optional[
|
|
2262
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2263
|
+
] = None,
|
|
2264
|
+
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2265
|
+
draggable: Optional[
|
|
2266
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2267
|
+
] = None,
|
|
2268
|
+
enter_key_hint: Optional[
|
|
2269
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2270
|
+
] = None,
|
|
2271
|
+
hidden: Optional[
|
|
2272
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2273
|
+
] = None,
|
|
2274
|
+
input_mode: Optional[
|
|
2275
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2276
|
+
] = None,
|
|
2277
|
+
item_prop: Optional[
|
|
2278
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2279
|
+
] = None,
|
|
2280
|
+
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2281
|
+
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2282
|
+
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
2283
|
+
spell_check: Optional[
|
|
2284
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2285
|
+
] = None,
|
|
2286
|
+
tab_index: Optional[
|
|
2287
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2288
|
+
] = None,
|
|
2289
|
+
title: Optional[
|
|
2290
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
2291
|
+
] = None,
|
|
2292
|
+
style: Optional[Style] = None,
|
|
2293
|
+
key: Optional[Any] = None,
|
|
2294
|
+
id: Optional[Any] = None,
|
|
2295
|
+
class_name: Optional[Any] = None,
|
|
2296
|
+
autofocus: Optional[bool] = None,
|
|
2297
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
2298
|
+
on_blur: Optional[
|
|
2299
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2300
|
+
] = None,
|
|
2301
|
+
on_click: Optional[
|
|
2302
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2303
|
+
] = None,
|
|
2304
|
+
on_context_menu: Optional[
|
|
2305
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2306
|
+
] = None,
|
|
2307
|
+
on_double_click: Optional[
|
|
2308
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2309
|
+
] = None,
|
|
2310
|
+
on_focus: Optional[
|
|
2311
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2312
|
+
] = None,
|
|
2313
|
+
on_mount: Optional[
|
|
2314
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2315
|
+
] = None,
|
|
2316
|
+
on_mouse_down: Optional[
|
|
2317
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2318
|
+
] = None,
|
|
2319
|
+
on_mouse_enter: Optional[
|
|
2320
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2321
|
+
] = None,
|
|
2322
|
+
on_mouse_leave: Optional[
|
|
2323
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2324
|
+
] = None,
|
|
2325
|
+
on_mouse_move: Optional[
|
|
2326
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2327
|
+
] = None,
|
|
2328
|
+
on_mouse_out: Optional[
|
|
2329
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2330
|
+
] = None,
|
|
2331
|
+
on_mouse_over: Optional[
|
|
2332
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2333
|
+
] = None,
|
|
2334
|
+
on_mouse_up: Optional[
|
|
2335
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2336
|
+
] = None,
|
|
2337
|
+
on_scroll: Optional[
|
|
2338
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2339
|
+
] = None,
|
|
2340
|
+
on_unmount: Optional[
|
|
2341
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
2342
|
+
] = None,
|
|
2343
|
+
**props
|
|
2344
|
+
) -> "Stop":
|
|
2345
|
+
"""Create the component.
|
|
2346
|
+
|
|
2347
|
+
Args:
|
|
2348
|
+
*children: The children of the component.
|
|
2349
|
+
offset: Offset of the gradient stop
|
|
2350
|
+
stop_color: Color of the gradient stop
|
|
2351
|
+
stop_opacity: Opacity of the gradient stop
|
|
2352
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
2353
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
2354
|
+
content_editable: Indicates whether the element's content is editable.
|
|
2355
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
2356
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
2357
|
+
draggable: Defines whether the element can be dragged.
|
|
2358
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
2359
|
+
hidden: Defines whether the element is hidden.
|
|
2360
|
+
input_mode: Defines the type of the element.
|
|
2361
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
2362
|
+
lang: Defines the language used in the element.
|
|
2363
|
+
role: Defines the role of the element.
|
|
2364
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
2365
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
2366
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
2367
|
+
title: Defines a tooltip for the element.
|
|
2368
|
+
style: The style of the component.
|
|
2369
|
+
key: A unique key for the component.
|
|
2370
|
+
id: The id for the component.
|
|
2371
|
+
class_name: The class name for the component.
|
|
2372
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
2373
|
+
custom_attrs: custom attribute
|
|
2374
|
+
**props: The props of the component.
|
|
2375
|
+
|
|
2376
|
+
Returns:
|
|
2377
|
+
The component.
|
|
2378
|
+
"""
|
|
2379
|
+
...
|
|
2380
|
+
|
|
1956
2381
|
class Path(BaseHTML):
|
|
1957
2382
|
@overload
|
|
1958
2383
|
@classmethod
|
|
@@ -2100,4 +2525,7 @@ picture = Picture.create
|
|
|
2100
2525
|
portal = Portal.create
|
|
2101
2526
|
source = Source.create
|
|
2102
2527
|
svg = Svg.create
|
|
2528
|
+
defs = Defs.create
|
|
2529
|
+
lineargradient = Lineargradient.create
|
|
2530
|
+
stop = Stop.create
|
|
2103
2531
|
path = Path.create
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
|
2
|
+
|
|
2
3
|
from typing import Union
|
|
3
4
|
|
|
4
5
|
from reflex.components.el.element import Element
|
|
@@ -55,8 +56,18 @@ class Title(Element): # noqa: E742
|
|
|
55
56
|
tag = "title"
|
|
56
57
|
|
|
57
58
|
|
|
59
|
+
# Had to be named with an underscore so it doesnt conflict with reflex.style Style in pyi
|
|
60
|
+
class StyleEl(Element): # noqa: E742
|
|
61
|
+
"""Display the style element."""
|
|
62
|
+
|
|
63
|
+
tag = "style"
|
|
64
|
+
|
|
65
|
+
media: Var[Union[str, int, bool]]
|
|
66
|
+
|
|
67
|
+
|
|
58
68
|
base = Base.create
|
|
59
69
|
head = Head.create
|
|
60
70
|
link = Link.create
|
|
61
71
|
meta = Meta.create
|
|
62
72
|
title = Title.create
|
|
73
|
+
style = StyleEl.create
|
|
@@ -651,8 +651,88 @@ class Title(Element):
|
|
|
651
651
|
"""
|
|
652
652
|
...
|
|
653
653
|
|
|
654
|
+
class StyleEl(Element):
|
|
655
|
+
@overload
|
|
656
|
+
@classmethod
|
|
657
|
+
def create( # type: ignore
|
|
658
|
+
cls,
|
|
659
|
+
*children,
|
|
660
|
+
media: Optional[
|
|
661
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
662
|
+
] = None,
|
|
663
|
+
style: Optional[Style] = None,
|
|
664
|
+
key: Optional[Any] = None,
|
|
665
|
+
id: Optional[Any] = None,
|
|
666
|
+
class_name: Optional[Any] = None,
|
|
667
|
+
autofocus: Optional[bool] = None,
|
|
668
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
669
|
+
on_blur: Optional[
|
|
670
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
671
|
+
] = None,
|
|
672
|
+
on_click: Optional[
|
|
673
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
674
|
+
] = None,
|
|
675
|
+
on_context_menu: Optional[
|
|
676
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
677
|
+
] = None,
|
|
678
|
+
on_double_click: Optional[
|
|
679
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
680
|
+
] = None,
|
|
681
|
+
on_focus: Optional[
|
|
682
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
683
|
+
] = None,
|
|
684
|
+
on_mount: Optional[
|
|
685
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
686
|
+
] = None,
|
|
687
|
+
on_mouse_down: Optional[
|
|
688
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
689
|
+
] = None,
|
|
690
|
+
on_mouse_enter: Optional[
|
|
691
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
692
|
+
] = None,
|
|
693
|
+
on_mouse_leave: Optional[
|
|
694
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
695
|
+
] = None,
|
|
696
|
+
on_mouse_move: Optional[
|
|
697
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
698
|
+
] = None,
|
|
699
|
+
on_mouse_out: Optional[
|
|
700
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
701
|
+
] = None,
|
|
702
|
+
on_mouse_over: Optional[
|
|
703
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
704
|
+
] = None,
|
|
705
|
+
on_mouse_up: Optional[
|
|
706
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
707
|
+
] = None,
|
|
708
|
+
on_scroll: Optional[
|
|
709
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
710
|
+
] = None,
|
|
711
|
+
on_unmount: Optional[
|
|
712
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
713
|
+
] = None,
|
|
714
|
+
**props
|
|
715
|
+
) -> "StyleEl":
|
|
716
|
+
"""Create the component.
|
|
717
|
+
|
|
718
|
+
Args:
|
|
719
|
+
*children: The children of the component.
|
|
720
|
+
style: The style of the component.
|
|
721
|
+
key: A unique key for the component.
|
|
722
|
+
id: The id for the component.
|
|
723
|
+
class_name: The class name for the component.
|
|
724
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
725
|
+
custom_attrs: custom attribute
|
|
726
|
+
**props: The props of the component.
|
|
727
|
+
|
|
728
|
+
Returns:
|
|
729
|
+
The component.
|
|
730
|
+
"""
|
|
731
|
+
...
|
|
732
|
+
|
|
654
733
|
base = Base.create
|
|
655
734
|
head = Head.create
|
|
656
735
|
link = Link.create
|
|
657
736
|
meta = Meta.create
|
|
658
737
|
title = Title.create
|
|
738
|
+
style = StyleEl.create
|
|
@@ -6,7 +6,8 @@ from typing import Any, Dict, List, Union
|
|
|
6
6
|
|
|
7
7
|
from reflex.components.component import Component
|
|
8
8
|
from reflex.components.tags import Tag
|
|
9
|
-
from reflex.utils import
|
|
9
|
+
from reflex.utils import types
|
|
10
|
+
from reflex.utils.imports import ImportDict
|
|
10
11
|
from reflex.utils.serializers import serialize
|
|
11
12
|
from reflex.vars import BaseVar, ComputedVar, Var
|
|
12
13
|
|
|
@@ -102,11 +103,13 @@ class DataTable(Gridjs):
|
|
|
102
103
|
**props,
|
|
103
104
|
)
|
|
104
105
|
|
|
105
|
-
def
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
def add_imports(self) -> ImportDict:
|
|
107
|
+
"""Add the imports for the datatable component.
|
|
108
|
+
|
|
109
|
+
Returns:
|
|
110
|
+
The import dict for the component.
|
|
111
|
+
"""
|
|
112
|
+
return {"": "gridjs/dist/theme/mermaid.css"}
|
|
110
113
|
|
|
111
114
|
def _render(self) -> Tag:
|
|
112
115
|
if isinstance(self.data, Var) and types.is_dataframe(self.data._var_type):
|
|
@@ -10,7 +10,8 @@ from reflex.style import Style
|
|
|
10
10
|
from typing import Any, Dict, List, Union
|
|
11
11
|
from reflex.components.component import Component
|
|
12
12
|
from reflex.components.tags import Tag
|
|
13
|
-
from reflex.utils import
|
|
13
|
+
from reflex.utils import types
|
|
14
|
+
from reflex.utils.imports import ImportDict
|
|
14
15
|
from reflex.utils.serializers import serialize
|
|
15
16
|
from reflex.vars import BaseVar, ComputedVar, Var
|
|
16
17
|
|
|
@@ -180,3 +181,5 @@ class DataTable(Gridjs):
|
|
|
180
181
|
ValueError: If a pandas dataframe is passed in and columns are also provided.
|
|
181
182
|
"""
|
|
182
183
|
...
|
|
184
|
+
|
|
185
|
+
def add_imports(self) -> ImportDict: ...
|