reflex 0.3.9a1__py3-none-any.whl → 0.3.9a2__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/jinja/web/pages/utils.js.jinja2 +1 -1
- reflex/app.py +3 -4
- reflex/components/component.py +3 -1
- reflex/components/core/match.py +8 -4
- reflex/components/markdown/markdown.py +1 -0
- reflex/components/radix/__init__.py +2 -0
- reflex/components/radix/primitives/__init__.py +14 -1
- reflex/components/radix/primitives/accordion.py +426 -69
- reflex/components/radix/primitives/accordion.pyi +41 -11
- reflex/components/radix/primitives/base.py +4 -0
- reflex/components/radix/primitives/base.pyi +81 -0
- reflex/components/radix/primitives/form.py +4 -2
- reflex/components/radix/primitives/form.pyi +2 -2
- reflex/components/radix/primitives/progress.py +4 -2
- reflex/components/radix/primitives/progress.pyi +2 -2
- reflex/components/radix/primitives/slider.py +7 -5
- reflex/components/radix/primitives/slider.pyi +5 -5
- reflex/components/radix/themes/components/__init__.py +6 -2
- reflex/components/radix/themes/components/callout.py +36 -5
- reflex/components/radix/themes/components/callout.pyi +273 -9
- reflex/components/radix/themes/components/checkbox.py +41 -4
- reflex/components/radix/themes/components/checkbox.pyi +231 -8
- reflex/components/radix/themes/components/icons.py +1 -0
- reflex/components/radix/themes/components/radiogroup.py +65 -1
- reflex/components/radix/themes/components/radiogroup.pyi +252 -2
- reflex/components/radix/themes/components/select.py +81 -1
- reflex/components/radix/themes/components/select.pyi +237 -1
- reflex/state.py +6 -3
- reflex/style.py +15 -0
- reflex/utils/prerequisites.py +3 -1
- reflex/utils/types.py +4 -1
- reflex/vars.py +36 -3
- {reflex-0.3.9a1.dist-info → reflex-0.3.9a2.dist-info}/METADATA +1 -1
- {reflex-0.3.9a1.dist-info → reflex-0.3.9a2.dist-info}/RECORD +37 -37
- {reflex-0.3.9a1.dist-info → reflex-0.3.9a2.dist-info}/LICENSE +0 -0
- {reflex-0.3.9a1.dist-info → reflex-0.3.9a2.dist-info}/WHEEL +0 -0
- {reflex-0.3.9a1.dist-info → reflex-0.3.9a2.dist-info}/entry_points.txt +0 -0
|
@@ -93,3 +93,84 @@ class RadixPrimitiveComponent(Component):
|
|
|
93
93
|
TypeError: If an invalid child is passed.
|
|
94
94
|
"""
|
|
95
95
|
...
|
|
96
|
+
|
|
97
|
+
class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
|
|
98
|
+
@overload
|
|
99
|
+
@classmethod
|
|
100
|
+
def create( # type: ignore
|
|
101
|
+
cls,
|
|
102
|
+
*children,
|
|
103
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
104
|
+
style: Optional[Style] = None,
|
|
105
|
+
key: Optional[Any] = None,
|
|
106
|
+
id: Optional[Any] = None,
|
|
107
|
+
class_name: Optional[Any] = None,
|
|
108
|
+
autofocus: Optional[bool] = None,
|
|
109
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
110
|
+
on_blur: Optional[
|
|
111
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
112
|
+
] = None,
|
|
113
|
+
on_click: Optional[
|
|
114
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
115
|
+
] = None,
|
|
116
|
+
on_context_menu: Optional[
|
|
117
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
118
|
+
] = None,
|
|
119
|
+
on_double_click: Optional[
|
|
120
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
121
|
+
] = None,
|
|
122
|
+
on_focus: Optional[
|
|
123
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
124
|
+
] = None,
|
|
125
|
+
on_mount: Optional[
|
|
126
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
127
|
+
] = None,
|
|
128
|
+
on_mouse_down: Optional[
|
|
129
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
130
|
+
] = None,
|
|
131
|
+
on_mouse_enter: Optional[
|
|
132
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
133
|
+
] = None,
|
|
134
|
+
on_mouse_leave: Optional[
|
|
135
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
136
|
+
] = None,
|
|
137
|
+
on_mouse_move: Optional[
|
|
138
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
139
|
+
] = None,
|
|
140
|
+
on_mouse_out: Optional[
|
|
141
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
142
|
+
] = None,
|
|
143
|
+
on_mouse_over: Optional[
|
|
144
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
145
|
+
] = None,
|
|
146
|
+
on_mouse_up: Optional[
|
|
147
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
148
|
+
] = None,
|
|
149
|
+
on_scroll: Optional[
|
|
150
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
151
|
+
] = None,
|
|
152
|
+
on_unmount: Optional[
|
|
153
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
154
|
+
] = None,
|
|
155
|
+
**props
|
|
156
|
+
) -> "RadixPrimitiveComponentWithClassName":
|
|
157
|
+
"""Create the component.
|
|
158
|
+
|
|
159
|
+
Args:
|
|
160
|
+
*children: The children of the component.
|
|
161
|
+
as_child: Change the default rendered element for the one passed as a child.
|
|
162
|
+
style: The style of the component.
|
|
163
|
+
key: A unique key for the component.
|
|
164
|
+
id: The id for the component.
|
|
165
|
+
class_name: The class name for the component.
|
|
166
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
167
|
+
custom_attrs: custom attribute
|
|
168
|
+
**props: The props of the component.
|
|
169
|
+
|
|
170
|
+
Returns:
|
|
171
|
+
The component.
|
|
172
|
+
|
|
173
|
+
Raises:
|
|
174
|
+
TypeError: If an invalid child is passed.
|
|
175
|
+
"""
|
|
176
|
+
...
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""Radix form component."""
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
3
5
|
from hashlib import md5
|
|
4
6
|
from typing import Any, Dict, Iterator, Literal
|
|
5
7
|
|
|
@@ -14,7 +16,7 @@ from reflex.utils import imports
|
|
|
14
16
|
from reflex.utils.format import format_event_chain, to_camel_case
|
|
15
17
|
from reflex.vars import BaseVar, Var
|
|
16
18
|
|
|
17
|
-
from .base import
|
|
19
|
+
from .base import RadixPrimitiveComponentWithClassName
|
|
18
20
|
|
|
19
21
|
FORM_DATA = Var.create("form_data")
|
|
20
22
|
HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
|
|
@@ -34,7 +36,7 @@ HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
|
|
|
34
36
|
)
|
|
35
37
|
|
|
36
38
|
|
|
37
|
-
class FormComponent(
|
|
39
|
+
class FormComponent(RadixPrimitiveComponentWithClassName):
|
|
38
40
|
"""Base class for all @radix-ui/react-form components."""
|
|
39
41
|
|
|
40
42
|
library = "@radix-ui/react-form@^0.0.3"
|
|
@@ -18,14 +18,14 @@ from reflex.event import EventChain
|
|
|
18
18
|
from reflex.utils import imports
|
|
19
19
|
from reflex.utils.format import format_event_chain, to_camel_case
|
|
20
20
|
from reflex.vars import BaseVar, Var
|
|
21
|
-
from .base import
|
|
21
|
+
from .base import RadixPrimitiveComponentWithClassName
|
|
22
22
|
|
|
23
23
|
FORM_DATA = Var.create("form_data")
|
|
24
24
|
HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
|
|
25
25
|
"\n const handleSubmit_{{ handle_submit_unique_name }} = useCallback((ev) => {\n const $form = ev.target\n ev.preventDefault()\n const {{ form_data }} = {...Object.fromEntries(new FormData($form).entries()), ...{{ field_ref_mapping }}}\n\n {{ on_submit_event_chain }}\n\n if ({{ reset_on_submit }}) {\n $form.reset()\n }\n })\n "
|
|
26
26
|
)
|
|
27
27
|
|
|
28
|
-
class FormComponent(
|
|
28
|
+
class FormComponent(RadixPrimitiveComponentWithClassName):
|
|
29
29
|
@overload
|
|
30
30
|
@classmethod
|
|
31
31
|
def create( # type: ignore
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"""Progress."""
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
3
5
|
from typing import Optional
|
|
4
6
|
|
|
5
7
|
from reflex.components.component import Component
|
|
6
|
-
from reflex.components.radix.primitives.base import
|
|
8
|
+
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
|
7
9
|
from reflex.style import Style
|
|
8
10
|
from reflex.vars import Var
|
|
9
11
|
|
|
10
12
|
|
|
11
|
-
class ProgressComponent(
|
|
13
|
+
class ProgressComponent(RadixPrimitiveComponentWithClassName):
|
|
12
14
|
"""A Progress component."""
|
|
13
15
|
|
|
14
16
|
library = "@radix-ui/react-progress@^1.0.3"
|
|
@@ -9,11 +9,11 @@ from reflex.event import EventChain, EventHandler, EventSpec
|
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from typing import Optional
|
|
11
11
|
from reflex.components.component import Component
|
|
12
|
-
from reflex.components.radix.primitives.base import
|
|
12
|
+
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
|
13
13
|
from reflex.style import Style
|
|
14
14
|
from reflex.vars import Var
|
|
15
15
|
|
|
16
|
-
class ProgressComponent(
|
|
16
|
+
class ProgressComponent(RadixPrimitiveComponentWithClassName):
|
|
17
17
|
@overload
|
|
18
18
|
@classmethod
|
|
19
19
|
def create( # type: ignore
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"""Radix slider components."""
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any, Dict, List, Literal
|
|
4
6
|
|
|
5
7
|
from reflex.components.component import Component
|
|
6
|
-
from reflex.components.radix.primitives.base import
|
|
8
|
+
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
|
7
9
|
from reflex.style import Style
|
|
8
10
|
from reflex.vars import Var
|
|
9
11
|
|
|
@@ -11,7 +13,7 @@ LiteralSliderOrientation = Literal["horizontal", "vertical"]
|
|
|
11
13
|
LiteralSliderDir = Literal["ltr", "rtl"]
|
|
12
14
|
|
|
13
15
|
|
|
14
|
-
class SliderComponent(
|
|
16
|
+
class SliderComponent(RadixPrimitiveComponentWithClassName):
|
|
15
17
|
"""Base class for all @radix-ui/react-slider components."""
|
|
16
18
|
|
|
17
19
|
library = "@radix-ui/react-slider@^1.1.2"
|
|
@@ -23,9 +25,9 @@ class SliderRoot(SliderComponent):
|
|
|
23
25
|
tag = "Root"
|
|
24
26
|
alias = "RadixSliderRoot"
|
|
25
27
|
|
|
26
|
-
default_value: Var[
|
|
28
|
+
default_value: Var[List[int]]
|
|
27
29
|
|
|
28
|
-
value: Var[
|
|
30
|
+
value: Var[List[int]]
|
|
29
31
|
|
|
30
32
|
name: Var[str]
|
|
31
33
|
|
|
@@ -7,16 +7,16 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|
|
7
7
|
from reflex.vars import Var, BaseVar, ComputedVar
|
|
8
8
|
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
9
|
from reflex.style import Style
|
|
10
|
-
from typing import Any, Dict, Literal
|
|
10
|
+
from typing import Any, Dict, List, Literal
|
|
11
11
|
from reflex.components.component import Component
|
|
12
|
-
from reflex.components.radix.primitives.base import
|
|
12
|
+
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
|
|
13
13
|
from reflex.style import Style
|
|
14
14
|
from reflex.vars import Var
|
|
15
15
|
|
|
16
16
|
LiteralSliderOrientation = Literal["horizontal", "vertical"]
|
|
17
17
|
LiteralSliderDir = Literal["ltr", "rtl"]
|
|
18
18
|
|
|
19
|
-
class SliderComponent(
|
|
19
|
+
class SliderComponent(RadixPrimitiveComponentWithClassName):
|
|
20
20
|
@overload
|
|
21
21
|
@classmethod
|
|
22
22
|
def create( # type: ignore
|
|
@@ -104,8 +104,8 @@ class SliderRoot(SliderComponent):
|
|
|
104
104
|
def create( # type: ignore
|
|
105
105
|
cls,
|
|
106
106
|
*children,
|
|
107
|
-
default_value: Optional[Union[Var[
|
|
108
|
-
value: Optional[Union[Var[
|
|
107
|
+
default_value: Optional[Union[Var[List[int]], List[int]]] = None,
|
|
108
|
+
value: Optional[Union[Var[List[int]], List[int]]] = None,
|
|
109
109
|
name: Optional[Union[Var[str], str]] = None,
|
|
110
110
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
|
111
111
|
orientation: Optional[
|
|
@@ -15,7 +15,7 @@ from .badge import Badge
|
|
|
15
15
|
from .button import Button
|
|
16
16
|
from .callout import CalloutIcon, CalloutRoot, CalloutText
|
|
17
17
|
from .card import Card
|
|
18
|
-
from .checkbox import Checkbox
|
|
18
|
+
from .checkbox import Checkbox, HighLevelCheckbox
|
|
19
19
|
from .contextmenu import (
|
|
20
20
|
ContextMenuContent,
|
|
21
21
|
ContextMenuItem,
|
|
@@ -49,9 +49,10 @@ from .iconbutton import IconButton
|
|
|
49
49
|
from .icons import Icon
|
|
50
50
|
from .inset import Inset
|
|
51
51
|
from .popover import PopoverClose, PopoverContent, PopoverRoot, PopoverTrigger
|
|
52
|
-
from .radiogroup import RadioGroupItem, RadioGroupRoot
|
|
52
|
+
from .radiogroup import HighLevelRadioGroup, RadioGroupItem, RadioGroupRoot
|
|
53
53
|
from .scrollarea import ScrollArea
|
|
54
54
|
from .select import (
|
|
55
|
+
HighLevelSelect,
|
|
55
56
|
SelectContent,
|
|
56
57
|
SelectGroup,
|
|
57
58
|
SelectItem,
|
|
@@ -108,6 +109,7 @@ card = Card.create
|
|
|
108
109
|
|
|
109
110
|
# Checkbox
|
|
110
111
|
checkbox = Checkbox.create
|
|
112
|
+
checkbox_hl = HighLevelCheckbox.create
|
|
111
113
|
|
|
112
114
|
# Context Menu
|
|
113
115
|
contextmenu_root = ContextMenuRoot.create
|
|
@@ -161,6 +163,7 @@ popover_close = PopoverClose.create
|
|
|
161
163
|
# Radio Group
|
|
162
164
|
radio_group_root = RadioGroupRoot.create
|
|
163
165
|
radio_group_item = RadioGroupItem.create
|
|
166
|
+
radio_group = HighLevelRadioGroup.create
|
|
164
167
|
|
|
165
168
|
# Scroll Area
|
|
166
169
|
scroll_area = ScrollArea.create
|
|
@@ -173,6 +176,7 @@ select_item = SelectItem.create
|
|
|
173
176
|
select_separator = SelectSeparator.create
|
|
174
177
|
select_group = SelectGroup.create
|
|
175
178
|
select_label = SelectLabel.create
|
|
179
|
+
select = HighLevelSelect.create
|
|
176
180
|
|
|
177
181
|
# Separator
|
|
178
182
|
separator = Separator.create
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"""Interactive components provided by @radix-ui/themes."""
|
|
2
|
-
from typing import Literal
|
|
2
|
+
from typing import Literal, Union
|
|
3
3
|
|
|
4
|
+
import reflex as rx
|
|
4
5
|
from reflex import el
|
|
6
|
+
from reflex.components.component import Component
|
|
7
|
+
from reflex.components.radix.themes.components.icons import Icon
|
|
5
8
|
from reflex.vars import Var
|
|
6
9
|
|
|
7
10
|
from ..base import (
|
|
8
11
|
CommonMarginProps,
|
|
9
12
|
LiteralAccentColor,
|
|
10
|
-
LiteralRadius,
|
|
11
13
|
LiteralVariant,
|
|
12
14
|
RadixThemesComponent,
|
|
13
15
|
)
|
|
@@ -33,9 +35,6 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
|
33
35
|
# Whether to render the button with higher contrast color against background
|
|
34
36
|
high_contrast: Var[bool]
|
|
35
37
|
|
|
36
|
-
# Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
|
|
37
|
-
radius: Var[LiteralRadius]
|
|
38
|
-
|
|
39
38
|
|
|
40
39
|
class CalloutIcon(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
41
40
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
@@ -47,3 +46,35 @@ class CalloutText(el.P, CommonMarginProps, RadixThemesComponent):
|
|
|
47
46
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
48
47
|
|
|
49
48
|
tag = "Callout.Text"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class Callout(CalloutRoot):
|
|
52
|
+
"""High level wrapper for the Callout component."""
|
|
53
|
+
|
|
54
|
+
# The text of the callout.
|
|
55
|
+
text: Var[str]
|
|
56
|
+
|
|
57
|
+
# The icon of the callout.
|
|
58
|
+
icon: Var[str]
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def create(cls, text: Union[str, Var[str]], **props) -> Component:
|
|
62
|
+
"""Create a callout component.
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
text: The text of the callout.
|
|
66
|
+
**props: The properties of the component.
|
|
67
|
+
|
|
68
|
+
Returns:
|
|
69
|
+
The callout component.
|
|
70
|
+
"""
|
|
71
|
+
return CalloutRoot.create(
|
|
72
|
+
CalloutIcon.create(Icon.create(tag=props["icon"]))
|
|
73
|
+
if "icon" in props
|
|
74
|
+
else rx.fragment(),
|
|
75
|
+
CalloutText.create(text),
|
|
76
|
+
**props,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
callout = Callout.create
|
|
@@ -7,13 +7,15 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|
|
7
7
|
from reflex.vars import Var, BaseVar, ComputedVar
|
|
8
8
|
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
9
|
from reflex.style import Style
|
|
10
|
-
from typing import Literal
|
|
10
|
+
from typing import Literal, Union
|
|
11
|
+
import reflex as rx
|
|
11
12
|
from reflex import el
|
|
13
|
+
from reflex.components.component import Component
|
|
14
|
+
from reflex.components.radix.themes.components.icons import Icon
|
|
12
15
|
from reflex.vars import Var
|
|
13
16
|
from ..base import (
|
|
14
17
|
CommonMarginProps,
|
|
15
18
|
LiteralAccentColor,
|
|
16
|
-
LiteralRadius,
|
|
17
19
|
LiteralVariant,
|
|
18
20
|
RadixThemesComponent,
|
|
19
21
|
)
|
|
@@ -98,12 +100,6 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
|
98
100
|
]
|
|
99
101
|
] = None,
|
|
100
102
|
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
|
101
|
-
radius: Optional[
|
|
102
|
-
Union[
|
|
103
|
-
Var[Literal["none", "small", "medium", "large", "full"]],
|
|
104
|
-
Literal["none", "small", "medium", "large", "full"],
|
|
105
|
-
]
|
|
106
|
-
] = None,
|
|
107
103
|
access_key: Optional[
|
|
108
104
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
109
105
|
] = None,
|
|
@@ -255,7 +251,6 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
|
255
251
|
size: Button size "1" - "4"
|
|
256
252
|
variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
|
|
257
253
|
high_contrast: Whether to render the button with higher contrast color against background
|
|
258
|
-
radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
|
|
259
254
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
260
255
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
261
256
|
content_editable: Indicates whether the element's content is editable.
|
|
@@ -798,3 +793,272 @@ class CalloutText(el.P, CommonMarginProps, RadixThemesComponent):
|
|
|
798
793
|
A new component instance.
|
|
799
794
|
"""
|
|
800
795
|
...
|
|
796
|
+
|
|
797
|
+
class Callout(CalloutRoot):
|
|
798
|
+
@overload
|
|
799
|
+
@classmethod
|
|
800
|
+
def create( # type: ignore
|
|
801
|
+
cls,
|
|
802
|
+
*children,
|
|
803
|
+
text: Optional[Union[Var[str], str]] = None,
|
|
804
|
+
icon: Optional[Union[Var[str], str]] = None,
|
|
805
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
806
|
+
size: Optional[
|
|
807
|
+
Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
|
|
808
|
+
] = None,
|
|
809
|
+
variant: Optional[
|
|
810
|
+
Union[
|
|
811
|
+
Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]],
|
|
812
|
+
Literal["classic", "solid", "soft", "surface", "outline", "ghost"],
|
|
813
|
+
]
|
|
814
|
+
] = None,
|
|
815
|
+
color: Optional[
|
|
816
|
+
Union[
|
|
817
|
+
Var[
|
|
818
|
+
Literal[
|
|
819
|
+
"tomato",
|
|
820
|
+
"red",
|
|
821
|
+
"ruby",
|
|
822
|
+
"crimson",
|
|
823
|
+
"pink",
|
|
824
|
+
"plum",
|
|
825
|
+
"purple",
|
|
826
|
+
"violet",
|
|
827
|
+
"iris",
|
|
828
|
+
"indigo",
|
|
829
|
+
"blue",
|
|
830
|
+
"cyan",
|
|
831
|
+
"teal",
|
|
832
|
+
"jade",
|
|
833
|
+
"green",
|
|
834
|
+
"grass",
|
|
835
|
+
"brown",
|
|
836
|
+
"orange",
|
|
837
|
+
"sky",
|
|
838
|
+
"mint",
|
|
839
|
+
"lime",
|
|
840
|
+
"yellow",
|
|
841
|
+
"amber",
|
|
842
|
+
"gold",
|
|
843
|
+
"bronze",
|
|
844
|
+
"gray",
|
|
845
|
+
]
|
|
846
|
+
],
|
|
847
|
+
Literal[
|
|
848
|
+
"tomato",
|
|
849
|
+
"red",
|
|
850
|
+
"ruby",
|
|
851
|
+
"crimson",
|
|
852
|
+
"pink",
|
|
853
|
+
"plum",
|
|
854
|
+
"purple",
|
|
855
|
+
"violet",
|
|
856
|
+
"iris",
|
|
857
|
+
"indigo",
|
|
858
|
+
"blue",
|
|
859
|
+
"cyan",
|
|
860
|
+
"teal",
|
|
861
|
+
"jade",
|
|
862
|
+
"green",
|
|
863
|
+
"grass",
|
|
864
|
+
"brown",
|
|
865
|
+
"orange",
|
|
866
|
+
"sky",
|
|
867
|
+
"mint",
|
|
868
|
+
"lime",
|
|
869
|
+
"yellow",
|
|
870
|
+
"amber",
|
|
871
|
+
"gold",
|
|
872
|
+
"bronze",
|
|
873
|
+
"gray",
|
|
874
|
+
],
|
|
875
|
+
]
|
|
876
|
+
] = None,
|
|
877
|
+
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
|
878
|
+
access_key: Optional[
|
|
879
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
880
|
+
] = None,
|
|
881
|
+
auto_capitalize: Optional[
|
|
882
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
883
|
+
] = None,
|
|
884
|
+
content_editable: Optional[
|
|
885
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
886
|
+
] = None,
|
|
887
|
+
context_menu: Optional[
|
|
888
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
889
|
+
] = None,
|
|
890
|
+
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
891
|
+
draggable: Optional[
|
|
892
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
893
|
+
] = None,
|
|
894
|
+
enter_key_hint: Optional[
|
|
895
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
896
|
+
] = None,
|
|
897
|
+
hidden: Optional[
|
|
898
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
899
|
+
] = None,
|
|
900
|
+
input_mode: Optional[
|
|
901
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
902
|
+
] = None,
|
|
903
|
+
item_prop: Optional[
|
|
904
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
905
|
+
] = None,
|
|
906
|
+
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
907
|
+
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
908
|
+
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
909
|
+
spell_check: Optional[
|
|
910
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
911
|
+
] = None,
|
|
912
|
+
tab_index: Optional[
|
|
913
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
914
|
+
] = None,
|
|
915
|
+
title: Optional[
|
|
916
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
917
|
+
] = None,
|
|
918
|
+
translate: Optional[
|
|
919
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
920
|
+
] = None,
|
|
921
|
+
m: Optional[
|
|
922
|
+
Union[
|
|
923
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
924
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
925
|
+
]
|
|
926
|
+
] = None,
|
|
927
|
+
mx: Optional[
|
|
928
|
+
Union[
|
|
929
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
930
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
931
|
+
]
|
|
932
|
+
] = None,
|
|
933
|
+
my: Optional[
|
|
934
|
+
Union[
|
|
935
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
936
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
937
|
+
]
|
|
938
|
+
] = None,
|
|
939
|
+
mt: Optional[
|
|
940
|
+
Union[
|
|
941
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
942
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
943
|
+
]
|
|
944
|
+
] = None,
|
|
945
|
+
mr: Optional[
|
|
946
|
+
Union[
|
|
947
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
948
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
949
|
+
]
|
|
950
|
+
] = None,
|
|
951
|
+
mb: Optional[
|
|
952
|
+
Union[
|
|
953
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
954
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
955
|
+
]
|
|
956
|
+
] = None,
|
|
957
|
+
ml: Optional[
|
|
958
|
+
Union[
|
|
959
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
960
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
961
|
+
]
|
|
962
|
+
] = None,
|
|
963
|
+
style: Optional[Style] = None,
|
|
964
|
+
key: Optional[Any] = None,
|
|
965
|
+
id: Optional[Any] = None,
|
|
966
|
+
class_name: Optional[Any] = None,
|
|
967
|
+
autofocus: Optional[bool] = None,
|
|
968
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
969
|
+
on_blur: Optional[
|
|
970
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
971
|
+
] = None,
|
|
972
|
+
on_click: Optional[
|
|
973
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
974
|
+
] = None,
|
|
975
|
+
on_context_menu: Optional[
|
|
976
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
977
|
+
] = None,
|
|
978
|
+
on_double_click: Optional[
|
|
979
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
980
|
+
] = None,
|
|
981
|
+
on_focus: Optional[
|
|
982
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
983
|
+
] = None,
|
|
984
|
+
on_mount: Optional[
|
|
985
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
986
|
+
] = None,
|
|
987
|
+
on_mouse_down: Optional[
|
|
988
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
989
|
+
] = None,
|
|
990
|
+
on_mouse_enter: Optional[
|
|
991
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
992
|
+
] = None,
|
|
993
|
+
on_mouse_leave: Optional[
|
|
994
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
995
|
+
] = None,
|
|
996
|
+
on_mouse_move: Optional[
|
|
997
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
998
|
+
] = None,
|
|
999
|
+
on_mouse_out: Optional[
|
|
1000
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1001
|
+
] = None,
|
|
1002
|
+
on_mouse_over: Optional[
|
|
1003
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1004
|
+
] = None,
|
|
1005
|
+
on_mouse_up: Optional[
|
|
1006
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1007
|
+
] = None,
|
|
1008
|
+
on_scroll: Optional[
|
|
1009
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1010
|
+
] = None,
|
|
1011
|
+
on_unmount: Optional[
|
|
1012
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1013
|
+
] = None,
|
|
1014
|
+
**props
|
|
1015
|
+
) -> "Callout":
|
|
1016
|
+
"""Create a callout component.
|
|
1017
|
+
|
|
1018
|
+
Args:
|
|
1019
|
+
text: The text of the callout.
|
|
1020
|
+
text: The text of the callout.
|
|
1021
|
+
icon: The icon of the callout.
|
|
1022
|
+
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
1023
|
+
size: Button size "1" - "4"
|
|
1024
|
+
variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
|
|
1025
|
+
color: Override theme color for button
|
|
1026
|
+
high_contrast: Whether to render the button with higher contrast color against background
|
|
1027
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
1028
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
1029
|
+
content_editable: Indicates whether the element's content is editable.
|
|
1030
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
1031
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
1032
|
+
draggable: Defines whether the element can be dragged.
|
|
1033
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
1034
|
+
hidden: Defines whether the element is hidden.
|
|
1035
|
+
input_mode: Defines the type of the element.
|
|
1036
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
1037
|
+
lang: Defines the language used in the element.
|
|
1038
|
+
role: Defines the role of the element.
|
|
1039
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
1040
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
1041
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
1042
|
+
title: Defines a tooltip for the element.
|
|
1043
|
+
translate: Specifies whether the content of an element should be translated or not.
|
|
1044
|
+
m: Margin: "0" - "9"
|
|
1045
|
+
mx: Margin horizontal: "0" - "9"
|
|
1046
|
+
my: Margin vertical: "0" - "9"
|
|
1047
|
+
mt: Margin top: "0" - "9"
|
|
1048
|
+
mr: Margin right: "0" - "9"
|
|
1049
|
+
mb: Margin bottom: "0" - "9"
|
|
1050
|
+
ml: Margin left: "0" - "9"
|
|
1051
|
+
style: The style of the component.
|
|
1052
|
+
key: A unique key for the component.
|
|
1053
|
+
id: The id for the component.
|
|
1054
|
+
class_name: The class name for the component.
|
|
1055
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
1056
|
+
custom_attrs: custom attribute
|
|
1057
|
+
**props: The properties of the component.
|
|
1058
|
+
|
|
1059
|
+
Returns:
|
|
1060
|
+
The callout component.
|
|
1061
|
+
"""
|
|
1062
|
+
...
|
|
1063
|
+
|
|
1064
|
+
callout = Callout.create
|