HTML Refactor (#2164)
This commit is contained in:
parent
1b402b65be
commit
88a3276356
@ -79,3 +79,14 @@ pre-commit install
|
||||
```
|
||||
|
||||
That's it you can now submit your PR. Thanks for contributing to Reflex!
|
||||
|
||||
|
||||
## Other Notes
|
||||
|
||||
For some pull requests when adding new components you will have to generate a pyi file for the new component. This is done by running the following command in the `reflex` directory.
|
||||
|
||||
(Please check in with the team before adding a new component to Reflex we are cautious about adding new components to Reflex's core.)
|
||||
|
||||
``` bash
|
||||
poetry run python scripts/pyi_generator.py
|
||||
```
|
@ -255,7 +255,7 @@ _MAPPING = {
|
||||
"reflex.components.graphing": ["recharts"],
|
||||
"reflex.config": ["config", "Config", "DBConfig"],
|
||||
"reflex.constants": ["constants", "Env"],
|
||||
"reflex.el": ["el"],
|
||||
"reflex.components.el": ["el"],
|
||||
"reflex.event": [
|
||||
"event",
|
||||
"EventChain",
|
||||
|
@ -447,7 +447,7 @@ from reflex.config import Config as Config
|
||||
from reflex.config import DBConfig as DBConfig
|
||||
from reflex import constants as constants
|
||||
from reflex.constants import Env as Env
|
||||
from reflex import el as el
|
||||
from reflex.components import el as el
|
||||
from reflex import event as event
|
||||
from reflex.event import EventChain as EventChain
|
||||
from reflex.event import background as background
|
||||
|
@ -283,7 +283,7 @@ class DataEditor(NoSSRComponent):
|
||||
Returns:
|
||||
The DataEditor component.&
|
||||
"""
|
||||
from reflex.el.elements import Div
|
||||
from reflex.components.el import Div
|
||||
|
||||
columns = props.get("columns", [])
|
||||
data = props.get("data", [])
|
||||
@ -339,7 +339,7 @@ class DataEditor(NoSSRComponent):
|
||||
Returns:
|
||||
The app wrap components.
|
||||
"""
|
||||
from reflex.el.elements import Div
|
||||
from reflex.components.el import Div
|
||||
|
||||
class Portal(Div):
|
||||
def get_ref(self):
|
||||
|
91
reflex/components/el/element.pyi
Normal file
91
reflex/components/el/element.pyi
Normal file
@ -0,0 +1,91 @@
|
||||
"""Stub file for reflex/components/el/element.py"""
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `scripts/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from typing import Dict
|
||||
from reflex.components.component import Component
|
||||
|
||||
class Element(Component):
|
||||
def render(self) -> Dict: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Element":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
226
reflex/components/el/elements/__init__.py
Normal file
226
reflex/components/el/elements/__init__.py
Normal file
@ -0,0 +1,226 @@
|
||||
"""Element classes."""
|
||||
from .forms import (
|
||||
Button,
|
||||
Fieldset,
|
||||
Form,
|
||||
Input,
|
||||
Label,
|
||||
Legend,
|
||||
Meter,
|
||||
Optgroup,
|
||||
Option,
|
||||
Output,
|
||||
Progress,
|
||||
Select,
|
||||
Textarea,
|
||||
)
|
||||
from .inline import (
|
||||
A,
|
||||
Abbr,
|
||||
B,
|
||||
Bdi,
|
||||
Bdo,
|
||||
Br,
|
||||
Cite,
|
||||
Code,
|
||||
Data,
|
||||
Dfn,
|
||||
Em,
|
||||
I,
|
||||
Kbd,
|
||||
Mark,
|
||||
Q,
|
||||
Rp,
|
||||
Rt,
|
||||
Ruby,
|
||||
S,
|
||||
Samp,
|
||||
Small,
|
||||
Span,
|
||||
Strong,
|
||||
Sub,
|
||||
Sup,
|
||||
Time,
|
||||
U,
|
||||
Wbr,
|
||||
)
|
||||
from .media import (
|
||||
Area,
|
||||
Audio,
|
||||
Embed,
|
||||
Iframe,
|
||||
Img,
|
||||
Map,
|
||||
Object,
|
||||
Path,
|
||||
Picture,
|
||||
Portal,
|
||||
Source,
|
||||
Svg,
|
||||
Track,
|
||||
Video,
|
||||
)
|
||||
from .metadata import Base, Head, Link, Meta, Title
|
||||
from .other import Details, Dialog, Html, Math, Slot, Summary, Template
|
||||
from .scripts import Canvas, Noscript, Script
|
||||
from .sectioning import (
|
||||
H1,
|
||||
H2,
|
||||
H3,
|
||||
H4,
|
||||
H5,
|
||||
H6,
|
||||
Address,
|
||||
Article,
|
||||
Aside,
|
||||
Body,
|
||||
Footer,
|
||||
Header,
|
||||
Main,
|
||||
Nav,
|
||||
Section,
|
||||
)
|
||||
from .tables import Caption, Col, Colgroup, Table, Tbody, Td, Tfoot, Th, Thead, Tr
|
||||
from .typography import (
|
||||
Blockquote,
|
||||
Dd,
|
||||
Del,
|
||||
Div,
|
||||
Dl,
|
||||
Dt,
|
||||
Figcaption,
|
||||
Hr,
|
||||
Ins,
|
||||
Li,
|
||||
Ol,
|
||||
P,
|
||||
Pre,
|
||||
Ul,
|
||||
)
|
||||
|
||||
# Forms
|
||||
button = Button.create
|
||||
fieldset = Fieldset.create
|
||||
form = Form.create
|
||||
input = Input.create
|
||||
label = Label.create
|
||||
legend = Legend.create
|
||||
meter = Meter.create
|
||||
optgroup = Optgroup.create
|
||||
option = Option.create
|
||||
output = Output.create
|
||||
progress = Progress.create
|
||||
select = Select.create
|
||||
textarea = Textarea.create
|
||||
|
||||
# Tables
|
||||
caption = Caption.create
|
||||
col = Col.create
|
||||
colgroup = Colgroup.create
|
||||
table = Table.create
|
||||
tbody = Tbody.create
|
||||
td = Td.create
|
||||
tfoot = Tfoot.create
|
||||
th = Th.create
|
||||
thead = Thead.create
|
||||
tr = Tr.create
|
||||
|
||||
# Media
|
||||
area = Area.create
|
||||
audio = Audio.create
|
||||
img = Img.create
|
||||
map = Map.create
|
||||
track = Track.create
|
||||
video = Video.create
|
||||
embed = Embed.create
|
||||
iframe = Iframe.create
|
||||
object = Object.create
|
||||
picture = Picture.create
|
||||
portal = Portal.create
|
||||
source = Source.create
|
||||
svg = Svg.create
|
||||
path = Path.create
|
||||
|
||||
# Sectioning
|
||||
address = Address.create
|
||||
article = Article.create
|
||||
aside = Aside.create
|
||||
body = Body.create
|
||||
footer = Footer.create
|
||||
|
||||
# Typography
|
||||
blockquote = Blockquote.create
|
||||
dd = Dd.create
|
||||
div = Div.create
|
||||
dl = Dl.create
|
||||
dt = Dt.create
|
||||
figcaption = Figcaption.create
|
||||
hr = Hr.create
|
||||
li = Li.create
|
||||
ol = Ol.create
|
||||
p = P.create
|
||||
pre = Pre.create
|
||||
ul = Ul.create
|
||||
ins = Ins.create
|
||||
del_ = Del.create # 'del' is a reserved keyword in Python
|
||||
h1 = H1.create
|
||||
h2 = H2.create
|
||||
h3 = H3.create
|
||||
h4 = H4.create
|
||||
h5 = H5.create
|
||||
h6 = H6.create
|
||||
main = Main.create
|
||||
nav = Nav.create
|
||||
section = Section.create
|
||||
|
||||
# Inline
|
||||
a = A.create
|
||||
abbr = Abbr.create
|
||||
b = B.create
|
||||
bdi = Bdi.create
|
||||
bdo = Bdo.create
|
||||
br = Br.create
|
||||
cite = Cite.create
|
||||
code = Code.create
|
||||
data = Data.create
|
||||
dfn = Dfn.create
|
||||
em = Em.create
|
||||
i = I.create
|
||||
kbd = Kbd.create
|
||||
mark = Mark.create
|
||||
q = Q.create
|
||||
rp = Rp.create
|
||||
rt = Rt.create
|
||||
ruby = Ruby.create
|
||||
s = S.create
|
||||
samp = Samp.create
|
||||
small = Small.create
|
||||
span = Span.create
|
||||
strong = Strong.create
|
||||
sub = Sub.create
|
||||
sup = Sup.create
|
||||
time = Time.create
|
||||
u = U.create
|
||||
wbr = Wbr.create
|
||||
|
||||
# Metadata
|
||||
base = Base.create
|
||||
head = Head.create
|
||||
link = Link.create
|
||||
meta = Meta.create
|
||||
title = Title.create
|
||||
|
||||
# Scripts
|
||||
canvas = Canvas.create
|
||||
noscript = Noscript.create
|
||||
script = Script.create
|
||||
|
||||
# Other
|
||||
details = Details.create
|
||||
dialog = Dialog.create
|
||||
summary = Summary.create
|
||||
slot = Slot.create
|
||||
template = Template.create
|
||||
svg = Svg.create
|
||||
math = Math.create
|
||||
html = Html.create
|
60
reflex/components/el/elements/base.py
Normal file
60
reflex/components/el/elements/base.py
Normal file
@ -0,0 +1,60 @@
|
||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||
from typing import Union
|
||||
|
||||
from reflex.components.el.element import Element
|
||||
from reflex.vars import Var as Var
|
||||
|
||||
|
||||
class BaseHTML(Element):
|
||||
"""Base class for common attributes."""
|
||||
|
||||
# Provides a hint for generating a keyboard shortcut for the current element.
|
||||
access_key: Var[Union[str, int, bool]]
|
||||
|
||||
# Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
auto_capitalize: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the element's content is editable.
|
||||
content_editable: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
context_menu: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
dir: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines whether the element can be dragged.
|
||||
draggable: Var[Union[str, int, bool]]
|
||||
|
||||
# Hints what media types the media element is able to play.
|
||||
enter_key_hint: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines whether the element is hidden.
|
||||
hidden: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the type of the element.
|
||||
input_mode: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the name of the element for metadata purposes.
|
||||
item_prop: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the language used in the element.
|
||||
lang: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the role of the element.
|
||||
role: Var[Union[str, int, bool]]
|
||||
|
||||
# Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
slot: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines whether the element may be checked for spelling errors.
|
||||
spell_check: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the position of the current element in the tabbing order.
|
||||
tab_index: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines a tooltip for the element.
|
||||
title: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies whether the content of an element should be translated or not.
|
||||
translate: Var[Union[str, int, bool]]
|
151
reflex/components/el/elements/base.pyi
Normal file
151
reflex/components/el/elements/base.pyi
Normal file
@ -0,0 +1,151 @@
|
||||
"""Stub file for reflex/components/el/elements/base.py"""
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `scripts/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from typing import Union
|
||||
from reflex.components.el.element import Element
|
||||
from reflex.vars import Var as Var
|
||||
|
||||
class BaseHTML(Element):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "BaseHTML":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
390
reflex/components/el/elements/forms.py
Normal file
390
reflex/components/el/elements/forms.py
Normal file
@ -0,0 +1,390 @@
|
||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||
from typing import Union
|
||||
|
||||
from reflex.components.el.element import Element
|
||||
from reflex.vars import Var
|
||||
|
||||
from .base import BaseHTML
|
||||
|
||||
|
||||
class Button(BaseHTML):
|
||||
"""Display the button element."""
|
||||
|
||||
tag = "button"
|
||||
|
||||
# Automatically focuses the button when the page loads
|
||||
auto_focus: Var[Union[str, int, bool]]
|
||||
|
||||
# Disables the button
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the button with a form (by id)
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# URL to send the form data to (for type="submit" buttons)
|
||||
form_action: Var[Union[str, int, bool]]
|
||||
|
||||
# How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
||||
form_enc_type: Var[Union[str, int, bool]]
|
||||
|
||||
# HTTP method to use for sending form data (for type="submit" buttons)
|
||||
form_method: Var[Union[str, int, bool]]
|
||||
|
||||
# Bypasses form validation when submitting (for type="submit" buttons)
|
||||
form_no_validate: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies where to display the response after submitting the form (for type="submit" buttons)
|
||||
form_target: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the button, used when sending form data
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Type of the button (submit, reset, or button)
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
# Value of the button, used when sending form data
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Datalist(BaseHTML):
|
||||
"""Display the datalist element."""
|
||||
|
||||
tag = "datalist"
|
||||
# No unique attributes, only common ones are inherited
|
||||
|
||||
|
||||
class Fieldset(Element):
|
||||
"""Display the fieldset element."""
|
||||
|
||||
tag = "fieldset"
|
||||
|
||||
# Disables all the form control descendants of the fieldset
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the fieldset with a form (by id)
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the fieldset, used for scripting
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Form(BaseHTML):
|
||||
"""Display the form element."""
|
||||
|
||||
tag = "form"
|
||||
|
||||
# MIME types the server accepts for file upload
|
||||
accept: Var[Union[str, int, bool]]
|
||||
|
||||
# Character encodings to be used for form submission
|
||||
accept_charset: Var[Union[str, int, bool]]
|
||||
|
||||
# URL where the form's data should be submitted
|
||||
action: Var[Union[str, int, bool]]
|
||||
|
||||
# Whether the form should have autocomplete enabled
|
||||
auto_complete: Var[Union[str, int, bool]]
|
||||
|
||||
# Encoding type for the form data when submitted
|
||||
enc_type: Var[Union[str, int, bool]]
|
||||
|
||||
# HTTP method to use for form submission
|
||||
method: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the form
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the form should not be validated on submit
|
||||
no_validate: Var[Union[str, int, bool]]
|
||||
|
||||
# Where to display the response after submitting the form
|
||||
target: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Input(BaseHTML):
|
||||
"""Display the input element."""
|
||||
|
||||
tag = "input"
|
||||
|
||||
# Accepted types of files when the input is file type
|
||||
accept: Var[Union[str, int, bool]]
|
||||
|
||||
# Alternate text for input type="image"
|
||||
alt: Var[Union[str, int, bool]]
|
||||
|
||||
# Whether the input should have autocomplete enabled
|
||||
auto_complete: Var[Union[str, int, bool]]
|
||||
|
||||
# Automatically focuses the input when the page loads
|
||||
auto_focus: Var[Union[str, int, bool]]
|
||||
|
||||
# Captures media from the user (camera or microphone)
|
||||
capture: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the input is checked (for checkboxes and radio buttons)
|
||||
checked: Var[Union[str, int, bool]]
|
||||
|
||||
# Name part of the input to submit in 'dir' and 'name' pair when form is submitted
|
||||
dirname: Var[Union[str, int, bool]]
|
||||
|
||||
# Disables the input
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the input with a form (by id)
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# URL to send the form data to (for type="submit" buttons)
|
||||
form_action: Var[Union[str, int, bool]]
|
||||
|
||||
# How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
||||
form_enc_type: Var[Union[str, int, bool]]
|
||||
|
||||
# HTTP method to use for sending form data (for type="submit" buttons)
|
||||
form_method: Var[Union[str, int, bool]]
|
||||
|
||||
# Bypasses form validation when submitting (for type="submit" buttons)
|
||||
form_no_validate: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies where to display the response after submitting the form (for type="submit" buttons)
|
||||
form_target: Var[Union[str, int, bool]]
|
||||
|
||||
# The height of the input (only for type="image")
|
||||
height: Var[Union[str, int, bool]]
|
||||
|
||||
# References a datalist for suggested options
|
||||
list: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the maximum value for the input
|
||||
max: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the maximum number of characters allowed in the input
|
||||
max_length: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the minimum number of characters required in the input
|
||||
min_length: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the minimum value for the input
|
||||
min: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether multiple values can be entered in an input of the type email or file
|
||||
multiple: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the input, used when sending form data
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Regex pattern the input's value must match to be valid
|
||||
pattern: Var[Union[str, int, bool]]
|
||||
|
||||
# Placeholder text in the input
|
||||
placeholder: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the input is read-only
|
||||
read_only: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the input is required
|
||||
required: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the visible width of a text control
|
||||
size: Var[Union[str, int, bool]]
|
||||
|
||||
# URL for image inputs
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the legal number intervals for an input
|
||||
step: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the type of input
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the image map used with the input
|
||||
use_map: Var[Union[str, int, bool]]
|
||||
|
||||
# Value of the input
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
# The width of the input (only for type="image")
|
||||
width: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Label(BaseHTML):
|
||||
"""Display the label element."""
|
||||
|
||||
tag = "label"
|
||||
|
||||
# ID of a form control with which the label is associated
|
||||
html_for: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the label with a form (by id)
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Legend(BaseHTML):
|
||||
"""Display the legend element."""
|
||||
|
||||
tag = "legend"
|
||||
# No unique attributes, only common ones are inherited
|
||||
|
||||
|
||||
class Meter(BaseHTML):
|
||||
"""Display the meter element."""
|
||||
|
||||
tag = "meter"
|
||||
|
||||
# Associates the meter with a form (by id)
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# High limit of range (above this is considered high value)
|
||||
high: Var[Union[str, int, bool]]
|
||||
|
||||
# Low limit of range (below this is considered low value)
|
||||
low: Var[Union[str, int, bool]]
|
||||
|
||||
# Maximum value of the range
|
||||
max: Var[Union[str, int, bool]]
|
||||
|
||||
# Minimum value of the range
|
||||
min: Var[Union[str, int, bool]]
|
||||
|
||||
# Optimum value in the range
|
||||
optimum: Var[Union[str, int, bool]]
|
||||
|
||||
# Current value of the meter
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Optgroup(BaseHTML):
|
||||
"""Display the optgroup element."""
|
||||
|
||||
tag = "optgroup"
|
||||
|
||||
# Disables the optgroup
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Label for the optgroup
|
||||
label: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Option(BaseHTML):
|
||||
"""Display the option element."""
|
||||
|
||||
tag = "option"
|
||||
|
||||
# Disables the option
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Label for the option, if the text is not the label
|
||||
label: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the option is initially selected
|
||||
selected: Var[Union[str, int, bool]]
|
||||
|
||||
# Value to be sent as form data
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Output(BaseHTML):
|
||||
"""Display the output element."""
|
||||
|
||||
tag = "output"
|
||||
|
||||
# Associates the output with one or more elements (by their IDs)
|
||||
html_for: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the output with a form (by id)
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the output element for form submission
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Progress(BaseHTML):
|
||||
"""Display the progress element."""
|
||||
|
||||
tag = "progress"
|
||||
|
||||
# Associates the progress element with a form (by id)
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Maximum value of the progress indicator
|
||||
max: Var[Union[str, int, bool]]
|
||||
|
||||
# Current value of the progress indicator
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Select(BaseHTML):
|
||||
"""Display the select element."""
|
||||
|
||||
tag = "select"
|
||||
|
||||
# Whether the form control should have autocomplete enabled
|
||||
auto_complete: Var[Union[str, int, bool]]
|
||||
|
||||
# Automatically focuses the select when the page loads
|
||||
auto_focus: Var[Union[str, int, bool]]
|
||||
|
||||
# Disables the select control
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the select with a form (by id)
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that multiple options can be selected
|
||||
multiple: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the select, used when submitting the form
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the select control must have a selected option
|
||||
required: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of visible options in a drop-down list
|
||||
size: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Textarea(BaseHTML):
|
||||
"""Display the textarea element."""
|
||||
|
||||
tag = "textarea"
|
||||
|
||||
# Whether the form control should have autocomplete enabled
|
||||
auto_complete: Var[Union[str, int, bool]]
|
||||
|
||||
# Automatically focuses the textarea when the page loads
|
||||
auto_focus: Var[Union[str, int, bool]]
|
||||
|
||||
# Visible width of the text control, in average character widths
|
||||
cols: Var[Union[str, int, bool]]
|
||||
|
||||
# Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted
|
||||
dirname: Var[Union[str, int, bool]]
|
||||
|
||||
# Disables the textarea
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the textarea with a form (by id)
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Maximum number of characters allowed in the textarea
|
||||
max_length: Var[Union[str, int, bool]]
|
||||
|
||||
# Minimum number of characters required in the textarea
|
||||
min_length: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the textarea, used when submitting the form
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Placeholder text in the textarea
|
||||
placeholder: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the textarea is read-only
|
||||
read_only: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the textarea is required
|
||||
required: Var[Union[str, int, bool]]
|
||||
|
||||
# Visible number of lines in the text control
|
||||
rows: Var[Union[str, int, bool]]
|
||||
|
||||
# How the text in the textarea is to be wrapped when submitting the form
|
||||
wrap: Var[Union[str, int, bool]]
|
2227
reflex/components/el/elements/forms.pyi
Normal file
2227
reflex/components/el/elements/forms.pyi
Normal file
File diff suppressed because it is too large
Load Diff
206
reflex/components/el/elements/inline.py
Normal file
206
reflex/components/el/elements/inline.py
Normal file
@ -0,0 +1,206 @@
|
||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars import Var
|
||||
|
||||
from .base import BaseHTML
|
||||
|
||||
|
||||
class A(BaseHTML): # Inherits common attributes from BaseMeta
|
||||
"""Display the 'a' element."""
|
||||
|
||||
tag = "a"
|
||||
|
||||
# Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink.
|
||||
download: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the URL of the page the link goes to
|
||||
href: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the language of the linked document
|
||||
href_lang: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies what media/device the linked document is optimized for
|
||||
media: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies which referrer is sent when fetching the resource
|
||||
ping: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the relationship between the current document and the linked document
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the relationship between the linked document and the current document
|
||||
rel: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the shape of the area
|
||||
shape: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies where to open the linked document
|
||||
target: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Abbr(BaseHTML):
|
||||
"""Display the abbr element."""
|
||||
|
||||
tag = "abbr"
|
||||
|
||||
|
||||
class B(BaseHTML):
|
||||
"""Display the b element."""
|
||||
|
||||
tag = "b"
|
||||
|
||||
|
||||
class Bdi(BaseHTML):
|
||||
"""Display the bdi element."""
|
||||
|
||||
tag = "bdi"
|
||||
|
||||
|
||||
class Bdo(BaseHTML):
|
||||
"""Display the bdo element."""
|
||||
|
||||
tag = "bdo"
|
||||
|
||||
|
||||
class Br(BaseHTML):
|
||||
"""Display the br element."""
|
||||
|
||||
tag = "br"
|
||||
|
||||
|
||||
class Cite(BaseHTML):
|
||||
"""Display the cite element."""
|
||||
|
||||
tag = "cite"
|
||||
|
||||
|
||||
class Code(BaseHTML):
|
||||
"""Display the code element."""
|
||||
|
||||
tag = "code"
|
||||
|
||||
|
||||
class Data(BaseHTML):
|
||||
"""Display the data element."""
|
||||
|
||||
tag = "data"
|
||||
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Dfn(BaseHTML):
|
||||
"""Display the dfn element."""
|
||||
|
||||
tag = "dfn"
|
||||
|
||||
|
||||
class Em(BaseHTML):
|
||||
"""Display the em element."""
|
||||
|
||||
tag = "em"
|
||||
|
||||
|
||||
class I(BaseHTML): # noqa: E742
|
||||
"""Display the i element."""
|
||||
|
||||
tag = "i"
|
||||
|
||||
|
||||
class Kbd(BaseHTML):
|
||||
"""Display the kbd element."""
|
||||
|
||||
tag = "kbd"
|
||||
|
||||
|
||||
class Mark(BaseHTML):
|
||||
"""Display the mark element."""
|
||||
|
||||
tag = "mark"
|
||||
|
||||
|
||||
class Q(BaseHTML):
|
||||
"""Display the q element."""
|
||||
|
||||
tag = "q"
|
||||
|
||||
cite: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Rp(BaseHTML):
|
||||
"""Display the rp element."""
|
||||
|
||||
tag = "rp"
|
||||
|
||||
|
||||
class Rt(BaseHTML):
|
||||
"""Display the rt element."""
|
||||
|
||||
tag = "rt"
|
||||
|
||||
|
||||
class Ruby(BaseHTML):
|
||||
"""Display the ruby element."""
|
||||
|
||||
tag = "ruby"
|
||||
|
||||
|
||||
class S(BaseHTML):
|
||||
"""Display the s element."""
|
||||
|
||||
tag = "s"
|
||||
|
||||
|
||||
class Samp(BaseHTML):
|
||||
"""Display the samp element."""
|
||||
|
||||
tag = "samp"
|
||||
|
||||
|
||||
class Small(BaseHTML):
|
||||
"""Display the small element."""
|
||||
|
||||
tag = "small"
|
||||
|
||||
|
||||
class Span(BaseHTML):
|
||||
"""Display the span element."""
|
||||
|
||||
tag = "span"
|
||||
|
||||
|
||||
class Strong(BaseHTML):
|
||||
"""Display the strong element."""
|
||||
|
||||
tag = "strong"
|
||||
|
||||
|
||||
class Sub(BaseHTML):
|
||||
"""Display the sub element."""
|
||||
|
||||
tag = "sub"
|
||||
|
||||
|
||||
class Sup(BaseHTML):
|
||||
"""Display the sup element."""
|
||||
|
||||
tag = "sup"
|
||||
|
||||
|
||||
class Time(BaseHTML):
|
||||
"""Display the time element."""
|
||||
|
||||
tag = "time"
|
||||
date_time: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class U(BaseHTML):
|
||||
"""Display the u element."""
|
||||
|
||||
tag = "u"
|
||||
|
||||
|
||||
class Wbr(BaseHTML):
|
||||
"""Display the wbr element."""
|
||||
|
||||
tag = "wbr"
|
3941
reflex/components/el/elements/inline.pyi
Normal file
3941
reflex/components/el/elements/inline.pyi
Normal file
File diff suppressed because it is too large
Load Diff
341
reflex/components/el/elements/media.py
Normal file
341
reflex/components/el/elements/media.py
Normal file
@ -0,0 +1,341 @@
|
||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars import Var as Var
|
||||
|
||||
from .base import BaseHTML
|
||||
|
||||
|
||||
class Area(BaseHTML):
|
||||
"""Display the area element."""
|
||||
|
||||
tag = "area"
|
||||
|
||||
# Alternate text for the area, used for accessibility
|
||||
alt: Var[Union[str, int, bool]]
|
||||
|
||||
# Coordinates to define the shape of the area
|
||||
coords: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies that the target will be downloaded when clicked
|
||||
download: Var[Union[str, int, bool]]
|
||||
|
||||
# Hyperlink reference for the area
|
||||
href: Var[Union[str, int, bool]]
|
||||
|
||||
# Language of the linked resource
|
||||
href_lang: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies what media/device the linked resource is optimized for
|
||||
media: Var[Union[str, int, bool]]
|
||||
|
||||
# A list of URLs to be notified if the user follows the hyperlink
|
||||
ping: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies which referrer information to send with the link
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the relationship of the target object to the link object
|
||||
rel: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the shape of the area (rectangle, circle, polygon)
|
||||
shape: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies where to open the linked document
|
||||
target: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Audio(BaseHTML):
|
||||
"""Display the audio element."""
|
||||
|
||||
tag = "audio"
|
||||
|
||||
# Specifies that the audio will start playing as soon as it is ready
|
||||
auto_play: Var[Union[str, int, bool]]
|
||||
|
||||
# Represents the time range of the buffered media
|
||||
buffered: Var[Union[str, int, bool]]
|
||||
|
||||
# Displays the standard audio controls
|
||||
controls: Var[Union[str, int, bool]]
|
||||
|
||||
# Configures the CORS requests for the element
|
||||
cross_origin: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies that the audio will loop
|
||||
loop: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the audio is muted by default
|
||||
muted: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies how the audio file should be preloaded
|
||||
preload: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the audio to play
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Img(BaseHTML):
|
||||
"""Display the img element."""
|
||||
|
||||
tag = "img"
|
||||
|
||||
# Image alignment with respect to its surrounding elements
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Alternative text for the image
|
||||
alt: Var[Union[str, int, bool]]
|
||||
|
||||
# Border width around the image
|
||||
border: Var[Union[str, int, bool]]
|
||||
|
||||
# Configures the CORS requests for the image
|
||||
cross_origin: Var[Union[str, int, bool]]
|
||||
|
||||
# How the image should be decoded
|
||||
decoding: Var[Union[str, int, bool]]
|
||||
|
||||
# The intrinsic height of the image
|
||||
height: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies an intrinsic size for the image
|
||||
intrinsicsize: Var[Union[str, int, bool]]
|
||||
|
||||
# Whether the image is a server-side image map
|
||||
ismap: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the loading behavior of the image
|
||||
loading: Var[Union[str, int, bool]]
|
||||
|
||||
# Referrer policy for the image
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# Sizes of the image for different layouts
|
||||
sizes: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the image to display
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# A set of source sizes and URLs for responsive images
|
||||
src_set: Var[Union[str, int, bool]]
|
||||
|
||||
# The name of the map to use with the image
|
||||
use_map: Var[Union[str, int, bool]]
|
||||
|
||||
# The intrinsic width of the image
|
||||
width: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Map(BaseHTML):
|
||||
"""Display the map element."""
|
||||
|
||||
tag = "map"
|
||||
|
||||
# Name of the map, referenced by the 'usemap' attribute in 'img' and 'object' elements
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Track(BaseHTML):
|
||||
"""Display the track element."""
|
||||
|
||||
tag = "track"
|
||||
|
||||
# Indicates that the track should be enabled unless the user's preferences indicate otherwise
|
||||
default: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the kind of text track
|
||||
kind: Var[Union[str, int, bool]]
|
||||
|
||||
# Title of the text track, used by the browser when listing available text tracks
|
||||
label: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the track file
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# Language of the track text data
|
||||
src_lang: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Video(BaseHTML):
|
||||
"""Display the video element."""
|
||||
|
||||
tag = "video"
|
||||
|
||||
# Specifies that the video will start playing as soon as it is ready
|
||||
auto_play: Var[Union[str, int, bool]]
|
||||
|
||||
# Represents the time range of the buffered media
|
||||
buffered: Var[Union[str, int, bool]]
|
||||
|
||||
# Displays the standard video controls
|
||||
controls: Var[Union[str, int, bool]]
|
||||
|
||||
# Configures the CORS requests for the video
|
||||
cross_origin: Var[Union[str, int, bool]]
|
||||
|
||||
# The intrinsic height of the video
|
||||
height: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies that the video will loop
|
||||
loop: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the video is muted by default
|
||||
muted: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the video should play 'inline', inside its element's playback area
|
||||
plays_inline: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of an image to show while the video is downloading, or until the user hits the play button
|
||||
poster: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies how the video file should be preloaded
|
||||
preload: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the video to play
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# The intrinsic width of the video
|
||||
width: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Embed(BaseHTML):
|
||||
"""Display the embed element."""
|
||||
|
||||
tag = "embed"
|
||||
|
||||
# The intrinsic height of the embedded content
|
||||
height: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the embedded content
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# Media type of the embedded content
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
# The intrinsic width of the embedded content
|
||||
width: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Iframe(BaseHTML):
|
||||
"""Display the iframe element."""
|
||||
|
||||
tag = "iframe"
|
||||
|
||||
# Alignment of the iframe within the page or surrounding elements
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Permissions policy for the iframe
|
||||
allow: Var[Union[str, int, bool]]
|
||||
|
||||
# Content Security Policy to apply to the iframe's content
|
||||
csp: Var[Union[str, int, bool]]
|
||||
|
||||
# The height of the iframe
|
||||
height: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the loading behavior of the iframe
|
||||
loading: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the iframe, used as a target for hyperlinks and forms
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Referrer policy for the iframe
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# Security restrictions for the content in the iframe
|
||||
sandbox: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the document to display in the iframe
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# HTML content to embed directly within the iframe
|
||||
src_doc: Var[Union[str, int, bool]]
|
||||
|
||||
# The width of the iframe
|
||||
width: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Object(BaseHTML):
|
||||
"""Display the object element."""
|
||||
|
||||
tag = "object"
|
||||
|
||||
# Border width around the object
|
||||
border: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the data to be used by the object
|
||||
data: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the object with a form element
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# The intrinsic height of the object
|
||||
height: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the object, used for scripting or as a target for forms and links
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Media type of the data specified in the data attribute
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of an image map to use with the object
|
||||
use_map: Var[Union[str, int, bool]]
|
||||
|
||||
# The intrinsic width of the object
|
||||
width: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Picture(BaseHTML):
|
||||
"""Display the picture element."""
|
||||
|
||||
tag = "picture"
|
||||
# No unique attributes, only common ones are inherited
|
||||
|
||||
|
||||
class Portal(BaseHTML):
|
||||
"""Display the portal element."""
|
||||
|
||||
tag = "portal"
|
||||
# No unique attributes, only common ones are inherited
|
||||
|
||||
|
||||
class Source(BaseHTML):
|
||||
"""Display the source element."""
|
||||
|
||||
tag = "source"
|
||||
|
||||
# Media query indicating what device the linked resource is optimized for
|
||||
media: Var[Union[str, int, bool]]
|
||||
|
||||
# Sizes of the source for different layouts
|
||||
sizes: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the media file or an image for the element to use
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# A set of source sizes and URLs for responsive images
|
||||
src_set: Var[Union[str, int, bool]]
|
||||
|
||||
# Media type of the source
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Svg(BaseHTML):
|
||||
"""Display the svg element."""
|
||||
|
||||
tag = "svg"
|
||||
|
||||
# Specifies the width of the element
|
||||
width: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the height of the element
|
||||
height: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Path(BaseHTML):
|
||||
"""Display the path element."""
|
||||
|
||||
tag = "path"
|
||||
|
||||
# Defines the shape of the path
|
||||
d: Var[Union[str, int, bool]]
|
2240
reflex/components/el/elements/media.pyi
Normal file
2240
reflex/components/el/elements/media.pyi
Normal file
File diff suppressed because it is too large
Load Diff
55
reflex/components/el/elements/metadata.py
Normal file
55
reflex/components/el/elements/metadata.py
Normal file
@ -0,0 +1,55 @@
|
||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||
from typing import Union
|
||||
|
||||
from reflex.components.el.element import Element
|
||||
from reflex.vars import Var as Var
|
||||
|
||||
from .base import BaseHTML
|
||||
|
||||
|
||||
class Base(BaseHTML): # noqa: E742
|
||||
"""Display the base element."""
|
||||
|
||||
tag = "base"
|
||||
|
||||
tag = "base"
|
||||
href: Var[Union[str, int, bool]]
|
||||
target: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Head(BaseHTML): # noqa: E742
|
||||
"""Display the head element."""
|
||||
|
||||
tag = "head"
|
||||
|
||||
|
||||
class Link(BaseHTML): # noqa: E742
|
||||
"""Display the link element."""
|
||||
|
||||
tag = "link"
|
||||
|
||||
cross_origin: Var[Union[str, int, bool]]
|
||||
href: Var[Union[str, int, bool]]
|
||||
href_lang: Var[Union[str, int, bool]]
|
||||
integrity: Var[Union[str, int, bool]]
|
||||
media: Var[Union[str, int, bool]]
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
rel: Var[Union[str, int, bool]]
|
||||
sizes: Var[Union[str, int, bool]]
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Meta(BaseHTML): # Inherits common attributes from BaseHTML
|
||||
"""Display the meta element."""
|
||||
|
||||
tag = "meta"
|
||||
char_set: Var[Union[str, int, bool]]
|
||||
content: Var[Union[str, int, bool]]
|
||||
http_equiv: Var[Union[str, int, bool]]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Title(Element): # noqa: E742
|
||||
"""Display the title element."""
|
||||
|
||||
tag = "title"
|
683
reflex/components/el/elements/metadata.pyi
Normal file
683
reflex/components/el/elements/metadata.pyi
Normal file
@ -0,0 +1,683 @@
|
||||
"""Stub file for reflex/components/el/elements/metadata.py"""
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `scripts/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from typing import Union
|
||||
from reflex.components.el.element import Element
|
||||
from reflex.vars import Var as Var
|
||||
from .base import BaseHTML
|
||||
|
||||
class Base(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
href: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
target: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Base":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Head(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Head":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Link(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
cross_origin: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
href: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
href_lang: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
integrity: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
media: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
referrer_policy: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
rel: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
sizes: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Link":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Meta(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
char_set: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
http_equiv: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Meta":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Title(Element):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Title":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
61
reflex/components/el/elements/other.py
Normal file
61
reflex/components/el/elements/other.py
Normal file
@ -0,0 +1,61 @@
|
||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars import Var as Var
|
||||
|
||||
from .base import BaseHTML
|
||||
|
||||
|
||||
class Details(BaseHTML):
|
||||
"""Display the details element."""
|
||||
|
||||
tag = "details"
|
||||
|
||||
# Indicates whether the details will be visible (expanded) to the user
|
||||
open: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Dialog(BaseHTML):
|
||||
"""Display the dialog element."""
|
||||
|
||||
tag = "dialog"
|
||||
|
||||
# Indicates whether the dialog is active and can be interacted with
|
||||
open: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Summary(BaseHTML):
|
||||
"""Display the summary element."""
|
||||
|
||||
tag = "summary"
|
||||
# No unique attributes, only common ones are inherited; used as a summary or caption for a <details> element
|
||||
|
||||
|
||||
class Slot(BaseHTML):
|
||||
"""Display the slot element."""
|
||||
|
||||
tag = "slot"
|
||||
# No unique attributes, only common ones are inherited; used as a placeholder inside a web component
|
||||
|
||||
|
||||
class Template(BaseHTML):
|
||||
"""Display the template element."""
|
||||
|
||||
tag = "template"
|
||||
# No unique attributes, only common ones are inherited; used for declaring fragments of HTML that can be cloned and inserted in the document
|
||||
|
||||
|
||||
class Math(BaseHTML):
|
||||
"""Display the math element."""
|
||||
|
||||
tag = "math"
|
||||
# No unique attributes, only common ones are inherited; used for displaying mathematical expressions
|
||||
|
||||
|
||||
class Html(BaseHTML):
|
||||
"""Display the html element."""
|
||||
|
||||
tag = "html"
|
||||
|
||||
# Specifies the URL of the document's cache manifest (obsolete in HTML5)
|
||||
manifest: Var[Union[str, int, bool]]
|
993
reflex/components/el/elements/other.pyi
Normal file
993
reflex/components/el/elements/other.pyi
Normal file
@ -0,0 +1,993 @@
|
||||
"""Stub file for reflex/components/el/elements/other.py"""
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `scripts/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from typing import Union
|
||||
from reflex.vars import Var as Var
|
||||
from .base import BaseHTML
|
||||
|
||||
class Details(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
open: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Details":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
open: Indicates whether the details will be visible (expanded) to the user
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Dialog(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
open: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Dialog":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
open: Indicates whether the dialog is active and can be interacted with
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Summary(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Summary":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: No unique attributes, only common ones are inherited; used as a summary or caption for a <details> element Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Slot(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Slot":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: No unique attributes, only common ones are inherited; used as a placeholder inside a web component Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Template(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Template":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: No unique attributes, only common ones are inherited; used for declaring fragments of HTML that can be cloned and inserted in the document Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Math(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Math":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: No unique attributes, only common ones are inherited; used for displaying mathematical expressions Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Html(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
manifest: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Html":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
manifest: Specifies the URL of the document's cache manifest (obsolete in HTML5)
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
58
reflex/components/el/elements/scripts.py
Normal file
58
reflex/components/el/elements/scripts.py
Normal file
@ -0,0 +1,58 @@
|
||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars import Var as Var
|
||||
|
||||
from .base import BaseHTML
|
||||
|
||||
|
||||
class Canvas(BaseHTML):
|
||||
"""Display the canvas element."""
|
||||
|
||||
tag = "canvas"
|
||||
|
||||
# The height of the canvas in CSS pixels
|
||||
height: Var[Union[str, int, bool]]
|
||||
|
||||
# The width of the canvas in CSS pixels
|
||||
width: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Noscript(BaseHTML):
|
||||
"""Display the noscript element."""
|
||||
|
||||
tag = "noscript"
|
||||
# No unique attributes, only common ones are inherited
|
||||
|
||||
|
||||
class Script(BaseHTML):
|
||||
"""Display the script element."""
|
||||
|
||||
tag = "script"
|
||||
|
||||
# Indicates that the script should be executed asynchronously
|
||||
async_: Var[Union[str, int, bool]]
|
||||
|
||||
# Character encoding of the external script
|
||||
char_set: Var[Union[str, int, bool]]
|
||||
|
||||
# Configures the CORS requests for the script
|
||||
cross_origin: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the script should be executed after the page has finished parsing
|
||||
defer: Var[Union[str, int, bool]]
|
||||
|
||||
# Security feature allowing browsers to verify what they fetch
|
||||
integrity: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the scripting language used in the type attribute
|
||||
language: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies which referrer information to send when fetching the script
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of an external script
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the MIME type of the script
|
||||
type: Var[Union[str, int, bool]]
|
469
reflex/components/el/elements/scripts.pyi
Normal file
469
reflex/components/el/elements/scripts.pyi
Normal file
@ -0,0 +1,469 @@
|
||||
"""Stub file for reflex/components/el/elements/scripts.py"""
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `scripts/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from typing import Union
|
||||
from reflex.vars import Var as Var
|
||||
from .base import BaseHTML
|
||||
|
||||
class Canvas(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
height: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
width: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Canvas":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
height: The height of the canvas in CSS pixels
|
||||
width: The width of the canvas in CSS pixels
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Noscript(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Noscript":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: No unique attributes, only common ones are inherited Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
||||
|
||||
class Script(BaseHTML):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
async_: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
char_set: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
cross_origin: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
defer: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
integrity: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
language: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
referrer_policy: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
class_name: Optional[Any] = None,
|
||||
autofocus: Optional[bool] = None,
|
||||
custom_attrs: Optional[Dict[str, str]] = None,
|
||||
on_blur: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_context_menu: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_double_click: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_focus: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_down: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_enter: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_leave: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_move: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_out: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_over: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_mouse_up: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_scroll: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
on_unmount: Optional[
|
||||
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||
] = None,
|
||||
**props
|
||||
) -> "Script":
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
async_: Indicates that the script should be executed asynchronously
|
||||
char_set: Character encoding of the external script
|
||||
cross_origin: Configures the CORS requests for the script
|
||||
defer: Indicates that the script should be executed after the page has finished parsing
|
||||
integrity: Security feature allowing browsers to verify what they fetch
|
||||
language: Specifies the scripting language used in the type attribute
|
||||
referrer_policy: Specifies which referrer information to send when fetching the script
|
||||
src: URL of an external script
|
||||
type: Specifies the MIME type of the script
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
The component.
|
||||
|
||||
Raises:
|
||||
TypeError: If an invalid child is passed.
|
||||
"""
|
||||
...
|
99
reflex/components/el/elements/sectioning.py
Normal file
99
reflex/components/el/elements/sectioning.py
Normal file
@ -0,0 +1,99 @@
|
||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars import Var as Var
|
||||
|
||||
from .base import BaseHTML
|
||||
|
||||
|
||||
class Body(BaseHTML): # noqa: E742
|
||||
"""Display the body element."""
|
||||
|
||||
tag = "body"
|
||||
|
||||
bgcolor: Var[Union[str, int, bool]]
|
||||
background: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Address(BaseHTML): # noqa: E742
|
||||
"""Display the address element."""
|
||||
|
||||
tag = "address"
|
||||
|
||||
|
||||
class Article(BaseHTML): # noqa: E742
|
||||
"""Display the article element."""
|
||||
|
||||
tag = "article"
|
||||
|
||||
|
||||
class Aside(BaseHTML): # noqa: E742
|
||||
"""Display the aside element."""
|
||||
|
||||
tag = "aside"
|
||||
|
||||
|
||||
class Footer(BaseHTML): # noqa: E742
|
||||
"""Display the footer element."""
|
||||
|
||||
tag = "footer"
|
||||
|
||||
|
||||
class Header(BaseHTML): # noqa: E742
|
||||
"""Display the header element."""
|
||||
|
||||
tag = "header"
|
||||
|
||||
|
||||
class H1(BaseHTML): # noqa: E742
|
||||
"""Display the h1 element."""
|
||||
|
||||
tag = "h1"
|
||||
|
||||
|
||||
class H2(BaseHTML): # noqa: E742
|
||||
"""Display the h1 element."""
|
||||
|
||||
tag = "h2"
|
||||
|
||||
|
||||
class H3(BaseHTML): # noqa: E742
|
||||
"""Display the h1 element."""
|
||||
|
||||
tag = "h3"
|
||||
|
||||
|
||||
class H4(BaseHTML): # noqa: E742
|
||||
"""Display the h1 element."""
|
||||
|
||||
tag = "h4"
|
||||
|
||||
|
||||
class H5(BaseHTML): # noqa: E742
|
||||
"""Display the h1 element."""
|
||||
|
||||
tag = "h5"
|
||||
|
||||
|
||||
class H6(BaseHTML): # noqa: E742
|
||||
"""Display the h1 element."""
|
||||
|
||||
tag = "h6"
|
||||
|
||||
|
||||
class Main(BaseHTML): # noqa: E742
|
||||
"""Display the main element."""
|
||||
|
||||
tag = "main"
|
||||
|
||||
|
||||
class Nav(BaseHTML): # noqa: E742
|
||||
"""Display the nav element."""
|
||||
|
||||
tag = "nav"
|
||||
|
||||
|
||||
class Section(BaseHTML): # noqa: E742
|
||||
"""Display the section element."""
|
||||
|
||||
tag = "section"
|
2103
reflex/components/el/elements/sectioning.pyi
Normal file
2103
reflex/components/el/elements/sectioning.pyi
Normal file
File diff suppressed because it is too large
Load Diff
162
reflex/components/el/elements/tables.py
Normal file
162
reflex/components/el/elements/tables.py
Normal file
@ -0,0 +1,162 @@
|
||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars import Var as Var
|
||||
|
||||
from .base import BaseHTML
|
||||
|
||||
|
||||
class Caption(BaseHTML):
|
||||
"""Display the caption element."""
|
||||
|
||||
tag = "caption"
|
||||
|
||||
# Alignment of the caption
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Col(BaseHTML):
|
||||
"""Display the col element."""
|
||||
|
||||
tag = "col"
|
||||
|
||||
# Alignment of the content within the column
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Background color of the column
|
||||
bgcolor: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of columns the col element spans
|
||||
span: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Colgroup(BaseHTML):
|
||||
"""Display the colgroup element."""
|
||||
|
||||
tag = "colgroup"
|
||||
|
||||
# Alignment of the content within the column group
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Background color of the column group
|
||||
bgcolor: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of columns the colgroup element spans
|
||||
span: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Table(BaseHTML):
|
||||
"""Display the table element."""
|
||||
|
||||
tag = "table"
|
||||
|
||||
# Alignment of the table
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Background image for the table
|
||||
background: Var[Union[str, int, bool]]
|
||||
|
||||
# Background color of the table
|
||||
bgcolor: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the width of the border around the table
|
||||
border: Var[Union[str, int, bool]]
|
||||
|
||||
# Provides a summary of the table's purpose and structure
|
||||
summary: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Tbody(BaseHTML):
|
||||
"""Display the tbody element."""
|
||||
|
||||
tag = "tbody"
|
||||
|
||||
# Alignment of the content within the table body
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Background color of the table body
|
||||
bgcolor: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Td(BaseHTML):
|
||||
"""Display the td element."""
|
||||
|
||||
tag = "td"
|
||||
|
||||
# Alignment of the content within the table cell
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Background image for the table cell
|
||||
background: Var[Union[str, int, bool]]
|
||||
|
||||
# Background color of the table cell
|
||||
bgcolor: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of columns a cell should span
|
||||
col_span: Var[Union[str, int, bool]]
|
||||
|
||||
# IDs of the headers associated with this cell
|
||||
headers: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of rows a cell should span
|
||||
row_span: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Tfoot(BaseHTML):
|
||||
"""Display the tfoot element."""
|
||||
|
||||
tag = "tfoot"
|
||||
|
||||
# Alignment of the content within the table footer
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Background color of the table footer
|
||||
bgcolor: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Th(BaseHTML):
|
||||
"""Display the th element."""
|
||||
|
||||
tag = "th"
|
||||
|
||||
# Alignment of the content within the table header cell
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Background image for the table header cell
|
||||
background: Var[Union[str, int, bool]]
|
||||
|
||||
# Background color of the table header cell
|
||||
bgcolor: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of columns a header cell should span
|
||||
col_span: Var[Union[str, int, bool]]
|
||||
|
||||
# IDs of the headers associated with this header cell
|
||||
headers: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of rows a header cell should span
|
||||
row_span: Var[Union[str, int, bool]]
|
||||
|
||||
# Scope of the header cell (row, col, rowgroup, colgroup)
|
||||
scope: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Thead(BaseHTML):
|
||||
"""Display the thead element."""
|
||||
|
||||
tag = "thead"
|
||||
|
||||
# Alignment of the content within the table header
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Tr(BaseHTML):
|
||||
"""Display the tr element."""
|
||||
|
||||
tag = "tr"
|
||||
|
||||
# Alignment of the content within the table row
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Background color of the table row
|
||||
bgcolor: Var[Union[str, int, bool]]
|
1526
reflex/components/el/elements/tables.pyi
Normal file
1526
reflex/components/el/elements/tables.pyi
Normal file
File diff suppressed because it is too large
Load Diff
129
reflex/components/el/elements/typography.py
Normal file
129
reflex/components/el/elements/typography.py
Normal file
@ -0,0 +1,129 @@
|
||||
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars import Var as Var
|
||||
|
||||
from .base import BaseHTML
|
||||
|
||||
|
||||
class Blockquote(BaseHTML):
|
||||
"""Display the blockquote element."""
|
||||
|
||||
tag = "blockquote"
|
||||
|
||||
# Define the title of a work.
|
||||
cite: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Dd(BaseHTML):
|
||||
"""Display the dd element."""
|
||||
|
||||
tag = "dd"
|
||||
|
||||
|
||||
class Div(BaseHTML):
|
||||
"""Display the div element."""
|
||||
|
||||
tag = "div"
|
||||
|
||||
|
||||
class Dl(BaseHTML):
|
||||
"""Display the dl element."""
|
||||
|
||||
tag = "dl"
|
||||
|
||||
|
||||
class Dt(BaseHTML):
|
||||
"""Display the dt element."""
|
||||
|
||||
tag = "dt"
|
||||
|
||||
|
||||
class Figcaption(BaseHTML):
|
||||
"""Display the figcaption element."""
|
||||
|
||||
tag = "figcaption"
|
||||
|
||||
|
||||
class Hr(BaseHTML):
|
||||
"""Display the hr element."""
|
||||
|
||||
tag = "hr"
|
||||
|
||||
# Used to specify the alignment of text content of The Element. this attribute is used in all elements.
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Used to specify the color of a Horizontal rule.
|
||||
color: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Li(BaseHTML):
|
||||
"""Display the li element."""
|
||||
|
||||
tag = "li"
|
||||
|
||||
|
||||
class Menu(BaseHTML):
|
||||
"""Display the menu element."""
|
||||
|
||||
tag = "menu"
|
||||
|
||||
# Specifies that the menu element is a context menu.
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Ol(BaseHTML):
|
||||
"""Display the ol element."""
|
||||
|
||||
tag = "ol"
|
||||
|
||||
# Reverses the order of the list.
|
||||
reversed: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the start value of the first list item in an ordered list.
|
||||
start: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the kind of marker to use in the list (letters or numbers).
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class P(BaseHTML):
|
||||
"""Display the p element."""
|
||||
|
||||
tag = "p"
|
||||
|
||||
|
||||
class Pre(BaseHTML):
|
||||
"""Display the pre element."""
|
||||
|
||||
tag = "pre"
|
||||
|
||||
|
||||
class Ul(BaseHTML):
|
||||
"""Display the ul element."""
|
||||
|
||||
tag = "ul"
|
||||
|
||||
|
||||
class Ins(BaseHTML):
|
||||
"""Display the ins element."""
|
||||
|
||||
tag = "ins"
|
||||
|
||||
# Specifies the URL of the document that explains the reason why the text was inserted/changed.
|
||||
cite: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the date and time of when the text was inserted/changed.
|
||||
date_time: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Del(BaseHTML):
|
||||
"""Display the del element."""
|
||||
|
||||
tag = "del"
|
||||
|
||||
# Specifies the URL of the document that explains the reason why the text was deleted.
|
||||
cite: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the date and time of when the text was deleted.
|
||||
date_time: Var[Union[str, int, bool]]
|
2131
reflex/components/el/elements/typography.pyi
Normal file
2131
reflex/components/el/elements/typography.pyi
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
"""Interactive components provided by @radix-ui/themes."""
|
||||
from typing import Any, Dict, Literal
|
||||
|
||||
from reflex import el
|
||||
from reflex.components import el
|
||||
from reflex.components.component import Component
|
||||
from reflex.components.forms.debounce import DebounceInput
|
||||
from reflex.constants import EventTriggers
|
||||
|
@ -8,7 +8,7 @@ from reflex.vars import Var, BaseVar, ComputedVar
|
||||
from reflex.event import EventChain, EventHandler, EventSpec
|
||||
from reflex.style import Style
|
||||
from typing import Any, Dict, Literal
|
||||
from reflex import el
|
||||
from reflex.components import el
|
||||
from reflex.components.component import Component
|
||||
from reflex.components.forms.debounce import DebounceInput
|
||||
from reflex.constants import EventTriggers
|
||||
@ -808,13 +808,7 @@ class TextField(TextFieldRoot, el.Input):
|
||||
accept: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
alt: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_complete: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
@ -827,25 +821,12 @@ class TextField(TextFieldRoot, el.Input):
|
||||
checked: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
dirname: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
disabled: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
form_action: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
@ -865,16 +846,6 @@ class TextField(TextFieldRoot, el.Input):
|
||||
height: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
list: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
max: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
max_length: Optional[
|
||||
@ -900,22 +871,8 @@ class TextField(TextFieldRoot, el.Input):
|
||||
required: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
step: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
use_map: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
@ -926,6 +883,49 @@ class TextField(TextFieldRoot, el.Input):
|
||||
width: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
access_key: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
draggable: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
hidden: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
input_mode: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
item_prop: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
||||
spell_check: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
tab_index: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
title: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
translate: Optional[
|
||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -992,7 +992,7 @@ class TextField(TextFieldRoot, el.Input):
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
size: Text field size "1" - "3"
|
||||
size: Specifies the visible width of a text control
|
||||
variant: Variant of text field: "classic" | "surface" | "soft"
|
||||
color: Override theme color for text field
|
||||
radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
|
||||
@ -1003,6 +1003,55 @@ class TextField(TextFieldRoot, el.Input):
|
||||
mr: Margin right: "0" - "9"
|
||||
mb: Margin bottom: "0" - "9"
|
||||
ml: Margin left: "0" - "9"
|
||||
accept: Accepted types of files when the input is file type
|
||||
alt: Alternate text for input type="image"
|
||||
auto_complete: Whether the input should have autocomplete enabled
|
||||
auto_focus: Automatically focuses the input when the page loads
|
||||
capture: Captures media from the user (camera or microphone)
|
||||
checked: Indicates whether the input is checked (for checkboxes and radio buttons)
|
||||
dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
|
||||
disabled: Disables the input
|
||||
form: Associates the input with a form (by id)
|
||||
form_action: URL to send the form data to (for type="submit" buttons)
|
||||
form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
||||
form_method: HTTP method to use for sending form data (for type="submit" buttons)
|
||||
form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
|
||||
form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
|
||||
height: The height of the input (only for type="image")
|
||||
list: References a datalist for suggested options
|
||||
max: Specifies the maximum value for the input
|
||||
max_length: Specifies the maximum number of characters allowed in the input
|
||||
min_length: Specifies the minimum number of characters required in the input
|
||||
min: Specifies the minimum value for the input
|
||||
multiple: Indicates whether multiple values can be entered in an input of the type email or file
|
||||
name: Name of the input, used when sending form data
|
||||
pattern: Regex pattern the input's value must match to be valid
|
||||
placeholder: Placeholder text in the input
|
||||
read_only: Indicates whether the input is read-only
|
||||
required: Indicates that the input is required
|
||||
src: URL for image inputs
|
||||
step: Specifies the legal number intervals for an input
|
||||
type: Specifies the type of input
|
||||
use_map: Name of the image map used with the input
|
||||
value: Value of the input
|
||||
width: The width of the input (only for type="image")
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
translate: Specifies whether the content of an element should be translated or not.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,108 +0,0 @@
|
||||
"""Dynamically compile classes for all HTML elements and output them to the
|
||||
elements directory.
|
||||
|
||||
This script generates the element classes in the reflex.el.elements module.
|
||||
Run as follows:
|
||||
|
||||
python -m reflex.el.precompile
|
||||
|
||||
Make sure to delete the __init__.py file in the elements directory before
|
||||
running this script.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from reflex.utils import path_ops
|
||||
|
||||
from .constants import ELEMENT_TO_PROPS, ELEMENTS
|
||||
|
||||
FILE_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
ELEMENTS_DIR = os.path.join(FILE_DIR, "elements")
|
||||
INIT_PY_PATH = os.path.join(ELEMENTS_DIR, "__init__.py")
|
||||
|
||||
|
||||
def element_path(element: str) -> str:
|
||||
"""Get the name of the Python file for the given element.
|
||||
|
||||
Args:
|
||||
element: The name of the element. For example, `a` or `div`.
|
||||
|
||||
Returns:
|
||||
The name of the Python file for the given element.
|
||||
"""
|
||||
return os.path.join(ELEMENTS_DIR, f"{element}.py")
|
||||
|
||||
|
||||
PROP = " {prop}: Var_[Union[str, int, bool]]".format
|
||||
|
||||
|
||||
def compile_pyclass_props(element: str) -> str:
|
||||
"""Compile props for an element.
|
||||
|
||||
Args:
|
||||
element: The name of the element. For example, `a` or `div`.
|
||||
|
||||
Returns:
|
||||
A string containing compiled props for the element.
|
||||
"""
|
||||
return path_ops.join(PROP(prop=prop) for prop in ELEMENT_TO_PROPS[element])
|
||||
|
||||
|
||||
PYCLASS = path_ops.join(
|
||||
[
|
||||
"",
|
||||
"class {name}(Element): # noqa: E742",
|
||||
' """Display the {element} element."""',
|
||||
"",
|
||||
' tag = "{element}"',
|
||||
"",
|
||||
"{props}",
|
||||
"",
|
||||
"",
|
||||
"{call_name} = {name}.create",
|
||||
"",
|
||||
]
|
||||
).format
|
||||
|
||||
|
||||
def compile_pyclass(element: str) -> str:
|
||||
"""Compile a Python class for an element.
|
||||
|
||||
Args:
|
||||
element: The name of the element. For example, `a` or `div`.
|
||||
|
||||
Returns:
|
||||
A string containing a Python class for the element.
|
||||
"""
|
||||
name = element.capitalize()
|
||||
props = compile_pyclass_props(element)
|
||||
|
||||
# Handle the `del` element, which is a Python keyword. Note that the class
|
||||
# name is still `Del`.
|
||||
call_name = "del_" if element == "del" else element
|
||||
|
||||
return PYCLASS(
|
||||
name=name,
|
||||
element=element,
|
||||
props=props,
|
||||
call_name=call_name,
|
||||
)
|
||||
|
||||
|
||||
INIT_PY = [
|
||||
'"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""',
|
||||
"from typing import Union",
|
||||
"",
|
||||
"from reflex.el.element import Element",
|
||||
"from reflex.vars import Var as Var_",
|
||||
"",
|
||||
]
|
||||
|
||||
|
||||
for element in sorted(ELEMENTS):
|
||||
INIT_PY.append(compile_pyclass(element))
|
||||
|
||||
|
||||
os.makedirs(ELEMENTS_DIR, exist_ok=True)
|
||||
with open(INIT_PY_PATH, "w+") as f:
|
||||
f.write(path_ops.join(INIT_PY))
|
Loading…
Reference in New Issue
Block a user