add Component.tag str type annotation

This commit is contained in:
Benedikt Bartscher 2024-03-01 23:01:36 +01:00
parent 7534b2caf2
commit 935286b464
No known key found for this signature in database
140 changed files with 493 additions and 493 deletions

View File

@ -25,7 +25,7 @@ def TestEventAction():
class EventFiringComponent(rx.Component): class EventFiringComponent(rx.Component):
"""A component that fires onClick event without passing DOM event.""" """A component that fires onClick event without passing DOM event."""
tag = "EventFiringComponent" tag: str = "EventFiringComponent"
def _get_custom_code(self) -> str | None: def _get_custom_code(self) -> str | None:
return """ return """

View File

@ -6,4 +6,4 @@ from reflex.components.component import Component
class Body(Component): class Body(Component):
"""A body component.""" """A body component."""
tag = "body" tag: str = "body"

View File

@ -14,7 +14,7 @@ class NextDocumentLib(Component):
class Html(NextDocumentLib): class Html(NextDocumentLib):
"""The document html.""" """The document html."""
tag = "Html" tag: str = "Html"
lang: Optional[str] lang: Optional[str]
@ -22,16 +22,16 @@ class Html(NextDocumentLib):
class DocumentHead(NextDocumentLib): class DocumentHead(NextDocumentLib):
"""The document head.""" """The document head."""
tag = "Head" tag: str = "Head"
class Main(NextDocumentLib): class Main(NextDocumentLib):
"""The document main section.""" """The document main section."""
tag = "Main" tag: str = "Main"
class NextScript(NextDocumentLib): class NextScript(NextDocumentLib):
"""The document main scripts.""" """The document main scripts."""
tag = "NextScript" tag: str = "NextScript"

View File

@ -6,4 +6,4 @@ class Fragment(Component):
"""A React fragment to return multiple components from a function without wrapping it in a container.""" """A React fragment to return multiple components from a function without wrapping it in a container."""
library = "react" library = "react"
tag = "Fragment" tag: str = "Fragment"

View File

@ -12,6 +12,6 @@ class NextHeadLib(Component):
class Head(NextHeadLib, MemoizationLeaf): class Head(NextHeadLib, MemoizationLeaf):
"""Head Component.""" """Head Component."""
tag = "NextHead" tag: str = "NextHead"
is_default = True is_default = True

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class RawLink(Component): class RawLink(Component):
"""A component that displays the title of the current page.""" """A component that displays the title of the current page."""
tag = "link" tag: str = "link"
# The href. # The href.
href: Optional[Var[str]] = None href: Optional[Var[str]] = None
@ -20,7 +20,7 @@ class RawLink(Component):
class ScriptTag(Component): class ScriptTag(Component):
"""A script tag with the specified type and source.""" """A script tag with the specified type and source."""
tag = "script" tag: str = "script"
# The type of script represented. # The type of script represented.
type_: Optional[Var[str]] = None type_: Optional[Var[str]] = None

View File

@ -11,7 +11,7 @@ from reflex.components.component import Component
class Title(Component): class Title(Component):
"""A component that displays the title of the current page.""" """A component that displays the title of the current page."""
tag = "title" tag: str = "title"
def render(self) -> dict: def render(self) -> dict:
"""Render the title component. """Render the title component.
@ -29,7 +29,7 @@ class Title(Component):
class Meta(Component): class Meta(Component):
"""A component that displays metadata for the current page.""" """A component that displays metadata for the current page."""
tag = "meta" tag: str = "meta"
# The description of character encoding. # The description of character encoding.
char_set: Optional[str] = None char_set: Optional[str] = None

View File

@ -20,7 +20,7 @@ class Script(Component):
""" """
library = "next/script" library = "next/script"
tag = "Script" tag: str = "Script"
is_default = True is_default = True
# Required unless inline script is used # Required unless inline script is used

View File

@ -53,7 +53,7 @@ class ChakraComponent(Component):
class ChakraProvider(ChakraComponent): class ChakraProvider(ChakraComponent):
"""Top level Chakra provider must be included in any app using chakra components.""" """Top level Chakra provider must be included in any app using chakra components."""
tag = "ChakraProvider" tag: str = "ChakraProvider"
theme: Optional[Var[str]] = None theme: Optional[Var[str]] = None
@ -93,7 +93,7 @@ class ChakraColorModeProvider(Component):
"""Next-themes integration for chakra colorModeProvider.""" """Next-themes integration for chakra colorModeProvider."""
library = "/components/reflex/chakra_color_mode_provider.js" library = "/components/reflex/chakra_color_mode_provider.js"
tag = "ChakraColorModeProvider" tag: str = "ChakraColorModeProvider"
is_default = True is_default = True

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class Badge(ChakraComponent): class Badge(ChakraComponent):
"""A badge component.""" """A badge component."""
tag = "Badge" tag: str = "Badge"
# Variant of the badge ("solid" | "subtle" | "outline") # Variant of the badge ("solid" | "subtle" | "outline")
variant: Optional[Var[LiteralVariant]] = None variant: Optional[Var[LiteralVariant]] = None

View File

@ -7,4 +7,4 @@ from reflex.components.chakra import (
class Code(ChakraComponent): class Code(ChakraComponent):
"""Used to display inline code.""" """Used to display inline code."""
tag = "Code" tag: str = "Code"

View File

@ -10,7 +10,7 @@ LiteralLayout = Literal["horizontal", "vertical"]
class Divider(ChakraComponent): class Divider(ChakraComponent):
"""Dividers are used to visually separate content in a list or group.""" """Dividers are used to visually separate content in a list or group."""
tag = "Divider" tag: str = "Divider"
# Pass the orientation prop and set it to either horizontal or vertical. If the vertical orientation is used, make sure that the parent element is assigned a height. # Pass the orientation prop and set it to either horizontal or vertical. If the vertical orientation is used, make sure that the parent element is assigned a height.
orientation: Optional[Var[LiteralLayout]] = None orientation: Optional[Var[LiteralLayout]] = None

View File

@ -6,4 +6,4 @@ from reflex.components.chakra import ChakraComponent
class KeyboardKey(ChakraComponent): class KeyboardKey(ChakraComponent):
"""Display a keyboard key text.""" """Display a keyboard key text."""
tag = "Kbd" tag: str = "Kbd"

View File

@ -14,7 +14,7 @@ T = TypeVar("T")
class List(ChakraComponent, Generic[T]): class List(ChakraComponent, Generic[T]):
"""Display a list of items.""" """Display a list of items."""
tag = "List" tag: str = "List"
# The space between each list item # The space between each list item
spacing: Optional[Var[str]] = None spacing: Optional[Var[str]] = None
@ -50,16 +50,16 @@ class List(ChakraComponent, Generic[T]):
class ListItem(ChakraComponent): class ListItem(ChakraComponent):
"""A single list item.""" """A single list item."""
tag = "ListItem" tag: str = "ListItem"
class OrderedList(List): class OrderedList(List):
"""An ordered list component with numbers.""" """An ordered list component with numbers."""
tag = "OrderedList" tag: str = "OrderedList"
class UnorderedList(List): class UnorderedList(List):
"""An unordered list component with bullets.""" """An unordered list component with bullets."""
tag = "UnorderedList" tag: str = "UnorderedList"

View File

@ -9,7 +9,7 @@ from reflex.vars import Var
class Stat(ChakraComponent): class Stat(ChakraComponent):
"""The Stat component is used to display some statistics. It can take in a label, a number and a help text.""" """The Stat component is used to display some statistics. It can take in a label, a number and a help text."""
tag = "Stat" tag: str = "Stat"
@classmethod @classmethod
def create( def create(
@ -51,25 +51,25 @@ class Stat(ChakraComponent):
class StatLabel(ChakraComponent): class StatLabel(ChakraComponent):
"""A stat label component.""" """A stat label component."""
tag = "StatLabel" tag: str = "StatLabel"
class StatNumber(ChakraComponent): class StatNumber(ChakraComponent):
"""The stat to display.""" """The stat to display."""
tag = "StatNumber" tag: str = "StatNumber"
class StatHelpText(ChakraComponent): class StatHelpText(ChakraComponent):
"""A helper text to display under the stat.""" """A helper text to display under the stat."""
tag = "StatHelpText" tag: str = "StatHelpText"
class StatArrow(ChakraComponent): class StatArrow(ChakraComponent):
"""A stat arrow component indicating the direction of change.""" """A stat arrow component indicating the direction of change."""
tag = "StatArrow" tag: str = "StatArrow"
# The type of arrow, either increase or decrease. # The type of arrow, either increase or decrease.
type_: Optional[Var[str]] = None type_: Optional[Var[str]] = None
@ -78,4 +78,4 @@ class StatArrow(ChakraComponent):
class StatGroup(ChakraComponent): class StatGroup(ChakraComponent):
"""A stat group component to evenly space out the stats.""" """A stat group component to evenly space out the stats."""
tag = "StatGroup" tag: str = "StatGroup"

View File

@ -11,7 +11,7 @@ from reflex.vars import Var
class Table(ChakraComponent): class Table(ChakraComponent):
"""A table component.""" """A table component."""
tag = "Table" tag: str = "Table"
# The color scheme of the table # The color scheme of the table
color_scheme: Optional[Var[str]] = None color_scheme: Optional[Var[str]] = None
@ -62,7 +62,7 @@ class Table(ChakraComponent):
class Thead(ChakraComponent): class Thead(ChakraComponent):
"""A table header component.""" """A table header component."""
tag = "Thead" tag: str = "Thead"
# invalid children components # invalid children components
_invalid_children: List[str] = ["Tbody", "Thead", "Tfoot"] _invalid_children: List[str] = ["Tbody", "Thead", "Tfoot"]
@ -114,7 +114,7 @@ class Thead(ChakraComponent):
class Tbody(ChakraComponent): class Tbody(ChakraComponent):
"""A table body component.""" """A table body component."""
tag = "Tbody" tag: str = "Tbody"
# invalid children components # invalid children components
_invalid_children: List[str] = ["Tbody", "Thead", "Tfoot", "Td", "Th"] _invalid_children: List[str] = ["Tbody", "Thead", "Tfoot", "Td", "Th"]
@ -188,7 +188,7 @@ class Tbody(ChakraComponent):
class Tfoot(ChakraComponent): class Tfoot(ChakraComponent):
"""A table footer component.""" """A table footer component."""
tag = "Tfoot" tag: str = "Tfoot"
# invalid children components # invalid children components
_invalid_children: List[str] = ["Tbody", "Thead", "Td", "Th", "Tfoot"] _invalid_children: List[str] = ["Tbody", "Thead", "Td", "Th", "Tfoot"]
@ -237,7 +237,7 @@ class Tfoot(ChakraComponent):
class Tr(ChakraComponent): class Tr(ChakraComponent):
"""A table row component.""" """A table row component."""
tag = "Tr" tag: str = "Tr"
# invalid children components # invalid children components
_invalid_children: List[str] = ["Tbody", "Thead", "Tfoot", "Tr"] _invalid_children: List[str] = ["Tbody", "Thead", "Tfoot", "Tr"]
@ -268,7 +268,7 @@ class Tr(ChakraComponent):
class Th(ChakraComponent): class Th(ChakraComponent):
"""A table header cell component.""" """A table header cell component."""
tag = "Th" tag: str = "Th"
# invalid children components # invalid children components
_invalid_children: List[str] = ["Tbody", "Thead", "Tr", "Td", "Th"] _invalid_children: List[str] = ["Tbody", "Thead", "Tr", "Td", "Th"]
@ -280,7 +280,7 @@ class Th(ChakraComponent):
class Td(ChakraComponent): class Td(ChakraComponent):
"""A table data cell component.""" """A table data cell component."""
tag = "Td" tag: str = "Td"
# invalid children components # invalid children components
_invalid_children: List[str] = ["Tbody", "Thead"] _invalid_children: List[str] = ["Tbody", "Thead"]
@ -292,7 +292,7 @@ class Td(ChakraComponent):
class TableCaption(ChakraComponent): class TableCaption(ChakraComponent):
"""A table caption component.""" """A table caption component."""
tag = "TableCaption" tag: str = "TableCaption"
# The placement of the table caption. This sets the `caption-side` CSS attribute. # The placement of the table caption. This sets the `caption-side` CSS attribute.
placement: Optional[Var[str]] = None placement: Optional[Var[str]] = None
@ -301,4 +301,4 @@ class TableCaption(ChakraComponent):
class TableContainer(ChakraComponent): class TableContainer(ChakraComponent):
"""The table container component renders a div that wraps the table component.""" """The table container component renders a div that wraps the table component."""
tag = "TableContainer" tag: str = "TableContainer"

View File

@ -14,31 +14,31 @@ from reflex.vars import Var
class TagLabel(ChakraComponent): class TagLabel(ChakraComponent):
"""The label of the tag.""" """The label of the tag."""
tag = "TagLabel" tag: str = "TagLabel"
class TagLeftIcon(ChakraComponent): class TagLeftIcon(ChakraComponent):
"""The left icon of the tag.""" """The left icon of the tag."""
tag = "TagLeftIcon" tag: str = "TagLeftIcon"
class TagRightIcon(ChakraComponent): class TagRightIcon(ChakraComponent):
"""The right icon of the tag.""" """The right icon of the tag."""
tag = "TagRightIcon" tag: str = "TagRightIcon"
class TagCloseButton(ChakraComponent): class TagCloseButton(ChakraComponent):
"""The close button of the tag.""" """The close button of the tag."""
tag = "TagCloseButton" tag: str = "TagCloseButton"
class Tag(ChakraComponent): class Tag(ChakraComponent):
"""The parent wrapper that provides context for its children.""" """The parent wrapper that provides context for its children."""
tag = "Tag" tag: str = "Tag"
# The visual color appearance of the tag. # The visual color appearance of the tag.
# options: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | # options: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" |

View File

@ -9,7 +9,7 @@ from reflex.vars import Var
class Accordion(ChakraComponent): class Accordion(ChakraComponent):
"""The wrapper that uses cloneElement to pass props to AccordionItem children.""" """The wrapper that uses cloneElement to pass props to AccordionItem children."""
tag = "Accordion" tag: str = "Accordion"
# If true, multiple accordion items can be expanded at once. # If true, multiple accordion items can be expanded at once.
allow_multiple: Optional[Var[bool]] = None allow_multiple: Optional[Var[bool]] = None
@ -79,7 +79,7 @@ class Accordion(ChakraComponent):
class AccordionItem(ChakraComponent): class AccordionItem(ChakraComponent):
"""A single accordion item.""" """A single accordion item."""
tag = "AccordionItem" tag: str = "AccordionItem"
# A unique id for the accordion item. # A unique id for the accordion item.
id_: Optional[Var[str]] = None id_: Optional[Var[str]] = None
@ -94,16 +94,16 @@ class AccordionItem(ChakraComponent):
class AccordionButton(ChakraComponent): class AccordionButton(ChakraComponent):
"""The button that toggles the expand/collapse state of the accordion item. This button must be wrapped in an element with role heading.""" """The button that toggles the expand/collapse state of the accordion item. This button must be wrapped in an element with role heading."""
tag = "AccordionButton" tag: str = "AccordionButton"
class AccordionPanel(ChakraComponent): class AccordionPanel(ChakraComponent):
"""The container for the details to be revealed.""" """The container for the details to be revealed."""
tag = "AccordionPanel" tag: str = "AccordionPanel"
class AccordionIcon(ChakraComponent): class AccordionIcon(ChakraComponent):
"""A chevron-down icon that rotates based on the expanded/collapsed state.""" """A chevron-down icon that rotates based on the expanded/collapsed state."""
tag = "AccordionIcon" tag: str = "AccordionIcon"

View File

@ -14,7 +14,7 @@ from reflex.vars import Var
class Tabs(ChakraComponent): class Tabs(ChakraComponent):
"""An accessible tabs component that provides keyboard interactions and ARIA attributes described in the WAI-ARIA Tabs Design Pattern. Tabs, provides context and state for all components.""" """An accessible tabs component that provides keyboard interactions and ARIA attributes described in the WAI-ARIA Tabs Design Pattern. Tabs, provides context and state for all components."""
tag = "Tabs" tag: str = "Tabs"
# The alignment of the tabs ("center" | "end" | "start"). # The alignment of the tabs ("center" | "end" | "start").
align: Optional[Var[LiteralTagAlign]] = None align: Optional[Var[LiteralTagAlign]] = None
@ -75,7 +75,7 @@ class Tabs(ChakraComponent):
class Tab(ChakraComponent): class Tab(ChakraComponent):
"""An element that serves as a label for one of the tab panels and can be activated to display that panel..""" """An element that serves as a label for one of the tab panels and can be activated to display that panel.."""
tag = "Tab" tag: str = "Tab"
# If true, the Tab won't be toggleable. # If true, the Tab won't be toggleable.
is_disabled: Optional[Var[bool]] = None is_disabled: Optional[Var[bool]] = None
@ -95,7 +95,7 @@ class Tab(ChakraComponent):
class TabList(ChakraComponent): class TabList(ChakraComponent):
"""Wrapper for the Tab components.""" """Wrapper for the Tab components."""
tag = "TabList" tag: str = "TabList"
_valid_parents: List[str] = ["Tabs"] _valid_parents: List[str] = ["Tabs"]
@ -103,7 +103,7 @@ class TabList(ChakraComponent):
class TabPanels(ChakraComponent): class TabPanels(ChakraComponent):
"""Wrapper for the Tab components.""" """Wrapper for the Tab components."""
tag = "TabPanels" tag: str = "TabPanels"
_valid_parents: List[str] = ["Tabs"] _valid_parents: List[str] = ["Tabs"]
@ -111,6 +111,6 @@ class TabPanels(ChakraComponent):
class TabPanel(ChakraComponent): class TabPanel(ChakraComponent):
"""An element that contains the content associated with a tab.""" """An element that contains the content associated with a tab."""
tag = "TabPanel" tag: str = "TabPanel"
_valid_parents: List[str] = ["TabPanels"] _valid_parents: List[str] = ["TabPanels"]

View File

@ -18,13 +18,13 @@ class Transition(ChakraComponent):
class Fade(Transition): class Fade(Transition):
"""Fade component cab be used show and hide content of your app.""" """Fade component cab be used show and hide content of your app."""
tag = "Fade" tag: str = "Fade"
class ScaleFade(Transition): class ScaleFade(Transition):
"""Fade component can be scaled and reverse your app.""" """Fade component can be scaled and reverse your app."""
tag = "ScaleFade" tag: str = "ScaleFade"
# The initial scale of the element # The initial scale of the element
initial_scale: Optional[Var[float]] = None initial_scale: Optional[Var[float]] = None
@ -36,7 +36,7 @@ class ScaleFade(Transition):
class Slide(Transition): class Slide(Transition):
"""Side can be used show content below your app.""" """Side can be used show content below your app."""
tag = "Slide" tag: str = "Slide"
# The direction to slide from # The direction to slide from
direction: Optional[Var[str]] = None direction: Optional[Var[str]] = None
@ -45,7 +45,7 @@ class Slide(Transition):
class SlideFade(Transition): class SlideFade(Transition):
"""SlideFade component.""" """SlideFade component."""
tag = "SlideFade" tag: str = "SlideFade"
# The offset on the horizontal or x axis # The offset on the horizontal or x axis
offsetX: Optional[Var[Union[str, int]]] = None offsetX: Optional[Var[Union[str, int]]] = None
@ -60,7 +60,7 @@ class SlideFade(Transition):
class Collapse(Transition): class Collapse(Transition):
"""Collapse component can collapse some content.""" """Collapse component can collapse some content."""
tag = "Collapse" tag: str = "Collapse"
# If true, the opacity of the content will be animated # If true, the opacity of the content will be animated
animateOpacity: Optional[Var[bool]] = None animateOpacity: Optional[Var[bool]] = None

View File

@ -6,4 +6,4 @@ from reflex.components.chakra import ChakraComponent
class VisuallyHidden(ChakraComponent): class VisuallyHidden(ChakraComponent):
"""A component that visually hides content while still allowing it to be read by screen readers.""" """A component that visually hides content while still allowing it to be read by screen readers."""
tag = "VisuallyHidden" tag: str = "VisuallyHidden"

View File

@ -13,7 +13,7 @@ from reflex.vars import Var
class Alert(ChakraComponent): class Alert(ChakraComponent):
"""An alert feedback box.""" """An alert feedback box."""
tag = "Alert" tag: str = "Alert"
# The status of the alert ("success" | "info" | "warning" | "error") # The status of the alert ("success" | "info" | "warning" | "error")
status: Optional[Var[LiteralStatus]] = None status: Optional[Var[LiteralStatus]] = None
@ -54,16 +54,16 @@ class Alert(ChakraComponent):
class AlertIcon(ChakraComponent): class AlertIcon(ChakraComponent):
"""An icon displayed in the alert.""" """An icon displayed in the alert."""
tag = "AlertIcon" tag: str = "AlertIcon"
class AlertTitle(ChakraComponent): class AlertTitle(ChakraComponent):
"""The title of the alert.""" """The title of the alert."""
tag = "AlertTitle" tag: str = "AlertTitle"
class AlertDescription(ChakraComponent): class AlertDescription(ChakraComponent):
"""AlertDescription composes the Box component.""" """AlertDescription composes the Box component."""
tag = "AlertDescription" tag: str = "AlertDescription"

View File

@ -9,7 +9,7 @@ from reflex.vars import Var
class CircularProgress(ChakraComponent): class CircularProgress(ChakraComponent):
"""The CircularProgress component is used to indicate the progress for determinate and indeterminate processes.""" """The CircularProgress component is used to indicate the progress for determinate and indeterminate processes."""
tag = "CircularProgress" tag: str = "CircularProgress"
# If true, the cap of the progress indicator will be rounded. # If true, the cap of the progress indicator will be rounded.
cap_is_round: Optional[Var[bool]] = None cap_is_round: Optional[Var[bool]] = None
@ -64,4 +64,4 @@ class CircularProgress(ChakraComponent):
class CircularProgressLabel(ChakraComponent): class CircularProgressLabel(ChakraComponent):
"""Label of CircularProcess.""" """Label of CircularProcess."""
tag = "CircularProgressLabel" tag: str = "CircularProgressLabel"

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class Progress(ChakraComponent): class Progress(ChakraComponent):
"""A bar to display progress.""" """A bar to display progress."""
tag = "Progress" tag: str = "Progress"
# If true, the progress bar will show stripe # If true, the progress bar will show stripe
has_stripe: Optional[Var[bool]] = None has_stripe: Optional[Var[bool]] = None

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class Skeleton(ChakraComponent): class Skeleton(ChakraComponent):
"""Skeleton is used to display the loading state of some components. You can use it as a standalone component. Or to wrap another component to take the same height and width.""" """Skeleton is used to display the loading state of some components. You can use it as a standalone component. Or to wrap another component to take the same height and width."""
tag = "Skeleton" tag: str = "Skeleton"
# The color at the animation end # The color at the animation end
end_color: Optional[Var[str]] = None end_color: Optional[Var[str]] = None
@ -29,7 +29,7 @@ class Skeleton(ChakraComponent):
class SkeletonCircle(ChakraComponent): class SkeletonCircle(ChakraComponent):
"""SkeletonCircle is used to display the loading state of some components.""" """SkeletonCircle is used to display the loading state of some components."""
tag = "SkeletonCircle" tag: str = "SkeletonCircle"
# The color at the animation end # The color at the animation end
end_color: Optional[Var[str]] = None end_color: Optional[Var[str]] = None
@ -50,7 +50,7 @@ class SkeletonCircle(ChakraComponent):
class SkeletonText(ChakraComponent): class SkeletonText(ChakraComponent):
"""SkeletonText is used to display the loading state of some components.""" """SkeletonText is used to display the loading state of some components."""
tag = "SkeletonText" tag: str = "SkeletonText"
# The color at the animation end # The color at the animation end
end_color: Optional[Var[str]] = None end_color: Optional[Var[str]] = None

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class Spinner(ChakraComponent): class Spinner(ChakraComponent):
"""The component that spins.""" """The component that spins."""
tag = "Spinner" tag: str = "Spinner"
# The color of the empty area in the spinner # The color of the empty area in the spinner
empty_color: Optional[Var[str]] = None empty_color: Optional[Var[str]] = None

View File

@ -14,7 +14,7 @@ from reflex.vars import Var
class Button(ChakraComponent): class Button(ChakraComponent):
"""The Button component is used to trigger an event or event, such as submitting a form, opening a dialog, canceling an event, or performing a delete operation.""" """The Button component is used to trigger an event or event, such as submitting a form, opening a dialog, canceling an event, or performing a delete operation."""
tag = "Button" tag: str = "Button"
# The space between the button icon and label. # The space between the button icon and label.
icon_spacing: Optional[Var[int]] = None icon_spacing: Optional[Var[int]] = None
@ -64,7 +64,7 @@ class Button(ChakraComponent):
class ButtonGroup(ChakraComponent): class ButtonGroup(ChakraComponent):
"""A group of buttons.""" """A group of buttons."""
tag = "ButtonGroup" tag: str = "ButtonGroup"
# If true, the borderRadius of button that are direct children will be altered to look flushed together. # If true, the borderRadius of button that are direct children will be altered to look flushed together.
is_attached: Optional[Var[bool]] = None is_attached: Optional[Var[bool]] = None

View File

@ -15,7 +15,7 @@ from reflex.vars import Var
class Checkbox(ChakraComponent): class Checkbox(ChakraComponent):
"""The Checkbox component is used in forms when a user needs to select multiple values from several options.""" """The Checkbox component is used in forms when a user needs to select multiple values from several options."""
tag = "Checkbox" tag: str = "Checkbox"
# Color scheme for checkbox. # Color scheme for checkbox.
# Options: # Options:
@ -71,7 +71,7 @@ class Checkbox(ChakraComponent):
class CheckboxGroup(ChakraComponent): class CheckboxGroup(ChakraComponent):
"""A group of checkboxes.""" """A group of checkboxes."""
tag = "CheckboxGroup" tag: str = "CheckboxGroup"
# The value of the checkbox group # The value of the checkbox group
value: Optional[Var[str]] = None value: Optional[Var[str]] = None

View File

@ -99,5 +99,5 @@ class ColorModeButton(Button):
class ColorModeScript(ChakraComponent): class ColorModeScript(ChakraComponent):
"""Chakra color mode script.""" """Chakra color mode script."""
tag = "ColorModeScript" tag: str = "ColorModeScript"
initialColorMode: str = LIGHT_COLOR_MODE initialColorMode: str = LIGHT_COLOR_MODE

View File

@ -11,7 +11,7 @@ from reflex.vars import Var
class Editable(ChakraComponent): class Editable(ChakraComponent):
"""The wrapper component that provides context value.""" """The wrapper component that provides context value."""
tag = "Editable" tag: str = "Editable"
# If true, the Editable will be disabled. # If true, the Editable will be disabled.
is_disabled: Optional[Var[bool]] = None is_disabled: Optional[Var[bool]] = None
@ -55,16 +55,16 @@ class Editable(ChakraComponent):
class EditableInput(ChakraComponent): class EditableInput(ChakraComponent):
"""The edit view of the component. It shows when you click or focus on the text.""" """The edit view of the component. It shows when you click or focus on the text."""
tag = "EditableInput" tag: str = "EditableInput"
class EditableTextarea(ChakraComponent): class EditableTextarea(ChakraComponent):
"""Use the textarea element to handle multi line text input in an editable context.""" """Use the textarea element to handle multi line text input in an editable context."""
tag = "EditableTextarea" tag: str = "EditableTextarea"
class EditablePreview(ChakraComponent): class EditablePreview(ChakraComponent):
"""The read-only view of the component.""" """The read-only view of the component."""
tag = "EditablePreview" tag: str = "EditablePreview"

View File

@ -36,7 +36,7 @@ HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
class Form(ChakraComponent): class Form(ChakraComponent):
"""A form component.""" """A form component."""
tag = "Box" tag: str = "Box"
# What the form renders to. # What the form renders to.
as_: Var[str] = "form" # type: ignore as_: Var[str] = "form" # type: ignore
@ -151,7 +151,7 @@ class Form(ChakraComponent):
class FormControl(ChakraComponent): class FormControl(ChakraComponent):
"""Provide context to form components.""" """Provide context to form components."""
tag = "FormControl" tag: str = "FormControl"
# If true, the form control will be disabled. # If true, the form control will be disabled.
is_disabled: Optional[Var[bool]] = None is_disabled: Optional[Var[bool]] = None
@ -216,13 +216,13 @@ class FormControl(ChakraComponent):
class FormHelperText(ChakraComponent): class FormHelperText(ChakraComponent):
"""A form helper text component.""" """A form helper text component."""
tag = "FormHelperText" tag: str = "FormHelperText"
class FormLabel(ChakraComponent): class FormLabel(ChakraComponent):
"""A form label component.""" """A form label component."""
tag = "FormLabel" tag: str = "FormLabel"
# Link # Link
html_for: Optional[Var[str]] = None html_for: Optional[Var[str]] = None
@ -231,4 +231,4 @@ class FormLabel(ChakraComponent):
class FormErrorMessage(ChakraComponent): class FormErrorMessage(ChakraComponent):
"""A form error message component.""" """A form error message component."""
tag = "FormErrorMessage" tag: str = "FormErrorMessage"

View File

@ -9,7 +9,7 @@ from reflex.vars import Var
class IconButton(Text): class IconButton(Text):
"""A button with an icon.""" """A button with an icon."""
tag = "IconButton" tag: str = "IconButton"
library = "@chakra-ui/button@2.1.0" library = "@chakra-ui/button@2.1.0"
# The type of button. # The type of button.

View File

@ -17,7 +17,7 @@ from reflex.vars import Var
class Input(ChakraComponent): class Input(ChakraComponent):
"""The Input component is a component that is used to get user input in a text field.""" """The Input component is a component that is used to get user input in a text field."""
tag = "Input" tag: str = "Input"
# State var to bind the input. # State var to bind the input.
value: Optional[Var[str]] = None value: Optional[Var[str]] = None
@ -99,7 +99,7 @@ class Input(ChakraComponent):
class InputGroup(ChakraComponent): class InputGroup(ChakraComponent):
"""The InputGroup component is a component that is used to group a set of inputs.""" """The InputGroup component is a component that is used to group a set of inputs."""
tag = "InputGroup" tag: str = "InputGroup"
_memoization_mode = MemoizationMode(recursive=False) _memoization_mode = MemoizationMode(recursive=False)
@ -107,22 +107,22 @@ class InputGroup(ChakraComponent):
class InputLeftAddon(ChakraComponent): class InputLeftAddon(ChakraComponent):
"""The InputLeftAddon component is a component that is used to add an addon to the left of an input.""" """The InputLeftAddon component is a component that is used to add an addon to the left of an input."""
tag = "InputLeftAddon" tag: str = "InputLeftAddon"
class InputRightAddon(ChakraComponent): class InputRightAddon(ChakraComponent):
"""The InputRightAddon component is a component that is used to add an addon to the right of an input.""" """The InputRightAddon component is a component that is used to add an addon to the right of an input."""
tag = "InputRightAddon" tag: str = "InputRightAddon"
class InputLeftElement(ChakraComponent): class InputLeftElement(ChakraComponent):
"""The InputLeftElement component is a component that is used to add an element to the left of an input.""" """The InputLeftElement component is a component that is used to add an element to the left of an input."""
tag = "InputLeftElement" tag: str = "InputLeftElement"
class InputRightElement(ChakraComponent): class InputRightElement(ChakraComponent):
"""The InputRightElement component is a component that is used to add an element to the right of an input.""" """The InputRightElement component is a component that is used to add an element to the right of an input."""
tag = "InputRightElement" tag: str = "InputRightElement"

View File

@ -47,7 +47,7 @@ class Select(Component):
""" """
library = "chakra-react-select@4.7.5" library = "chakra-react-select@4.7.5"
tag = "Select" tag: str = "Select"
alias = "MultiSelect" alias = "MultiSelect"
# Focus the control when it is mounted # Focus the control when it is mounted

View File

@ -15,7 +15,7 @@ from reflex.vars import Var
class NumberInput(ChakraComponent): class NumberInput(ChakraComponent):
"""The wrapper that provides context and logic to the components.""" """The wrapper that provides context and logic to the components."""
tag = "NumberInput" tag: str = "NumberInput"
# State var to bind the input. # State var to bind the input.
value: Optional[Var[Number]] = None value: Optional[Var[Number]] = None
@ -115,22 +115,22 @@ class NumberInput(ChakraComponent):
class NumberInputField(ChakraComponent): class NumberInputField(ChakraComponent):
"""The input field itself.""" """The input field itself."""
tag = "NumberInputField" tag: str = "NumberInputField"
class NumberInputStepper(ChakraComponent): class NumberInputStepper(ChakraComponent):
"""The wrapper for the input's stepper buttons.""" """The wrapper for the input's stepper buttons."""
tag = "NumberInputStepper" tag: str = "NumberInputStepper"
class NumberIncrementStepper(ChakraComponent): class NumberIncrementStepper(ChakraComponent):
"""The button to increment the value of the input.""" """The button to increment the value of the input."""
tag = "NumberIncrementStepper" tag: str = "NumberIncrementStepper"
class NumberDecrementStepper(ChakraComponent): class NumberDecrementStepper(ChakraComponent):
"""The button to decrement the value of the input.""" """The button to decrement the value of the input."""
tag = "NumberDecrementStepper" tag: str = "NumberDecrementStepper"

View File

@ -15,7 +15,7 @@ from reflex.vars import Var
class PinInput(ChakraComponent): class PinInput(ChakraComponent):
"""The component that provides context to all the pin-input fields.""" """The component that provides context to all the pin-input fields."""
tag = "PinInput" tag: str = "PinInput"
# State var to bind the the input. # State var to bind the the input.
value: Optional[Var[str]] = None value: Optional[Var[str]] = None
@ -164,7 +164,7 @@ class PinInput(ChakraComponent):
class PinInputField(ChakraComponent): class PinInputField(ChakraComponent):
"""The text field that user types in - must be a direct child of PinInput.""" """The text field that user types in - must be a direct child of PinInput."""
tag = "PinInputField" tag: str = "PinInputField"
# the position of the PinInputField inside the PinInput. # the position of the PinInputField inside the PinInput.
# Default to None because it is assigned by PinInput when created. # Default to None because it is assigned by PinInput when created.

View File

@ -13,7 +13,7 @@ from reflex.vars import Var
class RadioGroup(ChakraComponent): class RadioGroup(ChakraComponent):
"""A grouping of individual radio options.""" """A grouping of individual radio options."""
tag = "RadioGroup" tag: str = "RadioGroup"
# State var to bind the the input. # State var to bind the the input.
value: Optional[Var[Any]] = None value: Optional[Var[Any]] = None
@ -60,7 +60,7 @@ class RadioGroup(ChakraComponent):
class Radio(Text): class Radio(Text):
"""Radios are used when only one choice may be selected in a series of options.""" """Radios are used when only one choice may be selected in a series of options."""
tag = "Radio" tag: str = "Radio"
# Value of radio. # Value of radio.
value: Optional[Var[Any]] = None value: Optional[Var[Any]] = None

View File

@ -13,7 +13,7 @@ from reflex.vars import Var
class RangeSlider(ChakraComponent): class RangeSlider(ChakraComponent):
"""The RangeSlider is a multi thumb slider used to select a range of related values. A common use-case of this component is a price range picker that allows a user to set the minimum and maximum price.""" """The RangeSlider is a multi thumb slider used to select a range of related values. A common use-case of this component is a price range picker that allows a user to set the minimum and maximum price."""
tag = "RangeSlider" tag: str = "RangeSlider"
# State var to bind the the input. # State var to bind the the input.
value: Optional[Var[List[int]]] = None value: Optional[Var[List[int]]] = None
@ -121,19 +121,19 @@ class RangeSlider(ChakraComponent):
class RangeSliderTrack(ChakraComponent): class RangeSliderTrack(ChakraComponent):
"""A range slider track.""" """A range slider track."""
tag = "RangeSliderTrack" tag: str = "RangeSliderTrack"
class RangeSliderFilledTrack(ChakraComponent): class RangeSliderFilledTrack(ChakraComponent):
"""A filled range slider track.""" """A filled range slider track."""
tag = "RangeSliderFilledTrack" tag: str = "RangeSliderFilledTrack"
class RangeSliderThumb(ChakraComponent): class RangeSliderThumb(ChakraComponent):
"""A range slider thumb.""" """A range slider thumb."""
tag = "RangeSliderThumb" tag: str = "RangeSliderThumb"
# The position of the thumb. # The position of the thumb.
index: Optional[Var[int]] = None index: Optional[Var[int]] = None

View File

@ -13,7 +13,7 @@ from reflex.vars import Var
class Select(ChakraComponent): class Select(ChakraComponent):
"""Select component is a component that allows users pick a value from predefined options. Ideally, it should be used when there are more than 5 options, otherwise you might consider using a radio group instead.""" """Select component is a component that allows users pick a value from predefined options. Ideally, it should be used when there are more than 5 options, otherwise you might consider using a radio group instead."""
tag = "Select" tag: str = "Select"
# State var to bind the select. # State var to bind the select.
value: Optional[Var[str]] = None value: Optional[Var[str]] = None
@ -87,7 +87,7 @@ class Select(ChakraComponent):
class Option(Text): class Option(Text):
"""A select option.""" """A select option."""
tag = "option" tag: str = "option"
value: Optional[Var[Any]] = None value: Optional[Var[Any]] = None

View File

@ -14,7 +14,7 @@ LiteralLayout = Literal["horizontal", "vertical"]
class Slider(ChakraComponent): class Slider(ChakraComponent):
"""The wrapper that provides context and functionality for all children.""" """The wrapper that provides context and functionality for all children."""
tag = "Slider" tag: str = "Slider"
# State var to bind the input. # State var to bind the input.
value: Optional[Var[int]] = None value: Optional[Var[int]] = None
@ -109,19 +109,19 @@ class Slider(ChakraComponent):
class SliderTrack(ChakraComponent): class SliderTrack(ChakraComponent):
"""The empty part of the slider that shows the track.""" """The empty part of the slider that shows the track."""
tag = "SliderTrack" tag: str = "SliderTrack"
class SliderFilledTrack(ChakraComponent): class SliderFilledTrack(ChakraComponent):
"""The filled part of the slider.""" """The filled part of the slider."""
tag = "SliderFilledTrack" tag: str = "SliderFilledTrack"
class SliderThumb(ChakraComponent): class SliderThumb(ChakraComponent):
"""The handle that's used to change the slider value.""" """The handle that's used to change the slider value."""
tag = "SliderThumb" tag: str = "SliderThumb"
# The size of the thumb. # The size of the thumb.
box_size: Optional[Var[str]] = None box_size: Optional[Var[str]] = None
@ -130,4 +130,4 @@ class SliderThumb(ChakraComponent):
class SliderMark(ChakraComponent): class SliderMark(ChakraComponent):
"""The label or mark that shows names for specific slider values.""" """The label or mark that shows names for specific slider values."""
tag = "SliderMark" tag: str = "SliderMark"

View File

@ -11,7 +11,7 @@ from reflex.vars import Var
class Switch(ChakraComponent): class Switch(ChakraComponent):
"""Toggleable switch component.""" """Toggleable switch component."""
tag = "Switch" tag: str = "Switch"
# If true, the switch will be checked. You'll need to set an on_change event handler to update its value (since it is now controlled) # If true, the switch will be checked. You'll need to set an on_change event handler to update its value (since it is now controlled)
is_checked: Optional[Var[bool]] = None is_checked: Optional[Var[bool]] = None

View File

@ -13,7 +13,7 @@ from reflex.vars import Var
class TextArea(ChakraComponent): class TextArea(ChakraComponent):
"""A text area component.""" """A text area component."""
tag = "Textarea" tag: str = "Textarea"
# State var to bind the input. # State var to bind the input.
value: Optional[Var[str]] = None value: Optional[Var[str]] = None

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class AspectRatio(ChakraComponent): class AspectRatio(ChakraComponent):
"""AspectRatio component is used to embed responsive videos and maps, etc.""" """AspectRatio component is used to embed responsive videos and maps, etc."""
tag = "AspectRatio" tag: str = "AspectRatio"
# The aspect ratio of the Box # The aspect ratio of the Box
ratio: Optional[Var[float]] = None ratio: Optional[Var[float]] = None

View File

@ -9,7 +9,7 @@ from reflex.vars import Var
class Box(ChakraComponent): class Box(ChakraComponent):
"""A generic container component that can contain other components.""" """A generic container component that can contain other components."""
tag = "Box" tag: str = "Box"
# The type element to render. You can specify an image, video, or any other HTML element such as iframe. # The type element to render. You can specify an image, video, or any other HTML element such as iframe.
element: Optional[Var[str]] = None element: Optional[Var[str]] = None

View File

@ -14,25 +14,25 @@ from reflex.vars import Var
class CardHeader(ChakraComponent): class CardHeader(ChakraComponent):
"""The wrapper that contains a card's header.""" """The wrapper that contains a card's header."""
tag = "CardHeader" tag: str = "CardHeader"
class CardBody(ChakraComponent): class CardBody(ChakraComponent):
"""The wrapper that houses the card's main content.""" """The wrapper that houses the card's main content."""
tag = "CardBody" tag: str = "CardBody"
class CardFooter(ChakraComponent): class CardFooter(ChakraComponent):
"""The footer that houses the card actions.""" """The footer that houses the card actions."""
tag = "CardFooter" tag: str = "CardFooter"
class Card(ChakraComponent): class Card(ChakraComponent):
"""The parent wrapper that provides context for its children.""" """The parent wrapper that provides context for its children."""
tag = "Card" tag: str = "Card"
# [required] The flex alignment of the card # [required] The flex alignment of the card
align: Optional[Var[str]] = None align: Optional[Var[str]] = None

View File

@ -6,16 +6,16 @@ from reflex.components.chakra import ChakraComponent
class Center(ChakraComponent): class Center(ChakraComponent):
"""A box that centers its contents.""" """A box that centers its contents."""
tag = "Center" tag: str = "Center"
class Square(ChakraComponent): class Square(ChakraComponent):
"""A centered square container.""" """A centered square container."""
tag = "Square" tag: str = "Square"
class Circle(ChakraComponent): class Circle(ChakraComponent):
"""A square container with round border-radius.""" """A square container with round border-radius."""
tag = "Circle" tag: str = "Circle"

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class Container(ChakraComponent): class Container(ChakraComponent):
"""A flexbox container that centers its children and sets a max width.""" """A flexbox container that centers its children and sets a max width."""
tag = "Container" tag: str = "Container"
# If true, container will center its children regardless of their width. # If true, container will center its children regardless of their width.
center_content: Optional[Var[bool]] = None center_content: Optional[Var[bool]] = None

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class Flex(ChakraComponent): class Flex(ChakraComponent):
"""A reflexive container component.""" """A reflexive container component."""
tag = "Flex" tag: str = "Flex"
# How to align items in the flex. # How to align items in the flex.
align: Optional[Var[str]] = None align: Optional[Var[str]] = None

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class Grid(ChakraComponent): class Grid(ChakraComponent):
"""A grid component.""" """A grid component."""
tag = "Grid" tag: str = "Grid"
# Shorthand prop for gridAutoColumns to provide automatic column sizing based on content. # Shorthand prop for gridAutoColumns to provide automatic column sizing based on content.
# Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns)_ # Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns)_
@ -43,7 +43,7 @@ class Grid(ChakraComponent):
class GridItem(ChakraComponent): class GridItem(ChakraComponent):
"""Used as a child of Grid to control the span, and start positions within the grid.""" """Used as a child of Grid to control the span, and start positions within the grid."""
tag = "GridItem" tag: str = "GridItem"
# Shorthand prop for gridArea # Shorthand prop for gridArea
# Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area)_ # Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area)_
@ -73,7 +73,7 @@ class GridItem(ChakraComponent):
class ResponsiveGrid(ChakraComponent): class ResponsiveGrid(ChakraComponent):
"""A responsive grid component.""" """A responsive grid component."""
tag = "SimpleGrid" tag: str = "SimpleGrid"
# Shorthand prop for gridAutoColumns to provide automatic column sizing based on content. # Shorthand prop for gridAutoColumns to provide automatic column sizing based on content.
# Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns)_ # Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns)_

View File

@ -6,4 +6,4 @@ from reflex.components.chakra import ChakraComponent
class Spacer(ChakraComponent): class Spacer(ChakraComponent):
"""A flexible space component.""" """A flexible space component."""
tag = "Spacer" tag: str = "Spacer"

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class Stack(ChakraComponent): class Stack(ChakraComponent):
"""Container to stack elements with spacing.""" """Container to stack elements with spacing."""
tag = "Stack" tag: str = "Stack"
# Shorthand for alignItems style prop # Shorthand for alignItems style prop
align_items: Optional[Var[str]] = None align_items: Optional[Var[str]] = None
@ -38,10 +38,10 @@ class Stack(ChakraComponent):
class Hstack(Stack): class Hstack(Stack):
"""Stack items horizontally.""" """Stack items horizontally."""
tag = "HStack" tag: str = "HStack"
class Vstack(Stack): class Vstack(Stack):
"""Stack items vertically.""" """Stack items vertically."""
tag = "VStack" tag: str = "VStack"

View File

@ -9,7 +9,7 @@ from reflex.vars import Var
class Wrap(ChakraComponent): class Wrap(ChakraComponent):
"""Layout component used to add space between elements and wrap automatically if there isn't enough space.""" """Layout component used to add space between elements and wrap automatically if there isn't enough space."""
tag = "Wrap" tag: str = "Wrap"
# How to align the items. # How to align the items.
align: Optional[Var[str]] = None align: Optional[Var[str]] = None
@ -55,4 +55,4 @@ class Wrap(ChakraComponent):
class WrapItem(ChakraComponent): class WrapItem(ChakraComponent):
"""Item of the Wrap component.""" """Item of the Wrap component."""
tag = "WrapItem" tag: str = "WrapItem"

View File

@ -10,7 +10,7 @@ from reflex.vars import Var
class Avatar(ChakraComponent): class Avatar(ChakraComponent):
"""The image that represents the user.""" """The image that represents the user."""
tag = "Avatar" tag: str = "Avatar"
# The default avatar used as fallback when name, and src is not specified. # The default avatar used as fallback when name, and src is not specified.
icon: Optional[Var[str]] = None icon: Optional[Var[str]] = None
@ -51,13 +51,13 @@ class Avatar(ChakraComponent):
class AvatarBadge(ChakraComponent): class AvatarBadge(ChakraComponent):
"""A wrapper that displays its content on the right corner of the avatar.""" """A wrapper that displays its content on the right corner of the avatar."""
tag = "AvatarBadge" tag: str = "AvatarBadge"
class AvatarGroup(ChakraComponent): class AvatarGroup(ChakraComponent):
"""A wrapper to stack multiple Avatars together.""" """A wrapper to stack multiple Avatars together."""
tag = "AvatarGroup" tag: str = "AvatarGroup"
# The maximum number of visible avatars. # The maximum number of visible avatars.
max_: Optional[Var[int]] = None max_: Optional[Var[int]] = None

View File

@ -14,7 +14,7 @@ class ChakraIconComponent(ChakraComponent):
class Icon(ChakraIconComponent): class Icon(ChakraIconComponent):
"""An image icon.""" """An image icon."""
tag = "None" tag: str = "None"
@classmethod @classmethod
def create(cls, *children, **props): def create(cls, *children, **props):

View File

@ -11,7 +11,7 @@ from reflex.vars import Var
class Image(ChakraComponent): class Image(ChakraComponent):
"""Display an image.""" """Display an image."""
tag = "Image" tag: str = "Image"
alias = "ChakraImage" alias = "ChakraImage"
# How to align the image within its bounds. It maps to css `object-position` property. # How to align the image within its bounds. It maps to css `object-position` property.
align: Optional[Var[str]] = None align: Optional[Var[str]] = None

View File

@ -11,7 +11,7 @@ from reflex.vars import Var
class Breadcrumb(ChakraComponent): class Breadcrumb(ChakraComponent):
"""The parent container for breadcrumbs.""" """The parent container for breadcrumbs."""
tag = "Breadcrumb" tag: str = "Breadcrumb"
# The visual separator between each breadcrumb item # The visual separator between each breadcrumb item
separator: Optional[Var[str]] = None separator: Optional[Var[str]] = None
@ -52,7 +52,7 @@ class Breadcrumb(ChakraComponent):
class BreadcrumbItem(ChakraComponent): class BreadcrumbItem(ChakraComponent):
"""Individual breadcrumb element containing a link and a divider.""" """Individual breadcrumb element containing a link and a divider."""
tag = "BreadcrumbItem" tag: str = "BreadcrumbItem"
# Is the current page of the breadcrumb. # Is the current page of the breadcrumb.
is_current_page: Optional[Var[bool]] = None is_current_page: Optional[Var[bool]] = None
@ -87,13 +87,13 @@ class BreadcrumbItem(ChakraComponent):
class BreadcrumbSeparator(ChakraComponent): class BreadcrumbSeparator(ChakraComponent):
"""The visual separator between each breadcrumb.""" """The visual separator between each breadcrumb."""
tag = "BreadcrumbSeparator" tag: str = "BreadcrumbSeparator"
class BreadcrumbLink(Link): class BreadcrumbLink(Link):
"""The breadcrumb link.""" """The breadcrumb link."""
tag = "BreadcrumbLink" tag: str = "BreadcrumbLink"
# Is the current page of the breadcrumb. # Is the current page of the breadcrumb.
is_current_page: Optional[Var[bool]] = None is_current_page: Optional[Var[bool]] = None

View File

@ -13,7 +13,7 @@ next_link = NextLink.create()
class Link(ChakraComponent): class Link(ChakraComponent):
"""Link to another page.""" """Link to another page."""
tag = "Link" tag: str = "Link"
# The rel. # The rel.
rel: Optional[Var[str]] = None rel: Optional[Var[str]] = None

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class LinkOverlay(ChakraComponent): class LinkOverlay(ChakraComponent):
"""Wraps child component in a link.""" """Wraps child component in a link."""
tag = "LinkOverlay" tag: str = "LinkOverlay"
# If true, the link will open in new tab # If true, the link will open in new tab
is_external: Optional[Var[bool]] = None is_external: Optional[Var[bool]] = None
@ -20,4 +20,4 @@ class LinkOverlay(ChakraComponent):
class LinkBox(ChakraComponent): class LinkBox(ChakraComponent):
"""The LinkBox lifts any nested links to the top using z-index to ensure proper keyboard navigation between links.""" """The LinkBox lifts any nested links to the top using z-index to ensure proper keyboard navigation between links."""
tag = "LinkBox" tag: str = "LinkBox"

View File

@ -9,7 +9,7 @@ from reflex.vars import Var
class Stepper(ChakraComponent): class Stepper(ChakraComponent):
"""The parent container for a stepper.""" """The parent container for a stepper."""
tag = "Stepper" tag: str = "Stepper"
orientation: Optional[Var[Literal["vertical", "horizontal"]]] = None orientation: Optional[Var[Literal["vertical", "horizontal"]]] = None
@ -57,37 +57,37 @@ class Stepper(ChakraComponent):
class Step(ChakraComponent): class Step(ChakraComponent):
"""A component for an individual step in the stepper.""" """A component for an individual step in the stepper."""
tag = "Step" tag: str = "Step"
class StepDescription(ChakraComponent): class StepDescription(ChakraComponent):
"""The description text for a step component.""" """The description text for a step component."""
tag = "StepDescription" tag: str = "StepDescription"
class StepIcon(ChakraComponent): class StepIcon(ChakraComponent):
"""The icon displayed in a step indicator component.""" """The icon displayed in a step indicator component."""
tag = "StepIcon" tag: str = "StepIcon"
class StepIndicator(ChakraComponent): class StepIndicator(ChakraComponent):
"""The component displaying the status of a step.""" """The component displaying the status of a step."""
tag = "StepIndicator" tag: str = "StepIndicator"
class StepNumber(ChakraComponent): class StepNumber(ChakraComponent):
"""The number of a step displayed in a step indicator component.""" """The number of a step displayed in a step indicator component."""
tag = "StepNumber" tag: str = "StepNumber"
class StepSeparator(ChakraComponent): class StepSeparator(ChakraComponent):
"""The component separting steps.""" """The component separting steps."""
tag = "StepSeparator" tag: str = "StepSeparator"
class StepStatus(ChakraComponent): class StepStatus(ChakraComponent):
@ -103,10 +103,10 @@ class StepStatus(ChakraComponent):
incomplete: Optional[Var[str]] = None incomplete: Optional[Var[str]] = None
tag = "StepStatus" tag: str = "StepStatus"
class StepTitle(ChakraComponent): class StepTitle(ChakraComponent):
"""The title text for a step component.""" """The title text for a step component."""
tag = "StepTitle" tag: str = "StepTitle"

View File

@ -12,7 +12,7 @@ from reflex.vars import Var
class AlertDialog(ChakraComponent): class AlertDialog(ChakraComponent):
"""Provides context and state for the dialog.""" """Provides context and state for the dialog."""
tag = "AlertDialog" tag: str = "AlertDialog"
# If true, the modal will be open. # If true, the modal will be open.
is_open: Optional[Var[bool]] = None is_open: Optional[Var[bool]] = None
@ -122,34 +122,34 @@ class AlertDialog(ChakraComponent):
class AlertDialogBody(ChakraComponent): class AlertDialogBody(ChakraComponent):
"""Should contain the description announced by screen readers.""" """Should contain the description announced by screen readers."""
tag = "AlertDialogBody" tag: str = "AlertDialogBody"
class AlertDialogHeader(ChakraComponent): class AlertDialogHeader(ChakraComponent):
"""Should contain the title announced by screen readers.""" """Should contain the title announced by screen readers."""
tag = "AlertDialogHeader" tag: str = "AlertDialogHeader"
class AlertDialogFooter(ChakraComponent): class AlertDialogFooter(ChakraComponent):
"""Should contain the events of the dialog.""" """Should contain the events of the dialog."""
tag = "AlertDialogFooter" tag: str = "AlertDialogFooter"
class AlertDialogContent(ChakraComponent): class AlertDialogContent(ChakraComponent):
"""The wrapper for the alert dialog's content.""" """The wrapper for the alert dialog's content."""
tag = "AlertDialogContent" tag: str = "AlertDialogContent"
class AlertDialogOverlay(ChakraComponent): class AlertDialogOverlay(ChakraComponent):
"""The dimmed overlay behind the dialog.""" """The dimmed overlay behind the dialog."""
tag = "AlertDialogOverlay" tag: str = "AlertDialogOverlay"
class AlertDialogCloseButton(ChakraComponent): class AlertDialogCloseButton(ChakraComponent):
"""The button that closes the dialog.""" """The button that closes the dialog."""
tag = "AlertDialogCloseButton" tag: str = "AlertDialogCloseButton"

View File

@ -16,7 +16,7 @@ from reflex.vars import Var
class Drawer(ChakraComponent): class Drawer(ChakraComponent):
"""A drawer component.""" """A drawer component."""
tag = "Drawer" tag: str = "Drawer"
# If true, the modal will be open. # If true, the modal will be open.
is_open: Optional[Var[bool]] = None is_open: Optional[Var[bool]] = None
@ -137,34 +137,34 @@ class Drawer(ChakraComponent):
class DrawerBody(ChakraComponent): class DrawerBody(ChakraComponent):
"""Drawer body.""" """Drawer body."""
tag = "DrawerBody" tag: str = "DrawerBody"
class DrawerHeader(ChakraComponent): class DrawerHeader(ChakraComponent):
"""Drawer header.""" """Drawer header."""
tag = "DrawerHeader" tag: str = "DrawerHeader"
class DrawerFooter(ChakraComponent): class DrawerFooter(ChakraComponent):
"""Drawer footer.""" """Drawer footer."""
tag = "DrawerFooter" tag: str = "DrawerFooter"
class DrawerOverlay(ChakraComponent): class DrawerOverlay(ChakraComponent):
"""Drawer overlay.""" """Drawer overlay."""
tag = "DrawerOverlay" tag: str = "DrawerOverlay"
class DrawerContent(ChakraComponent): class DrawerContent(ChakraComponent):
"""Drawer content.""" """Drawer content."""
tag = "DrawerContent" tag: str = "DrawerContent"
class DrawerCloseButton(ChakraComponent): class DrawerCloseButton(ChakraComponent):
"""Drawer close button.""" """Drawer close button."""
tag = "DrawerCloseButton" tag: str = "DrawerCloseButton"

View File

@ -17,7 +17,7 @@ from reflex.vars import Var
class Menu(ChakraComponent): class Menu(ChakraComponent):
"""The wrapper component provides context, state, and focus management.""" """The wrapper component provides context, state, and focus management."""
tag = "Menu" tag: str = "Menu"
# The padding required to prevent the arrow from reaching the very edge of the popper. # The padding required to prevent the arrow from reaching the very edge of the popper.
arrow_padding: Optional[Var[int]] = None arrow_padding: Optional[Var[int]] = None
@ -115,7 +115,7 @@ class Menu(ChakraComponent):
class MenuButton(ChakraComponent): class MenuButton(ChakraComponent):
"""The trigger for the menu list. Must be a direct child of Menu.""" """The trigger for the menu list. Must be a direct child of Menu."""
tag = "MenuButton" tag: str = "MenuButton"
# The variant of the menu button. # The variant of the menu button.
variant: Optional[Var[str]] = None variant: Optional[Var[str]] = None
@ -130,7 +130,7 @@ class MenuButton(ChakraComponent):
class MenuList(ChakraComponent): class MenuList(ChakraComponent):
"""The wrapper for the menu items. Must be a direct child of Menu.""" """The wrapper for the menu items. Must be a direct child of Menu."""
tag = "MenuList" tag: str = "MenuList"
@classmethod @classmethod
def create(cls, *children, items: Optional[list] = None, **props) -> Component: def create(cls, *children, items: Optional[list] = None, **props) -> Component:
@ -157,7 +157,7 @@ class MenuList(ChakraComponent):
class MenuItem(ChakraComponent): class MenuItem(ChakraComponent):
"""The trigger that handles menu selection. Must be a direct child of a MenuList.""" """The trigger that handles menu selection. Must be a direct child of a MenuList."""
tag = "MenuItem" tag: str = "MenuItem"
# Overrides the parent menu's closeOnSelect prop. # Overrides the parent menu's closeOnSelect prop.
close_on_select: Optional[Var[bool]] = None close_on_select: Optional[Var[bool]] = None
@ -178,7 +178,7 @@ class MenuItem(ChakraComponent):
class MenuItemOption(ChakraComponent): class MenuItemOption(ChakraComponent):
"""The checkable menu item, to be used with MenuOptionGroup.""" """The checkable menu item, to be used with MenuOptionGroup."""
tag = "MenuItemOption" tag: str = "MenuItemOption"
# Overrides the parent menu's closeOnSelect prop. # Overrides the parent menu's closeOnSelect prop.
close_on_select: Optional[Var[bool]] = None close_on_select: Optional[Var[bool]] = None
@ -208,13 +208,13 @@ class MenuItemOption(ChakraComponent):
class MenuGroup(ChakraComponent): class MenuGroup(ChakraComponent):
"""A wrapper to group related menu items.""" """A wrapper to group related menu items."""
tag = "MenuGroup" tag: str = "MenuGroup"
class MenuOptionGroup(ChakraComponent): class MenuOptionGroup(ChakraComponent):
"""A wrapper for checkable menu items (radio and checkbox).""" """A wrapper for checkable menu items (radio and checkbox)."""
tag = "MenuOptionGroup" tag: str = "MenuOptionGroup"
# "checkbox" | "radio" # "checkbox" | "radio"
type_: Optional[Var[LiteralMenuOption]] = None type_: Optional[Var[LiteralMenuOption]] = None
@ -226,4 +226,4 @@ class MenuOptionGroup(ChakraComponent):
class MenuDivider(ChakraComponent): class MenuDivider(ChakraComponent):
"""A visual separator for menu items and groups.""" """A visual separator for menu items and groups."""
tag = "MenuDivider" tag: str = "MenuDivider"

View File

@ -14,7 +14,7 @@ ModalSizes = Literal["xs", "sm", "md", "lg", "xl", "full"]
class Modal(ChakraComponent): class Modal(ChakraComponent):
"""The wrapper that provides context for its children.""" """The wrapper that provides context for its children."""
tag = "Modal" tag: str = "Modal"
# If true, the modal will be open. # If true, the modal will be open.
is_open: Optional[Var[bool]] = None is_open: Optional[Var[bool]] = None
@ -133,34 +133,34 @@ class Modal(ChakraComponent):
class ModalOverlay(ChakraComponent): class ModalOverlay(ChakraComponent):
"""The dimmed overlay behind the modal dialog.""" """The dimmed overlay behind the modal dialog."""
tag = "ModalOverlay" tag: str = "ModalOverlay"
class ModalHeader(ChakraComponent): class ModalHeader(ChakraComponent):
"""The header that labels the modal dialog.""" """The header that labels the modal dialog."""
tag = "ModalHeader" tag: str = "ModalHeader"
class ModalFooter(ChakraComponent): class ModalFooter(ChakraComponent):
"""The footer that houses the modal events.""" """The footer that houses the modal events."""
tag = "ModalFooter" tag: str = "ModalFooter"
class ModalContent(ChakraComponent): class ModalContent(ChakraComponent):
"""The container for the modal dialog's content.""" """The container for the modal dialog's content."""
tag = "ModalContent" tag: str = "ModalContent"
class ModalBody(ChakraComponent): class ModalBody(ChakraComponent):
"""The wrapper that houses the modal's main content.""" """The wrapper that houses the modal's main content."""
tag = "ModalBody" tag: str = "ModalBody"
class ModalCloseButton(ChakraComponent): class ModalCloseButton(ChakraComponent):
"""The button that closes the modal.""" """The button that closes the modal."""
tag = "ModalCloseButton" tag: str = "ModalCloseButton"

View File

@ -16,7 +16,7 @@ from reflex.vars import Var
class Popover(ChakraComponent): class Popover(ChakraComponent):
"""The wrapper that provides props, state, and context to its children.""" """The wrapper that provides props, state, and context to its children."""
tag = "Popover" tag: str = "Popover"
# The padding required to prevent the arrow from reaching the very edge of the popper. # The padding required to prevent the arrow from reaching the very edge of the popper.
arrow_padding: Optional[Var[int]] = None arrow_padding: Optional[Var[int]] = None
@ -144,46 +144,46 @@ class Popover(ChakraComponent):
class PopoverContent(ChakraComponent): class PopoverContent(ChakraComponent):
"""The popover itself.""" """The popover itself."""
tag = "PopoverContent" tag: str = "PopoverContent"
class PopoverHeader(ChakraComponent): class PopoverHeader(ChakraComponent):
"""The header of the popover.""" """The header of the popover."""
tag = "PopoverHeader" tag: str = "PopoverHeader"
class PopoverFooter(ChakraComponent): class PopoverFooter(ChakraComponent):
"""Display a popover footer.""" """Display a popover footer."""
tag = "PopoverFooter" tag: str = "PopoverFooter"
class PopoverBody(ChakraComponent): class PopoverBody(ChakraComponent):
"""The body of the popover.""" """The body of the popover."""
tag = "PopoverBody" tag: str = "PopoverBody"
class PopoverArrow(ChakraComponent): class PopoverArrow(ChakraComponent):
"""A visual arrow that points to the reference (or trigger).""" """A visual arrow that points to the reference (or trigger)."""
tag = "PopoverArrow" tag: str = "PopoverArrow"
class PopoverCloseButton(ChakraComponent): class PopoverCloseButton(ChakraComponent):
"""A button to close the popover.""" """A button to close the popover."""
tag = "PopoverCloseButton" tag: str = "PopoverCloseButton"
class PopoverAnchor(ChakraComponent): class PopoverAnchor(ChakraComponent):
"""Used to wrap the position-reference element.""" """Used to wrap the position-reference element."""
tag = "PopoverAnchor" tag: str = "PopoverAnchor"
class PopoverTrigger(ChakraComponent): class PopoverTrigger(ChakraComponent):
"""Used to wrap the reference (or trigger) element.""" """Used to wrap the reference (or trigger) element."""
tag = "PopoverTrigger" tag: str = "PopoverTrigger"

View File

@ -10,7 +10,7 @@ from reflex.vars import Var
class Tooltip(ChakraComponent): class Tooltip(ChakraComponent):
"""A tooltip message to appear.""" """A tooltip message to appear."""
tag = "Tooltip" tag: str = "Tooltip"
# The padding required to prevent the arrow from reaching the very edge of the popper. # The padding required to prevent the arrow from reaching the very edge of the popper.
arrow_padding: Optional[Var[int]] = None arrow_padding: Optional[Var[int]] = None

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class Heading(ChakraComponent): class Heading(ChakraComponent):
"""A page heading.""" """A page heading."""
tag = "Heading" tag: str = "Heading"
# Override the tag. The default tag is `<h2>`. # Override the tag. The default tag is `<h2>`.
as_: Optional[Var[str]] = None as_: Optional[Var[str]] = None

View File

@ -9,7 +9,7 @@ from reflex.vars import Var
class Highlight(ChakraComponent): class Highlight(ChakraComponent):
"""Highlights a specific part of a string.""" """Highlights a specific part of a string."""
tag = "Highlight" tag: str = "Highlight"
# A query for the text to highlight. Can be a string or a list of strings. # A query for the text to highlight. Can be a string or a list of strings.
query: Optional[Var[List[str]]] = None query: Optional[Var[List[str]]] = None

View File

@ -8,7 +8,7 @@ from reflex.vars import Var
class Span(ChakraComponent): class Span(ChakraComponent):
"""Render an inline span of text.""" """Render an inline span of text."""
tag = "Text" tag: str = "Text"
# Override the tag. The default tag is `<span>`. # Override the tag. The default tag is `<span>`.
as_: Var[str] = "span" # type: ignore as_: Var[str] = "span" # type: ignore

View File

@ -10,7 +10,7 @@ from reflex.vars import Var
class Text(ChakraComponent): class Text(ChakraComponent):
"""Render a paragraph of text.""" """Render a paragraph of text."""
tag = "Text" tag: str = "Text"
# Override the tag. The default tag is `<p>`. # Override the tag. The default tag is `<p>`.
as_: Optional[Var[str]] = None as_: Optional[Var[str]] = None

View File

@ -21,7 +21,7 @@ class ClientSideRouting(Component):
"""The client-side routing component.""" """The client-side routing component."""
library = "/utils/client_side_routing" library = "/utils/client_side_routing"
tag = "useClientSideRouting" tag: str = "useClientSideRouting"
def _get_hooks(self) -> str: def _get_hooks(self) -> str:
"""Get the hooks to render. """Get the hooks to render.
@ -62,7 +62,7 @@ class Default404Page(Component):
"""The NextJS default 404 page.""" """The NextJS default 404 page."""
library = "next/error" library = "next/error"
tag = "Error" tag: str = "Error"
is_default = True is_default = True
status_code: Var[int] = 404 # type: ignore status_code: Var[int] = 404 # type: ignore

View File

@ -19,7 +19,7 @@ class DebounceInput(Component):
""" """
library = "react-debounce-input@3.3.0" library = "react-debounce-input@3.3.0"
tag = "DebounceInput" tag: str = "DebounceInput"
# Minimum input characters before triggering the on_change event # Minimum input characters before triggering the on_change event
min_length: Optional[Var[int]] = None min_length: Optional[Var[int]] = None

View File

@ -158,7 +158,7 @@ class UploadFilesProvider(Component):
"""AppWrap component that provides a dict of selected files by ID via useContext.""" """AppWrap component that provides a dict of selected files by ID via useContext."""
library = f"/{Dirs.CONTEXTS_PATH}" library = f"/{Dirs.CONTEXTS_PATH}"
tag = "UploadFilesProvider" tag: str = "UploadFilesProvider"
class Upload(MemoizationLeaf): class Upload(MemoizationLeaf):
@ -166,7 +166,7 @@ class Upload(MemoizationLeaf):
library = "react-dropzone@14.2.3" library = "react-dropzone@14.2.3"
tag = "ReactDropzone" tag: str = "ReactDropzone"
is_default = True is_default = True

View File

@ -350,7 +350,7 @@ class CodeBlock(Component):
library = "react-syntax-highlighter@15.5.0" library = "react-syntax-highlighter@15.5.0"
tag = "PrismAsyncLight" tag: str = "PrismAsyncLight"
alias = "SyntaxHighlighter" alias = "SyntaxHighlighter"

View File

@ -106,7 +106,7 @@ class DataEditorTheme(Base):
class DataEditor(NoSSRComponent): class DataEditor(NoSSRComponent):
"""The DataEditor Component.""" """The DataEditor Component."""
tag = "DataEditor" tag: str = "DataEditor"
is_default = True is_default = True
library: str = "@glideapps/glide-data-grid@^5.3.0" library: str = "@glideapps/glide-data-grid@^5.3.0"
lib_dependencies: List[str] = [ lib_dependencies: List[str] = [

View File

@ -11,7 +11,7 @@ from .base import BaseHTML
class Button(BaseHTML): class Button(BaseHTML):
"""Display the button element.""" """Display the button element."""
tag = "button" tag: str = "button"
# Automatically focuses the button when the page loads # Automatically focuses the button when the page loads
auto_focus: Optional[Var[Union[str, int, bool]]] = None auto_focus: Optional[Var[Union[str, int, bool]]] = None
@ -50,14 +50,14 @@ class Button(BaseHTML):
class Datalist(BaseHTML): class Datalist(BaseHTML):
"""Display the datalist element.""" """Display the datalist element."""
tag = "datalist" tag: str = "datalist"
# No unique attributes, only common ones are inherited # No unique attributes, only common ones are inherited
class Fieldset(Element): class Fieldset(Element):
"""Display the fieldset element.""" """Display the fieldset element."""
tag = "fieldset" tag: str = "fieldset"
# Disables all the form control descendants of the fieldset # Disables all the form control descendants of the fieldset
disabled: Optional[Var[Union[str, int, bool]]] = None disabled: Optional[Var[Union[str, int, bool]]] = None
@ -72,7 +72,7 @@ class Fieldset(Element):
class Form(BaseHTML): class Form(BaseHTML):
"""Display the form element.""" """Display the form element."""
tag = "form" tag: str = "form"
# MIME types the server accepts for file upload # MIME types the server accepts for file upload
accept: Optional[Var[Union[str, int, bool]]] = None accept: Optional[Var[Union[str, int, bool]]] = None
@ -105,7 +105,7 @@ class Form(BaseHTML):
class Input(BaseHTML): class Input(BaseHTML):
"""Display the input element.""" """Display the input element."""
tag = "input" tag: str = "input"
# Accepted types of files when the input is file type # Accepted types of files when the input is file type
accept: Optional[Var[Union[str, int, bool]]] = None accept: Optional[Var[Union[str, int, bool]]] = None
@ -225,7 +225,7 @@ class Input(BaseHTML):
class Label(BaseHTML): class Label(BaseHTML):
"""Display the label element.""" """Display the label element."""
tag = "label" tag: str = "label"
# ID of a form control with which the label is associated # ID of a form control with which the label is associated
html_for: Optional[Var[Union[str, int, bool]]] = None html_for: Optional[Var[Union[str, int, bool]]] = None
@ -237,14 +237,14 @@ class Label(BaseHTML):
class Legend(BaseHTML): class Legend(BaseHTML):
"""Display the legend element.""" """Display the legend element."""
tag = "legend" tag: str = "legend"
# No unique attributes, only common ones are inherited # No unique attributes, only common ones are inherited
class Meter(BaseHTML): class Meter(BaseHTML):
"""Display the meter element.""" """Display the meter element."""
tag = "meter" tag: str = "meter"
# Associates the meter with a form (by id) # Associates the meter with a form (by id)
form: Optional[Var[Union[str, int, bool]]] = None form: Optional[Var[Union[str, int, bool]]] = None
@ -271,7 +271,7 @@ class Meter(BaseHTML):
class Optgroup(BaseHTML): class Optgroup(BaseHTML):
"""Display the optgroup element.""" """Display the optgroup element."""
tag = "optgroup" tag: str = "optgroup"
# Disables the optgroup # Disables the optgroup
disabled: Optional[Var[Union[str, int, bool]]] = None disabled: Optional[Var[Union[str, int, bool]]] = None
@ -283,7 +283,7 @@ class Optgroup(BaseHTML):
class Option(BaseHTML): class Option(BaseHTML):
"""Display the option element.""" """Display the option element."""
tag = "option" tag: str = "option"
# Disables the option # Disables the option
disabled: Optional[Var[Union[str, int, bool]]] = None disabled: Optional[Var[Union[str, int, bool]]] = None
@ -301,7 +301,7 @@ class Option(BaseHTML):
class Output(BaseHTML): class Output(BaseHTML):
"""Display the output element.""" """Display the output element."""
tag = "output" tag: str = "output"
# Associates the output with one or more elements (by their IDs) # Associates the output with one or more elements (by their IDs)
html_for: Optional[Var[Union[str, int, bool]]] = None html_for: Optional[Var[Union[str, int, bool]]] = None
@ -316,7 +316,7 @@ class Output(BaseHTML):
class Progress(BaseHTML): class Progress(BaseHTML):
"""Display the progress element.""" """Display the progress element."""
tag = "progress" tag: str = "progress"
# Associates the progress element with a form (by id) # Associates the progress element with a form (by id)
form: Optional[Var[Union[str, int, bool]]] = None form: Optional[Var[Union[str, int, bool]]] = None
@ -331,7 +331,7 @@ class Progress(BaseHTML):
class Select(BaseHTML): class Select(BaseHTML):
"""Display the select element.""" """Display the select element."""
tag = "select" tag: str = "select"
# Whether the form control should have autocomplete enabled # Whether the form control should have autocomplete enabled
auto_complete: Optional[Var[Union[str, int, bool]]] = None auto_complete: Optional[Var[Union[str, int, bool]]] = None
@ -372,7 +372,7 @@ class Select(BaseHTML):
class Textarea(BaseHTML): class Textarea(BaseHTML):
"""Display the textarea element.""" """Display the textarea element."""
tag = "textarea" tag: str = "textarea"
# Whether the form control should have autocomplete enabled # Whether the form control should have autocomplete enabled
auto_complete: Optional[Var[Union[str, int, bool]]] = None auto_complete: Optional[Var[Union[str, int, bool]]] = None

View File

@ -9,7 +9,7 @@ from .base import BaseHTML
class A(BaseHTML): # Inherits common attributes from BaseMeta class A(BaseHTML): # Inherits common attributes from BaseMeta
"""Display the 'a' element.""" """Display the 'a' element."""
tag = "a" tag: str = "a"
# Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink. # Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink.
download: Optional[Var[Union[str, int, bool]]] = None download: Optional[Var[Union[str, int, bool]]] = None
@ -42,49 +42,49 @@ class A(BaseHTML): # Inherits common attributes from BaseMeta
class Abbr(BaseHTML): class Abbr(BaseHTML):
"""Display the abbr element.""" """Display the abbr element."""
tag = "abbr" tag: str = "abbr"
class B(BaseHTML): class B(BaseHTML):
"""Display the b element.""" """Display the b element."""
tag = "b" tag: str = "b"
class Bdi(BaseHTML): class Bdi(BaseHTML):
"""Display the bdi element.""" """Display the bdi element."""
tag = "bdi" tag: str = "bdi"
class Bdo(BaseHTML): class Bdo(BaseHTML):
"""Display the bdo element.""" """Display the bdo element."""
tag = "bdo" tag: str = "bdo"
class Br(BaseHTML): class Br(BaseHTML):
"""Display the br element.""" """Display the br element."""
tag = "br" tag: str = "br"
class Cite(BaseHTML): class Cite(BaseHTML):
"""Display the cite element.""" """Display the cite element."""
tag = "cite" tag: str = "cite"
class Code(BaseHTML): class Code(BaseHTML):
"""Display the code element.""" """Display the code element."""
tag = "code" tag: str = "code"
class Data(BaseHTML): class Data(BaseHTML):
"""Display the data element.""" """Display the data element."""
tag = "data" tag: str = "data"
# Specifies the machine-readable translation of the data element. # Specifies the machine-readable translation of the data element.
value: Optional[Var[Union[str, int, bool]]] = None value: Optional[Var[Union[str, int, bool]]] = None
@ -93,37 +93,37 @@ class Data(BaseHTML):
class Dfn(BaseHTML): class Dfn(BaseHTML):
"""Display the dfn element.""" """Display the dfn element."""
tag = "dfn" tag: str = "dfn"
class Em(BaseHTML): class Em(BaseHTML):
"""Display the em element.""" """Display the em element."""
tag = "em" tag: str = "em"
class I(BaseHTML): # noqa: E742 class I(BaseHTML): # noqa: E742
"""Display the i element.""" """Display the i element."""
tag = "i" tag: str = "i"
class Kbd(BaseHTML): class Kbd(BaseHTML):
"""Display the kbd element.""" """Display the kbd element."""
tag = "kbd" tag: str = "kbd"
class Mark(BaseHTML): class Mark(BaseHTML):
"""Display the mark element.""" """Display the mark element."""
tag = "mark" tag: str = "mark"
class Q(BaseHTML): class Q(BaseHTML):
"""Display the q element.""" """Display the q element."""
tag = "q" tag: str = "q"
# Specifies the source URL of the quote. # Specifies the source URL of the quote.
cite: Optional[Var[Union[str, int, bool]]] = None cite: Optional[Var[Union[str, int, bool]]] = None
@ -132,67 +132,67 @@ class Q(BaseHTML):
class Rp(BaseHTML): class Rp(BaseHTML):
"""Display the rp element.""" """Display the rp element."""
tag = "rp" tag: str = "rp"
class Rt(BaseHTML): class Rt(BaseHTML):
"""Display the rt element.""" """Display the rt element."""
tag = "rt" tag: str = "rt"
class Ruby(BaseHTML): class Ruby(BaseHTML):
"""Display the ruby element.""" """Display the ruby element."""
tag = "ruby" tag: str = "ruby"
class S(BaseHTML): class S(BaseHTML):
"""Display the s element.""" """Display the s element."""
tag = "s" tag: str = "s"
class Samp(BaseHTML): class Samp(BaseHTML):
"""Display the samp element.""" """Display the samp element."""
tag = "samp" tag: str = "samp"
class Small(BaseHTML): class Small(BaseHTML):
"""Display the small element.""" """Display the small element."""
tag = "small" tag: str = "small"
class Span(BaseHTML): class Span(BaseHTML):
"""Display the span element.""" """Display the span element."""
tag = "span" tag: str = "span"
class Strong(BaseHTML): class Strong(BaseHTML):
"""Display the strong element.""" """Display the strong element."""
tag = "strong" tag: str = "strong"
class Sub(BaseHTML): class Sub(BaseHTML):
"""Display the sub element.""" """Display the sub element."""
tag = "sub" tag: str = "sub"
class Sup(BaseHTML): class Sup(BaseHTML):
"""Display the sup element.""" """Display the sup element."""
tag = "sup" tag: str = "sup"
class Time(BaseHTML): class Time(BaseHTML):
"""Display the time element.""" """Display the time element."""
tag = "time" tag: str = "time"
# Specifies the date and/or time of the element. # Specifies the date and/or time of the element.
date_time: Optional[Var[Union[str, int, bool]]] = None date_time: Optional[Var[Union[str, int, bool]]] = None
@ -201,10 +201,10 @@ class Time(BaseHTML):
class U(BaseHTML): class U(BaseHTML):
"""Display the u element.""" """Display the u element."""
tag = "u" tag: str = "u"
class Wbr(BaseHTML): class Wbr(BaseHTML):
"""Display the wbr element.""" """Display the wbr element."""
tag = "wbr" tag: str = "wbr"

View File

@ -9,7 +9,7 @@ from .base import BaseHTML
class Area(BaseHTML): class Area(BaseHTML):
"""Display the area element.""" """Display the area element."""
tag = "area" tag: str = "area"
# Alternate text for the area, used for accessibility # Alternate text for the area, used for accessibility
alt: Optional[Var[Union[str, int, bool]]] = None alt: Optional[Var[Union[str, int, bool]]] = None
@ -48,7 +48,7 @@ class Area(BaseHTML):
class Audio(BaseHTML): class Audio(BaseHTML):
"""Display the audio element.""" """Display the audio element."""
tag = "audio" tag: str = "audio"
# Specifies that the audio will start playing as soon as it is ready # Specifies that the audio will start playing as soon as it is ready
auto_play: Optional[Var[Union[str, int, bool]]] = None auto_play: Optional[Var[Union[str, int, bool]]] = None
@ -78,7 +78,7 @@ class Audio(BaseHTML):
class Img(BaseHTML): class Img(BaseHTML):
"""Display the img element.""" """Display the img element."""
tag = "img" tag: str = "img"
# Image alignment with respect to its surrounding elements # Image alignment with respect to its surrounding elements
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -120,7 +120,7 @@ class Img(BaseHTML):
class Map(BaseHTML): class Map(BaseHTML):
"""Display the map element.""" """Display the map element."""
tag = "map" tag: str = "map"
# Name of the map, referenced by the 'usemap' attribute in 'img' and 'object' elements # Name of the map, referenced by the 'usemap' attribute in 'img' and 'object' elements
name: Optional[Var[Union[str, int, bool]]] = None name: Optional[Var[Union[str, int, bool]]] = None
@ -129,7 +129,7 @@ class Map(BaseHTML):
class Track(BaseHTML): class Track(BaseHTML):
"""Display the track element.""" """Display the track element."""
tag = "track" tag: str = "track"
# Indicates that the track should be enabled unless the user's preferences indicate otherwise # Indicates that the track should be enabled unless the user's preferences indicate otherwise
default: Optional[Var[Union[str, int, bool]]] = None default: Optional[Var[Union[str, int, bool]]] = None
@ -150,7 +150,7 @@ class Track(BaseHTML):
class Video(BaseHTML): class Video(BaseHTML):
"""Display the video element.""" """Display the video element."""
tag = "video" tag: str = "video"
# Specifies that the video will start playing as soon as it is ready # Specifies that the video will start playing as soon as it is ready
auto_play: Optional[Var[Union[str, int, bool]]] = None auto_play: Optional[Var[Union[str, int, bool]]] = None
@ -186,7 +186,7 @@ class Video(BaseHTML):
class Embed(BaseHTML): class Embed(BaseHTML):
"""Display the embed element.""" """Display the embed element."""
tag = "embed" tag: str = "embed"
# URL of the embedded content # URL of the embedded content
src: Optional[Var[Union[str, int, bool]]] = None src: Optional[Var[Union[str, int, bool]]] = None
@ -198,7 +198,7 @@ class Embed(BaseHTML):
class Iframe(BaseHTML): class Iframe(BaseHTML):
"""Display the iframe element.""" """Display the iframe element."""
tag = "iframe" tag: str = "iframe"
# Alignment of the iframe within the page or surrounding elements # Alignment of the iframe within the page or surrounding elements
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -231,7 +231,7 @@ class Iframe(BaseHTML):
class Object(BaseHTML): class Object(BaseHTML):
"""Display the object element.""" """Display the object element."""
tag = "object" tag: str = "object"
# URL of the data to be used by the object # URL of the data to be used by the object
data: Optional[Var[Union[str, int, bool]]] = None data: Optional[Var[Union[str, int, bool]]] = None
@ -252,21 +252,21 @@ class Object(BaseHTML):
class Picture(BaseHTML): class Picture(BaseHTML):
"""Display the picture element.""" """Display the picture element."""
tag = "picture" tag: str = "picture"
# No unique attributes, only common ones are inherited # No unique attributes, only common ones are inherited
class Portal(BaseHTML): class Portal(BaseHTML):
"""Display the portal element.""" """Display the portal element."""
tag = "portal" tag: str = "portal"
# No unique attributes, only common ones are inherited # No unique attributes, only common ones are inherited
class Source(BaseHTML): class Source(BaseHTML):
"""Display the source element.""" """Display the source element."""
tag = "source" tag: str = "source"
# Media query indicating what device the linked resource is optimized for # Media query indicating what device the linked resource is optimized for
media: Optional[Var[Union[str, int, bool]]] = None media: Optional[Var[Union[str, int, bool]]] = None
@ -287,13 +287,13 @@ class Source(BaseHTML):
class Svg(BaseHTML): class Svg(BaseHTML):
"""Display the svg element.""" """Display the svg element."""
tag = "svg" tag: str = "svg"
class Path(BaseHTML): class Path(BaseHTML):
"""Display the path element.""" """Display the path element."""
tag = "path" tag: str = "path"
# Defines the shape of the path # Defines the shape of the path
d: Optional[Var[Union[str, int, bool]]] = None d: Optional[Var[Union[str, int, bool]]] = None

View File

@ -10,9 +10,9 @@ from .base import BaseHTML
class Base(BaseHTML): # noqa: E742 class Base(BaseHTML): # noqa: E742
"""Display the base element.""" """Display the base element."""
tag = "base" tag: str = "base"
tag = "base" tag: str = "base"
href: Optional[Var[Union[str, int, bool]]] = None href: Optional[Var[Union[str, int, bool]]] = None
target: Optional[Var[Union[str, int, bool]]] = None target: Optional[Var[Union[str, int, bool]]] = None
@ -20,13 +20,13 @@ class Base(BaseHTML): # noqa: E742
class Head(BaseHTML): # noqa: E742 class Head(BaseHTML): # noqa: E742
"""Display the head element.""" """Display the head element."""
tag = "head" tag: str = "head"
class Link(BaseHTML): # noqa: E742 class Link(BaseHTML): # noqa: E742
"""Display the link element.""" """Display the link element."""
tag = "link" tag: str = "link"
cross_origin: Optional[Var[Union[str, int, bool]]] = None cross_origin: Optional[Var[Union[str, int, bool]]] = None
href: Optional[Var[Union[str, int, bool]]] = None href: Optional[Var[Union[str, int, bool]]] = None
@ -42,7 +42,7 @@ class Link(BaseHTML): # noqa: E742
class Meta(BaseHTML): # Inherits common attributes from BaseHTML class Meta(BaseHTML): # Inherits common attributes from BaseHTML
"""Display the meta element.""" """Display the meta element."""
tag = "meta" tag: str = "meta"
char_set: Optional[Var[Union[str, int, bool]]] = None char_set: Optional[Var[Union[str, int, bool]]] = None
content: Optional[Var[Union[str, int, bool]]] = None content: Optional[Var[Union[str, int, bool]]] = None
http_equiv: Optional[Var[Union[str, int, bool]]] = None http_equiv: Optional[Var[Union[str, int, bool]]] = None
@ -52,4 +52,4 @@ class Meta(BaseHTML): # Inherits common attributes from BaseHTML
class Title(Element): # noqa: E742 class Title(Element): # noqa: E742
"""Display the title element.""" """Display the title element."""
tag = "title" tag: str = "title"

View File

@ -9,7 +9,7 @@ from .base import BaseHTML
class Details(BaseHTML): class Details(BaseHTML):
"""Display the details element.""" """Display the details element."""
tag = "details" tag: str = "details"
# Indicates whether the details will be visible (expanded) to the user # Indicates whether the details will be visible (expanded) to the user
open: Optional[Var[Union[str, int, bool]]] = None open: Optional[Var[Union[str, int, bool]]] = None
@ -18,7 +18,7 @@ class Details(BaseHTML):
class Dialog(BaseHTML): class Dialog(BaseHTML):
"""Display the dialog element.""" """Display the dialog element."""
tag = "dialog" tag: str = "dialog"
# Indicates whether the dialog is active and can be interacted with # Indicates whether the dialog is active and can be interacted with
open: Optional[Var[Union[str, int, bool]]] = None open: Optional[Var[Union[str, int, bool]]] = None
@ -27,35 +27,35 @@ class Dialog(BaseHTML):
class Summary(BaseHTML): class Summary(BaseHTML):
"""Display the summary element.""" """Display the summary element."""
tag = "summary" tag: str = "summary"
# No unique attributes, only common ones are inherited; used as a summary or caption for a <details> element # No unique attributes, only common ones are inherited; used as a summary or caption for a <details> element
class Slot(BaseHTML): class Slot(BaseHTML):
"""Display the slot element.""" """Display the slot element."""
tag = "slot" tag: str = "slot"
# No unique attributes, only common ones are inherited; used as a placeholder inside a web component # No unique attributes, only common ones are inherited; used as a placeholder inside a web component
class Template(BaseHTML): class Template(BaseHTML):
"""Display the template element.""" """Display the template element."""
tag = "template" tag: str = "template"
# No unique attributes, only common ones are inherited; used for declaring fragments of HTML that can be cloned and inserted in the document # 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): class Math(BaseHTML):
"""Display the math element.""" """Display the math element."""
tag = "math" tag: str = "math"
# No unique attributes, only common ones are inherited; used for displaying mathematical expressions # No unique attributes, only common ones are inherited; used for displaying mathematical expressions
class Html(BaseHTML): class Html(BaseHTML):
"""Display the html element.""" """Display the html element."""
tag = "html" tag: str = "html"
# Specifies the URL of the document's cache manifest (obsolete in HTML5) # Specifies the URL of the document's cache manifest (obsolete in HTML5)
manifest: Optional[Var[Union[str, int, bool]]] = None manifest: Optional[Var[Union[str, int, bool]]] = None

View File

@ -9,20 +9,20 @@ from .base import BaseHTML
class Canvas(BaseHTML): class Canvas(BaseHTML):
"""Display the canvas element.""" """Display the canvas element."""
tag = "canvas" tag: str = "canvas"
class Noscript(BaseHTML): class Noscript(BaseHTML):
"""Display the noscript element.""" """Display the noscript element."""
tag = "noscript" tag: str = "noscript"
# No unique attributes, only common ones are inherited # No unique attributes, only common ones are inherited
class Script(BaseHTML): class Script(BaseHTML):
"""Display the script element.""" """Display the script element."""
tag = "script" tag: str = "script"
# Indicates that the script should be executed asynchronously # Indicates that the script should be executed asynchronously
async_: Optional[Var[Union[str, int, bool]]] = None async_: Optional[Var[Union[str, int, bool]]] = None

View File

@ -8,88 +8,88 @@ from .base import BaseHTML
class Body(BaseHTML): # noqa: E742 class Body(BaseHTML): # noqa: E742
"""Display the body element.""" """Display the body element."""
tag = "body" tag: str = "body"
class Address(BaseHTML): # noqa: E742 class Address(BaseHTML): # noqa: E742
"""Display the address element.""" """Display the address element."""
tag = "address" tag: str = "address"
class Article(BaseHTML): # noqa: E742 class Article(BaseHTML): # noqa: E742
"""Display the article element.""" """Display the article element."""
tag = "article" tag: str = "article"
class Aside(BaseHTML): # noqa: E742 class Aside(BaseHTML): # noqa: E742
"""Display the aside element.""" """Display the aside element."""
tag = "aside" tag: str = "aside"
class Footer(BaseHTML): # noqa: E742 class Footer(BaseHTML): # noqa: E742
"""Display the footer element.""" """Display the footer element."""
tag = "footer" tag: str = "footer"
class Header(BaseHTML): # noqa: E742 class Header(BaseHTML): # noqa: E742
"""Display the header element.""" """Display the header element."""
tag = "header" tag: str = "header"
class H1(BaseHTML): # noqa: E742 class H1(BaseHTML): # noqa: E742
"""Display the h1 element.""" """Display the h1 element."""
tag = "h1" tag: str = "h1"
class H2(BaseHTML): # noqa: E742 class H2(BaseHTML): # noqa: E742
"""Display the h1 element.""" """Display the h1 element."""
tag = "h2" tag: str = "h2"
class H3(BaseHTML): # noqa: E742 class H3(BaseHTML): # noqa: E742
"""Display the h1 element.""" """Display the h1 element."""
tag = "h3" tag: str = "h3"
class H4(BaseHTML): # noqa: E742 class H4(BaseHTML): # noqa: E742
"""Display the h1 element.""" """Display the h1 element."""
tag = "h4" tag: str = "h4"
class H5(BaseHTML): # noqa: E742 class H5(BaseHTML): # noqa: E742
"""Display the h1 element.""" """Display the h1 element."""
tag = "h5" tag: str = "h5"
class H6(BaseHTML): # noqa: E742 class H6(BaseHTML): # noqa: E742
"""Display the h1 element.""" """Display the h1 element."""
tag = "h6" tag: str = "h6"
class Main(BaseHTML): # noqa: E742 class Main(BaseHTML): # noqa: E742
"""Display the main element.""" """Display the main element."""
tag = "main" tag: str = "main"
class Nav(BaseHTML): # noqa: E742 class Nav(BaseHTML): # noqa: E742
"""Display the nav element.""" """Display the nav element."""
tag = "nav" tag: str = "nav"
class Section(BaseHTML): # noqa: E742 class Section(BaseHTML): # noqa: E742
"""Display the section element.""" """Display the section element."""
tag = "section" tag: str = "section"

View File

@ -9,7 +9,7 @@ from .base import BaseHTML
class Caption(BaseHTML): class Caption(BaseHTML):
"""Display the caption element.""" """Display the caption element."""
tag = "caption" tag: str = "caption"
# Alignment of the caption # Alignment of the caption
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -18,7 +18,7 @@ class Caption(BaseHTML):
class Col(BaseHTML): class Col(BaseHTML):
"""Display the col element.""" """Display the col element."""
tag = "col" tag: str = "col"
# Alignment of the content within the column # Alignment of the content within the column
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -30,7 +30,7 @@ class Col(BaseHTML):
class Colgroup(BaseHTML): class Colgroup(BaseHTML):
"""Display the colgroup element.""" """Display the colgroup element."""
tag = "colgroup" tag: str = "colgroup"
# Alignment of the content within the column group # Alignment of the content within the column group
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -42,7 +42,7 @@ class Colgroup(BaseHTML):
class Table(BaseHTML): class Table(BaseHTML):
"""Display the table element.""" """Display the table element."""
tag = "table" tag: str = "table"
# Alignment of the table # Alignment of the table
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -54,7 +54,7 @@ class Table(BaseHTML):
class Tbody(BaseHTML): class Tbody(BaseHTML):
"""Display the tbody element.""" """Display the tbody element."""
tag = "tbody" tag: str = "tbody"
# Alignment of the content within the table body # Alignment of the content within the table body
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -63,7 +63,7 @@ class Tbody(BaseHTML):
class Td(BaseHTML): class Td(BaseHTML):
"""Display the td element.""" """Display the td element."""
tag = "td" tag: str = "td"
# Alignment of the content within the table cell # Alignment of the content within the table cell
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -81,7 +81,7 @@ class Td(BaseHTML):
class Tfoot(BaseHTML): class Tfoot(BaseHTML):
"""Display the tfoot element.""" """Display the tfoot element."""
tag = "tfoot" tag: str = "tfoot"
# Alignment of the content within the table footer # Alignment of the content within the table footer
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -90,7 +90,7 @@ class Tfoot(BaseHTML):
class Th(BaseHTML): class Th(BaseHTML):
"""Display the th element.""" """Display the th element."""
tag = "th" tag: str = "th"
# Alignment of the content within the table header cell # Alignment of the content within the table header cell
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -111,7 +111,7 @@ class Th(BaseHTML):
class Thead(BaseHTML): class Thead(BaseHTML):
"""Display the thead element.""" """Display the thead element."""
tag = "thead" tag: str = "thead"
# Alignment of the content within the table header # Alignment of the content within the table header
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -120,7 +120,7 @@ class Thead(BaseHTML):
class Tr(BaseHTML): class Tr(BaseHTML):
"""Display the tr element.""" """Display the tr element."""
tag = "tr" tag: str = "tr"
# Alignment of the content within the table row # Alignment of the content within the table row
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None

View File

@ -9,7 +9,7 @@ from .base import BaseHTML
class Blockquote(BaseHTML): class Blockquote(BaseHTML):
"""Display the blockquote element.""" """Display the blockquote element."""
tag = "blockquote" tag: str = "blockquote"
# Define the title of a work. # Define the title of a work.
cite: Optional[Var[Union[str, int, bool]]] = None cite: Optional[Var[Union[str, int, bool]]] = None
@ -18,37 +18,37 @@ class Blockquote(BaseHTML):
class Dd(BaseHTML): class Dd(BaseHTML):
"""Display the dd element.""" """Display the dd element."""
tag = "dd" tag: str = "dd"
class Div(BaseHTML): class Div(BaseHTML):
"""Display the div element.""" """Display the div element."""
tag = "div" tag: str = "div"
class Dl(BaseHTML): class Dl(BaseHTML):
"""Display the dl element.""" """Display the dl element."""
tag = "dl" tag: str = "dl"
class Dt(BaseHTML): class Dt(BaseHTML):
"""Display the dt element.""" """Display the dt element."""
tag = "dt" tag: str = "dt"
class Figcaption(BaseHTML): class Figcaption(BaseHTML):
"""Display the figcaption element.""" """Display the figcaption element."""
tag = "figcaption" tag: str = "figcaption"
class Hr(BaseHTML): class Hr(BaseHTML):
"""Display the hr element.""" """Display the hr element."""
tag = "hr" tag: str = "hr"
# Used to specify the alignment of text content of The Element. this attribute is used in all elements. # Used to specify the alignment of text content of The Element. this attribute is used in all elements.
align: Optional[Var[Union[str, int, bool]]] = None align: Optional[Var[Union[str, int, bool]]] = None
@ -57,13 +57,13 @@ class Hr(BaseHTML):
class Li(BaseHTML): class Li(BaseHTML):
"""Display the li element.""" """Display the li element."""
tag = "li" tag: str = "li"
class Menu(BaseHTML): class Menu(BaseHTML):
"""Display the menu element.""" """Display the menu element."""
tag = "menu" tag: str = "menu"
# Specifies that the menu element is a context menu. # Specifies that the menu element is a context menu.
type: Optional[Var[Union[str, int, bool]]] = None type: Optional[Var[Union[str, int, bool]]] = None
@ -72,7 +72,7 @@ class Menu(BaseHTML):
class Ol(BaseHTML): class Ol(BaseHTML):
"""Display the ol element.""" """Display the ol element."""
tag = "ol" tag: str = "ol"
# Reverses the order of the list. # Reverses the order of the list.
reversed: Optional[Var[Union[str, int, bool]]] = None reversed: Optional[Var[Union[str, int, bool]]] = None
@ -87,25 +87,25 @@ class Ol(BaseHTML):
class P(BaseHTML): class P(BaseHTML):
"""Display the p element.""" """Display the p element."""
tag = "p" tag: str = "p"
class Pre(BaseHTML): class Pre(BaseHTML):
"""Display the pre element.""" """Display the pre element."""
tag = "pre" tag: str = "pre"
class Ul(BaseHTML): class Ul(BaseHTML):
"""Display the ul element.""" """Display the ul element."""
tag = "ul" tag: str = "ul"
class Ins(BaseHTML): class Ins(BaseHTML):
"""Display the ins element.""" """Display the ins element."""
tag = "ins" tag: str = "ins"
# Specifies the URL of the document that explains the reason why the text was inserted/changed. # Specifies the URL of the document that explains the reason why the text was inserted/changed.
cite: Optional[Var[Union[str, int, bool]]] = None cite: Optional[Var[Union[str, int, bool]]] = None
@ -117,7 +117,7 @@ class Ins(BaseHTML):
class Del(BaseHTML): class Del(BaseHTML):
"""Display the del element.""" """Display the del element."""
tag = "del" tag: str = "del"
# Specifies the URL of the document that explains the reason why the text was deleted. # Specifies the URL of the document that explains the reason why the text was deleted.
cite: Optional[Var[Union[str, int, bool]]] = None cite: Optional[Var[Union[str, int, bool]]] = None

View File

@ -21,7 +21,7 @@ class Gridjs(Component):
class DataTable(Gridjs): class DataTable(Gridjs):
"""A data table component.""" """A data table component."""
tag = "Grid" tag: str = "Grid"
alias = "DataTableGrid" alias = "DataTableGrid"

View File

@ -17,7 +17,7 @@ class LucideIconComponent(Component):
class Icon(LucideIconComponent): class Icon(LucideIconComponent):
"""An Icon component.""" """An Icon component."""
tag = "None" tag: str = "None"
# The size of the icon in pixels. # The size of the icon in pixels.
size: Optional[Var[int]] = None size: Optional[Var[int]] = None

View File

@ -77,7 +77,7 @@ class Markdown(Component):
library = "react-markdown@8.0.7" library = "react-markdown@8.0.7"
tag = "ReactMarkdown" tag: str = "ReactMarkdown"
is_default = True is_default = True

View File

@ -10,7 +10,7 @@ from .base import NextComponent
class Image(NextComponent): class Image(NextComponent):
"""Display an image.""" """Display an image."""
tag = "Image" tag: str = "Image"
library = "next/image" library = "next/image"
is_default = True is_default = True

View File

@ -11,7 +11,7 @@ class NextLink(Component):
library = "next/link" library = "next/link"
tag = "NextLink" tag: str = "NextLink"
is_default = True is_default = True

View File

@ -10,7 +10,7 @@ from .base import NextComponent
class Video(NextComponent): class Video(NextComponent):
"""A video component from NextJS.""" """A video component from NextJS."""
tag = "Video" tag: str = "Video"
library = "next-video" library = "next-video"
is_default = True is_default = True
# the URL # the URL

View File

@ -21,7 +21,7 @@ class PlotlyLib(NoSSRComponent):
class Plotly(PlotlyLib): class Plotly(PlotlyLib):
"""Display a plotly graph.""" """Display a plotly graph."""
tag = "Plot" tag: str = "Plot"
is_default = True is_default = True

View File

@ -305,7 +305,7 @@ class AccordionComponent(RadixPrimitiveComponent):
class AccordionRoot(AccordionComponent): class AccordionRoot(AccordionComponent):
"""An accordion component.""" """An accordion component."""
tag = "Root" tag: str = "Root"
alias = "RadixAccordionRoot" alias = "RadixAccordionRoot"
@ -469,7 +469,7 @@ to {
class AccordionItem(AccordionComponent): class AccordionItem(AccordionComponent):
"""An accordion component.""" """An accordion component."""
tag = "Item" tag: str = "Item"
alias = "RadixAccordionItem" alias = "RadixAccordionItem"
@ -538,7 +538,7 @@ class AccordionItem(AccordionComponent):
class AccordionHeader(AccordionComponent): class AccordionHeader(AccordionComponent):
"""An accordion component.""" """An accordion component."""
tag = "Header" tag: str = "Header"
alias = "RadixAccordionHeader" alias = "RadixAccordionHeader"
@ -567,7 +567,7 @@ class AccordionHeader(AccordionComponent):
class AccordionTrigger(AccordionComponent): class AccordionTrigger(AccordionComponent):
"""An accordion component.""" """An accordion component."""
tag = "Trigger" tag: str = "Trigger"
alias = "RadixAccordionTrigger" alias = "RadixAccordionTrigger"
@ -618,7 +618,7 @@ class AccordionIcon(Icon):
class AccordionContent(AccordionComponent): class AccordionContent(AccordionComponent):
"""An accordion component.""" """An accordion component."""
tag = "Content" tag: str = "Content"
alias = "RadixAccordionContent" alias = "RadixAccordionContent"

View File

@ -27,7 +27,7 @@ LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class DrawerRoot(DrawerComponent): class DrawerRoot(DrawerComponent):
"""The Root component of a Drawer, contains all parts of a drawer.""" """The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root" tag: str = "Drawer.Root"
alias = "Vaul" + tag alias = "Vaul" + tag
@ -73,7 +73,7 @@ class DrawerRoot(DrawerComponent):
class DrawerTrigger(DrawerComponent): class DrawerTrigger(DrawerComponent):
"""The button that opens the dialog.""" """The button that opens the dialog."""
tag = "Drawer.Trigger" tag: str = "Drawer.Trigger"
alias = "Vaul" + tag alias = "Vaul" + tag
@ -84,7 +84,7 @@ class DrawerTrigger(DrawerComponent):
class DrawerPortal(DrawerComponent): class DrawerPortal(DrawerComponent):
"""Portals your drawer into the body.""" """Portals your drawer into the body."""
tag = "Drawer.Portal" tag: str = "Drawer.Portal"
alias = "Vaul" + tag alias = "Vaul" + tag
@ -93,7 +93,7 @@ class DrawerPortal(DrawerComponent):
class DrawerContent(DrawerComponent): class DrawerContent(DrawerComponent):
"""Content that should be rendered in the drawer.""" """Content that should be rendered in the drawer."""
tag = "Drawer.Content" tag: str = "Drawer.Content"
alias = "Vaul" + tag alias = "Vaul" + tag
@ -157,7 +157,7 @@ class DrawerContent(DrawerComponent):
class DrawerOverlay(DrawerComponent): class DrawerOverlay(DrawerComponent):
"""A layer that covers the inert portion of the view when the dialog is open.""" """A layer that covers the inert portion of the view when the dialog is open."""
tag = "Drawer.Overlay" tag: str = "Drawer.Overlay"
alias = "Vaul" + tag alias = "Vaul" + tag
@ -185,7 +185,7 @@ class DrawerOverlay(DrawerComponent):
class DrawerClose(DrawerComponent): class DrawerClose(DrawerComponent):
"""A button that closes the drawer.""" """A button that closes the drawer."""
tag = "Drawer.Close" tag: str = "Drawer.Close"
alias = "Vaul" + tag alias = "Vaul" + tag
@ -193,7 +193,7 @@ class DrawerClose(DrawerComponent):
class DrawerTitle(DrawerComponent): class DrawerTitle(DrawerComponent):
"""A title for the drawer.""" """A title for the drawer."""
tag = "Drawer.Title" tag: str = "Drawer.Title"
alias = "Vaul" + tag alias = "Vaul" + tag
@ -218,7 +218,7 @@ class DrawerTitle(DrawerComponent):
class DrawerDescription(DrawerComponent): class DrawerDescription(DrawerComponent):
"""A description for the drawer.""" """A description for the drawer."""
tag = "Drawer.Description" tag: str = "Drawer.Description"
alias = "Vaul" + tag alias = "Vaul" + tag

View File

@ -45,7 +45,7 @@ class FormComponent(RadixPrimitiveComponentWithClassName):
class FormRoot(FormComponent): class FormRoot(FormComponent):
"""The root component of a radix form.""" """The root component of a radix form."""
tag = "Root" tag: str = "Root"
alias = "RadixFormRoot" alias = "RadixFormRoot"
@ -167,7 +167,7 @@ class FormRoot(FormComponent):
class FormField(FormComponent): class FormField(FormComponent):
"""A form field component.""" """A form field component."""
tag = "Field" tag: str = "Field"
alias = "RadixFormField" alias = "RadixFormField"
@ -188,7 +188,7 @@ class FormField(FormComponent):
class FormLabel(FormComponent): class FormLabel(FormComponent):
"""A form label component.""" """A form label component."""
tag = "Label" tag: str = "Label"
alias = "RadixFormLabel" alias = "RadixFormLabel"
@ -204,7 +204,7 @@ class FormLabel(FormComponent):
class FormControl(FormComponent): class FormControl(FormComponent):
"""A form control component.""" """A form control component."""
tag = "Control" tag: str = "Control"
alias = "RadixFormControl" alias = "RadixFormControl"
@ -252,7 +252,7 @@ LiteralMatcher = Literal[
class FormMessage(FormComponent): class FormMessage(FormComponent):
"""A form message component.""" """A form message component."""
tag = "Message" tag: str = "Message"
alias = "RadixFormMessage" alias = "RadixFormMessage"
@ -277,14 +277,14 @@ class FormMessage(FormComponent):
class FormValidityState(FormComponent): class FormValidityState(FormComponent):
"""A form validity state component.""" """A form validity state component."""
tag = "ValidityState" tag: str = "ValidityState"
alias = "RadixFormValidityState" alias = "RadixFormValidityState"
class FormSubmit(FormComponent): class FormSubmit(FormComponent):
"""A form submit component.""" """A form submit component."""
tag = "Submit" tag: str = "Submit"
alias = "RadixFormSubmit" alias = "RadixFormSubmit"

View File

@ -21,7 +21,7 @@ class ProgressComponent(RadixPrimitiveComponentWithClassName):
class ProgressRoot(ProgressComponent): class ProgressRoot(ProgressComponent):
"""The Progress Root component.""" """The Progress Root component."""
tag = "Root" tag: str = "Root"
alias = "RadixProgressRoot" alias = "RadixProgressRoot"
# Override theme radius for progress bar: "none" | "small" | "medium" | "large" | "full" # Override theme radius for progress bar: "none" | "small" | "medium" | "large" | "full"
@ -51,7 +51,7 @@ class ProgressRoot(ProgressComponent):
class ProgressIndicator(ProgressComponent): class ProgressIndicator(ProgressComponent):
"""The Progress bar indicator.""" """The Progress bar indicator."""
tag = "Indicator" tag: str = "Indicator"
alias = "RadixProgressIndicator" alias = "RadixProgressIndicator"

View File

@ -21,7 +21,7 @@ class SliderComponent(RadixPrimitiveComponentWithClassName):
class SliderRoot(SliderComponent): class SliderRoot(SliderComponent):
"""The Slider component comtaining all slider parts.""" """The Slider component comtaining all slider parts."""
tag = "Root" tag: str = "Root"
alias = "RadixSliderRoot" alias = "RadixSliderRoot"
default_value: Optional[Var[List[int]]] = None default_value: Optional[Var[List[int]]] = None
@ -81,7 +81,7 @@ class SliderRoot(SliderComponent):
class SliderTrack(SliderComponent): class SliderTrack(SliderComponent):
"""A Slider Track component.""" """A Slider Track component."""
tag = "Track" tag: str = "Track"
alias = "RadixSliderTrack" alias = "RadixSliderTrack"
def _apply_theme(self, theme: Component): def _apply_theme(self, theme: Component):
@ -103,7 +103,7 @@ class SliderTrack(SliderComponent):
class SliderRange(SliderComponent): class SliderRange(SliderComponent):
"""A SliderRange component.""" """A SliderRange component."""
tag = "Range" tag: str = "Range"
alias = "RadixSliderRange" alias = "RadixSliderRange"
def _apply_theme(self, theme: Component): def _apply_theme(self, theme: Component):
@ -123,7 +123,7 @@ class SliderRange(SliderComponent):
class SliderThumb(SliderComponent): class SliderThumb(SliderComponent):
"""A SliderThumb component.""" """A SliderThumb component."""
tag = "Thumb" tag: str = "Thumb"
alias = "RadixSliderThumb" alias = "RadixSliderThumb"
def _apply_theme(self, theme: Component): def _apply_theme(self, theme: Component):

View File

@ -125,7 +125,7 @@ class Theme(RadixThemesComponent):
child elements as an override of the main theme. child elements as an override of the main theme.
""" """
tag = "Theme" tag: str = "Theme"
# Whether to apply the themes background color to the theme node. Defaults to True. # Whether to apply the themes background color to the theme node. Defaults to True.
has_background: Optional[Var[bool]] = None has_background: Optional[Var[bool]] = None
@ -207,7 +207,7 @@ class ThemePanel(RadixThemesComponent):
Include as a child component of Theme to use in your app. Include as a child component of Theme to use in your app.
""" """
tag = "ThemePanel" tag: str = "ThemePanel"
# Whether the panel is open. Defaults to False. # Whether the panel is open. Defaults to False.
default_open: Optional[Var[bool]] = None default_open: Optional[Var[bool]] = None
@ -217,7 +217,7 @@ class RadixThemesColorModeProvider(Component):
"""Next-themes integration for radix themes components.""" """Next-themes integration for radix themes components."""
library = "/components/reflex/radix_themes_color_mode_provider.js" library = "/components/reflex/radix_themes_color_mode_provider.js"
tag = "RadixThemesColorModeProvider" tag: str = "RadixThemesColorModeProvider"
is_default = True is_default = True

View File

@ -14,7 +14,7 @@ LiteralContentSize = Literal["1", "2", "3", "4"]
class AlertDialogRoot(RadixThemesComponent): class AlertDialogRoot(RadixThemesComponent):
"""Contains all the parts of the dialog.""" """Contains all the parts of the dialog."""
tag = "AlertDialog.Root" tag: str = "AlertDialog.Root"
# The controlled open state of the dialog. # The controlled open state of the dialog.
open: Optional[Var[bool]] = None open: Optional[Var[bool]] = None
@ -34,13 +34,13 @@ class AlertDialogRoot(RadixThemesComponent):
class AlertDialogTrigger(RadixThemesComponent): class AlertDialogTrigger(RadixThemesComponent):
"""Wraps the control that will open the dialog.""" """Wraps the control that will open the dialog."""
tag = "AlertDialog.Trigger" tag: str = "AlertDialog.Trigger"
class AlertDialogContent(el.Div, RadixThemesComponent): class AlertDialogContent(el.Div, RadixThemesComponent):
"""Contains the content of the dialog. This component is based on the div element.""" """Contains the content of the dialog. This component is based on the div element."""
tag = "AlertDialog.Content" tag: str = "AlertDialog.Content"
# The size of the content. # The size of the content.
size: Optional[Var[LiteralContentSize]] = None size: Optional[Var[LiteralContentSize]] = None
@ -68,7 +68,7 @@ class AlertDialogTitle(RadixThemesComponent):
leading trim on top. leading trim on top.
""" """
tag = "AlertDialog.Title" tag: str = "AlertDialog.Title"
class AlertDialogDescription(RadixThemesComponent): class AlertDialogDescription(RadixThemesComponent):
@ -76,7 +76,7 @@ class AlertDialogDescription(RadixThemesComponent):
This part is based on the Text component with a pre-defined font size. This part is based on the Text component with a pre-defined font size.
""" """
tag = "AlertDialog.Description" tag: str = "AlertDialog.Description"
class AlertDialogAction(RadixThemesComponent): class AlertDialogAction(RadixThemesComponent):
@ -84,7 +84,7 @@ class AlertDialogAction(RadixThemesComponent):
visually from the Cancel control. visually from the Cancel control.
""" """
tag = "AlertDialog.Action" tag: str = "AlertDialog.Action"
class AlertDialogCancel(RadixThemesComponent): class AlertDialogCancel(RadixThemesComponent):
@ -92,7 +92,7 @@ class AlertDialogCancel(RadixThemesComponent):
visually from the Action control. visually from the Action control.
""" """
tag = "AlertDialog.Cancel" tag: str = "AlertDialog.Cancel"
class AlertDialog(ComponentNamespace): class AlertDialog(ComponentNamespace):

View File

@ -9,7 +9,7 @@ from ..base import RadixThemesComponent
class AspectRatio(RadixThemesComponent): class AspectRatio(RadixThemesComponent):
"""Displays content with a desired ratio.""" """Displays content with a desired ratio."""
tag = "AspectRatio" tag: str = "AspectRatio"
# The ratio of the width to the height of the element # The ratio of the width to the height of the element
ratio: Optional[Var[Union[float, int]]] = None ratio: Optional[Var[Union[float, int]]] = None

View File

@ -15,7 +15,7 @@ LiteralSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
class Avatar(RadixThemesComponent): class Avatar(RadixThemesComponent):
"""An image element with a fallback for representing the user.""" """An image element with a fallback for representing the user."""
tag = "Avatar" tag: str = "Avatar"
# The variant of the avatar # The variant of the avatar
variant: Optional[Var[Literal["solid", "soft"]]] = None variant: Optional[Var[Literal["solid", "soft"]]] = None

View File

@ -14,7 +14,7 @@ from ..base import (
class Badge(el.Span, RadixThemesComponent): class Badge(el.Span, RadixThemesComponent):
"""A stylized badge element.""" """A stylized badge element."""
tag = "Badge" tag: str = "Badge"
# The variant of the badge # The variant of the badge
variant: Optional[Var[Literal["solid", "soft", "surface", "outline"]]] = None variant: Optional[Var[Literal["solid", "soft", "surface", "outline"]]] = None

Some files were not shown because too many files have changed in this diff Show More