instaui 0.1.5__py3-none-any.whl → 0.1.7__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.7.dist-info}/METADATA +8 -5
- {instaui-0.1.5.dist-info → instaui-0.1.7.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.7.dist-info}/LICENSE +0 -0
- {instaui-0.1.5.dist-info → instaui-0.1.7.dist-info}/WHEEL +0 -0
@@ -0,0 +1,227 @@
|
|
1
|
+
locale = {
|
2
|
+
"locale": "en-US",
|
3
|
+
"empty": {"description": "No Data"},
|
4
|
+
"drawer": {"okText": "Ok", "cancelText": "Cancel"},
|
5
|
+
"popconfirm": {"okText": "Ok", "cancelText": "Cancel"},
|
6
|
+
"modal": {"okText": "Ok", "cancelText": "Cancel"},
|
7
|
+
"pagination": {
|
8
|
+
"goto": "Goto",
|
9
|
+
"page": "Page",
|
10
|
+
"countPerPage": " / Page",
|
11
|
+
"total": "Total: {0}",
|
12
|
+
},
|
13
|
+
"table": {"okText": "Ok", "resetText": "Reset"},
|
14
|
+
"upload": {
|
15
|
+
"start": "Start",
|
16
|
+
"cancel": "Cancel",
|
17
|
+
"delete": "Delete",
|
18
|
+
"retry": "Click to retry",
|
19
|
+
"buttonText": "Upload",
|
20
|
+
"preview": "Preview",
|
21
|
+
"drag": "Click or drag file to this area to upload",
|
22
|
+
"dragHover": "Release to upload",
|
23
|
+
"error": "Upload Error",
|
24
|
+
},
|
25
|
+
"calendar": {
|
26
|
+
"formatYear": "YYYY",
|
27
|
+
"formatMonth": "MMM YYYY",
|
28
|
+
"today": "Today",
|
29
|
+
"view": {"month": "Month", "year": "Year", "week": "Week", "day": "Day"},
|
30
|
+
"month": {
|
31
|
+
"long": {
|
32
|
+
"January": "January",
|
33
|
+
"February": "February",
|
34
|
+
"March": "March",
|
35
|
+
"April": "April",
|
36
|
+
"May": "May",
|
37
|
+
"June": "June",
|
38
|
+
"July": "July",
|
39
|
+
"August": "August",
|
40
|
+
"September": "September",
|
41
|
+
"October": "October",
|
42
|
+
"November": "November",
|
43
|
+
"December": "December",
|
44
|
+
},
|
45
|
+
"short": {
|
46
|
+
"January": "Jan",
|
47
|
+
"February": "Feb",
|
48
|
+
"March": "Mar",
|
49
|
+
"April": "Apr",
|
50
|
+
"May": "May",
|
51
|
+
"June": "Jun",
|
52
|
+
"July": "Jul",
|
53
|
+
"August": "Aug",
|
54
|
+
"September": "Sept",
|
55
|
+
"October": "Oct",
|
56
|
+
"November": "Nov",
|
57
|
+
"December": "Dec",
|
58
|
+
},
|
59
|
+
},
|
60
|
+
"week": {
|
61
|
+
"long": {
|
62
|
+
"self": "Week",
|
63
|
+
"monday": "Monday",
|
64
|
+
"tuesday": "Tuesday",
|
65
|
+
"wednesday": "Wednesday",
|
66
|
+
"thursday": "Thursday",
|
67
|
+
"friday": "Friday",
|
68
|
+
"saturday": "Saturday",
|
69
|
+
"sunday": "Sunday",
|
70
|
+
},
|
71
|
+
"short": {
|
72
|
+
"self": "Week",
|
73
|
+
"monday": "Mon",
|
74
|
+
"tuesday": "Tue",
|
75
|
+
"wednesday": "Wed",
|
76
|
+
"thursday": "Thu",
|
77
|
+
"friday": "Fri",
|
78
|
+
"saturday": "Sat",
|
79
|
+
"sunday": "Sun",
|
80
|
+
},
|
81
|
+
},
|
82
|
+
},
|
83
|
+
"datePicker": {
|
84
|
+
"view": {"month": "Month", "year": "Year", "week": "Week", "day": "Day"},
|
85
|
+
"month": {
|
86
|
+
"long": {
|
87
|
+
"January": "January",
|
88
|
+
"February": "February",
|
89
|
+
"March": "March",
|
90
|
+
"April": "April",
|
91
|
+
"May": "May",
|
92
|
+
"June": "June",
|
93
|
+
"July": "July",
|
94
|
+
"August": "August",
|
95
|
+
"September": "September",
|
96
|
+
"October": "October",
|
97
|
+
"November": "November",
|
98
|
+
"December": "December",
|
99
|
+
},
|
100
|
+
"short": {
|
101
|
+
"January": "Jan",
|
102
|
+
"February": "Feb",
|
103
|
+
"March": "Mar",
|
104
|
+
"April": "Apr",
|
105
|
+
"May": "May",
|
106
|
+
"June": "Jun",
|
107
|
+
"July": "Jul",
|
108
|
+
"August": "Aug",
|
109
|
+
"September": "Sept",
|
110
|
+
"October": "Oct",
|
111
|
+
"November": "Nov",
|
112
|
+
"December": "Dec",
|
113
|
+
},
|
114
|
+
},
|
115
|
+
"week": {
|
116
|
+
"long": {
|
117
|
+
"self": "Week",
|
118
|
+
"monday": "Monday",
|
119
|
+
"tuesday": "Tuesday",
|
120
|
+
"wednesday": "Wednesday",
|
121
|
+
"thursday": "Thursday",
|
122
|
+
"friday": "Friday",
|
123
|
+
"saturday": "Saturday",
|
124
|
+
"sunday": "Sunday",
|
125
|
+
},
|
126
|
+
"short": {
|
127
|
+
"self": "Week",
|
128
|
+
"monday": "Mon",
|
129
|
+
"tuesday": "Tue",
|
130
|
+
"wednesday": "Wed",
|
131
|
+
"thursday": "Thu",
|
132
|
+
"friday": "Fri",
|
133
|
+
"saturday": "Sat",
|
134
|
+
"sunday": "Sun",
|
135
|
+
},
|
136
|
+
},
|
137
|
+
"placeholder": {
|
138
|
+
"date": "Please select date",
|
139
|
+
"week": "Please select week",
|
140
|
+
"month": "Please select month",
|
141
|
+
"year": "Please select year",
|
142
|
+
"quarter": "Please select quarter",
|
143
|
+
"time": "Please select time",
|
144
|
+
},
|
145
|
+
"rangePlaceholder": {
|
146
|
+
"date": ["Start date", "End date"],
|
147
|
+
"week": ["Start week", "End week"],
|
148
|
+
"month": ["Start month", "End month"],
|
149
|
+
"year": ["Start year", "End year"],
|
150
|
+
"quarter": ["Start quarter", "End quarter"],
|
151
|
+
"time": ["Start time", "End time"],
|
152
|
+
},
|
153
|
+
"selectTime": "Select time",
|
154
|
+
"today": "Today",
|
155
|
+
"now": "Now",
|
156
|
+
"ok": "Ok",
|
157
|
+
},
|
158
|
+
"image": {"loading": "loading"},
|
159
|
+
"imagePreview": {
|
160
|
+
"fullScreen": "Full Screen",
|
161
|
+
"rotateRight": "Rotate Right",
|
162
|
+
"rotateLeft": "Rotate Left",
|
163
|
+
"zoomIn": "Zoom In",
|
164
|
+
"zoomOut": "Zoom Out",
|
165
|
+
"originalSize": "Original Size",
|
166
|
+
},
|
167
|
+
"typography": {
|
168
|
+
"copied": "Copied",
|
169
|
+
"copy": "Copy",
|
170
|
+
"expand": "Expand",
|
171
|
+
"collapse": "Collapse",
|
172
|
+
"edit": "Edit",
|
173
|
+
},
|
174
|
+
"form": {
|
175
|
+
"validateMessages": {
|
176
|
+
"required": "#{field} is required",
|
177
|
+
"type": {
|
178
|
+
"ip": "#{field} is not a #{type} type",
|
179
|
+
"email": "#{field} is not a #{type} type",
|
180
|
+
"url": "#{field} is not a #{type} type",
|
181
|
+
"string": "#{field} is not a #{type} type",
|
182
|
+
"number": "#{field} is not a #{type} type",
|
183
|
+
"array": "#{field} is not a #{type} type",
|
184
|
+
"object": "#{field} is not a #{type} type",
|
185
|
+
"boolean": "#{field} is not a #{type} type",
|
186
|
+
},
|
187
|
+
"number": {
|
188
|
+
"min": "`#{value}` is not greater than `#{min}`",
|
189
|
+
"max": "`#{value}` is not less than `#{max}`",
|
190
|
+
"equal": "`#{value}` is not equal to `#{equal}`",
|
191
|
+
"range": "`#{value}` is not in range `#{min} ~ #{max}`",
|
192
|
+
"positive": "`#{value}` is not a positive number",
|
193
|
+
"negative": "`#{value}` is not a negative number",
|
194
|
+
},
|
195
|
+
"string": {
|
196
|
+
"maxLength": "#{field} cannot be longer than #{maxLength} characters",
|
197
|
+
"minLength": "#{field} must be at least #{minLength} characters",
|
198
|
+
"length": "#{field} must be exactly #{length} characters",
|
199
|
+
"match": "`#{value}` does not match pattern #{pattern}",
|
200
|
+
"uppercase": "`#{value}` must be all uppercase",
|
201
|
+
"lowercase": "`#{value}` must be all lowercased",
|
202
|
+
},
|
203
|
+
"array": {
|
204
|
+
"length": "#{field} must be exactly #{length} in length",
|
205
|
+
"minLength": "#{field} cannot be less than #{minLength} in length",
|
206
|
+
"maxLength": "#{field} cannot be greater than #{maxLength} in length",
|
207
|
+
"includes": "#{field} is not includes #{includes}",
|
208
|
+
"deepEqual": "#{field} is not deep equal with #{deepEqual}",
|
209
|
+
"empty": "#{field} is not an empty array",
|
210
|
+
},
|
211
|
+
"object": {
|
212
|
+
"deepEqual": "#{field} is not deep equal to expected value",
|
213
|
+
"hasKeys": "#{field} does not contain required fields",
|
214
|
+
"empty": "#{field} is not an empty object",
|
215
|
+
},
|
216
|
+
"boolean": {
|
217
|
+
"true": "Expect true but got `#{value}`",
|
218
|
+
"false": "Expect false but got `#{value}`",
|
219
|
+
},
|
220
|
+
}
|
221
|
+
},
|
222
|
+
"colorPicker": {
|
223
|
+
"history": "History Colors",
|
224
|
+
"preset": "Preset Colors",
|
225
|
+
"empty": "Empty",
|
226
|
+
},
|
227
|
+
}
|
@@ -0,0 +1,224 @@
|
|
1
|
+
locale = {
|
2
|
+
"locale": "zh-CN",
|
3
|
+
"empty": {"description": "暂无数据"},
|
4
|
+
"drawer": {"okText": "确定", "cancelText": "取消"},
|
5
|
+
"popconfirm": {"okText": "确定", "cancelText": "取消"},
|
6
|
+
"modal": {"okText": "确定", "cancelText": "取消"},
|
7
|
+
"pagination": {
|
8
|
+
"goto": "前往",
|
9
|
+
"page": "页",
|
10
|
+
"countPerPage": "条/页",
|
11
|
+
"total": "共 {0} 条",
|
12
|
+
},
|
13
|
+
"table": {"okText": "确定", "resetText": "重置"},
|
14
|
+
"upload": {
|
15
|
+
"start": "开始",
|
16
|
+
"cancel": "取消",
|
17
|
+
"delete": "删除",
|
18
|
+
"retry": "点击重试",
|
19
|
+
"buttonText": "点击上传",
|
20
|
+
"preview": "预览",
|
21
|
+
"drag": "点击或拖拽文件到此处上传",
|
22
|
+
"dragHover": "释放文件并开始上传",
|
23
|
+
"error": "上传失败",
|
24
|
+
},
|
25
|
+
"calendar": {
|
26
|
+
"formatYear": "YYYY 年",
|
27
|
+
"formatMonth": "YYYY 年 MM 月",
|
28
|
+
"today": "今天",
|
29
|
+
"view": {"month": "月", "year": "年", "week": "周", "day": "日"},
|
30
|
+
"month": {
|
31
|
+
"long": {
|
32
|
+
"January": "一月",
|
33
|
+
"February": "二月",
|
34
|
+
"March": "三月",
|
35
|
+
"April": "四月",
|
36
|
+
"May": "五月",
|
37
|
+
"June": "六月",
|
38
|
+
"July": "七月",
|
39
|
+
"August": "八月",
|
40
|
+
"September": "九月",
|
41
|
+
"October": "十月",
|
42
|
+
"November": "十一月",
|
43
|
+
"December": "十二月",
|
44
|
+
},
|
45
|
+
"short": {
|
46
|
+
"January": "一月",
|
47
|
+
"February": "二月",
|
48
|
+
"March": "三月",
|
49
|
+
"April": "四月",
|
50
|
+
"May": "五月",
|
51
|
+
"June": "六月",
|
52
|
+
"July": "七月",
|
53
|
+
"August": "八月",
|
54
|
+
"September": "九月",
|
55
|
+
"October": "十月",
|
56
|
+
"November": "十一月",
|
57
|
+
"December": "十二月",
|
58
|
+
},
|
59
|
+
},
|
60
|
+
"week": {
|
61
|
+
"long": {
|
62
|
+
"self": "周",
|
63
|
+
"monday": "周一",
|
64
|
+
"tuesday": "周二",
|
65
|
+
"wednesday": "周三",
|
66
|
+
"thursday": "周四",
|
67
|
+
"friday": "周五",
|
68
|
+
"saturday": "周六",
|
69
|
+
"sunday": "周日",
|
70
|
+
},
|
71
|
+
"short": {
|
72
|
+
"self": "周",
|
73
|
+
"monday": "一",
|
74
|
+
"tuesday": "二",
|
75
|
+
"wednesday": "三",
|
76
|
+
"thursday": "四",
|
77
|
+
"friday": "五",
|
78
|
+
"saturday": "六",
|
79
|
+
"sunday": "日",
|
80
|
+
},
|
81
|
+
},
|
82
|
+
},
|
83
|
+
"datePicker": {
|
84
|
+
"view": {"month": "月", "year": "年", "week": "周", "day": "日"},
|
85
|
+
"month": {
|
86
|
+
"long": {
|
87
|
+
"January": "一月",
|
88
|
+
"February": "二月",
|
89
|
+
"March": "三月",
|
90
|
+
"April": "四月",
|
91
|
+
"May": "五月",
|
92
|
+
"June": "六月",
|
93
|
+
"July": "七月",
|
94
|
+
"August": "八月",
|
95
|
+
"September": "九月",
|
96
|
+
"October": "十月",
|
97
|
+
"November": "十一月",
|
98
|
+
"December": "十二月",
|
99
|
+
},
|
100
|
+
"short": {
|
101
|
+
"January": "一月",
|
102
|
+
"February": "二月",
|
103
|
+
"March": "三月",
|
104
|
+
"April": "四月",
|
105
|
+
"May": "五月",
|
106
|
+
"June": "六月",
|
107
|
+
"July": "七月",
|
108
|
+
"August": "八月",
|
109
|
+
"September": "九月",
|
110
|
+
"October": "十月",
|
111
|
+
"November": "十一月",
|
112
|
+
"December": "十二月",
|
113
|
+
},
|
114
|
+
},
|
115
|
+
"week": {
|
116
|
+
"long": {
|
117
|
+
"self": "周",
|
118
|
+
"monday": "周一",
|
119
|
+
"tuesday": "周二",
|
120
|
+
"wednesday": "周三",
|
121
|
+
"thursday": "周四",
|
122
|
+
"friday": "周五",
|
123
|
+
"saturday": "周六",
|
124
|
+
"sunday": "周日",
|
125
|
+
},
|
126
|
+
"short": {
|
127
|
+
"self": "周",
|
128
|
+
"monday": "一",
|
129
|
+
"tuesday": "二",
|
130
|
+
"wednesday": "三",
|
131
|
+
"thursday": "四",
|
132
|
+
"friday": "五",
|
133
|
+
"saturday": "六",
|
134
|
+
"sunday": "日",
|
135
|
+
},
|
136
|
+
},
|
137
|
+
"placeholder": {
|
138
|
+
"date": "请选择日期",
|
139
|
+
"week": "请选择周",
|
140
|
+
"month": "请选择月份",
|
141
|
+
"year": "请选择年份",
|
142
|
+
"quarter": "请选择季度",
|
143
|
+
"time": "请选择时间",
|
144
|
+
},
|
145
|
+
"rangePlaceholder": {
|
146
|
+
"date": ["开始日期", "结束日期"],
|
147
|
+
"week": ["开始周", "结束周"],
|
148
|
+
"month": ["开始月份", "结束月份"],
|
149
|
+
"year": ["开始年份", "结束年份"],
|
150
|
+
"quarter": ["开始季度", "结束季度"],
|
151
|
+
"time": ["开始时间", "结束时间"],
|
152
|
+
},
|
153
|
+
"selectTime": "选择时间",
|
154
|
+
"today": "今天",
|
155
|
+
"now": "此刻",
|
156
|
+
"ok": "确定",
|
157
|
+
},
|
158
|
+
"image": {"loading": "加载中"},
|
159
|
+
"imagePreview": {
|
160
|
+
"fullScreen": "全屏",
|
161
|
+
"rotateRight": "向右旋转",
|
162
|
+
"rotateLeft": "向左旋转",
|
163
|
+
"zoomIn": "放大",
|
164
|
+
"zoomOut": "缩小",
|
165
|
+
"originalSize": "原始尺寸",
|
166
|
+
},
|
167
|
+
"typography": {
|
168
|
+
"copied": "已复制",
|
169
|
+
"copy": "复制",
|
170
|
+
"expand": "展开",
|
171
|
+
"collapse": "折叠",
|
172
|
+
"edit": "编辑",
|
173
|
+
},
|
174
|
+
"form": {
|
175
|
+
"validateMessages": {
|
176
|
+
"required": "#{field} 是必填项",
|
177
|
+
"type": {
|
178
|
+
"string": "#{field} 不是合法的文本类型",
|
179
|
+
"number": "#{field} 不是合法的数字类型",
|
180
|
+
"boolean": "#{field} 不是合法的布尔类型",
|
181
|
+
"array": "#{field} 不是合法的数组类型",
|
182
|
+
"object": "#{field} 不是合法的对象类型",
|
183
|
+
"url": "#{field} 不是合法的 url 地址",
|
184
|
+
"email": "#{field} 不是合法的邮箱地址",
|
185
|
+
"ip": "#{field} 不是合法的 IP 地址",
|
186
|
+
},
|
187
|
+
"number": {
|
188
|
+
"min": "`#{value}` 小于最小值 `#{min}`",
|
189
|
+
"max": "`#{value}` 大于最大值 `#{max}`",
|
190
|
+
"equal": "`#{value}` 不等于 `#{equal}`",
|
191
|
+
"range": "`#{value}` 不在 `#{min} ~ #{max}` 范围内",
|
192
|
+
"positive": "`#{value}` 不是正数",
|
193
|
+
"negative": "`#{value}` 不是负数",
|
194
|
+
},
|
195
|
+
"array": {
|
196
|
+
"length": "`#{field}` 个数不等于 #{length}",
|
197
|
+
"minLength": "`#{field}` 个数最少为 #{minLength}",
|
198
|
+
"maxLength": "`#{field}` 个数最多为 #{maxLength}",
|
199
|
+
"includes": "#{field} 不包含 #{includes}",
|
200
|
+
"deepEqual": "#{field} 不等于 #{deepEqual}",
|
201
|
+
"empty": "`#{field}` 不是空数组",
|
202
|
+
},
|
203
|
+
"string": {
|
204
|
+
"minLength": "字符数最少为 #{minLength}",
|
205
|
+
"maxLength": "字符数最多为 #{maxLength}",
|
206
|
+
"length": "字符数必须是 #{length}",
|
207
|
+
"match": "`#{value}` 不符合模式 #{pattern}",
|
208
|
+
"uppercase": "`#{value}` 必须全大写",
|
209
|
+
"lowercase": "`#{value}` 必须全小写",
|
210
|
+
},
|
211
|
+
"object": {
|
212
|
+
"deepEqual": "`#{field}` 不等于期望值",
|
213
|
+
"hasKeys": "`#{field}` 不包含必须字段",
|
214
|
+
"empty": "`#{field}` 不是对象",
|
215
|
+
},
|
216
|
+
"boolean": {"true": "期望是 `true`", "false": "期望是 `false`"},
|
217
|
+
}
|
218
|
+
},
|
219
|
+
"colorPicker": {
|
220
|
+
"history": "最近使用颜色",
|
221
|
+
"preset": "系统预设颜色",
|
222
|
+
"empty": "暂无",
|
223
|
+
},
|
224
|
+
}
|
instaui/arco/setup.py
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
from pathlib import Path
|
2
|
+
from typing import Union
|
3
|
+
from instaui import ui
|
4
|
+
from instaui.dependencies.plugin_dependency import register_plugin
|
5
|
+
from instaui.arco.types import TLocale, TCustomizeLocale
|
6
|
+
from instaui.arco._settings import configure
|
7
|
+
|
8
|
+
static_folder = Path(__file__).parent / "static"
|
9
|
+
|
10
|
+
arco_css = static_folder / "instaui-arco.css"
|
11
|
+
arco_esm_js = static_folder / "instaui-arco.js"
|
12
|
+
|
13
|
+
|
14
|
+
def _register_arco():
|
15
|
+
register_plugin("InstauiArco", esm=arco_esm_js, css=[arco_css])
|
16
|
+
|
17
|
+
|
18
|
+
def use(*, locale: ui.TMaybeRef[Union[TLocale, TCustomizeLocale]] = "en-US"):
|
19
|
+
"""Use arco ui.
|
20
|
+
|
21
|
+
Args:
|
22
|
+
locale (ui.TMaybeRef[Union[TLocale, TCustomizeLocale]], optional): The locale of arco ui. Defaults to "en-US".
|
23
|
+
|
24
|
+
Examples:
|
25
|
+
.. code-block:: python
|
26
|
+
from instaui import ui, arco
|
27
|
+
|
28
|
+
arco.use()
|
29
|
+
|
30
|
+
@ui.page("/")
|
31
|
+
def index_page():
|
32
|
+
arco.input(placeholder="input")
|
33
|
+
"""
|
34
|
+
|
35
|
+
_register_arco()
|
36
|
+
configure(locale=locale)
|