|
@@ -1,5 +1,5 @@
|
|
|
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
|
|
-from typing import Any, Dict, Union
|
|
|
+from typing import Any, Dict, Optional, Union
|
|
|
|
|
|
from reflex.components.el.element import Element
|
|
|
from reflex.constants.event import EventTriggers
|
|
@@ -14,37 +14,37 @@ class Button(BaseHTML):
|
|
|
tag = "button"
|
|
|
|
|
|
# Automatically focuses the button when the page loads
|
|
|
- auto_focus: Var[Union[str, int, bool]]
|
|
|
+ auto_focus: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Disables the button
|
|
|
- disabled: Var[bool]
|
|
|
+ disabled: Optional[Var[bool]] = None
|
|
|
|
|
|
# Associates the button with a form (by id)
|
|
|
- form: Var[Union[str, int, bool]]
|
|
|
+ form: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# URL to send the form data to (for type="submit" buttons)
|
|
|
- form_action: Var[Union[str, int, bool]]
|
|
|
+ form_action: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
|
|
- form_enc_type: Var[Union[str, int, bool]]
|
|
|
+ form_enc_type: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# HTTP method to use for sending form data (for type="submit" buttons)
|
|
|
- form_method: Var[Union[str, int, bool]]
|
|
|
+ form_method: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Bypasses form validation when submitting (for type="submit" buttons)
|
|
|
- form_no_validate: Var[Union[str, int, bool]]
|
|
|
+ form_no_validate: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Specifies where to display the response after submitting the form (for type="submit" buttons)
|
|
|
- form_target: Var[Union[str, int, bool]]
|
|
|
+ form_target: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Name of the button, used when sending form data
|
|
|
- name: Var[Union[str, int, bool]]
|
|
|
+ name: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Type of the button (submit, reset, or button)
|
|
|
- type: Var[Union[str, int, bool]]
|
|
|
+ type: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Value of the button, used when sending form data
|
|
|
- value: Var[Union[str, int, bool]]
|
|
|
+ value: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
|
|
|
class Datalist(BaseHTML):
|
|
@@ -60,13 +60,13 @@ class Fieldset(Element):
|
|
|
tag = "fieldset"
|
|
|
|
|
|
# Disables all the form control descendants of the fieldset
|
|
|
- disabled: Var[Union[str, int, bool]]
|
|
|
+ disabled: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Associates the fieldset with a form (by id)
|
|
|
- form: Var[Union[str, int, bool]]
|
|
|
+ form: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Name of the fieldset, used for scripting
|
|
|
- name: Var[Union[str, int, bool]]
|
|
|
+ name: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
|
|
|
class Form(BaseHTML):
|
|
@@ -75,31 +75,31 @@ class Form(BaseHTML):
|
|
|
tag = "form"
|
|
|
|
|
|
# MIME types the server accepts for file upload
|
|
|
- accept: Var[Union[str, int, bool]]
|
|
|
+ accept: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Character encodings to be used for form submission
|
|
|
- accept_charset: Var[Union[str, int, bool]]
|
|
|
+ accept_charset: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# URL where the form's data should be submitted
|
|
|
- action: Var[Union[str, int, bool]]
|
|
|
+ action: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Whether the form should have autocomplete enabled
|
|
|
- auto_complete: Var[Union[str, int, bool]]
|
|
|
+ auto_complete: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Encoding type for the form data when submitted
|
|
|
- enc_type: Var[Union[str, int, bool]]
|
|
|
+ enc_type: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# HTTP method to use for form submission
|
|
|
- method: Var[Union[str, int, bool]]
|
|
|
+ method: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Name of the form
|
|
|
- name: Var[Union[str, int, bool]]
|
|
|
+ name: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Indicates that the form should not be validated on submit
|
|
|
- no_validate: Var[Union[str, int, bool]]
|
|
|
+ no_validate: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Where to display the response after submitting the form
|
|
|
- target: Var[Union[str, int, bool]]
|
|
|
+ target: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
|
|
|
class Input(BaseHTML):
|
|
@@ -108,103 +108,103 @@ class Input(BaseHTML):
|
|
|
tag = "input"
|
|
|
|
|
|
# Accepted types of files when the input is file type
|
|
|
- accept: Var[Union[str, int, bool]]
|
|
|
+ accept: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Alternate text for input type="image"
|
|
|
- alt: Var[Union[str, int, bool]]
|
|
|
+ alt: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Whether the input should have autocomplete enabled
|
|
|
- auto_complete: Var[Union[str, int, bool]]
|
|
|
+ auto_complete: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Automatically focuses the input when the page loads
|
|
|
- auto_focus: Var[Union[str, int, bool]]
|
|
|
+ auto_focus: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Captures media from the user (camera or microphone)
|
|
|
- capture: Var[Union[str, int, bool]]
|
|
|
+ capture: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Indicates whether the input is checked (for checkboxes and radio buttons)
|
|
|
- checked: Var[Union[str, int, bool]]
|
|
|
+ checked: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# The initial value (for checkboxes and radio buttons)
|
|
|
- default_checked: Var[bool]
|
|
|
+ default_checked: Optional[Var[bool]] = None
|
|
|
|
|
|
# The initial value for a text field
|
|
|
- default_value: Var[str]
|
|
|
+ default_value: Optional[Var[str]] = None
|
|
|
|
|
|
# Name part of the input to submit in 'dir' and 'name' pair when form is submitted
|
|
|
- dirname: Var[Union[str, int, bool]]
|
|
|
+ dirname: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Disables the input
|
|
|
- disabled: Var[Union[str, int, bool]]
|
|
|
+ disabled: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Associates the input with a form (by id)
|
|
|
- form: Var[Union[str, int, bool]]
|
|
|
+ form: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# URL to send the form data to (for type="submit" buttons)
|
|
|
- form_action: Var[Union[str, int, bool]]
|
|
|
+ form_action: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
|
|
- form_enc_type: Var[Union[str, int, bool]]
|
|
|
+ form_enc_type: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# HTTP method to use for sending form data (for type="submit" buttons)
|
|
|
- form_method: Var[Union[str, int, bool]]
|
|
|
+ form_method: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Bypasses form validation when submitting (for type="submit" buttons)
|
|
|
- form_no_validate: Var[Union[str, int, bool]]
|
|
|
+ form_no_validate: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Specifies where to display the response after submitting the form (for type="submit" buttons)
|
|
|
- form_target: Var[Union[str, int, bool]]
|
|
|
+ form_target: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# References a datalist for suggested options
|
|
|
- list: Var[Union[str, int, bool]]
|
|
|
+ list: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Specifies the maximum value for the input
|
|
|
- max: Var[Union[str, int, bool]]
|
|
|
+ max: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Specifies the maximum number of characters allowed in the input
|
|
|
- max_length: Var[Union[str, int, bool]]
|
|
|
+ max_length: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Specifies the minimum number of characters required in the input
|
|
|
- min_length: Var[Union[str, int, bool]]
|
|
|
+ min_length: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Specifies the minimum value for the input
|
|
|
- min: Var[Union[str, int, bool]]
|
|
|
+ min: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Indicates whether multiple values can be entered in an input of the type email or file
|
|
|
- multiple: Var[Union[str, int, bool]]
|
|
|
+ multiple: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Name of the input, used when sending form data
|
|
|
- name: Var[Union[str, int, bool]]
|
|
|
+ name: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Regex pattern the input's value must match to be valid
|
|
|
- pattern: Var[Union[str, int, bool]]
|
|
|
+ pattern: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Placeholder text in the input
|
|
|
- placeholder: Var[Union[str, int, bool]]
|
|
|
+ placeholder: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Indicates whether the input is read-only
|
|
|
- read_only: Var[Union[str, int, bool]]
|
|
|
+ read_only: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Indicates that the input is required
|
|
|
- required: Var[Union[str, int, bool]]
|
|
|
+ required: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Specifies the visible width of a text control
|
|
|
- size: Var[Union[str, int, bool]]
|
|
|
+ size: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# URL for image inputs
|
|
|
- src: Var[Union[str, int, bool]]
|
|
|
+ src: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Specifies the legal number intervals for an input
|
|
|
- step: Var[Union[str, int, bool]]
|
|
|
+ step: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Specifies the type of input
|
|
|
- type: Var[Union[str, int, bool]]
|
|
|
+ type: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Name of the image map used with the input
|
|
|
- use_map: Var[Union[str, int, bool]]
|
|
|
+ use_map: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Value of the input
|
|
|
- value: Var[Union[str, int, bool]]
|
|
|
+ value: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
def get_event_triggers(self) -> Dict[str, Any]:
|
|
|
"""Get the event triggers that pass the component's value to the handler.
|
|
@@ -228,10 +228,10 @@ class Label(BaseHTML):
|
|
|
tag = "label"
|
|
|
|
|
|
# ID of a form control with which the label is associated
|
|
|
- html_for: Var[Union[str, int, bool]]
|
|
|
+ html_for: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Associates the label with a form (by id)
|
|
|
- form: Var[Union[str, int, bool]]
|
|
|
+ form: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
|
|
|
class Legend(BaseHTML):
|
|
@@ -247,25 +247,25 @@ class Meter(BaseHTML):
|
|
|
tag = "meter"
|
|
|
|
|
|
# Associates the meter with a form (by id)
|
|
|
- form: Var[Union[str, int, bool]]
|
|
|
+ form: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# High limit of range (above this is considered high value)
|
|
|
- high: Var[Union[str, int, bool]]
|
|
|
+ high: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Low limit of range (below this is considered low value)
|
|
|
- low: Var[Union[str, int, bool]]
|
|
|
+ low: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Maximum value of the range
|
|
|
- max: Var[Union[str, int, bool]]
|
|
|
+ max: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Minimum value of the range
|
|
|
- min: Var[Union[str, int, bool]]
|
|
|
+ min: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Optimum value in the range
|
|
|
- optimum: Var[Union[str, int, bool]]
|
|
|
+ optimum: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Current value of the meter
|
|
|
- value: Var[Union[str, int, bool]]
|
|
|
+ value: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
|
|
|
class Optgroup(BaseHTML):
|
|
@@ -274,10 +274,10 @@ class Optgroup(BaseHTML):
|
|
|
tag = "optgroup"
|
|
|
|
|
|
# Disables the optgroup
|
|
|
- disabled: Var[Union[str, int, bool]]
|
|
|
+ disabled: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Label for the optgroup
|
|
|
- label: Var[Union[str, int, bool]]
|
|
|
+ label: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
|
|
|
class Option(BaseHTML):
|
|
@@ -286,16 +286,16 @@ class Option(BaseHTML):
|
|
|
tag = "option"
|
|
|
|
|
|
# Disables the option
|
|
|
- disabled: Var[Union[str, int, bool]]
|
|
|
+ disabled: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Label for the option, if the text is not the label
|
|
|
- label: Var[Union[str, int, bool]]
|
|
|
+ label: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Indicates that the option is initially selected
|
|
|
- selected: Var[Union[str, int, bool]]
|
|
|
+ selected: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Value to be sent as form data
|
|
|
- value: Var[Union[str, int, bool]]
|
|
|
+ value: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
|
|
|
class Output(BaseHTML):
|
|
@@ -304,13 +304,13 @@ class Output(BaseHTML):
|
|
|
tag = "output"
|
|
|
|
|
|
# Associates the output with one or more elements (by their IDs)
|
|
|
- html_for: Var[Union[str, int, bool]]
|
|
|
+ html_for: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Associates the output with a form (by id)
|
|
|
- form: Var[Union[str, int, bool]]
|
|
|
+ form: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Name of the output element for form submission
|
|
|
- name: Var[Union[str, int, bool]]
|
|
|
+ name: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
|
|
|
class Progress(BaseHTML):
|
|
@@ -319,13 +319,13 @@ class Progress(BaseHTML):
|
|
|
tag = "progress"
|
|
|
|
|
|
# Associates the progress element with a form (by id)
|
|
|
- form: Var[Union[str, int, bool]]
|
|
|
+ form: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Maximum value of the progress indicator
|
|
|
- max: Var[Union[str, int, bool]]
|
|
|
+ max: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Current value of the progress indicator
|
|
|
- value: Var[Union[str, int, bool]]
|
|
|
+ value: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
|
|
|
class Select(BaseHTML):
|
|
@@ -334,28 +334,28 @@ class Select(BaseHTML):
|
|
|
tag = "select"
|
|
|
|
|
|
# Whether the form control should have autocomplete enabled
|
|
|
- auto_complete: Var[Union[str, int, bool]]
|
|
|
+ auto_complete: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Automatically focuses the select when the page loads
|
|
|
- auto_focus: Var[Union[str, int, bool]]
|
|
|
+ auto_focus: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Disables the select control
|
|
|
- disabled: Var[Union[str, int, bool]]
|
|
|
+ disabled: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Associates the select with a form (by id)
|
|
|
- form: Var[Union[str, int, bool]]
|
|
|
+ form: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Indicates that multiple options can be selected
|
|
|
- multiple: Var[Union[str, int, bool]]
|
|
|
+ multiple: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Name of the select, used when submitting the form
|
|
|
- name: Var[Union[str, int, bool]]
|
|
|
+ name: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Indicates that the select control must have a selected option
|
|
|
- required: Var[Union[str, int, bool]]
|
|
|
+ required: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Number of visible options in a drop-down list
|
|
|
- size: Var[Union[str, int, bool]]
|
|
|
+ size: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
def get_event_triggers(self) -> Dict[str, Any]:
|
|
|
"""Get the event triggers that pass the component's value to the handler.
|
|
@@ -375,49 +375,49 @@ class Textarea(BaseHTML):
|
|
|
tag = "textarea"
|
|
|
|
|
|
# Whether the form control should have autocomplete enabled
|
|
|
- auto_complete: Var[Union[str, int, bool]]
|
|
|
+ auto_complete: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Automatically focuses the textarea when the page loads
|
|
|
- auto_focus: Var[Union[str, int, bool]]
|
|
|
+ auto_focus: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Visible width of the text control, in average character widths
|
|
|
- cols: Var[Union[str, int, bool]]
|
|
|
+ cols: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted
|
|
|
- dirname: Var[Union[str, int, bool]]
|
|
|
+ dirname: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Disables the textarea
|
|
|
- disabled: Var[Union[str, int, bool]]
|
|
|
+ disabled: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Associates the textarea with a form (by id)
|
|
|
- form: Var[Union[str, int, bool]]
|
|
|
+ form: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Maximum number of characters allowed in the textarea
|
|
|
- max_length: Var[Union[str, int, bool]]
|
|
|
+ max_length: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Minimum number of characters required in the textarea
|
|
|
- min_length: Var[Union[str, int, bool]]
|
|
|
+ min_length: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Name of the textarea, used when submitting the form
|
|
|
- name: Var[Union[str, int, bool]]
|
|
|
+ name: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Placeholder text in the textarea
|
|
|
- placeholder: Var[Union[str, int, bool]]
|
|
|
+ placeholder: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Indicates whether the textarea is read-only
|
|
|
- read_only: Var[Union[str, int, bool]]
|
|
|
+ read_only: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Indicates that the textarea is required
|
|
|
- required: Var[Union[str, int, bool]]
|
|
|
+ required: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# Visible number of lines in the text control
|
|
|
- rows: Var[Union[str, int, bool]]
|
|
|
+ rows: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# The controlled value of the textarea, read only unless used with on_change
|
|
|
- value: Var[Union[str, int, bool]]
|
|
|
+ value: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
# How the text in the textarea is to be wrapped when submitting the form
|
|
|
- wrap: Var[Union[str, int, bool]]
|
|
|
+ wrap: Optional[Var[Union[str, int, bool]]] = None
|
|
|
|
|
|
def get_event_triggers(self) -> Dict[str, Any]:
|
|
|
"""Get the event triggers that pass the component's value to the handler.
|