instruction stringlengths 0 1k | input stringlengths 1 1k | output stringlengths 10 6.51k |
|---|---|---|
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu popup component."""
props["data-slot"] = "context-menu-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class ContextMenuArrow(ContextMenuBaseComponent):
"""Displays an element positioned against the context menu anchor. Renders a <div> element."""
tag = "ContextMenu.Arrow"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu arrow component."""
props["data-slot"] = "context-menu-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class ContextMenuItem(ContextMenuBaseComponent):
"""An individual interactive item in the context menu. Renders a <div> element."""
|
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether to close the context menu when the item is clicked. Defaults to True.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu item component."""
props["data-slot"] = "context-menu-item"
cls.set_class_name(ClassNames.ITEM, props)
return super().create(*children, **props)
class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <d | tag = "ContextMenu.Item" |
Component:
"""Create the context menu arrow component."""
props["data-slot"] = "context-menu-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class ContextMenuItem(ContextMenuBaseComponent):
"""An individual interactive item in the context menu. Renders a <div> element."""
tag = "ContextMenu.Item"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether to close the context menu when the item is clicked. Defaults to True.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
|
class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
tag = "ContextMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu item component."""
props["data-slot"] = "context-menu-item"
cls.set_class_name(ClassNames.ITEM, props)
return super().create(*children, **props) |
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class ContextMenuItem(ContextMenuBaseComponent):
"""An individual interactive item in the context menu. Renders a <div> element."""
tag = "ContextMenu.Item"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether to close the context menu when the item is clicked. Defaults to True.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu item component."""
|
cls.set_class_name(ClassNames.ITEM, props)
return super().create(*children, **props)
class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
tag = "ContextMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def c | props["data-slot"] = "context-menu-item" |
nent):
"""An individual interactive item in the context menu. Renders a <div> element."""
tag = "ContextMenu.Item"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether to close the context menu when the item is clicked. Defaults to True.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu item component."""
props["data-slot"] = "context-menu-item"
cls.set_class_name(ClassNames.ITEM, props)
return super().create(*children, **props)
|
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(Cl | class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
tag = "ContextMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props) |
text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether to close the context menu when the item is clicked. Defaults to True.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu item component."""
props["data-slot"] = "context-menu-item"
cls.set_class_name(ClassNames.ITEM, props)
return super().create(*children, **props)
class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
|
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenu | tag = "ContextMenu.Separator" |
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu item component."""
props["data-slot"] = "context-menu-item"
cls.set_class_name(ClassNames.ITEM, props)
return super().create(*children, **props)
class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
tag = "ContextMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
|
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(Cl | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props) |
element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu item component."""
props["data-slot"] = "context-menu-item"
cls.set_class_name(ClassNames.ITEM, props)
return super().create(*children, **props)
class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
tag = "ContextMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
|
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group | props["data-slot"] = "context-menu-separator" |
e.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu item component."""
props["data-slot"] = "context-menu-item"
cls.set_class_name(ClassNames.ITEM, props)
return super().create(*children, **props)
class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
tag = "ContextMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
|
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called w | class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props) |
t:
"""Create the context menu item component."""
props["data-slot"] = "context-menu-item"
cls.set_class_name(ClassNames.ITEM, props)
return super().create(*children, **props)
class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
tag = "ContextMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
|
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a < | tag = "ContextMenu.Group" |
item"
cls.set_class_name(ClassNames.ITEM, props)
return super().create(*children, **props)
class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
tag = "ContextMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
|
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called w | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props) |
extMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
tag = "ContextMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
|
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
| props["data-slot"] = "context-menu-group" |
xtMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
|
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called when the value changes.
on_value_change: EventHandler[passthrough_event_spec(str | int, dict)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio group component."""
props["data-slot"] = "context-menu-radio-group"
cls.set_class_name(ClassNames.RADIO_GROUP, props)
return super().create(*children, **props)
| class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props) |
Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
|
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called when the value changes.
on_value_change: EventHandler[passthrough_event_spec(str | int, dict)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
| tag = "ContextMenu.GroupLabel" |
e the context menu separator component."""
props["data-slot"] = "context-menu-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
|
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called when the value changes.
on_value_change: EventHandler[passthrough_event_spec(str | int, dict)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio group component."""
props["data-slot"] = "context-menu-radio-group"
cls.set_class_name(ClassNames.RADIO_GROUP, props)
return super().create(*children, **props)
| def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props) |
lassNames.SEPARATOR, props)
return super().create(*children, **props)
class ContextMenuGroup(ContextMenuBaseComponent):
"""Groups related context menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
|
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called when the value changes.
on_value_change: EventHandler[passthrough_event_spec(str | int, dict)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio group component."""
props["data-slot"] = "context-menu-radio-group"
| props["data-slot"] = "context-menu-group-label" |
t menu items with the corresponding label. Renders a <div> element."""
tag = "ContextMenu.Group"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
|
class ContextMenuRadioItem(ContextMenuBaseComponent):
"""A context menu item that works like a radio button in a given group. Renders a <div> element."""
tag = "ContextMenu.RadioItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
value: Var[str | int]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
props["data-slot"] = "context-menu-rad | class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called when the value changes.
on_value_change: EventHandler[passthrough_event_spec(str | int, dict)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio group component."""
props["data-slot"] = "context-menu-radio-group"
cls.set_class_name(ClassNames.RADIO_GROUP, props)
return super().create(*children, **props) |
p.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group component."""
props["data-slot"] = "context-menu-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class ContextMenuGroupLabel(ContextMenuBaseComponent):
"""An accessible label that is automatically associated with its parent group. Renders a <div> element."""
tag = "ContextMenu.GroupLabel"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
|
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called when the value changes.
on_value_change: EventHandler[passthrough_event_spec(str | int, dict)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio group component."""
props["data-slot"] = "context-menu-radio-group"
cls.set_class_name(ClassNames.RADIO_GROUP, props)
return super().create(*children, **props)
class ContextMenuRadioItem(ContextMenuBaseComponent):
"""A context menu item that works like a radio button in a given group. Renders a <div> element."" | tag = "ContextMenu.RadioGroup" |
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu group label component."""
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called when the value changes.
on_value_change: EventHandler[passthrough_event_spec(str | int, dict)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
|
class ContextMenuRadioItem(ContextMenuBaseComponent):
"""A context menu item that works like a radio button in a given group. Renders a <div> element."""
tag = "ContextMenu.RadioItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
value: Var[str | int]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
props["data-slot"] = "context-menu-rad | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio group component."""
props["data-slot"] = "context-menu-radio-group"
cls.set_class_name(ClassNames.RADIO_GROUP, props)
return super().create(*children, **props) |
props["data-slot"] = "context-menu-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called when the value changes.
on_value_change: EventHandler[passthrough_event_spec(str | int, dict)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio group component."""
|
cls.set_class_name(ClassNames.RADIO_GROUP, props)
return super().create(*children, **props)
class ContextMenuRadioItem(ContextMenuBaseComponent):
"""A context menu item that works like a radio button in a given group. Renders a <div> element."""
tag = "ContextMenu.RadioItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
value: Var[str | int]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent | props["data-slot"] = "context-menu-radio-group" |
class ContextMenuRadioGroup(ContextMenuBaseComponent):
"""Groups related radio items. Renders a <div> element."""
tag = "ContextMenu.RadioGroup"
# The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called when the value changes.
on_value_change: EventHandler[passthrough_event_spec(str | int, dict)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio group component."""
props["data-slot"] = "context-menu-radio-group"
cls.set_class_name(ClassNames.RADIO_GROUP, props)
return super().create(*children, **props)
|
class ContextMenuRadioItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the radio item is selected. Renders a <div> element."""
tag = "ContextMenu.RadioItemIndicator"
# Whether to keep the indicator mounted in the DOM when the radio item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item indicator component."""
props["data-slot"] = "context-menu-radio-item-indicator"
cls.set_class_name(ClassNames.RADIO_ITEM_INDICATOR, props)
return super().create(*children, **props)
class ContextMenuCheckboxItem(ContextMenuBaseComponent):
"""A context menu item that toggles a setting on or off. Renders a <div> element."""
tag = "ContextMenu.CheckboxItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
l | class ContextMenuRadioItem(ContextMenuBaseComponent):
"""A context menu item that works like a radio button in a given group. Renders a <div> element."""
tag = "ContextMenu.RadioItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
value: Var[str | int]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
props["data-slot"] = "context-menu-radio-item"
cls.set_class_name(ClassNames.RADIO_ITEM, props)
return super().create(*children, **props) |
The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
default_value: Var[str | int]
# The controlled value of the radio group.
value: Var[str | int]
# Event handler called when the value changes.
on_value_change: EventHandler[passthrough_event_spec(str | int, dict)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio group component."""
props["data-slot"] = "context-menu-radio-group"
cls.set_class_name(ClassNames.RADIO_GROUP, props)
return super().create(*children, **props)
class ContextMenuRadioItem(ContextMenuBaseComponent):
"""A context menu item that works like a radio button in a given group. Renders a <div> element."""
|
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
value: Var[str | int]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
props["data-slot"] = "context-menu-radio-item"
cls.set_class_name(ClassNames.RADIO_ITEM, props)
return super().create(*children, **props)
class ContextMenuRadioItemIndicator(ContextMenuBaseComponent):
"""Indicat | tag = "ContextMenu.RadioItem" |
props["data-slot"] = "context-menu-radio-group"
cls.set_class_name(ClassNames.RADIO_GROUP, props)
return super().create(*children, **props)
class ContextMenuRadioItem(ContextMenuBaseComponent):
"""A context menu item that works like a radio button in a given group. Renders a <div> element."""
tag = "ContextMenu.RadioItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
value: Var[str | int]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
|
class ContextMenuRadioItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the radio item is selected. Renders a <div> element."""
tag = "ContextMenu.RadioItemIndicator"
# Whether to keep the indicator mounted in the DOM when the radio item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item indicator component."""
props["data-slot"] = "context-menu-radio-item-indicator"
cls.set_class_name(ClassNames.RADIO_ITEM_INDICATOR, props)
return super().create(*children, **props)
class ContextMenuCheckboxItem(ContextMenuBaseComponent):
"""A context menu item that toggles a setting on or off. Renders a <div> element."""
tag = "ContextMenu.CheckboxItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
l | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
props["data-slot"] = "context-menu-radio-item"
cls.set_class_name(ClassNames.RADIO_ITEM, props)
return super().create(*children, **props) |
urn super().create(*children, **props)
class ContextMenuRadioItem(ContextMenuBaseComponent):
"""A context menu item that works like a radio button in a given group. Renders a <div> element."""
tag = "ContextMenu.RadioItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
value: Var[str | int]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
|
cls.set_class_name(ClassNames.RADIO_ITEM, props)
return super().create(*children, **props)
class ContextMenuRadioItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the radio item is selected. Renders a <div> element."""
tag = "ContextMenu.RadioItemIndicator"
# Whether to keep the indicator mounted in the DOM when the radio item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item indicator component."""
props["data-slot"] = "context-menu-radio-item-indicator"
cls.set_class_name(ClassNames.RADIO_ITEM_INDICATOR, props)
return super().create(*children, **props)
class ContextMenuCheckboxItem(ContextMenuBaseComponent):
"""A context menu item that toggles a setting on or off. Renders a <div> element."""
tag = "ContextMenu.CheckboxI | props["data-slot"] = "context-menu-radio-item" |
a given group. Renders a <div> element."""
tag = "ContextMenu.RadioItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
value: Var[str | int]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
props["data-slot"] = "context-menu-radio-item"
cls.set_class_name(ClassNames.RADIO_ITEM, props)
return super().create(*children, **props)
|
class ContextMenuCheckboxItem(ContextMenuBaseComponent):
"""A context menu item that toggles a setting on or off. Renders a <div> element."""
tag = "ContextMenu.CheckboxItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the checkbox item is initially checked. To render a controlled checkbox item, use the checked prop instead. Defaults to False.
default_checked: Var[bool]
# Whether the checkbox item is currently checked. To render an uncontrolled checkbox item, use the default_checked prop instead.
checked: Var[bool]
# Event handler called when the checkbox item is ticked or unticked.
on_checked_change: EventHandler[passthrough_event_spec(bool, dict)]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set | class ContextMenuRadioItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the radio item is selected. Renders a <div> element."""
tag = "ContextMenu.RadioItemIndicator"
# Whether to keep the indicator mounted in the DOM when the radio item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item indicator component."""
props["data-slot"] = "context-menu-radio-item-indicator"
cls.set_class_name(ClassNames.RADIO_ITEM_INDICATOR, props)
return super().create(*children, **props) |
keyboard text navigation.
label: Var[str]
value: Var[str | int]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
props["data-slot"] = "context-menu-radio-item"
cls.set_class_name(ClassNames.RADIO_ITEM, props)
return super().create(*children, **props)
class ContextMenuRadioItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the radio item is selected. Renders a <div> element."""
|
# Whether to keep the indicator mounted in the DOM when the radio item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item indicator component."""
props["data-slot"] = "context-menu-radio-item-indicator"
cls.set_class_name(ClassNames.RADIO_ITEM_INDICATOR, props)
return super().create(*children, **props)
class ContextMenuCheckboxItem(ContextMenuBaseComponent):
"""A context menu item that toggles a setting on or off. Renders a <div> element."""
tag = "ContextMenu.CheckboxItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the checkbox item is initially checked. To render a controlled checkbox item, use the checked prop instead. Defaults to False.
default_checked: Var[bool]
| tag = "ContextMenu.RadioItemIndicator" |
en replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
props["data-slot"] = "context-menu-radio-item"
cls.set_class_name(ClassNames.RADIO_ITEM, props)
return super().create(*children, **props)
class ContextMenuRadioItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the radio item is selected. Renders a <div> element."""
tag = "ContextMenu.RadioItemIndicator"
# Whether to keep the indicator mounted in the DOM when the radio item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
|
class ContextMenuCheckboxItem(ContextMenuBaseComponent):
"""A context menu item that toggles a setting on or off. Renders a <div> element."""
tag = "ContextMenu.CheckboxItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the checkbox item is initially checked. To render a controlled checkbox item, use the checked prop instead. Defaults to False.
default_checked: Var[bool]
# Whether the checkbox item is currently checked. To render an uncontrolled checkbox item, use the default_checked prop instead.
checked: Var[bool]
# Event handler called when the checkbox item is ticked or unticked.
on_checked_change: EventHandler[passthrough_event_spec(bool, dict)]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item indicator component."""
props["data-slot"] = "context-menu-radio-item-indicator"
cls.set_class_name(ClassNames.RADIO_ITEM_INDICATOR, props)
return super().create(*children, **props) |
[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
props["data-slot"] = "context-menu-radio-item"
cls.set_class_name(ClassNames.RADIO_ITEM, props)
return super().create(*children, **props)
class ContextMenuRadioItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the radio item is selected. Renders a <div> element."""
tag = "ContextMenu.RadioItemIndicator"
# Whether to keep the indicator mounted in the DOM when the radio item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item indicator component."""
|
cls.set_class_name(ClassNames.RADIO_ITEM_INDICATOR, props)
return super().create(*children, **props)
class ContextMenuCheckboxItem(ContextMenuBaseComponent):
"""A context menu item that toggles a setting on or off. Renders a <div> element."""
tag = "ContextMenu.CheckboxItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the checkbox item is initially checked. To render a controlled checkbox item, use the checked prop instead. Defaults to False.
default_checked: Var[bool]
# Whether the checkbox item is currently checked. To render an uncontrolled checkbox item, use the default_checked prop instead.
checked: Var[bool]
# Event handler called when the checkbox item is ticked or unticked.
on_checked_change: EventHandler[passthrough_event_spec(bool, dict)]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_clic | props["data-slot"] = "context-menu-radio-item-indicator" |
thod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item component."""
props["data-slot"] = "context-menu-radio-item"
cls.set_class_name(ClassNames.RADIO_ITEM, props)
return super().create(*children, **props)
class ContextMenuRadioItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the radio item is selected. Renders a <div> element."""
tag = "ContextMenu.RadioItemIndicator"
# Whether to keep the indicator mounted in the DOM when the radio item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu radio item indicator component."""
props["data-slot"] = "context-menu-radio-item-indicator"
cls.set_class_name(ClassNames.RADIO_ITEM_INDICATOR, props)
return super().create(*children, **props)
|
class ContextMenuCheckboxItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the checkbox item is ticked. Renders a <div> element."""
tag = "ContextMenu.CheckboxItemIndicator"
# Whether to keep the indicator mounted in the DOM when the checkbox item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item indicator component."""
props["data-slot"] = "context-menu-checkbox-item-indicator"
cls.set_class_name(ClassNames.CHECKBOX_ITEM_INDICATOR, props)
return super().create(*children, **props)
class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
"""Groups all parts of a submenu. Doesn't render its own HTML element."""
tag = "ContextMenu.SubmenuRoot"
# Whether the submenu is initially open. To render a controlled submenu, use the open prop | class ContextMenuCheckboxItem(ContextMenuBaseComponent):
"""A context menu item that toggles a setting on or off. Renders a <div> element."""
tag = "ContextMenu.CheckboxItem"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the checkbox item is initially checked. To render a controlled checkbox item, use the checked prop instead. Defaults to False.
default_checked: Var[bool]
# Whether the checkbox item is currently checked. To render an uncontrolled checkbox item, use the default_checked prop instead.
checked: Var[bool]
# Event handler called when the checkbox item is ticked or unticked.
on_checked_change: EventHandler[passthrough_event_spec(bool, dict)]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item component."""
props["data-slot"] = "context-menu-checkbox-item"
cls.set_class_name(ClassNames.CHECKBOX_ITEM, props)
return super().create(*children, **props) |
tion.
label: Var[str]
# Whether the checkbox item is initially checked. To render a controlled checkbox item, use the checked prop instead. Defaults to False.
default_checked: Var[bool]
# Whether the checkbox item is currently checked. To render an uncontrolled checkbox item, use the default_checked prop instead.
checked: Var[bool]
# Event handler called when the checkbox item is ticked or unticked.
on_checked_change: EventHandler[passthrough_event_spec(bool, dict)]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
|
class ContextMenuCheckboxItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the checkbox item is ticked. Renders a <div> element."""
tag = "ContextMenu.CheckboxItemIndicator"
# Whether to keep the indicator mounted in the DOM when the checkbox item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item indicator component."""
props["data-slot"] = "context-menu-checkbox-item-indicator"
cls.set_class_name(ClassNames.CHECKBOX_ITEM_INDICATOR, props)
return super().create(*children, **props)
class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
"""Groups all parts of a submenu. Doesn't render its own HTML element."""
tag = "ContextMenu.SubmenuRoot"
# Whether the submenu is initially open. To render a controlled submenu, use the open prop | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item component."""
props["data-slot"] = "context-menu-checkbox-item"
cls.set_class_name(ClassNames.CHECKBOX_ITEM, props)
return super().create(*children, **props) |
checked prop instead. Defaults to False.
default_checked: Var[bool]
# Whether the checkbox item is currently checked. To render an uncontrolled checkbox item, use the default_checked prop instead.
checked: Var[bool]
# Event handler called when the checkbox item is ticked or unticked.
on_checked_change: EventHandler[passthrough_event_spec(bool, dict)]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item component."""
|
cls.set_class_name(ClassNames.CHECKBOX_ITEM, props)
return super().create(*children, **props)
class ContextMenuCheckboxItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the checkbox item is ticked. Renders a <div> element."""
tag = "ContextMenu.CheckboxItemIndicator"
# Whether to keep the indicator mounted in the DOM when the checkbox item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item indicator component."""
props["data-slot"] = "context-menu-checkbox-item-indicator"
cls.set_class_name(ClassNames.CHECKBOX_ITEM_INDICATOR, props)
return super().create(*children, **props)
class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
"""Groups all parts of a submenu. Doesn't render its own HTML element."""
tag = "ContextMenu | props["data-slot"] = "context-menu-checkbox-item" |
item, use the default_checked prop instead.
checked: Var[bool]
# Event handler called when the checkbox item is ticked or unticked.
on_checked_change: EventHandler[passthrough_event_spec(bool, dict)]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item component."""
props["data-slot"] = "context-menu-checkbox-item"
cls.set_class_name(ClassNames.CHECKBOX_ITEM, props)
return super().create(*children, **props)
|
class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
"""Groups all parts of a submenu. Doesn't render its own HTML element."""
tag = "ContextMenu.SubmenuRoot"
# Whether the submenu is initially open. To render a controlled submenu, use the open prop instead. Defaults to False.
default_open: Var[bool]
# Whether the submenu is currently open.
open: Var[bool]
# Event handler called when the submenu is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. Defaults to True.
close_parent_on_esc: Var[bool]
# Event handler called after any animations complete when the submenu is closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# Whether the submenu should | class ContextMenuCheckboxItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the checkbox item is ticked. Renders a <div> element."""
tag = "ContextMenu.CheckboxItemIndicator"
# Whether to keep the indicator mounted in the DOM when the checkbox item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item indicator component."""
props["data-slot"] = "context-menu-checkbox-item-indicator"
cls.set_class_name(ClassNames.CHECKBOX_ITEM_INDICATOR, props)
return super().create(*children, **props) |
ed_change: EventHandler[passthrough_event_spec(bool, dict)]
# Whether to close the context menu when the item is clicked. Defaults to False.
close_on_click: Var[bool]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item component."""
props["data-slot"] = "context-menu-checkbox-item"
cls.set_class_name(ClassNames.CHECKBOX_ITEM, props)
return super().create(*children, **props)
class ContextMenuCheckboxItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the checkbox item is ticked. Renders a <div> element."""
|
# Whether to keep the indicator mounted in the DOM when the checkbox item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item indicator component."""
props["data-slot"] = "context-menu-checkbox-item-indicator"
cls.set_class_name(ClassNames.CHECKBOX_ITEM_INDICATOR, props)
return super().create(*children, **props)
class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
"""Groups all parts of a submenu. Doesn't render its own HTML element."""
tag = "ContextMenu.SubmenuRoot"
# Whether the submenu is initially open. To render a controlled submenu, use the open prop instead. Defaults to False.
default_open: Var[bool]
# Whether the submenu is currently open.
open: Var[bool]
# Event handler called when the submenu is opened or closed.
on_op | tag = "ContextMenu.CheckboxItemIndicator" |
ildren, **props) -> BaseUIComponent:
"""Create the context menu checkbox item component."""
props["data-slot"] = "context-menu-checkbox-item"
cls.set_class_name(ClassNames.CHECKBOX_ITEM, props)
return super().create(*children, **props)
class ContextMenuCheckboxItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the checkbox item is ticked. Renders a <div> element."""
tag = "ContextMenu.CheckboxItemIndicator"
# Whether to keep the indicator mounted in the DOM when the checkbox item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item indicator component."""
props["data-slot"] = "context-menu-checkbox-item-indicator"
cls.set_class_name(ClassNames.CHECKBOX_ITEM_INDICATOR, props)
return super().create(*children, **props)
|
class ContextMenuSubmenuTrigger(ContextMenuBaseComponent):
"""A context menu item that opens a submenu."""
tag = "ContextMenu.SubmenuTrigger"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu trigger component."""
props["data-slot"] = "context-menu-submenu-trigger"
cls.set_class_name(ClassNames.SUBMENU_TRIGGER, props)
return super().create(*children, **props)
class HighLevelContextMenu(ContextMenuRoot):
"""High level wrapper for the ContextMenu component."""
# The trigger component to use for the context | class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
"""Groups all parts of a submenu. Doesn't render its own HTML element."""
tag = "ContextMenu.SubmenuRoot"
# Whether the submenu is initially open. To render a controlled submenu, use the open prop instead. Defaults to False.
default_open: Var[bool]
# Whether the submenu is currently open.
open: Var[bool]
# Event handler called when the submenu is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. Defaults to True.
close_parent_on_esc: Var[bool]
# Event handler called after any animations complete when the submenu is closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# Whether the submenu should also open when the trigger is hovered. Defaults to True.
open_on_hover: Var[bool]
# How long to wait before the submenu may be opened on hover. Specified in milliseconds. Requires the open_on_hover prop. Defaults to 100.
delay: Var[int]
# How long to wait before closing the submenu that was opened on hover. Specified in milliseconds. Requires the open_on_hover prop. Defaults to 0.
close_delay: Var[int]
# Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True.
loop: Var[bool]
# The visual orientation of the submenu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu root component."""
props["data-slot"] = "context-menu-submenu-root"
return super().create(*children, **props) |
enu-checkbox-item"
cls.set_class_name(ClassNames.CHECKBOX_ITEM, props)
return super().create(*children, **props)
class ContextMenuCheckboxItemIndicator(ContextMenuBaseComponent):
"""Indicates whether the checkbox item is ticked. Renders a <div> element."""
tag = "ContextMenu.CheckboxItemIndicator"
# Whether to keep the indicator mounted in the DOM when the checkbox item is not checked. Defaults to False.
keep_mounted: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu checkbox item indicator component."""
props["data-slot"] = "context-menu-checkbox-item-indicator"
cls.set_class_name(ClassNames.CHECKBOX_ITEM_INDICATOR, props)
return super().create(*children, **props)
class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
"""Groups all parts of a submenu. Doesn't render its own HTML element."""
|
# Whether the submenu is initially open. To render a controlled submenu, use the open prop instead. Defaults to False.
default_open: Var[bool]
# Whether the submenu is currently open.
open: Var[bool]
# Event handler called when the submenu is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. Defaults to True.
close_parent_on_esc: Var[bool]
# Event handler called after any animations complete when the submenu is closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# Whether the submenu should also open when the trigger is hovered. Defaults to True.
open_on_hover: Var[bool]
# How long to wait before the submenu may be opened on hover. Specified in millis | tag = "ContextMenu.SubmenuRoot" |
_spec(bool)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# Whether the submenu should also open when the trigger is hovered. Defaults to True.
open_on_hover: Var[bool]
# How long to wait before the submenu may be opened on hover. Specified in milliseconds. Requires the open_on_hover prop. Defaults to 100.
delay: Var[int]
# How long to wait before closing the submenu that was opened on hover. Specified in milliseconds. Requires the open_on_hover prop. Defaults to 0.
close_delay: Var[int]
# Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True.
loop: Var[bool]
# The visual orientation of the submenu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
|
class ContextMenuSubmenuTrigger(ContextMenuBaseComponent):
"""A context menu item that opens a submenu."""
tag = "ContextMenu.SubmenuTrigger"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu trigger component."""
props["data-slot"] = "context-menu-submenu-trigger"
cls.set_class_name(ClassNames.SUBMENU_TRIGGER, props)
return super().create(*children, **props)
class HighLevelContextMenu(ContextMenuRoot):
"""High level wrapper for the ContextMenu component."""
# The trigger component to use for the context | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu root component."""
props["data-slot"] = "context-menu-submenu-root"
return super().create(*children, **props) |
ether the submenu should also open when the trigger is hovered. Defaults to True.
open_on_hover: Var[bool]
# How long to wait before the submenu may be opened on hover. Specified in milliseconds. Requires the open_on_hover prop. Defaults to 100.
delay: Var[int]
# How long to wait before closing the submenu that was opened on hover. Specified in milliseconds. Requires the open_on_hover prop. Defaults to 0.
close_delay: Var[int]
# Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True.
loop: Var[bool]
# The visual orientation of the submenu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu root component."""
|
return super().create(*children, **props)
class ContextMenuSubmenuTrigger(ContextMenuBaseComponent):
"""A context menu item that opens a submenu."""
tag = "ContextMenu.SubmenuTrigger"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu trigger component."""
props["data-slot"] = "context-menu-submenu-trigger"
cls.set_class_name(ClassNames.SUBMENU_TRIGGER, props)
return super().create(*children, **props)
class HighLevelContextMenu(ContextMenuRoot):
"""High level wrapper for the ContextMenu component."""
| props["data-slot"] = "context-menu-submenu-root" |
Var[bool]
# How long to wait before the submenu may be opened on hover. Specified in milliseconds. Requires the open_on_hover prop. Defaults to 100.
delay: Var[int]
# How long to wait before closing the submenu that was opened on hover. Specified in milliseconds. Requires the open_on_hover prop. Defaults to 0.
close_delay: Var[int]
# Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True.
loop: Var[bool]
# The visual orientation of the submenu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu root component."""
props["data-slot"] = "context-menu-submenu-root"
return super().create(*children, **props)
|
class HighLevelContextMenu(ContextMenuRoot):
"""High level wrapper for the ContextMenu component."""
# The trigger component to use for the context menu
trigger: Var[Component | None]
# The list of items to display in the context menu - can be strings or tuples of (label, on_click_handler)
items: Var[list[str | tuple[str, EventHandler]]]
# The size of the context menu. Defaults to "md".
size: Var[LiteralMenuSize]
# Props for different component parts
_item_props = {"close_on_click"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
| class ContextMenuSubmenuTrigger(ContextMenuBaseComponent):
"""A context menu item that opens a submenu."""
tag = "ContextMenu.SubmenuTrigger"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu trigger component."""
props["data-slot"] = "context-menu-submenu-trigger"
cls.set_class_name(ClassNames.SUBMENU_TRIGGER, props)
return super().create(*children, **props) |
open_on_hover prop. Defaults to 100.
delay: Var[int]
# How long to wait before closing the submenu that was opened on hover. Specified in milliseconds. Requires the open_on_hover prop. Defaults to 0.
close_delay: Var[int]
# Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True.
loop: Var[bool]
# The visual orientation of the submenu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu root component."""
props["data-slot"] = "context-menu-submenu-root"
return super().create(*children, **props)
class ContextMenuSubmenuTrigger(ContextMenuBaseComponent):
"""A context menu item that opens a submenu."""
|
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu trigger component."""
props["data-slot"] = "context-menu-submenu-trigger"
cls.set_class_name(ClassNames.SUBMENU_TRIGGER, props)
return super().create(*children, **props)
class HighLevelContextMenu(ContextMenuRoot):
"""High level wrapper for the ContextMenu component."""
# The trigger component to use for the context menu
trigger: Var[Component | None]
# The list of items to display in the context menu - can be strings or tuples of (label, on_click_handler)
| tag = "ContextMenu.SubmenuTrigger" |
f the submenu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
orientation: Var[LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu root component."""
props["data-slot"] = "context-menu-submenu-root"
return super().create(*children, **props)
class ContextMenuSubmenuTrigger(ContextMenuBaseComponent):
"""A context menu item that opens a submenu."""
tag = "ContextMenu.SubmenuTrigger"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
|
class HighLevelContextMenu(ContextMenuRoot):
"""High level wrapper for the ContextMenu component."""
# The trigger component to use for the context menu
trigger: Var[Component | None]
# The list of items to display in the context menu - can be strings or tuples of (label, on_click_handler)
items: Var[list[str | tuple[str, EventHandler]]]
# The size of the context menu. Defaults to "md".
size: Var[LiteralMenuSize]
# Props for different component parts
_item_props = {"close_on_click"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
| def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu trigger component."""
props["data-slot"] = "context-menu-submenu-trigger"
cls.set_class_name(ClassNames.SUBMENU_TRIGGER, props)
return super().create(*children, **props) |
LiteralMenuOrientation]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu root component."""
props["data-slot"] = "context-menu-submenu-root"
return super().create(*children, **props)
class ContextMenuSubmenuTrigger(ContextMenuBaseComponent):
"""A context menu item that opens a submenu."""
tag = "ContextMenu.SubmenuTrigger"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu trigger component."""
|
cls.set_class_name(ClassNames.SUBMENU_TRIGGER, props)
return super().create(*children, **props)
class HighLevelContextMenu(ContextMenuRoot):
"""High level wrapper for the ContextMenu component."""
# The trigger component to use for the context menu
trigger: Var[Component | None]
# The list of items to display in the context menu - can be strings or tuples of (label, on_click_handler)
items: Var[list[str | tuple[str, EventHandler]]]
# The size of the context menu. Defaults to "md".
size: Var[LiteralMenuSize]
# Props for different component parts
_item_props = {"close_on_click"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
_portal_props = {"container", "keep_mounted"}
@class | props["data-slot"] = "context-menu-submenu-trigger" |
o true if the rendered element is a native button. Defaults to False.
native_button: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu submenu trigger component."""
props["data-slot"] = "context-menu-submenu-trigger"
cls.set_class_name(ClassNames.SUBMENU_TRIGGER, props)
return super().create(*children, **props)
class HighLevelContextMenu(ContextMenuRoot):
"""High level wrapper for the ContextMenu component."""
# The trigger component to use for the context menu
trigger: Var[Component | None]
# The list of items to display in the context menu - can be strings or tuples of (label, on_click_handler)
items: Var[list[str | tuple[str, EventHandler]]]
# The size of the context menu. Defaults to "md".
size: Var[LiteralMenuSize]
# Props for different component parts
_item_props = {"close_on_click"}
|
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
item_props = {k: props.pop(k) for k in cls._item_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
items = props.pop("items", [])
size = props.pop("size", "md")
def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
if isinsta | _positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
} |
props["data-slot"] = "context-menu-submenu-trigger"
cls.set_class_name(ClassNames.SUBMENU_TRIGGER, props)
return super().create(*children, **props)
class HighLevelContextMenu(ContextMenuRoot):
"""High level wrapper for the ContextMenu component."""
# The trigger component to use for the context menu
trigger: Var[Component | None]
# The list of items to display in the context menu - can be strings or tuples of (label, on_click_handler)
items: Var[list[str | tuple[str, EventHandler]]]
# The size of the context menu. Defaults to "md".
size: Var[LiteralMenuSize]
# Props for different component parts
_item_props = {"close_on_click"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
|
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
item_props = {k: props.pop(k) for k in cls._item_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
items = props.pop("items", [])
size = props.pop("size", "md")
def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
if isinstance(item, tuple):
label, on_click_ | _portal_props = {"container", "keep_mounted"} |
on_click_handler)
items: Var[list[str | tuple[str, EventHandler]]]
# The size of the context menu. Defaults to "md".
size: Var[LiteralMenuSize]
# Props for different component parts
_item_props = {"close_on_click"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
|
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
items = props.pop("items", [])
size = props.pop("size", "md")
def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
if isinstance(item, tuple):
label, on_click_handler = item
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**it | item_props = {k: props.pop(k) for k in cls._item_props & props.keys()} |
he size of the context menu. Defaults to "md".
size: Var[LiteralMenuSize]
# Props for different component parts
_item_props = {"close_on_click"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
item_props = {k: props.pop(k) for k in cls._item_props & props.keys()}
|
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
items = props.pop("items", [])
size = props.pop("size", "md")
def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
if isinstance(item, tuple):
label, on_click_handler = item
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
)
return ContextMenuItem.create(
render_=button(
| positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
} |
t parts
_item_props = {"close_on_click"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
item_props = {k: props.pop(k) for k in cls._item_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
|
trigger = props.pop("trigger", None)
items = props.pop("items", [])
size = props.pop("size", "md")
def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
if isinstance(item, tuple):
label, on_click_handler = item
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
)
return ContextMenuItem.create(
render_=button(
item,
variant="ghost",
class_name | portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()} |
n",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
item_props = {k: props.pop(k) for k in cls._item_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
|
items = props.pop("items", [])
size = props.pop("size", "md")
def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
if isinstance(item, tuple):
label, on_click_handler = item
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
)
return ContextMenuItem.create(
render_=button(
item,
variant="ghost",
class_name=ClassNames.ITEM,
disabled | trigger = props.pop("trigger", None) |
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
item_props = {k: props.pop(k) for k in cls._item_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
|
size = props.pop("size", "md")
def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
if isinstance(item, tuple):
label, on_click_handler = item
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
)
return ContextMenuItem.create(
render_=button(
item,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
| items = props.pop("items", []) |
ion_padding",
"sticky",
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
item_props = {k: props.pop(k) for k in cls._item_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
items = props.pop("items", [])
|
def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
if isinstance(item, tuple):
label, on_click_handler = item
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
)
return ContextMenuItem.create(
render_=button(
item,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
size=size,
| size = props.pop("size", "md") |
"position_method",
"track_anchor",
"side_offset",
"collision_avoidance",
"collision_boundary",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
item_props = {k: props.pop(k) for k in cls._item_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
items = props.pop("items", [])
size = props.pop("size", "md")
|
if isinstance(items, Var):
items_children = foreach(items, create_context_menu_item)
else:
items_children = [create_context_menu_item(item) for item in items]
return ContextMenuRoot.create(
(
ContextMenuTrigger.create(
render_=trigger,
)
if trigger
else None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props | def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
if isinstance(item, tuple):
label, on_click_handler = item
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
)
return ContextMenuItem.create(
render_=button(
item,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
size=size,
type="button",
),
key=item,
**item_props,
) |
ry",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
item_props = {k: props.pop(k) for k in cls._item_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
items = props.pop("items", [])
size = props.pop("size", "md")
def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
|
return ContextMenuItem.create(
render_=button(
item,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
size=size,
type="button",
),
key=item,
**item_props,
)
if isinstance(items, Var):
items_children = foreach(items, create_context_menu_item)
else:
items_children = [create_context_menu_item(item) for item in items]
return ContextMenuRoot.create(
(
ContextMenuTrigger.create(
render_=trigger,
)
if trigger
else None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
| if isinstance(item, tuple):
label, on_click_handler = item
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
) |
"keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a context menu component.
Args:
*children: Additional children to include in the context menu.
**props: Additional properties to apply to the context menu component.
Returns:
The context menu component.
"""
# Extract props for different parts
item_props = {k: props.pop(k) for k in cls._item_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
items = props.pop("items", [])
size = props.pop("size", "md")
def create_context_menu_item(
item: str | tuple[str, EventHandler],
) -> BaseUIComponent:
if isinstance(item, tuple):
|
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
)
return ContextMenuItem.create(
render_=button(
item,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
size=size,
type="button",
),
key=item,
**item_props,
)
if isinstance(items, Var):
items_children = foreach(items, create_context_men | label, on_click_handler = item |
t:
if isinstance(item, tuple):
label, on_click_handler = item
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
)
return ContextMenuItem.create(
render_=button(
item,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
size=size,
type="button",
),
key=item,
**item_props,
)
|
return ContextMenuRoot.create(
(
ContextMenuTrigger.create(
render_=trigger,
)
if trigger
else None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""N | if isinstance(items, Var):
items_children = foreach(items, create_context_menu_item)
else:
items_children = [create_context_menu_item(item) for item in items] |
e):
label, on_click_handler = item
return ContextMenuItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
)
return ContextMenuItem.create(
render_=button(
item,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
size=size,
type="button",
),
key=item,
**item_props,
)
if isinstance(items, Var):
|
else:
items_children = [create_context_menu_item(item) for item in items]
return ContextMenuRoot.create(
(
ContextMenuTrigger.create(
render_=trigger,
)
if trigger
else None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
| items_children = foreach(items, create_context_menu_item) |
uItem.create(
render_=button(
label,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
on_click=on_click_handler,
size=size,
type="button",
),
key=label,
**item_props,
)
return ContextMenuItem.create(
render_=button(
item,
variant="ghost",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
size=size,
type="button",
),
key=item,
**item_props,
)
if isinstance(items, Var):
items_children = foreach(items, create_context_menu_item)
else:
|
return ContextMenuRoot.create(
(
ContextMenuTrigger.create(
render_=trigger,
)
if trigger
else None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""N | items_children = [create_context_menu_item(item) for item in items] |
ops,
)
if isinstance(items, Var):
items_children = foreach(items, create_context_menu_item)
else:
items_children = [create_context_menu_item(item) for item in items]
return ContextMenuRoot.create(
(
ContextMenuTrigger.create(
render_=trigger,
)
if trigger
else None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
|
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheck | def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
] |
eate_context_menu_item(item) for item in items]
return ContextMenuRoot.create(
(
ContextMenuTrigger.create(
render_=trigger,
)
if trigger
else None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
|
context_menu = ContextMenu()
| class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create) |
(
ContextMenuTrigger.create(
render_=trigger,
)
if trigger
else None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
|
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubm | root = staticmethod(ContextMenuRoot.create) |
ate(
render_=trigger,
)
if trigger
else None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
|
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__ | trigger = staticmethod(ContextMenuTrigger.create) |
)
if trigger
else None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
|
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
| portal = staticmethod(ContextMenuPortal.create) |
e None
),
ContextMenuPortal.create(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
|
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| backdrop = staticmethod(ContextMenuBackdrop.create) |
te(
ContextMenuPositioner.create(
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
|
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| positioner = staticmethod(ContextMenuPositioner.create) |
ContextMenuPopup.create(
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
|
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| popup = staticmethod(ContextMenuPopup.create) |
items_children,
*children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
|
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| arrow = staticmethod(ContextMenuArrow.create) |
children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
|
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| item = staticmethod(ContextMenuItem.create) |
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
|
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| separator = staticmethod(ContextMenuSeparator.create) |
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
|
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| group = staticmethod(ContextMenuGroup.create) |
size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
|
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| group_label = staticmethod(ContextMenuGroupLabel.create) |
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
|
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| radio_group = staticmethod(ContextMenuRadioGroup.create) |
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
|
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| radio_item = staticmethod(ContextMenuRadioItem.create) |
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
|
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create) |
eturn [
*super()._exclude_props(),
"trigger",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
|
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| checkbox_item = staticmethod(ContextMenuCheckboxItem.create) |
er",
"items",
"size",
]
class ContextMenu(ComponentNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
|
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create) |
tNamespace):
"""Namespace for ContextMenu components."""
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
|
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| submenu_root = staticmethod(ContextMenuSubmenuRoot.create) |
root = staticmethod(ContextMenuRoot.create)
trigger = staticmethod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
|
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create) |
thod(ContextMenuTrigger.create)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
|
__call__ = staticmethod(HighLevelContextMenu.create)
context_menu = ContextMenu()
| class_names = ClassNames |
e)
portal = staticmethod(ContextMenuPortal.create)
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
|
context_menu = ContextMenu()
| __call__ = staticmethod(HighLevelContextMenu.create) |
backdrop = staticmethod(ContextMenuBackdrop.create)
positioner = staticmethod(ContextMenuPositioner.create)
popup = staticmethod(ContextMenuPopup.create)
arrow = staticmethod(ContextMenuArrow.create)
item = staticmethod(ContextMenuItem.create)
separator = staticmethod(ContextMenuSeparator.create)
group = staticmethod(ContextMenuGroup.create)
group_label = staticmethod(ContextMenuGroupLabel.create)
radio_group = staticmethod(ContextMenuRadioGroup.create)
radio_item = staticmethod(ContextMenuRadioItem.create)
radio_item_indicator = staticmethod(ContextMenuRadioItemIndicator.create)
checkbox_item = staticmethod(ContextMenuCheckboxItem.create)
checkbox_item_indicator = staticmethod(ContextMenuCheckboxItemIndicator.create)
submenu_root = staticmethod(ContextMenuSubmenuRoot.create)
submenu_trigger = staticmethod(ContextMenuSubmenuTrigger.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelContextMenu.create)
| context_menu = ContextMenu() | |
"""Custom dialog component."""
|
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl fo | from typing import Literal |
"""Custom dialog component."""
from typing import Literal
|
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondar | from reflex.components.component import Component, ComponentNamespace |
"""Custom dialog component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
|
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex f | from reflex.components.el import Div |
"""Custom dialog component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el import Div
|
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap | from reflex.event import EventHandler, passthrough_event_spec |
"""Custom dialog component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
|
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = | from reflex.utils.imports import ImportVar |
"""Custom dialog component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
|
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(Ba | from reflex.vars.base import Var |
"""Custom dialog component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
|
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog comp | from reflex_ui.components.base.button import button |
"""Custom dialog component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
|
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
d | from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent |
"""Custom dialog component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
|
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import v | from reflex_ui.components.icons.hugeicon import hi |
"""Custom dialog component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
|
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False)
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element | BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80" |
"""Custom dialog component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
|
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False)
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
tag = "Dialog.Root"
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthro | POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" |
yping import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
|
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False)
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
tag = "Dialog.Root"
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether t | TITLE = "text-2xl font-semibold text-secondary-12" |
import Component, ComponentNamespace
from reflex.components.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
|
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False)
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
tag = "Dialog.Root"
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to Tru | DESCRIPTION = "text-sm text-secondary-11 font-[450]" |
ts.el import Div
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
|
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False)
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
tag = "Dialog.Root"
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if | HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4" |
dler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
|
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False)
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
tag = "Dialog.Root"
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if the dialog enters a modal state when open.
| CONTENT = "flex flex-col gap-4 px-6 pb-6" |
.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
|
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False)
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
tag = "Dialog.Root"
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if the dialog enters a modal state when open.
# - True: user | TRIGGER = "" |
mportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
|
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False)
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
tag = "Dialog.Root"
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if the dialog enters a modal state when open.
# - True: user interaction is | CLOSE = "" |
reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
|
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
tag = "Dialog.Root"
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if the dialog enters a modal state when open.
# - True: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled.
# - False: user interaction with the rest of the document is allowed.
# - 'trap-focus': focus is trapped inside the dialog, but document page scroll is not locked and p | class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False) |
components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
|
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False)
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
tag = "Dialog.Root"
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if the dialog enters a modal state when open.
# - True: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disable | library = f"{PACKAGE_NAME}/dialog" |
t
from reflex_ui.components.icons.hugeicon import hi
class ClassNames:
"""Class names for dialog components."""
BACKDROP = "fixed inset-0 bg-black opacity-40 transition-all duration-150 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:opacity-80"
POPUP = "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
|
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
tag = "Dialog.Root"
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if the dialog enters a modal state when open.
# - True: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled.
# - False: user interaction with the rest of the document is allowed.
# - 'trap-focus': focus is trapped inside the dialog, but document page scroll is not locked and p | def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False) |
= "fixed top-1/2 left-1/2 -mt-8 w-[32rem] max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-large transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
HEADER = "flex flex-col gap-2 px-6 pt-6 pb-4"
CONTENT = "flex flex-col gap-4 px-6 pb-6"
TRIGGER = ""
CLOSE = ""
class DialogBaseComponent(BaseUIComponent):
"""Base component for dialog components."""
library = f"{PACKAGE_NAME}/dialog"
@property
def import_var(self):
"""Return the import variable for the dialog component."""
return ImportVar(tag="Dialog", package_path="", install=False)
class DialogRoot(DialogBaseComponent):
"""Groups all parts of the dialog. Doesn't render its own HTML element."""
|
# Whether the dialog is initially open. To render a controlled dialog, use the open prop instead.
default_open: Var[bool]
# Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if the dialog enters a modal state when open.
# - True: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled.
# - False: user interaction with the rest of the document is allowed.
# - 'trap-focus': focus is trapped inside the dialog, but document page scroll is not locked and pointer interactions outside of it remain enabled.
modal: Var[bool | Literal["trap-focus"]]
# Event handler called after any animations c | tag = "Dialog.Root" |
Whether the dialog is currently open.
open: Var[bool]
# Event handler called when the dialog is opened or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if the dialog enters a modal state when open.
# - True: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled.
# - False: user interaction with the rest of the document is allowed.
# - 'trap-focus': focus is trapped inside the dialog, but document page scroll is not locked and pointer interactions outside of it remain enabled.
modal: Var[bool | Literal["trap-focus"]]
# Event handler called after any animations complete when the dialog is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
@classmethod
|
class DialogTrigger(DialogBaseComponent):
"""A button that opens the dialog. Renders a <button> element."""
tag = "Dialog.Trigger"
# Whether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (e.g. <div>). Defaults to True.
native_button: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep t | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog root component."""
props["data-slot"] = "dialog"
return super().create(*children, **props) |
or closed
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if the dialog enters a modal state when open.
# - True: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled.
# - False: user interaction with the rest of the document is allowed.
# - 'trap-focus': focus is trapped inside the dialog, but document page scroll is not locked and pointer interactions outside of it remain enabled.
modal: Var[bool | Literal["trap-focus"]]
# Event handler called after any animations complete when the dialog is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog root component."""
|
return super().create(*children, **props)
class DialogTrigger(DialogBaseComponent):
"""A button that opens the dialog. Renders a <button> element."""
tag = "Dialog.Trigger"
# Whether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (e.g. <div>). Defaults to True.
native_button: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into | props["data-slot"] = "dialog" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.