reflex 0.6.4a3__py3-none-any.whl → 0.6.5a1__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.
- reflex/.templates/jinja/web/pages/custom_component.js.jinja2 +0 -14
- reflex/.templates/jinja/web/pages/utils.js.jinja2 +4 -8
- reflex/.templates/web/components/shiki/code.js +16 -11
- reflex/.templates/web/utils/state.js +29 -21
- reflex/__init__.py +4 -0
- reflex/__init__.pyi +4 -0
- reflex/app.py +148 -154
- reflex/app_mixins/lifespan.py +5 -1
- reflex/app_mixins/middleware.py +3 -1
- reflex/app_mixins/mixin.py +3 -2
- reflex/base.py +2 -4
- reflex/compiler/compiler.py +111 -37
- reflex/components/base/app_wrap.pyi +17 -17
- reflex/components/base/bare.py +72 -3
- reflex/components/base/body.pyi +17 -17
- reflex/components/base/document.pyi +81 -81
- reflex/components/base/error_boundary.pyi +25 -18
- reflex/components/base/fragment.pyi +17 -17
- reflex/components/base/head.pyi +33 -33
- reflex/components/base/link.pyi +33 -33
- reflex/components/base/meta.pyi +65 -65
- reflex/components/base/script.py +4 -4
- reflex/components/base/script.pyi +23 -20
- reflex/components/component.py +250 -31
- reflex/components/core/banner.py +1 -1
- reflex/components/core/banner.pyi +81 -81
- reflex/components/core/client_side_routing.pyi +33 -33
- reflex/components/core/clipboard.py +2 -2
- reflex/components/core/clipboard.pyi +24 -18
- reflex/components/core/debounce.py +2 -2
- reflex/components/core/debounce.pyi +18 -18
- reflex/components/core/html.pyi +17 -17
- reflex/components/core/upload.py +82 -28
- reflex/components/core/upload.pyi +77 -72
- reflex/components/datadisplay/code.py +55 -40
- reflex/components/datadisplay/code.pyi +46 -44
- reflex/components/datadisplay/dataeditor.py +21 -20
- reflex/components/datadisplay/dataeditor.pyi +103 -35
- reflex/components/datadisplay/shiki_code_block.py +60 -27
- reflex/components/datadisplay/shiki_code_block.pyi +86 -65
- reflex/components/dynamic.py +9 -5
- reflex/components/el/element.pyi +17 -17
- reflex/components/el/elements/base.pyi +17 -17
- reflex/components/el/elements/forms.py +12 -3
- reflex/components/el/elements/forms.pyi +293 -233
- reflex/components/el/elements/inline.pyi +449 -449
- reflex/components/el/elements/media.pyi +401 -401
- reflex/components/el/elements/metadata.pyi +97 -97
- reflex/components/el/elements/other.pyi +113 -113
- reflex/components/el/elements/scripts.pyi +49 -49
- reflex/components/el/elements/sectioning.pyi +241 -241
- reflex/components/el/elements/tables.pyi +161 -161
- reflex/components/el/elements/typography.pyi +241 -241
- reflex/components/gridjs/datatable.pyi +33 -33
- reflex/components/lucide/icon.py +1 -1
- reflex/components/lucide/icon.pyi +33 -33
- reflex/components/markdown/markdown.py +180 -49
- reflex/components/markdown/markdown.pyi +36 -19
- reflex/components/moment/moment.py +17 -21
- reflex/components/moment/moment.pyi +26 -21
- reflex/components/next/base.pyi +17 -17
- reflex/components/next/image.py +3 -3
- reflex/components/next/image.pyi +21 -19
- reflex/components/next/link.pyi +17 -17
- reflex/components/next/video.pyi +17 -17
- reflex/components/plotly/plotly.py +79 -78
- reflex/components/plotly/plotly.pyi +91 -41
- reflex/components/props.py +34 -0
- reflex/components/radix/primitives/accordion.py +15 -8
- reflex/components/radix/primitives/accordion.pyi +121 -118
- reflex/components/radix/primitives/base.pyi +33 -33
- reflex/components/radix/primitives/drawer.py +41 -20
- reflex/components/radix/primitives/drawer.pyi +279 -190
- reflex/components/radix/primitives/form.py +2 -2
- reflex/components/radix/primitives/form.pyi +200 -167
- reflex/components/radix/primitives/progress.pyi +81 -81
- reflex/components/radix/primitives/slider.pyi +89 -83
- reflex/components/radix/themes/base.py +27 -1
- reflex/components/radix/themes/base.pyi +286 -113
- reflex/components/radix/themes/color_mode.py +17 -9
- reflex/components/radix/themes/color_mode.pyi +68 -56
- reflex/components/radix/themes/components/alert_dialog.py +8 -5
- reflex/components/radix/themes/components/alert_dialog.pyi +125 -117
- reflex/components/radix/themes/components/aspect_ratio.pyi +17 -17
- reflex/components/radix/themes/components/avatar.py +1 -5
- reflex/components/radix/themes/components/avatar.pyi +17 -17
- reflex/components/radix/themes/components/badge.py +1 -5
- reflex/components/radix/themes/components/badge.pyi +17 -17
- reflex/components/radix/themes/components/button.pyi +18 -21
- reflex/components/radix/themes/components/callout.py +1 -4
- reflex/components/radix/themes/components/callout.pyi +81 -81
- reflex/components/radix/themes/components/card.py +1 -3
- reflex/components/radix/themes/components/card.pyi +17 -17
- reflex/components/radix/themes/components/checkbox.py +4 -8
- reflex/components/radix/themes/components/checkbox.pyi +61 -52
- reflex/components/radix/themes/components/checkbox_cards.pyi +33 -33
- reflex/components/radix/themes/components/checkbox_group.pyi +33 -33
- reflex/components/radix/themes/components/context_menu.py +121 -28
- reflex/components/radix/themes/components/context_menu.pyi +250 -147
- reflex/components/radix/themes/components/data_list.pyi +65 -65
- reflex/components/radix/themes/components/dialog.py +11 -11
- reflex/components/radix/themes/components/dialog.pyi +135 -120
- reflex/components/radix/themes/components/dropdown_menu.py +14 -25
- reflex/components/radix/themes/components/dropdown_menu.pyi +157 -145
- reflex/components/radix/themes/components/hover_card.py +19 -7
- reflex/components/radix/themes/components/hover_card.pyi +102 -67
- reflex/components/radix/themes/components/icon_button.pyi +18 -21
- reflex/components/radix/themes/components/inset.py +1 -3
- reflex/components/radix/themes/components/inset.pyi +17 -17
- reflex/components/radix/themes/components/popover.py +22 -13
- reflex/components/radix/themes/components/popover.pyi +98 -72
- reflex/components/radix/themes/components/progress.pyi +17 -17
- reflex/components/radix/themes/components/radio.pyi +17 -17
- reflex/components/radix/themes/components/radio_cards.py +2 -2
- reflex/components/radix/themes/components/radio_cards.pyi +37 -34
- reflex/components/radix/themes/components/radio_group.py +3 -7
- reflex/components/radix/themes/components/radio_group.pyi +69 -66
- reflex/components/radix/themes/components/scroll_area.py +1 -3
- reflex/components/radix/themes/components/scroll_area.pyi +17 -17
- reflex/components/radix/themes/components/segmented_control.pyi +37 -34
- reflex/components/radix/themes/components/select.py +7 -11
- reflex/components/radix/themes/components/select.pyi +175 -154
- reflex/components/radix/themes/components/separator.py +1 -4
- reflex/components/radix/themes/components/separator.pyi +17 -17
- reflex/components/radix/themes/components/skeleton.pyi +17 -17
- reflex/components/radix/themes/components/slider.py +12 -21
- reflex/components/radix/themes/components/slider.pyi +47 -25
- reflex/components/radix/themes/components/spinner.py +1 -4
- reflex/components/radix/themes/components/spinner.pyi +17 -17
- reflex/components/radix/themes/components/switch.py +3 -6
- reflex/components/radix/themes/components/switch.pyi +21 -18
- reflex/components/radix/themes/components/table.py +21 -5
- reflex/components/radix/themes/components/table.pyi +392 -116
- reflex/components/radix/themes/components/tabs.py +3 -6
- reflex/components/radix/themes/components/tabs.pyi +89 -83
- reflex/components/radix/themes/components/text_area.py +1 -5
- reflex/components/radix/themes/components/text_area.pyi +43 -20
- reflex/components/radix/themes/components/text_field.py +1 -5
- reflex/components/radix/themes/components/text_field.pyi +101 -55
- reflex/components/radix/themes/components/tooltip.py +5 -7
- reflex/components/radix/themes/components/tooltip.pyi +25 -22
- reflex/components/radix/themes/layout/base.py +2 -27
- reflex/components/radix/themes/layout/base.pyi +82 -82
- reflex/components/radix/themes/layout/box.pyi +17 -17
- reflex/components/radix/themes/layout/center.pyi +17 -17
- reflex/components/radix/themes/layout/container.pyi +17 -17
- reflex/components/radix/themes/layout/flex.py +1 -6
- reflex/components/radix/themes/layout/flex.pyi +17 -17
- reflex/components/radix/themes/layout/grid.py +1 -6
- reflex/components/radix/themes/layout/grid.pyi +17 -17
- reflex/components/radix/themes/layout/list.py +20 -15
- reflex/components/radix/themes/layout/list.pyi +175 -92
- reflex/components/radix/themes/layout/section.pyi +17 -17
- reflex/components/radix/themes/layout/spacer.pyi +17 -17
- reflex/components/radix/themes/layout/stack.py +6 -6
- reflex/components/radix/themes/layout/stack.pyi +91 -62
- reflex/components/radix/themes/typography/blockquote.py +2 -8
- reflex/components/radix/themes/typography/blockquote.pyi +17 -17
- reflex/components/radix/themes/typography/code.py +4 -10
- reflex/components/radix/themes/typography/code.pyi +19 -18
- reflex/components/radix/themes/typography/heading.py +4 -11
- reflex/components/radix/themes/typography/heading.pyi +19 -18
- reflex/components/radix/themes/typography/link.py +4 -10
- reflex/components/radix/themes/typography/link.pyi +19 -18
- reflex/components/radix/themes/typography/text.py +4 -11
- reflex/components/radix/themes/typography/text.pyi +115 -114
- reflex/components/react_player/audio.pyi +58 -33
- reflex/components/react_player/react_player.py +17 -17
- reflex/components/react_player/react_player.pyi +55 -33
- reflex/components/react_player/video.pyi +58 -33
- reflex/components/recharts/cartesian.py +45 -45
- reflex/components/recharts/cartesian.pyi +389 -304
- reflex/components/recharts/charts.py +22 -22
- reflex/components/recharts/charts.pyi +226 -179
- reflex/components/recharts/general.py +26 -27
- reflex/components/recharts/general.pyi +106 -99
- reflex/components/recharts/polar.py +33 -33
- reflex/components/recharts/polar.pyi +70 -64
- reflex/components/recharts/recharts.pyi +33 -33
- reflex/components/sonner/toast.py +9 -36
- reflex/components/sonner/toast.pyi +20 -24
- reflex/components/suneditor/editor.py +8 -8
- reflex/components/suneditor/editor.pyi +50 -25
- reflex/components/tags/iter_tag.py +1 -10
- reflex/components/tags/tag.py +1 -4
- reflex/config.py +198 -35
- reflex/constants/__init__.py +4 -16
- reflex/constants/base.py +7 -14
- reflex/constants/colors.py +0 -1
- reflex/constants/installer.py +12 -7
- reflex/constants/state.py +4 -0
- reflex/custom_components/custom_components.py +6 -6
- reflex/event.py +486 -241
- reflex/experimental/client_state.py +9 -9
- reflex/experimental/layout.py +2 -2
- reflex/experimental/layout.pyi +95 -87
- reflex/experimental/misc.py +1 -1
- reflex/istate/__init__.py +1 -0
- reflex/istate/proxy.py +33 -0
- reflex/istate/wrappers.py +27 -0
- reflex/model.py +7 -7
- reflex/page.py +2 -1
- reflex/reflex.py +142 -8
- reflex/state.py +127 -46
- reflex/testing.py +9 -7
- reflex/utils/console.py +0 -1
- reflex/utils/exceptions.py +31 -3
- reflex/utils/exec.py +33 -14
- reflex/utils/format.py +15 -12
- reflex/utils/net.py +1 -1
- reflex/utils/path_ops.py +2 -2
- reflex/utils/prerequisites.py +82 -46
- reflex/utils/pyi_generator.py +63 -20
- reflex/utils/registry.py +1 -1
- reflex/utils/serializers.py +75 -36
- reflex/utils/telemetry.py +3 -2
- reflex/utils/types.py +125 -10
- reflex/vars/base.py +131 -119
- reflex/vars/function.py +59 -12
- reflex/vars/number.py +3 -1
- reflex/vars/object.py +30 -24
- reflex/vars/sequence.py +7 -7
- {reflex-0.6.4a3.dist-info → reflex-0.6.5a1.dist-info}/METADATA +3 -3
- reflex-0.6.5a1.dist-info/RECORD +394 -0
- reflex-0.6.4a3.dist-info/RECORD +0 -391
- {reflex-0.6.4a3.dist-info → reflex-0.6.5a1.dist-info}/LICENSE +0 -0
- {reflex-0.6.4a3.dist-info → reflex-0.6.5a1.dist-info}/WHEEL +0 -0
- {reflex-0.6.4a3.dist-info → reflex-0.6.5a1.dist-info}/entry_points.txt +0 -0
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
from typing import Any, Dict, Literal, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components import Component
|
|
9
|
-
from reflex.
|
|
9
|
+
from reflex.components.core.breakpoints import Breakpoints
|
|
10
|
+
from reflex.event import BASE_STATE, EventType
|
|
10
11
|
from reflex.style import Style
|
|
11
12
|
from reflex.utils.imports import ImportDict
|
|
12
13
|
from reflex.vars.base import Var
|
|
@@ -102,22 +103,22 @@ class CommonMarginProps(Component):
|
|
|
102
103
|
id: Optional[Any] = None,
|
|
103
104
|
class_name: Optional[Any] = None,
|
|
104
105
|
autofocus: Optional[bool] = None,
|
|
105
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
106
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
107
|
-
on_click: Optional[EventType[[]]] = None,
|
|
108
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
109
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
110
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
111
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
112
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
113
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
114
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
115
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
116
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
117
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
118
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
119
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
120
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
106
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
107
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
108
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
109
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
110
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
111
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
112
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
113
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
114
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
115
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
116
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
117
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
118
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
119
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
120
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
121
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
121
122
|
**props,
|
|
122
123
|
) -> "CommonMarginProps":
|
|
123
124
|
"""Create the component.
|
|
@@ -144,6 +145,178 @@ class CommonMarginProps(Component):
|
|
|
144
145
|
"""
|
|
145
146
|
...
|
|
146
147
|
|
|
148
|
+
class CommonPaddingProps(Component):
|
|
149
|
+
@overload
|
|
150
|
+
@classmethod
|
|
151
|
+
def create( # type: ignore
|
|
152
|
+
cls,
|
|
153
|
+
*children,
|
|
154
|
+
p: Optional[
|
|
155
|
+
Union[
|
|
156
|
+
Breakpoints[
|
|
157
|
+
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
158
|
+
],
|
|
159
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
160
|
+
Var[
|
|
161
|
+
Union[
|
|
162
|
+
Breakpoints[
|
|
163
|
+
str,
|
|
164
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
165
|
+
],
|
|
166
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
167
|
+
]
|
|
168
|
+
],
|
|
169
|
+
]
|
|
170
|
+
] = None,
|
|
171
|
+
px: Optional[
|
|
172
|
+
Union[
|
|
173
|
+
Breakpoints[
|
|
174
|
+
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
175
|
+
],
|
|
176
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
177
|
+
Var[
|
|
178
|
+
Union[
|
|
179
|
+
Breakpoints[
|
|
180
|
+
str,
|
|
181
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
182
|
+
],
|
|
183
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
184
|
+
]
|
|
185
|
+
],
|
|
186
|
+
]
|
|
187
|
+
] = None,
|
|
188
|
+
py: Optional[
|
|
189
|
+
Union[
|
|
190
|
+
Breakpoints[
|
|
191
|
+
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
192
|
+
],
|
|
193
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
194
|
+
Var[
|
|
195
|
+
Union[
|
|
196
|
+
Breakpoints[
|
|
197
|
+
str,
|
|
198
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
199
|
+
],
|
|
200
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
201
|
+
]
|
|
202
|
+
],
|
|
203
|
+
]
|
|
204
|
+
] = None,
|
|
205
|
+
pt: Optional[
|
|
206
|
+
Union[
|
|
207
|
+
Breakpoints[
|
|
208
|
+
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
209
|
+
],
|
|
210
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
211
|
+
Var[
|
|
212
|
+
Union[
|
|
213
|
+
Breakpoints[
|
|
214
|
+
str,
|
|
215
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
216
|
+
],
|
|
217
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
218
|
+
]
|
|
219
|
+
],
|
|
220
|
+
]
|
|
221
|
+
] = None,
|
|
222
|
+
pr: Optional[
|
|
223
|
+
Union[
|
|
224
|
+
Breakpoints[
|
|
225
|
+
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
226
|
+
],
|
|
227
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
228
|
+
Var[
|
|
229
|
+
Union[
|
|
230
|
+
Breakpoints[
|
|
231
|
+
str,
|
|
232
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
233
|
+
],
|
|
234
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
235
|
+
]
|
|
236
|
+
],
|
|
237
|
+
]
|
|
238
|
+
] = None,
|
|
239
|
+
pb: Optional[
|
|
240
|
+
Union[
|
|
241
|
+
Breakpoints[
|
|
242
|
+
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
243
|
+
],
|
|
244
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
245
|
+
Var[
|
|
246
|
+
Union[
|
|
247
|
+
Breakpoints[
|
|
248
|
+
str,
|
|
249
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
250
|
+
],
|
|
251
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
252
|
+
]
|
|
253
|
+
],
|
|
254
|
+
]
|
|
255
|
+
] = None,
|
|
256
|
+
pl: Optional[
|
|
257
|
+
Union[
|
|
258
|
+
Breakpoints[
|
|
259
|
+
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
260
|
+
],
|
|
261
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
262
|
+
Var[
|
|
263
|
+
Union[
|
|
264
|
+
Breakpoints[
|
|
265
|
+
str,
|
|
266
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
267
|
+
],
|
|
268
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
269
|
+
]
|
|
270
|
+
],
|
|
271
|
+
]
|
|
272
|
+
] = None,
|
|
273
|
+
style: Optional[Style] = None,
|
|
274
|
+
key: Optional[Any] = None,
|
|
275
|
+
id: Optional[Any] = None,
|
|
276
|
+
class_name: Optional[Any] = None,
|
|
277
|
+
autofocus: Optional[bool] = None,
|
|
278
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
279
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
280
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
281
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
282
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
283
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
284
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
285
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
286
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
287
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
288
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
289
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
290
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
291
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
292
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
293
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
294
|
+
**props,
|
|
295
|
+
) -> "CommonPaddingProps":
|
|
296
|
+
"""Create the component.
|
|
297
|
+
|
|
298
|
+
Args:
|
|
299
|
+
*children: The children of the component.
|
|
300
|
+
p: Padding: "0" - "9"
|
|
301
|
+
px: Padding horizontal: "0" - "9"
|
|
302
|
+
py: Padding vertical: "0" - "9"
|
|
303
|
+
pt: Padding top: "0" - "9"
|
|
304
|
+
pr: Padding right: "0" - "9"
|
|
305
|
+
pb: Padding bottom: "0" - "9"
|
|
306
|
+
pl: Padding left: "0" - "9"
|
|
307
|
+
style: The style of the component.
|
|
308
|
+
key: A unique key for the component.
|
|
309
|
+
id: The id for the component.
|
|
310
|
+
class_name: The class name for the component.
|
|
311
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
312
|
+
custom_attrs: custom attribute
|
|
313
|
+
**props: The props of the component.
|
|
314
|
+
|
|
315
|
+
Returns:
|
|
316
|
+
The component.
|
|
317
|
+
"""
|
|
318
|
+
...
|
|
319
|
+
|
|
147
320
|
class RadixLoadingProp(Component):
|
|
148
321
|
@overload
|
|
149
322
|
@classmethod
|
|
@@ -156,22 +329,22 @@ class RadixLoadingProp(Component):
|
|
|
156
329
|
id: Optional[Any] = None,
|
|
157
330
|
class_name: Optional[Any] = None,
|
|
158
331
|
autofocus: Optional[bool] = None,
|
|
159
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
160
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
161
|
-
on_click: Optional[EventType[[]]] = None,
|
|
162
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
163
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
164
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
165
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
166
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
167
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
168
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
169
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
170
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
171
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
172
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
173
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
174
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
332
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
333
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
334
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
335
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
336
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
337
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
338
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
339
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
340
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
341
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
342
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
343
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
344
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
345
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
346
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
347
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
175
348
|
**props,
|
|
176
349
|
) -> "RadixLoadingProp":
|
|
177
350
|
"""Create the component.
|
|
@@ -203,22 +376,22 @@ class RadixThemesComponent(Component):
|
|
|
203
376
|
id: Optional[Any] = None,
|
|
204
377
|
class_name: Optional[Any] = None,
|
|
205
378
|
autofocus: Optional[bool] = None,
|
|
206
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
207
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
208
|
-
on_click: Optional[EventType[[]]] = None,
|
|
209
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
210
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
211
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
212
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
213
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
214
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
215
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
216
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
217
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
218
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
219
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
220
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
221
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
379
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
380
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
381
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
382
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
383
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
384
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
385
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
386
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
387
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
388
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
389
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
390
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
391
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
392
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
393
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
394
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
222
395
|
**props,
|
|
223
396
|
) -> "RadixThemesComponent":
|
|
224
397
|
"""Create a new component instance.
|
|
@@ -252,22 +425,22 @@ class RadixThemesTriggerComponent(RadixThemesComponent):
|
|
|
252
425
|
id: Optional[Any] = None,
|
|
253
426
|
class_name: Optional[Any] = None,
|
|
254
427
|
autofocus: Optional[bool] = None,
|
|
255
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
256
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
257
|
-
on_click: Optional[EventType[[]]] = None,
|
|
258
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
259
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
260
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
261
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
262
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
263
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
264
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
265
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
266
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
267
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
268
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
269
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
270
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
428
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
429
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
430
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
431
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
432
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
433
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
434
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
435
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
436
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
437
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
438
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
439
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
440
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
441
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
442
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
443
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
271
444
|
**props,
|
|
272
445
|
) -> "RadixThemesTriggerComponent":
|
|
273
446
|
"""Create a new RadixThemesTriggerComponent instance.
|
|
@@ -384,22 +557,22 @@ class Theme(RadixThemesComponent):
|
|
|
384
557
|
id: Optional[Any] = None,
|
|
385
558
|
class_name: Optional[Any] = None,
|
|
386
559
|
autofocus: Optional[bool] = None,
|
|
387
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
388
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
389
|
-
on_click: Optional[EventType[[]]] = None,
|
|
390
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
391
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
392
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
393
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
394
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
395
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
396
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
397
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
398
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
399
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
400
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
401
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
402
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
560
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
561
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
562
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
563
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
564
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
565
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
566
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
567
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
568
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
569
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
570
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
571
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
572
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
573
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
574
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
575
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
403
576
|
**props,
|
|
404
577
|
) -> "Theme":
|
|
405
578
|
"""Create a new Radix Theme specification.
|
|
@@ -443,22 +616,22 @@ class ThemePanel(RadixThemesComponent):
|
|
|
443
616
|
id: Optional[Any] = None,
|
|
444
617
|
class_name: Optional[Any] = None,
|
|
445
618
|
autofocus: Optional[bool] = None,
|
|
446
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
447
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
448
|
-
on_click: Optional[EventType[[]]] = None,
|
|
449
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
450
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
451
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
452
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
453
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
454
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
455
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
456
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
457
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
458
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
459
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
460
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
461
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
619
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
620
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
621
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
622
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
623
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
624
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
625
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
626
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
627
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
628
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
629
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
630
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
631
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
632
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
633
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
634
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
462
635
|
**props,
|
|
463
636
|
) -> "ThemePanel":
|
|
464
637
|
"""Create a new component instance.
|
|
@@ -493,22 +666,22 @@ class RadixThemesColorModeProvider(Component):
|
|
|
493
666
|
id: Optional[Any] = None,
|
|
494
667
|
class_name: Optional[Any] = None,
|
|
495
668
|
autofocus: Optional[bool] = None,
|
|
496
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
497
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
498
|
-
on_click: Optional[EventType[[]]] = None,
|
|
499
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
500
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
501
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
502
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
503
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
504
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
505
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
506
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
507
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
508
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
509
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
510
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
511
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
669
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
670
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
671
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
672
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
673
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
674
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
675
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
676
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
677
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
678
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
679
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
680
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
681
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
682
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
683
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
684
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
512
685
|
**props,
|
|
513
686
|
) -> "RadixThemesColorModeProvider":
|
|
514
687
|
"""Create the component.
|
|
@@ -17,7 +17,7 @@ rx.text(
|
|
|
17
17
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
20
|
-
from typing import Dict, List, Literal, get_args
|
|
20
|
+
from typing import Dict, List, Literal, Optional, Union, get_args
|
|
21
21
|
|
|
22
22
|
from reflex.components.component import BaseComponent
|
|
23
23
|
from reflex.components.core.cond import Cond, color_mode_cond, cond
|
|
@@ -96,26 +96,31 @@ def _set_static_default(props, position, prop, default):
|
|
|
96
96
|
class ColorModeIconButton(IconButton):
|
|
97
97
|
"""Icon Button for toggling light / dark mode via toggle_color_mode."""
|
|
98
98
|
|
|
99
|
+
# The position of the icon button. Follow document flow if None.
|
|
100
|
+
position: Optional[Union[LiteralPosition, Var[LiteralPosition]]] = None
|
|
101
|
+
|
|
102
|
+
# Allow picking the "system" value for the color mode.
|
|
103
|
+
allow_system: bool = False
|
|
104
|
+
|
|
99
105
|
@classmethod
|
|
100
106
|
def create(
|
|
101
107
|
cls,
|
|
102
|
-
position: LiteralPosition | None = None,
|
|
103
|
-
allow_system: bool = False,
|
|
104
108
|
**props,
|
|
105
109
|
):
|
|
106
|
-
"""Create
|
|
110
|
+
"""Create an icon button component that calls toggle_color_mode on click.
|
|
107
111
|
|
|
108
112
|
Args:
|
|
109
|
-
position: The position of the icon button. Follow document flow if None.
|
|
110
|
-
allow_system: Allow picking the "system" value for the color mode.
|
|
111
113
|
**props: The props to pass to the component.
|
|
112
114
|
|
|
113
115
|
Returns:
|
|
114
116
|
The button component.
|
|
115
117
|
"""
|
|
118
|
+
position = props.pop("position", None)
|
|
119
|
+
allow_system = props.pop("allow_system", False)
|
|
120
|
+
|
|
116
121
|
# position is used to set nice defaults for positioning the icon button
|
|
117
122
|
if isinstance(position, Var):
|
|
118
|
-
_set_var_default(props, position, "position", "fixed", position)
|
|
123
|
+
_set_var_default(props, position, "position", "fixed", position) # type: ignore
|
|
119
124
|
_set_var_default(props, position, "bottom", "2rem")
|
|
120
125
|
_set_var_default(props, position, "top", "2rem")
|
|
121
126
|
_set_var_default(props, position, "left", "2rem")
|
|
@@ -155,12 +160,15 @@ class ColorModeIconButton(IconButton):
|
|
|
155
160
|
color_mode_item("system"),
|
|
156
161
|
),
|
|
157
162
|
)
|
|
158
|
-
return
|
|
163
|
+
return IconButton.create(
|
|
159
164
|
ColorModeIcon.create(),
|
|
160
165
|
on_click=toggle_color_mode,
|
|
161
166
|
**props,
|
|
162
167
|
)
|
|
163
168
|
|
|
169
|
+
def _exclude_props(self) -> list[str]:
|
|
170
|
+
return ["position", "allow_system"]
|
|
171
|
+
|
|
164
172
|
|
|
165
173
|
class ColorModeSwitch(Switch):
|
|
166
174
|
"""Switch for toggling light / dark mode via toggle_color_mode."""
|
|
@@ -195,5 +203,5 @@ class ColorModeNamespace(Var):
|
|
|
195
203
|
color_mode = color_mode_var_and_namespace = ColorModeNamespace(
|
|
196
204
|
_js_expr=color_mode._js_expr,
|
|
197
205
|
_var_type=color_mode._var_type,
|
|
198
|
-
_var_data=color_mode.
|
|
206
|
+
_var_data=color_mode._get_default_value(),
|
|
199
207
|
)
|