update radix components (#2380)
* update radix components * update for pyi * updates for pre commit * update pyi again --------- Co-authored-by: Tom Gotsman <tomgotsman@toms-mbp.lan>
This commit is contained in:
parent
16f9f743bb
commit
c81fa261b2
@ -4,10 +4,7 @@ from typing import Any, Dict, Literal
|
|||||||
from reflex import el
|
from reflex import el
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
|
|
||||||
from ..base import (
|
from ..base import CommonMarginProps, LiteralSize, RadixThemesComponent
|
||||||
CommonMarginProps,
|
|
||||||
RadixThemesComponent,
|
|
||||||
)
|
|
||||||
|
|
||||||
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
||||||
|
|
||||||
@ -43,6 +40,9 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent):
|
|||||||
|
|
||||||
tag = "AlertDialog.Content"
|
tag = "AlertDialog.Content"
|
||||||
|
|
||||||
|
# The size of the content.
|
||||||
|
size: Var[LiteralSize]
|
||||||
|
|
||||||
# Whether to force mount the content on open.
|
# Whether to force mount the content on open.
|
||||||
force_mount: Var[bool]
|
force_mount: Var[bool]
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ from reflex.style import Style
|
|||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
from reflex import el
|
from reflex import el
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
from ..base import CommonMarginProps, RadixThemesComponent
|
from ..base import CommonMarginProps, LiteralSize, RadixThemesComponent
|
||||||
|
|
||||||
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
||||||
|
|
||||||
@ -476,6 +476,12 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent):
|
|||||||
],
|
],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
|
size: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
|
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
force_mount: Optional[Union[Var[bool], bool]] = None,
|
force_mount: Optional[Union[Var[bool], bool]] = None,
|
||||||
access_key: Optional[
|
access_key: Optional[
|
||||||
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||||
@ -633,6 +639,7 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent):
|
|||||||
*children: Child components.
|
*children: Child components.
|
||||||
color: map to CSS default color property.
|
color: map to CSS default color property.
|
||||||
color_scheme: map to radix color property.
|
color_scheme: map to radix color property.
|
||||||
|
size: The size of the content.
|
||||||
force_mount: Whether to force mount the content on open.
|
force_mount: Whether to force mount the content on open.
|
||||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||||
|
@ -36,6 +36,9 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
|||||||
# Whether the radio group is disabled
|
# Whether the radio group is disabled
|
||||||
disabled: Var[bool]
|
disabled: Var[bool]
|
||||||
|
|
||||||
|
# The name of the group. Submitted with its owning form as part of a name/value pair.
|
||||||
|
name: Var[str]
|
||||||
|
|
||||||
# Whether the radio group is required
|
# Whether the radio group is required
|
||||||
required: Var[bool]
|
required: Var[bool]
|
||||||
|
|
||||||
|
@ -94,6 +94,7 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
|||||||
value: Optional[Union[Var[str], str]] = None,
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
default_value: Optional[Union[Var[str], str]] = None,
|
default_value: Optional[Union[Var[str], str]] = None,
|
||||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
name: Optional[Union[Var[str], str]] = None,
|
||||||
required: Optional[Union[Var[bool], bool]] = None,
|
required: Optional[Union[Var[bool], bool]] = None,
|
||||||
orientation: Optional[
|
orientation: Optional[
|
||||||
Union[
|
Union[
|
||||||
@ -215,6 +216,7 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
|||||||
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 onValueChange.
|
||||||
default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange.
|
default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange.
|
||||||
disabled: Whether the radio group is disabled
|
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.
|
||||||
required: Whether the radio group is required
|
required: Whether the radio group is required
|
||||||
orientation: The orientation of the component.
|
orientation: The orientation of the component.
|
||||||
loop: When true, keyboard navigation will loop from last item to first, and vice versa.
|
loop: When true, keyboard navigation will loop from last item to first, and vice versa.
|
||||||
|
@ -24,18 +24,24 @@ class SelectRoot(CommonMarginProps, RadixThemesComponent):
|
|||||||
# The value of the select when initially rendered. Use when you do not need to control the state of the select.
|
# The value of the select when initially rendered. Use when you do not need to control the state of the select.
|
||||||
default_value: Var[str]
|
default_value: Var[str]
|
||||||
|
|
||||||
# The controlled value of the select. Use when you need to control the state of the select.
|
# The controlled value of the select. Should be used in conjunction with on_value_change.
|
||||||
value: Var[str]
|
value: Var[str]
|
||||||
|
|
||||||
# The open state of the select when it is initially rendered. Use when you do not need to control its open state.
|
# The open state of the select when it is initially rendered. Use when you do not need to control its open state.
|
||||||
default_open: Var[bool]
|
default_open: Var[bool]
|
||||||
|
|
||||||
# The controlled open state of the select. Must be used in conjunction with onOpenChange.
|
# The controlled open state of the select. Must be used in conjunction with on_open_change.
|
||||||
open: Var[bool]
|
open: Var[bool]
|
||||||
|
|
||||||
# The name of the select control when submitting the form.
|
# The name of the select control when submitting the form.
|
||||||
name: Var[str]
|
name: Var[str]
|
||||||
|
|
||||||
|
# When True, prevents the user from interacting with select.
|
||||||
|
disabled: Var[bool]
|
||||||
|
|
||||||
|
# When True, indicates that the user must select a value before the owning form can be submitted.
|
||||||
|
required: Var[bool]
|
||||||
|
|
||||||
def get_event_triggers(self) -> Dict[str, Any]:
|
def get_event_triggers(self) -> Dict[str, Any]:
|
||||||
"""Get the events triggers signatures for the component.
|
"""Get the events triggers signatures for the component.
|
||||||
|
|
||||||
@ -121,9 +127,12 @@ class SelectItem(CommonMarginProps, RadixThemesComponent):
|
|||||||
|
|
||||||
tag = "Select.Item"
|
tag = "Select.Item"
|
||||||
|
|
||||||
# The value of the select item when submitting the form.
|
# The value given as data when submitting a form with a name.
|
||||||
value: Var[str]
|
value: Var[str]
|
||||||
|
|
||||||
|
# Whether the select item is disabled
|
||||||
|
disabled: Var[bool]
|
||||||
|
|
||||||
|
|
||||||
class SelectLabel(CommonMarginProps, RadixThemesComponent):
|
class SelectLabel(CommonMarginProps, RadixThemesComponent):
|
||||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||||
|
@ -94,6 +94,8 @@ class SelectRoot(CommonMarginProps, RadixThemesComponent):
|
|||||||
default_open: Optional[Union[Var[bool], bool]] = None,
|
default_open: Optional[Union[Var[bool], bool]] = None,
|
||||||
open: Optional[Union[Var[bool], bool]] = None,
|
open: Optional[Union[Var[bool], bool]] = None,
|
||||||
name: Optional[Union[Var[str], str]] = None,
|
name: Optional[Union[Var[str], str]] = None,
|
||||||
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
required: Optional[Union[Var[bool], bool]] = None,
|
||||||
m: Optional[
|
m: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
@ -206,10 +208,12 @@ class SelectRoot(CommonMarginProps, RadixThemesComponent):
|
|||||||
color_scheme: map to radix color property.
|
color_scheme: map to radix color property.
|
||||||
size: The size of the select: "1" | "2" | "3"
|
size: The size of the select: "1" | "2" | "3"
|
||||||
default_value: The value of the select when initially rendered. Use when you do not need to control the state of the select.
|
default_value: The value of the select when initially rendered. Use when you do not need to control the state of the select.
|
||||||
value: The controlled value of the select. Use when you need to control the state of the select.
|
value: The controlled value of the select. Should be used in conjunction with on_value_change.
|
||||||
default_open: The open state of the select when it is initially rendered. Use when you do not need to control its open state.
|
default_open: The open state of the select when it is initially rendered. Use when you do not need to control its open state.
|
||||||
open: The controlled open state of the select. Must be used in conjunction with onOpenChange.
|
open: The controlled open state of the select. Must be used in conjunction with on_open_change.
|
||||||
name: The name of the select control when submitting the form.
|
name: The name of the select control when submitting the form.
|
||||||
|
disabled: When True, prevents the user from interacting with select.
|
||||||
|
required: When True, indicates that the user must select a value before the owning form can be submitted.
|
||||||
m: Margin: "0" - "9"
|
m: Margin: "0" - "9"
|
||||||
mx: Margin horizontal: "0" - "9"
|
mx: Margin horizontal: "0" - "9"
|
||||||
my: Margin vertical: "0" - "9"
|
my: Margin vertical: "0" - "9"
|
||||||
@ -936,6 +940,7 @@ class SelectItem(CommonMarginProps, RadixThemesComponent):
|
|||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
value: Optional[Union[Var[str], str]] = None,
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
m: Optional[
|
m: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
@ -1040,7 +1045,8 @@ class SelectItem(CommonMarginProps, RadixThemesComponent):
|
|||||||
*children: Child components.
|
*children: Child components.
|
||||||
color: map to CSS default color property.
|
color: map to CSS default color property.
|
||||||
color_scheme: map to radix color property.
|
color_scheme: map to radix color property.
|
||||||
value: The value of the select item when submitting the form.
|
value: The value given as data when submitting a form with a name.
|
||||||
|
disabled: Whether the select item is disabled
|
||||||
m: Margin: "0" - "9"
|
m: Margin: "0" - "9"
|
||||||
mx: Margin horizontal: "0" - "9"
|
mx: Margin horizontal: "0" - "9"
|
||||||
my: Margin vertical: "0" - "9"
|
my: Margin vertical: "0" - "9"
|
||||||
|
@ -40,14 +40,17 @@ class Slider(CommonMarginProps, RadixThemesComponent):
|
|||||||
# The controlled value of the slider. Must be used in conjunction with onValueChange.
|
# The controlled value of the slider. Must be used in conjunction with onValueChange.
|
||||||
value: Var[float]
|
value: Var[float]
|
||||||
|
|
||||||
|
# The name of the slider. Submitted with its owning form as part of a name/value pair.
|
||||||
|
name: Var[str]
|
||||||
|
|
||||||
# The minimum value of the slider.
|
# The minimum value of the slider.
|
||||||
min: Var[float]
|
min: Var[float, int]
|
||||||
|
|
||||||
# The maximum value of the slider.
|
# The maximum value of the slider.
|
||||||
max: Var[float]
|
max: Var[float, int]
|
||||||
|
|
||||||
# The step value of the slider.
|
# The step value of the slider.
|
||||||
step: Var[float]
|
step: Var[float, int]
|
||||||
|
|
||||||
# Whether the slider is disabled
|
# Whether the slider is disabled
|
||||||
disabled: Var[bool]
|
disabled: Var[bool]
|
||||||
|
@ -105,9 +105,10 @@ class Slider(CommonMarginProps, RadixThemesComponent):
|
|||||||
] = None,
|
] = None,
|
||||||
default_value: Optional[Union[Var[List[float]], List[float]]] = None,
|
default_value: Optional[Union[Var[List[float]], List[float]]] = None,
|
||||||
value: Optional[Union[Var[float], float]] = None,
|
value: Optional[Union[Var[float], float]] = None,
|
||||||
min: Optional[Union[Var[float], float]] = None,
|
name: Optional[Union[Var[str], str]] = None,
|
||||||
max: Optional[Union[Var[float], float]] = None,
|
min: Optional[Union[Var[float, int], float, int]] = None,
|
||||||
step: Optional[Union[Var[float], float]] = None,
|
max: Optional[Union[Var[float, int], float, int]] = None,
|
||||||
|
step: Optional[Union[Var[float, int], float, int]] = None,
|
||||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
orientation: Optional[
|
orientation: Optional[
|
||||||
Union[
|
Union[
|
||||||
@ -232,6 +233,7 @@ class Slider(CommonMarginProps, RadixThemesComponent):
|
|||||||
radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
|
radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
|
||||||
default_value: The value of the slider when initially rendered. Use when you do not need to control the state of the slider.
|
default_value: The value of the slider when initially rendered. Use when you do not need to control the state of the slider.
|
||||||
value: The controlled value of the slider. Must be used in conjunction with onValueChange.
|
value: The controlled value of the slider. Must be used in conjunction with onValueChange.
|
||||||
|
name: The name of the slider. Submitted with its owning form as part of a name/value pair.
|
||||||
min: The minimum value of the slider.
|
min: The minimum value of the slider.
|
||||||
max: The maximum value of the slider.
|
max: The maximum value of the slider.
|
||||||
step: The step value of the slider.
|
step: The step value of the slider.
|
||||||
|
Loading…
Reference in New Issue
Block a user