From 8ac08e2cb422b9bf9954e1f0001b1e414d738b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Tue, 19 Dec 2023 05:47:18 +0100 Subject: [PATCH] color_scheme props added and updated pyi files (#2279) --- reflex/components/radix/themes/base.py | 74 +-- reflex/components/radix/themes/base.pyi | 252 ++++++++-- .../radix/themes/components/alertdialog.pyi | 325 +++++++++++++ .../radix/themes/components/aspectratio.pyi | 65 +++ .../radix/themes/components/avatar.pyi | 26 +- .../radix/themes/components/badge.pyi | 22 +- .../radix/themes/components/button.pyi | 22 +- .../radix/themes/components/callout.pyi | 156 +++++- .../radix/themes/components/card.pyi | 65 +++ .../radix/themes/components/checkbox.pyi | 26 +- .../radix/themes/components/contextmenu.pyi | 410 +++++++++++++++- .../radix/themes/components/dialog.pyi | 325 +++++++++++++ .../radix/themes/components/dropdownmenu.pyi | 345 ++++++++++++- .../radix/themes/components/hovercard.pyi | 195 ++++++++ .../radix/themes/components/iconbutton.pyi | 26 +- .../radix/themes/components/inset.pyi | 65 +++ .../radix/themes/components/popover.pyi | 260 ++++++++++ .../radix/themes/components/radiogroup.pyi | 85 +++- .../radix/themes/components/scrollarea.pyi | 65 +++ .../radix/themes/components/select.pyi | 355 +++++++++++++- .../radix/themes/components/separator.pyi | 12 +- .../radix/themes/components/slider.pyi | 22 +- .../radix/themes/components/switch.pyi | 38 +- .../radix/themes/components/table.pyi | 455 ++++++++++++++++++ .../radix/themes/components/tabs.pyi | 260 ++++++++++ .../radix/themes/components/textfield.pyi | 30 +- .../components/radix/themes/layout/base.pyi | 65 +++ reflex/components/radix/themes/layout/box.pyi | 65 +++ .../radix/themes/layout/container.pyi | 65 +++ .../components/radix/themes/layout/flex.pyi | 65 +++ .../components/radix/themes/layout/grid.pyi | 65 +++ .../radix/themes/layout/section.pyi | 65 +++ .../radix/themes/typography/blockquote.pyi | 30 +- .../radix/themes/typography/code.pyi | 42 +- .../components/radix/themes/typography/em.pyi | 65 +++ .../radix/themes/typography/heading.pyi | 58 +-- .../radix/themes/typography/kbd.pyi | 65 +++ .../radix/themes/typography/link.pyi | 56 +-- .../radix/themes/typography/quote.pyi | 65 +++ .../radix/themes/typography/strong.pyi | 65 +++ .../radix/themes/typography/text.pyi | 58 +-- scripts/pyi_generator.py | 33 +- 42 files changed, 4576 insertions(+), 332 deletions(-) diff --git a/reflex/components/radix/themes/base.py b/reflex/components/radix/themes/base.py index 0ed9f9c88..75ef45a18 100644 --- a/reflex/components/radix/themes/base.py +++ b/reflex/components/radix/themes/base.py @@ -17,6 +17,34 @@ LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "a LiteralPanelBackground = Literal["solid", "transparent"] LiteralRadius = Literal["none", "small", "medium", "large", "full"] LiteralScaling = Literal["90%", "95%", "100%", "105%", "110%"] +LiteralAccentColor = Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", +] class CommonMarginProps(Component): @@ -50,7 +78,13 @@ class RadixThemesComponent(Component): library = "@radix-ui/themes@^2.0.0" @classmethod - def create(cls, *children, **props) -> Component: + def create( + cls, + *children, + color: Var[str] = None, # type: ignore + color_scheme: Var[LiteralAccentColor] = None, # type: ignore + **props, + ) -> Component: """Create a new component instance. Will prepend "RadixThemes" to the component tag to avoid conflicts with @@ -58,11 +92,19 @@ class RadixThemesComponent(Component): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. **props: Component properties. Returns: A new component instance. """ + if color is not None: + style = props.get("style", {}) + style["color"] = color + props["style"] = style + if color_scheme is not None: + props["color"] = color_scheme component = super().create(*children, **props) if component.library is None: component.library = RadixThemesComponent.__fields__["library"].default @@ -78,36 +120,6 @@ class RadixThemesComponent(Component): } -LiteralAccentColor = Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", -] - - class Theme(RadixThemesComponent): """A theme provider for radix components. diff --git a/reflex/components/radix/themes/base.pyi b/reflex/components/radix/themes/base.pyi index deb800ca5..ae2435584 100644 --- a/reflex/components/radix/themes/base.pyi +++ b/reflex/components/radix/themes/base.pyi @@ -21,6 +21,34 @@ LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "a LiteralPanelBackground = Literal["solid", "transparent"] LiteralRadius = Literal["none", "small", "medium", "large", "full"] LiteralScaling = Literal["90%", "95%", "100%", "105%", "110%"] +LiteralAccentColor = Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", +] class CommonMarginProps(Component): @overload @@ -156,6 +184,69 @@ class RadixThemesComponent(Component): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -216,6 +307,8 @@ class RadixThemesComponent(Component): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -229,41 +322,75 @@ class RadixThemesComponent(Component): """ ... -LiteralAccentColor = Literal[ - "tomato", - "red", - "ruby", - "crimson", - "pink", - "plum", - "purple", - "violet", - "iris", - "indigo", - "blue", - "cyan", - "teal", - "jade", - "green", - "grass", - "brown", - "orange", - "sky", - "mint", - "lime", - "yellow", - "amber", - "gold", - "bronze", - "gray", -] - class Theme(RadixThemesComponent): @overload @classmethod def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, has_background: Optional[Union[Var[bool], bool]] = None, appearance: Optional[ Union[ @@ -414,6 +541,8 @@ class Theme(RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. has_background: Whether to apply the themes background color to the theme node. appearance: Override light or dark mode theme: "inherit" | "light" | "dark" accent_color: The color used for default buttons, typography, backgrounds, etc @@ -440,6 +569,69 @@ class ThemePanel(RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, default_open: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -501,6 +693,8 @@ class ThemePanel(RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/alertdialog.pyi b/reflex/components/radix/themes/components/alertdialog.pyi index 7e36f5445..9b60998be 100644 --- a/reflex/components/radix/themes/components/alertdialog.pyi +++ b/reflex/components/radix/themes/components/alertdialog.pyi @@ -21,6 +21,69 @@ class AlertDialog(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, open: Optional[Union[Var[bool], bool]] = None, m: Optional[ Union[ @@ -127,6 +190,8 @@ class AlertDialog(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. open: The controlled open state of the dialog. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" @@ -154,6 +219,69 @@ class AlertDialogTrigger(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -256,6 +384,8 @@ class AlertDialogTrigger(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -283,6 +413,69 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, force_mount: Optional[Union[Var[bool], bool]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -438,6 +631,8 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. force_mount: Whether to force mount the content on open. 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. @@ -482,6 +677,69 @@ class AlertDialogTitle(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -584,6 +842,8 @@ class AlertDialogTitle(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -610,6 +870,69 @@ class AlertDialogDescription(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -712,6 +1035,8 @@ class AlertDialogDescription(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" diff --git a/reflex/components/radix/themes/components/aspectratio.pyi b/reflex/components/radix/themes/components/aspectratio.pyi index 38bd9f9de..64296af32 100644 --- a/reflex/components/radix/themes/components/aspectratio.pyi +++ b/reflex/components/radix/themes/components/aspectratio.pyi @@ -19,6 +19,69 @@ class AspectRatio(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, ration: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None, m: Optional[ Union[ @@ -122,6 +185,8 @@ class AspectRatio(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. ration: The ratio of the width to the height of the element m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" diff --git a/reflex/components/radix/themes/components/avatar.pyi b/reflex/components/radix/themes/components/avatar.pyi index 81cd470c0..a19a9b95c 100644 --- a/reflex/components/radix/themes/components/avatar.pyi +++ b/reflex/components/radix/themes/components/avatar.pyi @@ -25,17 +25,8 @@ class Avatar(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - ration: Optional[Union[Var[float], float]] = None, - variant: Optional[ - Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] - ] = 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, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -97,6 +88,16 @@ class Avatar(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + ration: Optional[Union[Var[float], float]] = None, + variant: Optional[ + Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] + ] = 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, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -206,10 +207,11 @@ class Avatar(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. ration: The ratio of the width to the height of the element variant: The variant of the avatar size: The size of the avatar - color: Color theme of the avatar high_contrast: Whether to render the avatar with higher contrast color against background radius: Override theme radius for avatar: "none" | "small" | "medium" | "large" | "full" m: Margin: "0" - "9" diff --git a/reflex/components/radix/themes/components/badge.pyi b/reflex/components/radix/themes/components/badge.pyi index fc455e6d5..4e53666a5 100644 --- a/reflex/components/radix/themes/components/badge.pyi +++ b/reflex/components/radix/themes/components/badge.pyi @@ -25,15 +25,8 @@ class Badge(el.Span, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - ration: Optional[Union[Var[float], float]] = None, - variant: Optional[ - Union[ - Var[Literal["solid", "soft", "surface", "outline"]], - Literal["solid", "soft", "surface", "outline"], - ] - ] = None, - size: Optional[Union[Var[Literal[1, 2]], Literal[1, 2]]] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -95,6 +88,14 @@ class Badge(el.Span, CommonMarginProps, RadixThemesComponent): ], ] ] = None, + ration: Optional[Union[Var[float], float]] = None, + variant: Optional[ + Union[ + Var[Literal["solid", "soft", "surface", "outline"]], + Literal["solid", "soft", "surface", "outline"], + ] + ] = None, + size: Optional[Union[Var[Literal[1, 2]], Literal[1, 2]]] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -247,10 +248,11 @@ class Badge(el.Span, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. ration: The ratio of the width to the height of the element variant: The variant of the avatar size: The size of the avatar - color: Color theme of the avatar high_contrast: Whether to render the avatar with higher contrast color against background radius: Override theme radius for avatar: "none" | "small" | "medium" | "large" | "full" access_key: Provides a hint for generating a keyboard shortcut for the current element. diff --git a/reflex/components/radix/themes/components/button.pyi b/reflex/components/radix/themes/components/button.pyi index 9f4830eb8..df3558ac8 100644 --- a/reflex/components/radix/themes/components/button.pyi +++ b/reflex/components/radix/themes/components/button.pyi @@ -26,15 +26,8 @@ class Button(el.Button, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - as_child: Optional[Union[Var[bool], bool]] = None, - size: Optional[Union[Var[Literal[1, 2, 3, 4]], Literal[1, 2, 3, 4]]] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -96,6 +89,14 @@ class Button(el.Button, CommonMarginProps, RadixThemesComponent): ], ] ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[Union[Var[Literal[1, 2, 3, 4]], Literal[1, 2, 3, 4]]] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -275,10 +276,11 @@ class Button(el.Button, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Button size "1" - "4" variant: Variant of button: "solid" | "soft" | "outline" | "ghost" - color: Override theme color for button high_contrast: Whether to render the button with higher contrast color against background radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full" auto_focus: Automatically focuses the button when the page loads diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index c69771d4a..85d1f2a8c 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -24,17 +24,8 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - as_child: Optional[Union[Var[bool], bool]] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -96,6 +87,16 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent): ], ] ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -248,10 +249,11 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Button size "1" - "4" variant: Variant of button: "solid" | "soft" | "outline" | "ghost" - color: Override theme color for button high_contrast: Whether to render the button with higher contrast color against background radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full" access_key: Provides a hint for generating a keyboard shortcut for the current element. @@ -297,6 +299,69 @@ class CalloutIcon(el.Div, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -442,6 +507,8 @@ class CalloutIcon(el.Div, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. @@ -485,6 +552,69 @@ class CalloutText(el.P, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -630,6 +760,8 @@ class CalloutText(el.P, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi index 437c5d24c..f25c1de55 100644 --- a/reflex/components/radix/themes/components/card.pyi +++ b/reflex/components/radix/themes/components/card.pyi @@ -18,6 +18,69 @@ class Card(el.Div, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, as_child: Optional[Union[Var[bool], bool]] = None, size: Optional[ Union[Var[Literal[1, 2, 3, 4, 5]], Literal[1, 2, 3, 4, 5]] @@ -173,6 +236,8 @@ class Card(el.Div, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Button size "1" - "5" variant: Variant of button: "solid" | "soft" | "outline" | "ghost" diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index d74a5c3ce..b8235d325 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -26,17 +26,8 @@ class Checkbox(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - as_child: Optional[Union[Var[bool], bool]] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -98,6 +89,16 @@ class Checkbox(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -216,10 +217,11 @@ class Checkbox(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Button size "1" - "3" variant: Variant of button: "solid" | "soft" | "outline" | "ghost" - color: Override theme color for button high_contrast: Whether to render the button with higher contrast color against background radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full" default_checked: Whether the checkbox is checked by default diff --git a/reflex/components/radix/themes/components/contextmenu.pyi b/reflex/components/radix/themes/components/contextmenu.pyi index 89d4ba91b..24b89f1ca 100644 --- a/reflex/components/radix/themes/components/contextmenu.pyi +++ b/reflex/components/radix/themes/components/contextmenu.pyi @@ -18,6 +18,69 @@ class ContextMenuRoot(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, modal: Optional[Union[Var[bool], bool]] = None, m: Optional[ Union[ @@ -124,6 +187,8 @@ class ContextMenuRoot(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. modal: The modality of the context menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" @@ -151,6 +216,69 @@ class ContextMenuTrigger(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, disabled: Optional[Union[Var[bool], bool]] = None, m: Optional[ Union[ @@ -254,6 +382,8 @@ class ContextMenuTrigger(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. disabled: Whether the trigger is disabled m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" @@ -282,11 +412,8 @@ class ContextMenuContent(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, - variant: Optional[ - Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -348,6 +475,10 @@ class ContextMenuContent(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, + variant: Optional[ + Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, align_offset: Optional[Union[Var[int], int]] = None, avoid_collisions: Optional[Union[Var[bool], bool]] = None, @@ -468,9 +599,10 @@ class ContextMenuContent(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: Button size "1" - "4" variant: Variant of button: "solid" | "soft" | "outline" | "ghost" - color: Override theme color for button high_contrast: Whether to render the button with higher contrast color against background align_offset: The vertical distance in pixels from the anchor. avoid_collisions: When true, overrides the side andalign preferences to prevent collisions with boundary edges. @@ -500,6 +632,69 @@ class ContextMenuSub(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -602,6 +797,8 @@ class ContextMenuSub(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -628,6 +825,69 @@ class ContextMenuSubTrigger(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, disabled: Optional[Union[Var[bool], bool]] = None, m: Optional[ Union[ @@ -731,6 +991,8 @@ class ContextMenuSubTrigger(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. disabled: Whether the trigger is disabled m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" @@ -759,6 +1021,69 @@ class ContextMenuSubContent(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, loop: Optional[Union[Var[bool], bool]] = None, m: Optional[ Union[ @@ -874,6 +1199,8 @@ class ContextMenuSubContent(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. loop: When true, keyboard navigation will loop from last item to first, and vice versa. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" @@ -901,7 +1228,8 @@ class ContextMenuItem(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -1066,7 +1394,8 @@ class ContextMenuItem(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. - color: Override theme color for button + color: map to CSS default color property. + color_scheme: map to radix color property. shortcut: Shortcut to render a menu item as a link m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" @@ -1094,6 +1423,69 @@ class ContextMenuSeparator(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -1196,6 +1588,8 @@ class ContextMenuSeparator(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi index 762b0ef8f..c70021a8a 100644 --- a/reflex/components/radix/themes/components/dialog.pyi +++ b/reflex/components/radix/themes/components/dialog.pyi @@ -19,6 +19,69 @@ class DialogRoot(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, open: Optional[Union[Var[bool], bool]] = None, modal: Optional[Union[Var[bool], bool]] = None, m: Optional[ @@ -126,6 +189,8 @@ class DialogRoot(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. open: The controlled open state of the dialog. modal: The modality of the dialog. When set to true, interaction with outside elements will be disabled and only dialog content will be visible to screen readers. m: Margin: "0" - "9" @@ -154,6 +219,69 @@ class DialogTrigger(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -256,6 +384,8 @@ class DialogTrigger(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -282,6 +412,69 @@ class DialogTitle(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -384,6 +577,8 @@ class DialogTitle(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -411,6 +606,69 @@ class DialogContent(el.Div, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, size: Optional[Union[Var[Literal[1, 2, 3, 4]], Literal[1, 2, 3, 4]]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -572,6 +830,8 @@ class DialogContent(el.Div, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: Button size "1" - "4" 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. @@ -616,6 +876,69 @@ class DialogDescription(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -718,6 +1041,8 @@ class DialogDescription(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" diff --git a/reflex/components/radix/themes/components/dropdownmenu.pyi b/reflex/components/radix/themes/components/dropdownmenu.pyi index f5c9f80c7..236e52dc2 100644 --- a/reflex/components/radix/themes/components/dropdownmenu.pyi +++ b/reflex/components/radix/themes/components/dropdownmenu.pyi @@ -18,6 +18,69 @@ class DropdownMenuRoot(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, open: Optional[Union[Var[bool], bool]] = None, modal: Optional[Union[Var[bool], bool]] = None, m: Optional[ @@ -125,6 +188,8 @@ class DropdownMenuRoot(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. open: The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange. modal: The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. m: Margin: "0" - "9" @@ -153,6 +218,69 @@ class DropdownMenuTrigger(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -255,6 +383,8 @@ class DropdownMenuTrigger(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -282,6 +412,69 @@ class DropdownMenuContent(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -396,6 +589,8 @@ class DropdownMenuContent(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -422,6 +617,69 @@ class DropdownMenuSubTrigger(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -524,6 +782,8 @@ class DropdownMenuSubTrigger(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -550,11 +810,8 @@ class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, - variant: Optional[ - Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -616,6 +873,10 @@ class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None, + variant: Optional[ + Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, m: Optional[ Union[ @@ -719,9 +980,10 @@ class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: Button size "1" - "4" variant: Variant of button: "solid" | "soft" | "outline" | "ghost" - color: Override theme color for button high_contrast: Whether to render the button with higher contrast color against background m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" @@ -749,7 +1011,8 @@ class DropdownMenuItem(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -914,7 +1177,8 @@ class DropdownMenuItem(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. - color: Override theme color for button + color: map to CSS default color property. + color_scheme: map to radix color property. shortcut: Shortcut to render a menu item as a link m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" @@ -942,6 +1206,69 @@ class DropdownMenuSeparator(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -1044,6 +1371,8 @@ class DropdownMenuSeparator(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" diff --git a/reflex/components/radix/themes/components/hovercard.pyi b/reflex/components/radix/themes/components/hovercard.pyi index 34a20a716..b369f2f4b 100644 --- a/reflex/components/radix/themes/components/hovercard.pyi +++ b/reflex/components/radix/themes/components/hovercard.pyi @@ -19,6 +19,69 @@ class HoverCardRoot(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, default_open: Optional[Union[Var[bool], bool]] = None, open: Optional[Union[Var[bool], bool]] = None, open_delay: Optional[Union[Var[int], int]] = None, @@ -128,6 +191,8 @@ class HoverCardRoot(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state. open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange. open_delay: The duration from when the mouse enters the trigger until the hover card opens. @@ -158,6 +223,69 @@ class HoverCardTrigger(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -260,6 +388,8 @@ class HoverCardTrigger(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -286,6 +416,69 @@ class HoverCardContent(el.Div, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, side: Optional[ Union[ Var[Literal["top", "right", "bottom", "left"]], @@ -445,6 +638,8 @@ class HoverCardContent(el.Div, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. side: The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled. side_offset: The distance in pixels from the trigger. align: The preferred alignment against the trigger. May change when collisions occur. diff --git a/reflex/components/radix/themes/components/iconbutton.pyi b/reflex/components/radix/themes/components/iconbutton.pyi index 6940cba7e..9e7fe409b 100644 --- a/reflex/components/radix/themes/components/iconbutton.pyi +++ b/reflex/components/radix/themes/components/iconbutton.pyi @@ -26,17 +26,8 @@ class IconButton(el.Button, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - as_child: Optional[Union[Var[bool], bool]] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -98,6 +89,16 @@ class IconButton(el.Button, CommonMarginProps, RadixThemesComponent): ], ] ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -277,10 +278,11 @@ class IconButton(el.Button, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Button size "1" - "4" variant: Variant of button: "solid" | "soft" | "outline" | "ghost" - color: Override theme color for button high_contrast: Whether to render the button with higher contrast color against background radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full" auto_focus: Automatically focuses the button when the page loads diff --git a/reflex/components/radix/themes/components/inset.pyi b/reflex/components/radix/themes/components/inset.pyi index b59724ff1..596012a20 100644 --- a/reflex/components/radix/themes/components/inset.pyi +++ b/reflex/components/radix/themes/components/inset.pyi @@ -20,6 +20,69 @@ class Inset(el.Div, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, side: Optional[ Union[ Var[Literal["x", "y", "top", "bottom", "right", "left"]], @@ -184,6 +247,8 @@ class Inset(el.Div, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. side: The side p: Padding px: Padding on the x axis diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index 57dc1e492..243bb9bee 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -19,6 +19,69 @@ class PopoverRoot(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, open: Optional[Union[Var[bool], bool]] = None, modal: Optional[Union[Var[bool], bool]] = None, m: Optional[ @@ -126,6 +189,8 @@ class PopoverRoot(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. open: The controlled open state of the popover. modal: The modality of the popover. When set to true, interaction with outside elements will be disabled and only popover content will be visible to screen readers. m: Margin: "0" - "9" @@ -154,6 +219,69 @@ class PopoverTrigger(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -256,6 +384,8 @@ class PopoverTrigger(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -283,6 +413,69 @@ class PopoverContent(el.Div, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, size: Optional[Union[Var[Literal[1, 2, 3, 4]], Literal[1, 2, 3, 4]]] = None, side: Optional[ Union[ @@ -462,6 +655,8 @@ class PopoverContent(el.Div, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: Size of the button: "1" | "2" | "3" | "4" side: The preferred side of the anchor to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled. side_offset: The distance in pixels from the anchor. @@ -511,6 +706,69 @@ class PopoverClose(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -613,6 +871,8 @@ class PopoverClose(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" diff --git a/reflex/components/radix/themes/components/radiogroup.pyi b/reflex/components/radix/themes/components/radiogroup.pyi index e0eda8357..04b53bad0 100644 --- a/reflex/components/radix/themes/components/radiogroup.pyi +++ b/reflex/components/radix/themes/components/radiogroup.pyi @@ -18,14 +18,8 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - size: Optional[Union[Var[Literal[1, 2, 3]], Literal[1, 2, 3]]] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "surface", "soft"]], - Literal["classic", "surface", "soft"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -87,6 +81,13 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + size: Optional[Union[Var[Literal[1, 2, 3]], Literal[1, 2, 3]]] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, value: Optional[Union[Var[str], str]] = None, default_value: Optional[Union[Var[str], str]] = None, @@ -204,9 +205,10 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: The size of the radio group: "1" | "2" | "3" variant: The variant of the radio group - color: 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. default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange. @@ -240,6 +242,69 @@ class RadioGroupItem(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, required: Optional[Union[Var[bool], bool]] = None, @@ -345,6 +410,8 @@ class RadioGroupItem(CommonMarginProps, RadixThemesComponent): Args: *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. 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. diff --git a/reflex/components/radix/themes/components/scrollarea.pyi b/reflex/components/radix/themes/components/scrollarea.pyi index 859f20fa8..8702afd9f 100644 --- a/reflex/components/radix/themes/components/scrollarea.pyi +++ b/reflex/components/radix/themes/components/scrollarea.pyi @@ -17,6 +17,69 @@ class ScrollArea(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, size: Optional[Union[Var[Literal[1, 2, 3]], Literal[1, 2, 3]]] = None, radius: Optional[ Union[ @@ -139,6 +202,8 @@ class ScrollArea(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: The size of the radio group: "1" | "2" | "3" radius: The radius of the radio group scrollbars: The alignment of the scroll area diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi index 0a9d8b142..cd8b65545 100644 --- a/reflex/components/radix/themes/components/select.pyi +++ b/reflex/components/radix/themes/components/select.pyi @@ -25,6 +25,69 @@ class SelectRoot(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, size: Optional[Union[Var[Literal[1, 2, 3]], Literal[1, 2, 3]]] = None, default_value: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, @@ -139,6 +202,8 @@ class SelectRoot(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. 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. value: The controlled value of the select. Use when you need to control the state of the select. @@ -171,13 +236,8 @@ class SelectTrigger(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - variant: Optional[ - Union[ - Var[Literal["classic", "surface", "soft", "ghost"]], - Literal["classic", "surface", "soft", "ghost"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -239,6 +299,12 @@ class SelectTrigger(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft", "ghost"]], + Literal["classic", "surface", "soft", "ghost"], + ] + ] = None, radius: Optional[ Union[ Var[Literal["none", "small", "medium", "large", "full"]], @@ -348,8 +414,9 @@ class SelectTrigger(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. variant: Variant of the select trigger - color: The color of the select trigger radius: The radius of the select trigger placeholder: The placeholder of the select trigger m: Margin: "0" - "9" @@ -379,10 +446,8 @@ class SelectContent(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - variant: Optional[ - Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -444,6 +509,9 @@ class SelectContent(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + variant: Optional[ + Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, position: Optional[ Union[ @@ -576,8 +644,9 @@ class SelectContent(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. variant: The variant of the select content - color: The color of the select content high_contrast: Whether to render the select content with higher contrast color against background position: The positioning mode to use, item-aligned is the default and behaves similarly to a native MacOS menu by positioning content relative to the active item. popper positions content in the same way as our other primitives, for example Popover or DropdownMenu. side: The preferred side of the anchor to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled. Only available when position is set to popper. @@ -610,6 +679,69 @@ class SelectGroup(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -712,6 +844,8 @@ class SelectGroup(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -738,6 +872,69 @@ class SelectItem(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, value: Optional[Union[Var[str], str]] = None, m: Optional[ Union[ @@ -841,6 +1038,8 @@ class SelectItem(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. value: The value of the select item when submitting the form. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" @@ -868,6 +1067,69 @@ class SelectLabel(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -970,6 +1232,8 @@ class SelectLabel(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -996,6 +1260,69 @@ class SelectSeparator(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -1098,6 +1425,8 @@ class SelectSeparator(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" diff --git a/reflex/components/radix/themes/components/separator.pyi b/reflex/components/radix/themes/components/separator.pyi index 7c4e4eb1a..5bced657c 100644 --- a/reflex/components/radix/themes/components/separator.pyi +++ b/reflex/components/radix/themes/components/separator.pyi @@ -19,10 +19,8 @@ class Separator(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - size: Optional[ - Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -84,6 +82,9 @@ class Separator(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + ] = None, orientation: Optional[ Union[ Var[Literal["horizontal", "vertical"]], @@ -193,8 +194,9 @@ class Separator(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: The size of the select: "1" | "2" | "3" - color: The color of the select orientation: The orientation of the separator. decorative: When true, signifies that it is purely visual, carries no semantic meaning, and ensures it is not present in the accessibility tree. m: Margin: "0" - "9" diff --git a/reflex/components/radix/themes/components/slider.pyi b/reflex/components/radix/themes/components/slider.pyi index 53e149e7f..4b019b305 100644 --- a/reflex/components/radix/themes/components/slider.pyi +++ b/reflex/components/radix/themes/components/slider.pyi @@ -23,15 +23,8 @@ class Slider(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - as_child: Optional[Union[Var[bool], bool]] = None, - size: Optional[Union[Var[Literal[1, 2, 3]], Literal[1, 2, 3]]] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "surface", "soft"]], - Literal["classic", "surface", "soft"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -93,6 +86,14 @@ class Slider(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + size: Optional[Union[Var[Literal[1, 2, 3]], Literal[1, 2, 3]]] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -220,10 +221,11 @@ class Slider(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Button size "1" - "4" variant: Variant of button - color: Override theme color for button high_contrast: Whether to render the button with higher contrast color against background 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. diff --git a/reflex/components/radix/themes/components/switch.pyi b/reflex/components/radix/themes/components/switch.pyi index 6006838c2..4072bcd5a 100644 --- a/reflex/components/radix/themes/components/switch.pyi +++ b/reflex/components/radix/themes/components/switch.pyi @@ -27,23 +27,8 @@ class Switch(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - as_child: Optional[Union[Var[bool], bool]] = None, - default_checked: Optional[Union[Var[bool], bool]] = None, - checked: Optional[Union[Var[bool], bool]] = None, - disabled: Optional[Union[Var[bool], bool]] = None, - required: Optional[Union[Var[bool], bool]] = None, - name: Optional[Union[Var[str], str]] = None, - value: Optional[Union[Var[str], str]] = None, - size: Optional[ - Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -105,6 +90,22 @@ class Switch(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + default_checked: Optional[Union[Var[bool], bool]] = None, + checked: Optional[Union[Var[bool], bool]] = None, + disabled: Optional[Union[Var[bool], bool]] = None, + required: Optional[Union[Var[bool], bool]] = None, + name: Optional[Union[Var[str], str]] = None, + value: Optional[Union[Var[str], str]] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ @@ -217,6 +218,8 @@ class Switch(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. default_checked: Whether the switch is checked by default checked: Whether the switch is checked @@ -226,7 +229,6 @@ class Switch(CommonMarginProps, RadixThemesComponent): value: The value associated with the "on" position size: Switch size "1" - "4" variant: Variant of switch: "solid" | "soft" | "outline" | "ghost" - color: Override theme color for switch high_contrast: Whether to render the switch with higher contrast color against background radius: Override theme radius for switch: "none" | "small" | "medium" | "large" | "full" m: Margin: "0" - "9" diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index 8bc7d2925..865d5deaa 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -18,6 +18,69 @@ class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, size: Optional[Union[Var[Literal[1, 2, 3]], Literal[1, 2, 3]]] = None, variant: Optional[ Union[Var[Literal["surface", "ghost"]], Literal["surface", "ghost"]] @@ -182,6 +245,8 @@ class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: The size of the table: "1" | "2" | "3" variant: The variant of the table align: Alignment of the table @@ -232,6 +297,69 @@ class TableHeader(el.Thead, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -380,6 +508,8 @@ class TableHeader(el.Thead, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. align: Alignment of the content within the table header 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. @@ -424,6 +554,69 @@ class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, align: Optional[ Union[ Var[Literal["start", "center", "end", "baseline"]], @@ -578,6 +771,8 @@ class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. align: Alignment of the content within the table row bgcolor: Background color of the table row access_key: Provides a hint for generating a keyboard shortcut for the current element. @@ -623,6 +818,69 @@ class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, justify: Optional[ Union[ Var[Literal["start", "center", "end"]], @@ -796,6 +1054,8 @@ class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. justify: The justification of the column width: width of the column align: Alignment of the content within the table header cell @@ -848,6 +1108,69 @@ class TableBody(el.Tbody, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, align: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -999,6 +1322,8 @@ class TableBody(el.Tbody, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. align: Alignment of the content within the table body bgcolor: Background color of the table body access_key: Provides a hint for generating a keyboard shortcut for the current element. @@ -1044,6 +1369,69 @@ class TableCell(el.Td, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, justify: Optional[ Union[ Var[Literal["start", "center", "end"]], @@ -1214,6 +1602,8 @@ class TableCell(el.Td, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. justify: The justification of the column width: width of the column align: Alignment of the content within the table cell @@ -1265,6 +1655,69 @@ class TableRowHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, justify: Optional[ Union[ Var[Literal["start", "center", "end"]], @@ -1438,6 +1891,8 @@ class TableRowHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. justify: The justification of the column width: width of the column align: Alignment of the content within the table header cell diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi index a0a23e7d2..922ed02bc 100644 --- a/reflex/components/radix/themes/components/tabs.pyi +++ b/reflex/components/radix/themes/components/tabs.pyi @@ -18,6 +18,69 @@ class TabsRoot(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, size: Optional[Union[Var[Literal[1, 2, 3]], Literal[1, 2, 3]]] = None, variant: Optional[ Union[Var[Literal["surface", "ghost"]], Literal["surface", "ghost"]] @@ -135,6 +198,8 @@ class TabsRoot(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: The size of the table: "1" | "2" | "3" variant: The variant of the table default_value: The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. @@ -166,6 +231,69 @@ class TabsList(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -268,6 +396,8 @@ class TabsList(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" @@ -294,6 +424,69 @@ class TabsTrigger(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, m: Optional[ @@ -398,6 +591,8 @@ class TabsTrigger(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. value: The value of the tab. Must be unique for each tab. disabled: Whether the tab is disabled m: Margin: "0" - "9" @@ -426,6 +621,69 @@ class TabsContent(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, m: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -528,6 +786,8 @@ class TabsContent(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" my: Margin vertical: "0" - "9" diff --git a/reflex/components/radix/themes/components/textfield.pyi b/reflex/components/radix/themes/components/textfield.pyi index bda382e80..0bd852cc5 100644 --- a/reflex/components/radix/themes/components/textfield.pyi +++ b/reflex/components/radix/themes/components/textfield.pyi @@ -30,16 +30,8 @@ class TextFieldRoot(el.Div, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - size: Optional[ - Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] - ] = None, - variant: Optional[ - Union[ - Var[Literal["classic", "surface", "soft"]], - Literal["classic", "surface", "soft"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -101,6 +93,15 @@ class TextFieldRoot(el.Div, CommonMarginProps, RadixThemesComponent): ], ] ] = None, + size: Optional[ + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] + ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], + ] + ] = None, radius: Optional[ Union[ Var[Literal["none", "small", "medium", "large", "full"]], @@ -252,9 +253,10 @@ class TextFieldRoot(el.Div, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: Text field size "1" - "3" variant: Variant of text field: "classic" | "surface" | "soft" - color: Override theme color for text field radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full" 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. @@ -683,7 +685,8 @@ class TextFieldSlot(RadixThemesComponent): def create( # type: ignore cls, *children, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -811,7 +814,8 @@ class TextFieldSlot(RadixThemesComponent): Args: *children: Child components. - color: Override theme color for text field slot + color: map to CSS default color property. + color_scheme: map to radix color property. gap: Override the gap spacing between slot and input: "1" - "9" style: The style of the component. key: A unique key for the component. diff --git a/reflex/components/radix/themes/layout/base.pyi b/reflex/components/radix/themes/layout/base.pyi index aa88429e2..fa3cfd9fa 100644 --- a/reflex/components/radix/themes/layout/base.pyi +++ b/reflex/components/radix/themes/layout/base.pyi @@ -19,6 +19,69 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, p: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -165,6 +228,8 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. p: Padding: "0" - "9" px: Padding horizontal: "0" - "9" py: Padding vertical: "0" - "9" diff --git a/reflex/components/radix/themes/layout/box.pyi b/reflex/components/radix/themes/layout/box.pyi index 02d876c65..4e8aa662a 100644 --- a/reflex/components/radix/themes/layout/box.pyi +++ b/reflex/components/radix/themes/layout/box.pyi @@ -16,6 +16,69 @@ class Box(el.Div, LayoutComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -205,6 +268,8 @@ class Box(el.Div, LayoutComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/reflex/components/radix/themes/layout/container.pyi b/reflex/components/radix/themes/layout/container.pyi index 63df8f1c5..31d281686 100644 --- a/reflex/components/radix/themes/layout/container.pyi +++ b/reflex/components/radix/themes/layout/container.pyi @@ -20,6 +20,69 @@ class Container(el.Div, LayoutComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, size: Optional[ Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] ] = None, @@ -212,6 +275,8 @@ class Container(el.Div, LayoutComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: The size of the container: "1" - "4" (default "4") 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. diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi index 5131b07b1..10c2f4a24 100644 --- a/reflex/components/radix/themes/layout/flex.pyi +++ b/reflex/components/radix/themes/layout/flex.pyi @@ -23,6 +23,69 @@ class Flex(el.Div, LayoutComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, as_child: Optional[Union[Var[bool], bool]] = None, display: Optional[ Union[ @@ -249,6 +312,8 @@ class Flex(el.Div, LayoutComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. display: How to display the element: "none" | "inline-flex" | "flex" direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" diff --git a/reflex/components/radix/themes/layout/grid.pyi b/reflex/components/radix/themes/layout/grid.pyi index 592c1df55..4620d5be3 100644 --- a/reflex/components/radix/themes/layout/grid.pyi +++ b/reflex/components/radix/themes/layout/grid.pyi @@ -21,6 +21,69 @@ class Grid(el.Div, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, as_child: Optional[Union[Var[bool], bool]] = None, display: Optional[ Union[ @@ -163,6 +226,8 @@ class Grid(el.Div, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. display: How to display the element: "none" | "inline-grid" | "grid" columns: Number of columns diff --git a/reflex/components/radix/themes/layout/section.pyi b/reflex/components/radix/themes/layout/section.pyi index cce751c1a..4677e0ec5 100644 --- a/reflex/components/radix/themes/layout/section.pyi +++ b/reflex/components/radix/themes/layout/section.pyi @@ -20,6 +20,69 @@ class Section(el.Section, LayoutComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, size: Optional[ Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] ] = None, @@ -212,6 +275,8 @@ class Section(el.Section, LayoutComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: The size of the section: "1" - "3" (default "3") 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. diff --git a/reflex/components/radix/themes/typography/blockquote.pyi b/reflex/components/radix/themes/typography/blockquote.pyi index cfc079088..47522ed7e 100644 --- a/reflex/components/radix/themes/typography/blockquote.pyi +++ b/reflex/components/radix/themes/typography/blockquote.pyi @@ -18,19 +18,8 @@ class Blockquote(el.Blockquote, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - 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, - weight: Optional[ - Union[ - Var[Literal["light", "regular", "medium", "bold"]], - Literal["light", "regular", "medium", "bold"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -92,6 +81,18 @@ class Blockquote(el.Blockquote, CommonMarginProps, RadixThemesComponent): ], ] ] = 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, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, cite: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, access_key: Optional[ @@ -239,9 +240,10 @@ class Blockquote(el.Blockquote, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: Text size: "1" - "9" weight: Thickness of text: "light" | "regular" | "medium" | "bold" - color: Overrides the accent color inherited from the Theme. high_contrast: Whether to render the text with higher contrast color cite: Define the title of a work. access_key: Provides a hint for generating a keyboard shortcut for the current element. diff --git a/reflex/components/radix/themes/typography/code.pyi b/reflex/components/radix/themes/typography/code.pyi index 6a780cf6d..4e0e991f7 100644 --- a/reflex/components/radix/themes/typography/code.pyi +++ b/reflex/components/radix/themes/typography/code.pyi @@ -23,25 +23,8 @@ class Code(el.Code, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - variant: Optional[ - Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], - ] - ] = 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, - weight: Optional[ - Union[ - Var[Literal["light", "regular", "medium", "bold"]], - Literal["light", "regular", "medium", "bold"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -103,6 +86,24 @@ class Code(el.Code, CommonMarginProps, RadixThemesComponent): ], ] ] = None, + variant: Optional[ + Union[ + Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], + Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + ] + ] = 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, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -249,10 +250,11 @@ class Code(el.Code, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. variant: The visual variant to apply: "solid" | "soft" | "outline" | "ghost" size: Text size: "1" - "9" weight: Thickness of text: "light" | "regular" | "medium" | "bold" - color: Overrides the accent color inherited from the Theme. high_contrast: Whether to render the text with higher contrast color 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. diff --git a/reflex/components/radix/themes/typography/em.pyi b/reflex/components/radix/themes/typography/em.pyi index 2264c9f14..11c09874e 100644 --- a/reflex/components/radix/themes/typography/em.pyi +++ b/reflex/components/radix/themes/typography/em.pyi @@ -16,6 +16,69 @@ class Em(el.Em, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -161,6 +224,8 @@ class Em(el.Em, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/reflex/components/radix/themes/typography/heading.pyi b/reflex/components/radix/themes/typography/heading.pyi index e8670dda1..831432fe3 100644 --- a/reflex/components/radix/themes/typography/heading.pyi +++ b/reflex/components/radix/themes/typography/heading.pyi @@ -18,33 +18,8 @@ class Heading(el.H1, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - as_child: Optional[Union[Var[bool], bool]] = None, - as_: Optional[Union[Var[str], str]] = 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, - weight: Optional[ - Union[ - Var[Literal["light", "regular", "medium", "bold"]], - Literal["light", "regular", "medium", "bold"], - ] - ] = None, - align: Optional[ - Union[ - Var[Literal["left", "center", "right"]], - Literal["left", "center", "right"], - ] - ] = None, - trim: Optional[ - Union[ - Var[Literal["normal", "start", "end", "both"]], - Literal["normal", "start", "end", "both"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -106,6 +81,32 @@ class Heading(el.H1, CommonMarginProps, RadixThemesComponent): ], ] ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + as_: Optional[Union[Var[str], str]] = 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, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, + align: Optional[ + Union[ + Var[Literal["left", "center", "right"]], + Literal["left", "center", "right"], + ] + ] = None, + trim: Optional[ + Union[ + Var[Literal["normal", "start", "end", "both"]], + Literal["normal", "start", "end", "both"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -252,13 +253,14 @@ class Heading(el.H1, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. as_: Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild) size: Text size: "1" - "9" weight: Thickness of text: "light" | "regular" | "medium" | "bold" align: Alignment of text in element: "left" | "center" | "right" trim: Removes the leading trim space: "normal" | "start" | "end" | "both" - color: Overrides the accent color inherited from the Theme. high_contrast: Whether to render the text with higher contrast color 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. diff --git a/reflex/components/radix/themes/typography/kbd.pyi b/reflex/components/radix/themes/typography/kbd.pyi index e4a65494f..723923b8c 100644 --- a/reflex/components/radix/themes/typography/kbd.pyi +++ b/reflex/components/radix/themes/typography/kbd.pyi @@ -18,6 +18,69 @@ class Kbd(el.Kbd, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, size: Optional[ Union[ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], @@ -169,6 +232,8 @@ class Kbd(el.Kbd, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. size: Text size: "1" - "9" 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. diff --git a/reflex/components/radix/themes/typography/link.pyi b/reflex/components/radix/themes/typography/link.pyi index 741f813ca..74253a2c3 100644 --- a/reflex/components/radix/themes/typography/link.pyi +++ b/reflex/components/radix/themes/typography/link.pyi @@ -20,32 +20,8 @@ class Link(CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - as_child: Optional[Union[Var[bool], bool]] = 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, - weight: Optional[ - Union[ - Var[Literal["light", "regular", "medium", "bold"]], - Literal["light", "regular", "medium", "bold"], - ] - ] = None, - trim: Optional[ - Union[ - Var[Literal["normal", "start", "end", "both"]], - Literal["normal", "start", "end", "both"], - ] - ] = None, - underline: Optional[ - Union[ - Var[Literal["auto", "hover", "always"]], - Literal["auto", "hover", "always"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -107,6 +83,31 @@ class Link(CommonMarginProps, RadixThemesComponent): ], ] ] = None, + as_child: Optional[Union[Var[bool], bool]] = 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, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, + trim: Optional[ + Union[ + Var[Literal["normal", "start", "end", "both"]], + Literal["normal", "start", "end", "both"], + ] + ] = None, + underline: Optional[ + Union[ + Var[Literal["auto", "hover", "always"]], + Literal["auto", "hover", "always"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, m: Optional[ Union[ @@ -210,12 +211,13 @@ class Link(CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. size: Text size: "1" - "9" weight: Thickness of text: "light" | "regular" | "medium" | "bold" trim: Removes the leading trim space: "normal" | "start" | "end" | "both" underline: Sets the visibility of the underline affordance: "auto" | "hover" | "always" - color: Overrides the accent color inherited from the Theme. high_contrast: Whether to render the text with higher contrast color m: Margin: "0" - "9" mx: Margin horizontal: "0" - "9" diff --git a/reflex/components/radix/themes/typography/quote.pyi b/reflex/components/radix/themes/typography/quote.pyi index 019d40e9e..30047fb1d 100644 --- a/reflex/components/radix/themes/typography/quote.pyi +++ b/reflex/components/radix/themes/typography/quote.pyi @@ -16,6 +16,69 @@ class Quote(el.Q, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, cite: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -162,6 +225,8 @@ class Quote(el.Q, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/reflex/components/radix/themes/typography/strong.pyi b/reflex/components/radix/themes/typography/strong.pyi index 882dc41d4..573e7d32e 100644 --- a/reflex/components/radix/themes/typography/strong.pyi +++ b/reflex/components/radix/themes/typography/strong.pyi @@ -16,6 +16,69 @@ class Strong(el.Strong, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ + Union[ + Var[ + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ] + ], + Literal[ + "tomato", + "red", + "ruby", + "crimson", + "pink", + "plum", + "purple", + "violet", + "iris", + "indigo", + "blue", + "cyan", + "teal", + "jade", + "green", + "grass", + "brown", + "orange", + "sky", + "mint", + "lime", + "yellow", + "amber", + "gold", + "bronze", + "gray", + ], + ] + ] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -161,6 +224,8 @@ class Strong(el.Strong, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. access_key: Provides a hint for generating a keyboard shortcut for the current element. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user. content_editable: Indicates whether the element's content is editable. diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index be71f1861..24978fb6e 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -18,33 +18,8 @@ class Text(el.Span, CommonMarginProps, RadixThemesComponent): def create( # type: ignore cls, *children, - as_child: Optional[Union[Var[bool], bool]] = None, - as_: Optional[Union[Var[str], str]] = 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, - weight: Optional[ - Union[ - Var[Literal["light", "regular", "medium", "bold"]], - Literal["light", "regular", "medium", "bold"], - ] - ] = None, - align: Optional[ - Union[ - Var[Literal["left", "center", "right"]], - Literal["left", "center", "right"], - ] - ] = None, - trim: Optional[ - Union[ - Var[Literal["normal", "start", "end", "both"]], - Literal["normal", "start", "end", "both"], - ] - ] = None, - color: Optional[ + color: Optional[Union[Var[str], str]] = None, + color_scheme: Optional[ Union[ Var[ Literal[ @@ -106,6 +81,32 @@ class Text(el.Span, CommonMarginProps, RadixThemesComponent): ], ] ] = None, + as_child: Optional[Union[Var[bool], bool]] = None, + as_: Optional[Union[Var[str], str]] = 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, + weight: Optional[ + Union[ + Var[Literal["light", "regular", "medium", "bold"]], + Literal["light", "regular", "medium", "bold"], + ] + ] = None, + align: Optional[ + Union[ + Var[Literal["left", "center", "right"]], + Literal["left", "center", "right"], + ] + ] = None, + trim: Optional[ + Union[ + Var[Literal["normal", "start", "end", "both"]], + Literal["normal", "start", "end", "both"], + ] + ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, access_key: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] @@ -252,13 +253,14 @@ class Text(el.Span, CommonMarginProps, RadixThemesComponent): Args: *children: Child components. + color: map to CSS default color property. + color_scheme: map to radix color property. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. as_: Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild) size: Text size: "1" - "9" weight: Thickness of text: "light" | "regular" | "medium" | "bold" align: Alignment of text in element: "left" | "center" | "right" trim: Removes the leading trim space: "normal" | "start" | "end" | "both" - color: Overrides the accent color inherited from the Theme. high_contrast: Whether to render the text with higher contrast color 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. diff --git a/scripts/pyi_generator.py b/scripts/pyi_generator.py index 751945da5..b7143806b 100644 --- a/scripts/pyi_generator.py +++ b/scripts/pyi_generator.py @@ -9,6 +9,7 @@ import os import re import sys import textwrap +import typing from inspect import getfullargspec from pathlib import Path from types import ModuleType @@ -130,6 +131,10 @@ def _generate_imports(typing_imports: Iterable[str]) -> list[ast.ImportFrom]: from reflex.style import Style""" ) ).body, + # *[ + # ast.ImportFrom(module=name, names=[ast.alias(name=val) for val in values]) + # for name, values in EXTRA_IMPORTS.items() + # ], ] @@ -267,6 +272,20 @@ def _extract_class_props_as_ast_nodes( return kwargs +def _get_parent_imports(func): + _imports = {"reflex.vars": ["Var"]} + for type_hint in inspect.get_annotations(func).values(): + try: + match = re.match(r"\w+\[([\w\d]+)\]", type_hint) + except TypeError: + continue + if match: + type_hint = match.group(1) + if type_hint in importlib.import_module(func.__module__).__dir__(): + _imports.setdefault(func.__module__, []).append(type_hint) + return _imports + + def _generate_component_create_functiondef( node: ast.FunctionDef | None, clz: type[Component], @@ -282,7 +301,16 @@ def _generate_component_create_functiondef( Returns: The create functiondef node for the ast. """ - # kwargs defined on the actual create function + # add the imports needed by get_type_hint later + type_hint_globals.update( + {name: getattr(typing, name) for name in DEFAULT_TYPING_IMPORTS} + ) + + if clz.__module__ != clz.create.__module__: + _imports = _get_parent_imports(clz.create) + for name, values in _imports.items(): + exec(f"from {name} import {','.join(values)}", type_hint_globals) + kwargs = _extract_func_kwargs_as_ast_nodes(clz.create, type_hint_globals) # kwargs associated with props defined in the class and its parents @@ -548,7 +576,6 @@ class PyiGenerator: modules: list = [] root: str = "" current_module: Any = {} - default_typing_imports: set = DEFAULT_TYPING_IMPORTS def _write_pyi_file(self, module_path: Path, source: str): pyi_content = [ @@ -580,7 +607,7 @@ class PyiGenerator: def _scan_file(self, module_path: Path): module_import = str(module_path.with_suffix("")).replace("/", ".") module = importlib.import_module(module_import) - + logger.debug(f"Read {module_path}") class_names = { name: obj for name, obj in vars(module).items()