From e12b15f1fe0bfa331248dc691c123b295fa19a18 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 30 Jan 2024 16:58:28 -0800 Subject: [PATCH 1/6] [REF-1738] Remove radix-specific layout/margin props (#2442) --- .../radix/themes/components/alertdialog.py | 16 +- .../radix/themes/components/alertdialog.pyi | 359 +-------------- .../radix/themes/components/aspectratio.py | 7 +- .../radix/themes/components/aspectratio.pyi | 53 +-- .../radix/themes/components/avatar.py | 3 +- .../radix/themes/components/avatar.pyi | 59 +-- .../radix/themes/components/badge.py | 3 +- .../radix/themes/components/badge.pyi | 58 +-- .../radix/themes/components/button.py | 3 +- .../radix/themes/components/button.pyi | 52 +-- .../radix/themes/components/callout.py | 7 +- .../radix/themes/components/callout.pyi | 204 +-------- .../radix/themes/components/card.py | 3 +- .../radix/themes/components/card.pyi | 53 +-- .../radix/themes/components/checkbox.py | 3 +- .../radix/themes/components/checkbox.pyi | 108 +---- .../radix/themes/components/contextmenu.py | 17 +- .../radix/themes/components/contextmenu.pyi | 410 +---------------- .../radix/themes/components/dialog.py | 13 +- .../radix/themes/components/dialog.pyi | 308 +------------ .../radix/themes/components/dropdownmenu.py | 17 +- .../radix/themes/components/dropdownmenu.pyi | 410 +---------------- .../radix/themes/components/hovercard.py | 7 +- .../radix/themes/components/hovercard.pyi | 155 +------ .../radix/themes/components/iconbutton.py | 3 +- .../radix/themes/components/iconbutton.pyi | 52 +-- .../radix/themes/components/inset.py | 3 +- .../radix/themes/components/inset.pyi | 53 +-- .../radix/themes/components/popover.py | 9 +- .../radix/themes/components/popover.pyi | 206 +-------- .../radix/themes/components/radiogroup.py | 5 +- .../radix/themes/components/radiogroup.pyi | 158 +------ .../radix/themes/components/scrollarea.py | 3 +- .../radix/themes/components/scrollarea.pyi | 53 +-- .../radix/themes/components/select.py | 15 +- .../radix/themes/components/select.pyi | 413 +----------------- .../radix/themes/components/separator.py | 3 +- .../radix/themes/components/separator.pyi | 53 +-- .../radix/themes/components/slider.py | 3 +- .../radix/themes/components/slider.pyi | 58 +-- .../radix/themes/components/switch.py | 3 +- .../radix/themes/components/switch.pyi | 52 +-- .../radix/themes/components/table.py | 15 +- .../radix/themes/components/table.pyi | 359 +-------------- .../radix/themes/components/tabs.py | 9 +- .../radix/themes/components/tabs.pyi | 206 +-------- .../radix/themes/components/textarea.py | 3 +- .../radix/themes/components/textarea.pyi | 53 +-- .../radix/themes/components/textfield.py | 3 +- .../radix/themes/components/textfield.pyi | 108 +---- .../radix/themes/components/tooltip.py | 3 +- .../radix/themes/components/tooltip.pyi | 53 +-- reflex/components/radix/themes/layout/box.py | 4 +- reflex/components/radix/themes/layout/box.pyi | 106 +---- .../components/radix/themes/layout/center.pyi | 102 ----- .../radix/themes/layout/container.py | 4 +- .../radix/themes/layout/container.pyi | 106 +---- reflex/components/radix/themes/layout/flex.py | 4 +- .../components/radix/themes/layout/flex.pyi | 107 +---- .../components/radix/themes/layout/section.py | 4 +- .../radix/themes/layout/section.pyi | 106 +---- .../components/radix/themes/layout/spacer.pyi | 102 ----- .../components/radix/themes/layout/stack.pyi | 306 ------------- reflex/components/radix/themes/typography.py | 15 +- .../radix/themes/typography/blockquote.py | 3 +- .../radix/themes/typography/blockquote.pyi | 53 +-- .../radix/themes/typography/code.py | 3 +- .../radix/themes/typography/code.pyi | 58 +-- .../components/radix/themes/typography/em.py | 3 +- .../components/radix/themes/typography/em.pyi | 53 +-- .../radix/themes/typography/heading.py | 3 +- .../radix/themes/typography/heading.pyi | 53 +-- .../components/radix/themes/typography/kbd.py | 3 +- .../radix/themes/typography/kbd.pyi | 53 +-- .../radix/themes/typography/link.py | 3 +- .../radix/themes/typography/link.pyi | 53 +-- .../radix/themes/typography/quote.py | 3 +- .../radix/themes/typography/quote.pyi | 53 +-- .../radix/themes/typography/strong.py | 3 +- .../radix/themes/typography/strong.pyi | 53 +-- .../radix/themes/typography/text.py | 3 +- .../radix/themes/typography/text.pyi | 53 +-- 82 files changed, 223 insertions(+), 5537 deletions(-) diff --git a/reflex/components/radix/themes/components/alertdialog.py b/reflex/components/radix/themes/components/alertdialog.py index e259c0996..7a9edc8c6 100644 --- a/reflex/components/radix/themes/components/alertdialog.py +++ b/reflex/components/radix/themes/components/alertdialog.py @@ -4,12 +4,12 @@ from typing import Any, Dict, Literal from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, LiteralSize, RadixThemesComponent +from ..base import LiteralSize, RadixThemesComponent LiteralSwitchSize = Literal["1", "2", "3", "4"] -class AlertDialogRoot(CommonMarginProps, RadixThemesComponent): +class AlertDialogRoot(RadixThemesComponent): """Contains all the parts of the dialog.""" tag = "AlertDialog.Root" @@ -29,13 +29,13 @@ class AlertDialogRoot(CommonMarginProps, RadixThemesComponent): } -class AlertDialogTrigger(CommonMarginProps, RadixThemesComponent): +class AlertDialogTrigger(RadixThemesComponent): """Wraps the control that will open the dialog.""" tag = "AlertDialog.Trigger" -class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent): +class AlertDialogContent(el.Div, RadixThemesComponent): """Contains the content of the dialog. This component is based on the div element.""" tag = "AlertDialog.Content" @@ -60,7 +60,7 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent): } -class AlertDialogTitle(CommonMarginProps, RadixThemesComponent): +class AlertDialogTitle(RadixThemesComponent): """An accessible title that is announced when the dialog is opened. This part is based on the Heading component with a pre-defined font size and leading trim on top. @@ -69,7 +69,7 @@ class AlertDialogTitle(CommonMarginProps, RadixThemesComponent): tag = "AlertDialog.Title" -class AlertDialogDescription(CommonMarginProps, RadixThemesComponent): +class AlertDialogDescription(RadixThemesComponent): """An optional accessible description that is announced when the dialog is opened. This part is based on the Text component with a pre-defined font size. """ @@ -77,7 +77,7 @@ class AlertDialogDescription(CommonMarginProps, RadixThemesComponent): tag = "AlertDialog.Description" -class AlertDialogAction(CommonMarginProps, RadixThemesComponent): +class AlertDialogAction(RadixThemesComponent): """Wraps the control that will close the dialog. This should be distinguished visually from the Cancel control. """ @@ -85,7 +85,7 @@ class AlertDialogAction(CommonMarginProps, RadixThemesComponent): tag = "AlertDialog.Action" -class AlertDialogCancel(CommonMarginProps, RadixThemesComponent): +class AlertDialogCancel(RadixThemesComponent): """Wraps the control that will close the dialog. This should be distinguished visually from the Action control. """ diff --git a/reflex/components/radix/themes/components/alertdialog.pyi b/reflex/components/radix/themes/components/alertdialog.pyi index fbcd8d660..c6c634a07 100644 --- a/reflex/components/radix/themes/components/alertdialog.pyi +++ b/reflex/components/radix/themes/components/alertdialog.pyi @@ -10,11 +10,11 @@ from reflex.style import Style from typing import Any, Dict, Literal from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, LiteralSize, RadixThemesComponent +from ..base import LiteralSize, RadixThemesComponent LiteralSwitchSize = Literal["1", "2", "3", "4"] -class AlertDialogRoot(CommonMarginProps, RadixThemesComponent): +class AlertDialogRoot(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -85,48 +85,6 @@ class AlertDialogRoot(CommonMarginProps, RadixThemesComponent): ] ] = None, open: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -193,13 +151,6 @@ class AlertDialogRoot(CommonMarginProps, RadixThemesComponent): 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" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -213,7 +164,7 @@ class AlertDialogRoot(CommonMarginProps, RadixThemesComponent): """ ... -class AlertDialogTrigger(CommonMarginProps, RadixThemesComponent): +class AlertDialogTrigger(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -282,48 +233,6 @@ class AlertDialogTrigger(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -386,13 +295,6 @@ class AlertDialogTrigger(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -406,7 +308,7 @@ class AlertDialogTrigger(CommonMarginProps, RadixThemesComponent): """ ... -class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent): +class AlertDialogContent(el.Div, RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -526,48 +428,6 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -658,13 +518,6 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -678,7 +531,7 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent): """ ... -class AlertDialogTitle(CommonMarginProps, RadixThemesComponent): +class AlertDialogTitle(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -747,48 +600,6 @@ class AlertDialogTitle(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -851,13 +662,6 @@ class AlertDialogTitle(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -871,7 +675,7 @@ class AlertDialogTitle(CommonMarginProps, RadixThemesComponent): """ ... -class AlertDialogDescription(CommonMarginProps, RadixThemesComponent): +class AlertDialogDescription(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -940,48 +744,6 @@ class AlertDialogDescription(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1044,13 +806,6 @@ class AlertDialogDescription(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1064,7 +819,7 @@ class AlertDialogDescription(CommonMarginProps, RadixThemesComponent): """ ... -class AlertDialogAction(CommonMarginProps, RadixThemesComponent): +class AlertDialogAction(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1133,48 +888,6 @@ class AlertDialogAction(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1237,13 +950,6 @@ class AlertDialogAction(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1257,7 +963,7 @@ class AlertDialogAction(CommonMarginProps, RadixThemesComponent): """ ... -class AlertDialogCancel(CommonMarginProps, RadixThemesComponent): +class AlertDialogCancel(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1326,48 +1032,6 @@ class AlertDialogCancel(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1430,13 +1094,6 @@ class AlertDialogCancel(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/aspectratio.py b/reflex/components/radix/themes/components/aspectratio.py index 47ba45577..556666605 100644 --- a/reflex/components/radix/themes/components/aspectratio.py +++ b/reflex/components/radix/themes/components/aspectratio.py @@ -3,13 +3,10 @@ from typing import Union from reflex.vars import Var -from ..base import ( - CommonMarginProps, - RadixThemesComponent, -) +from ..base import RadixThemesComponent -class AspectRatio(CommonMarginProps, RadixThemesComponent): +class AspectRatio(RadixThemesComponent): """Displays content with a desired ratio.""" tag = "AspectRatio" diff --git a/reflex/components/radix/themes/components/aspectratio.pyi b/reflex/components/radix/themes/components/aspectratio.pyi index c24028f85..b67bb9d09 100644 --- a/reflex/components/radix/themes/components/aspectratio.pyi +++ b/reflex/components/radix/themes/components/aspectratio.pyi @@ -9,9 +9,9 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Union from reflex.vars import Var -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class AspectRatio(CommonMarginProps, RadixThemesComponent): +class AspectRatio(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -81,48 +81,6 @@ class AspectRatio(CommonMarginProps, RadixThemesComponent): ] ] = None, ratio: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -186,13 +144,6 @@ class AspectRatio(CommonMarginProps, RadixThemesComponent): color: map to CSS default color property. color_scheme: map to radix color property. ratio: The ratio of the width to the height of the element - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/avatar.py b/reflex/components/radix/themes/components/avatar.py index d3e76b595..35664f4c6 100644 --- a/reflex/components/radix/themes/components/avatar.py +++ b/reflex/components/radix/themes/components/avatar.py @@ -4,7 +4,6 @@ from typing import Literal from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, LiteralSize, @@ -12,7 +11,7 @@ from ..base import ( ) -class Avatar(CommonMarginProps, RadixThemesComponent): +class Avatar(RadixThemesComponent): """An image element with a fallback for representing the user.""" tag = "Avatar" diff --git a/reflex/components/radix/themes/components/avatar.pyi b/reflex/components/radix/themes/components/avatar.pyi index d91c6954c..635cea11e 100644 --- a/reflex/components/radix/themes/components/avatar.pyi +++ b/reflex/components/radix/themes/components/avatar.pyi @@ -9,15 +9,9 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Literal from reflex.vars import Var -from ..base import ( - CommonMarginProps, - LiteralAccentColor, - LiteralRadius, - LiteralSize, - RadixThemesComponent, -) +from ..base import LiteralAccentColor, LiteralRadius, LiteralSize, RadixThemesComponent -class Avatar(CommonMarginProps, RadixThemesComponent): +class Avatar(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -104,48 +98,6 @@ class Avatar(CommonMarginProps, RadixThemesComponent): ] = None, src: Optional[Union[Var[str], str]] = None, fallback: Optional[Union[Var[str], str]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -214,13 +166,6 @@ class Avatar(CommonMarginProps, RadixThemesComponent): radius: Override theme radius for avatar: "none" | "small" | "medium" | "large" | "full" src: The src of the avatar image fallback: The rendered fallback text - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/badge.py b/reflex/components/radix/themes/components/badge.py index 2beb0f77f..98145c3d0 100644 --- a/reflex/components/radix/themes/components/badge.py +++ b/reflex/components/radix/themes/components/badge.py @@ -5,14 +5,13 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, RadixThemesComponent, ) -class Badge(el.Span, CommonMarginProps, RadixThemesComponent): +class Badge(el.Span, RadixThemesComponent): """A stylized badge element.""" tag = "Badge" diff --git a/reflex/components/radix/themes/components/badge.pyi b/reflex/components/radix/themes/components/badge.pyi index be6da716b..07b75e5a3 100644 --- a/reflex/components/radix/themes/components/badge.pyi +++ b/reflex/components/radix/themes/components/badge.pyi @@ -10,14 +10,9 @@ from reflex.style import Style from typing import Literal from reflex import el from reflex.vars import Var -from ..base import ( - CommonMarginProps, - LiteralAccentColor, - LiteralRadius, - RadixThemesComponent, -) +from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent -class Badge(el.Span, CommonMarginProps, RadixThemesComponent): +class Badge(el.Span, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -143,48 +138,6 @@ class Badge(el.Span, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -268,13 +221,6 @@ class Badge(el.Span, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/button.py b/reflex/components/radix/themes/components/button.py index 738ee6a2f..4e17ee2d7 100644 --- a/reflex/components/radix/themes/components/button.py +++ b/reflex/components/radix/themes/components/button.py @@ -5,7 +5,6 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, LiteralVariant, @@ -15,7 +14,7 @@ from ..base import ( LiteralButtonSize = Literal["1", "2", "3", "4"] -class Button(el.Button, CommonMarginProps, RadixThemesComponent): +class Button(el.Button, RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Button" diff --git a/reflex/components/radix/themes/components/button.pyi b/reflex/components/radix/themes/components/button.pyi index 2fddc27ec..b72a0acfc 100644 --- a/reflex/components/radix/themes/components/button.pyi +++ b/reflex/components/radix/themes/components/button.pyi @@ -11,7 +11,6 @@ from typing import Literal from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, LiteralVariant, @@ -20,7 +19,7 @@ from ..base import ( LiteralButtonSize = Literal["1", "2", "3", "4"] -class Button(el.Button, CommonMarginProps, RadixThemesComponent): +class Button(el.Button, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -176,48 +175,6 @@ class Button(el.Button, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -313,13 +270,6 @@ class Button(el.Button, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/callout.py b/reflex/components/radix/themes/components/callout.py index 04be5baa3..884f55905 100644 --- a/reflex/components/radix/themes/components/callout.py +++ b/reflex/components/radix/themes/components/callout.py @@ -8,7 +8,6 @@ from reflex.components.radix.themes.components.icons import Icon from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, RadixThemesComponent, ) @@ -16,7 +15,7 @@ from ..base import ( CalloutVariant = Literal["soft", "surface", "outline"] -class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent): +class CalloutRoot(el.Div, RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Callout.Root" @@ -37,13 +36,13 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent): high_contrast: Var[bool] -class CalloutIcon(el.Div, CommonMarginProps, RadixThemesComponent): +class CalloutIcon(el.Div, RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Callout.Icon" -class CalloutText(el.P, CommonMarginProps, RadixThemesComponent): +class CalloutText(el.P, RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Callout.Text" diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi index c9382a509..262816d37 100644 --- a/reflex/components/radix/themes/components/callout.pyi +++ b/reflex/components/radix/themes/components/callout.pyi @@ -13,11 +13,11 @@ from reflex import el from reflex.components.component import Component from reflex.components.radix.themes.components.icons import Icon from reflex.vars import Var -from ..base import CommonMarginProps, LiteralAccentColor, RadixThemesComponent +from ..base import LiteralAccentColor, RadixThemesComponent CalloutVariant = Literal["soft", "surface", "outline"] -class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent): +class CalloutRoot(el.Div, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -140,48 +140,6 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -265,13 +223,6 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -285,7 +236,7 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent): """ ... -class CalloutIcon(el.Div, CommonMarginProps, RadixThemesComponent): +class CalloutIcon(el.Div, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -397,48 +348,6 @@ class CalloutIcon(el.Div, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -518,13 +427,6 @@ class CalloutIcon(el.Div, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -538,7 +440,7 @@ class CalloutIcon(el.Div, CommonMarginProps, RadixThemesComponent): """ ... -class CalloutText(el.P, CommonMarginProps, RadixThemesComponent): +class CalloutText(el.P, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -650,48 +552,6 @@ class CalloutText(el.P, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -771,13 +631,6 @@ class CalloutText(el.P, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -915,48 +768,6 @@ class Callout(CalloutRoot): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1038,13 +849,6 @@ class Callout(CalloutRoot): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/card.py b/reflex/components/radix/themes/components/card.py index af1951875..068004b3a 100644 --- a/reflex/components/radix/themes/components/card.py +++ b/reflex/components/radix/themes/components/card.py @@ -5,12 +5,11 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, RadixThemesComponent, ) -class Card(el.Div, CommonMarginProps, RadixThemesComponent): +class Card(el.Div, RadixThemesComponent): """Container that groups related content and actions.""" tag = "Card" diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi index 0d9e69e26..0c6457ff8 100644 --- a/reflex/components/radix/themes/components/card.pyi +++ b/reflex/components/radix/themes/components/card.pyi @@ -10,9 +10,9 @@ from reflex.style import Style from typing import Literal from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class Card(el.Div, CommonMarginProps, RadixThemesComponent): +class Card(el.Div, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -136,48 +136,6 @@ class Card(el.Div, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -260,13 +218,6 @@ class Card(el.Div, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/checkbox.py b/reflex/components/radix/themes/components/checkbox.py index cff50e8f2..97a69be00 100644 --- a/reflex/components/radix/themes/components/checkbox.py +++ b/reflex/components/radix/themes/components/checkbox.py @@ -7,7 +7,6 @@ from reflex.components.radix.themes.typography.text import Text from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralSize, LiteralVariant, @@ -17,7 +16,7 @@ from ..base import ( LiteralCheckboxSize = Literal["1", "2", "3"] -class Checkbox(CommonMarginProps, RadixThemesComponent): +class Checkbox(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Checkbox" diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi index 8010a705b..c6d17a650 100644 --- a/reflex/components/radix/themes/components/checkbox.pyi +++ b/reflex/components/radix/themes/components/checkbox.pyi @@ -12,17 +12,11 @@ from reflex.components.component import Component from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.vars import Var -from ..base import ( - CommonMarginProps, - LiteralAccentColor, - LiteralSize, - LiteralVariant, - RadixThemesComponent, -) +from ..base import LiteralAccentColor, LiteralSize, LiteralVariant, RadixThemesComponent LiteralCheckboxSize = Literal["1", "2", "3"] -class Checkbox(CommonMarginProps, RadixThemesComponent): +class Checkbox(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -109,48 +103,6 @@ class Checkbox(CommonMarginProps, RadixThemesComponent): required: Optional[Union[Var[bool], bool]] = None, name: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -226,13 +178,6 @@ class Checkbox(CommonMarginProps, RadixThemesComponent): required: Whether the checkbox is required name: The name of the checkbox control when submitting the form. value: The value of the checkbox control when submitting the form. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -338,48 +283,6 @@ class HighLevelCheckbox(Checkbox): required: Optional[Union[Var[bool], bool]] = None, name: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -453,13 +356,6 @@ class HighLevelCheckbox(Checkbox): required: Whether the checkbox is required name: The name of the checkbox control when submitting the form. value: The value of the checkbox control when submitting the form. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/contextmenu.py b/reflex/components/radix/themes/components/contextmenu.py index 41e5d1bf4..0eb67a72d 100644 --- a/reflex/components/radix/themes/components/contextmenu.py +++ b/reflex/components/radix/themes/components/contextmenu.py @@ -4,13 +4,12 @@ from typing import Any, Dict, Literal from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, RadixThemesComponent, ) -class ContextMenuRoot(CommonMarginProps, RadixThemesComponent): +class ContextMenuRoot(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "ContextMenu.Root" @@ -30,7 +29,7 @@ class ContextMenuRoot(CommonMarginProps, RadixThemesComponent): } -class ContextMenuTrigger(CommonMarginProps, RadixThemesComponent): +class ContextMenuTrigger(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "ContextMenu.Trigger" @@ -39,7 +38,7 @@ class ContextMenuTrigger(CommonMarginProps, RadixThemesComponent): disabled: Var[bool] -class ContextMenuContent(CommonMarginProps, RadixThemesComponent): +class ContextMenuContent(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "ContextMenu.Content" @@ -78,13 +77,13 @@ class ContextMenuContent(CommonMarginProps, RadixThemesComponent): } -class ContextMenuSub(CommonMarginProps, RadixThemesComponent): +class ContextMenuSub(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "ContextMenu.Sub" -class ContextMenuSubTrigger(CommonMarginProps, RadixThemesComponent): +class ContextMenuSubTrigger(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "ContextMenu.SubTrigger" @@ -93,7 +92,7 @@ class ContextMenuSubTrigger(CommonMarginProps, RadixThemesComponent): disabled: Var[bool] -class ContextMenuSubContent(CommonMarginProps, RadixThemesComponent): +class ContextMenuSubContent(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "ContextMenu.SubContent" @@ -116,7 +115,7 @@ class ContextMenuSubContent(CommonMarginProps, RadixThemesComponent): } -class ContextMenuItem(CommonMarginProps, RadixThemesComponent): +class ContextMenuItem(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "ContextMenu.Item" @@ -128,7 +127,7 @@ class ContextMenuItem(CommonMarginProps, RadixThemesComponent): shortcut: Var[str] -class ContextMenuSeparator(CommonMarginProps, RadixThemesComponent): +class ContextMenuSeparator(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "ContextMenu.Separator" diff --git a/reflex/components/radix/themes/components/contextmenu.pyi b/reflex/components/radix/themes/components/contextmenu.pyi index 24b89f1ca..3b346da51 100644 --- a/reflex/components/radix/themes/components/contextmenu.pyi +++ b/reflex/components/radix/themes/components/contextmenu.pyi @@ -9,9 +9,9 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Any, Dict, Literal from reflex.vars import Var -from ..base import CommonMarginProps, LiteralAccentColor, RadixThemesComponent +from ..base import LiteralAccentColor, RadixThemesComponent -class ContextMenuRoot(CommonMarginProps, RadixThemesComponent): +class ContextMenuRoot(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -82,48 +82,6 @@ class ContextMenuRoot(CommonMarginProps, RadixThemesComponent): ] ] = None, modal: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -190,13 +148,6 @@ class ContextMenuRoot(CommonMarginProps, RadixThemesComponent): 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" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -210,7 +161,7 @@ class ContextMenuRoot(CommonMarginProps, RadixThemesComponent): """ ... -class ContextMenuTrigger(CommonMarginProps, RadixThemesComponent): +class ContextMenuTrigger(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -280,48 +231,6 @@ class ContextMenuTrigger(CommonMarginProps, RadixThemesComponent): ] ] = None, disabled: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -385,13 +294,6 @@ class ContextMenuTrigger(CommonMarginProps, RadixThemesComponent): 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" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -405,7 +307,7 @@ class ContextMenuTrigger(CommonMarginProps, RadixThemesComponent): """ ... -class ContextMenuContent(CommonMarginProps, RadixThemesComponent): +class ContextMenuContent(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -482,48 +384,6 @@ class ContextMenuContent(CommonMarginProps, RadixThemesComponent): high_contrast: Optional[Union[Var[bool], bool]] = None, align_offset: Optional[Union[Var[int], int]] = None, avoid_collisions: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -606,13 +466,6 @@ class ContextMenuContent(CommonMarginProps, RadixThemesComponent): 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. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -626,7 +479,7 @@ class ContextMenuContent(CommonMarginProps, RadixThemesComponent): """ ... -class ContextMenuSub(CommonMarginProps, RadixThemesComponent): +class ContextMenuSub(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -695,48 +548,6 @@ class ContextMenuSub(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -799,13 +610,6 @@ class ContextMenuSub(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -819,7 +623,7 @@ class ContextMenuSub(CommonMarginProps, RadixThemesComponent): """ ... -class ContextMenuSubTrigger(CommonMarginProps, RadixThemesComponent): +class ContextMenuSubTrigger(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -889,48 +693,6 @@ class ContextMenuSubTrigger(CommonMarginProps, RadixThemesComponent): ] ] = None, disabled: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -994,13 +756,6 @@ class ContextMenuSubTrigger(CommonMarginProps, RadixThemesComponent): 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" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1014,7 +769,7 @@ class ContextMenuSubTrigger(CommonMarginProps, RadixThemesComponent): """ ... -class ContextMenuSubContent(CommonMarginProps, RadixThemesComponent): +class ContextMenuSubContent(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -1085,48 +840,6 @@ class ContextMenuSubContent(CommonMarginProps, RadixThemesComponent): ] ] = None, loop: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1202,13 +915,6 @@ class ContextMenuSubContent(CommonMarginProps, RadixThemesComponent): 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" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1222,7 +928,7 @@ class ContextMenuSubContent(CommonMarginProps, RadixThemesComponent): """ ... -class ContextMenuItem(CommonMarginProps, RadixThemesComponent): +class ContextMenuItem(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1292,48 +998,6 @@ class ContextMenuItem(CommonMarginProps, RadixThemesComponent): ] ] = None, shortcut: Optional[Union[Var[str], str]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1397,13 +1061,6 @@ class ContextMenuItem(CommonMarginProps, RadixThemesComponent): 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" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1417,7 +1074,7 @@ class ContextMenuItem(CommonMarginProps, RadixThemesComponent): """ ... -class ContextMenuSeparator(CommonMarginProps, RadixThemesComponent): +class ContextMenuSeparator(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1486,48 +1143,6 @@ class ContextMenuSeparator(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1590,13 +1205,6 @@ class ContextMenuSeparator(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/dialog.py b/reflex/components/radix/themes/components/dialog.py index 0602831b7..8cb3ef4ec 100644 --- a/reflex/components/radix/themes/components/dialog.py +++ b/reflex/components/radix/themes/components/dialog.py @@ -5,12 +5,11 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, RadixThemesComponent, ) -class DialogRoot(CommonMarginProps, RadixThemesComponent): +class DialogRoot(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Dialog.Root" @@ -30,19 +29,19 @@ class DialogRoot(CommonMarginProps, RadixThemesComponent): } -class DialogTrigger(CommonMarginProps, RadixThemesComponent): +class DialogTrigger(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Dialog.Trigger" -class DialogTitle(CommonMarginProps, RadixThemesComponent): +class DialogTitle(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Dialog.Title" -class DialogContent(el.Div, CommonMarginProps, RadixThemesComponent): +class DialogContent(el.Div, RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Dialog.Content" @@ -66,13 +65,13 @@ class DialogContent(el.Div, CommonMarginProps, RadixThemesComponent): } -class DialogDescription(CommonMarginProps, RadixThemesComponent): +class DialogDescription(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Dialog.Description" -class DialogClose(CommonMarginProps, RadixThemesComponent): +class DialogClose(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Dialog.Close" diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi index f3e8e9ad3..c0b7d38ed 100644 --- a/reflex/components/radix/themes/components/dialog.pyi +++ b/reflex/components/radix/themes/components/dialog.pyi @@ -10,9 +10,9 @@ from reflex.style import Style from typing import Any, Dict, Literal from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class DialogRoot(CommonMarginProps, RadixThemesComponent): +class DialogRoot(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -83,48 +83,6 @@ class DialogRoot(CommonMarginProps, RadixThemesComponent): ] ] = None, open: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -191,13 +149,6 @@ class DialogRoot(CommonMarginProps, RadixThemesComponent): 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" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -211,7 +162,7 @@ class DialogRoot(CommonMarginProps, RadixThemesComponent): """ ... -class DialogTrigger(CommonMarginProps, RadixThemesComponent): +class DialogTrigger(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -280,48 +231,6 @@ class DialogTrigger(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -384,13 +293,6 @@ class DialogTrigger(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -404,7 +306,7 @@ class DialogTrigger(CommonMarginProps, RadixThemesComponent): """ ... -class DialogTitle(CommonMarginProps, RadixThemesComponent): +class DialogTitle(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -473,48 +375,6 @@ class DialogTitle(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -577,13 +437,6 @@ class DialogTitle(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -597,7 +450,7 @@ class DialogTitle(CommonMarginProps, RadixThemesComponent): """ ... -class DialogContent(el.Div, CommonMarginProps, RadixThemesComponent): +class DialogContent(el.Div, RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -711,48 +564,6 @@ class DialogContent(el.Div, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -848,13 +659,6 @@ class DialogContent(el.Div, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -868,7 +672,7 @@ class DialogContent(el.Div, CommonMarginProps, RadixThemesComponent): """ ... -class DialogDescription(CommonMarginProps, RadixThemesComponent): +class DialogDescription(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -937,48 +741,6 @@ class DialogDescription(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1041,13 +803,6 @@ class DialogDescription(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1061,7 +816,7 @@ class DialogDescription(CommonMarginProps, RadixThemesComponent): """ ... -class DialogClose(CommonMarginProps, RadixThemesComponent): +class DialogClose(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1130,48 +885,6 @@ class DialogClose(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1234,13 +947,6 @@ class DialogClose(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/dropdownmenu.py b/reflex/components/radix/themes/components/dropdownmenu.py index 3a4c87bc3..92fa410f3 100644 --- a/reflex/components/radix/themes/components/dropdownmenu.py +++ b/reflex/components/radix/themes/components/dropdownmenu.py @@ -4,13 +4,12 @@ from typing import Any, Dict, Literal from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, RadixThemesComponent, ) -class DropdownMenuRoot(CommonMarginProps, RadixThemesComponent): +class DropdownMenuRoot(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "DropdownMenu.Root" @@ -33,13 +32,13 @@ class DropdownMenuRoot(CommonMarginProps, RadixThemesComponent): } -class DropdownMenuTrigger(CommonMarginProps, RadixThemesComponent): +class DropdownMenuTrigger(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "DropdownMenu.Trigger" -class DropdownMenuContent(CommonMarginProps, RadixThemesComponent): +class DropdownMenuContent(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "DropdownMenu.Content" @@ -59,19 +58,19 @@ class DropdownMenuContent(CommonMarginProps, RadixThemesComponent): } -class DropdownMenuSubTrigger(CommonMarginProps, RadixThemesComponent): +class DropdownMenuSubTrigger(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "DropdownMenu.SubTrigger" -class DropdownMenuSub(CommonMarginProps, RadixThemesComponent): +class DropdownMenuSub(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "DropdownMenu.Sub" -class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent): +class DropdownMenuSubContent(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "DropdownMenu.SubContent" @@ -89,7 +88,7 @@ class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent): high_contrast: Var[bool] -class DropdownMenuItem(CommonMarginProps, RadixThemesComponent): +class DropdownMenuItem(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "DropdownMenu.Item" @@ -101,7 +100,7 @@ class DropdownMenuItem(CommonMarginProps, RadixThemesComponent): shortcut: Var[str] -class DropdownMenuSeparator(CommonMarginProps, RadixThemesComponent): +class DropdownMenuSeparator(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "DropdownMenu.Separator" diff --git a/reflex/components/radix/themes/components/dropdownmenu.pyi b/reflex/components/radix/themes/components/dropdownmenu.pyi index d59815f18..d97301515 100644 --- a/reflex/components/radix/themes/components/dropdownmenu.pyi +++ b/reflex/components/radix/themes/components/dropdownmenu.pyi @@ -9,9 +9,9 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Any, Dict, Literal from reflex.vars import Var -from ..base import CommonMarginProps, LiteralAccentColor, RadixThemesComponent +from ..base import LiteralAccentColor, RadixThemesComponent -class DropdownMenuRoot(CommonMarginProps, RadixThemesComponent): +class DropdownMenuRoot(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -83,48 +83,6 @@ class DropdownMenuRoot(CommonMarginProps, RadixThemesComponent): ] = None, open: Optional[Union[Var[bool], bool]] = None, modal: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -192,13 +150,6 @@ class DropdownMenuRoot(CommonMarginProps, RadixThemesComponent): 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" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -212,7 +163,7 @@ class DropdownMenuRoot(CommonMarginProps, RadixThemesComponent): """ ... -class DropdownMenuTrigger(CommonMarginProps, RadixThemesComponent): +class DropdownMenuTrigger(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -281,48 +232,6 @@ class DropdownMenuTrigger(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -385,13 +294,6 @@ class DropdownMenuTrigger(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -405,7 +307,7 @@ class DropdownMenuTrigger(CommonMarginProps, RadixThemesComponent): """ ... -class DropdownMenuContent(CommonMarginProps, RadixThemesComponent): +class DropdownMenuContent(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -475,48 +377,6 @@ class DropdownMenuContent(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -591,13 +451,6 @@ class DropdownMenuContent(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -611,7 +464,7 @@ class DropdownMenuContent(CommonMarginProps, RadixThemesComponent): """ ... -class DropdownMenuSubTrigger(CommonMarginProps, RadixThemesComponent): +class DropdownMenuSubTrigger(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -680,48 +533,6 @@ class DropdownMenuSubTrigger(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -784,13 +595,6 @@ class DropdownMenuSubTrigger(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -804,7 +608,7 @@ class DropdownMenuSubTrigger(CommonMarginProps, RadixThemesComponent): """ ... -class DropdownMenuSub(CommonMarginProps, RadixThemesComponent): +class DropdownMenuSub(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -873,48 +677,6 @@ class DropdownMenuSub(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -977,13 +739,6 @@ class DropdownMenuSub(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -997,7 +752,7 @@ class DropdownMenuSub(CommonMarginProps, RadixThemesComponent): """ ... -class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent): +class DropdownMenuSubContent(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1071,48 +826,6 @@ class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent): Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1178,13 +891,6 @@ class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent): size: Button size "1" - "4" variant: Variant of button: "solid" | "soft" | "outline" | "ghost" high_contrast: Whether to render the button with higher contrast color against background - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1198,7 +904,7 @@ class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent): """ ... -class DropdownMenuItem(CommonMarginProps, RadixThemesComponent): +class DropdownMenuItem(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1268,48 +974,6 @@ class DropdownMenuItem(CommonMarginProps, RadixThemesComponent): ] ] = None, shortcut: Optional[Union[Var[str], str]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1373,13 +1037,6 @@ class DropdownMenuItem(CommonMarginProps, RadixThemesComponent): 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" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1393,7 +1050,7 @@ class DropdownMenuItem(CommonMarginProps, RadixThemesComponent): """ ... -class DropdownMenuSeparator(CommonMarginProps, RadixThemesComponent): +class DropdownMenuSeparator(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1462,48 +1119,6 @@ class DropdownMenuSeparator(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1566,13 +1181,6 @@ class DropdownMenuSeparator(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/hovercard.py b/reflex/components/radix/themes/components/hovercard.py index e3af01bf4..c16c03024 100644 --- a/reflex/components/radix/themes/components/hovercard.py +++ b/reflex/components/radix/themes/components/hovercard.py @@ -5,12 +5,11 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, RadixThemesComponent, ) -class HoverCardRoot(CommonMarginProps, RadixThemesComponent): +class HoverCardRoot(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "HoverCard.Root" @@ -39,13 +38,13 @@ class HoverCardRoot(CommonMarginProps, RadixThemesComponent): } -class HoverCardTrigger(CommonMarginProps, RadixThemesComponent): +class HoverCardTrigger(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "HoverCard.Trigger" -class HoverCardContent(el.Div, CommonMarginProps, RadixThemesComponent): +class HoverCardContent(el.Div, RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "HoverCard.Content" diff --git a/reflex/components/radix/themes/components/hovercard.pyi b/reflex/components/radix/themes/components/hovercard.pyi index b369f2f4b..962118ac5 100644 --- a/reflex/components/radix/themes/components/hovercard.pyi +++ b/reflex/components/radix/themes/components/hovercard.pyi @@ -10,9 +10,9 @@ from reflex.style import Style from typing import Any, Dict, Literal from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class HoverCardRoot(CommonMarginProps, RadixThemesComponent): +class HoverCardRoot(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -86,48 +86,6 @@ class HoverCardRoot(CommonMarginProps, RadixThemesComponent): open: Optional[Union[Var[bool], bool]] = None, open_delay: Optional[Union[Var[int], int]] = None, close_delay: Optional[Union[Var[int], int]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -197,13 +155,6 @@ class HoverCardRoot(CommonMarginProps, RadixThemesComponent): 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. close_delay: The duration from when the mouse leaves the trigger until the hover card closes. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -217,7 +168,7 @@ class HoverCardRoot(CommonMarginProps, RadixThemesComponent): """ ... -class HoverCardTrigger(CommonMarginProps, RadixThemesComponent): +class HoverCardTrigger(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -286,48 +237,6 @@ class HoverCardTrigger(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -390,13 +299,6 @@ class HoverCardTrigger(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -410,7 +312,7 @@ class HoverCardTrigger(CommonMarginProps, RadixThemesComponent): """ ... -class HoverCardContent(el.Div, CommonMarginProps, RadixThemesComponent): +class HoverCardContent(el.Div, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -536,48 +438,6 @@ class HoverCardContent(el.Div, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -661,13 +521,6 @@ class HoverCardContent(el.Div, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/iconbutton.py b/reflex/components/radix/themes/components/iconbutton.py index b8209c2ba..43b990167 100644 --- a/reflex/components/radix/themes/components/iconbutton.py +++ b/reflex/components/radix/themes/components/iconbutton.py @@ -5,7 +5,6 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, LiteralVariant, @@ -15,7 +14,7 @@ from ..base import ( LiteralButtonSize = Literal["1", "2", "3", "4"] -class IconButton(el.Button, CommonMarginProps, RadixThemesComponent): +class IconButton(el.Button, RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Button" diff --git a/reflex/components/radix/themes/components/iconbutton.pyi b/reflex/components/radix/themes/components/iconbutton.pyi index 0a48d6a8a..1f512ca17 100644 --- a/reflex/components/radix/themes/components/iconbutton.pyi +++ b/reflex/components/radix/themes/components/iconbutton.pyi @@ -11,7 +11,6 @@ from typing import Literal from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, LiteralVariant, @@ -20,7 +19,7 @@ from ..base import ( LiteralButtonSize = Literal["1", "2", "3", "4"] -class IconButton(el.Button, CommonMarginProps, RadixThemesComponent): +class IconButton(el.Button, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -176,48 +175,6 @@ class IconButton(el.Button, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -313,13 +270,6 @@ class IconButton(el.Button, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/inset.py b/reflex/components/radix/themes/components/inset.py index 4c8a7ffe4..572609bd1 100644 --- a/reflex/components/radix/themes/components/inset.py +++ b/reflex/components/radix/themes/components/inset.py @@ -5,14 +5,13 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, RadixThemesComponent, ) LiteralButtonSize = Literal["1", "2", "3", "4"] -class Inset(el.Div, CommonMarginProps, RadixThemesComponent): +class Inset(el.Div, RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Inset" diff --git a/reflex/components/radix/themes/components/inset.pyi b/reflex/components/radix/themes/components/inset.pyi index d74a6e405..9c6ae4a36 100644 --- a/reflex/components/radix/themes/components/inset.pyi +++ b/reflex/components/radix/themes/components/inset.pyi @@ -10,11 +10,11 @@ from reflex.style import Style from typing import Literal, Union from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent LiteralButtonSize = Literal["1", "2", "3", "4"] -class Inset(el.Div, CommonMarginProps, RadixThemesComponent): +class Inset(el.Div, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -145,48 +145,6 @@ class Inset(el.Div, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -275,13 +233,6 @@ class Inset(el.Div, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/popover.py b/reflex/components/radix/themes/components/popover.py index e22fb95b5..fa8ce6b59 100644 --- a/reflex/components/radix/themes/components/popover.py +++ b/reflex/components/radix/themes/components/popover.py @@ -5,12 +5,11 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, RadixThemesComponent, ) -class PopoverRoot(CommonMarginProps, RadixThemesComponent): +class PopoverRoot(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Popover.Root" @@ -33,13 +32,13 @@ class PopoverRoot(CommonMarginProps, RadixThemesComponent): } -class PopoverTrigger(CommonMarginProps, RadixThemesComponent): +class PopoverTrigger(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Popover.Trigger" -class PopoverContent(el.Div, CommonMarginProps, RadixThemesComponent): +class PopoverContent(el.Div, RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Popover.Content" @@ -79,7 +78,7 @@ class PopoverContent(el.Div, CommonMarginProps, RadixThemesComponent): } -class PopoverClose(CommonMarginProps, RadixThemesComponent): +class PopoverClose(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Popover.Close" diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi index 243bb9bee..d90f3f046 100644 --- a/reflex/components/radix/themes/components/popover.pyi +++ b/reflex/components/radix/themes/components/popover.pyi @@ -10,9 +10,9 @@ from reflex.style import Style from typing import Any, Dict, Literal from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class PopoverRoot(CommonMarginProps, RadixThemesComponent): +class PopoverRoot(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -84,48 +84,6 @@ class PopoverRoot(CommonMarginProps, RadixThemesComponent): ] = None, open: Optional[Union[Var[bool], bool]] = None, modal: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -193,13 +151,6 @@ class PopoverRoot(CommonMarginProps, RadixThemesComponent): 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" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -213,7 +164,7 @@ class PopoverRoot(CommonMarginProps, RadixThemesComponent): """ ... -class PopoverTrigger(CommonMarginProps, RadixThemesComponent): +class PopoverTrigger(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -282,48 +233,6 @@ class PopoverTrigger(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -386,13 +295,6 @@ class PopoverTrigger(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -406,7 +308,7 @@ class PopoverTrigger(CommonMarginProps, RadixThemesComponent): """ ... -class PopoverContent(el.Div, CommonMarginProps, RadixThemesComponent): +class PopoverContent(el.Div, RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -535,48 +437,6 @@ class PopoverContent(el.Div, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -680,13 +540,6 @@ class PopoverContent(el.Div, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -700,7 +553,7 @@ class PopoverContent(el.Div, CommonMarginProps, RadixThemesComponent): """ ... -class PopoverClose(CommonMarginProps, RadixThemesComponent): +class PopoverClose(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -769,48 +622,6 @@ class PopoverClose(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -873,13 +684,6 @@ class PopoverClose(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/radiogroup.py b/reflex/components/radix/themes/components/radiogroup.py index a00c2b4d1..01ceca188 100644 --- a/reflex/components/radix/themes/components/radiogroup.py +++ b/reflex/components/radix/themes/components/radiogroup.py @@ -8,7 +8,6 @@ from reflex.components.radix.themes.typography.text import Text from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralSize, RadixThemesComponent, @@ -17,7 +16,7 @@ from ..base import ( LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"] -class RadioGroupRoot(CommonMarginProps, RadixThemesComponent): +class RadioGroupRoot(RadixThemesComponent): """A set of interactive radio buttons where only one can be selected at a time.""" tag = "RadioGroup.Root" @@ -67,7 +66,7 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent): } -class RadioGroupItem(CommonMarginProps, RadixThemesComponent): +class RadioGroupItem(RadixThemesComponent): """An item in the group that can be checked.""" tag = "RadioGroup.Item" diff --git a/reflex/components/radix/themes/components/radiogroup.pyi b/reflex/components/radix/themes/components/radiogroup.pyi index 287b7ca31..1f3b4075b 100644 --- a/reflex/components/radix/themes/components/radiogroup.pyi +++ b/reflex/components/radix/themes/components/radiogroup.pyi @@ -13,16 +13,11 @@ from reflex.components.component import Component from reflex.components.radix.themes.layout.flex import Flex from reflex.components.radix.themes.typography.text import Text from reflex.vars import Var -from ..base import ( - CommonMarginProps, - LiteralAccentColor, - LiteralSize, - RadixThemesComponent, -) +from ..base import LiteralAccentColor, LiteralSize, RadixThemesComponent LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"] -class RadioGroupRoot(CommonMarginProps, RadixThemesComponent): +class RadioGroupRoot(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -114,48 +109,6 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent): ] ] = None, loop: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -231,13 +184,6 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent): required: Whether the radio group is required orientation: The orientation of the component. loop: When true, keyboard navigation will loop from last item to first, and vice versa. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -251,7 +197,7 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent): """ ... -class RadioGroupItem(CommonMarginProps, RadixThemesComponent): +class RadioGroupItem(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -323,48 +269,6 @@ class RadioGroupItem(CommonMarginProps, RadixThemesComponent): value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, required: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -430,13 +334,6 @@ class RadioGroupItem(CommonMarginProps, RadixThemesComponent): value: The value of the radio item to check. Should be used in conjunction with on_value_change. disabled: When true, prevents the user from interacting with the radio item. required: When true, indicates that the user must check the radio item before the owning form can be submitted. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -553,48 +450,6 @@ class HighLevelRadioGroup(RadioGroupRoot): ] ] = None, loop: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -669,13 +524,6 @@ class HighLevelRadioGroup(RadioGroupRoot): required: Whether the radio group is required orientation: The orientation of the component. loop: When true, keyboard navigation will loop from last item to first, and vice versa. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/scrollarea.py b/reflex/components/radix/themes/components/scrollarea.py index 783de70ec..77fa190ee 100644 --- a/reflex/components/radix/themes/components/scrollarea.py +++ b/reflex/components/radix/themes/components/scrollarea.py @@ -4,13 +4,12 @@ from typing import Literal from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralRadius, RadixThemesComponent, ) -class ScrollArea(CommonMarginProps, RadixThemesComponent): +class ScrollArea(RadixThemesComponent): """Custom styled, cross-browser scrollable area using native functionality.""" tag = "ScrollArea" diff --git a/reflex/components/radix/themes/components/scrollarea.pyi b/reflex/components/radix/themes/components/scrollarea.pyi index 8702afd9f..b51b35ca9 100644 --- a/reflex/components/radix/themes/components/scrollarea.pyi +++ b/reflex/components/radix/themes/components/scrollarea.pyi @@ -9,9 +9,9 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Literal from reflex.vars import Var -from ..base import CommonMarginProps, LiteralRadius, RadixThemesComponent +from ..base import LiteralRadius, RadixThemesComponent -class ScrollArea(CommonMarginProps, RadixThemesComponent): +class ScrollArea(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -100,48 +100,6 @@ class ScrollArea(CommonMarginProps, RadixThemesComponent): ] ] = None, scroll_hide_delay: Optional[Union[Var[int], int]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -209,13 +167,6 @@ class ScrollArea(CommonMarginProps, RadixThemesComponent): scrollbars: The alignment of the scroll area type_: Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars. "auto" | "always" | "scroll" | "hover" scroll_hide_delay: If type is set to either "scroll" or "hover", this prop determines the length of time, in milliseconds, before the scrollbars are hidden after the user stops interacting with scrollbars. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/select.py b/reflex/components/radix/themes/components/select.py index ff5db88a9..57388e625 100644 --- a/reflex/components/radix/themes/components/select.py +++ b/reflex/components/radix/themes/components/select.py @@ -6,7 +6,6 @@ from reflex.components.component import Component from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, RadixThemesComponent, @@ -15,7 +14,7 @@ from ..base import ( LiteralButtonSize = Literal[1, 2, 3, 4] -class SelectRoot(CommonMarginProps, RadixThemesComponent): +class SelectRoot(RadixThemesComponent): """Displays a list of options for the user to pick from, triggered by a button.""" tag = "Select.Root" @@ -57,7 +56,7 @@ class SelectRoot(CommonMarginProps, RadixThemesComponent): } -class SelectTrigger(CommonMarginProps, RadixThemesComponent): +class SelectTrigger(RadixThemesComponent): """The button that toggles the select.""" tag = "Select.Trigger" @@ -75,7 +74,7 @@ class SelectTrigger(CommonMarginProps, RadixThemesComponent): placeholder: Var[str] -class SelectContent(CommonMarginProps, RadixThemesComponent): +class SelectContent(RadixThemesComponent): """The component that pops out when the select is open.""" tag = "Select.Content" @@ -118,13 +117,13 @@ class SelectContent(CommonMarginProps, RadixThemesComponent): } -class SelectGroup(CommonMarginProps, RadixThemesComponent): +class SelectGroup(RadixThemesComponent): """Used to group multiple items.""" tag = "Select.Group" -class SelectItem(CommonMarginProps, RadixThemesComponent): +class SelectItem(RadixThemesComponent): """The component that contains the select items.""" tag = "Select.Item" @@ -136,13 +135,13 @@ class SelectItem(CommonMarginProps, RadixThemesComponent): disabled: Var[bool] -class SelectLabel(CommonMarginProps, RadixThemesComponent): +class SelectLabel(RadixThemesComponent): """Used to render the label of a group, it isn't focusable using arrow keys.""" tag = "Select.Label" -class SelectSeparator(CommonMarginProps, RadixThemesComponent): +class SelectSeparator(RadixThemesComponent): """Used to visually separate items in the Select.""" tag = "Select.Separator" diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi index a2704bcdc..d13d675d2 100644 --- a/reflex/components/radix/themes/components/select.pyi +++ b/reflex/components/radix/themes/components/select.pyi @@ -11,16 +11,11 @@ from typing import Any, Dict, List, Literal, Union import reflex as rx from reflex.components.component import Component from reflex.vars import Var -from ..base import ( - CommonMarginProps, - LiteralAccentColor, - LiteralRadius, - RadixThemesComponent, -) +from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent LiteralButtonSize = Literal[1, 2, 3, 4] -class SelectRoot(CommonMarginProps, RadixThemesComponent): +class SelectRoot(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -100,48 +95,6 @@ class SelectRoot(CommonMarginProps, RadixThemesComponent): name: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, required: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -218,13 +171,6 @@ class SelectRoot(CommonMarginProps, RadixThemesComponent): name: The name of the select control when submitting the form. disabled: When True, prevents the user from interacting with select. required: When True, indicates that the user must select a value before the owning form can be submitted. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -238,7 +184,7 @@ class SelectRoot(CommonMarginProps, RadixThemesComponent): """ ... -class SelectTrigger(CommonMarginProps, RadixThemesComponent): +class SelectTrigger(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -320,48 +266,6 @@ class SelectTrigger(CommonMarginProps, RadixThemesComponent): ] ] = None, placeholder: Optional[Union[Var[str], str]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -427,13 +331,6 @@ class SelectTrigger(CommonMarginProps, RadixThemesComponent): variant: Variant of the select trigger radius: The radius of the select trigger placeholder: The placeholder of the select trigger - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -447,7 +344,7 @@ class SelectTrigger(CommonMarginProps, RadixThemesComponent): """ ... -class SelectContent(CommonMarginProps, RadixThemesComponent): +class SelectContent(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -541,48 +438,6 @@ class SelectContent(CommonMarginProps, RadixThemesComponent): ] ] = None, align_offset: Optional[Union[Var[int], int]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -661,13 +516,6 @@ class SelectContent(CommonMarginProps, RadixThemesComponent): side_offset: The distance in pixels from the anchor. Only available when position is set to popper. align: The preferred alignment against the anchor. May change when collisions occur. Only available when position is set to popper. align_offset: The vertical distance in pixels from the anchor. Only available when position is set to popper. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -681,7 +529,7 @@ class SelectContent(CommonMarginProps, RadixThemesComponent): """ ... -class SelectGroup(CommonMarginProps, RadixThemesComponent): +class SelectGroup(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -750,48 +598,6 @@ class SelectGroup(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -854,13 +660,6 @@ class SelectGroup(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -874,7 +673,7 @@ class SelectGroup(CommonMarginProps, RadixThemesComponent): """ ... -class SelectItem(CommonMarginProps, RadixThemesComponent): +class SelectItem(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -945,48 +744,6 @@ class SelectItem(CommonMarginProps, RadixThemesComponent): ] = None, value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1051,13 +808,6 @@ class SelectItem(CommonMarginProps, RadixThemesComponent): color_scheme: map to radix color property. value: The value given as data when submitting a form with a name. disabled: Whether the select item is disabled - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1071,7 +821,7 @@ class SelectItem(CommonMarginProps, RadixThemesComponent): """ ... -class SelectLabel(CommonMarginProps, RadixThemesComponent): +class SelectLabel(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1140,48 +890,6 @@ class SelectLabel(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1244,13 +952,6 @@ class SelectLabel(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1264,7 +965,7 @@ class SelectLabel(CommonMarginProps, RadixThemesComponent): """ ... -class SelectSeparator(CommonMarginProps, RadixThemesComponent): +class SelectSeparator(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1333,48 +1034,6 @@ class SelectSeparator(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1437,13 +1096,6 @@ class SelectSeparator(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1552,48 +1204,6 @@ class HighLevelSelect(SelectRoot): name: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, required: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1673,13 +1283,6 @@ class HighLevelSelect(SelectRoot): name: The name of the select control when submitting the form. disabled: When True, prevents the user from interacting with select. required: When True, indicates that the user must select a value before the owning form can be submitted. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/separator.py b/reflex/components/radix/themes/components/separator.py index a2f6e5a23..80d369f04 100644 --- a/reflex/components/radix/themes/components/separator.py +++ b/reflex/components/radix/themes/components/separator.py @@ -4,7 +4,6 @@ from typing import Literal from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, RadixThemesComponent, ) @@ -12,7 +11,7 @@ from ..base import ( LiteralSeperatorSize = Literal["1", "2", "3", "4"] -class Separator(CommonMarginProps, RadixThemesComponent): +class Separator(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Separator" diff --git a/reflex/components/radix/themes/components/separator.pyi b/reflex/components/radix/themes/components/separator.pyi index 7164233a4..680cc13cf 100644 --- a/reflex/components/radix/themes/components/separator.pyi +++ b/reflex/components/radix/themes/components/separator.pyi @@ -9,11 +9,11 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Literal from reflex.vars import Var -from ..base import CommonMarginProps, LiteralAccentColor, RadixThemesComponent +from ..base import LiteralAccentColor, RadixThemesComponent LiteralSeperatorSize = Literal["1", "2", "3", "4"] -class Separator(CommonMarginProps, RadixThemesComponent): +class Separator(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -92,48 +92,6 @@ class Separator(CommonMarginProps, RadixThemesComponent): ] ] = None, decorative: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -199,13 +157,6 @@ class Separator(CommonMarginProps, RadixThemesComponent): size: The size of the select: "1" | "2" | "3" | "4" 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" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/slider.py b/reflex/components/radix/themes/components/slider.py index e2a411935..e8cda4b6d 100644 --- a/reflex/components/radix/themes/components/slider.py +++ b/reflex/components/radix/themes/components/slider.py @@ -4,14 +4,13 @@ from typing import Any, Dict, List, Literal, Union from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, RadixThemesComponent, ) -class Slider(CommonMarginProps, RadixThemesComponent): +class Slider(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Slider" diff --git a/reflex/components/radix/themes/components/slider.pyi b/reflex/components/radix/themes/components/slider.pyi index 4a3f2bd80..6564834a4 100644 --- a/reflex/components/radix/themes/components/slider.pyi +++ b/reflex/components/radix/themes/components/slider.pyi @@ -9,14 +9,9 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Any, Dict, List, Literal, Union from reflex.vars import Var -from ..base import ( - CommonMarginProps, - LiteralAccentColor, - LiteralRadius, - RadixThemesComponent, -) +from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent -class Slider(CommonMarginProps, RadixThemesComponent): +class Slider(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -120,48 +115,6 @@ class Slider(CommonMarginProps, RadixThemesComponent): Literal["horizontal", "vertical"], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -243,13 +196,6 @@ class Slider(CommonMarginProps, RadixThemesComponent): step: The step value of the slider. disabled: Whether the slider is disabled orientation: The orientation of the slider. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/switch.py b/reflex/components/radix/themes/components/switch.py index ed7cc605c..dc5132ce1 100644 --- a/reflex/components/radix/themes/components/switch.py +++ b/reflex/components/radix/themes/components/switch.py @@ -5,7 +5,6 @@ from reflex.constants import EventTriggers from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, LiteralVariant, @@ -15,7 +14,7 @@ from ..base import ( LiteralSwitchSize = Literal["1", "2", "3", "4"] -class Switch(CommonMarginProps, RadixThemesComponent): +class Switch(RadixThemesComponent): """A toggle switch alternative to the checkbox.""" tag = "Switch" diff --git a/reflex/components/radix/themes/components/switch.pyi b/reflex/components/radix/themes/components/switch.pyi index 4072bcd5a..3414c5078 100644 --- a/reflex/components/radix/themes/components/switch.pyi +++ b/reflex/components/radix/themes/components/switch.pyi @@ -11,7 +11,6 @@ from typing import Any, Dict, Literal from reflex.constants import EventTriggers from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, LiteralVariant, @@ -20,7 +19,7 @@ from ..base import ( LiteralSwitchSize = Literal["1", "2", "3", "4"] -class Switch(CommonMarginProps, RadixThemesComponent): +class Switch(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -113,48 +112,6 @@ class Switch(CommonMarginProps, RadixThemesComponent): Literal["none", "small", "medium", "large", "full"], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -231,13 +188,6 @@ class Switch(CommonMarginProps, RadixThemesComponent): variant: Variant of switch: "solid" | "soft" | "outline" | "ghost" 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" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/table.py b/reflex/components/radix/themes/components/table.py index deec08d29..4f67a2a2c 100644 --- a/reflex/components/radix/themes/components/table.py +++ b/reflex/components/radix/themes/components/table.py @@ -5,12 +5,11 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, RadixThemesComponent, ) -class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent): +class TableRoot(el.Table, RadixThemesComponent): """A semantic table for presenting tabular data.""" tag = "Table.Root" @@ -22,13 +21,13 @@ class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent): variant: Var[Literal["surface", "ghost"]] -class TableHeader(el.Thead, CommonMarginProps, RadixThemesComponent): +class TableHeader(el.Thead, RadixThemesComponent): """The header of the table defines column names and other non-data elements.""" tag = "Table.Header" -class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent): +class TableRow(el.Tr, RadixThemesComponent): """A row containing table cells.""" tag = "Table.Row" @@ -37,7 +36,7 @@ class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent): align: Var[Literal["start", "center", "end", "baseline"]] -class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): +class TableColumnHeaderCell(el.Th, RadixThemesComponent): """A table cell that is semantically treated as a column header.""" tag = "Table.ColumnHeaderCell" @@ -49,13 +48,13 @@ class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): width: Var[Union[str, int]] -class TableBody(el.Tbody, CommonMarginProps, RadixThemesComponent): +class TableBody(el.Tbody, RadixThemesComponent): """The body of the table contains the data rows.""" tag = "Table.Body" -class TableCell(el.Td, CommonMarginProps, RadixThemesComponent): +class TableCell(el.Td, RadixThemesComponent): """A cell containing data.""" tag = "Table.Cell" @@ -67,7 +66,7 @@ class TableCell(el.Td, CommonMarginProps, RadixThemesComponent): width: Var[Union[str, int]] -class TableRowHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): +class TableRowHeaderCell(el.Th, RadixThemesComponent): """A table cell that is semantically treated as a row header.""" tag = "Table.RowHeaderCell" diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi index 20a6923f2..4e348c9af 100644 --- a/reflex/components/radix/themes/components/table.pyi +++ b/reflex/components/radix/themes/components/table.pyi @@ -10,9 +10,9 @@ from reflex.style import Style from typing import Literal, Union from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent): +class TableRoot(el.Table, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -145,48 +145,6 @@ class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -273,13 +231,6 @@ class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -293,7 +244,7 @@ class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent): """ ... -class TableHeader(el.Thead, CommonMarginProps, RadixThemesComponent): +class TableHeader(el.Thead, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -408,48 +359,6 @@ class TableHeader(el.Thead, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -530,13 +439,6 @@ class TableHeader(el.Thead, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -550,7 +452,7 @@ class TableHeader(el.Thead, CommonMarginProps, RadixThemesComponent): """ ... -class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent): +class TableRow(el.Tr, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -671,48 +573,6 @@ class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -794,13 +654,6 @@ class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -814,7 +667,7 @@ class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent): """ ... -class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): +class TableColumnHeaderCell(el.Th, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -954,48 +807,6 @@ class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1084,13 +895,6 @@ class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1104,7 +908,7 @@ class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): """ ... -class TableBody(el.Tbody, CommonMarginProps, RadixThemesComponent): +class TableBody(el.Tbody, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1222,48 +1026,6 @@ class TableBody(el.Tbody, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1345,13 +1107,6 @@ class TableBody(el.Tbody, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1365,7 +1120,7 @@ class TableBody(el.Tbody, CommonMarginProps, RadixThemesComponent): """ ... -class TableCell(el.Td, CommonMarginProps, RadixThemesComponent): +class TableCell(el.Td, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1502,48 +1257,6 @@ class TableCell(el.Td, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1631,13 +1344,6 @@ class TableCell(el.Td, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -1651,7 +1357,7 @@ class TableCell(el.Td, CommonMarginProps, RadixThemesComponent): """ ... -class TableRowHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): +class TableRowHeaderCell(el.Th, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -1791,48 +1497,6 @@ class TableRowHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1921,13 +1585,6 @@ class TableRowHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/tabs.py b/reflex/components/radix/themes/components/tabs.py index d6a74b704..c371edf20 100644 --- a/reflex/components/radix/themes/components/tabs.py +++ b/reflex/components/radix/themes/components/tabs.py @@ -4,12 +4,11 @@ from typing import Any, Dict, Literal from reflex.vars import Var from ..base import ( - CommonMarginProps, RadixThemesComponent, ) -class TabsRoot(CommonMarginProps, RadixThemesComponent): +class TabsRoot(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Tabs.Root" @@ -38,13 +37,13 @@ class TabsRoot(CommonMarginProps, RadixThemesComponent): } -class TabsList(CommonMarginProps, RadixThemesComponent): +class TabsList(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Tabs.List" -class TabsTrigger(CommonMarginProps, RadixThemesComponent): +class TabsTrigger(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Tabs.Trigger" @@ -56,7 +55,7 @@ class TabsTrigger(CommonMarginProps, RadixThemesComponent): disabled: Var[bool] -class TabsContent(CommonMarginProps, RadixThemesComponent): +class TabsContent(RadixThemesComponent): """Trigger an action or event, such as submitting a form or displaying a dialog.""" tag = "Tabs.Content" diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi index 2d0770a72..ba33bed05 100644 --- a/reflex/components/radix/themes/components/tabs.pyi +++ b/reflex/components/radix/themes/components/tabs.pyi @@ -9,9 +9,9 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from typing import Any, Dict, Literal from reflex.vars import Var -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class TabsRoot(CommonMarginProps, RadixThemesComponent): +class TabsRoot(RadixThemesComponent): def get_event_triggers(self) -> Dict[str, Any]: ... @overload @classmethod @@ -92,48 +92,6 @@ class TabsRoot(CommonMarginProps, RadixThemesComponent): Literal["horizontal", "vertical"], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -203,13 +161,6 @@ class TabsRoot(CommonMarginProps, RadixThemesComponent): 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. value: The controlled value of the tab that should be active. Use when you need to control the state of the tabs. orientation: The orientation of the tabs. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -223,7 +174,7 @@ class TabsRoot(CommonMarginProps, RadixThemesComponent): """ ... -class TabsList(CommonMarginProps, RadixThemesComponent): +class TabsList(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -292,48 +243,6 @@ class TabsList(CommonMarginProps, RadixThemesComponent): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -396,13 +305,6 @@ class TabsList(CommonMarginProps, RadixThemesComponent): *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" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -416,7 +318,7 @@ class TabsList(CommonMarginProps, RadixThemesComponent): """ ... -class TabsTrigger(CommonMarginProps, RadixThemesComponent): +class TabsTrigger(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -487,48 +389,6 @@ class TabsTrigger(CommonMarginProps, RadixThemesComponent): ] = None, value: Optional[Union[Var[str], str]] = None, disabled: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -593,13 +453,6 @@ class TabsTrigger(CommonMarginProps, RadixThemesComponent): 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" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -613,7 +466,7 @@ class TabsTrigger(CommonMarginProps, RadixThemesComponent): """ ... -class TabsContent(CommonMarginProps, RadixThemesComponent): +class TabsContent(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -683,48 +536,6 @@ class TabsContent(CommonMarginProps, RadixThemesComponent): ] ] = None, value: Optional[Union[Var[str], str]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -788,13 +599,6 @@ class TabsContent(CommonMarginProps, RadixThemesComponent): 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. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/textarea.py b/reflex/components/radix/themes/components/textarea.py index 3cdcfc5dc..0fe0ca575 100644 --- a/reflex/components/radix/themes/components/textarea.py +++ b/reflex/components/radix/themes/components/textarea.py @@ -8,7 +8,6 @@ from reflex.constants import EventTriggers from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, RadixThemesComponent, ) @@ -16,7 +15,7 @@ from ..base import ( LiteralTextAreaSize = Literal["1", "2", "3"] -class TextArea(CommonMarginProps, RadixThemesComponent, el.Textarea): +class TextArea(RadixThemesComponent, el.Textarea): """The input part of a TextArea, may be used by itself.""" tag = "TextArea" diff --git a/reflex/components/radix/themes/components/textarea.pyi b/reflex/components/radix/themes/components/textarea.pyi index 650071f90..02badfd6e 100644 --- a/reflex/components/radix/themes/components/textarea.pyi +++ b/reflex/components/radix/themes/components/textarea.pyi @@ -13,11 +13,11 @@ from reflex.components.component import Component from reflex.components.core.debounce import DebounceInput from reflex.constants import EventTriggers from reflex.vars import Var -from ..base import CommonMarginProps, LiteralAccentColor, RadixThemesComponent +from ..base import LiteralAccentColor, RadixThemesComponent LiteralTextAreaSize = Literal["1", "2", "3"] -class TextArea(CommonMarginProps, RadixThemesComponent, el.Textarea): +class TextArea(RadixThemesComponent, el.Textarea): @overload @classmethod def create( # type: ignore @@ -94,48 +94,6 @@ class TextArea(CommonMarginProps, RadixThemesComponent, el.Textarea): ], ] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, auto_complete: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -283,13 +241,6 @@ class TextArea(CommonMarginProps, RadixThemesComponent, el.Textarea): size: The size of the text area: "1" | "2" | "3" variant: The variant of the text area color_scheme: The color of the text area - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" auto_complete: Whether the form control should have autocomplete enabled auto_focus: Automatically focuses the textarea when the page loads cols: Visible width of the text control, in average character widths diff --git a/reflex/components/radix/themes/components/textfield.py b/reflex/components/radix/themes/components/textfield.py index 8b2b030e3..1b840cd74 100644 --- a/reflex/components/radix/themes/components/textfield.py +++ b/reflex/components/radix/themes/components/textfield.py @@ -10,7 +10,6 @@ from reflex.constants import EventTriggers from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralRadius, LiteralSize, @@ -21,7 +20,7 @@ LiteralTextFieldSize = Literal["1", "2", "3"] LiteralTextFieldVariant = Literal["classic", "surface", "soft"] -class TextFieldRoot(el.Div, CommonMarginProps, RadixThemesComponent): +class TextFieldRoot(el.Div, RadixThemesComponent): """Captures user input with an optional slot for buttons and icons.""" tag = "TextField.Root" diff --git a/reflex/components/radix/themes/components/textfield.pyi b/reflex/components/radix/themes/components/textfield.pyi index d0b960288..8b81af8ec 100644 --- a/reflex/components/radix/themes/components/textfield.pyi +++ b/reflex/components/radix/themes/components/textfield.pyi @@ -15,18 +15,12 @@ from reflex.components.core.debounce import DebounceInput from reflex.components.radix.themes.components.icons import Icon from reflex.constants import EventTriggers from reflex.vars import Var -from ..base import ( - CommonMarginProps, - LiteralAccentColor, - LiteralRadius, - LiteralSize, - RadixThemesComponent, -) +from ..base import LiteralAccentColor, LiteralRadius, LiteralSize, RadixThemesComponent LiteralTextFieldSize = Literal["1", "2", "3"] LiteralTextFieldVariant = Literal["classic", "surface", "soft"] -class TextFieldRoot(el.Div, CommonMarginProps, RadixThemesComponent): +class TextFieldRoot(el.Div, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -153,48 +147,6 @@ class TextFieldRoot(el.Div, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -277,13 +229,6 @@ class TextFieldRoot(el.Div, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -499,48 +444,6 @@ class TextFieldInput(el.Input, TextFieldRoot): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -660,13 +563,6 @@ class TextFieldInput(el.Input, TextFieldRoot): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/tooltip.py b/reflex/components/radix/themes/components/tooltip.py index 497a22bad..3cf60df56 100644 --- a/reflex/components/radix/themes/components/tooltip.py +++ b/reflex/components/radix/themes/components/tooltip.py @@ -2,12 +2,11 @@ from reflex.vars import Var from ..base import ( - CommonMarginProps, RadixThemesComponent, ) -class Tooltip(CommonMarginProps, RadixThemesComponent): +class Tooltip(RadixThemesComponent): """Floating element that provides a control with contextual information via pointer or focus.""" tag = "Tooltip" diff --git a/reflex/components/radix/themes/components/tooltip.pyi b/reflex/components/radix/themes/components/tooltip.pyi index b86dd59d0..f609b1605 100644 --- a/reflex/components/radix/themes/components/tooltip.pyi +++ b/reflex/components/radix/themes/components/tooltip.pyi @@ -8,9 +8,9 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from reflex.vars import Var -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class Tooltip(CommonMarginProps, RadixThemesComponent): +class Tooltip(RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -80,48 +80,6 @@ class Tooltip(CommonMarginProps, RadixThemesComponent): ] ] = None, content: Optional[Union[Var[str], str]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -185,13 +143,6 @@ class Tooltip(CommonMarginProps, RadixThemesComponent): color: map to CSS default color property. color_scheme: map to radix color property. content: The content of the tooltip. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/layout/box.py b/reflex/components/radix/themes/layout/box.py index bd5963db2..b9bb99107 100644 --- a/reflex/components/radix/themes/layout/box.py +++ b/reflex/components/radix/themes/layout/box.py @@ -3,10 +3,10 @@ from __future__ import annotations from reflex import el -from .base import LayoutComponent +from ..base import RadixThemesComponent -class Box(el.Div, LayoutComponent): +class Box(el.Div, RadixThemesComponent): """A fundamental layout building block, based on `div` element.""" tag = "Box" diff --git a/reflex/components/radix/themes/layout/box.pyi b/reflex/components/radix/themes/layout/box.pyi index 4e8aa662a..2753c66b5 100644 --- a/reflex/components/radix/themes/layout/box.pyi +++ b/reflex/components/radix/themes/layout/box.pyi @@ -8,9 +8,9 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from reflex import el -from .base import LayoutComponent +from ..base import RadixThemesComponent -class Box(el.Div, LayoutComponent): +class Box(el.Div, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -122,92 +122,6 @@ class Box(el.Div, LayoutComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - p: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - px: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - py: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pl: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -287,22 +201,6 @@ class Box(el.Div, LayoutComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - p: Padding: "0" - "9" - px: Padding horizontal: "0" - "9" - py: Padding vertical: "0" - "9" - pt: Padding top: "0" - "9" - pr: Padding right: "0" - "9" - pb: Padding bottom: "0" - "9" - pl: Padding left: "0" - "9" - shrink: Whether the element will take up the smallest possible space: "0" | "1" - grow: Whether the element will take up the largest possible space: "0" | "1" - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/layout/center.pyi b/reflex/components/radix/themes/layout/center.pyi index 0d88ef6ec..1b1c8d852 100644 --- a/reflex/components/radix/themes/layout/center.pyi +++ b/reflex/components/radix/themes/layout/center.pyi @@ -159,92 +159,6 @@ class Center(Flex): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - p: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - px: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - py: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pl: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -331,22 +245,6 @@ class Center(Flex): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - p: Padding: "0" - "9" - px: Padding horizontal: "0" - "9" - py: Padding vertical: "0" - "9" - pt: Padding top: "0" - "9" - pr: Padding right: "0" - "9" - pb: Padding bottom: "0" - "9" - pl: Padding left: "0" - "9" - shrink: Whether the element will take up the smallest possible space: "0" | "1" - grow: Whether the element will take up the largest possible space: "0" | "1" - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/layout/container.py b/reflex/components/radix/themes/layout/container.py index 21a020b1d..2e049df7d 100644 --- a/reflex/components/radix/themes/layout/container.py +++ b/reflex/components/radix/themes/layout/container.py @@ -6,12 +6,12 @@ from typing import Literal from reflex import el from reflex.vars import Var -from .base import LayoutComponent +from ..base import RadixThemesComponent LiteralContainerSize = Literal["1", "2", "3", "4"] -class Container(el.Div, LayoutComponent): +class Container(el.Div, RadixThemesComponent): """Constrains the maximum width of page content. See https://www.radix-ui.com/themes/docs/components/container diff --git a/reflex/components/radix/themes/layout/container.pyi b/reflex/components/radix/themes/layout/container.pyi index 31d281686..350a8ea54 100644 --- a/reflex/components/radix/themes/layout/container.pyi +++ b/reflex/components/radix/themes/layout/container.pyi @@ -10,11 +10,11 @@ from reflex.style import Style from typing import Literal from reflex import el from reflex.vars import Var -from .base import LayoutComponent +from ..base import RadixThemesComponent LiteralContainerSize = Literal["1", "2", "3", "4"] -class Container(el.Div, LayoutComponent): +class Container(el.Div, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -129,92 +129,6 @@ class Container(el.Div, LayoutComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - p: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - px: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - py: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pl: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -295,22 +209,6 @@ class Container(el.Div, LayoutComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - p: Padding: "0" - "9" - px: Padding horizontal: "0" - "9" - py: Padding vertical: "0" - "9" - pt: Padding top: "0" - "9" - pr: Padding right: "0" - "9" - pb: Padding bottom: "0" - "9" - pl: Padding left: "0" - "9" - shrink: Whether the element will take up the smallest possible space: "0" | "1" - grow: Whether the element will take up the largest possible space: "0" | "1" - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/layout/flex.py b/reflex/components/radix/themes/layout/flex.py index f6584e6e8..39dfdea41 100644 --- a/reflex/components/radix/themes/layout/flex.py +++ b/reflex/components/radix/themes/layout/flex.py @@ -10,15 +10,15 @@ from ..base import ( LiteralAlign, LiteralJustify, LiteralSize, + RadixThemesComponent, ) -from .base import LayoutComponent LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"] LiteralFlexDisplay = Literal["none", "inline-flex", "flex"] LiteralFlexWrap = Literal["nowrap", "wrap", "wrap-reverse"] -class Flex(el.Div, LayoutComponent): +class Flex(el.Div, RadixThemesComponent): """Component for creating flex layouts.""" tag = "Flex" diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi index 10c2f4a24..dbce1491a 100644 --- a/reflex/components/radix/themes/layout/flex.pyi +++ b/reflex/components/radix/themes/layout/flex.pyi @@ -10,14 +10,13 @@ from reflex.style import Style from typing import Literal from reflex import el from reflex.vars import Var -from ..base import LiteralAlign, LiteralJustify, LiteralSize -from .base import LayoutComponent +from ..base import LiteralAlign, LiteralJustify, LiteralSize, RadixThemesComponent LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"] LiteralFlexDisplay = Literal["none", "inline-flex", "flex"] LiteralFlexWrap = Literal["nowrap", "wrap", "wrap-reverse"] -class Flex(el.Div, LayoutComponent): +class Flex(el.Div, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -166,92 +165,6 @@ class Flex(el.Div, LayoutComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - p: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - px: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - py: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pl: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -338,22 +251,6 @@ class Flex(el.Div, LayoutComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - p: Padding: "0" - "9" - px: Padding horizontal: "0" - "9" - py: Padding vertical: "0" - "9" - pt: Padding top: "0" - "9" - pr: Padding right: "0" - "9" - pb: Padding bottom: "0" - "9" - pl: Padding left: "0" - "9" - shrink: Whether the element will take up the smallest possible space: "0" | "1" - grow: Whether the element will take up the largest possible space: "0" | "1" - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/layout/section.py b/reflex/components/radix/themes/layout/section.py index a86a00325..5f17b270c 100644 --- a/reflex/components/radix/themes/layout/section.py +++ b/reflex/components/radix/themes/layout/section.py @@ -6,12 +6,12 @@ from typing import Literal from reflex import el from reflex.vars import Var -from .base import LayoutComponent +from ..base import RadixThemesComponent LiteralSectionSize = Literal["1", "2", "3"] -class Section(el.Section, LayoutComponent): +class Section(el.Section, RadixThemesComponent): """Denotes a section of page content.""" tag = "Section" diff --git a/reflex/components/radix/themes/layout/section.pyi b/reflex/components/radix/themes/layout/section.pyi index 4677e0ec5..986224d71 100644 --- a/reflex/components/radix/themes/layout/section.pyi +++ b/reflex/components/radix/themes/layout/section.pyi @@ -10,11 +10,11 @@ from reflex.style import Style from typing import Literal from reflex import el from reflex.vars import Var -from .base import LayoutComponent +from ..base import RadixThemesComponent LiteralSectionSize = Literal["1", "2", "3"] -class Section(el.Section, LayoutComponent): +class Section(el.Section, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -129,92 +129,6 @@ class Section(el.Section, LayoutComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - p: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - px: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - py: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pl: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -295,22 +209,6 @@ class Section(el.Section, LayoutComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - p: Padding: "0" - "9" - px: Padding horizontal: "0" - "9" - py: Padding vertical: "0" - "9" - pt: Padding top: "0" - "9" - pr: Padding right: "0" - "9" - pb: Padding bottom: "0" - "9" - pl: Padding left: "0" - "9" - shrink: Whether the element will take up the smallest possible space: "0" | "1" - grow: Whether the element will take up the largest possible space: "0" | "1" - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/layout/spacer.pyi b/reflex/components/radix/themes/layout/spacer.pyi index fbd235895..32edfa454 100644 --- a/reflex/components/radix/themes/layout/spacer.pyi +++ b/reflex/components/radix/themes/layout/spacer.pyi @@ -159,92 +159,6 @@ class Spacer(Flex): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - p: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - px: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - py: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pl: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -331,22 +245,6 @@ class Spacer(Flex): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - p: Padding: "0" - "9" - px: Padding horizontal: "0" - "9" - py: Padding vertical: "0" - "9" - pt: Padding top: "0" - "9" - pr: Padding right: "0" - "9" - pb: Padding bottom: "0" - "9" - pl: Padding left: "0" - "9" - shrink: Whether the element will take up the smallest possible space: "0" | "1" - grow: Whether the element will take up the largest possible space: "0" | "1" - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi index d60275217..a3e6d7823 100644 --- a/reflex/components/radix/themes/layout/stack.pyi +++ b/reflex/components/radix/themes/layout/stack.pyi @@ -91,92 +91,6 @@ class Stack(Flex): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - p: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - px: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - py: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pl: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -259,22 +173,6 @@ class Stack(Flex): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - p: Padding: "0" - "9" - px: Padding horizontal: "0" - "9" - py: Padding vertical: "0" - "9" - pt: Padding top: "0" - "9" - pr: Padding right: "0" - "9" - pb: Padding bottom: "0" - "9" - pl: Padding left: "0" - "9" - shrink: Whether the element will take up the smallest possible space: "0" | "1" - grow: Whether the element will take up the largest possible space: "0" | "1" - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -365,92 +263,6 @@ class VStack(Stack): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - p: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - px: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - py: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pl: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -533,22 +345,6 @@ class VStack(Stack): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - p: Padding: "0" - "9" - px: Padding horizontal: "0" - "9" - py: Padding vertical: "0" - "9" - pt: Padding top: "0" - "9" - pr: Padding right: "0" - "9" - pb: Padding bottom: "0" - "9" - pl: Padding left: "0" - "9" - shrink: Whether the element will take up the smallest possible space: "0" | "1" - grow: Whether the element will take up the largest possible space: "0" | "1" - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -639,92 +435,6 @@ class HStack(Stack): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - p: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - px: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - py: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - pl: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -807,22 +517,6 @@ class HStack(Stack): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - p: Padding: "0" - "9" - px: Padding horizontal: "0" - "9" - py: Padding vertical: "0" - "9" - pt: Padding top: "0" - "9" - pr: Padding right: "0" - "9" - pb: Padding bottom: "0" - "9" - pl: Padding left: "0" - "9" - shrink: Whether the element will take up the smallest possible space: "0" | "1" - grow: Whether the element will take up the largest possible space: "0" | "1" - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/typography.py b/reflex/components/radix/themes/typography.py index 9d174de5c..f275fd2bb 100644 --- a/reflex/components/radix/themes/typography.py +++ b/reflex/components/radix/themes/typography.py @@ -9,7 +9,6 @@ from typing import Literal from reflex.vars import Var from .base import ( - CommonMarginProps, LiteralAccentColor, LiteralVariant, RadixThemesComponent, @@ -21,7 +20,7 @@ LiteralTextSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"] LiteralTextTrim = Literal["normal", "start", "end", "both"] -class Text(CommonMarginProps, RadixThemesComponent): +class Text(RadixThemesComponent): """A foundational text primitive based on the element.""" tag = "Text" @@ -57,7 +56,7 @@ class Heading(Text): tag = "Heading" -class Blockquote(CommonMarginProps, RadixThemesComponent): +class Blockquote(RadixThemesComponent): """A block level extended quotation.""" tag = "Blockquote" @@ -84,13 +83,13 @@ class Code(Blockquote): variant: Var[LiteralVariant] -class Em(CommonMarginProps, RadixThemesComponent): +class Em(RadixThemesComponent): """Marks text to stress emphasis.""" tag = "Em" -class Kbd(CommonMarginProps, RadixThemesComponent): +class Kbd(RadixThemesComponent): """Represents keyboard input or a hotkey.""" tag = "Kbd" @@ -102,7 +101,7 @@ class Kbd(CommonMarginProps, RadixThemesComponent): LiteralLinkUnderline = Literal["auto", "hover", "always"] -class Link(CommonMarginProps, RadixThemesComponent): +class Link(RadixThemesComponent): """A semantic element for navigation between pages.""" tag = "Link" @@ -129,13 +128,13 @@ class Link(CommonMarginProps, RadixThemesComponent): high_contrast: Var[bool] -class Quote(CommonMarginProps, RadixThemesComponent): +class Quote(RadixThemesComponent): """A short inline quotation.""" tag = "Quote" -class Strong(CommonMarginProps, RadixThemesComponent): +class Strong(RadixThemesComponent): """Marks text to signify strong importance.""" tag = "Strong" diff --git a/reflex/components/radix/themes/typography/blockquote.py b/reflex/components/radix/themes/typography/blockquote.py index 34cd0d6ba..6525064d5 100644 --- a/reflex/components/radix/themes/typography/blockquote.py +++ b/reflex/components/radix/themes/typography/blockquote.py @@ -8,7 +8,6 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, RadixThemesComponent, ) @@ -18,7 +17,7 @@ from .base import ( ) -class Blockquote(el.Blockquote, CommonMarginProps, RadixThemesComponent): +class Blockquote(el.Blockquote, RadixThemesComponent): """A block level extended quotation.""" tag = "Blockquote" diff --git a/reflex/components/radix/themes/typography/blockquote.pyi b/reflex/components/radix/themes/typography/blockquote.pyi index 47522ed7e..42e967324 100644 --- a/reflex/components/radix/themes/typography/blockquote.pyi +++ b/reflex/components/radix/themes/typography/blockquote.pyi @@ -9,10 +9,10 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, LiteralAccentColor, RadixThemesComponent +from ..base import LiteralAccentColor, RadixThemesComponent from .base import LiteralTextSize, LiteralTextWeight -class Blockquote(el.Blockquote, CommonMarginProps, RadixThemesComponent): +class Blockquote(el.Blockquote, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -138,48 +138,6 @@ class Blockquote(el.Blockquote, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -263,13 +221,6 @@ class Blockquote(el.Blockquote, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/typography/code.py b/reflex/components/radix/themes/typography/code.py index a242ae256..8ee0d2be2 100644 --- a/reflex/components/radix/themes/typography/code.py +++ b/reflex/components/radix/themes/typography/code.py @@ -8,7 +8,6 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, LiteralVariant, RadixThemesComponent, @@ -19,7 +18,7 @@ from .base import ( ) -class Code(el.Code, CommonMarginProps, RadixThemesComponent): +class Code(el.Code, RadixThemesComponent): """A block level extended quotation.""" tag = "Code" diff --git a/reflex/components/radix/themes/typography/code.pyi b/reflex/components/radix/themes/typography/code.pyi index 4e0e991f7..072425244 100644 --- a/reflex/components/radix/themes/typography/code.pyi +++ b/reflex/components/radix/themes/typography/code.pyi @@ -9,15 +9,10 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from reflex import el from reflex.vars import Var -from ..base import ( - CommonMarginProps, - LiteralAccentColor, - LiteralVariant, - RadixThemesComponent, -) +from ..base import LiteralAccentColor, LiteralVariant, RadixThemesComponent from .base import LiteralTextSize, LiteralTextWeight -class Code(el.Code, CommonMarginProps, RadixThemesComponent): +class Code(el.Code, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -148,48 +143,6 @@ class Code(el.Code, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -273,13 +226,6 @@ class Code(el.Code, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/typography/em.py b/reflex/components/radix/themes/typography/em.py index 91b9d660c..eb7e3e6ce 100644 --- a/reflex/components/radix/themes/typography/em.py +++ b/reflex/components/radix/themes/typography/em.py @@ -7,12 +7,11 @@ from __future__ import annotations from reflex import el from ..base import ( - CommonMarginProps, RadixThemesComponent, ) -class Em(el.Em, CommonMarginProps, RadixThemesComponent): +class Em(el.Em, RadixThemesComponent): """Marks text to stress emphasis.""" tag = "Em" diff --git a/reflex/components/radix/themes/typography/em.pyi b/reflex/components/radix/themes/typography/em.pyi index 11c09874e..30c21afea 100644 --- a/reflex/components/radix/themes/typography/em.pyi +++ b/reflex/components/radix/themes/typography/em.pyi @@ -8,9 +8,9 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from reflex import el -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class Em(el.Em, CommonMarginProps, RadixThemesComponent): +class Em(el.Em, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -122,48 +122,6 @@ class Em(el.Em, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -243,13 +201,6 @@ class Em(el.Em, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/typography/heading.py b/reflex/components/radix/themes/typography/heading.py index ec48de56e..729d06624 100644 --- a/reflex/components/radix/themes/typography/heading.py +++ b/reflex/components/radix/themes/typography/heading.py @@ -8,7 +8,6 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, RadixThemesComponent, ) @@ -20,7 +19,7 @@ from .base import ( ) -class Heading(el.H1, CommonMarginProps, RadixThemesComponent): +class Heading(el.H1, RadixThemesComponent): """A foundational text primitive based on the element.""" tag = "Heading" diff --git a/reflex/components/radix/themes/typography/heading.pyi b/reflex/components/radix/themes/typography/heading.pyi index 831432fe3..89f041465 100644 --- a/reflex/components/radix/themes/typography/heading.pyi +++ b/reflex/components/radix/themes/typography/heading.pyi @@ -9,10 +9,10 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, LiteralAccentColor, RadixThemesComponent +from ..base import LiteralAccentColor, RadixThemesComponent from .base import LiteralTextAlign, LiteralTextSize, LiteralTextTrim, LiteralTextWeight -class Heading(el.H1, CommonMarginProps, RadixThemesComponent): +class Heading(el.H1, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -151,48 +151,6 @@ class Heading(el.H1, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -279,13 +237,6 @@ class Heading(el.H1, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/typography/kbd.py b/reflex/components/radix/themes/typography/kbd.py index a7d984a31..b8c28010c 100644 --- a/reflex/components/radix/themes/typography/kbd.py +++ b/reflex/components/radix/themes/typography/kbd.py @@ -8,7 +8,6 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, RadixThemesComponent, ) from .base import ( @@ -16,7 +15,7 @@ from .base import ( ) -class Kbd(el.Kbd, CommonMarginProps, RadixThemesComponent): +class Kbd(el.Kbd, RadixThemesComponent): """Represents keyboard input or a hotkey.""" tag = "Kbd" diff --git a/reflex/components/radix/themes/typography/kbd.pyi b/reflex/components/radix/themes/typography/kbd.pyi index 723923b8c..687ef0447 100644 --- a/reflex/components/radix/themes/typography/kbd.pyi +++ b/reflex/components/radix/themes/typography/kbd.pyi @@ -9,10 +9,10 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent from .base import LiteralTextSize -class Kbd(el.Kbd, CommonMarginProps, RadixThemesComponent): +class Kbd(el.Kbd, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -130,48 +130,6 @@ class Kbd(el.Kbd, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -252,13 +210,6 @@ class Kbd(el.Kbd, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/typography/link.py b/reflex/components/radix/themes/typography/link.py index 09798cd1f..22c844f5b 100644 --- a/reflex/components/radix/themes/typography/link.py +++ b/reflex/components/radix/themes/typography/link.py @@ -13,7 +13,6 @@ from reflex.utils import imports from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, RadixThemesComponent, ) @@ -28,7 +27,7 @@ LiteralLinkUnderline = Literal["auto", "hover", "always"] next_link = NextLink.create() -class Link(CommonMarginProps, RadixThemesComponent, A): +class Link(RadixThemesComponent, A): """A semantic element for navigation between pages.""" tag = "Link" diff --git a/reflex/components/radix/themes/typography/link.pyi b/reflex/components/radix/themes/typography/link.pyi index 77db58552..adc8a05d3 100644 --- a/reflex/components/radix/themes/typography/link.pyi +++ b/reflex/components/radix/themes/typography/link.pyi @@ -13,13 +13,13 @@ from reflex.components.el.elements.inline import A from reflex.components.next.link import NextLink from reflex.utils import imports from reflex.vars import Var -from ..base import CommonMarginProps, LiteralAccentColor, RadixThemesComponent +from ..base import LiteralAccentColor, RadixThemesComponent from .base import LiteralTextSize, LiteralTextTrim, LiteralTextWeight LiteralLinkUnderline = Literal["auto", "hover", "always"] next_link = NextLink.create() -class Link(CommonMarginProps, RadixThemesComponent, A): +class Link(RadixThemesComponent, A): @overload @classmethod def create( # type: ignore @@ -113,48 +113,6 @@ class Link(CommonMarginProps, RadixThemesComponent, A): ] ] = None, high_contrast: Optional[Union[Var[bool], bool]] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, download: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, @@ -283,13 +241,6 @@ class Link(CommonMarginProps, RadixThemesComponent, A): underline: Sets the visibility of the underline affordance: "auto" | "hover" | "always" color_scheme: 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" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" download: Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink. href: Specifies the URL of the page the link goes to href_lang: Specifies the language of the linked document diff --git a/reflex/components/radix/themes/typography/quote.py b/reflex/components/radix/themes/typography/quote.py index ed58fa8e5..6c590bf76 100644 --- a/reflex/components/radix/themes/typography/quote.py +++ b/reflex/components/radix/themes/typography/quote.py @@ -7,12 +7,11 @@ from __future__ import annotations from reflex import el from ..base import ( - CommonMarginProps, RadixThemesComponent, ) -class Quote(el.Q, CommonMarginProps, RadixThemesComponent): +class Quote(el.Q, RadixThemesComponent): """A short inline quotation.""" tag = "Quote" diff --git a/reflex/components/radix/themes/typography/quote.pyi b/reflex/components/radix/themes/typography/quote.pyi index 4423ee2e3..a7827d552 100644 --- a/reflex/components/radix/themes/typography/quote.pyi +++ b/reflex/components/radix/themes/typography/quote.pyi @@ -8,9 +8,9 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from reflex import el -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class Quote(el.Q, CommonMarginProps, RadixThemesComponent): +class Quote(el.Q, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -123,48 +123,6 @@ class Quote(el.Q, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -245,13 +203,6 @@ class Quote(el.Q, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/typography/strong.py b/reflex/components/radix/themes/typography/strong.py index a130b65a3..bb74b7b44 100644 --- a/reflex/components/radix/themes/typography/strong.py +++ b/reflex/components/radix/themes/typography/strong.py @@ -7,12 +7,11 @@ from __future__ import annotations from reflex import el from ..base import ( - CommonMarginProps, RadixThemesComponent, ) -class Strong(el.Strong, CommonMarginProps, RadixThemesComponent): +class Strong(el.Strong, RadixThemesComponent): """Marks text to signify strong importance.""" tag = "Strong" diff --git a/reflex/components/radix/themes/typography/strong.pyi b/reflex/components/radix/themes/typography/strong.pyi index 573e7d32e..47bce6826 100644 --- a/reflex/components/radix/themes/typography/strong.pyi +++ b/reflex/components/radix/themes/typography/strong.pyi @@ -8,9 +8,9 @@ from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from reflex import el -from ..base import CommonMarginProps, RadixThemesComponent +from ..base import RadixThemesComponent -class Strong(el.Strong, CommonMarginProps, RadixThemesComponent): +class Strong(el.Strong, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -122,48 +122,6 @@ class Strong(el.Strong, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -243,13 +201,6 @@ class Strong(el.Strong, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" 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/typography/text.py b/reflex/components/radix/themes/typography/text.py index 72a475b5f..c0783bf92 100644 --- a/reflex/components/radix/themes/typography/text.py +++ b/reflex/components/radix/themes/typography/text.py @@ -8,7 +8,6 @@ from reflex import el from reflex.vars import Var from ..base import ( - CommonMarginProps, LiteralAccentColor, RadixThemesComponent, ) @@ -20,7 +19,7 @@ from .base import ( ) -class Text(el.Span, CommonMarginProps, RadixThemesComponent): +class Text(el.Span, RadixThemesComponent): """A foundational text primitive based on the element.""" tag = "Text" diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi index 24978fb6e..20d263c88 100644 --- a/reflex/components/radix/themes/typography/text.pyi +++ b/reflex/components/radix/themes/typography/text.pyi @@ -9,10 +9,10 @@ from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style from reflex import el from reflex.vars import Var -from ..base import CommonMarginProps, LiteralAccentColor, RadixThemesComponent +from ..base import LiteralAccentColor, RadixThemesComponent from .base import LiteralTextAlign, LiteralTextSize, LiteralTextTrim, LiteralTextWeight -class Text(el.Span, CommonMarginProps, RadixThemesComponent): +class Text(el.Span, RadixThemesComponent): @overload @classmethod def create( # type: ignore @@ -151,48 +151,6 @@ class Text(el.Span, CommonMarginProps, RadixThemesComponent): translate: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - m: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mx: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - my: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mt: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mr: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - mb: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, - ml: Optional[ - Union[ - Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]], - Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"], - ] - ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -279,13 +237,6 @@ class Text(el.Span, CommonMarginProps, RadixThemesComponent): tab_index: Defines the position of the current element in the tabbing order. title: Defines a tooltip for the element. translate: Specifies whether the content of an element should be translated or not. - m: Margin: "0" - "9" - mx: Margin horizontal: "0" - "9" - my: Margin vertical: "0" - "9" - mt: Margin top: "0" - "9" - mr: Margin right: "0" - "9" - mb: Margin bottom: "0" - "9" - ml: Margin left: "0" - "9" style: The style of the component. key: A unique key for the component. id: The id for the component. From d2fd0d3b9253831bd19840bda0e2e4586aee8b14 Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Wed, 31 Jan 2024 02:14:20 +0000 Subject: [PATCH 2/6] [REF-1742] Radio group prop types fix (#2452) --- .../radix/themes/components/radiogroup.py | 44 +++++++++++---- .../radix/themes/components/radiogroup.pyi | 2 +- reflex/vars.py | 36 +++++++++++-- tests/test_var.py | 53 +++++++++++++++++++ 4 files changed, 120 insertions(+), 15 deletions(-) diff --git a/reflex/components/radix/themes/components/radiogroup.py b/reflex/components/radix/themes/components/radiogroup.py index 01ceca188..099a7c287 100644 --- a/reflex/components/radix/themes/components/radiogroup.py +++ b/reflex/components/radix/themes/components/radiogroup.py @@ -1,5 +1,5 @@ """Interactive components provided by @radix-ui/themes.""" -from typing import Any, Dict, List, Literal +from typing import Any, Dict, List, Literal, Optional, Union import reflex as rx from reflex.components.component import Component @@ -97,7 +97,11 @@ class HighLevelRadioGroup(RadioGroupRoot): size: Var[Literal["1", "2", "3"]] = Var.create_safe("2") @classmethod - def create(cls, items: Var[List[str]], **props) -> Component: + def create( + cls, + items: Var[List[Optional[Union[str, int, float, list, dict, bool]]]], + **props + ) -> Component: """Create a radio group component. Args: @@ -110,29 +114,49 @@ class HighLevelRadioGroup(RadioGroupRoot): direction = props.pop("direction", "column") gap = props.pop("gap", "2") size = props.pop("size", "2") + default_value = props.pop("default_value", "") + + # convert only non-strings to json(JSON.stringify) so quotes are not rendered + # for string literal types. + if ( + type(default_value) is str + or isinstance(default_value, Var) + and default_value._var_type is str + ): + default_value = Var.create(default_value, _var_is_string=True) # type: ignore + else: + default_value = ( + Var.create(default_value).to_string()._replace(_var_is_local=False) # type: ignore + ) + + def radio_group_item(value: str | Var) -> Component: + item_value = Var.create(value) # type: ignore + item_value = rx.cond( + item_value._type() == str, # type: ignore + item_value, + item_value.to_string()._replace(_var_is_local=False), # type: ignore + )._replace(_var_type=str) - def radio_group_item(value: str) -> Component: return Text.create( Flex.create( - RadioGroupItem.create(value=value), - value, + RadioGroupItem.create(value=item_value), + item_value, gap="2", ), size=size, as_="label", ) - if isinstance(items, Var): - child = [rx.foreach(items, radio_group_item)] - else: - child = [radio_group_item(value) for value in items] # type: ignore + items = Var.create(items) # type: ignore + children = [rx.foreach(items, radio_group_item)] return RadioGroupRoot.create( Flex.create( - *child, + *children, direction=direction, gap=gap, ), size=size, + default_value=default_value, **props, ) diff --git a/reflex/components/radix/themes/components/radiogroup.pyi b/reflex/components/radix/themes/components/radiogroup.pyi index 1f3b4075b..8f4b0a15c 100644 --- a/reflex/components/radix/themes/components/radiogroup.pyi +++ b/reflex/components/radix/themes/components/radiogroup.pyi @@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload from reflex.vars import Var, BaseVar, ComputedVar from reflex.event import EventChain, EventHandler, EventSpec from reflex.style import Style -from typing import Any, Dict, List, Literal +from typing import Any, Dict, List, Literal, Optional, Union import reflex as rx from reflex.components.component import Component from reflex.components.radix.themes.layout.flex import Flex diff --git a/reflex/vars.py b/reflex/vars.py index 3fba2bdde..414bb357b 100644 --- a/reflex/vars.py +++ b/reflex/vars.py @@ -87,6 +87,15 @@ REPLACED_NAMES = { "deps": "_deps", } +PYTHON_JS_TYPE_MAP = { + (int, float): "number", + (str,): "string", + (bool,): "boolean", + (list, tuple): "Array", + (dict,): "Object", + (None,): "null", +} + def get_unique_variable_name() -> str: """Get a unique variable name. @@ -739,13 +748,13 @@ class Var: operation_name = format.wrap(operation_name, "(") else: # apply operator to left operand ( left_operand) - operation_name = f"{op}{self._var_full_name}" + operation_name = f"{op}{get_operand_full_name(self)}" # apply function to operands if fn is not None: operation_name = ( f"{fn}({operation_name})" if not invoke_fn - else f"{self._var_full_name}.{fn}()" + else f"{get_operand_full_name(self)}.{fn}()" ) return self._replace( @@ -839,7 +848,20 @@ class Var: _var_is_string=False, ) - def __eq__(self, other: Var) -> Var: + def _type(self) -> Var: + """Get the type of the Var in Javascript. + + Returns: + A var representing the type check. + """ + return self._replace( + _var_name=f"typeof {self._var_full_name}", + _var_type=str, + _var_is_string=False, + _var_full_name_needs_state_prefix=False, + ) + + def __eq__(self, other: Union[Var, Type]) -> Var: """Perform an equality comparison. Args: @@ -848,9 +870,12 @@ class Var: Returns: A var representing the equality comparison. """ + for python_types, js_type in PYTHON_JS_TYPE_MAP.items(): + if not isinstance(other, Var) and other in python_types: + return self.compare("===", Var.create(js_type, _var_is_string=True)) # type: ignore return self.compare("===", other) - def __ne__(self, other: Var) -> Var: + def __ne__(self, other: Union[Var, Type]) -> Var: """Perform an inequality comparison. Args: @@ -859,6 +884,9 @@ class Var: Returns: A var representing the inequality comparison. """ + for python_types, js_type in PYTHON_JS_TYPE_MAP.items(): + if not isinstance(other, Var) and other in python_types: + return self.compare("!==", Var.create(js_type, _var_is_string=True)) # type: ignore return self.compare("!==", other) def __gt__(self, other: Var) -> Var: diff --git a/tests/test_var.py b/tests/test_var.py index 5833e28f0..df9b7453e 100644 --- a/tests/test_var.py +++ b/tests/test_var.py @@ -316,6 +316,59 @@ def test_basic_operations(TestObj): str(BaseVar(_var_name="foo", _var_type=list).reverse()) == "{[...foo].reverse()}" ) + assert str(BaseVar(_var_name="foo", _var_type=str)._type()) == "{typeof foo}" # type: ignore + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() == str) # type: ignore + == "{(typeof foo === `string`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() == str) # type: ignore + == "{(typeof foo === `string`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() == int) # type: ignore + == "{(typeof foo === `number`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() == list) # type: ignore + == "{(typeof foo === `Array`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() == float) # type: ignore + == "{(typeof foo === `number`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() == tuple) # type: ignore + == "{(typeof foo === `Array`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() == dict) # type: ignore + == "{(typeof foo === `Object`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() != str) # type: ignore + == "{(typeof foo !== `string`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() != int) # type: ignore + == "{(typeof foo !== `number`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() != list) # type: ignore + == "{(typeof foo !== `Array`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() != float) # type: ignore + == "{(typeof foo !== `number`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() != tuple) # type: ignore + == "{(typeof foo !== `Array`)}" + ) + assert ( + str(BaseVar(_var_name="foo", _var_type=str)._type() != dict) # type: ignore + == "{(typeof foo !== `Object`)}" + ) @pytest.mark.parametrize( From 84a2bb9671cf1e8fb73d6a471ad6b1cc2b852062 Mon Sep 17 00:00:00 2001 From: wassaf shahzad Date: Wed, 31 Jan 2024 03:18:29 +0100 Subject: [PATCH 3/6] Added Environmental variable REFLEX_DIR (#2457) --- reflex/constants/base.py | 6 +++++- tests/test_config.py | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/reflex/constants/base.py b/reflex/constants/base.py index d0d9a124c..eeef595eb 100644 --- a/reflex/constants/base.py +++ b/reflex/constants/base.py @@ -61,10 +61,14 @@ class Reflex(SimpleNamespace): # Files and directories used to init a new project. # The directory to store reflex dependencies. - DIR = ( + # Get directory value from enviroment variables if it exists. + _dir = os.environ.get("REFLEX_DIR", "") + + DIR = _dir or ( # on windows, we use C:/Users//AppData/Local/reflex. # on macOS, we use ~/Library/Application Support/reflex. # on linux, we use ~/.local/share/reflex. + # If user sets REFLEX_DIR envroment variable use that instead. PlatformDirs(MODULE_NAME, False).user_data_dir ) # The root directory of the reflex library. diff --git a/tests/test_config.py b/tests/test_config.py index bc3531412..1ba2f548d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,3 +1,4 @@ +import multiprocessing import os from typing import Any, Dict @@ -200,3 +201,21 @@ def test_replace_defaults( c._set_persistent(**set_persistent_vars) for key, value in exp_config_values.items(): assert getattr(c, key) == value + + +def reflex_dir_constant(): + return rx.constants.Reflex.DIR + + +def test_reflex_dir_env_var(monkeypatch, tmp_path): + """Test that the REFLEX_DIR environment variable is used to set the Reflex.DIR constant. + + Args: + monkeypatch: The pytest monkeypatch object. + tmp_path: The pytest tmp_path object. + """ + monkeypatch.setenv("REFLEX_DIR", str(tmp_path)) + + mp_ctx = multiprocessing.get_context(method="spawn") + with mp_ctx.Pool(processes=1) as pool: + assert pool.apply(reflex_dir_constant) == str(tmp_path) From a14575009c053f56f282a0a6c0985b70689b0754 Mon Sep 17 00:00:00 2001 From: Tianze Date: Thu, 1 Feb 2024 02:00:41 +0800 Subject: [PATCH 4/6] Minor fix on path to make it work in Windows (#2494) --- scripts/pyi_generator.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/pyi_generator.py b/scripts/pyi_generator.py index 98f87456d..4cd2972c4 100644 --- a/scripts/pyi_generator.py +++ b/scripts/pyi_generator.py @@ -703,7 +703,8 @@ class PyiGenerator: current_module: Any = {} def _write_pyi_file(self, module_path: Path, source: str): - relpath = _relative_to_pwd(module_path) + relpath = str(_relative_to_pwd(module_path)).replace("\\", "/") + print(f"Writing {relpath}") pyi_content = [ f'"""Stub file for {relpath}"""', "# ------------------- DO NOT EDIT ----------------------", @@ -731,9 +732,12 @@ class PyiGenerator: logger.info(f"Wrote {relpath}") def _scan_file(self, module_path: Path): - # module_import = str(module_path.with_suffix("")).replace("/", ".") module_import = ( - _relative_to_pwd(module_path).with_suffix("").as_posix().replace("/", ".") + _relative_to_pwd(module_path) + .with_suffix("") + .as_posix() + .replace("/", ".") + .replace("\\", ".") ) module = importlib.import_module(module_import) logger.debug(f"Read {module_path}") From 80dce21ac0e656cf55ea131269743ac39854ae9f Mon Sep 17 00:00:00 2001 From: jackie-pc Date: Wed, 31 Jan 2024 11:38:28 -0800 Subject: [PATCH 5/6] Revert "Revert "use process pool to compile faster (#2377)" (#2434)" (#2497) --- reflex/app.py | 184 ++++++++++++++++++++---------------- reflex/compiler/compiler.py | 110 +++++++++++++++++++++ 2 files changed, 213 insertions(+), 81 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index ddfa626ea..f19f8748f 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -6,7 +6,9 @@ import concurrent.futures import contextlib import copy import functools +import multiprocessing import os +import platform from typing import ( Any, AsyncIterator, @@ -35,6 +37,7 @@ from reflex.admin import AdminDash from reflex.base import Base from reflex.compiler import compiler from reflex.compiler import utils as compiler_utils +from reflex.compiler.compiler import ExecutorSafeFunctions from reflex.components import connection_modal from reflex.components.base.app_wrap import AppWrap from reflex.components.base.fragment import Fragment @@ -662,15 +665,24 @@ class App(Base): TimeElapsedColumn(), ) + # try to be somewhat accurate - but still not 100% + adhoc_steps_without_executor = 6 + fixed_pages_within_executor = 7 + progress.start() + task = progress.add_task( + "Compiling:", + total=len(self.pages) + + fixed_pages_within_executor + + adhoc_steps_without_executor, + ) + # Get the env mode. config = get_config() # Store the compile results. compile_results = [] - # Compile the pages in parallel. custom_components = set() - # TODO Anecdotally, processes=2 works 10% faster (cpu_count=12) all_imports = {} app_wrappers: Dict[tuple[int, str], Component] = { # Default app wrap component renders {children} @@ -680,127 +692,137 @@ class App(Base): # If a theme component was provided, wrap the app with it app_wrappers[(20, "Theme")] = self.theme - with progress, concurrent.futures.ThreadPoolExecutor() as thread_pool: - fixed_pages = 7 - task = progress.add_task("Compiling:", total=len(self.pages) + fixed_pages) + progress.advance(task) - def mark_complete(_=None): - progress.advance(task) + for _route, component in self.pages.items(): + # Merge the component style with the app style. + component.add_style(self.style) - for _route, component in self.pages.items(): - # Merge the component style with the app style. - component.add_style(self.style) + component.apply_theme(self.theme) - component.apply_theme(self.theme) + # Add component.get_imports() to all_imports. + all_imports.update(component.get_imports()) - # Add component.get_imports() to all_imports. - all_imports.update(component.get_imports()) + # Add the app wrappers from this component. + app_wrappers.update(component.get_app_wrap_components()) - # Add the app wrappers from this component. - app_wrappers.update(component.get_app_wrap_components()) + # Add the custom components from the page to the set. + custom_components |= component.get_custom_components() - # Add the custom components from the page to the set. - custom_components |= component.get_custom_components() + progress.advance(task) - # Perform auto-memoization of stateful components. - ( - stateful_components_path, - stateful_components_code, - page_components, - ) = compiler.compile_stateful_components(self.pages.values()) + # Perform auto-memoization of stateful components. + ( + stateful_components_path, + stateful_components_code, + page_components, + ) = compiler.compile_stateful_components(self.pages.values()) - # Catch "static" apps (that do not define a rx.State subclass) which are trying to access rx.State. - if ( - code_uses_state_contexts(stateful_components_code) - and self.state is None - ): - raise RuntimeError( - "To access rx.State in frontend components, at least one " - "subclass of rx.State must be defined in the app." - ) - compile_results.append((stateful_components_path, stateful_components_code)) + progress.advance(task) + # Catch "static" apps (that do not define a rx.State subclass) which are trying to access rx.State. + if code_uses_state_contexts(stateful_components_code) and self.state is None: + raise RuntimeError( + "To access rx.State in frontend components, at least one " + "subclass of rx.State must be defined in the app." + ) + compile_results.append((stateful_components_path, stateful_components_code)) + + app_root = self._app_root(app_wrappers=app_wrappers) + + progress.advance(task) + + # Prepopulate the global ExecutorSafeFunctions class with input data required by the compile functions. + # This is required for multiprocessing to work, in presence of non-picklable inputs. + for route, component in zip(self.pages, page_components): + ExecutorSafeFunctions.COMPILE_PAGE_ARGS_BY_ROUTE[route] = ( + route, + component, + self.state, + ) + + ExecutorSafeFunctions.COMPILE_APP_APP_ROOT = app_root + ExecutorSafeFunctions.CUSTOM_COMPONENTS = custom_components + ExecutorSafeFunctions.HEAD_COMPONENTS = self.head_components + ExecutorSafeFunctions.STYLE = self.style + ExecutorSafeFunctions.STATE = self.state + + # Use a forking process pool, if possible. Much faster, especially for large sites. + # Fallback to ThreadPoolExecutor as something that will always work. + executor = None + if platform.system() in ("Linux", "Darwin"): + executor = concurrent.futures.ProcessPoolExecutor( + mp_context=multiprocessing.get_context("fork") + ) + else: + executor = concurrent.futures.ThreadPoolExecutor() + + with executor: result_futures = [] - def submit_work(fn, *args, **kwargs): - """Submit work to the thread pool and add a callback to mark the task as complete. + def _mark_complete(_=None): + progress.advance(task) - The Future will be added to the `result_futures` list. - - Args: - fn: The function to submit. - *args: The args to submit. - **kwargs: The kwargs to submit. - """ - f = thread_pool.submit(fn, *args, **kwargs) - f.add_done_callback(mark_complete) + def _submit_work(fn, *args, **kwargs): + f = executor.submit(fn, *args, **kwargs) + f.add_done_callback(_mark_complete) result_futures.append(f) # Compile all page components. - for route, component in zip(self.pages, page_components): - submit_work( - compiler.compile_page, - route, - component, - self.state, - ) + for route in self.pages: + _submit_work(ExecutorSafeFunctions.compile_page, route) # Compile the app wrapper. - app_root = self._app_root(app_wrappers=app_wrappers) - submit_work(compiler.compile_app, app_root) + _submit_work(ExecutorSafeFunctions.compile_app) # Compile the custom components. - submit_work(compiler.compile_components, custom_components) + _submit_work(ExecutorSafeFunctions.compile_custom_components) # Compile the root stylesheet with base styles. - submit_work(compiler.compile_root_stylesheet, self.stylesheets) + _submit_work(compiler.compile_root_stylesheet, self.stylesheets) # Compile the root document. - submit_work(compiler.compile_document_root, self.head_components) + _submit_work(ExecutorSafeFunctions.compile_document_root) # Compile the theme. - submit_work(compiler.compile_theme, style=self.style) + _submit_work(ExecutorSafeFunctions.compile_theme) # Compile the contexts. - submit_work(compiler.compile_contexts, self.state) + _submit_work(ExecutorSafeFunctions.compile_contexts) # Compile the Tailwind config. if config.tailwind is not None: config.tailwind["content"] = config.tailwind.get( "content", constants.Tailwind.CONTENT ) - submit_work(compiler.compile_tailwind, config.tailwind) + _submit_work(compiler.compile_tailwind, config.tailwind) else: - submit_work(compiler.remove_tailwind_from_postcss) - - # Get imports from AppWrap components. - all_imports.update(app_root.get_imports()) - - # Iterate through all the custom components and add their imports to the all_imports. - for component in custom_components: - all_imports.update(component.get_imports()) + _submit_work(compiler.remove_tailwind_from_postcss) # Wait for all compilation tasks to complete. for future in concurrent.futures.as_completed(result_futures): compile_results.append(future.result()) - # Empty the .web pages directory. - compiler.purge_web_pages_dir() + # Get imports from AppWrap components. + all_imports.update(app_root.get_imports()) - # Avoid flickering when installing frontend packages - progress.stop() + # Iterate through all the custom components and add their imports to the all_imports. + for component in custom_components: + all_imports.update(component.get_imports()) - # Install frontend packages. - self.get_frontend_packages(all_imports) + progress.advance(task) - # Write the pages at the end to trigger the NextJS hot reload only once. - write_page_futures = [] - for output_path, code in compile_results: - write_page_futures.append( - thread_pool.submit(compiler_utils.write_page, output_path, code) - ) - for future in concurrent.futures.as_completed(write_page_futures): - future.result() + # Empty the .web pages directory. + compiler.purge_web_pages_dir() + + progress.advance(task) + progress.stop() + + # Install frontend packages. + self.get_frontend_packages(all_imports) + + for output_path, code in compile_results: + compiler_utils.write_page(output_path, code) self.add_default_endpoints() diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 51101ac6a..2b73a3689 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -454,3 +454,113 @@ def remove_tailwind_from_postcss() -> tuple[str, str]: def purge_web_pages_dir(): """Empty out .web directory.""" utils.empty_dir(constants.Dirs.WEB_PAGES, keep_files=["_app.js"]) + + +class ExecutorSafeFunctions: + """Helper class to allow parallelisation of parts of the compilation process. + + This class (and its class attributes) are available at global scope. + + In a multiprocessing context (like when using a ProcessPoolExecutor), the content of this + global class is logically replicated to any FORKED process. + + How it works: + * Before the child process is forked, ensure that we stash any input data required by any future + function call in the child process. + * After the child process is forked, the child process will have a copy of the global class, which + includes the previously stashed input data. + * Any task submitted to the child process simply needs a way to communicate which input data the + requested function call requires. + + Why do we need this? Passing input data directly to child process often not possible because the input data is not picklable. + The mechanic described here removes the need to pickle the input data at all. + + Limitations: + * This can never support returning unpicklable OUTPUT data. + * Any object mutations done by the child process will not propagate back to the parent process (fork goes one way!). + + """ + + COMPILE_PAGE_ARGS_BY_ROUTE = {} + COMPILE_APP_APP_ROOT: Component | None = None + CUSTOM_COMPONENTS: set[CustomComponent] | None = None + HEAD_COMPONENTS: list[Component] | None = None + STYLE: ComponentStyle | None = None + STATE: type[BaseState] | None = None + + @classmethod + def compile_page(cls, route: str): + """Compile a page. + + Args: + route: The route of the page to compile. + + Returns: + The path and code of the compiled page. + """ + return compile_page(*cls.COMPILE_PAGE_ARGS_BY_ROUTE[route]) + + @classmethod + def compile_app(cls): + """Compile the app. + + Returns: + The path and code of the compiled app. + + Raises: + ValueError: If the app root is not set. + """ + if cls.COMPILE_APP_APP_ROOT is None: + raise ValueError("COMPILE_APP_APP_ROOT should be set") + return compile_app(cls.COMPILE_APP_APP_ROOT) + + @classmethod + def compile_custom_components(cls): + """Compile the custom components. + + Returns: + The path and code of the compiled custom components. + + Raises: + ValueError: If the custom components are not set. + """ + if cls.CUSTOM_COMPONENTS is None: + raise ValueError("CUSTOM_COMPONENTS should be set") + return compile_components(cls.CUSTOM_COMPONENTS) + + @classmethod + def compile_document_root(cls): + """Compile the document root. + + Returns: + The path and code of the compiled document root. + + Raises: + ValueError: If the head components are not set. + """ + if cls.HEAD_COMPONENTS is None: + raise ValueError("HEAD_COMPONENTS should be set") + return compile_document_root(cls.HEAD_COMPONENTS) + + @classmethod + def compile_theme(cls): + """Compile the theme. + + Returns: + The path and code of the compiled theme. + + Raises: + ValueError: If the style is not set. + """ + if cls.STYLE is None: + raise ValueError("STYLE should be set") + return compile_theme(cls.STYLE) + + @classmethod + def compile_contexts(cls): + """Compile the contexts. + + Returns: + The path and code of the compiled contexts. + """ + return compile_contexts(cls.STATE) From 80c9eb34e4c1fb88081238040d3dc39135ae2aec Mon Sep 17 00:00:00 2001 From: jackie-pc Date: Wed, 31 Jan 2024 11:39:48 -0800 Subject: [PATCH 6/6] Rework telemetry to support installation_id (#2480) --- reflex/reflex.py | 4 ++++ reflex/utils/prerequisites.py | 44 ++++++++++++++++++++++++++++++++--- reflex/utils/telemetry.py | 10 ++++++-- tests/utils/test_utils.py | 2 +- 4 files changed, 54 insertions(+), 6 deletions(-) diff --git a/reflex/reflex.py b/reflex/reflex.py index 4ea16466c..2ba0cc5a8 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -80,6 +80,10 @@ def _init( prerequisites.check_latest_package_version(constants.Reflex.MODULE_NAME) + prerequisites.initialize_reflex_user_directory() + + prerequisites.ensure_reflex_installation_id() + # Set up the app directory, only if the config doesn't exist. if not os.path.exists(constants.Config.FILE): if template is None: diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 249b739cf..2b2109c22 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -16,7 +16,7 @@ import zipfile from fileinput import FileInput from pathlib import Path from types import ModuleType -from typing import Callable +from typing import Callable, Optional import httpx import pkg_resources @@ -824,10 +824,48 @@ def validate_frontend_dependencies(init=True): validate_bun() -def initialize_frontend_dependencies(): - """Initialize all the frontend dependencies.""" +def ensure_reflex_installation_id() -> Optional[int]: + """Ensures that a reflex distinct id has been generated and stored in the reflex directory. + + Returns: + Distinct id. + """ + try: + initialize_reflex_user_directory() + installation_id_file = os.path.join(constants.Reflex.DIR, "installation_id") + + installation_id = None + if os.path.exists(installation_id_file): + try: + with open(installation_id_file, "r") as f: + installation_id = int(f.read()) + except Exception: + # If anything goes wrong at all... just regenerate. + # Like what? Examples: + # - file not exists + # - file not readable + # - content not parseable as an int + pass + + if installation_id is None: + installation_id = random.getrandbits(128) + with open(installation_id_file, "w") as f: + f.write(str(installation_id)) + # If we get here, installation_id is definitely set + return installation_id + except Exception as e: + console.debug(f"Failed to ensure reflex installation id: {e}") + return None + + +def initialize_reflex_user_directory(): + """Initialize the reflex user directory.""" # Create the reflex directory. path_ops.mkdir(constants.Reflex.DIR) + + +def initialize_frontend_dependencies(): + """Initialize all the frontend dependencies.""" # validate dependencies before install validate_frontend_dependencies() # Install the frontend dependencies. diff --git a/reflex/utils/telemetry.py b/reflex/utils/telemetry.py index d6dd61d54..2b565f680 100644 --- a/reflex/utils/telemetry.py +++ b/reflex/utils/telemetry.py @@ -10,6 +10,7 @@ from datetime import datetime import psutil from reflex import constants +from reflex.utils.prerequisites import ensure_reflex_installation_id def get_os() -> str: @@ -79,15 +80,20 @@ def send(event: str, telemetry_enabled: bool | None = None) -> bool: if not telemetry_enabled: return False + installation_id = ensure_reflex_installation_id() + if installation_id is None: + return False + try: with open(constants.Dirs.REFLEX_JSON) as f: reflex_json = json.load(f) - distinct_id = reflex_json["project_hash"] + project_hash = reflex_json["project_hash"] post_hog = { "api_key": "phc_JoMo0fOyi0GQAooY3UyO9k0hebGkMyFJrrCw1Gt5SGb", "event": event, "properties": { - "distinct_id": distinct_id, + "distinct_id": installation_id, + "distinct_app_id": project_hash, "user_os": get_os(), "reflex_version": get_reflex_version(), "python_version": get_python_version(), diff --git a/tests/utils/test_utils.py b/tests/utils/test_utils.py index fac3fc3b7..0e2c48e50 100644 --- a/tests/utils/test_utils.py +++ b/tests/utils/test_utils.py @@ -485,7 +485,7 @@ def test_create_reflex_dir(mocker, is_windows): "reflex.utils.prerequisites.path_ops.mkdir", mocker.Mock() ) - prerequisites.initialize_frontend_dependencies() + prerequisites.initialize_reflex_user_directory() assert create_cmd.called