instruction
stringlengths
0
1k
input
stringlengths
1
1k
output
stringlengths
10
6.51k
"""Custom toggle group component.""" from typing import Literal from reflex.components.component import Component 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 LiteralOrientation = Literal["horizontal", "vertical"]
class ToggleGroupBaseComponent(BaseUIComponent): """Base component for toggle group components.""" library = f"{PACKAGE_NAME}/toggle-group" @property def import_var(self): """Return the import variable for the toggle group component.""" return ImportVar(tag="ToggleGroup", package_path="", install=False) class ToggleGroupRoot(ToggleGroupBaseComponent): """Provides a shared state to a series of toggle buttons.""" tag = "ToggleGroup" # The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the uncontrolled counterpart of value. default_value: Var[list[str | int]] # The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the controlled counterpart of default_value. value: Var[list[str | int]] # Callback fired when the pressed states of the toggle group changes. on_value_change: EventHandler[passthrough_ev
class ClassNames: """Class names for toggle group components.""" ROOT = "inline-flex items-center gap-1 p-1 rounded-ui-md bg-secondary-3 data-[orientation=vertical]:flex-col data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"
"""Custom toggle group component.""" from typing import Literal from reflex.components.component import Component 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 LiteralOrientation = Literal["horizontal", "vertical"] class ClassNames: """Class names for toggle group components."""
class ToggleGroupBaseComponent(BaseUIComponent): """Base component for toggle group components.""" library = f"{PACKAGE_NAME}/toggle-group" @property def import_var(self): """Return the import variable for the toggle group component.""" return ImportVar(tag="ToggleGroup", package_path="", install=False) class ToggleGroupRoot(ToggleGroupBaseComponent): """Provides a shared state to a series of toggle buttons.""" tag = "ToggleGroup" # The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the uncontrolled counterpart of value. default_value: Var[list[str | int]] # The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the controlled counterpart of default_value. value: Var[list[str | int]] # Callback fired when the pressed states of the toggle group changes. on_value_change: EventHandler[passthrough_ev
ROOT = "inline-flex items-center gap-1 p-1 rounded-ui-md bg-secondary-3 data-[orientation=vertical]:flex-col data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"
"""Custom toggle group component.""" from typing import Literal from reflex.components.component import Component 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 LiteralOrientation = Literal["horizontal", "vertical"] class ClassNames: """Class names for toggle group components.""" ROOT = "inline-flex items-center gap-1 p-1 rounded-ui-md bg-secondary-3 data-[orientation=vertical]:flex-col data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed" class ToggleGroupBaseComponent(BaseUIComponent): """Base component for toggle group components."""
@property def import_var(self): """Return the import variable for the toggle group component.""" return ImportVar(tag="ToggleGroup", package_path="", install=False) class ToggleGroupRoot(ToggleGroupBaseComponent): """Provides a shared state to a series of toggle buttons.""" tag = "ToggleGroup" # The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the uncontrolled counterpart of value. default_value: Var[list[str | int]] # The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the controlled counterpart of default_value. value: Var[list[str | int]] # Callback fired when the pressed states of the toggle group changes. on_value_change: EventHandler[passthrough_event_spec(list[str | int], dict)] # When false only one item in the group can be pressed. If any item in the group becomes pressed, the others will
library = f"{PACKAGE_NAME}/toggle-group"
"""Custom toggle group component.""" from typing import Literal from reflex.components.component import Component 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 LiteralOrientation = Literal["horizontal", "vertical"] class ClassNames: """Class names for toggle group components.""" ROOT = "inline-flex items-center gap-1 p-1 rounded-ui-md bg-secondary-3 data-[orientation=vertical]:flex-col data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed" class ToggleGroupBaseComponent(BaseUIComponent): """Base component for toggle group components.""" library = f"{PACKAGE_NAME}/toggle-group" @property
class ToggleGroupRoot(ToggleGroupBaseComponent): """Provides a shared state to a series of toggle buttons.""" tag = "ToggleGroup" # The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the uncontrolled counterpart of value. default_value: Var[list[str | int]] # The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the controlled counterpart of default_value. value: Var[list[str | int]] # Callback fired when the pressed states of the toggle group changes. on_value_change: EventHandler[passthrough_event_spec(list[str | int], dict)] # When false only one item in the group can be pressed. If any item in the group becomes pressed, the others will become unpressed. When true multiple items can be pressed. Defaults to False. toggle_multiple: Var[bool] # Whether the toggle group should ignore user interaction. Defaults to Fals
def import_var(self): """Return the import variable for the toggle group component.""" return ImportVar(tag="ToggleGroup", package_path="", install=False)
ponent import Component 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 LiteralOrientation = Literal["horizontal", "vertical"] class ClassNames: """Class names for toggle group components.""" ROOT = "inline-flex items-center gap-1 p-1 rounded-ui-md bg-secondary-3 data-[orientation=vertical]:flex-col data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed" class ToggleGroupBaseComponent(BaseUIComponent): """Base component for toggle group components.""" library = f"{PACKAGE_NAME}/toggle-group" @property def import_var(self): """Return the import variable for the toggle group component.""" return ImportVar(tag="ToggleGroup", package_path="", install=False) class ToggleGroupRoot(ToggleGroupBaseComponent): """Provides a shared state to a series of toggle buttons."""
# The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the uncontrolled counterpart of value. default_value: Var[list[str | int]] # The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the controlled counterpart of default_value. value: Var[list[str | int]] # Callback fired when the pressed states of the toggle group changes. on_value_change: EventHandler[passthrough_event_spec(list[str | int], dict)] # When false only one item in the group can be pressed. If any item in the group becomes pressed, the others will become unpressed. When true multiple items can be pressed. Defaults to False. toggle_multiple: Var[bool] # Whether the toggle group should ignore user interaction. Defaults to False. disabled: Var[bool] # Whether to loop keyboard focus back to the first item when the end of the list is reached while using the a
tag = "ToggleGroup"
ented by an array of the values of all pressed toggle buttons. This is the controlled counterpart of default_value. value: Var[list[str | int]] # Callback fired when the pressed states of the toggle group changes. on_value_change: EventHandler[passthrough_event_spec(list[str | int], dict)] # When false only one item in the group can be pressed. If any item in the group becomes pressed, the others will become unpressed. When true multiple items can be pressed. Defaults to False. toggle_multiple: Var[bool] # Whether the toggle group should ignore user interaction. Defaults to False. disabled: Var[bool] # 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 component orientation (layout flow direction). Defaults to "horizontal". orientation: Var[LiteralOrientation] # The render prop render_: Var[Component] @classmethod
toggle_group = ToggleGroupRoot.create
def create(cls, *children, **props) -> BaseUIComponent: """Create the toggle group root component.""" props["data-slot"] = "toggle-group" cls.set_class_name(ClassNames.ROOT, props) return super().create(*children, **props)
value: Var[list[str | int]] # Callback fired when the pressed states of the toggle group changes. on_value_change: EventHandler[passthrough_event_spec(list[str | int], dict)] # When false only one item in the group can be pressed. If any item in the group becomes pressed, the others will become unpressed. When true multiple items can be pressed. Defaults to False. toggle_multiple: Var[bool] # Whether the toggle group should ignore user interaction. Defaults to False. disabled: Var[bool] # 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 component orientation (layout flow direction). Defaults to "horizontal". orientation: Var[LiteralOrientation] # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the toggle group root component."""
cls.set_class_name(ClassNames.ROOT, props) return super().create(*children, **props) toggle_group = ToggleGroupRoot.create
props["data-slot"] = "toggle-group"
passthrough_event_spec(list[str | int], dict)] # When false only one item in the group can be pressed. If any item in the group becomes pressed, the others will become unpressed. When true multiple items can be pressed. Defaults to False. toggle_multiple: Var[bool] # Whether the toggle group should ignore user interaction. Defaults to False. disabled: Var[bool] # 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 component orientation (layout flow direction). Defaults to "horizontal". orientation: Var[LiteralOrientation] # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the toggle group root component.""" props["data-slot"] = "toggle-group" cls.set_class_name(ClassNames.ROOT, props) return super().create(*children, **props)
toggle_group = ToggleGroupRoot.create
"""Tooltip component from base-ui components."""
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_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-
from typing import Literal
"""Tooltip component from base-ui components.""" from typing import Literal
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.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[si
from reflex.components.component import Component, ComponentNamespace
"""Tooltip component from base-ui components.""" from typing import Literal from reflex.components.component import Component, ComponentNamespace from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-r
from reflex.utils.imports import ImportVar
"""Tooltip component from base-ui components.""" 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_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[
from reflex.vars.base import Var
"""Tooltip component from base-ui components.""" 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.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIC
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
"""Tooltip component from base-ui components.""" 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_ui import PACKAGE_NAME, BaseUIComponent
LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.
from reflex_ui.components.icons.others import arrow_svg
"""Tooltip component from base-ui components.""" 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_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg
LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property def import_var(self):
LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"]
"""Tooltip component from base-ui components.""" 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_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"]
LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property def import_var(self): """Return the import variable for the tool
LiteralAlign = Literal["start", "center", "end"]
"""Tooltip component from base-ui components.""" 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_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"]
LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property def import_var(self): """Return the import variable for the tooltip component.""" return ImportVar(tag="Toolt
LiteralPositionMethod = Literal["absolute", "fixed"]
"""Tooltip component from base-ui components.""" 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_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"]
# Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property def import_var(self): """Return the import variable for the tooltip component.""" return ImportVar(tag="Tooltip", package_path="", install=False) class TooltipRoot(Tool
LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"]
"""Tooltip component from base-ui components.""" 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_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names
class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property def import_var(self): """Return the import variable for the tooltip component.""" return ImportVar(tag="Tooltip", package_path="", install=False) class TooltipRoot(TooltipBaseComponent): """Root component for a tooltip.""" tag = "Tooltip.Root" # Whether the tooltip is currently open. open: Var[bool] # Whether the tooltip is initially open. To render a controlled tooltip, use the open prop instead. Defaults to False. default_open: Var[bool] # Event handler called when the tooltip is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # Event handler called after any animations complete when the tooltip is opened or closed. on_open_change_complete: EventHandler[passthrough_event_spec(bool)] # Determines which axis the tooltip should tra
class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180"
"""Tooltip component from base-ui components.""" 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_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components."""
POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property def import_var(self): """Return the import variable for the tooltip component.""" return ImportVar(tag="Tooltip", package_path="", install=False) class TooltipRoot(TooltipBaseComponent): """Root component for a tooltip.""" tag = "Tooltip.Root" # Whether the tooltip is currently open. open: Var[bool] # W
TRIGGER = "inline-flex items-center justify-center"
"""Tooltip component from base-ui components.""" 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_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center"
ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property def import_var(self): """Return the import variable for the tooltip component.""" return ImportVar(tag="Tooltip", package_path="", install=False) class TooltipRoot(TooltipBaseComponent): """Root component for a tooltip.""" tag = "Tooltip.Root" # Whether the tooltip is currently open. open: Var[bool] # Whether the tooltip is initially open. To render a controlled tooltip, use the open prop instead. Defaults to False. default_open: Var[bool] # Event handler called when the tooltip is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool,
POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
ts.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_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property def import_var(self): """Return the import variable for the tooltip component.""" return ImportVar(tag="Tooltip", package_path="", install=False) class TooltipRoot(TooltipBaseComponent): """Root component for a tooltip.""" tag = "Tooltip.Root" # Whether the tooltip is currently open. open: Var[bool] # Whether the tooltip is initially open. To render a controlled tooltip, use the open prop instead. Defaults to False. default_open: Var[bool] # Event handler called when the tooltip is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # Event handler called after any animations complete when the tooltip is opened or closed. on_open_change_complete: EventHandler[passthrough_event_spec(bool)] # Determines which axis the tooltip should tra
ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180"
port PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.others import arrow_svg LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180"
class TooltipRoot(TooltipBaseComponent): """Root component for a tooltip.""" tag = "Tooltip.Root" # Whether the tooltip is currently open. open: Var[bool] # Whether the tooltip is initially open. To render a controlled tooltip, use the open prop instead. Defaults to False. default_open: Var[bool] # Event handler called when the tooltip is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # Event handler called after any animations complete when the tooltip is opened or closed. on_open_change_complete: EventHandler[passthrough_event_spec(bool)] # Determines which axis the tooltip should track the cursor on. Defaults to "None". track_cursor_axis: Var[LiteralTrackCursorAxis] # Whether the tooltip is disabled. Defaults to False. disabled: Var[bool] # How long to wait before opening the tooltip. Specified in milliseconds. Defaults to 600. delay: Var[int] # How long to wait before
class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property def import_var(self): """Return the import variable for the tooltip component.""" return ImportVar(tag="Tooltip", package_path="", install=False)
Side = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components."""
@property def import_var(self): """Return the import variable for the tooltip component.""" return ImportVar(tag="Tooltip", package_path="", install=False) class TooltipRoot(TooltipBaseComponent): """Root component for a tooltip.""" tag = "Tooltip.Root" # Whether the tooltip is currently open. open: Var[bool] # Whether the tooltip is initially open. To render a controlled tooltip, use the open prop instead. Defaults to False. default_open: Var[bool] # Event handler called when the tooltip is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # Event handler called after any animations complete when the tooltip is opened or closed. on_open_change_complete: EventHandler[passthrough_event_spec(bool)] # Determines which axis the tooltip should track the cursor on. Defaults to "None". track_cursor_axis: Var[LiteralTrackCursorAxis] # Whether the tooltip is disabled. Defaults
library = f"{PACKAGE_NAME}/tooltip"
e-end", "inline-start"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] # Constants for default class names class ClassNames: """Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property
class TooltipRoot(TooltipBaseComponent): """Root component for a tooltip.""" tag = "Tooltip.Root" # Whether the tooltip is currently open. open: Var[bool] # Whether the tooltip is initially open. To render a controlled tooltip, use the open prop instead. Defaults to False. default_open: Var[bool] # Event handler called when the tooltip is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # Event handler called after any animations complete when the tooltip is opened or closed. on_open_change_complete: EventHandler[passthrough_event_spec(bool)] # Determines which axis the tooltip should track the cursor on. Defaults to "None". track_cursor_axis: Var[LiteralTrackCursorAxis] # Whether the tooltip is disabled. Defaults to False. disabled: Var[bool] # How long to wait before opening the tooltip. Specified in milliseconds. Defaults to 600. delay: Var[int] # How long to wait before
def import_var(self): """Return the import variable for the tooltip component.""" return ImportVar(tag="Tooltip", package_path="", install=False)
Class names for tooltip components.""" TRIGGER = "inline-flex items-center justify-center" POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" class TooltipBaseComponent(BaseUIComponent): """Base component for tooltip components.""" library = f"{PACKAGE_NAME}/tooltip" @property def import_var(self): """Return the import variable for the tooltip component.""" return ImportVar(tag="Tooltip", package_path="", install=False) class TooltipRoot(TooltipBaseComponent): """Root component for a tooltip."""
# Whether the tooltip is currently open. open: Var[bool] # Whether the tooltip is initially open. To render a controlled tooltip, use the open prop instead. Defaults to False. default_open: Var[bool] # Event handler called when the tooltip is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # Event handler called after any animations complete when the tooltip is opened or closed. on_open_change_complete: EventHandler[passthrough_event_spec(bool)] # Determines which axis the tooltip should track the cursor on. Defaults to "None". track_cursor_axis: Var[LiteralTrackCursorAxis] # Whether the tooltip is disabled. Defaults to False. disabled: Var[bool] # How long to wait before opening the tooltip. Specified in milliseconds. Defaults to 600. delay: Var[int] # How long to wait before closing the tooltip. Specified in milliseconds. Defaults to 0. close_delay: Var[int] # Whether the
tag = "Tooltip.Root"
ontrolled tooltip, use the open prop instead. Defaults to False. default_open: Var[bool] # Event handler called when the tooltip is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # Event handler called after any animations complete when the tooltip is opened or closed. on_open_change_complete: EventHandler[passthrough_event_spec(bool)] # Determines which axis the tooltip should track the cursor on. Defaults to "None". track_cursor_axis: Var[LiteralTrackCursorAxis] # Whether the tooltip is disabled. Defaults to False. disabled: Var[bool] # How long to wait before opening the tooltip. Specified in milliseconds. Defaults to 600. delay: Var[int] # How long to wait before closing the tooltip. Specified in milliseconds. Defaults to 0. close_delay: Var[int] # Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True. hoverable: Var[bool] @classmethod
class TooltipProvider(TooltipBaseComponent): """Provider component for tooltips.""" tag = "Tooltip.Provider" # How long to wait before opening a tooltip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger c
def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip root component.""" props["data-slot"] = "tooltip" return super().create(*children, **props)
called when the tooltip is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # Event handler called after any animations complete when the tooltip is opened or closed. on_open_change_complete: EventHandler[passthrough_event_spec(bool)] # Determines which axis the tooltip should track the cursor on. Defaults to "None". track_cursor_axis: Var[LiteralTrackCursorAxis] # Whether the tooltip is disabled. Defaults to False. disabled: Var[bool] # How long to wait before opening the tooltip. Specified in milliseconds. Defaults to 600. delay: Var[int] # How long to wait before closing the tooltip. Specified in milliseconds. Defaults to 0. close_delay: Var[int] # Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True. hoverable: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip root component."""
return super().create(*children, **props) class TooltipProvider(TooltipBaseComponent): """Provider component for tooltips.""" tag = "Tooltip.Provider" # How long to wait before opening a tooltip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUI
props["data-slot"] = "tooltip"
through_event_spec(bool, dict)] # Event handler called after any animations complete when the tooltip is opened or closed. on_open_change_complete: EventHandler[passthrough_event_spec(bool)] # Determines which axis the tooltip should track the cursor on. Defaults to "None". track_cursor_axis: Var[LiteralTrackCursorAxis] # Whether the tooltip is disabled. Defaults to False. disabled: Var[bool] # How long to wait before opening the tooltip. Specified in milliseconds. Defaults to 600. delay: Var[int] # How long to wait before closing the tooltip. Specified in milliseconds. Defaults to 0. close_delay: Var[int] # Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True. hoverable: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip root component.""" props["data-slot"] = "tooltip" return super().create(*children, **props)
class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props) class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["data-slot"] = "tooltip-portal" return supe
class TooltipProvider(TooltipBaseComponent): """Provider component for tooltips.""" tag = "Tooltip.Provider" # How long to wait before opening a tooltip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props)
n the tooltip is opened or closed. on_open_change_complete: EventHandler[passthrough_event_spec(bool)] # Determines which axis the tooltip should track the cursor on. Defaults to "None". track_cursor_axis: Var[LiteralTrackCursorAxis] # Whether the tooltip is disabled. Defaults to False. disabled: Var[bool] # How long to wait before opening the tooltip. Specified in milliseconds. Defaults to 600. delay: Var[int] # How long to wait before closing the tooltip. Specified in milliseconds. Defaults to 0. close_delay: Var[int] # Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True. hoverable: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip root component.""" props["data-slot"] = "tooltip" return super().create(*children, **props) class TooltipProvider(TooltipBaseComponent): """Provider component for tooltips."""
# How long to wait before opening a tooltip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props)
tag = "Tooltip.Provider"
faults to 600. delay: Var[int] # How long to wait before closing the tooltip. Specified in milliseconds. Defaults to 0. close_delay: Var[int] # Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True. hoverable: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip root component.""" props["data-slot"] = "tooltip" return super().create(*children, **props) class TooltipProvider(TooltipBaseComponent): """Provider component for tooltips.""" tag = "Tooltip.Provider" # How long to wait before opening a tooltip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod
class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props) class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["data-slot"] = "tooltip-portal" return supe
def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props)
aults to 0. close_delay: Var[int] # Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True. hoverable: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip root component.""" props["data-slot"] = "tooltip" return super().create(*children, **props) class TooltipProvider(TooltipBaseComponent): """Provider component for tooltips.""" tag = "Tooltip.Provider" # How long to wait before opening a tooltip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component."""
return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props) class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["
props["data-slot"] = "tooltip-provider"
hout closing the tooltip. Defaults to True. hoverable: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip root component.""" props["data-slot"] = "tooltip" return super().create(*children, **props) class TooltipProvider(TooltipBaseComponent): """Provider component for tooltips.""" tag = "Tooltip.Provider" # How long to wait before opening a tooltip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props)
class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["data-slot"] = "tooltip-portal" return super().create(*children, **props) class TooltipPositioner(TooltipBaseComponent): """Positions the tooltip relative to the trigger.""" tag = "Tooltip.Positioner" # How to align the popup relative to the specified side. Defaults to "center". align: Var[LiteralAlign] # Additional offset along the alignment axis in pixels. Defaults to 0. align_offset: Var[int] # Which side of the anchor element to align the popup agains
class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props)
ef create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip root component.""" props["data-slot"] = "tooltip" return super().create(*children, **props) class TooltipProvider(TooltipBaseComponent): """Provider component for tooltips.""" tag = "Tooltip.Provider" # How long to wait before opening a tooltip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip."""
# The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props) class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["data-slot"] = "tooltip-portal" return super().create(*children, **props) class TooltipPositioner(TooltipBaseComponent): """Positions the tooltip relative
tag = "Tooltip.Trigger"
nt.""" props["data-slot"] = "tooltip" return super().create(*children, **props) class TooltipProvider(TooltipBaseComponent): """Provider component for tooltips.""" tag = "Tooltip.Provider" # How long to wait before opening a tooltip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod
class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["data-slot"] = "tooltip-portal" return super().create(*children, **props) class TooltipPositioner(TooltipBaseComponent): """Positions the tooltip relative to the trigger.""" tag = "Tooltip.Positioner" # How to align the popup relative to the specified side. Defaults to "center". align: Var[LiteralAlign] # Additional offset along the alignment axis in pixels. Defaults to 0. align_offset: Var[int] # Which side of the anchor element to align the popup agains
def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props)
der(TooltipBaseComponent): """Provider component for tooltips.""" tag = "Tooltip.Provider" # How long to wait before opening a tooltip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component."""
cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props) class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["data-slot"] = "tooltip-portal" return super().create(*children, **props) class TooltipPositioner(TooltipBaseComponent): """Positions the tooltip relative to the trigger.""" tag = "Tooltip.Positioner" # How to align the popup relative to the specified side. Defaults to "center". align: Var[LiteralAlign] # Additional offset along the alignment axis in pixels. Def
props["data-slot"] = "tooltip-trigger"
tip. Specified in milliseconds. delay: Var[int] # How long to wait before closing a tooltip. Specified in milliseconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props)
class TooltipPositioner(TooltipBaseComponent): """Positions the tooltip relative to the trigger.""" tag = "Tooltip.Positioner" # How to align the popup relative to the specified side. Defaults to "center". align: Var[LiteralAlign] # Additional offset along the alignment axis in pixels. Defaults to 0. align_offset: Var[int] # Which side of the anchor element to align the popup against. May automatically change to avoid collisions. Defaults to "top". side: Var[LiteralSide] # Distance between the anchor and the popup in pixels. Defaults to 0. side_offset: Var[int] # Minimum distance to maintain between the arrow and the edges of the popup. Use it to prevent the arrow element from hanging out of the rounded corners of a popup. Defaults to 5. arrow_padding: Var[int] # An element to position the popup against. By default, the popup will be positioned against the trigger. anchor: Var[str] # An element or a rectangle that d
class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["data-slot"] = "tooltip-portal" return super().create(*children, **props)
seconds. close_delay: Var[int] # Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400. timeout: Var[int] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props) class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM."""
# A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["data-slot"] = "tooltip-portal" return super().create(*children, **props) class TooltipPositioner(TooltipBaseComponent): """Positions the tooltip relative to the trigger.""" tag = "Tooltip.Positioner" # How to align the popup relative to the specified side. Defaults to "center". align: Var[LiteralAlign] # Additional offset along the alignment axis in pixels. Defaults to 0. align_offset: Var[int] # Which side of the anchor element to align the popup against. May automatically change to avoid collisions. Defaults to "top". side: Var[LiteralSide] # Distance between the anchor and the popup i
tag = "Tooltip.Portal"
) -> BaseUIComponent: """Create the tooltip provider component.""" props["data-slot"] = "tooltip-provider" return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props) class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod
class TooltipPositioner(TooltipBaseComponent): """Positions the tooltip relative to the trigger.""" tag = "Tooltip.Positioner" # How to align the popup relative to the specified side. Defaults to "center". align: Var[LiteralAlign] # Additional offset along the alignment axis in pixels. Defaults to 0. align_offset: Var[int] # Which side of the anchor element to align the popup against. May automatically change to avoid collisions. Defaults to "top". side: Var[LiteralSide] # Distance between the anchor and the popup in pixels. Defaults to 0. side_offset: Var[int] # Minimum distance to maintain between the arrow and the edges of the popup. Use it to prevent the arrow element from hanging out of the rounded corners of a popup. Defaults to 5. arrow_padding: Var[int] # An element to position the popup against. By default, the popup will be positioned against the trigger. anchor: Var[str] # An element or a rectangle that d
def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["data-slot"] = "tooltip-portal" return super().create(*children, **props)
ovider" return super().create(*children, **props) class TooltipTrigger(TooltipBaseComponent): """Trigger element for the tooltip.""" tag = "Tooltip.Trigger" # The render prop render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props) class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component."""
return super().create(*children, **props) class TooltipPositioner(TooltipBaseComponent): """Positions the tooltip relative to the trigger.""" tag = "Tooltip.Positioner" # How to align the popup relative to the specified side. Defaults to "center". align: Var[LiteralAlign] # Additional offset along the alignment axis in pixels. Defaults to 0. align_offset: Var[int] # Which side of the anchor element to align the popup against. May automatically change to avoid collisions. Defaults to "top". side: Var[LiteralSide] # Distance between the anchor and the popup in pixels. Defaults to 0. side_offset: Var[int] # Minimum distance to maintain between the arrow and the edges of the popup. Use it to prevent the arrow element from hanging out of the rounded corners of a popup. Defaults to 5. arrow_padding: Var[int] # An element to position the popup against. By default, the popup will be positioned against the trigger. anchor
props["data-slot"] = "tooltip-portal"
render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip trigger component.""" props["data-slot"] = "tooltip-trigger" cls.set_class_name(ClassNames.TRIGGER, props) return super().create(*children, **props) class TooltipPortal(TooltipBaseComponent): """Portal that moves the tooltip to a different part of the DOM.""" tag = "Tooltip.Portal" # A parent element to render the portal element into. container: Var[str] # Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip portal component.""" props["data-slot"] = "tooltip-portal" return super().create(*children, **props) class TooltipPositioner(TooltipBaseComponent): """Positions the tooltip relative to the trigger."""
# How to align the popup relative to the specified side. Defaults to "center". align: Var[LiteralAlign] # Additional offset along the alignment axis in pixels. Defaults to 0. align_offset: Var[int] # Which side of the anchor element to align the popup against. May automatically change to avoid collisions. Defaults to "top". side: Var[LiteralSide] # Distance between the anchor and the popup in pixels. Defaults to 0. side_offset: Var[int] # Minimum distance to maintain between the arrow and the edges of the popup. Use it to prevent the arrow element from hanging out of the rounded corners of a popup. Defaults to 5. arrow_padding: Var[int] # An element to position the popup against. By default, the popup will be positioned against the trigger. anchor: Var[str] # An element or a rectangle that delimits the area that the popup is confined to. Defaults to "clipping-ancestors". collision_boundary: Var[str] # Additional space
tag = "Tooltip.Positioner"
Var[int] # An element to position the popup against. By default, the popup will be positioned against the trigger. anchor: Var[str] # An element or a rectangle that delimits the area that the popup is confined to. Defaults to "clipping-ancestors". collision_boundary: Var[str] # Additional space to maintain from the edge of the collision boundary. Defaults to 5. collision_padding: Var[int] # Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults to False. sticky: Var[bool] # Determines which CSS position property to use. Defaults to "absolute". position_method: Var[LiteralPositionMethod] # Indicates whether the tooltip should track the anchor's position track_anchor: Var[bool] # Determines how to handle collisions when positioning the popup. collision_avoidance: Var[str | dict[str, str]] # Render prop for the positioner render_: Var[Component] @classmethod
class TooltipPopup(TooltipBaseComponent): """Container for the tooltip content.""" tag = "Tooltip.Popup" # Render prop for the popup render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props) class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] |
def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip positioner component.""" props["data-slot"] = "tooltip-positioner" return super().create(*children, **props)
anchor: Var[str] # An element or a rectangle that delimits the area that the popup is confined to. Defaults to "clipping-ancestors". collision_boundary: Var[str] # Additional space to maintain from the edge of the collision boundary. Defaults to 5. collision_padding: Var[int] # Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults to False. sticky: Var[bool] # Determines which CSS position property to use. Defaults to "absolute". position_method: Var[LiteralPositionMethod] # Indicates whether the tooltip should track the anchor's position track_anchor: Var[bool] # Determines how to handle collisions when positioning the popup. collision_avoidance: Var[str | dict[str, str]] # Render prop for the positioner render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip positioner component."""
return super().create(*children, **props) class TooltipPopup(TooltipBaseComponent): """Container for the tooltip content.""" tag = "Tooltip.Popup" # Render prop for the popup render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props) class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content
props["data-slot"] = "tooltip-positioner"
s confined to. Defaults to "clipping-ancestors". collision_boundary: Var[str] # Additional space to maintain from the edge of the collision boundary. Defaults to 5. collision_padding: Var[int] # Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults to False. sticky: Var[bool] # Determines which CSS position property to use. Defaults to "absolute". position_method: Var[LiteralPositionMethod] # Indicates whether the tooltip should track the anchor's position track_anchor: Var[bool] # Determines how to handle collisions when positioning the popup. collision_avoidance: Var[str | dict[str, str]] # Render prop for the positioner render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip positioner component.""" props["data-slot"] = "tooltip-positioner" return super().create(*children, **props)
class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts _root_props = { "open", "default_open", "on_open_change", "on_open_change_complete", "track_cursor_axis", "disabled", "delay", "close_delay", "hoverable", } _portal_props = { "container", "keep_mounted", } _positioner_props = { "align", "align_offset", "side",
class TooltipPopup(TooltipBaseComponent): """Container for the tooltip content.""" tag = "Tooltip.Popup" # Render prop for the popup render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props)
itional space to maintain from the edge of the collision boundary. Defaults to 5. collision_padding: Var[int] # Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults to False. sticky: Var[bool] # Determines which CSS position property to use. Defaults to "absolute". position_method: Var[LiteralPositionMethod] # Indicates whether the tooltip should track the anchor's position track_anchor: Var[bool] # Determines how to handle collisions when positioning the popup. collision_avoidance: Var[str | dict[str, str]] # Render prop for the positioner render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip positioner component.""" props["data-slot"] = "tooltip-positioner" return super().create(*children, **props) class TooltipPopup(TooltipBaseComponent): """Container for the tooltip content."""
# Render prop for the popup render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props) class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts _root_props = { "open", "default_open",
tag = "Tooltip.Popup"
Var[int] # Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults to False. sticky: Var[bool] # Determines which CSS position property to use. Defaults to "absolute". position_method: Var[LiteralPositionMethod] # Indicates whether the tooltip should track the anchor's position track_anchor: Var[bool] # Determines how to handle collisions when positioning the popup. collision_avoidance: Var[str | dict[str, str]] # Render prop for the positioner render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip positioner component.""" props["data-slot"] = "tooltip-positioner" return super().create(*children, **props) class TooltipPopup(TooltipBaseComponent): """Container for the tooltip content.""" tag = "Tooltip.Popup" # Render prop for the popup render_: Var[Component] @classmethod
class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts _root_props = { "open", "default_open", "on_open_change", "on_open_change_complete", "track_cursor_axis", "disabled", "delay", "close_delay", "hoverable", } _portal_props = { "container", "keep_mounted", } _positioner_props = { "align", "align_offset", "side",
def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props)
efaults to False. sticky: Var[bool] # Determines which CSS position property to use. Defaults to "absolute". position_method: Var[LiteralPositionMethod] # Indicates whether the tooltip should track the anchor's position track_anchor: Var[bool] # Determines how to handle collisions when positioning the popup. collision_avoidance: Var[str | dict[str, str]] # Render prop for the positioner render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip positioner component.""" props["data-slot"] = "tooltip-positioner" return super().create(*children, **props) class TooltipPopup(TooltipBaseComponent): """Container for the tooltip content.""" tag = "Tooltip.Popup" # Render prop for the popup render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component."""
cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props) class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts _root_props = { "open", "default_open", "on_open_change", "on_open_change_complete", "track_cursor_axis", "disabled", "delay", "close_delay", "hoverable", } _portal_props = { "container", "keep_mou
props["data-slot"] = "tooltip-popup"
r[LiteralPositionMethod] # Indicates whether the tooltip should track the anchor's position track_anchor: Var[bool] # Determines how to handle collisions when positioning the popup. collision_avoidance: Var[str | dict[str, str]] # Render prop for the positioner render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip positioner component.""" props["data-slot"] = "tooltip-positioner" return super().create(*children, **props) class TooltipPopup(TooltipBaseComponent): """Container for the tooltip content.""" tag = "Tooltip.Popup" # Render prop for the popup render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props)
class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts _root_props = { "open", "default_open", "on_open_change", "on_open_change_complete", "track_cursor_axis", "disabled", "delay", "close_delay", "hoverable", } _portal_props = { "container", "keep_mounted", } _positioner_props = { "align", "align_offset", "side", "side_offset", "arrow_padding", "anchor", "collision_boundary", "collision_padding", "sticky", "position_method", "track_anchor", "collision_avoidance", "class_name", } @classmethod def create( cls, trigger: Component, content: str | Component | None = None, **props,
class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props)
position track_anchor: Var[bool] # Determines how to handle collisions when positioning the popup. collision_avoidance: Var[str | dict[str, str]] # Render prop for the positioner render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip positioner component.""" props["data-slot"] = "tooltip-positioner" return super().create(*children, **props) class TooltipPopup(TooltipBaseComponent): """Container for the tooltip content.""" tag = "Tooltip.Popup" # Render prop for the popup render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props) class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip."""
@classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts _root_props = { "open", "default_open", "on_open_change", "on_open_change_complete", "track_cursor_axis", "disabled", "delay", "close_delay", "hoverable", } _portal_props = { "container", "keep_mounted", } _positioner_props = { "align", "align_offset", "side", "side_offset", "arrow_padding", "anchor", "collision_boundary", "collision_pad
tag = "Tooltip.Arrow"
Determines how to handle collisions when positioning the popup. collision_avoidance: Var[str | dict[str, str]] # Render prop for the positioner render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip positioner component.""" props["data-slot"] = "tooltip-positioner" return super().create(*children, **props) class TooltipPopup(TooltipBaseComponent): """Container for the tooltip content.""" tag = "Tooltip.Popup" # Render prop for the popup render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props) class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod
class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts _root_props = { "open", "default_open", "on_open_change", "on_open_change_complete", "track_cursor_axis", "disabled", "delay", "close_delay", "hoverable", } _portal_props = { "container", "keep_mounted", } _positioner_props = { "align", "align_offset", "side", "side_offset", "arrow_padding", "anchor", "collision_boundary", "collision_padding", "sticky", "position_method", "track_anchor", "collision_avoidance", "class_name", } @classmethod def create( cls, trigger: Component, content: str | Component | None = None, **props,
def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props)
# Render prop for the positioner render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip positioner component.""" props["data-slot"] = "tooltip-positioner" return super().create(*children, **props) class TooltipPopup(TooltipBaseComponent): """Container for the tooltip content.""" tag = "Tooltip.Popup" # Render prop for the popup render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props) class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component."""
cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts _root_props = { "open", "default_open", "on_open_change", "on_open_change_complete", "track_cursor_axis", "disabled", "delay", "close_delay", "hoverable", } _portal_props = { "container", "keep_mounted", } _positioner_props = { "align", "align_offset", "side", "side_offset", "arrow_padding", "anchor", "collision_boundary", "collision_padding", "sticky", "position_method", "track_anchor", "collision_avoidance", "class_name", } @classmethod def create(
props["data-slot"] = "tooltip-arrow"
iner for the tooltip content.""" tag = "Tooltip.Popup" # Render prop for the popup render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip popup component.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props) class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts
_portal_props = { "container", "keep_mounted", } _positioner_props = { "align", "align_offset", "side", "side_offset", "arrow_padding", "anchor", "collision_boundary", "collision_padding", "sticky", "position_method", "track_anchor", "collision_avoidance", "class_name", } @classmethod def create( cls, trigger: Component, content: str | Component | None = None, **props, ) -> BaseUIComponent: """Create a high level tooltip component. Args: trigger: The component that triggers the tooltip. content: The content to display in the tooltip. **props: Additional properties to apply to the tooltip component. Returns: The tooltip component with all necessary subcomponents. """ # Extract content from props if provided there
_root_props = { "open", "default_open", "on_open_change", "on_open_change_complete", "track_cursor_axis", "disabled", "delay", "close_delay", "hoverable", }
mponent.""" props["data-slot"] = "tooltip-popup" cls.set_class_name(ClassNames.POPUP, props) return super().create(*children, **props) class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts _root_props = { "open", "default_open", "on_open_change", "on_open_change_complete", "track_cursor_axis", "disabled", "delay", "close_delay", "hoverable", }
_positioner_props = { "align", "align_offset", "side", "side_offset", "arrow_padding", "anchor", "collision_boundary", "collision_padding", "sticky", "position_method", "track_anchor", "collision_avoidance", "class_name", } @classmethod def create( cls, trigger: Component, content: str | Component | None = None, **props, ) -> BaseUIComponent: """Create a high level tooltip component. Args: trigger: The component that triggers the tooltip. content: The content to display in the tooltip. **props: Additional properties to apply to the tooltip component. Returns: The tooltip component with all necessary subcomponents. """ # Extract content from props if provided there if content is None and "content" in props: content = props.
_portal_props = { "container", "keep_mounted", }
class_name(ClassNames.POPUP, props) return super().create(*children, **props) class TooltipArrow(TooltipBaseComponent): """Arrow element for the tooltip.""" tag = "Tooltip.Arrow" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the tooltip arrow component.""" props["data-slot"] = "tooltip-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props) class HighLevelTooltip(TooltipRoot): """High level wrapper for the Tooltip component.""" # Content to display in the tooltip content: Var[str] | Component # Props for different component parts _root_props = { "open", "default_open", "on_open_change", "on_open_change_complete", "track_cursor_axis", "disabled", "delay", "close_delay", "hoverable", } _portal_props = { "container", "keep_mounted", }
@classmethod def create( cls, trigger: Component, content: str | Component | None = None, **props, ) -> BaseUIComponent: """Create a high level tooltip component. Args: trigger: The component that triggers the tooltip. content: The content to display in the tooltip. **props: Additional properties to apply to the tooltip component. Returns: The tooltip component with all necessary subcomponents. """ # Extract content from props if provided there if content is None and "content" in props: content = props.pop("content") # Extract props for different parts root_props = {k: props.pop(k) for k in cls._root_props & props.keys()} portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()} positioner_props = { k: props.pop(k) for k in cls._positioner_props & props.keys() }
_positioner_props = { "align", "align_offset", "side", "side_offset", "arrow_padding", "anchor", "collision_boundary", "collision_padding", "sticky", "position_method", "track_anchor", "collision_avoidance", "class_name", }
_portal_props = { "container", "keep_mounted", } _positioner_props = { "align", "align_offset", "side", "side_offset", "arrow_padding", "anchor", "collision_boundary", "collision_padding", "sticky", "position_method", "track_anchor", "collision_avoidance", "class_name", } @classmethod def create( cls, trigger: Component, content: str | Component | None = None, **props, ) -> BaseUIComponent: """Create a high level tooltip component. Args: trigger: The component that triggers the tooltip. content: The content to display in the tooltip. **props: Additional properties to apply to the tooltip component. Returns: The tooltip component with all necessary subcomponents. """ # Extract content from props if provided there
# Extract props for different parts root_props = {k: props.pop(k) for k in cls._root_props & props.keys()} portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()} positioner_props = { k: props.pop(k) for k in cls._positioner_props & props.keys() } # Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Toolt
if content is None and "content" in props: content = props.pop("content")
_mounted", } _positioner_props = { "align", "align_offset", "side", "side_offset", "arrow_padding", "anchor", "collision_boundary", "collision_padding", "sticky", "position_method", "track_anchor", "collision_avoidance", "class_name", } @classmethod def create( cls, trigger: Component, content: str | Component | None = None, **props, ) -> BaseUIComponent: """Create a high level tooltip component. Args: trigger: The component that triggers the tooltip. content: The content to display in the tooltip. **props: Additional properties to apply to the tooltip component. Returns: The tooltip component with all necessary subcomponents. """ # Extract content from props if provided there if content is None and "content" in props:
# Extract props for different parts root_props = {k: props.pop(k) for k in cls._root_props & props.keys()} portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()} positioner_props = { k: props.pop(k) for k in cls._positioner_props & props.keys() } # Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Toolt
content = props.pop("content")
"side", "side_offset", "arrow_padding", "anchor", "collision_boundary", "collision_padding", "sticky", "position_method", "track_anchor", "collision_avoidance", "class_name", } @classmethod def create( cls, trigger: Component, content: str | Component | None = None, **props, ) -> BaseUIComponent: """Create a high level tooltip component. Args: trigger: The component that triggers the tooltip. content: The content to display in the tooltip. **props: Additional properties to apply to the tooltip component. Returns: The tooltip component with all necessary subcomponents. """ # Extract content from props if provided there if content is None and "content" in props: content = props.pop("content") # Extract props for different parts
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()} positioner_props = { k: props.pop(k) for k in cls._positioner_props & props.keys() } # Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create)
root_props = {k: props.pop(k) for k in cls._root_props & props.keys()}
", "collision_boundary", "collision_padding", "sticky", "position_method", "track_anchor", "collision_avoidance", "class_name", } @classmethod def create( cls, trigger: Component, content: str | Component | None = None, **props, ) -> BaseUIComponent: """Create a high level tooltip component. Args: trigger: The component that triggers the tooltip. content: The content to display in the tooltip. **props: Additional properties to apply to the tooltip component. Returns: The tooltip component with all necessary subcomponents. """ # Extract content from props if provided there if content is None and "content" in props: content = props.pop("content") # Extract props for different parts root_props = {k: props.pop(k) for k in cls._root_props & props.keys()}
positioner_props = { k: props.pop(k) for k in cls._positioner_props & props.keys() } # Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create) root = staticmethod(TooltipRoot.create) trigger = staticmethod(TooltipTrigger.
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
"position_method", "track_anchor", "collision_avoidance", "class_name", } @classmethod def create( cls, trigger: Component, content: str | Component | None = None, **props, ) -> BaseUIComponent: """Create a high level tooltip component. Args: trigger: The component that triggers the tooltip. content: The content to display in the tooltip. **props: Additional properties to apply to the tooltip component. Returns: The tooltip component with all necessary subcomponents. """ # Extract content from props if provided there if content is None and "content" in props: content = props.pop("content") # Extract props for different parts root_props = {k: props.pop(k) for k in cls._root_props & props.keys()} portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
# Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create) root = staticmethod(TooltipRoot.create) trigger = staticmethod(TooltipTrigger.create) portal = staticmethod(TooltipPortal.create) positioner = staticmethod(TooltipPositioner.create)
positioner_props = { k: props.pop(k) for k in cls._positioner_props & props.keys() }
ops.pop(k) for k in cls._root_props & props.keys()} portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()} positioner_props = { k: props.pop(k) for k in cls._positioner_props & props.keys() } # Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components."""
root = staticmethod(TooltipRoot.create) trigger = staticmethod(TooltipTrigger.create) portal = staticmethod(TooltipPortal.create) positioner = staticmethod(TooltipPositioner.create) popup = staticmethod(TooltipPopup.create) arrow = staticmethod(TooltipArrow.create) class_names = ClassNames __call__ = staticmethod(HighLevelTooltip.create) tooltip = Tooltip()
provider = staticmethod(TooltipProvider.create)
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()} positioner_props = { k: props.pop(k) for k in cls._positioner_props & props.keys() } # Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create)
trigger = staticmethod(TooltipTrigger.create) portal = staticmethod(TooltipPortal.create) positioner = staticmethod(TooltipPositioner.create) popup = staticmethod(TooltipPopup.create) arrow = staticmethod(TooltipArrow.create) class_names = ClassNames __call__ = staticmethod(HighLevelTooltip.create) tooltip = Tooltip()
root = staticmethod(TooltipRoot.create)
k in cls._portal_props & props.keys()} positioner_props = { k: props.pop(k) for k in cls._positioner_props & props.keys() } # Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create) root = staticmethod(TooltipRoot.create)
portal = staticmethod(TooltipPortal.create) positioner = staticmethod(TooltipPositioner.create) popup = staticmethod(TooltipPopup.create) arrow = staticmethod(TooltipArrow.create) class_names = ClassNames __call__ = staticmethod(HighLevelTooltip.create) tooltip = Tooltip()
trigger = staticmethod(TooltipTrigger.create)
itioner_props = { k: props.pop(k) for k in cls._positioner_props & props.keys() } # Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create) root = staticmethod(TooltipRoot.create) trigger = staticmethod(TooltipTrigger.create)
positioner = staticmethod(TooltipPositioner.create) popup = staticmethod(TooltipPopup.create) arrow = staticmethod(TooltipArrow.create) class_names = ClassNames __call__ = staticmethod(HighLevelTooltip.create) tooltip = Tooltip()
portal = staticmethod(TooltipPortal.create)
r k in cls._positioner_props & props.keys() } # Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create) root = staticmethod(TooltipRoot.create) trigger = staticmethod(TooltipTrigger.create) portal = staticmethod(TooltipPortal.create)
popup = staticmethod(TooltipPopup.create) arrow = staticmethod(TooltipArrow.create) class_names = ClassNames __call__ = staticmethod(HighLevelTooltip.create) tooltip = Tooltip()
positioner = staticmethod(TooltipPositioner.create)
# Set default values positioner_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create) root = staticmethod(TooltipRoot.create) trigger = staticmethod(TooltipTrigger.create) portal = staticmethod(TooltipPortal.create) positioner = staticmethod(TooltipPositioner.create)
arrow = staticmethod(TooltipArrow.create) class_names = ClassNames __call__ = staticmethod(HighLevelTooltip.create) tooltip = Tooltip()
popup = staticmethod(TooltipPopup.create)
_props.setdefault("side_offset", 8) root_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create) root = staticmethod(TooltipRoot.create) trigger = staticmethod(TooltipTrigger.create) portal = staticmethod(TooltipPortal.create) positioner = staticmethod(TooltipPositioner.create) popup = staticmethod(TooltipPopup.create)
class_names = ClassNames __call__ = staticmethod(HighLevelTooltip.create) tooltip = Tooltip()
arrow = staticmethod(TooltipArrow.create)
ot_props.setdefault("delay", 0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create) root = staticmethod(TooltipRoot.create) trigger = staticmethod(TooltipTrigger.create) portal = staticmethod(TooltipPortal.create) positioner = staticmethod(TooltipPositioner.create) popup = staticmethod(TooltipPopup.create) arrow = staticmethod(TooltipArrow.create)
__call__ = staticmethod(HighLevelTooltip.create) tooltip = Tooltip()
class_names = ClassNames
0) root_props.setdefault("close_delay", 0) return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create) root = staticmethod(TooltipRoot.create) trigger = staticmethod(TooltipTrigger.create) portal = staticmethod(TooltipPortal.create) positioner = staticmethod(TooltipPositioner.create) popup = staticmethod(TooltipPopup.create) arrow = staticmethod(TooltipArrow.create) class_names = ClassNames
tooltip = Tooltip()
__call__ = staticmethod(HighLevelTooltip.create)
return TooltipRoot.create( TooltipTrigger.create( render_=trigger, ), TooltipPortal.create( TooltipPositioner.create( TooltipPopup.create( TooltipArrow.create(arrow_svg()), content, ), **positioner_props, ), **portal_props, ), **root_props, ) class Tooltip(ComponentNamespace): """Namespace for Tooltip components.""" provider = staticmethod(TooltipProvider.create) root = staticmethod(TooltipRoot.create) trigger = staticmethod(TooltipTrigger.create) portal = staticmethod(TooltipPortal.create) positioner = staticmethod(TooltipPositioner.create) popup = staticmethod(TooltipPopup.create) arrow = staticmethod(TooltipArrow.create) class_names = ClassNames __call__ = staticmethod(HighLevelTooltip.create)
tooltip = Tooltip()
"""Base components sub-package."""
from reflex_ui import _REFLEX_UI_MAPPING _SUBMODULES = set() _SUBMOD_ATTRS = { "".join(k.split("components.base.")[-1]): v for k, v in _REFLEX_UI_MAPPING.items() } __getattr__, __dir__, __all__ = lazy_loader.attach( __name__, submodules=_SUBMODULES, submod_attrs=_SUBMOD_ATTRS, )
from reflex.utils import lazy_loader
"""Base components sub-package.""" from reflex.utils import lazy_loader from reflex_ui import _REFLEX_UI_MAPPING
_SUBMOD_ATTRS = { "".join(k.split("components.base.")[-1]): v for k, v in _REFLEX_UI_MAPPING.items() } __getattr__, __dir__, __all__ = lazy_loader.attach( __name__, submodules=_SUBMODULES, submod_attrs=_SUBMOD_ATTRS, )
_SUBMODULES = set()
"""Hugeicons Icon component."""
from reflex.utils.imports import ImportVar from reflex.vars.base import Var, VarData from reflex_ui.components.component import CoreComponent class HugeIcon(CoreComponent): """A HugeIcon component.""" library = "@hugeicons/react@1.1.1" tag = "HugeiconsIcon" # The main icon to display icon: Var[str] # Alternative icon for states/interactions alt_icon: Var[str | None] # Whether to show the alternative icon show_alt: Var[bool] # The size of the icon in pixels size: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props:
from reflex.components.component import Component
"""Hugeicons Icon component.""" from reflex.components.component import Component
from reflex.vars.base import Var, VarData from reflex_ui.components.component import CoreComponent class HugeIcon(CoreComponent): """A HugeIcon component.""" library = "@hugeicons/react@1.1.1" tag = "HugeiconsIcon" # The main icon to display icon: Var[str] # Alternative icon for states/interactions alt_icon: Var[str | None] # Whether to show the alternative icon show_alt: Var[bool] # The size of the icon in pixels size: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props: props["icon"] = children[0]
from reflex.utils.imports import ImportVar
"""Hugeicons Icon component.""" from reflex.components.component import Component from reflex.utils.imports import ImportVar
from reflex_ui.components.component import CoreComponent class HugeIcon(CoreComponent): """A HugeIcon component.""" library = "@hugeicons/react@1.1.1" tag = "HugeiconsIcon" # The main icon to display icon: Var[str] # Alternative icon for states/interactions alt_icon: Var[str | None] # Whether to show the alternative icon show_alt: Var[bool] # The size of the icon in pixels size: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props: props["icon"] = children[0] children = children[1:] for prop
from reflex.vars.base import Var, VarData
"""Hugeicons Icon component.""" from reflex.components.component import Component from reflex.utils.imports import ImportVar from reflex.vars.base import Var, VarData
class HugeIcon(CoreComponent): """A HugeIcon component.""" library = "@hugeicons/react@1.1.1" tag = "HugeiconsIcon" # The main icon to display icon: Var[str] # Alternative icon for states/interactions alt_icon: Var[str | None] # Whether to show the alternative icon show_alt: Var[bool] # The size of the icon in pixels size: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props: props["icon"] = children[0] children = children[1:] for prop in ["icon", "alt_icon"]: if prop in props and
from reflex_ui.components.component import CoreComponent
"""Hugeicons Icon component.""" from reflex.components.component import Component from reflex.utils.imports import ImportVar from reflex.vars.base import Var, VarData from reflex_ui.components.component import CoreComponent class HugeIcon(CoreComponent): """A HugeIcon component."""
tag = "HugeiconsIcon" # The main icon to display icon: Var[str] # Alternative icon for states/interactions alt_icon: Var[str | None] # Whether to show the alternative icon show_alt: Var[bool] # The size of the icon in pixels size: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props: props["icon"] = children[0] children = children[1:] for prop in ["icon", "alt_icon"]: if prop in props and isinstance(props[prop], str): icon_name = props[prop] props[prop] = Var(
library = "@hugeicons/react@1.1.1"
"""Hugeicons Icon component.""" from reflex.components.component import Component from reflex.utils.imports import ImportVar from reflex.vars.base import Var, VarData from reflex_ui.components.component import CoreComponent class HugeIcon(CoreComponent): """A HugeIcon component.""" library = "@hugeicons/react@1.1.1"
# The main icon to display icon: Var[str] # Alternative icon for states/interactions alt_icon: Var[str | None] # Whether to show the alternative icon show_alt: Var[bool] # The size of the icon in pixels size: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props: props["icon"] = children[0] children = children[1:] for prop in ["icon", "alt_icon"]: if prop in props and isinstance(props[prop], str): icon_name = props[prop] props[prop] = Var( icon_na
tag = "HugeiconsIcon"
ugeicons Icon component.""" from reflex.components.component import Component from reflex.utils.imports import ImportVar from reflex.vars.base import Var, VarData from reflex_ui.components.component import CoreComponent class HugeIcon(CoreComponent): """A HugeIcon component.""" library = "@hugeicons/react@1.1.1" tag = "HugeiconsIcon" # The main icon to display icon: Var[str] # Alternative icon for states/interactions alt_icon: Var[str | None] # Whether to show the alternative icon show_alt: Var[bool] # The size of the icon in pixels size: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """
for prop in ["icon", "alt_icon"]: if prop in props and isinstance(props[prop], str): icon_name = props[prop] props[prop] = Var( icon_name, _var_data=VarData( imports={ "@hugeicons/core-free-icons@1.2.1": ImportVar(tag=icon_name) } ), ) stroke_width = props.pop("stroke_width", 2) cls.set_class_name(f"[&_path]:stroke-[{stroke_width}]", props) return super().create(*children, **props) hi = icon = HugeIcon.create
if children and isinstance(children[0], str) and "icon" not in props: props["icon"] = children[0] children = children[1:]
m reflex.utils.imports import ImportVar from reflex.vars.base import Var, VarData from reflex_ui.components.component import CoreComponent class HugeIcon(CoreComponent): """A HugeIcon component.""" library = "@hugeicons/react@1.1.1" tag = "HugeiconsIcon" # The main icon to display icon: Var[str] # Alternative icon for states/interactions alt_icon: Var[str | None] # Whether to show the alternative icon show_alt: Var[bool] # The size of the icon in pixels size: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props:
children = children[1:] for prop in ["icon", "alt_icon"]: if prop in props and isinstance(props[prop], str): icon_name = props[prop] props[prop] = Var( icon_name, _var_data=VarData( imports={ "@hugeicons/core-free-icons@1.2.1": ImportVar(tag=icon_name) } ), ) stroke_width = props.pop("stroke_width", 2) cls.set_class_name(f"[&_path]:stroke-[{stroke_width}]", props) return super().create(*children, **props) hi = icon = HugeIcon.create
props["icon"] = children[0]
from reflex.vars.base import Var, VarData from reflex_ui.components.component import CoreComponent class HugeIcon(CoreComponent): """A HugeIcon component.""" library = "@hugeicons/react@1.1.1" tag = "HugeiconsIcon" # The main icon to display icon: Var[str] # Alternative icon for states/interactions alt_icon: Var[str | None] # Whether to show the alternative icon show_alt: Var[bool] # The size of the icon in pixels size: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props: props["icon"] = children[0]
for prop in ["icon", "alt_icon"]: if prop in props and isinstance(props[prop], str): icon_name = props[prop] props[prop] = Var( icon_name, _var_data=VarData( imports={ "@hugeicons/core-free-icons@1.2.1": ImportVar(tag=icon_name) } ), ) stroke_width = props.pop("stroke_width", 2) cls.set_class_name(f"[&_path]:stroke-[{stroke_width}]", props) return super().create(*children, **props) hi = icon = HugeIcon.create
children = children[1:]
eIcon component.""" library = "@hugeicons/react@1.1.1" tag = "HugeiconsIcon" # The main icon to display icon: Var[str] # Alternative icon for states/interactions alt_icon: Var[str | None] # Whether to show the alternative icon show_alt: Var[bool] # The size of the icon in pixels size: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props: props["icon"] = children[0] children = children[1:] for prop in ["icon", "alt_icon"]: if prop in props and isinstance(props[prop], str):
props[prop] = Var( icon_name, _var_data=VarData( imports={ "@hugeicons/core-free-icons@1.2.1": ImportVar(tag=icon_name) } ), ) stroke_width = props.pop("stroke_width", 2) cls.set_class_name(f"[&_path]:stroke-[{stroke_width}]", props) return super().create(*children, **props) hi = icon = HugeIcon.create
icon_name = props[prop]
ize: Var[int] = Var.create(16) # The stroke width of the icon stroke_width: Var[float] = Var.create(2) @classmethod def create(cls, *children, **props) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props: props["icon"] = children[0] children = children[1:] for prop in ["icon", "alt_icon"]: if prop in props and isinstance(props[prop], str): icon_name = props[prop] props[prop] = Var( icon_name, _var_data=VarData( imports={ "@hugeicons/core-free-icons@1.2.1": ImportVar(tag=icon_name) } ), )
cls.set_class_name(f"[&_path]:stroke-[{stroke_width}]", props) return super().create(*children, **props) hi = icon = HugeIcon.create
stroke_width = props.pop("stroke_width", 2)
) -> Component: """Initialize the Icon component. Args: *children: The positional arguments **props: The keyword arguments Returns: The created component. """ if children and isinstance(children[0], str) and "icon" not in props: props["icon"] = children[0] children = children[1:] for prop in ["icon", "alt_icon"]: if prop in props and isinstance(props[prop], str): icon_name = props[prop] props[prop] = Var( icon_name, _var_data=VarData( imports={ "@hugeicons/core-free-icons@1.2.1": ImportVar(tag=icon_name) } ), ) stroke_width = props.pop("stroke_width", 2) cls.set_class_name(f"[&_path]:stroke-[{stroke_width}]", props) return super().create(*children, **props)
hi = icon = HugeIcon.create
"""Set of custom icons."""
from reflex.components.el import svg from reflex.vars.base import Var from reflex_ui.utils.twmerge import cn @memo def spinner_component( class_name: str | Var[str] = "", ) -> Component: """Create a spinner SVG icon. Args: class_name: The class name of the spinner. Returns: The spinner SVG icon. """ return svg( svg.path( opacity="0.2", d="M14.66 8a6.666 6.666 0 1 1-13.333 0 6.666 6.666 0 0 1 13.333 0Z", stroke="currentColor", stroke_width="1.5", ), svg.path( d="M13.413 11.877A6.666 6.666 0 1 1 10.26 1.728", stroke="currentColor", stroke_width="1.5", ), xmlns="http://www.w3.org/2000/svg", custom_attrs={"viewBox": "0 0 16 16"}, class_name=cn("animate-spin size-4 fill-none", class_name), ) spinner = spinner_component @memo def select_arrow_icon( class_name: str | Var[str] = "", ) -> Component:
from reflex.components.component import Component, memo
"""Set of custom icons.""" from reflex.components.component import Component, memo
from reflex.vars.base import Var from reflex_ui.utils.twmerge import cn @memo def spinner_component( class_name: str | Var[str] = "", ) -> Component: """Create a spinner SVG icon. Args: class_name: The class name of the spinner. Returns: The spinner SVG icon. """ return svg( svg.path( opacity="0.2", d="M14.66 8a6.666 6.666 0 1 1-13.333 0 6.666 6.666 0 0 1 13.333 0Z", stroke="currentColor", stroke_width="1.5", ), svg.path( d="M13.413 11.877A6.666 6.666 0 1 1 10.26 1.728", stroke="currentColor", stroke_width="1.5", ), xmlns="http://www.w3.org/2000/svg", custom_attrs={"viewBox": "0 0 16 16"}, class_name=cn("animate-spin size-4 fill-none", class_name), ) spinner = spinner_component @memo def select_arrow_icon( class_name: str | Var[str] = "", ) -> Component: """A select arrow SVG icon."""
from reflex.components.el import svg
"""Set of custom icons.""" from reflex.components.component import Component, memo from reflex.components.el import svg
from reflex_ui.utils.twmerge import cn @memo def spinner_component( class_name: str | Var[str] = "", ) -> Component: """Create a spinner SVG icon. Args: class_name: The class name of the spinner. Returns: The spinner SVG icon. """ return svg( svg.path( opacity="0.2", d="M14.66 8a6.666 6.666 0 1 1-13.333 0 6.666 6.666 0 0 1 13.333 0Z", stroke="currentColor", stroke_width="1.5", ), svg.path( d="M13.413 11.877A6.666 6.666 0 1 1 10.26 1.728", stroke="currentColor", stroke_width="1.5", ), xmlns="http://www.w3.org/2000/svg", custom_attrs={"viewBox": "0 0 16 16"}, class_name=cn("animate-spin size-4 fill-none", class_name), ) spinner = spinner_component @memo def select_arrow_icon( class_name: str | Var[str] = "", ) -> Component: """A select arrow SVG icon.""" return svg( svg.path(
from reflex.vars.base import Var
"""Set of custom icons.""" from reflex.components.component import Component, memo from reflex.components.el import svg from reflex.vars.base import Var
@memo def spinner_component( class_name: str | Var[str] = "", ) -> Component: """Create a spinner SVG icon. Args: class_name: The class name of the spinner. Returns: The spinner SVG icon. """ return svg( svg.path( opacity="0.2", d="M14.66 8a6.666 6.666 0 1 1-13.333 0 6.666 6.666 0 0 1 13.333 0Z", stroke="currentColor", stroke_width="1.5", ), svg.path( d="M13.413 11.877A6.666 6.666 0 1 1 10.26 1.728", stroke="currentColor", stroke_width="1.5", ), xmlns="http://www.w3.org/2000/svg", custom_attrs={"viewBox": "0 0 16 16"}, class_name=cn("animate-spin size-4 fill-none", class_name), ) spinner = spinner_component @memo def select_arrow_icon( class_name: str | Var[str] = "", ) -> Component: """A select arrow SVG icon.""" return svg( svg.path( d="M4.99902 10.0003L7.99967
from reflex_ui.utils.twmerge import cn
"""Set of custom icons.""" from reflex.components.component import Component, memo from reflex.components.el import svg from reflex.vars.base import Var from reflex_ui.utils.twmerge import cn @memo def spinner_component( class_name: str | Var[str] = "", ) -> Component: """Create a spinner SVG icon. Args: class_name: The class name of the spinner. Returns: The spinner SVG icon. """ return svg( svg.path( opacity="0.2", d="M14.66 8a6.666 6.666 0 1 1-13.333 0 6.666 6.666 0 0 1 13.333 0Z", stroke="currentColor", stroke_width="1.5", ), svg.path( d="M13.413 11.877A6.666 6.666 0 1 1 10.26 1.728", stroke="currentColor", stroke_width="1.5", ), xmlns="http://www.w3.org/2000/svg", custom_attrs={"viewBox": "0 0 16 16"}, class_name=cn("animate-spin size-4 fill-none", class_name), )
@memo def select_arrow_icon( class_name: str | Var[str] = "", ) -> Component: """A select arrow SVG icon.""" return svg( svg.path( d="M4.99902 10.0003L7.99967 13.0003L10.999 10.0003M4.99902 6.00033L7.99967 3.00033L10.999 6.00033", stroke="currentColor", stroke_width="1.5", stroke_linecap="round", stroke_linejoin="round", ), xmlns="http://www.w3.org/2000/svg", custom_attrs={"viewBox": "0 0 16 16"}, class_name=cn("size-4 fill-none", class_name), ) select_arrow = select_arrow_icon @memo def arrow_svg_component(class_name: str | Var[str] = "") -> Component: """Create a tooltip arrow SVG icon. The arrow SVG icon. """ return svg( svg.path( d="M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V9H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
spinner = spinner_component
stroke="currentColor", stroke_width="1.5", ), svg.path( d="M13.413 11.877A6.666 6.666 0 1 1 10.26 1.728", stroke="currentColor", stroke_width="1.5", ), xmlns="http://www.w3.org/2000/svg", custom_attrs={"viewBox": "0 0 16 16"}, class_name=cn("animate-spin size-4 fill-none", class_name), ) spinner = spinner_component @memo def select_arrow_icon( class_name: str | Var[str] = "", ) -> Component: """A select arrow SVG icon.""" return svg( svg.path( d="M4.99902 10.0003L7.99967 13.0003L10.999 10.0003M4.99902 6.00033L7.99967 3.00033L10.999 6.00033", stroke="currentColor", stroke_width="1.5", stroke_linecap="round", stroke_linejoin="round", ), xmlns="http://www.w3.org/2000/svg", custom_attrs={"viewBox": "0 0 16 16"}, class_name=cn("size-4 fill-none", class_name), )
@memo def arrow_svg_component(class_name: str | Var[str] = "") -> Component: """Create a tooltip arrow SVG icon. The arrow SVG icon. """ return svg( svg.path( d="M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V9H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z", class_name=cn("fill-secondary-12", class_name), ), svg.path( d="M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z", class_name="fill-none", ), width="20", height="10", xmlns="http://www.w3.org/2000/svg", custom_attrs={"viewBox": "0 0 20 10"}, fil
select_arrow = select_arrow_icon
_svg_component(class_name: str | Var[str] = "") -> Component: """Create a tooltip arrow SVG icon. The arrow SVG icon. """ return svg( svg.path( d="M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V9H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z", class_name=cn("fill-secondary-12", class_name), ), svg.path( d="M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z", class_name="fill-none", ), width="20", height="10", xmlns="http://www.w3.org/2000/svg", custom_attrs={"viewBox": "0 0 20 10"}, fill="none", )
arrow_svg = arrow_svg_component
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
from reflex.utils.imports import ImportVar class SimpleIcon(rx.Component): """Simple Icon component wrapper for @icons-pack/react-simple-icons.""" library = "@icons-pack/react-simple-icons@13.8.0" tag = "SiReact" # The color of the icon color: rx.Var[str] # The size of the icon size: rx.Var[int | str] @classmethod def create(cls, icon_name: str, **props): """Create a SimpleIcon component. Args: icon_name: The icon component name (e.g., "SiReact", "SiGithub", "SiPython") **props: Additional props like size, color Returns: The component instance. """ instance = super().create(**props) instance.tag = icon_name return instance def add_imports(self): """Add the specific icon import.""" return { self.library: ImportVar( tag=self.tag, is_default=False, ) } simple_icon = S
import reflex as rx
"""Simple Icon component wrapper for @icons-pack/react-simple-icons.""" import reflex as rx
class SimpleIcon(rx.Component): """Simple Icon component wrapper for @icons-pack/react-simple-icons.""" library = "@icons-pack/react-simple-icons@13.8.0" tag = "SiReact" # The color of the icon color: rx.Var[str] # The size of the icon size: rx.Var[int | str] @classmethod def create(cls, icon_name: str, **props): """Create a SimpleIcon component. Args: icon_name: The icon component name (e.g., "SiReact", "SiGithub", "SiPython") **props: Additional props like size, color Returns: The component instance. """ instance = super().create(**props) instance.tag = icon_name return instance def add_imports(self): """Add the specific icon import.""" return { self.library: ImportVar( tag=self.tag, is_default=False, ) } simple_icon = SimpleIcon.create
from reflex.utils.imports import ImportVar
"""Simple Icon component wrapper for @icons-pack/react-simple-icons.""" import reflex as rx from reflex.utils.imports import ImportVar class SimpleIcon(rx.Component): """Simple Icon component wrapper for @icons-pack/react-simple-icons."""
tag = "SiReact" # The color of the icon color: rx.Var[str] # The size of the icon size: rx.Var[int | str] @classmethod def create(cls, icon_name: str, **props): """Create a SimpleIcon component. Args: icon_name: The icon component name (e.g., "SiReact", "SiGithub", "SiPython") **props: Additional props like size, color Returns: The component instance. """ instance = super().create(**props) instance.tag = icon_name return instance def add_imports(self): """Add the specific icon import.""" return { self.library: ImportVar( tag=self.tag, is_default=False, ) } simple_icon = SimpleIcon.create
library = "@icons-pack/react-simple-icons@13.8.0"
"""Simple Icon component wrapper for @icons-pack/react-simple-icons.""" import reflex as rx from reflex.utils.imports import ImportVar class SimpleIcon(rx.Component): """Simple Icon component wrapper for @icons-pack/react-simple-icons.""" library = "@icons-pack/react-simple-icons@13.8.0"
# The color of the icon color: rx.Var[str] # The size of the icon size: rx.Var[int | str] @classmethod def create(cls, icon_name: str, **props): """Create a SimpleIcon component. Args: icon_name: The icon component name (e.g., "SiReact", "SiGithub", "SiPython") **props: Additional props like size, color Returns: The component instance. """ instance = super().create(**props) instance.tag = icon_name return instance def add_imports(self): """Add the specific icon import.""" return { self.library: ImportVar( tag=self.tag, is_default=False, ) } simple_icon = SimpleIcon.create
tag = "SiReact"
"""Simple Icon component wrapper for @icons-pack/react-simple-icons.""" import reflex as rx from reflex.utils.imports import ImportVar class SimpleIcon(rx.Component): """Simple Icon component wrapper for @icons-pack/react-simple-icons.""" library = "@icons-pack/react-simple-icons@13.8.0" tag = "SiReact" # The color of the icon color: rx.Var[str] # The size of the icon size: rx.Var[int | str] @classmethod def create(cls, icon_name: str, **props): """Create a SimpleIcon component. Args: icon_name: The icon component name (e.g., "SiReact", "SiGithub", "SiPython") **props: Additional props like size, color Returns: The component instance. """
instance.tag = icon_name return instance def add_imports(self): """Add the specific icon import.""" return { self.library: ImportVar( tag=self.tag, is_default=False, ) } simple_icon = SimpleIcon.create
instance = super().create(**props)
"""Simple Icon component wrapper for @icons-pack/react-simple-icons.""" import reflex as rx from reflex.utils.imports import ImportVar class SimpleIcon(rx.Component): """Simple Icon component wrapper for @icons-pack/react-simple-icons.""" library = "@icons-pack/react-simple-icons@13.8.0" tag = "SiReact" # The color of the icon color: rx.Var[str] # The size of the icon size: rx.Var[int | str] @classmethod def create(cls, icon_name: str, **props): """Create a SimpleIcon component. Args: icon_name: The icon component name (e.g., "SiReact", "SiGithub", "SiPython") **props: Additional props like size, color Returns: The component instance. """ instance = super().create(**props)
return instance def add_imports(self): """Add the specific icon import.""" return { self.library: ImportVar( tag=self.tag, is_default=False, ) } simple_icon = SimpleIcon.create
instance.tag = icon_name
rt reflex as rx from reflex.utils.imports import ImportVar class SimpleIcon(rx.Component): """Simple Icon component wrapper for @icons-pack/react-simple-icons.""" library = "@icons-pack/react-simple-icons@13.8.0" tag = "SiReact" # The color of the icon color: rx.Var[str] # The size of the icon size: rx.Var[int | str] @classmethod def create(cls, icon_name: str, **props): """Create a SimpleIcon component. Args: icon_name: The icon component name (e.g., "SiReact", "SiGithub", "SiPython") **props: Additional props like size, color Returns: The component instance. """ instance = super().create(**props) instance.tag = icon_name return instance def add_imports(self): """Add the specific icon import.""" return { self.library: ImportVar( tag=self.tag, is_default=False, ) }
simple_icon = SimpleIcon.create
"""Icons sub-package."""
_SUBMODULES: set[str] = { "hugeicon", "others", } _SUBMOD_ATTRS: dict[str, list[str]] = { "hugeicon": ["hi", "icon"], "others": ["spinner", "select_arrow"], } __getattr__, __dir__, __all__ = lazy_loader.attach( __name__, submodules=_SUBMODULES, submod_attrs=_SUBMOD_ATTRS, )
from reflex.utils import lazy_loader
"""Merge Tailwind CSS classes utility."""
from reflex.vars import FunctionVar, Var from reflex.vars.base import VarData def cn( *classes: Var | str | tuple | list | None, ) -> Var: """Merge Tailwind CSS classes. Accepts strings, Vars, lists, or tuples. Args: *classes: Any number of class strings, Vars, tuples, or lists. Returns: Var: A Var representing the merged classes string. """ return ( Var( "cn", _var_data=VarData(imports={"clsx-for-tailwind": ImportVar(tag="cn")}), ) .to(FunctionVar) .call(*classes) .to(str) )
from reflex.utils.imports import ImportVar
"""Merge Tailwind CSS classes utility.""" from reflex.utils.imports import ImportVar
from reflex.vars.base import VarData def cn( *classes: Var | str | tuple | list | None, ) -> Var: """Merge Tailwind CSS classes. Accepts strings, Vars, lists, or tuples. Args: *classes: Any number of class strings, Vars, tuples, or lists. Returns: Var: A Var representing the merged classes string. """ return ( Var( "cn", _var_data=VarData(imports={"clsx-for-tailwind": ImportVar(tag="cn")}), ) .to(FunctionVar) .call(*classes) .to(str) )
from reflex.vars import FunctionVar, Var