reflex 0.3.2a1__py3-none-any.whl → 0.3.3a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/.templates/jinja/web/pages/custom_component.js.jinja2 +20 -3
- reflex/.templates/web/next.config.js +1 -0
- reflex/.templates/web/utils/helpers/range.js +43 -0
- reflex/.templates/web/utils/state.js +10 -6
- reflex/__init__.py +312 -40
- reflex/__init__.pyi +477 -0
- reflex/compiler/compiler.py +3 -0
- reflex/components/__init__.py +138 -138
- reflex/components/component.py +29 -22
- reflex/components/datadisplay/__init__.py +3 -1
- reflex/components/datadisplay/code.py +388 -14
- reflex/components/datadisplay/code.pyi +1146 -10
- reflex/components/forms/button.py +3 -0
- reflex/components/forms/checkbox.py +3 -0
- reflex/components/forms/form.py +90 -27
- reflex/components/forms/input.py +3 -0
- reflex/components/forms/numberinput.py +3 -0
- reflex/components/forms/pininput.py +77 -21
- reflex/components/forms/radio.py +3 -0
- reflex/components/forms/rangeslider.py +3 -0
- reflex/components/forms/select.py +3 -0
- reflex/components/forms/slider.py +3 -0
- reflex/components/forms/switch.py +3 -0
- reflex/components/forms/textarea.py +3 -0
- reflex/components/layout/foreach.py +12 -6
- reflex/components/libs/chakra.py +2 -0
- reflex/components/libs/chakra.pyi +323 -24
- reflex/components/tags/iter_tag.py +18 -18
- reflex/components/tags/tag.py +3 -2
- reflex/components/typography/markdown.py +10 -0
- reflex/config.py +12 -0
- reflex/constants/installer.py +4 -4
- reflex/event.py +4 -0
- reflex/page.py +3 -4
- reflex/page.pyi +17 -0
- reflex/reflex.py +3 -0
- reflex/state.py +31 -12
- reflex/testing.py +1 -1
- reflex/utils/build.py +24 -19
- reflex/utils/console.py +5 -1
- reflex/utils/format.py +26 -9
- reflex/utils/prerequisites.py +27 -28
- reflex/utils/processes.py +5 -4
- reflex/vars.py +80 -12
- reflex/vars.pyi +7 -0
- {reflex-0.3.2a1.dist-info → reflex-0.3.3a1.dist-info}/METADATA +3 -2
- {reflex-0.3.2a1.dist-info → reflex-0.3.3a1.dist-info}/RECORD +50 -53
- reflex/.templates/web/.pytest_cache/.gitignore +0 -2
- reflex/.templates/web/.pytest_cache/CACHEDIR.TAG +0 -4
- reflex/.templates/web/.pytest_cache/README.md +0 -8
- reflex/.templates/web/.pytest_cache/v/cache/nodeids +0 -1
- reflex/.templates/web/.pytest_cache/v/cache/stepwise +0 -1
- reflex/.templates/web/styles/code/prism.js +0 -1015
- {reflex-0.3.2a1.dist-info → reflex-0.3.3a1.dist-info}/LICENSE +0 -0
- {reflex-0.3.2a1.dist-info → reflex-0.3.3a1.dist-info}/WHEEL +0 -0
- {reflex-0.3.2a1.dist-info → reflex-0.3.3a1.dist-info}/entry_points.txt +0 -0
|
@@ -1,24 +1,1093 @@
|
|
|
1
|
-
"""Stub file for code.py"""
|
|
1
|
+
"""Stub file for reflex/components/datadisplay/code.py"""
|
|
2
2
|
# ------------------- DO NOT EDIT ----------------------
|
|
3
3
|
# This file was generated by `scripts/pyi_generator.py`!
|
|
4
4
|
# ------------------------------------------------------
|
|
5
5
|
|
|
6
|
-
from typing import
|
|
7
|
-
from reflex.components.libs.chakra import ChakraComponent
|
|
8
|
-
from reflex.components.component import Component
|
|
6
|
+
from typing import Optional, Literal, Any, overload, List, Union, Dict
|
|
9
7
|
from reflex.vars import Var, BaseVar, ComputedVar
|
|
10
|
-
from reflex.event import
|
|
8
|
+
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
|
+
from reflex.style import Style
|
|
10
|
+
from typing import Dict, Literal, Optional, Union
|
|
11
|
+
from reflex.components.component import Component
|
|
12
|
+
from reflex.components.forms import Button
|
|
13
|
+
from reflex.components.layout import Box
|
|
14
|
+
from reflex.components.libs.chakra import ChakraComponent
|
|
15
|
+
from reflex.components.media import Icon
|
|
16
|
+
from reflex.event import set_clipboard
|
|
17
|
+
from reflex.style import Style
|
|
18
|
+
from reflex.utils import format, imports
|
|
19
|
+
from reflex.vars import ImportVar, Var
|
|
20
|
+
|
|
21
|
+
LiteralCodeBlockTheme = Literal[
|
|
22
|
+
"a11y-dark",
|
|
23
|
+
"atom-dark",
|
|
24
|
+
"cb",
|
|
25
|
+
"coldark-cold",
|
|
26
|
+
"coldark-dark",
|
|
27
|
+
"coy",
|
|
28
|
+
"coy-without-shadows",
|
|
29
|
+
"darcula",
|
|
30
|
+
"dark",
|
|
31
|
+
"dracula",
|
|
32
|
+
"duotone-dark",
|
|
33
|
+
"duotone-earth",
|
|
34
|
+
"duotone-forest",
|
|
35
|
+
"duotone-light",
|
|
36
|
+
"duotone-sea",
|
|
37
|
+
"duotone-space",
|
|
38
|
+
"funky",
|
|
39
|
+
"ghcolors",
|
|
40
|
+
"gruvbox-dark",
|
|
41
|
+
"gruvbox-light",
|
|
42
|
+
"holi-theme",
|
|
43
|
+
"hopscotch",
|
|
44
|
+
"light", # not present in react-syntax-highlighter styles
|
|
45
|
+
"lucario",
|
|
46
|
+
"material-dark",
|
|
47
|
+
"material-light",
|
|
48
|
+
"material-oceanic",
|
|
49
|
+
"night-owl",
|
|
50
|
+
"nord",
|
|
51
|
+
"okaidia",
|
|
52
|
+
"one-dark",
|
|
53
|
+
"one-light",
|
|
54
|
+
"pojoaque",
|
|
55
|
+
"prism",
|
|
56
|
+
"shades-of-purple",
|
|
57
|
+
"solarized-dark-atom",
|
|
58
|
+
"solarizedlight",
|
|
59
|
+
"synthwave84",
|
|
60
|
+
"tomorrow",
|
|
61
|
+
"twilight",
|
|
62
|
+
"vs",
|
|
63
|
+
"vs-dark",
|
|
64
|
+
"vsc-dark-plus",
|
|
65
|
+
"xonokai",
|
|
66
|
+
"z-touch",
|
|
67
|
+
]
|
|
11
68
|
|
|
12
|
-
|
|
69
|
+
LiteralCodeLanguage = Literal[
|
|
70
|
+
"abap",
|
|
71
|
+
"abnf",
|
|
72
|
+
"actionscript",
|
|
73
|
+
"ada",
|
|
74
|
+
"agda",
|
|
75
|
+
"al",
|
|
76
|
+
"antlr4",
|
|
77
|
+
"apacheconf",
|
|
78
|
+
"apex",
|
|
79
|
+
"apl",
|
|
80
|
+
"applescript",
|
|
81
|
+
"aql",
|
|
82
|
+
"arduino",
|
|
83
|
+
"arff",
|
|
84
|
+
"asciidoc",
|
|
85
|
+
"asm6502",
|
|
86
|
+
"asmatmel",
|
|
87
|
+
"aspnet",
|
|
88
|
+
"autohotkey",
|
|
89
|
+
"autoit",
|
|
90
|
+
"avisynth",
|
|
91
|
+
"avro-idl",
|
|
92
|
+
"bash",
|
|
93
|
+
"basic",
|
|
94
|
+
"batch",
|
|
95
|
+
"bbcode",
|
|
96
|
+
"bicep",
|
|
97
|
+
"birb",
|
|
98
|
+
"bison",
|
|
99
|
+
"bnf",
|
|
100
|
+
"brainfuck",
|
|
101
|
+
"brightscript",
|
|
102
|
+
"bro",
|
|
103
|
+
"bsl",
|
|
104
|
+
"c",
|
|
105
|
+
"cfscript",
|
|
106
|
+
"chaiscript",
|
|
107
|
+
"cil",
|
|
108
|
+
"clike",
|
|
109
|
+
"clojure",
|
|
110
|
+
"cmake",
|
|
111
|
+
"cobol",
|
|
112
|
+
"coffeescript",
|
|
113
|
+
"concurnas",
|
|
114
|
+
"coq",
|
|
115
|
+
"core",
|
|
116
|
+
"cpp",
|
|
117
|
+
"crystal",
|
|
118
|
+
"csharp",
|
|
119
|
+
"cshtml",
|
|
120
|
+
"csp",
|
|
121
|
+
"css",
|
|
122
|
+
"css-extras",
|
|
123
|
+
"csv",
|
|
124
|
+
"cypher",
|
|
125
|
+
"d",
|
|
126
|
+
"dart",
|
|
127
|
+
"dataweave",
|
|
128
|
+
"dax",
|
|
129
|
+
"dhall",
|
|
130
|
+
"diff",
|
|
131
|
+
"django",
|
|
132
|
+
"dns-zone-file",
|
|
133
|
+
"docker",
|
|
134
|
+
"dot",
|
|
135
|
+
"ebnf",
|
|
136
|
+
"editorconfig",
|
|
137
|
+
"eiffel",
|
|
138
|
+
"ejs",
|
|
139
|
+
"elixir",
|
|
140
|
+
"elm",
|
|
141
|
+
"erb",
|
|
142
|
+
"erlang",
|
|
143
|
+
"etlua",
|
|
144
|
+
"excel-formula",
|
|
145
|
+
"factor",
|
|
146
|
+
"false",
|
|
147
|
+
"firestore-security-rules",
|
|
148
|
+
"flow",
|
|
149
|
+
"fortran",
|
|
150
|
+
"fsharp",
|
|
151
|
+
"ftl",
|
|
152
|
+
"gap",
|
|
153
|
+
"gcode",
|
|
154
|
+
"gdscript",
|
|
155
|
+
"gedcom",
|
|
156
|
+
"gherkin",
|
|
157
|
+
"git",
|
|
158
|
+
"glsl",
|
|
159
|
+
"gml",
|
|
160
|
+
"gn",
|
|
161
|
+
"go",
|
|
162
|
+
"go-module",
|
|
163
|
+
"graphql",
|
|
164
|
+
"groovy",
|
|
165
|
+
"haml",
|
|
166
|
+
"handlebars",
|
|
167
|
+
"haskell",
|
|
168
|
+
"haxe",
|
|
169
|
+
"hcl",
|
|
170
|
+
"hlsl",
|
|
171
|
+
"hoon",
|
|
172
|
+
"hpkp",
|
|
173
|
+
"hsts",
|
|
174
|
+
"http",
|
|
175
|
+
"ichigojam",
|
|
176
|
+
"icon",
|
|
177
|
+
"icu-message-format",
|
|
178
|
+
"idris",
|
|
179
|
+
"iecst",
|
|
180
|
+
"ignore",
|
|
181
|
+
"index",
|
|
182
|
+
"inform7",
|
|
183
|
+
"ini",
|
|
184
|
+
"io",
|
|
185
|
+
"j",
|
|
186
|
+
"java",
|
|
187
|
+
"javadoc",
|
|
188
|
+
"javadoclike",
|
|
189
|
+
"javascript",
|
|
190
|
+
"javastacktrace",
|
|
191
|
+
"jexl",
|
|
192
|
+
"jolie",
|
|
193
|
+
"jq",
|
|
194
|
+
"js-extras",
|
|
195
|
+
"js-templates",
|
|
196
|
+
"jsdoc",
|
|
197
|
+
"json",
|
|
198
|
+
"json5",
|
|
199
|
+
"jsonp",
|
|
200
|
+
"jsstacktrace",
|
|
201
|
+
"jsx",
|
|
202
|
+
"julia",
|
|
203
|
+
"keepalived",
|
|
204
|
+
"keyman",
|
|
205
|
+
"kotlin",
|
|
206
|
+
"kumir",
|
|
207
|
+
"kusto",
|
|
208
|
+
"latex",
|
|
209
|
+
"latte",
|
|
210
|
+
"less",
|
|
211
|
+
"lilypond",
|
|
212
|
+
"liquid",
|
|
213
|
+
"lisp",
|
|
214
|
+
"livescript",
|
|
215
|
+
"llvm",
|
|
216
|
+
"log",
|
|
217
|
+
"lolcode",
|
|
218
|
+
"lua",
|
|
219
|
+
"magma",
|
|
220
|
+
"makefile",
|
|
221
|
+
"markdown",
|
|
222
|
+
"markup",
|
|
223
|
+
"markup-templating",
|
|
224
|
+
"matlab",
|
|
225
|
+
"maxscript",
|
|
226
|
+
"mel",
|
|
227
|
+
"mermaid",
|
|
228
|
+
"mizar",
|
|
229
|
+
"mongodb",
|
|
230
|
+
"monkey",
|
|
231
|
+
"moonscript",
|
|
232
|
+
"n1ql",
|
|
233
|
+
"n4js",
|
|
234
|
+
"nand2tetris-hdl",
|
|
235
|
+
"naniscript",
|
|
236
|
+
"nasm",
|
|
237
|
+
"neon",
|
|
238
|
+
"nevod",
|
|
239
|
+
"nginx",
|
|
240
|
+
"nim",
|
|
241
|
+
"nix",
|
|
242
|
+
"nsis",
|
|
243
|
+
"objectivec",
|
|
244
|
+
"ocaml",
|
|
245
|
+
"opencl",
|
|
246
|
+
"openqasm",
|
|
247
|
+
"oz",
|
|
248
|
+
"parigp",
|
|
249
|
+
"parser",
|
|
250
|
+
"pascal",
|
|
251
|
+
"pascaligo",
|
|
252
|
+
"pcaxis",
|
|
253
|
+
"peoplecode",
|
|
254
|
+
"perl",
|
|
255
|
+
"php",
|
|
256
|
+
"php-extras",
|
|
257
|
+
"phpdoc",
|
|
258
|
+
"plsql",
|
|
259
|
+
"powerquery",
|
|
260
|
+
"powershell",
|
|
261
|
+
"processing",
|
|
262
|
+
"prolog",
|
|
263
|
+
"promql",
|
|
264
|
+
"properties",
|
|
265
|
+
"protobuf",
|
|
266
|
+
"psl",
|
|
267
|
+
"pug",
|
|
268
|
+
"puppet",
|
|
269
|
+
"pure",
|
|
270
|
+
"purebasic",
|
|
271
|
+
"purescript",
|
|
272
|
+
"python",
|
|
273
|
+
"q",
|
|
274
|
+
"qml",
|
|
275
|
+
"qore",
|
|
276
|
+
"qsharp",
|
|
277
|
+
"r",
|
|
278
|
+
"racket",
|
|
279
|
+
"reason",
|
|
280
|
+
"regex",
|
|
281
|
+
"rego",
|
|
282
|
+
"renpy",
|
|
283
|
+
"rest",
|
|
284
|
+
"rip",
|
|
285
|
+
"roboconf",
|
|
286
|
+
"robotframework",
|
|
287
|
+
"ruby",
|
|
288
|
+
"rust",
|
|
289
|
+
"sas",
|
|
290
|
+
"sass",
|
|
291
|
+
"scala",
|
|
292
|
+
"scheme",
|
|
293
|
+
"scss",
|
|
294
|
+
"shell-session",
|
|
295
|
+
"smali",
|
|
296
|
+
"smalltalk",
|
|
297
|
+
"smarty",
|
|
298
|
+
"sml",
|
|
299
|
+
"solidity",
|
|
300
|
+
"solution-file",
|
|
301
|
+
"soy",
|
|
302
|
+
"sparql",
|
|
303
|
+
"splunk-spl",
|
|
304
|
+
"sqf",
|
|
305
|
+
"sql",
|
|
306
|
+
"squirrel",
|
|
307
|
+
"stan",
|
|
308
|
+
"stylus",
|
|
309
|
+
"swift",
|
|
310
|
+
"systemd",
|
|
311
|
+
"t4-cs",
|
|
312
|
+
"t4-templating",
|
|
313
|
+
"t4-vb",
|
|
314
|
+
"tap",
|
|
315
|
+
"tcl",
|
|
316
|
+
"textile",
|
|
317
|
+
"toml",
|
|
318
|
+
"tremor",
|
|
319
|
+
"tsx",
|
|
320
|
+
"tt2",
|
|
321
|
+
"turtle",
|
|
322
|
+
"twig",
|
|
323
|
+
"typescript",
|
|
324
|
+
"typoscript",
|
|
325
|
+
"unrealscript",
|
|
326
|
+
"uorazor",
|
|
327
|
+
"uri",
|
|
328
|
+
"v",
|
|
329
|
+
"vala",
|
|
330
|
+
"vbnet",
|
|
331
|
+
"velocity",
|
|
332
|
+
"verilog",
|
|
333
|
+
"vhdl",
|
|
334
|
+
"vim",
|
|
335
|
+
"visual-basic",
|
|
336
|
+
"warpscript",
|
|
337
|
+
"wasm",
|
|
338
|
+
"web-idl",
|
|
339
|
+
"wiki",
|
|
340
|
+
"wolfram",
|
|
341
|
+
"wren",
|
|
342
|
+
"xeora",
|
|
343
|
+
"xml-doc",
|
|
344
|
+
"xojo",
|
|
345
|
+
"xquery",
|
|
346
|
+
"yaml",
|
|
347
|
+
"yang",
|
|
348
|
+
"zig",
|
|
349
|
+
]
|
|
13
350
|
|
|
14
351
|
class CodeBlock(Component):
|
|
15
352
|
@overload
|
|
16
353
|
@classmethod
|
|
17
|
-
def create(
|
|
354
|
+
def create( # type: ignore
|
|
355
|
+
cls,
|
|
356
|
+
*children,
|
|
357
|
+
can_copy: Optional[bool] = False,
|
|
358
|
+
copy_button: Optional[Union[bool, Component]] = None,
|
|
359
|
+
theme: Optional[
|
|
360
|
+
Union[
|
|
361
|
+
Var[
|
|
362
|
+
Literal[
|
|
363
|
+
"a11y-dark",
|
|
364
|
+
"atom-dark",
|
|
365
|
+
"cb",
|
|
366
|
+
"coldark-cold",
|
|
367
|
+
"coldark-dark",
|
|
368
|
+
"coy",
|
|
369
|
+
"coy-without-shadows",
|
|
370
|
+
"darcula",
|
|
371
|
+
"dark",
|
|
372
|
+
"dracula",
|
|
373
|
+
"duotone-dark",
|
|
374
|
+
"duotone-earth",
|
|
375
|
+
"duotone-forest",
|
|
376
|
+
"duotone-light",
|
|
377
|
+
"duotone-sea",
|
|
378
|
+
"duotone-space",
|
|
379
|
+
"funky",
|
|
380
|
+
"ghcolors",
|
|
381
|
+
"gruvbox-dark",
|
|
382
|
+
"gruvbox-light",
|
|
383
|
+
"holi-theme",
|
|
384
|
+
"hopscotch",
|
|
385
|
+
"light",
|
|
386
|
+
"lucario",
|
|
387
|
+
"material-dark",
|
|
388
|
+
"material-light",
|
|
389
|
+
"material-oceanic",
|
|
390
|
+
"night-owl",
|
|
391
|
+
"nord",
|
|
392
|
+
"okaidia",
|
|
393
|
+
"one-dark",
|
|
394
|
+
"one-light",
|
|
395
|
+
"pojoaque",
|
|
396
|
+
"prism",
|
|
397
|
+
"shades-of-purple",
|
|
398
|
+
"solarized-dark-atom",
|
|
399
|
+
"solarizedlight",
|
|
400
|
+
"synthwave84",
|
|
401
|
+
"tomorrow",
|
|
402
|
+
"twilight",
|
|
403
|
+
"vs",
|
|
404
|
+
"vs-dark",
|
|
405
|
+
"vsc-dark-plus",
|
|
406
|
+
"xonokai",
|
|
407
|
+
"z-touch",
|
|
408
|
+
]
|
|
409
|
+
],
|
|
410
|
+
Literal[
|
|
411
|
+
"a11y-dark",
|
|
412
|
+
"atom-dark",
|
|
413
|
+
"cb",
|
|
414
|
+
"coldark-cold",
|
|
415
|
+
"coldark-dark",
|
|
416
|
+
"coy",
|
|
417
|
+
"coy-without-shadows",
|
|
418
|
+
"darcula",
|
|
419
|
+
"dark",
|
|
420
|
+
"dracula",
|
|
421
|
+
"duotone-dark",
|
|
422
|
+
"duotone-earth",
|
|
423
|
+
"duotone-forest",
|
|
424
|
+
"duotone-light",
|
|
425
|
+
"duotone-sea",
|
|
426
|
+
"duotone-space",
|
|
427
|
+
"funky",
|
|
428
|
+
"ghcolors",
|
|
429
|
+
"gruvbox-dark",
|
|
430
|
+
"gruvbox-light",
|
|
431
|
+
"holi-theme",
|
|
432
|
+
"hopscotch",
|
|
433
|
+
"light",
|
|
434
|
+
"lucario",
|
|
435
|
+
"material-dark",
|
|
436
|
+
"material-light",
|
|
437
|
+
"material-oceanic",
|
|
438
|
+
"night-owl",
|
|
439
|
+
"nord",
|
|
440
|
+
"okaidia",
|
|
441
|
+
"one-dark",
|
|
442
|
+
"one-light",
|
|
443
|
+
"pojoaque",
|
|
444
|
+
"prism",
|
|
445
|
+
"shades-of-purple",
|
|
446
|
+
"solarized-dark-atom",
|
|
447
|
+
"solarizedlight",
|
|
448
|
+
"synthwave84",
|
|
449
|
+
"tomorrow",
|
|
450
|
+
"twilight",
|
|
451
|
+
"vs",
|
|
452
|
+
"vs-dark",
|
|
453
|
+
"vsc-dark-plus",
|
|
454
|
+
"xonokai",
|
|
455
|
+
"z-touch",
|
|
456
|
+
],
|
|
457
|
+
]
|
|
458
|
+
] = None,
|
|
459
|
+
language: Optional[
|
|
460
|
+
Union[
|
|
461
|
+
Var[
|
|
462
|
+
Literal[
|
|
463
|
+
"abap",
|
|
464
|
+
"abnf",
|
|
465
|
+
"actionscript",
|
|
466
|
+
"ada",
|
|
467
|
+
"agda",
|
|
468
|
+
"al",
|
|
469
|
+
"antlr4",
|
|
470
|
+
"apacheconf",
|
|
471
|
+
"apex",
|
|
472
|
+
"apl",
|
|
473
|
+
"applescript",
|
|
474
|
+
"aql",
|
|
475
|
+
"arduino",
|
|
476
|
+
"arff",
|
|
477
|
+
"asciidoc",
|
|
478
|
+
"asm6502",
|
|
479
|
+
"asmatmel",
|
|
480
|
+
"aspnet",
|
|
481
|
+
"autohotkey",
|
|
482
|
+
"autoit",
|
|
483
|
+
"avisynth",
|
|
484
|
+
"avro-idl",
|
|
485
|
+
"bash",
|
|
486
|
+
"basic",
|
|
487
|
+
"batch",
|
|
488
|
+
"bbcode",
|
|
489
|
+
"bicep",
|
|
490
|
+
"birb",
|
|
491
|
+
"bison",
|
|
492
|
+
"bnf",
|
|
493
|
+
"brainfuck",
|
|
494
|
+
"brightscript",
|
|
495
|
+
"bro",
|
|
496
|
+
"bsl",
|
|
497
|
+
"c",
|
|
498
|
+
"cfscript",
|
|
499
|
+
"chaiscript",
|
|
500
|
+
"cil",
|
|
501
|
+
"clike",
|
|
502
|
+
"clojure",
|
|
503
|
+
"cmake",
|
|
504
|
+
"cobol",
|
|
505
|
+
"coffeescript",
|
|
506
|
+
"concurnas",
|
|
507
|
+
"coq",
|
|
508
|
+
"core",
|
|
509
|
+
"cpp",
|
|
510
|
+
"crystal",
|
|
511
|
+
"csharp",
|
|
512
|
+
"cshtml",
|
|
513
|
+
"csp",
|
|
514
|
+
"css",
|
|
515
|
+
"css-extras",
|
|
516
|
+
"csv",
|
|
517
|
+
"cypher",
|
|
518
|
+
"d",
|
|
519
|
+
"dart",
|
|
520
|
+
"dataweave",
|
|
521
|
+
"dax",
|
|
522
|
+
"dhall",
|
|
523
|
+
"diff",
|
|
524
|
+
"django",
|
|
525
|
+
"dns-zone-file",
|
|
526
|
+
"docker",
|
|
527
|
+
"dot",
|
|
528
|
+
"ebnf",
|
|
529
|
+
"editorconfig",
|
|
530
|
+
"eiffel",
|
|
531
|
+
"ejs",
|
|
532
|
+
"elixir",
|
|
533
|
+
"elm",
|
|
534
|
+
"erb",
|
|
535
|
+
"erlang",
|
|
536
|
+
"etlua",
|
|
537
|
+
"excel-formula",
|
|
538
|
+
"factor",
|
|
539
|
+
"false",
|
|
540
|
+
"firestore-security-rules",
|
|
541
|
+
"flow",
|
|
542
|
+
"fortran",
|
|
543
|
+
"fsharp",
|
|
544
|
+
"ftl",
|
|
545
|
+
"gap",
|
|
546
|
+
"gcode",
|
|
547
|
+
"gdscript",
|
|
548
|
+
"gedcom",
|
|
549
|
+
"gherkin",
|
|
550
|
+
"git",
|
|
551
|
+
"glsl",
|
|
552
|
+
"gml",
|
|
553
|
+
"gn",
|
|
554
|
+
"go",
|
|
555
|
+
"go-module",
|
|
556
|
+
"graphql",
|
|
557
|
+
"groovy",
|
|
558
|
+
"haml",
|
|
559
|
+
"handlebars",
|
|
560
|
+
"haskell",
|
|
561
|
+
"haxe",
|
|
562
|
+
"hcl",
|
|
563
|
+
"hlsl",
|
|
564
|
+
"hoon",
|
|
565
|
+
"hpkp",
|
|
566
|
+
"hsts",
|
|
567
|
+
"http",
|
|
568
|
+
"ichigojam",
|
|
569
|
+
"icon",
|
|
570
|
+
"icu-message-format",
|
|
571
|
+
"idris",
|
|
572
|
+
"iecst",
|
|
573
|
+
"ignore",
|
|
574
|
+
"index",
|
|
575
|
+
"inform7",
|
|
576
|
+
"ini",
|
|
577
|
+
"io",
|
|
578
|
+
"j",
|
|
579
|
+
"java",
|
|
580
|
+
"javadoc",
|
|
581
|
+
"javadoclike",
|
|
582
|
+
"javascript",
|
|
583
|
+
"javastacktrace",
|
|
584
|
+
"jexl",
|
|
585
|
+
"jolie",
|
|
586
|
+
"jq",
|
|
587
|
+
"js-extras",
|
|
588
|
+
"js-templates",
|
|
589
|
+
"jsdoc",
|
|
590
|
+
"json",
|
|
591
|
+
"json5",
|
|
592
|
+
"jsonp",
|
|
593
|
+
"jsstacktrace",
|
|
594
|
+
"jsx",
|
|
595
|
+
"julia",
|
|
596
|
+
"keepalived",
|
|
597
|
+
"keyman",
|
|
598
|
+
"kotlin",
|
|
599
|
+
"kumir",
|
|
600
|
+
"kusto",
|
|
601
|
+
"latex",
|
|
602
|
+
"latte",
|
|
603
|
+
"less",
|
|
604
|
+
"lilypond",
|
|
605
|
+
"liquid",
|
|
606
|
+
"lisp",
|
|
607
|
+
"livescript",
|
|
608
|
+
"llvm",
|
|
609
|
+
"log",
|
|
610
|
+
"lolcode",
|
|
611
|
+
"lua",
|
|
612
|
+
"magma",
|
|
613
|
+
"makefile",
|
|
614
|
+
"markdown",
|
|
615
|
+
"markup",
|
|
616
|
+
"markup-templating",
|
|
617
|
+
"matlab",
|
|
618
|
+
"maxscript",
|
|
619
|
+
"mel",
|
|
620
|
+
"mermaid",
|
|
621
|
+
"mizar",
|
|
622
|
+
"mongodb",
|
|
623
|
+
"monkey",
|
|
624
|
+
"moonscript",
|
|
625
|
+
"n1ql",
|
|
626
|
+
"n4js",
|
|
627
|
+
"nand2tetris-hdl",
|
|
628
|
+
"naniscript",
|
|
629
|
+
"nasm",
|
|
630
|
+
"neon",
|
|
631
|
+
"nevod",
|
|
632
|
+
"nginx",
|
|
633
|
+
"nim",
|
|
634
|
+
"nix",
|
|
635
|
+
"nsis",
|
|
636
|
+
"objectivec",
|
|
637
|
+
"ocaml",
|
|
638
|
+
"opencl",
|
|
639
|
+
"openqasm",
|
|
640
|
+
"oz",
|
|
641
|
+
"parigp",
|
|
642
|
+
"parser",
|
|
643
|
+
"pascal",
|
|
644
|
+
"pascaligo",
|
|
645
|
+
"pcaxis",
|
|
646
|
+
"peoplecode",
|
|
647
|
+
"perl",
|
|
648
|
+
"php",
|
|
649
|
+
"php-extras",
|
|
650
|
+
"phpdoc",
|
|
651
|
+
"plsql",
|
|
652
|
+
"powerquery",
|
|
653
|
+
"powershell",
|
|
654
|
+
"processing",
|
|
655
|
+
"prolog",
|
|
656
|
+
"promql",
|
|
657
|
+
"properties",
|
|
658
|
+
"protobuf",
|
|
659
|
+
"psl",
|
|
660
|
+
"pug",
|
|
661
|
+
"puppet",
|
|
662
|
+
"pure",
|
|
663
|
+
"purebasic",
|
|
664
|
+
"purescript",
|
|
665
|
+
"python",
|
|
666
|
+
"q",
|
|
667
|
+
"qml",
|
|
668
|
+
"qore",
|
|
669
|
+
"qsharp",
|
|
670
|
+
"r",
|
|
671
|
+
"racket",
|
|
672
|
+
"reason",
|
|
673
|
+
"regex",
|
|
674
|
+
"rego",
|
|
675
|
+
"renpy",
|
|
676
|
+
"rest",
|
|
677
|
+
"rip",
|
|
678
|
+
"roboconf",
|
|
679
|
+
"robotframework",
|
|
680
|
+
"ruby",
|
|
681
|
+
"rust",
|
|
682
|
+
"sas",
|
|
683
|
+
"sass",
|
|
684
|
+
"scala",
|
|
685
|
+
"scheme",
|
|
686
|
+
"scss",
|
|
687
|
+
"shell-session",
|
|
688
|
+
"smali",
|
|
689
|
+
"smalltalk",
|
|
690
|
+
"smarty",
|
|
691
|
+
"sml",
|
|
692
|
+
"solidity",
|
|
693
|
+
"solution-file",
|
|
694
|
+
"soy",
|
|
695
|
+
"sparql",
|
|
696
|
+
"splunk-spl",
|
|
697
|
+
"sqf",
|
|
698
|
+
"sql",
|
|
699
|
+
"squirrel",
|
|
700
|
+
"stan",
|
|
701
|
+
"stylus",
|
|
702
|
+
"swift",
|
|
703
|
+
"systemd",
|
|
704
|
+
"t4-cs",
|
|
705
|
+
"t4-templating",
|
|
706
|
+
"t4-vb",
|
|
707
|
+
"tap",
|
|
708
|
+
"tcl",
|
|
709
|
+
"textile",
|
|
710
|
+
"toml",
|
|
711
|
+
"tremor",
|
|
712
|
+
"tsx",
|
|
713
|
+
"tt2",
|
|
714
|
+
"turtle",
|
|
715
|
+
"twig",
|
|
716
|
+
"typescript",
|
|
717
|
+
"typoscript",
|
|
718
|
+
"unrealscript",
|
|
719
|
+
"uorazor",
|
|
720
|
+
"uri",
|
|
721
|
+
"v",
|
|
722
|
+
"vala",
|
|
723
|
+
"vbnet",
|
|
724
|
+
"velocity",
|
|
725
|
+
"verilog",
|
|
726
|
+
"vhdl",
|
|
727
|
+
"vim",
|
|
728
|
+
"visual-basic",
|
|
729
|
+
"warpscript",
|
|
730
|
+
"wasm",
|
|
731
|
+
"web-idl",
|
|
732
|
+
"wiki",
|
|
733
|
+
"wolfram",
|
|
734
|
+
"wren",
|
|
735
|
+
"xeora",
|
|
736
|
+
"xml-doc",
|
|
737
|
+
"xojo",
|
|
738
|
+
"xquery",
|
|
739
|
+
"yaml",
|
|
740
|
+
"yang",
|
|
741
|
+
"zig",
|
|
742
|
+
]
|
|
743
|
+
],
|
|
744
|
+
Literal[
|
|
745
|
+
"abap",
|
|
746
|
+
"abnf",
|
|
747
|
+
"actionscript",
|
|
748
|
+
"ada",
|
|
749
|
+
"agda",
|
|
750
|
+
"al",
|
|
751
|
+
"antlr4",
|
|
752
|
+
"apacheconf",
|
|
753
|
+
"apex",
|
|
754
|
+
"apl",
|
|
755
|
+
"applescript",
|
|
756
|
+
"aql",
|
|
757
|
+
"arduino",
|
|
758
|
+
"arff",
|
|
759
|
+
"asciidoc",
|
|
760
|
+
"asm6502",
|
|
761
|
+
"asmatmel",
|
|
762
|
+
"aspnet",
|
|
763
|
+
"autohotkey",
|
|
764
|
+
"autoit",
|
|
765
|
+
"avisynth",
|
|
766
|
+
"avro-idl",
|
|
767
|
+
"bash",
|
|
768
|
+
"basic",
|
|
769
|
+
"batch",
|
|
770
|
+
"bbcode",
|
|
771
|
+
"bicep",
|
|
772
|
+
"birb",
|
|
773
|
+
"bison",
|
|
774
|
+
"bnf",
|
|
775
|
+
"brainfuck",
|
|
776
|
+
"brightscript",
|
|
777
|
+
"bro",
|
|
778
|
+
"bsl",
|
|
779
|
+
"c",
|
|
780
|
+
"cfscript",
|
|
781
|
+
"chaiscript",
|
|
782
|
+
"cil",
|
|
783
|
+
"clike",
|
|
784
|
+
"clojure",
|
|
785
|
+
"cmake",
|
|
786
|
+
"cobol",
|
|
787
|
+
"coffeescript",
|
|
788
|
+
"concurnas",
|
|
789
|
+
"coq",
|
|
790
|
+
"core",
|
|
791
|
+
"cpp",
|
|
792
|
+
"crystal",
|
|
793
|
+
"csharp",
|
|
794
|
+
"cshtml",
|
|
795
|
+
"csp",
|
|
796
|
+
"css",
|
|
797
|
+
"css-extras",
|
|
798
|
+
"csv",
|
|
799
|
+
"cypher",
|
|
800
|
+
"d",
|
|
801
|
+
"dart",
|
|
802
|
+
"dataweave",
|
|
803
|
+
"dax",
|
|
804
|
+
"dhall",
|
|
805
|
+
"diff",
|
|
806
|
+
"django",
|
|
807
|
+
"dns-zone-file",
|
|
808
|
+
"docker",
|
|
809
|
+
"dot",
|
|
810
|
+
"ebnf",
|
|
811
|
+
"editorconfig",
|
|
812
|
+
"eiffel",
|
|
813
|
+
"ejs",
|
|
814
|
+
"elixir",
|
|
815
|
+
"elm",
|
|
816
|
+
"erb",
|
|
817
|
+
"erlang",
|
|
818
|
+
"etlua",
|
|
819
|
+
"excel-formula",
|
|
820
|
+
"factor",
|
|
821
|
+
"false",
|
|
822
|
+
"firestore-security-rules",
|
|
823
|
+
"flow",
|
|
824
|
+
"fortran",
|
|
825
|
+
"fsharp",
|
|
826
|
+
"ftl",
|
|
827
|
+
"gap",
|
|
828
|
+
"gcode",
|
|
829
|
+
"gdscript",
|
|
830
|
+
"gedcom",
|
|
831
|
+
"gherkin",
|
|
832
|
+
"git",
|
|
833
|
+
"glsl",
|
|
834
|
+
"gml",
|
|
835
|
+
"gn",
|
|
836
|
+
"go",
|
|
837
|
+
"go-module",
|
|
838
|
+
"graphql",
|
|
839
|
+
"groovy",
|
|
840
|
+
"haml",
|
|
841
|
+
"handlebars",
|
|
842
|
+
"haskell",
|
|
843
|
+
"haxe",
|
|
844
|
+
"hcl",
|
|
845
|
+
"hlsl",
|
|
846
|
+
"hoon",
|
|
847
|
+
"hpkp",
|
|
848
|
+
"hsts",
|
|
849
|
+
"http",
|
|
850
|
+
"ichigojam",
|
|
851
|
+
"icon",
|
|
852
|
+
"icu-message-format",
|
|
853
|
+
"idris",
|
|
854
|
+
"iecst",
|
|
855
|
+
"ignore",
|
|
856
|
+
"index",
|
|
857
|
+
"inform7",
|
|
858
|
+
"ini",
|
|
859
|
+
"io",
|
|
860
|
+
"j",
|
|
861
|
+
"java",
|
|
862
|
+
"javadoc",
|
|
863
|
+
"javadoclike",
|
|
864
|
+
"javascript",
|
|
865
|
+
"javastacktrace",
|
|
866
|
+
"jexl",
|
|
867
|
+
"jolie",
|
|
868
|
+
"jq",
|
|
869
|
+
"js-extras",
|
|
870
|
+
"js-templates",
|
|
871
|
+
"jsdoc",
|
|
872
|
+
"json",
|
|
873
|
+
"json5",
|
|
874
|
+
"jsonp",
|
|
875
|
+
"jsstacktrace",
|
|
876
|
+
"jsx",
|
|
877
|
+
"julia",
|
|
878
|
+
"keepalived",
|
|
879
|
+
"keyman",
|
|
880
|
+
"kotlin",
|
|
881
|
+
"kumir",
|
|
882
|
+
"kusto",
|
|
883
|
+
"latex",
|
|
884
|
+
"latte",
|
|
885
|
+
"less",
|
|
886
|
+
"lilypond",
|
|
887
|
+
"liquid",
|
|
888
|
+
"lisp",
|
|
889
|
+
"livescript",
|
|
890
|
+
"llvm",
|
|
891
|
+
"log",
|
|
892
|
+
"lolcode",
|
|
893
|
+
"lua",
|
|
894
|
+
"magma",
|
|
895
|
+
"makefile",
|
|
896
|
+
"markdown",
|
|
897
|
+
"markup",
|
|
898
|
+
"markup-templating",
|
|
899
|
+
"matlab",
|
|
900
|
+
"maxscript",
|
|
901
|
+
"mel",
|
|
902
|
+
"mermaid",
|
|
903
|
+
"mizar",
|
|
904
|
+
"mongodb",
|
|
905
|
+
"monkey",
|
|
906
|
+
"moonscript",
|
|
907
|
+
"n1ql",
|
|
908
|
+
"n4js",
|
|
909
|
+
"nand2tetris-hdl",
|
|
910
|
+
"naniscript",
|
|
911
|
+
"nasm",
|
|
912
|
+
"neon",
|
|
913
|
+
"nevod",
|
|
914
|
+
"nginx",
|
|
915
|
+
"nim",
|
|
916
|
+
"nix",
|
|
917
|
+
"nsis",
|
|
918
|
+
"objectivec",
|
|
919
|
+
"ocaml",
|
|
920
|
+
"opencl",
|
|
921
|
+
"openqasm",
|
|
922
|
+
"oz",
|
|
923
|
+
"parigp",
|
|
924
|
+
"parser",
|
|
925
|
+
"pascal",
|
|
926
|
+
"pascaligo",
|
|
927
|
+
"pcaxis",
|
|
928
|
+
"peoplecode",
|
|
929
|
+
"perl",
|
|
930
|
+
"php",
|
|
931
|
+
"php-extras",
|
|
932
|
+
"phpdoc",
|
|
933
|
+
"plsql",
|
|
934
|
+
"powerquery",
|
|
935
|
+
"powershell",
|
|
936
|
+
"processing",
|
|
937
|
+
"prolog",
|
|
938
|
+
"promql",
|
|
939
|
+
"properties",
|
|
940
|
+
"protobuf",
|
|
941
|
+
"psl",
|
|
942
|
+
"pug",
|
|
943
|
+
"puppet",
|
|
944
|
+
"pure",
|
|
945
|
+
"purebasic",
|
|
946
|
+
"purescript",
|
|
947
|
+
"python",
|
|
948
|
+
"q",
|
|
949
|
+
"qml",
|
|
950
|
+
"qore",
|
|
951
|
+
"qsharp",
|
|
952
|
+
"r",
|
|
953
|
+
"racket",
|
|
954
|
+
"reason",
|
|
955
|
+
"regex",
|
|
956
|
+
"rego",
|
|
957
|
+
"renpy",
|
|
958
|
+
"rest",
|
|
959
|
+
"rip",
|
|
960
|
+
"roboconf",
|
|
961
|
+
"robotframework",
|
|
962
|
+
"ruby",
|
|
963
|
+
"rust",
|
|
964
|
+
"sas",
|
|
965
|
+
"sass",
|
|
966
|
+
"scala",
|
|
967
|
+
"scheme",
|
|
968
|
+
"scss",
|
|
969
|
+
"shell-session",
|
|
970
|
+
"smali",
|
|
971
|
+
"smalltalk",
|
|
972
|
+
"smarty",
|
|
973
|
+
"sml",
|
|
974
|
+
"solidity",
|
|
975
|
+
"solution-file",
|
|
976
|
+
"soy",
|
|
977
|
+
"sparql",
|
|
978
|
+
"splunk-spl",
|
|
979
|
+
"sqf",
|
|
980
|
+
"sql",
|
|
981
|
+
"squirrel",
|
|
982
|
+
"stan",
|
|
983
|
+
"stylus",
|
|
984
|
+
"swift",
|
|
985
|
+
"systemd",
|
|
986
|
+
"t4-cs",
|
|
987
|
+
"t4-templating",
|
|
988
|
+
"t4-vb",
|
|
989
|
+
"tap",
|
|
990
|
+
"tcl",
|
|
991
|
+
"textile",
|
|
992
|
+
"toml",
|
|
993
|
+
"tremor",
|
|
994
|
+
"tsx",
|
|
995
|
+
"tt2",
|
|
996
|
+
"turtle",
|
|
997
|
+
"twig",
|
|
998
|
+
"typescript",
|
|
999
|
+
"typoscript",
|
|
1000
|
+
"unrealscript",
|
|
1001
|
+
"uorazor",
|
|
1002
|
+
"uri",
|
|
1003
|
+
"v",
|
|
1004
|
+
"vala",
|
|
1005
|
+
"vbnet",
|
|
1006
|
+
"velocity",
|
|
1007
|
+
"verilog",
|
|
1008
|
+
"vhdl",
|
|
1009
|
+
"vim",
|
|
1010
|
+
"visual-basic",
|
|
1011
|
+
"warpscript",
|
|
1012
|
+
"wasm",
|
|
1013
|
+
"web-idl",
|
|
1014
|
+
"wiki",
|
|
1015
|
+
"wolfram",
|
|
1016
|
+
"wren",
|
|
1017
|
+
"xeora",
|
|
1018
|
+
"xml-doc",
|
|
1019
|
+
"xojo",
|
|
1020
|
+
"xquery",
|
|
1021
|
+
"yaml",
|
|
1022
|
+
"yang",
|
|
1023
|
+
"zig",
|
|
1024
|
+
],
|
|
1025
|
+
]
|
|
1026
|
+
] = None,
|
|
1027
|
+
show_line_numbers: Optional[Union[Var[bool], bool]] = None,
|
|
1028
|
+
starting_line_number: Optional[Union[Var[int], int]] = None,
|
|
1029
|
+
wrap_long_lines: Optional[Union[Var[bool], bool]] = None,
|
|
1030
|
+
custom_style: Optional[Dict[str, str]] = None,
|
|
1031
|
+
code_tag_props: Optional[Union[Var[Dict[str, str]], Dict[str, str]]] = None,
|
|
1032
|
+
style: Optional[Style] = None,
|
|
1033
|
+
key: Optional[Any] = None,
|
|
1034
|
+
id: Optional[Any] = None,
|
|
1035
|
+
class_name: Optional[Any] = None,
|
|
1036
|
+
autofocus: Optional[bool] = None,
|
|
1037
|
+
custom_attrs: Optional[Dict[str, str]] = None,
|
|
1038
|
+
on_blur: Optional[
|
|
1039
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1040
|
+
] = None,
|
|
1041
|
+
on_click: Optional[
|
|
1042
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1043
|
+
] = None,
|
|
1044
|
+
on_context_menu: Optional[
|
|
1045
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1046
|
+
] = None,
|
|
1047
|
+
on_double_click: Optional[
|
|
1048
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1049
|
+
] = None,
|
|
1050
|
+
on_focus: Optional[
|
|
1051
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1052
|
+
] = None,
|
|
1053
|
+
on_mount: Optional[
|
|
1054
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1055
|
+
] = None,
|
|
1056
|
+
on_mouse_down: Optional[
|
|
1057
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1058
|
+
] = None,
|
|
1059
|
+
on_mouse_enter: Optional[
|
|
1060
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1061
|
+
] = None,
|
|
1062
|
+
on_mouse_leave: Optional[
|
|
1063
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1064
|
+
] = None,
|
|
1065
|
+
on_mouse_move: Optional[
|
|
1066
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1067
|
+
] = None,
|
|
1068
|
+
on_mouse_out: Optional[
|
|
1069
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1070
|
+
] = None,
|
|
1071
|
+
on_mouse_over: Optional[
|
|
1072
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1073
|
+
] = None,
|
|
1074
|
+
on_mouse_up: Optional[
|
|
1075
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1076
|
+
] = None,
|
|
1077
|
+
on_scroll: Optional[
|
|
1078
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1079
|
+
] = None,
|
|
1080
|
+
on_unmount: Optional[
|
|
1081
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1082
|
+
] = None,
|
|
1083
|
+
**props
|
|
1084
|
+
) -> "CodeBlock":
|
|
18
1085
|
"""Create a text component.
|
|
19
1086
|
|
|
20
1087
|
Args:
|
|
21
1088
|
*children: The children of the component.
|
|
1089
|
+
can_copy: Whether a copy button should appears.
|
|
1090
|
+
copy_button: A custom copy button to override the default one.
|
|
22
1091
|
theme: The theme to use ("light" or "dark").
|
|
23
1092
|
language: The language to use.
|
|
24
1093
|
show_line_numbers: If this is enabled line numbers will be shown next to the code block.
|
|
@@ -26,8 +1095,12 @@ class CodeBlock(Component):
|
|
|
26
1095
|
wrap_long_lines: Whether to wrap long lines.
|
|
27
1096
|
custom_style: A custom style for the code block.
|
|
28
1097
|
code_tag_props: Props passed down to the code tag.
|
|
29
|
-
|
|
30
|
-
|
|
1098
|
+
style: The style of the component.
|
|
1099
|
+
key: A unique key for the component.
|
|
1100
|
+
id: The id for the component.
|
|
1101
|
+
class_name: The class name for the component.
|
|
1102
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
1103
|
+
custom_attrs: custom attribute
|
|
31
1104
|
**props: The props to pass to the component.
|
|
32
1105
|
|
|
33
1106
|
Returns:
|
|
@@ -36,13 +1109,76 @@ class CodeBlock(Component):
|
|
|
36
1109
|
...
|
|
37
1110
|
|
|
38
1111
|
class Code(ChakraComponent):
|
|
1112
|
+
...
|
|
1113
|
+
|
|
39
1114
|
@overload
|
|
40
1115
|
@classmethod
|
|
41
|
-
def create(
|
|
1116
|
+
def create( # type: ignore
|
|
1117
|
+
cls,
|
|
1118
|
+
*children,
|
|
1119
|
+
style: Optional[Style] = None,
|
|
1120
|
+
key: Optional[Any] = None,
|
|
1121
|
+
id: Optional[Any] = None,
|
|
1122
|
+
class_name: Optional[Any] = None,
|
|
1123
|
+
autofocus: Optional[bool] = None,
|
|
1124
|
+
custom_attrs: Optional[Dict[str, str]] = None,
|
|
1125
|
+
on_blur: Optional[
|
|
1126
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1127
|
+
] = None,
|
|
1128
|
+
on_click: Optional[
|
|
1129
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1130
|
+
] = None,
|
|
1131
|
+
on_context_menu: Optional[
|
|
1132
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1133
|
+
] = None,
|
|
1134
|
+
on_double_click: Optional[
|
|
1135
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1136
|
+
] = None,
|
|
1137
|
+
on_focus: Optional[
|
|
1138
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1139
|
+
] = None,
|
|
1140
|
+
on_mount: Optional[
|
|
1141
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1142
|
+
] = None,
|
|
1143
|
+
on_mouse_down: Optional[
|
|
1144
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1145
|
+
] = None,
|
|
1146
|
+
on_mouse_enter: Optional[
|
|
1147
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1148
|
+
] = None,
|
|
1149
|
+
on_mouse_leave: Optional[
|
|
1150
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1151
|
+
] = None,
|
|
1152
|
+
on_mouse_move: Optional[
|
|
1153
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1154
|
+
] = None,
|
|
1155
|
+
on_mouse_out: Optional[
|
|
1156
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1157
|
+
] = None,
|
|
1158
|
+
on_mouse_over: Optional[
|
|
1159
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1160
|
+
] = None,
|
|
1161
|
+
on_mouse_up: Optional[
|
|
1162
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1163
|
+
] = None,
|
|
1164
|
+
on_scroll: Optional[
|
|
1165
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1166
|
+
] = None,
|
|
1167
|
+
on_unmount: Optional[
|
|
1168
|
+
Union[EventHandler, EventSpec, List, function, BaseVar]
|
|
1169
|
+
] = None,
|
|
1170
|
+
**props
|
|
1171
|
+
) -> "Code":
|
|
42
1172
|
"""Create the component.
|
|
43
1173
|
|
|
44
1174
|
Args:
|
|
45
1175
|
*children: The children of the component.
|
|
1176
|
+
style: The style of the component.
|
|
1177
|
+
key: A unique key for the component.
|
|
1178
|
+
id: The id for the component.
|
|
1179
|
+
class_name: The class name for the component.
|
|
1180
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
1181
|
+
custom_attrs: custom attribute
|
|
46
1182
|
**props: The props of the component.
|
|
47
1183
|
|
|
48
1184
|
Returns:
|