instaui 0.1.5__py3-none-any.whl → 0.1.6__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.
- instaui/arco/__init__.py +191 -0
- instaui/arco/_settings.py +25 -0
- instaui/arco/_use_tools/locale.py +50 -0
- instaui/arco/component_types.py +1019 -0
- instaui/arco/components/_utils.py +22 -0
- instaui/arco/components/affix.py +29 -0
- instaui/arco/components/alert.py +42 -0
- instaui/arco/components/anchor.py +42 -0
- instaui/arco/components/auto_complete.py +96 -0
- instaui/arco/components/avatar.py +55 -0
- instaui/arco/components/back_top.py +14 -0
- instaui/arco/components/badge.py +14 -0
- instaui/arco/components/breadcrumb.py +14 -0
- instaui/arco/components/button.py +43 -0
- instaui/arco/components/calendar.py +47 -0
- instaui/arco/components/card.py +14 -0
- instaui/arco/components/carousel.py +33 -0
- instaui/arco/components/cascader.py +111 -0
- instaui/arco/components/checkbox.py +32 -0
- instaui/arco/components/collapse.py +31 -0
- instaui/arco/components/color_picker.py +45 -0
- instaui/arco/components/comment.py +14 -0
- instaui/arco/components/config_provider.py +13 -0
- instaui/arco/components/date_picker.py +111 -0
- instaui/arco/components/descriptions.py +14 -0
- instaui/arco/components/divider.py +13 -0
- instaui/arco/components/drawer.py +98 -0
- instaui/arco/components/dropdown.py +45 -0
- instaui/arco/components/empty.py +14 -0
- instaui/arco/components/form.py +55 -0
- instaui/arco/components/icon.py +17 -0
- instaui/arco/components/image.py +33 -0
- instaui/arco/components/input.py +102 -0
- instaui/arco/components/input_number.py +97 -0
- instaui/arco/components/input_password.py +38 -0
- instaui/arco/components/input_search.py +37 -0
- instaui/arco/components/input_tag.py +110 -0
- instaui/arco/components/layout.py +13 -0
- instaui/arco/components/layout_content.py +6 -0
- instaui/arco/components/layout_footer.py +6 -0
- instaui/arco/components/layout_header.py +6 -0
- instaui/arco/components/layout_sider.py +53 -0
- instaui/arco/components/link.py +36 -0
- instaui/arco/components/list.py +68 -0
- instaui/arco/components/mention.py +97 -0
- instaui/arco/components/menu.py +88 -0
- instaui/arco/components/modal.py +97 -0
- instaui/arco/components/overflow_list.py +29 -0
- instaui/arco/components/page_header.py +29 -0
- instaui/arco/components/pagination.py +45 -0
- instaui/arco/components/pop_confirm.py +58 -0
- instaui/arco/components/popover.py +32 -0
- instaui/arco/components/progress.py +14 -0
- instaui/arco/components/radio.py +40 -0
- instaui/arco/components/radio_group.py +42 -0
- instaui/arco/components/rate.py +45 -0
- instaui/arco/components/resize_box.py +62 -0
- instaui/arco/components/result.py +14 -0
- instaui/arco/components/select.py +179 -0
- instaui/arco/components/skeleton.py +14 -0
- instaui/arco/components/slider.py +38 -0
- instaui/arco/components/space.py +14 -0
- instaui/arco/components/spin.py +14 -0
- instaui/arco/components/split.py +76 -0
- instaui/arco/components/statistic.py +14 -0
- instaui/arco/components/steps.py +32 -0
- instaui/arco/components/switch.py +57 -0
- instaui/arco/components/tab_pane.py +12 -0
- instaui/arco/components/table.py +276 -0
- instaui/arco/components/tabs.py +101 -0
- instaui/arco/components/tag.py +42 -0
- instaui/arco/components/textarea.py +84 -0
- instaui/arco/components/time_picker.py +76 -0
- instaui/arco/components/timeline.py +14 -0
- instaui/arco/components/tooltip.py +29 -0
- instaui/arco/components/transfer.py +58 -0
- instaui/arco/components/tree.py +120 -0
- instaui/arco/components/tree_select.py +86 -0
- instaui/arco/components/trigger.py +58 -0
- instaui/arco/components/typography.py +142 -0
- instaui/arco/components/upload.py +71 -0
- instaui/arco/components/verification_code.py +58 -0
- instaui/arco/components/watermark.py +14 -0
- instaui/arco/locales/__init__.py +4 -0
- instaui/arco/locales/_index.py +31 -0
- instaui/arco/locales/en_us.py +227 -0
- instaui/arco/locales/zh_cn.py +224 -0
- instaui/arco/setup.py +36 -0
- instaui/arco/static/instaui-arco.css +1 -0
- instaui/arco/static/instaui-arco.js +55771 -0
- instaui/arco/types.py +24 -0
- instaui/components/column.py +10 -2
- instaui/components/element.py +0 -2
- instaui/components/grid.py +81 -0
- instaui/components/markdown/static/github-markdown.css +1 -1
- instaui/components/row.py +8 -7
- instaui/components/shiki_code/static/shiki-style.css +179 -175
- instaui/experimental/link_sql/__init__.py +3 -0
- instaui/experimental/link_sql/_base.py +23 -0
- instaui/experimental/link_sql/_duckdb.py +221 -0
- instaui/experimental/link_sql/_types.py +15 -0
- instaui/experimental/link_sql/data_source.js +50 -0
- instaui/fastapi_server/debug_mode_router.py +1 -1
- instaui/html_tools.py +2 -3
- instaui/runtime/scope.py +28 -7
- instaui/static/insta-ui.css +1 -1
- instaui/static/insta-ui.esm-browser.prod.js +3663 -3719
- instaui/static/insta-ui.js.map +1 -1
- instaui/static/templates/debug/sse.html +1 -1
- instaui/tailwind/_index.py +2 -2
- instaui/ui_functions/ui_page.py +1 -1
- instaui/vars/data.py +7 -7
- instaui/vars/element_ref.py +2 -4
- instaui/vars/js_computed.py +6 -8
- instaui/vars/ref.py +6 -6
- instaui/vars/vue_computed.py +6 -7
- instaui/vars/web_computed.py +2 -3
- instaui/watch/vue_watch.py +23 -7
- instaui/zero/scope.py +3 -20
- {instaui-0.1.5.dist-info → instaui-0.1.6.dist-info}/METADATA +5 -4
- {instaui-0.1.5.dist-info → instaui-0.1.6.dist-info}/RECORD +123 -36
- instaui/daisyui/__init__.py +0 -26
- instaui/daisyui/_index.py +0 -20
- instaui/daisyui/button.py +0 -38
- instaui/daisyui/checkbox.py +0 -17
- instaui/daisyui/static/daisyui.css +0 -1
- instaui/daisyui/static/themes.css +0 -1
- instaui/daisyui/table.py +0 -35
- instaui/ui/__build_init.py +0 -73
- instaui/vars/_utils.py +0 -12
- {instaui-0.1.5.dist-info → instaui-0.1.6.dist-info}/LICENSE +0 -0
- {instaui-0.1.5.dist-info → instaui-0.1.6.dist-info}/WHEEL +0 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
from typing_extensions import Unpack
|
2
|
+
from instaui.components.element import Element
|
3
|
+
from instaui.arco import component_types
|
4
|
+
from ._utils import handle_props
|
5
|
+
|
6
|
+
|
7
|
+
class Statistic(Element):
|
8
|
+
def __init__(
|
9
|
+
self,
|
10
|
+
**kwargs: Unpack[component_types.TStatistic],
|
11
|
+
):
|
12
|
+
super().__init__("a-statistic")
|
13
|
+
|
14
|
+
self.props(handle_props(kwargs)) # type: ignore
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import typing
|
2
|
+
from typing_extensions import Unpack
|
3
|
+
from instaui.components.element import Element
|
4
|
+
from instaui.vars.types import TMaybeRef
|
5
|
+
from instaui.arco import component_types
|
6
|
+
from instaui.event.event_mixin import EventMixin
|
7
|
+
from ._utils import handle_props, try_setup_vmodel
|
8
|
+
|
9
|
+
|
10
|
+
class Steps(Element):
|
11
|
+
def __init__(
|
12
|
+
self,
|
13
|
+
current_value: typing.Optional[TMaybeRef[int]] = None,
|
14
|
+
**kwargs: Unpack[component_types.TSteps],
|
15
|
+
):
|
16
|
+
super().__init__("a-steps")
|
17
|
+
|
18
|
+
try_setup_vmodel(self, current_value, prop_name="current")
|
19
|
+
self.props(handle_props(kwargs)) # type: ignore
|
20
|
+
|
21
|
+
def on_change(
|
22
|
+
self,
|
23
|
+
handler: EventMixin,
|
24
|
+
*,
|
25
|
+
extends: typing.Optional[typing.List] = None,
|
26
|
+
):
|
27
|
+
self.on(
|
28
|
+
"change",
|
29
|
+
handler,
|
30
|
+
extends=extends,
|
31
|
+
)
|
32
|
+
return self
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import typing
|
2
|
+
from typing_extensions import Unpack
|
3
|
+
from instaui.components.element import Element
|
4
|
+
from instaui.vars.types import TMaybeRef
|
5
|
+
from instaui.arco import component_types
|
6
|
+
from instaui.event.event_mixin import EventMixin
|
7
|
+
from ._utils import handle_props, try_setup_vmodel
|
8
|
+
|
9
|
+
|
10
|
+
class Switch(Element):
|
11
|
+
def __init__(
|
12
|
+
self,
|
13
|
+
value: typing.Optional[TMaybeRef[typing.Union[bool, str, int, float]]] = None,
|
14
|
+
**kwargs: Unpack[component_types.TInput],
|
15
|
+
):
|
16
|
+
super().__init__("a-switch")
|
17
|
+
try_setup_vmodel(self, value)
|
18
|
+
self.props(handle_props(kwargs)) # type: ignore
|
19
|
+
|
20
|
+
def on_change(
|
21
|
+
self,
|
22
|
+
handler: EventMixin,
|
23
|
+
*,
|
24
|
+
extends: typing.Optional[typing.List] = None,
|
25
|
+
):
|
26
|
+
self.on(
|
27
|
+
"change",
|
28
|
+
handler,
|
29
|
+
extends=extends,
|
30
|
+
)
|
31
|
+
return self
|
32
|
+
|
33
|
+
def on_focus(
|
34
|
+
self,
|
35
|
+
handler: EventMixin,
|
36
|
+
*,
|
37
|
+
extends: typing.Optional[typing.List] = None,
|
38
|
+
):
|
39
|
+
self.on(
|
40
|
+
"focus",
|
41
|
+
handler,
|
42
|
+
extends=extends,
|
43
|
+
)
|
44
|
+
return self
|
45
|
+
|
46
|
+
def on_blur(
|
47
|
+
self,
|
48
|
+
handler: EventMixin,
|
49
|
+
*,
|
50
|
+
extends: typing.Optional[typing.List] = None,
|
51
|
+
):
|
52
|
+
self.on(
|
53
|
+
"blur",
|
54
|
+
handler,
|
55
|
+
extends=extends,
|
56
|
+
)
|
57
|
+
return self
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import typing
|
2
|
+
from instaui.vars.types import TMaybeRef
|
3
|
+
from instaui.components.element import Element
|
4
|
+
|
5
|
+
|
6
|
+
class TabPane(Element):
|
7
|
+
def __init__(self, *, key: str, title: typing.Optional[TMaybeRef[str]] = None):
|
8
|
+
super().__init__("a-tab-pane")
|
9
|
+
|
10
|
+
self.key(key)
|
11
|
+
if title is not None:
|
12
|
+
self.props({"title": title})
|
@@ -0,0 +1,276 @@
|
|
1
|
+
import typing
|
2
|
+
from typing_extensions import Unpack
|
3
|
+
from instaui.components.element import Element
|
4
|
+
from instaui.arco import component_types
|
5
|
+
from instaui.event.event_mixin import EventMixin
|
6
|
+
from ._utils import handle_props
|
7
|
+
|
8
|
+
|
9
|
+
class Table(Element):
|
10
|
+
def __init__(
|
11
|
+
self,
|
12
|
+
**kwargs: Unpack[component_types.TTable],
|
13
|
+
):
|
14
|
+
super().__init__("a-table")
|
15
|
+
|
16
|
+
self.props(handle_props(kwargs)) # type: ignore
|
17
|
+
|
18
|
+
def on_expand(
|
19
|
+
self,
|
20
|
+
handler: EventMixin,
|
21
|
+
*,
|
22
|
+
extends: typing.Optional[typing.List] = None,
|
23
|
+
):
|
24
|
+
self.on(
|
25
|
+
"expand",
|
26
|
+
handler,
|
27
|
+
extends=extends,
|
28
|
+
)
|
29
|
+
return self
|
30
|
+
|
31
|
+
def on_expanded_change(
|
32
|
+
self,
|
33
|
+
handler: EventMixin,
|
34
|
+
*,
|
35
|
+
extends: typing.Optional[typing.List] = None,
|
36
|
+
):
|
37
|
+
self.on(
|
38
|
+
"expanded-change",
|
39
|
+
handler,
|
40
|
+
extends=extends,
|
41
|
+
)
|
42
|
+
return self
|
43
|
+
|
44
|
+
def on_select(
|
45
|
+
self,
|
46
|
+
handler: EventMixin,
|
47
|
+
*,
|
48
|
+
extends: typing.Optional[typing.List] = None,
|
49
|
+
):
|
50
|
+
self.on(
|
51
|
+
"select",
|
52
|
+
handler,
|
53
|
+
extends=extends,
|
54
|
+
)
|
55
|
+
return self
|
56
|
+
|
57
|
+
def on_select_all(
|
58
|
+
self,
|
59
|
+
handler: EventMixin,
|
60
|
+
*,
|
61
|
+
extends: typing.Optional[typing.List] = None,
|
62
|
+
):
|
63
|
+
self.on(
|
64
|
+
"select-all",
|
65
|
+
handler,
|
66
|
+
extends=extends,
|
67
|
+
)
|
68
|
+
return self
|
69
|
+
|
70
|
+
def on_selection_change(
|
71
|
+
self,
|
72
|
+
handler: EventMixin,
|
73
|
+
*,
|
74
|
+
extends: typing.Optional[typing.List] = None,
|
75
|
+
):
|
76
|
+
self.on(
|
77
|
+
"selection-change",
|
78
|
+
handler,
|
79
|
+
extends=extends,
|
80
|
+
)
|
81
|
+
return self
|
82
|
+
|
83
|
+
def on_sorter_change(
|
84
|
+
self,
|
85
|
+
handler: EventMixin,
|
86
|
+
*,
|
87
|
+
extends: typing.Optional[typing.List] = None,
|
88
|
+
):
|
89
|
+
self.on(
|
90
|
+
"sorter-change",
|
91
|
+
handler,
|
92
|
+
extends=extends,
|
93
|
+
)
|
94
|
+
return self
|
95
|
+
|
96
|
+
def on_filter_change(
|
97
|
+
self,
|
98
|
+
handler: EventMixin,
|
99
|
+
*,
|
100
|
+
extends: typing.Optional[typing.List] = None,
|
101
|
+
):
|
102
|
+
self.on(
|
103
|
+
"filter-change",
|
104
|
+
handler,
|
105
|
+
extends=extends,
|
106
|
+
)
|
107
|
+
return self
|
108
|
+
|
109
|
+
def on_page_change(
|
110
|
+
self,
|
111
|
+
handler: EventMixin,
|
112
|
+
*,
|
113
|
+
extends: typing.Optional[typing.List] = None,
|
114
|
+
):
|
115
|
+
self.on(
|
116
|
+
"page-change",
|
117
|
+
handler,
|
118
|
+
extends=extends,
|
119
|
+
)
|
120
|
+
return self
|
121
|
+
|
122
|
+
def on_page_size_change(
|
123
|
+
self,
|
124
|
+
handler: EventMixin,
|
125
|
+
*,
|
126
|
+
extends: typing.Optional[typing.List] = None,
|
127
|
+
):
|
128
|
+
self.on(
|
129
|
+
"page-size-change",
|
130
|
+
handler,
|
131
|
+
extends=extends,
|
132
|
+
)
|
133
|
+
return self
|
134
|
+
|
135
|
+
def on_change(
|
136
|
+
self,
|
137
|
+
handler: EventMixin,
|
138
|
+
*,
|
139
|
+
extends: typing.Optional[typing.List] = None,
|
140
|
+
):
|
141
|
+
self.on(
|
142
|
+
"change",
|
143
|
+
handler,
|
144
|
+
extends=extends,
|
145
|
+
)
|
146
|
+
return self
|
147
|
+
|
148
|
+
def on_cell_mouse_enter(
|
149
|
+
self,
|
150
|
+
handler: EventMixin,
|
151
|
+
*,
|
152
|
+
extends: typing.Optional[typing.List] = None,
|
153
|
+
):
|
154
|
+
self.on(
|
155
|
+
"cell-mouse-enter",
|
156
|
+
handler,
|
157
|
+
extends=extends,
|
158
|
+
)
|
159
|
+
return self
|
160
|
+
|
161
|
+
def on_cell_mouse_leave(
|
162
|
+
self,
|
163
|
+
handler: EventMixin,
|
164
|
+
*,
|
165
|
+
extends: typing.Optional[typing.List] = None,
|
166
|
+
):
|
167
|
+
self.on(
|
168
|
+
"cell-mouse-leave",
|
169
|
+
handler,
|
170
|
+
extends=extends,
|
171
|
+
)
|
172
|
+
return self
|
173
|
+
|
174
|
+
def on_cell_click(
|
175
|
+
self,
|
176
|
+
handler: EventMixin,
|
177
|
+
*,
|
178
|
+
extends: typing.Optional[typing.List] = None,
|
179
|
+
):
|
180
|
+
self.on(
|
181
|
+
"cell-click",
|
182
|
+
handler,
|
183
|
+
extends=extends,
|
184
|
+
)
|
185
|
+
return self
|
186
|
+
|
187
|
+
def on_row_click(
|
188
|
+
self,
|
189
|
+
handler: EventMixin,
|
190
|
+
*,
|
191
|
+
extends: typing.Optional[typing.List] = None,
|
192
|
+
):
|
193
|
+
self.on(
|
194
|
+
"row-click",
|
195
|
+
handler,
|
196
|
+
extends=extends,
|
197
|
+
)
|
198
|
+
return self
|
199
|
+
|
200
|
+
def on_header_click(
|
201
|
+
self,
|
202
|
+
handler: EventMixin,
|
203
|
+
*,
|
204
|
+
extends: typing.Optional[typing.List] = None,
|
205
|
+
):
|
206
|
+
self.on(
|
207
|
+
"header-click",
|
208
|
+
handler,
|
209
|
+
extends=extends,
|
210
|
+
)
|
211
|
+
return self
|
212
|
+
|
213
|
+
def on_column_resize(
|
214
|
+
self,
|
215
|
+
handler: EventMixin,
|
216
|
+
*,
|
217
|
+
extends: typing.Optional[typing.List] = None,
|
218
|
+
):
|
219
|
+
self.on(
|
220
|
+
"column-resize",
|
221
|
+
handler,
|
222
|
+
extends=extends,
|
223
|
+
)
|
224
|
+
return self
|
225
|
+
|
226
|
+
def on_row_dblclick(
|
227
|
+
self,
|
228
|
+
handler: EventMixin,
|
229
|
+
*,
|
230
|
+
extends: typing.Optional[typing.List] = None,
|
231
|
+
):
|
232
|
+
self.on(
|
233
|
+
"row-dblclick",
|
234
|
+
handler,
|
235
|
+
extends=extends,
|
236
|
+
)
|
237
|
+
return self
|
238
|
+
|
239
|
+
def on_cell_dblclick(
|
240
|
+
self,
|
241
|
+
handler: EventMixin,
|
242
|
+
*,
|
243
|
+
extends: typing.Optional[typing.List] = None,
|
244
|
+
):
|
245
|
+
self.on(
|
246
|
+
"cell-dblclick",
|
247
|
+
handler,
|
248
|
+
extends=extends,
|
249
|
+
)
|
250
|
+
return self
|
251
|
+
|
252
|
+
def on_row_contextmenu(
|
253
|
+
self,
|
254
|
+
handler: EventMixin,
|
255
|
+
*,
|
256
|
+
extends: typing.Optional[typing.List] = None,
|
257
|
+
):
|
258
|
+
self.on(
|
259
|
+
"row-contextmenu",
|
260
|
+
handler,
|
261
|
+
extends=extends,
|
262
|
+
)
|
263
|
+
return self
|
264
|
+
|
265
|
+
def on_cell_contextmenu(
|
266
|
+
self,
|
267
|
+
handler: EventMixin,
|
268
|
+
*,
|
269
|
+
extends: typing.Optional[typing.List] = None,
|
270
|
+
):
|
271
|
+
self.on(
|
272
|
+
"cell-contextmenu",
|
273
|
+
handler,
|
274
|
+
extends=extends,
|
275
|
+
)
|
276
|
+
return self
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import typing
|
2
|
+
from typing_extensions import Unpack
|
3
|
+
from instaui.components.element import Element
|
4
|
+
from instaui.vars.types import TMaybeRef
|
5
|
+
from instaui.arco import component_types
|
6
|
+
from instaui.event.event_mixin import EventMixin
|
7
|
+
from ._utils import handle_props
|
8
|
+
from .tab_pane import TabPane
|
9
|
+
|
10
|
+
|
11
|
+
class Tabs(Element):
|
12
|
+
def __init__(
|
13
|
+
self,
|
14
|
+
active_key: typing.Optional[TMaybeRef[typing.Union[str, int]]] = None,
|
15
|
+
*,
|
16
|
+
active_key_model_value: typing.Optional[typing.Union[str, int]] = None,
|
17
|
+
**kwargs: Unpack[component_types.TTabs],
|
18
|
+
):
|
19
|
+
"""Tabs element.
|
20
|
+
|
21
|
+
Example:
|
22
|
+
.. code-block:: python
|
23
|
+
with arco.tabs() as tabs:
|
24
|
+
with tabs.add_pane(key="1", title="Tab 1"):
|
25
|
+
html.paragraph("tab 1")
|
26
|
+
with tabs.add_pane(key="2", title="Tab 2"):
|
27
|
+
html.paragraph("tab 2")
|
28
|
+
with tabs.add_pane(key="3", title="Tab 3"):
|
29
|
+
html.paragraph("tab 3")
|
30
|
+
|
31
|
+
"""
|
32
|
+
super().__init__("a-tabs")
|
33
|
+
self.props(handle_props(kwargs)) # type: ignore
|
34
|
+
|
35
|
+
if active_key is not None:
|
36
|
+
self.vmodel(active_key, prop_name="active-key")
|
37
|
+
|
38
|
+
if active_key_model_value is not None:
|
39
|
+
self.props({"active-key": active_key_model_value})
|
40
|
+
|
41
|
+
def add_pane(self, *, key: str, title: str):
|
42
|
+
"""Add a new pane to the tabs.
|
43
|
+
|
44
|
+
Args:
|
45
|
+
key (str): key of the pane.
|
46
|
+
title (str): title of the pane.
|
47
|
+
|
48
|
+
"""
|
49
|
+
return TabPane(key=key, title=title)
|
50
|
+
|
51
|
+
def on_change(
|
52
|
+
self,
|
53
|
+
handler: EventMixin,
|
54
|
+
*,
|
55
|
+
extends: typing.Optional[typing.List] = None,
|
56
|
+
):
|
57
|
+
self.on(
|
58
|
+
"change",
|
59
|
+
handler,
|
60
|
+
extends=extends,
|
61
|
+
)
|
62
|
+
return self
|
63
|
+
|
64
|
+
def on_tab_click(
|
65
|
+
self,
|
66
|
+
handler: EventMixin,
|
67
|
+
*,
|
68
|
+
extends: typing.Optional[typing.List] = None,
|
69
|
+
):
|
70
|
+
self.on(
|
71
|
+
"tab-click",
|
72
|
+
handler,
|
73
|
+
extends=extends,
|
74
|
+
)
|
75
|
+
return self
|
76
|
+
|
77
|
+
def on_add(
|
78
|
+
self,
|
79
|
+
handler: EventMixin,
|
80
|
+
*,
|
81
|
+
extends: typing.Optional[typing.List] = None,
|
82
|
+
):
|
83
|
+
self.on(
|
84
|
+
"add",
|
85
|
+
handler,
|
86
|
+
extends=extends,
|
87
|
+
)
|
88
|
+
return self
|
89
|
+
|
90
|
+
def on_delete(
|
91
|
+
self,
|
92
|
+
handler: EventMixin,
|
93
|
+
*,
|
94
|
+
extends: typing.Optional[typing.List] = None,
|
95
|
+
):
|
96
|
+
self.on(
|
97
|
+
"delete",
|
98
|
+
handler,
|
99
|
+
extends=extends,
|
100
|
+
)
|
101
|
+
return self
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import typing
|
2
|
+
from typing_extensions import Unpack
|
3
|
+
from instaui.components.element import Element
|
4
|
+
from instaui.arco import component_types
|
5
|
+
from instaui.event.event_mixin import EventMixin
|
6
|
+
from ._utils import handle_props
|
7
|
+
|
8
|
+
|
9
|
+
class Tag(Element):
|
10
|
+
def __init__(
|
11
|
+
self,
|
12
|
+
**kwargs: Unpack[component_types.TTag],
|
13
|
+
):
|
14
|
+
super().__init__("a-tag")
|
15
|
+
|
16
|
+
self.props(handle_props(kwargs)) # type: ignore
|
17
|
+
|
18
|
+
def on_close(
|
19
|
+
self,
|
20
|
+
handler: EventMixin,
|
21
|
+
*,
|
22
|
+
extends: typing.Optional[typing.List] = None,
|
23
|
+
):
|
24
|
+
self.on(
|
25
|
+
"close",
|
26
|
+
handler,
|
27
|
+
extends=extends,
|
28
|
+
)
|
29
|
+
return self
|
30
|
+
|
31
|
+
def on_check(
|
32
|
+
self,
|
33
|
+
handler: EventMixin,
|
34
|
+
*,
|
35
|
+
extends: typing.Optional[typing.List] = None,
|
36
|
+
):
|
37
|
+
self.on(
|
38
|
+
"check",
|
39
|
+
handler,
|
40
|
+
extends=extends,
|
41
|
+
)
|
42
|
+
return self
|
@@ -0,0 +1,84 @@
|
|
1
|
+
import typing
|
2
|
+
from typing_extensions import Unpack
|
3
|
+
from instaui.components.element import Element
|
4
|
+
from instaui.vars.types import TMaybeRef
|
5
|
+
from instaui.arco import component_types
|
6
|
+
from instaui.event.event_mixin import EventMixin
|
7
|
+
from ._utils import handle_props, try_setup_vmodel
|
8
|
+
|
9
|
+
|
10
|
+
class Textarea(Element):
|
11
|
+
def __init__(
|
12
|
+
self,
|
13
|
+
value: typing.Optional[TMaybeRef[str]] = None,
|
14
|
+
**kwargs: Unpack[component_types.TTextarea],
|
15
|
+
):
|
16
|
+
super().__init__("a-textarea")
|
17
|
+
|
18
|
+
try_setup_vmodel(self, value)
|
19
|
+
self.props(handle_props(kwargs)) # type: ignore
|
20
|
+
|
21
|
+
def on_input(
|
22
|
+
self,
|
23
|
+
handler: EventMixin,
|
24
|
+
*,
|
25
|
+
extends: typing.Optional[typing.List] = None,
|
26
|
+
):
|
27
|
+
self.on(
|
28
|
+
"input",
|
29
|
+
handler,
|
30
|
+
extends=extends,
|
31
|
+
)
|
32
|
+
return self
|
33
|
+
|
34
|
+
def on_change(
|
35
|
+
self,
|
36
|
+
handler: EventMixin,
|
37
|
+
*,
|
38
|
+
extends: typing.Optional[typing.List] = None,
|
39
|
+
):
|
40
|
+
self.on(
|
41
|
+
"change",
|
42
|
+
handler,
|
43
|
+
extends=extends,
|
44
|
+
)
|
45
|
+
return self
|
46
|
+
|
47
|
+
def on_clear(
|
48
|
+
self,
|
49
|
+
handler: EventMixin,
|
50
|
+
*,
|
51
|
+
extends: typing.Optional[typing.List] = None,
|
52
|
+
):
|
53
|
+
self.on(
|
54
|
+
"clear",
|
55
|
+
handler,
|
56
|
+
extends=extends,
|
57
|
+
)
|
58
|
+
return self
|
59
|
+
|
60
|
+
def on_focus(
|
61
|
+
self,
|
62
|
+
handler: EventMixin,
|
63
|
+
*,
|
64
|
+
extends: typing.Optional[typing.List] = None,
|
65
|
+
):
|
66
|
+
self.on(
|
67
|
+
"focus",
|
68
|
+
handler,
|
69
|
+
extends=extends,
|
70
|
+
)
|
71
|
+
return self
|
72
|
+
|
73
|
+
def on_blur(
|
74
|
+
self,
|
75
|
+
handler: EventMixin,
|
76
|
+
*,
|
77
|
+
extends: typing.Optional[typing.List] = None,
|
78
|
+
):
|
79
|
+
self.on(
|
80
|
+
"blur",
|
81
|
+
handler,
|
82
|
+
extends=extends,
|
83
|
+
)
|
84
|
+
return self
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import typing
|
2
|
+
from typing_extensions import Unpack
|
3
|
+
from datetime import time
|
4
|
+
from instaui.components.element import Element
|
5
|
+
from instaui.vars.types import TMaybeRef
|
6
|
+
from instaui.arco import component_types
|
7
|
+
from instaui.event.event_mixin import EventMixin
|
8
|
+
from ._utils import handle_props, try_setup_vmodel
|
9
|
+
|
10
|
+
_TTimePickerValue = typing.Union[
|
11
|
+
str, int, time, typing.List[typing.Union[str, int, time]]
|
12
|
+
]
|
13
|
+
|
14
|
+
|
15
|
+
class TimePicker(Element):
|
16
|
+
def __init__(
|
17
|
+
self,
|
18
|
+
value: typing.Optional[TMaybeRef[_TTimePickerValue]] = None,
|
19
|
+
**kwargs: Unpack[component_types.TTimepicker],
|
20
|
+
):
|
21
|
+
super().__init__("a-time-picker")
|
22
|
+
|
23
|
+
try_setup_vmodel(self, value)
|
24
|
+
self.props(handle_props(kwargs)) # type: ignore
|
25
|
+
|
26
|
+
def on_change(
|
27
|
+
self,
|
28
|
+
handler: EventMixin,
|
29
|
+
*,
|
30
|
+
extends: typing.Optional[typing.List] = None,
|
31
|
+
):
|
32
|
+
self.on(
|
33
|
+
"change",
|
34
|
+
handler,
|
35
|
+
extends=extends,
|
36
|
+
)
|
37
|
+
return self
|
38
|
+
|
39
|
+
def on_select(
|
40
|
+
self,
|
41
|
+
handler: EventMixin,
|
42
|
+
*,
|
43
|
+
extends: typing.Optional[typing.List] = None,
|
44
|
+
):
|
45
|
+
self.on(
|
46
|
+
"select",
|
47
|
+
handler,
|
48
|
+
extends=extends,
|
49
|
+
)
|
50
|
+
return self
|
51
|
+
|
52
|
+
def on_clear(
|
53
|
+
self,
|
54
|
+
handler: EventMixin,
|
55
|
+
*,
|
56
|
+
extends: typing.Optional[typing.List] = None,
|
57
|
+
):
|
58
|
+
self.on(
|
59
|
+
"clear",
|
60
|
+
handler,
|
61
|
+
extends=extends,
|
62
|
+
)
|
63
|
+
return self
|
64
|
+
|
65
|
+
def on_popup_visible_change(
|
66
|
+
self,
|
67
|
+
handler: EventMixin,
|
68
|
+
*,
|
69
|
+
extends: typing.Optional[typing.List] = None,
|
70
|
+
):
|
71
|
+
self.on(
|
72
|
+
"popup-visible-change",
|
73
|
+
handler,
|
74
|
+
extends=extends,
|
75
|
+
)
|
76
|
+
return self
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from typing_extensions import Unpack
|
2
|
+
from instaui.components.element import Element
|
3
|
+
from instaui.arco import component_types
|
4
|
+
from ._utils import handle_props
|
5
|
+
|
6
|
+
|
7
|
+
class Timeline(Element):
|
8
|
+
def __init__(
|
9
|
+
self,
|
10
|
+
**kwargs: Unpack[component_types.TTimeline],
|
11
|
+
):
|
12
|
+
super().__init__("a-timeline")
|
13
|
+
|
14
|
+
self.props(handle_props(kwargs)) # type: ignore
|