reflex 0.3.9a2__py3-none-any.whl → 0.3.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/__init__.py +3 -1
- reflex/__init__.pyi +3 -1
- reflex/app.py +13 -5
- reflex/compiler/utils.py +13 -12
- reflex/components/base/app_wrap.pyi +1 -0
- reflex/components/base/body.pyi +2 -0
- reflex/components/base/document.pyi +10 -0
- reflex/components/base/fragment.pyi +2 -0
- reflex/components/base/head.pyi +4 -0
- reflex/components/base/link.pyi +4 -0
- reflex/components/base/meta.pyi +8 -0
- reflex/components/base/script.pyi +2 -0
- reflex/components/chakra/base.pyi +7 -0
- reflex/components/chakra/datadisplay/badge.pyi +2 -0
- reflex/components/chakra/datadisplay/code.pyi +4 -0
- reflex/components/chakra/datadisplay/divider.pyi +2 -0
- reflex/components/chakra/datadisplay/keyboard_key.pyi +2 -0
- reflex/components/chakra/datadisplay/list.pyi +8 -0
- reflex/components/chakra/datadisplay/stat.pyi +12 -0
- reflex/components/chakra/datadisplay/table.pyi +18 -0
- reflex/components/chakra/datadisplay/tag.pyi +9 -0
- reflex/components/chakra/disclosure/accordion.pyi +10 -0
- reflex/components/chakra/disclosure/tabs.py +8 -0
- reflex/components/chakra/disclosure/tabs.pyi +10 -0
- reflex/components/chakra/disclosure/transition.pyi +12 -0
- reflex/components/chakra/disclosure/visuallyhidden.pyi +2 -0
- reflex/components/chakra/feedback/alert.pyi +8 -0
- reflex/components/chakra/feedback/circularprogress.pyi +4 -0
- reflex/components/chakra/feedback/progress.pyi +2 -0
- reflex/components/chakra/feedback/skeleton.pyi +6 -0
- reflex/components/chakra/feedback/spinner.pyi +2 -0
- reflex/components/chakra/forms/button.pyi +4 -0
- reflex/components/chakra/forms/checkbox.pyi +4 -0
- reflex/components/chakra/forms/colormodeswitch.pyi +7 -0
- reflex/components/chakra/forms/date_picker.pyi +2 -0
- reflex/components/chakra/forms/date_time_picker.pyi +2 -0
- reflex/components/chakra/forms/editable.pyi +8 -0
- reflex/components/chakra/forms/email.pyi +2 -0
- reflex/components/chakra/forms/form.pyi +10 -0
- reflex/components/chakra/forms/iconbutton.py +1 -0
- reflex/components/chakra/forms/iconbutton.pyi +2 -0
- reflex/components/chakra/forms/input.pyi +12 -0
- reflex/components/chakra/forms/numberinput.pyi +10 -0
- reflex/components/chakra/forms/password.pyi +2 -0
- reflex/components/chakra/forms/pininput.pyi +4 -0
- reflex/components/chakra/forms/radio.pyi +4 -0
- reflex/components/chakra/forms/rangeslider.pyi +8 -0
- reflex/components/chakra/forms/select.pyi +4 -0
- reflex/components/chakra/forms/slider.pyi +10 -0
- reflex/components/chakra/forms/switch.pyi +2 -0
- reflex/components/chakra/forms/textarea.pyi +2 -0
- reflex/components/chakra/forms/time_picker.pyi +2 -0
- reflex/components/chakra/layout/aspect_ratio.pyi +2 -0
- reflex/components/chakra/layout/box.pyi +2 -0
- reflex/components/chakra/layout/card.pyi +7 -0
- reflex/components/chakra/layout/center.pyi +6 -0
- reflex/components/chakra/layout/container.pyi +2 -0
- reflex/components/chakra/layout/flex.pyi +2 -0
- reflex/components/chakra/layout/grid.pyi +6 -0
- reflex/components/chakra/layout/html.pyi +2 -0
- reflex/components/chakra/layout/spacer.pyi +2 -0
- reflex/components/chakra/layout/stack.pyi +6 -0
- reflex/components/chakra/layout/wrap.pyi +4 -0
- reflex/components/chakra/media/avatar.pyi +6 -0
- reflex/components/chakra/media/icon.pyi +4 -0
- reflex/components/chakra/media/image.pyi +2 -0
- reflex/components/chakra/navigation/breadcrumb.pyi +8 -0
- reflex/components/chakra/navigation/link.pyi +2 -0
- reflex/components/chakra/navigation/linkoverlay.pyi +4 -0
- reflex/components/chakra/navigation/stepper.pyi +18 -0
- reflex/components/chakra/overlay/alertdialog.pyi +14 -0
- reflex/components/chakra/overlay/drawer.pyi +14 -0
- reflex/components/chakra/overlay/menu.pyi +16 -0
- reflex/components/chakra/overlay/modal.pyi +14 -0
- reflex/components/chakra/overlay/popover.pyi +18 -0
- reflex/components/chakra/overlay/tooltip.pyi +2 -0
- reflex/components/chakra/typography/heading.pyi +2 -0
- reflex/components/chakra/typography/highlight.pyi +2 -0
- reflex/components/chakra/typography/span.pyi +2 -0
- reflex/components/chakra/typography/text.pyi +2 -0
- reflex/components/component.py +41 -3
- reflex/components/core/__init__.py +2 -0
- reflex/components/core/banner.pyi +3 -0
- reflex/components/core/client_side_routing.pyi +4 -0
- reflex/components/core/colors.py +21 -0
- reflex/components/core/cond.py +11 -2
- reflex/components/core/debounce.pyi +1 -0
- reflex/components/core/layout/__init__.py +1 -0
- reflex/components/core/match.py +44 -18
- reflex/components/core/upload.py +8 -2
- reflex/components/core/upload.pyi +7 -1
- reflex/components/datadisplay/dataeditor.pyi +2 -0
- reflex/components/el/element.pyi +2 -0
- reflex/components/el/elements/base.pyi +2 -0
- reflex/components/el/elements/forms.py +3 -0
- reflex/components/el/elements/forms.pyi +32 -0
- reflex/components/el/elements/inline.pyi +56 -0
- reflex/components/el/elements/media.pyi +28 -0
- reflex/components/el/elements/metadata.pyi +10 -0
- reflex/components/el/elements/other.pyi +14 -0
- reflex/components/el/elements/scripts.pyi +6 -0
- reflex/components/el/elements/sectioning.pyi +30 -0
- reflex/components/el/elements/tables.pyi +20 -0
- reflex/components/el/elements/typography.pyi +30 -0
- reflex/components/gridjs/datatable.pyi +4 -0
- reflex/components/lucide/__init__.py +5 -0
- reflex/components/lucide/icon.py +1484 -0
- reflex/components/lucide/icon.pyi +1594 -0
- reflex/components/markdown/markdown.pyi +2 -0
- reflex/components/moment/moment.pyi +2 -0
- reflex/components/next/base.pyi +2 -0
- reflex/components/next/image.pyi +2 -0
- reflex/components/next/link.pyi +2 -0
- reflex/components/next/video.pyi +2 -0
- reflex/components/plotly/plotly.pyi +4 -0
- reflex/components/radix/primitives/__init__.py +10 -0
- reflex/components/radix/primitives/accordion.py +51 -32
- reflex/components/radix/primitives/accordion.pyi +16 -3
- reflex/components/radix/primitives/base.pyi +4 -0
- reflex/components/radix/primitives/drawer.py +240 -0
- reflex/components/radix/primitives/drawer.pyi +814 -0
- reflex/components/radix/primitives/form.py +40 -7
- reflex/components/radix/primitives/form.pyi +32 -10
- reflex/components/radix/primitives/progress.py +2 -2
- reflex/components/radix/primitives/progress.pyi +6 -0
- reflex/components/radix/primitives/slider.pyi +10 -0
- reflex/components/radix/themes/base.py +46 -12
- reflex/components/radix/themes/base.pyi +23 -9
- reflex/components/radix/themes/components/__init__.py +4 -2
- reflex/components/radix/themes/components/alertdialog.py +13 -12
- reflex/components/radix/themes/components/alertdialog.pyi +23 -351
- reflex/components/radix/themes/components/aspectratio.py +2 -5
- reflex/components/radix/themes/components/aspectratio.pyi +4 -51
- reflex/components/radix/themes/components/avatar.py +3 -4
- reflex/components/radix/themes/components/avatar.pyi +4 -57
- reflex/components/radix/themes/components/badge.py +3 -4
- reflex/components/radix/themes/components/badge.pyi +4 -56
- reflex/components/radix/themes/components/button.py +2 -3
- reflex/components/radix/themes/components/button.pyi +3 -51
- reflex/components/radix/themes/components/callout.py +9 -12
- reflex/components/radix/themes/components/callout.pyi +24 -217
- reflex/components/radix/themes/components/card.py +1 -2
- reflex/components/radix/themes/components/card.pyi +4 -51
- reflex/components/radix/themes/components/checkbox.py +11 -5
- reflex/components/radix/themes/components/checkbox.pyi +13 -112
- reflex/components/radix/themes/components/contextmenu.py +21 -21
- reflex/components/radix/themes/components/contextmenu.pyi +26 -401
- reflex/components/radix/themes/components/dialog.py +13 -16
- reflex/components/radix/themes/components/dialog.pyi +20 -303
- reflex/components/radix/themes/components/dropdownmenu.py +196 -32
- reflex/components/radix/themes/components/dropdownmenu.pyi +147 -389
- reflex/components/radix/themes/components/hovercard.py +5 -5
- reflex/components/radix/themes/components/hovercard.pyi +11 -151
- reflex/components/radix/themes/components/iconbutton.py +56 -4
- reflex/components/radix/themes/components/iconbutton.pyi +25 -71
- reflex/components/radix/themes/components/icons.pyi +4 -0
- reflex/components/radix/themes/components/inset.py +1 -2
- reflex/components/radix/themes/components/inset.pyi +4 -51
- reflex/components/radix/themes/components/popover.py +12 -12
- reflex/components/radix/themes/components/popover.pyi +14 -201
- reflex/components/radix/themes/components/radiogroup.py +47 -20
- reflex/components/radix/themes/components/radiogroup.pyi +26 -171
- reflex/components/radix/themes/components/scrollarea.py +2 -3
- reflex/components/radix/themes/components/scrollarea.pyi +4 -51
- reflex/components/radix/themes/components/select.py +28 -25
- reflex/components/radix/themes/components/select.pyi +43 -419
- reflex/components/radix/themes/components/separator.py +4 -5
- reflex/components/radix/themes/components/separator.pyi +5 -52
- reflex/components/radix/themes/components/slider.py +8 -5
- reflex/components/radix/themes/components/slider.pyi +9 -60
- reflex/components/radix/themes/components/switch.py +6 -4
- reflex/components/radix/themes/components/switch.pyi +5 -53
- reflex/components/radix/themes/components/table.py +14 -15
- reflex/components/radix/themes/components/table.pyi +22 -351
- reflex/components/radix/themes/components/tabs.py +9 -6
- reflex/components/radix/themes/components/tabs.pyi +18 -205
- reflex/components/radix/themes/components/textarea.py +2 -3
- reflex/components/radix/themes/components/textarea.pyi +10 -53
- reflex/components/radix/themes/components/textfield.py +105 -4
- reflex/components/radix/themes/components/textfield.pyi +200 -108
- reflex/components/radix/themes/components/tooltip.py +102 -2
- reflex/components/radix/themes/components/tooltip.pyi +66 -110
- reflex/components/radix/themes/layout/__init__.py +7 -0
- reflex/components/radix/themes/layout/base.pyi +2 -0
- reflex/components/radix/themes/layout/box.py +2 -2
- reflex/components/radix/themes/layout/box.pyi +4 -104
- reflex/components/radix/themes/layout/center.py +19 -0
- reflex/components/radix/themes/layout/center.pyi +261 -0
- reflex/components/radix/themes/layout/container.py +2 -2
- reflex/components/radix/themes/layout/container.pyi +4 -104
- reflex/components/radix/themes/layout/flex.py +2 -2
- reflex/components/radix/themes/layout/flex.pyi +4 -105
- reflex/components/radix/themes/layout/grid.pyi +2 -0
- reflex/components/radix/themes/layout/section.py +2 -2
- reflex/components/radix/themes/layout/section.pyi +4 -104
- reflex/components/radix/themes/layout/spacer.py +19 -0
- reflex/components/radix/themes/layout/spacer.pyi +261 -0
- reflex/components/radix/themes/layout/stack.py +60 -0
- reflex/components/radix/themes/layout/stack.pyi +537 -0
- reflex/components/radix/themes/typography/blockquote.py +2 -3
- reflex/components/radix/themes/typography/blockquote.pyi +4 -51
- reflex/components/radix/themes/typography/code.py +2 -3
- reflex/components/radix/themes/typography/code.pyi +4 -56
- reflex/components/radix/themes/typography/em.py +1 -2
- reflex/components/radix/themes/typography/em.pyi +4 -51
- reflex/components/radix/themes/typography/heading.py +2 -3
- reflex/components/radix/themes/typography/heading.pyi +4 -51
- reflex/components/radix/themes/typography/kbd.py +1 -2
- reflex/components/radix/themes/typography/kbd.pyi +4 -51
- reflex/components/radix/themes/typography/link.py +34 -3
- reflex/components/radix/themes/typography/link.pyi +41 -86
- reflex/components/radix/themes/typography/quote.py +1 -2
- reflex/components/radix/themes/typography/quote.pyi +4 -51
- reflex/components/radix/themes/typography/strong.py +1 -2
- reflex/components/radix/themes/typography/strong.pyi +4 -51
- reflex/components/radix/themes/typography/text.py +2 -3
- reflex/components/radix/themes/typography/text.pyi +4 -51
- reflex/components/radix/themes/typography.py +10 -11
- reflex/components/react_player/audio.pyi +2 -0
- reflex/components/react_player/react_player.pyi +2 -0
- reflex/components/react_player/video.pyi +2 -0
- reflex/components/recharts/cartesian.pyi +38 -0
- reflex/components/recharts/charts.pyi +22 -0
- reflex/components/recharts/general.pyi +10 -0
- reflex/components/recharts/polar.pyi +12 -0
- reflex/components/recharts/recharts.pyi +4 -0
- reflex/components/suneditor/editor.pyi +2 -0
- reflex/components/tags/tag.py +1 -1
- reflex/constants/base.py +5 -1
- reflex/constants/colors.py +80 -0
- reflex/constants/event.py +10 -1
- reflex/page.py +1 -1
- reflex/reflex.py +4 -0
- reflex/style.py +8 -3
- reflex/testing.py +21 -10
- reflex/utils/format.py +13 -9
- reflex/utils/prerequisites.py +41 -3
- reflex/utils/serializers.py +14 -0
- reflex/utils/telemetry.py +8 -2
- reflex/utils/types.py +36 -2
- reflex/vars.py +53 -18
- {reflex-0.3.9a2.dist-info → reflex-0.3.10.dist-info}/METADATA +1 -2
- {reflex-0.3.9a2.dist-info → reflex-0.3.10.dist-info}/RECORD +246 -232
- {reflex-0.3.9a2.dist-info → reflex-0.3.10.dist-info}/WHEEL +1 -1
- {reflex-0.3.9a2.dist-info → reflex-0.3.10.dist-info}/LICENSE +0 -0
- {reflex-0.3.9a2.dist-info → reflex-0.3.10.dist-info}/entry_points.txt +0 -0
|
@@ -9,15 +9,10 @@ from reflex.event import EventChain, EventHandler, EventSpec
|
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from reflex import el
|
|
11
11
|
from reflex.vars import Var
|
|
12
|
-
from ..base import
|
|
13
|
-
CommonMarginProps,
|
|
14
|
-
LiteralAccentColor,
|
|
15
|
-
LiteralVariant,
|
|
16
|
-
RadixThemesComponent,
|
|
17
|
-
)
|
|
12
|
+
from ..base import LiteralAccentColor, LiteralVariant, RadixThemesComponent
|
|
18
13
|
from .base import LiteralTextSize, LiteralTextWeight
|
|
19
14
|
|
|
20
|
-
class Code(el.Code,
|
|
15
|
+
class Code(el.Code, RadixThemesComponent):
|
|
21
16
|
@overload
|
|
22
17
|
@classmethod
|
|
23
18
|
def create( # type: ignore
|
|
@@ -148,53 +143,12 @@ class Code(el.Code, CommonMarginProps, RadixThemesComponent):
|
|
|
148
143
|
translate: Optional[
|
|
149
144
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
150
145
|
] = None,
|
|
151
|
-
m: Optional[
|
|
152
|
-
Union[
|
|
153
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
154
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
155
|
-
]
|
|
156
|
-
] = None,
|
|
157
|
-
mx: Optional[
|
|
158
|
-
Union[
|
|
159
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
160
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
161
|
-
]
|
|
162
|
-
] = None,
|
|
163
|
-
my: Optional[
|
|
164
|
-
Union[
|
|
165
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
166
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
167
|
-
]
|
|
168
|
-
] = None,
|
|
169
|
-
mt: Optional[
|
|
170
|
-
Union[
|
|
171
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
172
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
173
|
-
]
|
|
174
|
-
] = None,
|
|
175
|
-
mr: Optional[
|
|
176
|
-
Union[
|
|
177
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
178
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
179
|
-
]
|
|
180
|
-
] = None,
|
|
181
|
-
mb: Optional[
|
|
182
|
-
Union[
|
|
183
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
184
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
185
|
-
]
|
|
186
|
-
] = None,
|
|
187
|
-
ml: Optional[
|
|
188
|
-
Union[
|
|
189
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
190
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
191
|
-
]
|
|
192
|
-
] = None,
|
|
193
146
|
style: Optional[Style] = None,
|
|
194
147
|
key: Optional[Any] = None,
|
|
195
148
|
id: Optional[Any] = None,
|
|
196
149
|
class_name: Optional[Any] = None,
|
|
197
150
|
autofocus: Optional[bool] = None,
|
|
151
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
198
152
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
199
153
|
on_blur: Optional[
|
|
200
154
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -273,18 +227,12 @@ class Code(el.Code, CommonMarginProps, RadixThemesComponent):
|
|
|
273
227
|
tab_index: Defines the position of the current element in the tabbing order.
|
|
274
228
|
title: Defines a tooltip for the element.
|
|
275
229
|
translate: Specifies whether the content of an element should be translated or not.
|
|
276
|
-
m: Margin: "0" - "9"
|
|
277
|
-
mx: Margin horizontal: "0" - "9"
|
|
278
|
-
my: Margin vertical: "0" - "9"
|
|
279
|
-
mt: Margin top: "0" - "9"
|
|
280
|
-
mr: Margin right: "0" - "9"
|
|
281
|
-
mb: Margin bottom: "0" - "9"
|
|
282
|
-
ml: Margin left: "0" - "9"
|
|
283
230
|
style: The style of the component.
|
|
284
231
|
key: A unique key for the component.
|
|
285
232
|
id: The id for the component.
|
|
286
233
|
class_name: The class name for the component.
|
|
287
234
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
235
|
+
_rename_props: props to change the name of
|
|
288
236
|
custom_attrs: custom attribute
|
|
289
237
|
**props: Component properties.
|
|
290
238
|
|
|
@@ -7,12 +7,11 @@ from __future__ import annotations
|
|
|
7
7
|
from reflex import el
|
|
8
8
|
|
|
9
9
|
from ..base import (
|
|
10
|
-
CommonMarginProps,
|
|
11
10
|
RadixThemesComponent,
|
|
12
11
|
)
|
|
13
12
|
|
|
14
13
|
|
|
15
|
-
class Em(el.Em,
|
|
14
|
+
class Em(el.Em, RadixThemesComponent):
|
|
16
15
|
"""Marks text to stress emphasis."""
|
|
17
16
|
|
|
18
17
|
tag = "Em"
|
|
@@ -8,9 +8,9 @@ from reflex.vars import Var, BaseVar, ComputedVar
|
|
|
8
8
|
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from reflex import el
|
|
11
|
-
from ..base import
|
|
11
|
+
from ..base import RadixThemesComponent
|
|
12
12
|
|
|
13
|
-
class Em(el.Em,
|
|
13
|
+
class Em(el.Em, RadixThemesComponent):
|
|
14
14
|
@overload
|
|
15
15
|
@classmethod
|
|
16
16
|
def create( # type: ignore
|
|
@@ -122,53 +122,12 @@ class Em(el.Em, CommonMarginProps, RadixThemesComponent):
|
|
|
122
122
|
translate: Optional[
|
|
123
123
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
124
124
|
] = None,
|
|
125
|
-
m: Optional[
|
|
126
|
-
Union[
|
|
127
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
128
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
129
|
-
]
|
|
130
|
-
] = None,
|
|
131
|
-
mx: Optional[
|
|
132
|
-
Union[
|
|
133
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
134
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
135
|
-
]
|
|
136
|
-
] = None,
|
|
137
|
-
my: Optional[
|
|
138
|
-
Union[
|
|
139
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
140
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
141
|
-
]
|
|
142
|
-
] = None,
|
|
143
|
-
mt: Optional[
|
|
144
|
-
Union[
|
|
145
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
146
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
147
|
-
]
|
|
148
|
-
] = None,
|
|
149
|
-
mr: Optional[
|
|
150
|
-
Union[
|
|
151
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
152
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
153
|
-
]
|
|
154
|
-
] = None,
|
|
155
|
-
mb: Optional[
|
|
156
|
-
Union[
|
|
157
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
158
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
159
|
-
]
|
|
160
|
-
] = None,
|
|
161
|
-
ml: Optional[
|
|
162
|
-
Union[
|
|
163
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
164
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
165
|
-
]
|
|
166
|
-
] = None,
|
|
167
125
|
style: Optional[Style] = None,
|
|
168
126
|
key: Optional[Any] = None,
|
|
169
127
|
id: Optional[Any] = None,
|
|
170
128
|
class_name: Optional[Any] = None,
|
|
171
129
|
autofocus: Optional[bool] = None,
|
|
130
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
172
131
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
173
132
|
on_blur: Optional[
|
|
174
133
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -243,18 +202,12 @@ class Em(el.Em, CommonMarginProps, RadixThemesComponent):
|
|
|
243
202
|
tab_index: Defines the position of the current element in the tabbing order.
|
|
244
203
|
title: Defines a tooltip for the element.
|
|
245
204
|
translate: Specifies whether the content of an element should be translated or not.
|
|
246
|
-
m: Margin: "0" - "9"
|
|
247
|
-
mx: Margin horizontal: "0" - "9"
|
|
248
|
-
my: Margin vertical: "0" - "9"
|
|
249
|
-
mt: Margin top: "0" - "9"
|
|
250
|
-
mr: Margin right: "0" - "9"
|
|
251
|
-
mb: Margin bottom: "0" - "9"
|
|
252
|
-
ml: Margin left: "0" - "9"
|
|
253
205
|
style: The style of the component.
|
|
254
206
|
key: A unique key for the component.
|
|
255
207
|
id: The id for the component.
|
|
256
208
|
class_name: The class name for the component.
|
|
257
209
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
210
|
+
_rename_props: props to change the name of
|
|
258
211
|
custom_attrs: custom attribute
|
|
259
212
|
**props: Component properties.
|
|
260
213
|
|
|
@@ -8,7 +8,6 @@ from reflex import el
|
|
|
8
8
|
from reflex.vars import Var
|
|
9
9
|
|
|
10
10
|
from ..base import (
|
|
11
|
-
CommonMarginProps,
|
|
12
11
|
LiteralAccentColor,
|
|
13
12
|
RadixThemesComponent,
|
|
14
13
|
)
|
|
@@ -20,7 +19,7 @@ from .base import (
|
|
|
20
19
|
)
|
|
21
20
|
|
|
22
21
|
|
|
23
|
-
class Heading(el.H1,
|
|
22
|
+
class Heading(el.H1, RadixThemesComponent):
|
|
24
23
|
"""A foundational text primitive based on the <span> element."""
|
|
25
24
|
|
|
26
25
|
tag = "Heading"
|
|
@@ -44,7 +43,7 @@ class Heading(el.H1, CommonMarginProps, RadixThemesComponent):
|
|
|
44
43
|
trim: Var[LiteralTextTrim]
|
|
45
44
|
|
|
46
45
|
# Overrides the accent color inherited from the Theme.
|
|
47
|
-
|
|
46
|
+
color_scheme: Var[LiteralAccentColor]
|
|
48
47
|
|
|
49
48
|
# Whether to render the text with higher contrast color
|
|
50
49
|
high_contrast: Var[bool]
|
|
@@ -9,10 +9,10 @@ from reflex.event import EventChain, EventHandler, EventSpec
|
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from reflex import el
|
|
11
11
|
from reflex.vars import Var
|
|
12
|
-
from ..base import
|
|
12
|
+
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
13
13
|
from .base import LiteralTextAlign, LiteralTextSize, LiteralTextTrim, LiteralTextWeight
|
|
14
14
|
|
|
15
|
-
class Heading(el.H1,
|
|
15
|
+
class Heading(el.H1, RadixThemesComponent):
|
|
16
16
|
@overload
|
|
17
17
|
@classmethod
|
|
18
18
|
def create( # type: ignore
|
|
@@ -151,53 +151,12 @@ class Heading(el.H1, CommonMarginProps, RadixThemesComponent):
|
|
|
151
151
|
translate: Optional[
|
|
152
152
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
153
153
|
] = None,
|
|
154
|
-
m: Optional[
|
|
155
|
-
Union[
|
|
156
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
157
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
158
|
-
]
|
|
159
|
-
] = None,
|
|
160
|
-
mx: Optional[
|
|
161
|
-
Union[
|
|
162
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
163
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
164
|
-
]
|
|
165
|
-
] = None,
|
|
166
|
-
my: Optional[
|
|
167
|
-
Union[
|
|
168
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
169
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
170
|
-
]
|
|
171
|
-
] = None,
|
|
172
|
-
mt: Optional[
|
|
173
|
-
Union[
|
|
174
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
175
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
176
|
-
]
|
|
177
|
-
] = None,
|
|
178
|
-
mr: Optional[
|
|
179
|
-
Union[
|
|
180
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
181
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
182
|
-
]
|
|
183
|
-
] = None,
|
|
184
|
-
mb: Optional[
|
|
185
|
-
Union[
|
|
186
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
187
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
188
|
-
]
|
|
189
|
-
] = None,
|
|
190
|
-
ml: Optional[
|
|
191
|
-
Union[
|
|
192
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
193
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
194
|
-
]
|
|
195
|
-
] = None,
|
|
196
154
|
style: Optional[Style] = None,
|
|
197
155
|
key: Optional[Any] = None,
|
|
198
156
|
id: Optional[Any] = None,
|
|
199
157
|
class_name: Optional[Any] = None,
|
|
200
158
|
autofocus: Optional[bool] = None,
|
|
159
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
201
160
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
202
161
|
on_blur: Optional[
|
|
203
162
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -279,18 +238,12 @@ class Heading(el.H1, CommonMarginProps, RadixThemesComponent):
|
|
|
279
238
|
tab_index: Defines the position of the current element in the tabbing order.
|
|
280
239
|
title: Defines a tooltip for the element.
|
|
281
240
|
translate: Specifies whether the content of an element should be translated or not.
|
|
282
|
-
m: Margin: "0" - "9"
|
|
283
|
-
mx: Margin horizontal: "0" - "9"
|
|
284
|
-
my: Margin vertical: "0" - "9"
|
|
285
|
-
mt: Margin top: "0" - "9"
|
|
286
|
-
mr: Margin right: "0" - "9"
|
|
287
|
-
mb: Margin bottom: "0" - "9"
|
|
288
|
-
ml: Margin left: "0" - "9"
|
|
289
241
|
style: The style of the component.
|
|
290
242
|
key: A unique key for the component.
|
|
291
243
|
id: The id for the component.
|
|
292
244
|
class_name: The class name for the component.
|
|
293
245
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
246
|
+
_rename_props: props to change the name of
|
|
294
247
|
custom_attrs: custom attribute
|
|
295
248
|
**props: Component properties.
|
|
296
249
|
|
|
@@ -8,7 +8,6 @@ from reflex import el
|
|
|
8
8
|
from reflex.vars import Var
|
|
9
9
|
|
|
10
10
|
from ..base import (
|
|
11
|
-
CommonMarginProps,
|
|
12
11
|
RadixThemesComponent,
|
|
13
12
|
)
|
|
14
13
|
from .base import (
|
|
@@ -16,7 +15,7 @@ from .base import (
|
|
|
16
15
|
)
|
|
17
16
|
|
|
18
17
|
|
|
19
|
-
class Kbd(el.Kbd,
|
|
18
|
+
class Kbd(el.Kbd, RadixThemesComponent):
|
|
20
19
|
"""Represents keyboard input or a hotkey."""
|
|
21
20
|
|
|
22
21
|
tag = "Kbd"
|
|
@@ -9,10 +9,10 @@ from reflex.event import EventChain, EventHandler, EventSpec
|
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from reflex import el
|
|
11
11
|
from reflex.vars import Var
|
|
12
|
-
from ..base import
|
|
12
|
+
from ..base import RadixThemesComponent
|
|
13
13
|
from .base import LiteralTextSize
|
|
14
14
|
|
|
15
|
-
class Kbd(el.Kbd,
|
|
15
|
+
class Kbd(el.Kbd, RadixThemesComponent):
|
|
16
16
|
@overload
|
|
17
17
|
@classmethod
|
|
18
18
|
def create( # type: ignore
|
|
@@ -130,53 +130,12 @@ class Kbd(el.Kbd, CommonMarginProps, RadixThemesComponent):
|
|
|
130
130
|
translate: Optional[
|
|
131
131
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
132
132
|
] = None,
|
|
133
|
-
m: Optional[
|
|
134
|
-
Union[
|
|
135
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
136
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
137
|
-
]
|
|
138
|
-
] = None,
|
|
139
|
-
mx: Optional[
|
|
140
|
-
Union[
|
|
141
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
142
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
143
|
-
]
|
|
144
|
-
] = None,
|
|
145
|
-
my: Optional[
|
|
146
|
-
Union[
|
|
147
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
148
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
149
|
-
]
|
|
150
|
-
] = None,
|
|
151
|
-
mt: Optional[
|
|
152
|
-
Union[
|
|
153
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
154
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
155
|
-
]
|
|
156
|
-
] = None,
|
|
157
|
-
mr: Optional[
|
|
158
|
-
Union[
|
|
159
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
160
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
161
|
-
]
|
|
162
|
-
] = None,
|
|
163
|
-
mb: Optional[
|
|
164
|
-
Union[
|
|
165
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
166
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
167
|
-
]
|
|
168
|
-
] = None,
|
|
169
|
-
ml: Optional[
|
|
170
|
-
Union[
|
|
171
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
172
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
173
|
-
]
|
|
174
|
-
] = None,
|
|
175
133
|
style: Optional[Style] = None,
|
|
176
134
|
key: Optional[Any] = None,
|
|
177
135
|
id: Optional[Any] = None,
|
|
178
136
|
class_name: Optional[Any] = None,
|
|
179
137
|
autofocus: Optional[bool] = None,
|
|
138
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
180
139
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
181
140
|
on_blur: Optional[
|
|
182
141
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -252,18 +211,12 @@ class Kbd(el.Kbd, CommonMarginProps, RadixThemesComponent):
|
|
|
252
211
|
tab_index: Defines the position of the current element in the tabbing order.
|
|
253
212
|
title: Defines a tooltip for the element.
|
|
254
213
|
translate: Specifies whether the content of an element should be translated or not.
|
|
255
|
-
m: Margin: "0" - "9"
|
|
256
|
-
mx: Margin horizontal: "0" - "9"
|
|
257
|
-
my: Margin vertical: "0" - "9"
|
|
258
|
-
mt: Margin top: "0" - "9"
|
|
259
|
-
mr: Margin right: "0" - "9"
|
|
260
|
-
mb: Margin bottom: "0" - "9"
|
|
261
|
-
ml: Margin left: "0" - "9"
|
|
262
214
|
style: The style of the component.
|
|
263
215
|
key: A unique key for the component.
|
|
264
216
|
id: The id for the component.
|
|
265
217
|
class_name: The class name for the component.
|
|
266
218
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
219
|
+
_rename_props: props to change the name of
|
|
267
220
|
custom_attrs: custom attribute
|
|
268
221
|
**props: Component properties.
|
|
269
222
|
|
|
@@ -6,11 +6,13 @@ from __future__ import annotations
|
|
|
6
6
|
|
|
7
7
|
from typing import Literal
|
|
8
8
|
|
|
9
|
+
from reflex.components.component import Component
|
|
9
10
|
from reflex.components.el.elements.inline import A
|
|
11
|
+
from reflex.components.next.link import NextLink
|
|
12
|
+
from reflex.utils import imports
|
|
10
13
|
from reflex.vars import Var
|
|
11
14
|
|
|
12
15
|
from ..base import (
|
|
13
|
-
CommonMarginProps,
|
|
14
16
|
LiteralAccentColor,
|
|
15
17
|
RadixThemesComponent,
|
|
16
18
|
)
|
|
@@ -22,8 +24,10 @@ from .base import (
|
|
|
22
24
|
|
|
23
25
|
LiteralLinkUnderline = Literal["auto", "hover", "always"]
|
|
24
26
|
|
|
27
|
+
next_link = NextLink.create()
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
|
|
30
|
+
class Link(RadixThemesComponent, A):
|
|
27
31
|
"""A semantic element for navigation between pages."""
|
|
28
32
|
|
|
29
33
|
tag = "Link"
|
|
@@ -44,7 +48,34 @@ class Link(CommonMarginProps, RadixThemesComponent, A):
|
|
|
44
48
|
underline: Var[LiteralLinkUnderline]
|
|
45
49
|
|
|
46
50
|
# Overrides the accent color inherited from the Theme.
|
|
47
|
-
|
|
51
|
+
color_scheme: Var[LiteralAccentColor]
|
|
48
52
|
|
|
49
53
|
# Whether to render the text with higher contrast color
|
|
50
54
|
high_contrast: Var[bool]
|
|
55
|
+
|
|
56
|
+
def _get_imports(self) -> imports.ImportDict:
|
|
57
|
+
return {**super()._get_imports(), **next_link._get_imports()}
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def create(cls, *children, **props) -> Component:
|
|
61
|
+
"""Create a Link component.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
*children: The children of the component.
|
|
65
|
+
**props: The props of the component.
|
|
66
|
+
|
|
67
|
+
Raises:
|
|
68
|
+
ValueError: in case of missing children
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
Component: The link component
|
|
72
|
+
"""
|
|
73
|
+
if props.get("href") is not None:
|
|
74
|
+
if not len(children):
|
|
75
|
+
raise ValueError("Link without a child will not display")
|
|
76
|
+
if "as_child" not in props:
|
|
77
|
+
# If user does not use `as_child`, by default we render using next_link to avoid page refresh during internal navigation
|
|
78
|
+
return super().create(
|
|
79
|
+
NextLink.create(*children, **props), as_child=True
|
|
80
|
+
)
|
|
81
|
+
return super().create(*children, **props)
|
|
@@ -8,20 +8,48 @@ from reflex.vars import Var, BaseVar, ComputedVar
|
|
|
8
8
|
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from typing import Literal
|
|
11
|
+
from reflex.components.component import Component
|
|
11
12
|
from reflex.components.el.elements.inline import A
|
|
13
|
+
from reflex.components.next.link import NextLink
|
|
14
|
+
from reflex.utils import imports
|
|
12
15
|
from reflex.vars import Var
|
|
13
|
-
from ..base import
|
|
16
|
+
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
14
17
|
from .base import LiteralTextSize, LiteralTextTrim, LiteralTextWeight
|
|
15
18
|
|
|
16
19
|
LiteralLinkUnderline = Literal["auto", "hover", "always"]
|
|
20
|
+
next_link = NextLink.create()
|
|
17
21
|
|
|
18
|
-
class Link(
|
|
22
|
+
class Link(RadixThemesComponent, A):
|
|
19
23
|
@overload
|
|
20
24
|
@classmethod
|
|
21
25
|
def create( # type: ignore
|
|
22
26
|
cls,
|
|
23
27
|
*children,
|
|
24
|
-
|
|
28
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
29
|
+
size: Optional[
|
|
30
|
+
Union[
|
|
31
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
32
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
33
|
+
]
|
|
34
|
+
] = None,
|
|
35
|
+
weight: Optional[
|
|
36
|
+
Union[
|
|
37
|
+
Var[Literal["light", "regular", "medium", "bold"]],
|
|
38
|
+
Literal["light", "regular", "medium", "bold"],
|
|
39
|
+
]
|
|
40
|
+
] = None,
|
|
41
|
+
trim: Optional[
|
|
42
|
+
Union[
|
|
43
|
+
Var[Literal["normal", "start", "end", "both"]],
|
|
44
|
+
Literal["normal", "start", "end", "both"],
|
|
45
|
+
]
|
|
46
|
+
] = None,
|
|
47
|
+
underline: Optional[
|
|
48
|
+
Union[
|
|
49
|
+
Var[Literal["auto", "hover", "always"]],
|
|
50
|
+
Literal["auto", "hover", "always"],
|
|
51
|
+
]
|
|
52
|
+
] = None,
|
|
25
53
|
color_scheme: Optional[
|
|
26
54
|
Union[
|
|
27
55
|
Var[
|
|
@@ -84,74 +112,7 @@ class Link(CommonMarginProps, RadixThemesComponent, A):
|
|
|
84
112
|
],
|
|
85
113
|
]
|
|
86
114
|
] = None,
|
|
87
|
-
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
88
|
-
size: Optional[
|
|
89
|
-
Union[
|
|
90
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
91
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
92
|
-
]
|
|
93
|
-
] = None,
|
|
94
|
-
weight: Optional[
|
|
95
|
-
Union[
|
|
96
|
-
Var[Literal["light", "regular", "medium", "bold"]],
|
|
97
|
-
Literal["light", "regular", "medium", "bold"],
|
|
98
|
-
]
|
|
99
|
-
] = None,
|
|
100
|
-
trim: Optional[
|
|
101
|
-
Union[
|
|
102
|
-
Var[Literal["normal", "start", "end", "both"]],
|
|
103
|
-
Literal["normal", "start", "end", "both"],
|
|
104
|
-
]
|
|
105
|
-
] = None,
|
|
106
|
-
underline: Optional[
|
|
107
|
-
Union[
|
|
108
|
-
Var[Literal["auto", "hover", "always"]],
|
|
109
|
-
Literal["auto", "hover", "always"],
|
|
110
|
-
]
|
|
111
|
-
] = None,
|
|
112
115
|
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
|
113
|
-
m: Optional[
|
|
114
|
-
Union[
|
|
115
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
116
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
117
|
-
]
|
|
118
|
-
] = None,
|
|
119
|
-
mx: Optional[
|
|
120
|
-
Union[
|
|
121
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
122
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
123
|
-
]
|
|
124
|
-
] = None,
|
|
125
|
-
my: Optional[
|
|
126
|
-
Union[
|
|
127
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
128
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
129
|
-
]
|
|
130
|
-
] = None,
|
|
131
|
-
mt: Optional[
|
|
132
|
-
Union[
|
|
133
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
134
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
135
|
-
]
|
|
136
|
-
] = None,
|
|
137
|
-
mr: Optional[
|
|
138
|
-
Union[
|
|
139
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
140
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
141
|
-
]
|
|
142
|
-
] = None,
|
|
143
|
-
mb: Optional[
|
|
144
|
-
Union[
|
|
145
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
146
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
147
|
-
]
|
|
148
|
-
] = None,
|
|
149
|
-
ml: Optional[
|
|
150
|
-
Union[
|
|
151
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
152
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
153
|
-
]
|
|
154
|
-
] = None,
|
|
155
116
|
download: Optional[
|
|
156
117
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
157
118
|
] = None,
|
|
@@ -221,6 +182,7 @@ class Link(CommonMarginProps, RadixThemesComponent, A):
|
|
|
221
182
|
id: Optional[Any] = None,
|
|
222
183
|
class_name: Optional[Any] = None,
|
|
223
184
|
autofocus: Optional[bool] = None,
|
|
185
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
224
186
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
225
187
|
on_blur: Optional[
|
|
226
188
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -269,28 +231,17 @@ class Link(CommonMarginProps, RadixThemesComponent, A):
|
|
|
269
231
|
] = None,
|
|
270
232
|
**props
|
|
271
233
|
) -> "Link":
|
|
272
|
-
"""Create a
|
|
273
|
-
|
|
274
|
-
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
275
|
-
other UI libraries for common names, like Text and Button.
|
|
234
|
+
"""Create a Link component.
|
|
276
235
|
|
|
277
236
|
Args:
|
|
278
|
-
*children:
|
|
279
|
-
color: map to CSS default color property.
|
|
280
|
-
color_scheme: map to radix color property.
|
|
237
|
+
*children: The children of the component.
|
|
281
238
|
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
282
239
|
size: Text size: "1" - "9"
|
|
283
240
|
weight: Thickness of text: "light" | "regular" | "medium" | "bold"
|
|
284
241
|
trim: Removes the leading trim space: "normal" | "start" | "end" | "both"
|
|
285
242
|
underline: Sets the visibility of the underline affordance: "auto" | "hover" | "always"
|
|
243
|
+
color_scheme: Overrides the accent color inherited from the Theme.
|
|
286
244
|
high_contrast: Whether to render the text with higher contrast color
|
|
287
|
-
m: Margin: "0" - "9"
|
|
288
|
-
mx: Margin horizontal: "0" - "9"
|
|
289
|
-
my: Margin vertical: "0" - "9"
|
|
290
|
-
mt: Margin top: "0" - "9"
|
|
291
|
-
mr: Margin right: "0" - "9"
|
|
292
|
-
mb: Margin bottom: "0" - "9"
|
|
293
|
-
ml: Margin left: "0" - "9"
|
|
294
245
|
download: Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink.
|
|
295
246
|
href: Specifies the URL of the page the link goes to
|
|
296
247
|
href_lang: Specifies the language of the linked document
|
|
@@ -322,10 +273,14 @@ class Link(CommonMarginProps, RadixThemesComponent, A):
|
|
|
322
273
|
id: The id for the component.
|
|
323
274
|
class_name: The class name for the component.
|
|
324
275
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
276
|
+
_rename_props: props to change the name of
|
|
325
277
|
custom_attrs: custom attribute
|
|
326
|
-
**props:
|
|
278
|
+
**props: The props of the component.
|
|
279
|
+
|
|
280
|
+
Raises:
|
|
281
|
+
ValueError: in case of missing children
|
|
327
282
|
|
|
328
283
|
Returns:
|
|
329
|
-
|
|
284
|
+
Component: The link component
|
|
330
285
|
"""
|
|
331
286
|
...
|