Docstrings for radix components (#2407)
This commit is contained in:
parent
82aca76cd3
commit
1a50a63b98
@ -13,7 +13,7 @@ from ..base import (
|
||||
|
||||
|
||||
class Avatar(CommonMarginProps, RadixThemesComponent):
|
||||
"""A toggle switch alternative to the checkbox."""
|
||||
"""An image element with a fallback for representing the user."""
|
||||
|
||||
tag = "Avatar"
|
||||
|
||||
|
@ -13,7 +13,7 @@ from ..base import (
|
||||
|
||||
|
||||
class Badge(el.Span, CommonMarginProps, RadixThemesComponent):
|
||||
"""A toggle switch alternative to the checkbox."""
|
||||
"""A stylized badge element."""
|
||||
|
||||
tag = "Badge"
|
||||
|
||||
|
@ -30,7 +30,7 @@ class Button(el.Button, CommonMarginProps, RadixThemesComponent):
|
||||
variant: Var[LiteralVariant]
|
||||
|
||||
# Override theme color for button
|
||||
color: Var[LiteralAccentColor]
|
||||
color_scheme: Var[LiteralAccentColor]
|
||||
|
||||
# Whether to render the button with higher contrast color against background
|
||||
high_contrast: Var[bool]
|
||||
|
@ -18,7 +18,7 @@ LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"]
|
||||
|
||||
|
||||
class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""A set of interactive radio buttons where only one can be selected at a time."""
|
||||
|
||||
tag = "RadioGroup.Root"
|
||||
|
||||
@ -29,12 +29,12 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
||||
variant: Var[Literal["classic", "surface", "soft"]]
|
||||
|
||||
# The color of the radio group
|
||||
color: Var[LiteralAccentColor]
|
||||
color_scheme: Var[LiteralAccentColor]
|
||||
|
||||
# Whether to render the radio group with higher contrast color against background
|
||||
high_contrast: Var[bool]
|
||||
|
||||
# The controlled value of the radio item to check. Should be used in conjunction with onValueChange.
|
||||
# The controlled value of the radio item to check. Should be used in conjunction with on_value_change.
|
||||
value: Var[str]
|
||||
|
||||
# The initial value of checked radio item. Should be used in conjunction with onValueChange.
|
||||
@ -68,11 +68,11 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
||||
|
||||
|
||||
class RadioGroupItem(CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""An item in the group that can be checked."""
|
||||
|
||||
tag = "RadioGroup.Item"
|
||||
|
||||
# The value of the radio item to check. Should be used in conjunction with onCheckedChange.
|
||||
# The value of the radio item to check. Should be used in conjunction with on_value_change.
|
||||
value: Var[str]
|
||||
|
||||
# When true, prevents the user from interacting with the radio item.
|
||||
|
@ -224,7 +224,7 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
||||
size: The size of the radio group: "1" | "2" | "3"
|
||||
variant: The variant of the radio group
|
||||
high_contrast: Whether to render the radio group with higher contrast color against background
|
||||
value: The controlled value of the radio item to check. Should be used in conjunction with onValueChange.
|
||||
value: The controlled value of the radio item to check. Should be used in conjunction with on_value_change.
|
||||
default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange.
|
||||
disabled: Whether the radio group is disabled
|
||||
name: The name of the group. Submitted with its owning form as part of a name/value pair.
|
||||
@ -427,7 +427,7 @@ class RadioGroupItem(CommonMarginProps, RadixThemesComponent):
|
||||
*children: Child components.
|
||||
color: map to CSS default color property.
|
||||
color_scheme: map to radix color property.
|
||||
value: The value of the radio item to check. Should be used in conjunction with onCheckedChange.
|
||||
value: The value of the radio item to check. Should be used in conjunction with on_value_change.
|
||||
disabled: When true, prevents the user from interacting with the radio item.
|
||||
required: When true, indicates that the user must check the radio item before the owning form can be submitted.
|
||||
m: Margin: "0" - "9"
|
||||
@ -478,7 +478,7 @@ class HighLevelRadioGroup(RadioGroupRoot):
|
||||
Literal["classic", "surface", "soft"],
|
||||
]
|
||||
] = None,
|
||||
color: Optional[
|
||||
color_scheme: Optional[
|
||||
Union[
|
||||
Var[
|
||||
Literal[
|
||||
@ -660,9 +660,9 @@ class HighLevelRadioGroup(RadioGroupRoot):
|
||||
gap: The gap between the items of the radio group.
|
||||
size: The size of the radio group: "1" | "2" | "3"
|
||||
variant: The variant of the radio group
|
||||
color: The color of the radio group
|
||||
color_scheme: The color of the radio group
|
||||
high_contrast: Whether to render the radio group with higher contrast color against background
|
||||
value: The controlled value of the radio item to check. Should be used in conjunction with onValueChange.
|
||||
value: The controlled value of the radio item to check. Should be used in conjunction with on_value_change.
|
||||
default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange.
|
||||
disabled: Whether the radio group is disabled
|
||||
name: The name of the group. Submitted with its owning form as part of a name/value pair.
|
||||
|
@ -11,7 +11,7 @@ from ..base import (
|
||||
|
||||
|
||||
class ScrollArea(CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Custom styled, cross-browser scrollable area using native functionality."""
|
||||
|
||||
tag = "ScrollArea"
|
||||
|
||||
|
@ -16,7 +16,7 @@ LiteralButtonSize = Literal[1, 2, 3, 4]
|
||||
|
||||
|
||||
class SelectRoot(CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Displays a list of options for the user to pick from, triggered by a button."""
|
||||
|
||||
tag = "Select.Root"
|
||||
|
||||
@ -58,7 +58,7 @@ class SelectRoot(CommonMarginProps, RadixThemesComponent):
|
||||
|
||||
|
||||
class SelectTrigger(CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""The button that toggles the select."""
|
||||
|
||||
tag = "Select.Trigger"
|
||||
|
||||
@ -76,7 +76,7 @@ class SelectTrigger(CommonMarginProps, RadixThemesComponent):
|
||||
|
||||
|
||||
class SelectContent(CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""The component that pops out when the select is open."""
|
||||
|
||||
tag = "Select.Content"
|
||||
|
||||
@ -119,13 +119,13 @@ class SelectContent(CommonMarginProps, RadixThemesComponent):
|
||||
|
||||
|
||||
class SelectGroup(CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Used to group multiple items."""
|
||||
|
||||
tag = "Select.Group"
|
||||
|
||||
|
||||
class SelectItem(CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""The component that contains the select items."""
|
||||
|
||||
tag = "Select.Item"
|
||||
|
||||
@ -137,13 +137,13 @@ class SelectItem(CommonMarginProps, RadixThemesComponent):
|
||||
|
||||
|
||||
class SelectLabel(CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Used to render the label of a group, it isn't focusable using arrow keys."""
|
||||
|
||||
tag = "Select.Label"
|
||||
|
||||
|
||||
class SelectSeparator(CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Used to visually separate items in the Select."""
|
||||
|
||||
tag = "Select.Separator"
|
||||
|
||||
|
@ -11,7 +11,7 @@ from ..base import (
|
||||
|
||||
|
||||
class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""A semantic table for presenting tabular data."""
|
||||
|
||||
tag = "Table.Root"
|
||||
|
||||
@ -23,13 +23,13 @@ class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent):
|
||||
|
||||
|
||||
class TableHeader(el.Thead, CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""The header of the table defines column names and other non-data elements."""
|
||||
|
||||
tag = "Table.Header"
|
||||
|
||||
|
||||
class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""A row containing table cells."""
|
||||
|
||||
tag = "Table.Row"
|
||||
|
||||
@ -38,7 +38,7 @@ class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent):
|
||||
|
||||
|
||||
class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""A table cell that is semantically treated as a column header."""
|
||||
|
||||
tag = "Table.ColumnHeaderCell"
|
||||
|
||||
@ -50,13 +50,13 @@ class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent):
|
||||
|
||||
|
||||
class TableBody(el.Tbody, CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""The body of the table contains the data rows."""
|
||||
|
||||
tag = "Table.Body"
|
||||
|
||||
|
||||
class TableCell(el.Td, CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""A cell containing data."""
|
||||
|
||||
tag = "Table.Cell"
|
||||
|
||||
@ -68,7 +68,7 @@ class TableCell(el.Td, CommonMarginProps, RadixThemesComponent):
|
||||
|
||||
|
||||
class TableRowHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""A table cell that is semantically treated as a row header."""
|
||||
|
||||
tag = "Table.RowHeaderCell"
|
||||
|
||||
|
@ -34,4 +34,4 @@ if [ -f /proc/$pid/winpid ]; then
|
||||
echo "Windows detected, passing winpid $pid to port waiter"
|
||||
fi
|
||||
|
||||
python scripts/wait_for_listening_port.py $check_ports --timeout=600 --server-pid "$pid"
|
||||
python scripts/wait_for_listening_port.py $check_ports --timeout=900 --server-pid "$pid"
|
||||
|
Loading…
Reference in New Issue
Block a user